@pramen/cms-editor 0.0.42 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.css +1 -1
- package/dist/index.html +1 -1
- package/dist/main.2k0x7rgk.js +396 -0
- package/package.json +1 -1
- package/src/components.tsx +185 -74
- package/dist/main.xkz96gh2.js +0 -396
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
var ns=Object.create;var{getPrototypeOf:ss,defineProperty:yO,getOwnPropertyNames:as}=Object;var rs=Object.prototype.hasOwnProperty;function ts(Z){return this[Z]}var es,Za,S=(Z,Q,J)=>{var q=Z!=null&&typeof Z==="object";if(q){var G=Q?es??=new WeakMap:Za??=new WeakMap,U=G.get(Z);if(U)return U}J=Z!=null?ns(ss(Z)):{};let K=Q||!Z||!Z.__esModule?yO(J,"default",{value:Z,enumerable:!0}):J;for(let H of as(Z))if(!rs.call(K,H))yO(K,H,{get:ts.bind(Z,H),enumerable:!0});if(q)G.set(Z,K);return K};var bG=(Z,Q)=>()=>(Q||Z((Q={exports:{}}).exports,Q),Q.exports);var Qa=(Z)=>Z;function Xa(Z,Q){this[Z]=Qa.bind(null,Q)}var X9=(Z,Q)=>{for(var J in Q)yO(Z,J,{get:Q[J],enumerable:!0,configurable:!0,set:Xa.bind(Q,J)})};var k=(Z,Q)=>()=>(Z&&(Q=Z(Z=0)),Q);class i4{cache=new Map;_maxSize;constructor(Z){if(Z<0)throw Error(`[buzola] LoaderCache maxSize must be non-negative, got ${Z}`);this._maxSize=Z}get maxSize(){return this._maxSize}get size(){return this.cache.size}get(Z){let Q=this.cache.get(Z);if(Q!==void 0||this.cache.has(Z))this.cache.delete(Z),this.cache.set(Z,Q);return Q}has(Z){return this.cache.has(Z)}set(Z,Q){this.cache.delete(Z),this.cache.set(Z,Q);while(this.cache.size>this._maxSize){let J=this.cache.keys().next().value;this.cache.delete(J)}}delete(Z){this.cache.delete(Z)}clear(){this.cache.clear()}}function m8(Z,Q){let J=Q.pathname,q=J.split("/").filter(Boolean);return wO(Z.root,q,0,{},J)}function wO(Z,Q,J,q,G){if(J===Q.length){if(Z.route)return _k(Z.route.chain,q,G);return null}let U=Q[J],K=Z.staticChildren.get(U);if(K){let H=wO(K,Q,J+1,q,G);if(H)return H}if(Z.dynamicChild){let H={...q,[Z.dynamicChild.paramName]:decodeURIComponent(U)},B=wO(Z.dynamicChild.node,Q,J+1,H,G);if(B)return B}if(Z.catchAllChild){let H=Q.slice(J).map((F)=>decodeURIComponent(F)).join("/"),B={...q,[Z.catchAllChild.paramName]:H};return _k(Z.catchAllChild.chain,B,G)}return null}function _k(Z,Q,J){return Z.map((q)=>({node:q,params:Q,pathname:J}))}function xO(Z){let Q=Z.endsWith("+");return{name:Q?Z.slice(1,-1):Z.slice(1),isCatchAll:Q}}function g1(Z){let Q=[];for(let J of Z.split("/"))if(J.startsWith(":"))Q.push(xO(J).name);return Q}class n4{routes;adapter;viewTransitions;_basePath;persistentParamsFn;pageRegistry;subscribers=new Set;invalidationListeners=new Set;state;navigationId=0;stopFn;blockers=new Set;pendingScrollBehavior="after-transition";_loaderCache;constructor(Z){this.routes=Z.routes,this.adapter=Z.adapter,this.viewTransitions=Z.viewTransitions??!1,this._basePath=Z.basePath?Z.basePath.replace(/\/$/,""):"",this.persistentParamsFn=Z.persistentParams,this.pageRegistry=Z.pageRegistry??{},this._loaderCache=Z.loaderCacheSize?new i4(Z.loaderCacheSize):void 0;let Q=this.adapter.getCurrentURL(),J=this.createMatchUrl(Q),q=m8(this.routes,J)??[];if(q.length===0)console.warn(`[buzola] No route matched URL "${Q.pathname}". Define a catch-all 404 route to handle unmatched URLs.`);this.state={location:Q,matches:q,isPending:!1,navigationState:this.adapter.getState()}}get basePath(){return this._basePath}get loaderCache(){return this._loaderCache}getState(){return this.state}subscribe(Z){return this.subscribers.add(Z),()=>{this.subscribers.delete(Z)}}start(){let Z=(J)=>{if(!J.canIntercept)return;let q=new URL(J.destination.url),G=this.createMatchUrl(q),U=m8(this.routes,G);if(!U){console.warn(`[buzola] No route matched URL "${q.pathname}". The navigation was not intercepted.`);return}let K=++this.navigationId,H=J.viewTransition||this.viewTransitions,B=this.pendingScrollBehavior;this.pendingScrollBehavior="after-transition",J.intercept({scroll:B,handler:async()=>{for(let M of this.blockers){if(this.navigationId!==K)return;if(!await M())throw new bO}if(this.setState({...this.state,isPending:!0,pendingLocation:q}),this.navigationId!==K)return;let F=()=>{this.setState({location:q,matches:U,isPending:!1,pendingLocation:void 0,navigationState:this.adapter.getState()})};if(H&&typeof document<"u"&&"startViewTransition"in document)document.startViewTransition(F);else F()}})};this.adapter.addEventListener("navigate",Z);let Q=()=>{this.adapter.removeEventListener("navigate",Z)};return this.stopFn=Q,Q}navigate(Z,Q){if(Q?.resetScroll===!1)this.pendingScrollBehavior="manual";this.adapter.navigate(this._basePath+Z,Q)}navigateToPage(Z,Q,J){let q=this.buildPagePath(Z,Q);this.navigate(this.stripBasePath(q),J)}buildPagePath(Z,Q){let J=this.pageRegistry[Z];if(!J)throw Error(`[buzola] Unknown page "${Z}". Is it registered in the page registry?`);let q=this.resolveParams(J,Q);return this.buildPath(J,q)}preload(Z,Q){let J=this.buildPagePath(Z,Q),q=new URL(J,"http://localhost"),G=this.createMatchUrl(q),U=m8(this.routes,G);if(!U)return;for(let K of U)K.node.preload?.()}back(){this.adapter.back()}forward(){this.adapter.forward()}buildPath(Z,Q){let J=Z.split("/"),q=[],G=[];for(let F of J)if(F.startsWith(":")){let{name:M,isCatchAll:O}=xO(F),V=Q?.[M];if(V===void 0)G.push(M);else if(O)q.push(V);else q.push(encodeURIComponent(V))}else q.push(F);if(G.length>0){if(!Q)throw Error(`[buzola] Missing params for path "${Z}": ${G.join(", ")}`);throw Error(`[buzola] Missing param "${G[0]}" for path "${Z}"`)}let U=new Set(g1(Z)),K=new URLSearchParams;if(Q){for(let[F,M]of Object.entries(Q))if(!U.has(F)&&M!==void 0)K.set(F,M)}let H=this._basePath+q.join("/"),B=K.toString();return B?`${H}?${B}`:H}stripBasePath(Z){if(this._basePath&&Z.startsWith(this._basePath))return Z.slice(this._basePath.length)||"/";return Z}resolveParams(Z,Q){let J=g1(Z),q=this.getCurrentParams(),G=this.persistentParamsFn?.()??{},U={};for(let K of J){let H=Q?.[K]??q[K]??G[K];if(H!==void 0)U[K]=H}if(Q){let K=new Set(J);for(let[H,B]of Object.entries(Q))if(!K.has(H)&&B!==void 0)U[H]=B}return U}getCurrentParams(){let Z={};for(let Q of this.state.matches)Object.assign(Z,Q.params);return Z}invalidateAll(){for(let Z of this.invalidationListeners)Z()}onInvalidate(Z){return this.invalidationListeners.add(Z),()=>{this.invalidationListeners.delete(Z)}}addBlocker(Z){return this.blockers.add(Z),()=>{this.blockers.delete(Z)}}dispose(){this.stopFn?.(),this.stopFn=void 0,this.subscribers.clear(),this.invalidationListeners.clear()}updateRoutes(Z){this.routes=Z;let Q=m8(this.routes,this.createMatchUrl(this.state.location))??[];this.setState({...this.state,matches:Q})}createMatchUrl(Z){if(!this._basePath)return Z;let Q=new URL(Z);return Q.pathname=this.stripBasePath(Q.pathname),Q}setState(Z){this.state=Z;for(let Q of this.subscribers)Q(this.state)}}var bO;var vO=k(()=>{bO=class bO extends Error{constructor(){super("Navigation aborted by blocker");this.name="NavigationAbortedError"}}});function Lk(Z){let{path:Q,fullPath:J,component:q,searchSchema:G,preload:U,isLayout:K=!1,isIndex:H=!1}=Z;return{id:`route:${J||"/"}${K?":layout":""}`,path:Fk(Q),fullPath:Fk(J),component:q,searchSchema:G,preload:U,isLayout:K,isIndex:H}}function hO(Z,Q=""){let J=Mk(Z,Q,[]),q=gO();for(let G of J)Ja(q,G.pattern,G.chain);return{root:q}}function Mk(Z,Q,J){let q=[];for(let G of Z){let U=G.isPathlessGroup?"":G.path,K=G.children!=null&&G.children.length>0,H=G.isLayout??K,B=G.isIndex??(!H&&(G.path==="/"||G.path==="")),F;if(G.matchPath!=null)F=G.matchPath;else if(B)F=Q||"/";else F=qa(Q||"/",U);let M=Lk({path:U,fullPath:F,component:G.component,searchSchema:G.searchSchema,preload:G.preload,isLayout:H,isIndex:B});if(H){let O=[...J,M];if(G.children){let V=G.isPathlessGroup?Q:F;q.push(...Mk(G.children,V,O))}}else q.push({pattern:F,chain:[...J,M]})}return q}function gO(){return{staticChildren:new Map}}function Ja(Z,Q,J){let q=Ya(Q),G=Z;for(let U=0;U<q.length;U++){let K=q[U];if(K.startsWith(":")&&(K.endsWith("+")||K.endsWith("*"))){let H=K.slice(1,-1);G.catchAllChild={paramName:H,chain:J};return}if(K.startsWith(":")){let H=K.slice(1);if(!G.dynamicChild)G.dynamicChild={paramName:H,node:gO()};G=G.dynamicChild.node}else{let H=G.staticChildren.get(K);if(!H)H=gO(),G.staticChildren.set(K,H);G=H}}G.route={chain:J}}function Ya(Z){return Z.split("/").filter(Boolean)}function Fk(Z){if(Z===""||Z==="/")return"/";let Q=Z.startsWith("/")?Z:`/${Z}`;return Q.endsWith("/")?Q.slice(0,-1):Q}function qa(Z,Q){if(Q==="/")return Z==="/"?"/":Z;let J=Z==="/"?"":Z,q=Q.startsWith("/")?Q:`/${Q}`;return J+q}function uO(){let Z=window.navigation;if(!Z)throw Error("Navigation API is not available. Buzola requires a browser that supports the Navigation API.");let Q=new Set,J=!1,q=(G)=>{let U=J;J=!1;let K={destination:{url:G.destination.url},canIntercept:G.canIntercept,navigationType:G.navigationType,userInitiated:G.userInitiated,viewTransition:U,intercept(H){G.intercept({handler:H.handler,scroll:H.scroll})}};for(let H of Q)H(K)};return{getCurrentURL(){return new URL(Z.currentEntry.url)},navigate(G,U){if(U?.viewTransition)J=!0;Z.navigate(G,{history:U?.replace?"replace":"push",state:U?.state})},back(){Z.back()},forward(){Z.forward()},addEventListener(G,U){let K=Q.size===0;if(Q.add(U),K)Z.addEventListener("navigate",q)},removeEventListener(G,U){if(Q.delete(U),Q.size===0)Z.removeEventListener("navigate",q)},getState(){return Z.currentEntry?.getState?.()}}}function Ok(Z){return!("issues"in Z["~standard"].validate(void 0))}function fO(Z,Q,J){let q=Z["~standard"].validate(Q);if("issues"in q)throw Error(`${J}${q.issues.map((G)=>G.message).join(", ")}`);return q.value}function Vk(Z){let Q=Z.startsWith("?"),J=Q?Z.slice(1):Z,q=J.endsWith("[]"),G=q?J.slice(0,-2):J,U=za[G];if(!U)throw Error(`[buzola] Unknown param type: ${G}`);let K;if(q)K=(H)=>{if(Q&&(H===void 0||Array.isArray(H)&&H.length===0))return{value:void 0};if(!Array.isArray(H))return{issues:[{message:`expected ${G}[]`}]};let B=[];for(let F of H){let M=U(F);if("issues"in M)return M;B.push(M.value)}return{value:B}};else if(Q)K=(H)=>H===void 0||H===""?{value:void 0}:U(H);else K=U;return{schema:{"~standard":{version:1,vendor:"buzola",validate:K}},optional:Q,array:q}}var Ga,za;var s4=k(()=>{Ga=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,za={string:(Z)=>typeof Z==="string"?{value:Z}:{issues:[{message:"expected string"}]},number:(Z)=>{let Q=Number(Z);return Number.isNaN(Q)?{issues:[{message:"expected number"}]}:{value:Q}},uuid:(Z)=>typeof Z==="string"&&Ga.test(Z)?{value:Z}:{issues:[{message:"expected UUID"}]}}});var JZ=bG((Ua,a4)=>{(function(){function Z(E,r){Object.defineProperty(q.prototype,E,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",r[0],r[1])}})}function Q(E){if(E===null||typeof E!=="object")return null;return E=RQ&&E[RQ]||E["@@iterator"],typeof E==="function"?E:null}function J(E,r){E=(E=E.constructor)&&(E.displayName||E.name)||"ReactClass";var _Z=E+"."+r;BZ[_Z]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",r,E),BZ[_Z]=!0)}function q(E,r,_Z){this.props=E,this.context=r,this.refs=RX,this.updater=_Z||GX}function G(){}function U(E,r,_Z){this.props=E,this.context=r,this.refs=RX,this.updater=_Z||GX}function K(){}function H(E){return""+E}function B(E){try{H(E);var r=!1}catch(vZ){r=!0}if(r){r=console;var _Z=r.error,NZ=typeof Symbol==="function"&&Symbol.toStringTag&&E[Symbol.toStringTag]||E.constructor.name||"Object";return _Z.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",NZ),H(E)}}function F(E){if(E==null)return null;if(typeof E==="function")return E.$$typeof===aJ?null:E.displayName||E.name||null;if(typeof E==="string")return E;switch(E){case t:return"Fragment";case o:return"Profiler";case $:return"StrictMode";case sZ:return"Suspense";case CZ:return"SuspenseList";case bZ:return"Activity"}if(typeof E==="object")switch(typeof E.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),E.$$typeof){case YZ:return"Portal";case PZ:return E.displayName||"Context";case IZ:return(E._context.displayName||"Context")+".Consumer";case yZ:var r=E.render;return E=E.displayName,E||(E=r.displayName||r.name||"",E=E!==""?"ForwardRef("+E+")":"ForwardRef"),E;case KQ:return r=E.displayName||null,r!==null?r:F(E.type)||"Memo";case MZ:r=E._payload,E=E._init;try{return F(E(r))}catch(_Z){}}return null}function M(E){if(E===t)return"<>";if(typeof E==="object"&&E!==null&&E.$$typeof===MZ)return"<...>";try{var r=F(E);return r?"<"+r+">":"<...>"}catch(_Z){return"<...>"}}function O(){var E=qQ.A;return E===null?null:E.getOwner()}function V(){return Error("react-stack-top-frame")}function A(E){if(g6.call(E,"key")){var r=Object.getOwnPropertyDescriptor(E,"key").get;if(r&&r.isReactWarning)return!1}return E.key!==void 0}function N(E,r){function _Z(){k7||(k7=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}_Z.isReactWarning=!0,Object.defineProperty(E,"key",{get:_Z,configurable:!0})}function T(){var E=F(this.type);return d9[E]||(d9[E]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),E=this.props.ref,E!==void 0?E:null}function P(E,r,_Z,NZ,vZ,eZ){var ZQ=_Z.ref;return E={$$typeof:d,type:E,key:r,props:_Z,_owner:NZ},(ZQ!==void 0?ZQ:null)!==null?Object.defineProperty(E,"ref",{enumerable:!1,get:T}):Object.defineProperty(E,"ref",{enumerable:!1,value:null}),E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(E,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(E,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:vZ}),Object.defineProperty(E,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:eZ}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E}function C(E,r){return r=P(E.type,r,E.props,E._owner,E._debugStack,E._debugTask),E._store&&(r._store.validated=E._store.validated),r}function y(E){f(E)?E._store&&(E._store.validated=1):typeof E==="object"&&E!==null&&E.$$typeof===MZ&&(E._payload.status==="fulfilled"?f(E._payload.value)&&E._payload.value._store&&(E._payload.value._store.validated=1):E._store&&(E._store.validated=1))}function f(E){return typeof E==="object"&&E!==null&&E.$$typeof===d}function u(E){var r={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(_Z){return r[_Z]})}function n(E,r){return typeof E==="object"&&E!==null&&E.key!=null?(B(E.key),u(""+E.key)):r.toString(36)}function e(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status==="string"?E.then(K,K):(E.status="pending",E.then(function(r){E.status==="pending"&&(E.status="fulfilled",E.value=r)},function(r){E.status==="pending"&&(E.status="rejected",E.reason=r)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function a(E,r,_Z,NZ,vZ){var eZ=typeof E;if(eZ==="undefined"||eZ==="boolean")E=null;var ZQ=!1;if(E===null)ZQ=!0;else switch(eZ){case"bigint":case"string":case"number":ZQ=!0;break;case"object":switch(E.$$typeof){case d:case YZ:ZQ=!0;break;case MZ:return ZQ=E._init,a(ZQ(E._payload),r,_Z,NZ,vZ)}}if(ZQ){ZQ=E,vZ=vZ(ZQ);var EQ=NZ===""?"."+n(ZQ,0):NZ;return gZ(vZ)?(_Z="",EQ!=null&&(_Z=EQ.replace(u6,"$&/")+"/"),a(vZ,r,_Z,"",function(AJ){return AJ})):vZ!=null&&(f(vZ)&&(vZ.key!=null&&(ZQ&&ZQ.key===vZ.key||B(vZ.key)),_Z=C(vZ,_Z+(vZ.key==null||ZQ&&ZQ.key===vZ.key?"":(""+vZ.key).replace(u6,"$&/")+"/")+EQ),NZ!==""&&ZQ!=null&&f(ZQ)&&ZQ.key==null&&ZQ._store&&!ZQ._store.validated&&(_Z._store.validated=2),vZ=_Z),r.push(vZ)),1}if(ZQ=0,EQ=NZ===""?".":NZ+":",gZ(E))for(var pZ=0;pZ<E.length;pZ++)NZ=E[pZ],eZ=EQ+n(NZ,pZ),ZQ+=a(NZ,r,_Z,eZ,vZ);else if(pZ=Q(E),typeof pZ==="function")for(pZ===E.entries&&(h6||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),h6=!0),E=pZ.call(E),pZ=0;!(NZ=E.next()).done;)NZ=NZ.value,eZ=EQ+n(NZ,pZ++),ZQ+=a(NZ,r,_Z,eZ,vZ);else if(eZ==="object"){if(typeof E.then==="function")return a(e(E),r,_Z,NZ,vZ);throw r=String(E),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return ZQ}function c(E,r,_Z){if(E==null)return E;var NZ=[],vZ=0;return a(E,NZ,"","",function(eZ){return r.call(_Z,eZ,vZ++)}),NZ}function GZ(E){if(E._status===-1){var r=E._ioInfo;r!=null&&(r.start=r.end=performance.now()),r=E._result;var _Z=r();if(_Z.then(function(vZ){if(E._status===0||E._status===-1){E._status=1,E._result=vZ;var eZ=E._ioInfo;eZ!=null&&(eZ.end=performance.now()),_Z.status===void 0&&(_Z.status="fulfilled",_Z.value=vZ)}},function(vZ){if(E._status===0||E._status===-1){E._status=2,E._result=vZ;var eZ=E._ioInfo;eZ!=null&&(eZ.end=performance.now()),_Z.status===void 0&&(_Z.status="rejected",_Z.reason=vZ)}}),r=E._ioInfo,r!=null){r.value=_Z;var NZ=_Z.displayName;typeof NZ==="string"&&(r.name=NZ)}E._status===-1&&(E._status=0,E._result=_Z)}if(E._status===1)return r=E._result,r===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
+
|
|
3
|
+
Your code should look like:
|
|
4
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
|
+
|
|
6
|
+
Did you accidentally put curly braces around the import?`,r),"default"in r||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
+
|
|
8
|
+
Your code should look like:
|
|
9
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,r),r.default;throw E._result}function s(){var E=qQ.H;return E===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
|
+
2. You might be breaking the Rules of Hooks
|
|
12
|
+
3. You might have more than one copy of React in the same app
|
|
13
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),E}function LZ(){qQ.asyncTransitions--}function HZ(E){if(i9===null)try{var r=("require"+Math.random()).slice(0,7);i9=(a4&&a4[r]).call(a4,"timers").setImmediate}catch(_Z){i9=function(NZ){S7===!1&&(S7=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var vZ=new MessageChannel;vZ.port1.onmessage=NZ,vZ.port2.postMessage(void 0)}}return i9(E)}function KZ(E){return 1<E.length&&typeof AggregateError==="function"?AggregateError(E):E[0]}function v(E,r){r!==n9-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),n9=r}function i(E,r,_Z){var NZ=qQ.actQueue;if(NZ!==null)if(NZ.length!==0)try{x(NZ),HZ(function(){return i(E,r,_Z)});return}catch(vZ){qQ.thrownErrors.push(vZ)}else qQ.actQueue=null;0<qQ.thrownErrors.length?(NZ=KZ(qQ.thrownErrors),qQ.thrownErrors.length=0,_Z(NZ)):r(E)}function x(E){if(!a9){a9=!0;var r=0;try{for(;r<E.length;r++){var _Z=E[r];do{qQ.didUsePromise=!1;var NZ=_Z(!1);if(NZ!==null){if(qQ.didUsePromise){E[r]=_Z,E.splice(0,r);return}_Z=NZ}else break}while(1)}E.length=0}catch(vZ){E.splice(0,r+1),qQ.thrownErrors.push(vZ)}finally{a9=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var d=Symbol.for("react.transitional.element"),YZ=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),IZ=Symbol.for("react.consumer"),PZ=Symbol.for("react.context"),yZ=Symbol.for("react.forward_ref"),sZ=Symbol.for("react.suspense"),CZ=Symbol.for("react.suspense_list"),KQ=Symbol.for("react.memo"),MZ=Symbol.for("react.lazy"),bZ=Symbol.for("react.activity"),RQ=Symbol.iterator,BZ={},GX={isMounted:function(){return!1},enqueueForceUpdate:function(E){J(E,"forceUpdate")},enqueueReplaceState:function(E){J(E,"replaceState")},enqueueSetState:function(E){J(E,"setState")}},kX=Object.assign,RX={};Object.freeze(RX),q.prototype.isReactComponent={},q.prototype.setState=function(E,r){if(typeof E!=="object"&&typeof E!=="function"&&E!=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,E,r,"setState")},q.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};var ZX={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(F0 in ZX)ZX.hasOwnProperty(F0)&&Z(F0,ZX[F0]);G.prototype=q.prototype,ZX=U.prototype=new G,ZX.constructor=U,kX(ZX,q.prototype),ZX.isPureReactComponent=!0;var gZ=Array.isArray,aJ=Symbol.for("react.client.reference"),qQ={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},g6=Object.prototype.hasOwnProperty,lQ=console.createTask?console.createTask:function(){return null};ZX={react_stack_bottom_frame:function(E){return E()}};var k7,GG,d9={},l9=ZX.react_stack_bottom_frame.bind(ZX,V)(),t_=lQ(M(V)),h6=!1,u6=/\/+/g,_0=typeof reportError==="function"?reportError:function(E){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E==="object"&&E!==null&&typeof E.message==="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(r))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",E);return}console.error(E)},S7=!1,i9=null,n9=0,s9=!1,a9=!1,q5=typeof queueMicrotask==="function"?function(E){queueMicrotask(function(){return queueMicrotask(E)})}:HZ;ZX=Object.freeze({__proto__:null,c:function(E){return s().useMemoCache(E)}});var F0={map:c,forEach:function(E,r,_Z){c(E,function(){r.apply(this,arguments)},_Z)},count:function(E){var r=0;return c(E,function(){r++}),r},toArray:function(E){return c(E,function(r){return r})||[]},only:function(E){if(!f(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};Ua.Activity=bZ,Ua.Children=F0,Ua.Component=q,Ua.Fragment=t,Ua.Profiler=o,Ua.PureComponent=U,Ua.StrictMode=$,Ua.Suspense=sZ,Ua.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=qQ,Ua.__COMPILER_RUNTIME=ZX,Ua.act=function(E){var r=qQ.actQueue,_Z=n9;n9++;var NZ=qQ.actQueue=r!==null?r:[],vZ=!1;try{var eZ=E()}catch(pZ){qQ.thrownErrors.push(pZ)}if(0<qQ.thrownErrors.length)throw v(r,_Z),E=KZ(qQ.thrownErrors),qQ.thrownErrors.length=0,E;if(eZ!==null&&typeof eZ==="object"&&typeof eZ.then==="function"){var ZQ=eZ;return q5(function(){vZ||s9||(s9=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(pZ,AJ){vZ=!0,ZQ.then(function(MY){if(v(r,_Z),_Z===0){try{x(NZ),HZ(function(){return i(MY,pZ,AJ)})}catch(G5){qQ.thrownErrors.push(G5)}if(0<qQ.thrownErrors.length){var L0=KZ(qQ.thrownErrors);qQ.thrownErrors.length=0,AJ(L0)}}else pZ(MY)},function(MY){v(r,_Z),0<qQ.thrownErrors.length?(MY=KZ(qQ.thrownErrors),qQ.thrownErrors.length=0,AJ(MY)):AJ(MY)})}}}var EQ=eZ;if(v(r,_Z),_Z===0&&(x(NZ),NZ.length!==0&&q5(function(){vZ||s9||(s9=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),qQ.actQueue=null),0<qQ.thrownErrors.length)throw E=KZ(qQ.thrownErrors),qQ.thrownErrors.length=0,E;return{then:function(pZ,AJ){vZ=!0,_Z===0?(qQ.actQueue=NZ,HZ(function(){return i(EQ,pZ,AJ)})):pZ(EQ)}}},Ua.cache=function(E){return function(){return E.apply(null,arguments)}},Ua.cacheSignal=function(){return null},Ua.captureOwnerStack=function(){var E=qQ.getCurrentStack;return E===null?null:E()},Ua.cloneElement=function(E,r,_Z){if(E===null||E===void 0)throw Error("The argument must be a React element, but you passed "+E+".");var NZ=kX({},E.props),vZ=E.key,eZ=E._owner;if(r!=null){var ZQ;Z:{if(g6.call(r,"ref")&&(ZQ=Object.getOwnPropertyDescriptor(r,"ref").get)&&ZQ.isReactWarning){ZQ=!1;break Z}ZQ=r.ref!==void 0}ZQ&&(eZ=O()),A(r)&&(B(r.key),vZ=""+r.key);for(EQ in r)!g6.call(r,EQ)||EQ==="key"||EQ==="__self"||EQ==="__source"||EQ==="ref"&&r.ref===void 0||(NZ[EQ]=r[EQ])}var EQ=arguments.length-2;if(EQ===1)NZ.children=_Z;else if(1<EQ){ZQ=Array(EQ);for(var pZ=0;pZ<EQ;pZ++)ZQ[pZ]=arguments[pZ+2];NZ.children=ZQ}NZ=P(E.type,vZ,NZ,eZ,E._debugStack,E._debugTask);for(vZ=2;vZ<arguments.length;vZ++)y(arguments[vZ]);return NZ},Ua.createContext=function(E){return E={$$typeof:PZ,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:IZ,_context:E},E._currentRenderer=null,E._currentRenderer2=null,E},Ua.createElement=function(E,r,_Z){for(var NZ=2;NZ<arguments.length;NZ++)y(arguments[NZ]);NZ={};var vZ=null;if(r!=null)for(pZ in GG||!("__self"in r)||"key"in r||(GG=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),A(r)&&(B(r.key),vZ=""+r.key),r)g6.call(r,pZ)&&pZ!=="key"&&pZ!=="__self"&&pZ!=="__source"&&(NZ[pZ]=r[pZ]);var eZ=arguments.length-2;if(eZ===1)NZ.children=_Z;else if(1<eZ){for(var ZQ=Array(eZ),EQ=0;EQ<eZ;EQ++)ZQ[EQ]=arguments[EQ+2];Object.freeze&&Object.freeze(ZQ),NZ.children=ZQ}if(E&&E.defaultProps)for(pZ in eZ=E.defaultProps,eZ)NZ[pZ]===void 0&&(NZ[pZ]=eZ[pZ]);vZ&&N(NZ,typeof E==="function"?E.displayName||E.name||"Unknown":E);var pZ=1e4>qQ.recentlyCreatedOwnerStacks++;return P(E,vZ,NZ,O(),pZ?Error("react-stack-top-frame"):l9,pZ?lQ(M(E)):t_)},Ua.createRef=function(){var E={current:null};return Object.seal(E),E},Ua.forwardRef=function(E){E!=null&&E.$$typeof===KQ?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof E!=="function"?console.error("forwardRef requires a render function but was given %s.",E===null?"null":typeof E):E.length!==0&&E.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",E.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),E!=null&&E.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var r={$$typeof:yZ,render:E},_Z;return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return _Z},set:function(NZ){_Z=NZ,E.name||E.displayName||(Object.defineProperty(E,"name",{value:NZ}),E.displayName=NZ)}}),r},Ua.isValidElement=f,Ua.lazy=function(E){E={_status:-1,_result:E};var r={$$typeof:MZ,_payload:E,_init:GZ},_Z={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return E._ioInfo=_Z,r._debugInfo=[{awaited:_Z}],r},Ua.memo=function(E,r){E==null&&console.error("memo: The first argument must be a component. Instead received: %s",E===null?"null":typeof E),r={$$typeof:KQ,type:E,compare:r===void 0?null:r};var _Z;return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return _Z},set:function(NZ){_Z=NZ,E.name||E.displayName||(Object.defineProperty(E,"name",{value:NZ}),E.displayName=NZ)}}),r},Ua.startTransition=function(E){var r=qQ.T,_Z={};_Z._updatedFibers=new Set,qQ.T=_Z;try{var NZ=E(),vZ=qQ.S;vZ!==null&&vZ(_Z,NZ),typeof NZ==="object"&&NZ!==null&&typeof NZ.then==="function"&&(qQ.asyncTransitions++,NZ.then(LZ,LZ),NZ.then(K,_0))}catch(eZ){_0(eZ)}finally{r===null&&_Z._updatedFibers&&(E=_Z._updatedFibers.size,_Z._updatedFibers.clear(),10<E&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),r!==null&&_Z.types!==null&&(r.types!==null&&r.types!==_Z.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),r.types=_Z.types),qQ.T=r}},Ua.unstable_useCacheRefresh=function(){return s().useCacheRefresh()},Ua.use=function(E){return s().use(E)},Ua.useActionState=function(E,r,_Z){return s().useActionState(E,r,_Z)},Ua.useCallback=function(E,r){return s().useCallback(E,r)},Ua.useContext=function(E){var r=s();return E.$$typeof===IZ&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),r.useContext(E)},Ua.useDebugValue=function(E,r){return s().useDebugValue(E,r)},Ua.useDeferredValue=function(E,r){return s().useDeferredValue(E,r)},Ua.useEffect=function(E,r){return E==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),s().useEffect(E,r)},Ua.useEffectEvent=function(E){return s().useEffectEvent(E)},Ua.useId=function(){return s().useId()},Ua.useImperativeHandle=function(E,r,_Z){return s().useImperativeHandle(E,r,_Z)},Ua.useInsertionEffect=function(E,r){return E==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),s().useInsertionEffect(E,r)},Ua.useLayoutEffect=function(E,r){return E==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),s().useLayoutEffect(E,r)},Ua.useMemo=function(E,r){return s().useMemo(E,r)},Ua.useOptimistic=function(E,r){return s().useOptimistic(E,r)},Ua.useReducer=function(E,r,_Z){return s().useReducer(E,r,_Z)},Ua.useRef=function(E){return s().useRef(E)},Ua.useState=function(E){return s().useState(E)},Ua.useSyncExternalStore=function(E,r,_Z){return s().useSyncExternalStore(E,r,_Z)},Ua.useTransition=function(){return s().useTransition()},Ua.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var JY=bG((Ka)=>{var xU=S(JZ());(function(){function Z($){if($==null)return null;if(typeof $==="function")return $.$$typeof===s?null:$.displayName||$.name||null;if(typeof $==="string")return $;switch($){case T:return"Fragment";case C:return"Profiler";case P:return"StrictMode";case n:return"Suspense";case e:return"SuspenseList";case GZ:return"Activity"}if(typeof $==="object")switch(typeof $.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case N:return"Portal";case f:return $.displayName||"Context";case y:return($._context.displayName||"Context")+".Consumer";case u:var o=$.render;return $=$.displayName,$||($=o.displayName||o.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case a:return o=$.displayName||null,o!==null?o:Z($.type)||"Memo";case c:o=$._payload,$=$._init;try{return Z($(o))}catch(IZ){}}return null}function Q($){return""+$}function J($){try{Q($);var o=!1}catch(yZ){o=!0}if(o){o=console;var IZ=o.error,PZ=typeof Symbol==="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return IZ.call(o,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",PZ),Q($)}}function q($){if($===T)return"<>";if(typeof $==="object"&&$!==null&&$.$$typeof===c)return"<...>";try{var o=Z($);return o?"<"+o+">":"<...>"}catch(IZ){return"<...>"}}function G(){var $=LZ.A;return $===null?null:$.getOwner()}function U(){return Error("react-stack-top-frame")}function K($){if(HZ.call($,"key")){var o=Object.getOwnPropertyDescriptor($,"key").get;if(o&&o.isReactWarning)return!1}return $.key!==void 0}function H($,o){function IZ(){i||(i=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",o))}IZ.isReactWarning=!0,Object.defineProperty($,"key",{get:IZ,configurable:!0})}function B(){var $=Z(this.type);return x[$]||(x[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function F($,o,IZ,PZ,yZ,sZ){var CZ=IZ.ref;return $={$$typeof:A,type:$,key:o,props:IZ,_owner:PZ},(CZ!==void 0?CZ:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:B}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty($,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:yZ}),Object.defineProperty($,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:sZ}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function M($,o,IZ,PZ,yZ,sZ){var CZ=o.children;if(CZ!==void 0)if(PZ)if(KZ(CZ)){for(PZ=0;PZ<CZ.length;PZ++)O(CZ[PZ]);Object.freeze&&Object.freeze(CZ)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else O(CZ);if(HZ.call(o,"key")){CZ=Z($);var KQ=Object.keys(o).filter(function(bZ){return bZ!=="key"});PZ=0<KQ.length?"{key: someKey, "+KQ.join(": ..., ")+": ...}":"{key: someKey}",t[CZ+PZ]||(KQ=0<KQ.length?"{"+KQ.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
14
|
+
let props = %s;
|
|
15
|
+
<%s {...props} />
|
|
16
|
+
React keys must be passed directly to JSX without using spread:
|
|
17
|
+
let props = %s;
|
|
18
|
+
<%s key={someKey} {...props} />`,PZ,CZ,KQ,CZ),t[CZ+PZ]=!0)}if(CZ=null,IZ!==void 0&&(J(IZ),CZ=""+IZ),K(o)&&(J(o.key),CZ=""+o.key),"key"in o){IZ={};for(var MZ in o)MZ!=="key"&&(IZ[MZ]=o[MZ])}else IZ=o;return CZ&&H(IZ,typeof $==="function"?$.displayName||$.name||"Unknown":$),F($,CZ,IZ,G(),yZ,sZ)}function O($){V($)?$._store&&($._store.validated=1):typeof $==="object"&&$!==null&&$.$$typeof===c&&($._payload.status==="fulfilled"?V($._payload.value)&&$._payload.value._store&&($._payload.value._store.validated=1):$._store&&($._store.validated=1))}function V($){return typeof $==="object"&&$!==null&&$.$$typeof===A}var A=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),f=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),n=Symbol.for("react.suspense"),e=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),GZ=Symbol.for("react.activity"),s=Symbol.for("react.client.reference"),LZ=xU.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,HZ=Object.prototype.hasOwnProperty,KZ=Array.isArray,v=console.createTask?console.createTask:function(){return null};xU={react_stack_bottom_frame:function($){return $()}};var i,x={},d=xU.react_stack_bottom_frame.bind(xU,U)(),YZ=v(q(U)),t={};Ka.Fragment=T,Ka.jsx=function($,o,IZ){var PZ=1e4>LZ.recentlyCreatedOwnerStacks++;return M($,o,IZ,!1,PZ?Error("react-stack-top-frame"):d,PZ?v(q($)):YZ)},Ka.jsxs=function($,o,IZ){var PZ=1e4>LZ.recentlyCreatedOwnerStacks++;return M($,o,IZ,!0,PZ?Error("react-stack-top-frame"):d,PZ?v(q($)):YZ)}})()});class mO{activeUrlHref=null;activeCacheKey=null;activePromise=null;activeResolvedData;hasResolved=!1;pendingBackgroundKey=null;id;constructor(){this.id=Ha++}resolve(Z){let{currentUrlHref:Q,cacheKey:J,load:q,loaderCache:G,onBackgroundSettled:U}=Z;if(this.handleUrlChange(Q,G),this.activeCacheKey===J){if(this.pendingBackgroundKey===J)return{action:"render",data:this.activeResolvedData,isLoading:!0};if(this.hasResolved)return{action:"render",data:this.activeResolvedData,isLoading:!1};return{action:"suspend",promise:this.activePromise}}if(this.hasResolved){let H=q();return this.activeCacheKey=J,this.activePromise=H,this.pendingBackgroundKey=J,H.then((B)=>{if(this.activeCacheKey===J)U({ok:!0,result:B})},()=>{if(this.activeCacheKey===J)U({ok:!1})}),{action:"render",data:this.activeResolvedData,isLoading:!0}}let K=q();return this.activeCacheKey=J,this.activePromise=K,{action:"suspend",promise:K}}commitResult(Z){this.activeResolvedData=Z,this.hasResolved=!0}commitBackgroundResult(Z){this.activeResolvedData=Z,this.pendingBackgroundKey=null}commitBackgroundError(){this.hasResolved=!1,this.pendingBackgroundKey=null}dispose(Z){if(Z&&this.hasResolved&&this.activeResolvedData!==void 0&&this.activeUrlHref)this.saveToStaleCache(Z,this.activeUrlHref,this.activeResolvedData);this.activeUrlHref=null,this.activeCacheKey=null,this.activePromise=null,this.activeResolvedData=void 0,this.hasResolved=!1,this.pendingBackgroundKey=null}handleUrlChange(Z,Q){if(this.activeUrlHref!==null&&this.activeUrlHref!==Z){if(Q&&this.hasResolved&&this.activeResolvedData!==void 0)this.saveToStaleCache(Q,this.activeUrlHref,this.activeResolvedData);let J=Q&&this.restoreFromStaleCache(Q,Z);if(J?.hit)this.activeResolvedData=J.value,this.hasResolved=!0;else this.hasResolved=!1,this.activeResolvedData=void 0;this.pendingBackgroundKey=null}else if(this.activeUrlHref===null&&Q){let J=this.restoreFromStaleCache(Q,Z);if(J.hit)this.activeResolvedData=J.value,this.hasResolved=!0}this.activeUrlHref=Z}staleCacheKey(Z){return`${this.id}:${Z}`}restoreFromStaleCache(Z,Q){let J=this.staleCacheKey(Q);if(!Z.has(J))return{hit:!1};let q=Z.get(J);return Z.delete(J),{hit:!0,value:q}}saveToStaleCache(Z,Q,J){Z.set(this.staleCacheKey(Q),J)}}var Ha=0;var cO,J9,qq;var c8=k(()=>{cO=S(JZ(),1),J9=cO.createContext(null),qq=cO.createContext(null)});var r4,bU;var o4=k(()=>{r4=S(JZ(),1);bU=class bU extends r4.Component{state={error:null,prevResetKey:void 0};static getDerivedStateFromError(Z){return{error:Z}}static getDerivedStateFromProps(Z,Q){if(Q.error&&Z.resetKey!==Q.prevResetKey)return{error:null,prevResetKey:Z.resetKey};if(Z.resetKey!==Q.prevResetKey)return{prevResetKey:Z.resetKey};return null}componentDidCatch(Z,Q){console.error("Buzola route error:",Z,Q)}render(){if(this.state.error){if(typeof this.props.fallback==="function")return this.props.fallback(this.state.error);if(this.props.fallback)return this.props.fallback;return r4.default.createElement("div",{style:{color:"red"}},`Route error: ${this.state.error.message}`)}return this.props.children}}});function Wa(Z){return"~standard"in Z}function Ba(Z){if(Wa(Z))return{schema:Z,paramsMeta:Z.__buzolaKeys??[]};let Q=Z,J=[],q={};for(let[U,K]of Object.entries(Q))if(typeof K==="string"){let H=Vk(K);q[U]=H.schema,J.push({name:U,optional:H.optional,array:H.array})}else q[U]=K,J.push({name:U,optional:Ok(K),array:!1});return{schema:{"~standard":{version:1,vendor:"buzola",validate:(U)=>{let K=U??{},H={};for(let[B,F]of Object.entries(q)){let M=F["~standard"].validate(K[B]);if("issues"in M)return M;H[B]=M.value}return{value:H}}}},paramsMeta:J}}class p8{pageId;params;__buzolaRedirect=!0;constructor(Z,Q){this.pageId=Z,this.params=Q}}function h1(Z){if(Z.length===0)return;if(Z.length===1)return Z[0];return async(Q)=>{let J=await Promise.all(Z.map((G)=>G(Q))),q=J.find((G)=>G instanceof p8);if(q)return q;return Object.assign({},...J)}}function u1(Z,Q,J,q,G,U){let K=new Set(Q.filter((O)=>O.array).map((O)=>O.name)),H=J?new mO:void 0;function B(){let O=tX.use(qq);if(!O)throw Error("createPage component must be used within a <BuzolaProvider>");let V=tX.use(J9),A=tX.useMemo(()=>{let{state:n,matches:e,params:a}=O,c=e.find((LZ)=>LZ.node.component===B),GZ=new Set(c?g1(c.node.fullPath):[]),s={};if(K.size>0)for(let LZ of K){if(GZ.has(LZ))continue;let HZ=[...n.location.searchParams.getAll(LZ),...n.location.searchParams.getAll(`${LZ}[]`)];if(HZ.length>0)s[LZ]=HZ}n.location.searchParams.forEach((LZ,HZ)=>{let KZ=HZ.endsWith("[]")?HZ.slice(0,-2):HZ;if(!GZ.has(KZ)&&!(KZ in s))s[KZ]=LZ});for(let[LZ,HZ]of Object.entries(a))if(K.has(LZ))s[LZ]=HZ.split(",");else s[LZ]=HZ;if(Z)return fO(Z,s,"Page params validation failed: ");return s},[O]),[N,T]=tX.useState(0),[,P]=tX.useReducer((n)=>n+1,0),C=tX.useCallback(()=>T((n)=>n+1),[]);tX.useEffect(()=>{if(!V)return;return V.onInvalidate(()=>T((n)=>n+1))},[V]);let y,f=!1,u=!1;if(J&&H){let n=O.state.location.href,e=`${n}:${N}`,a=H.resolve({currentUrlHref:n,cacheKey:e,load:()=>J({params:A,redirect:Ak}),loaderCache:V?.loaderCache,onBackgroundSettled:(c)=>{if(c.ok){if(c.result instanceof p8){V?.navigateToPage(c.result.pageId,c.result.params,{replace:!0});return}H.commitBackgroundResult(c.result)}else H.commitBackgroundError();P()}});if(a.action==="render")y=a.data,f=a.isLoading;else{let c=tX.use(a.promise);if(c instanceof p8)V?.navigateToPage(c.pageId,c.params,{replace:!0}),u=!0;else y=c,H.commitResult(y)}}if(tX.useEffect(()=>{return()=>H?.dispose(V?.loaderCache)},[]),u)return null;return t4.jsx(G,{params:A,data:y,invalidate:C,isLoading:f})}function F(){let O=tX.use(qq),[V,A]=tX.useState(0),N=tX.useCallback(()=>A((C)=>C+1),[]),T=`${O?.state.location.href??""}:${V}`;return t4.jsx(bU,{fallback:typeof U==="function"?(C)=>U({error:C,params:O?.params??{},retry:N}):U,resetKey:T,children:t4.jsx(B,{},V)})}return{__buzolaPage:!0,component:U?F:B,route:q,paramsSchema:Z,paramsMeta:Q,loader:J}}function _a(Z,Q,J,q){return{route(G){return{render(U){return u1(Z,Q,h1(J),G,U,q)}}},render(G){return u1(Z,Q,h1(J),void 0,G,q)}}}function pO(Z,Q,J){return{loader(q){return pO(Z,Q,[...J,q])},catch(q){return _a(Z,Q,J,q)},route(q){return{catch(G){return{render(U){return u1(Z,Q,h1(J),q,U,G)}}},render(G){return u1(Z,Q,h1(J),q,G)}}},render(q){return u1(Z,Q,h1(J),void 0,q)}}}function zJ(){return{params(Z){let{schema:Q,paramsMeta:J}=Ba(Z);return pO(Q,J,[])},...pO(void 0,[],[])}}var t4,tX,Ak=(Z,Q)=>{return new p8(Z,Q)};var Ik=k(()=>{s4();c8();o4();t4=S(JY(),1),tX=S(JZ(),1)});function La(){return YY.default.createElement("div",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem",maxWidth:"600px",margin:"0 auto"}},Fa?[YY.default.createElement("h1",{key:"h"},"404 — Page Not Found"),YY.default.createElement("p",{key:"p1"},`No route matches "${typeof window<"u"?window.location.pathname:""}".`),YY.default.createElement("p",{key:"p2",style:{color:"#666",fontSize:"0.9rem"}},"To handle this, add a _404.tsx catch-all route or pass a notFound prop to <Outlet />.")]:[YY.default.createElement("h1",{key:"h"},"404"),YY.default.createElement("p",{key:"p"},"Page not found.")])}function d8({fallback:Z,errorFallback:Q,notFound:J}){let q=YY.use(qq);if(!q)throw Error("<Outlet /> must be used within a <BuzolaProvider>");let{state:G,depth:U,matches:K}=q,H=U,B=K[H];while(B&&!B.node.component)H++,B=K[H];let F=YY.useMemo(()=>{if(!B)return null;let O={...q.params};for(let V=U;V<=H;V++)if(K[V])O={...O,...K[V].params};return{state:G,depth:H+1,matches:K,params:O}},[G,U,H,K,B,q.params]);if(!B){if(U===0&&K.length===0){if(J===null)return null;return J??YY.default.createElement(La,null)}return null}let M=B.node.component;return f1.jsx(bU,{fallback:Q,resetKey:B.node.id,children:f1.jsx(YY.Suspense,{fallback:Z??null,children:F&&f1.jsx(qq,{value:F,children:f1.jsx(M,{})})})})}var f1,YY,Fa;var dO=k(()=>{c8();o4();f1=S(JY(),1),YY=S(JZ(),1),Fa=typeof process<"u"&&!0});function e4({routes:Z,children:Q,middleware:J,...q}){let G=xY.useRef(q.router);if(!G.current)G.current=new n4({routes:Z,adapter:uO(),persistentParams:q.persistentParams,pageRegistry:q.pageRegistry});let U=G.current,K=xY.useCallback((V)=>U.subscribe(V),[U]),H=xY.useCallback(()=>U.getState(),[U]),B=xY.useSyncExternalStore(K,H,H);xY.useLayoutEffect(()=>{return U.start()},[U]);let F=xY.useMemo(()=>({state:B,depth:0,matches:B.matches,params:{}}),[B]),M=xY.useMemo(()=>{let V={};for(let A of B.matches)V={...V,...A.params};return V},[B.matches]),O=Q??m1.jsx(d8,{});return m1.jsx(J9,{value:U,children:m1.jsx(qq,{value:F,children:J?m1.jsx(J,{params:M,matches:B.matches,children:O}):O})})}var m1,xY;var Nk=k(()=>{vO();c8();dO();m1=S(JY(),1),xY=S(JZ(),1)});function c1(){let Z=vG.use(J9);if(!Z)throw Error("useRouter must be used within a <BuzolaProvider>");return Z}function Ma(){let Z=vG.use(qq);if(!Z)throw Error("Route hooks must be used within a <BuzolaProvider>");return Z}function TJ(){let Z=c1();return vG.useCallback((Q,J)=>{Z.navigateToPage(Q,J?.params,J)},[Z])}function Z3(){let Z=Ma(),Q=c1(),{state:J,matches:q,params:G,depth:U}=Z;return vG.useMemo(()=>({params:G,matches:q,depth:U,isPending:J.isPending,pendingLocation:J.pendingLocation?Q.stripBasePath(J.pendingLocation.pathname):void 0,pathname:Q.stripBasePath(J.location.pathname)}),[G,q,U,J.isPending,J.pendingLocation,J.location.pathname,Q])}var vG;var lO=k(()=>{s4();c8();vG=S(JZ(),1)});var Oa,Q3;var Tk=k(()=>{lO();Oa=S(JY(),1),Q3=S(JZ(),1)});var Pk=k(()=>{Nk();dO();Tk();o4();lO();c8()});var Gq=k(()=>{vO();s4();Ik();Pk()});var Rk=bG((Pa)=>{(function(){function Z(){if(u=!1,c){var i=Pa.unstable_now();LZ=i;var x=!0;try{Z:{y=!1,f&&(f=!1,e(GZ),GZ=-1),C=!0;var d=P;try{Q:{U(i);for(T=J(V);T!==null&&!(T.expirationTime>i&&H());){var YZ=T.callback;if(typeof YZ==="function"){T.callback=null,P=T.priorityLevel;var t=YZ(T.expirationTime<=i);if(i=Pa.unstable_now(),typeof t==="function"){T.callback=t,U(i),x=!0;break Q}T===J(V)&&q(V),U(i)}else q(V);T=J(V)}if(T!==null)x=!0;else{var $=J(A);$!==null&&B(K,$.startTime-i),x=!1}}break Z}finally{T=null,P=d,C=!1}x=void 0}}finally{x?HZ():c=!1}}}function Q(i,x){var d=i.length;i.push(x);Z:for(;0<d;){var YZ=d-1>>>1,t=i[YZ];if(0<G(t,x))i[YZ]=x,i[d]=t,d=YZ;else break Z}}function J(i){return i.length===0?null:i[0]}function q(i){if(i.length===0)return null;var x=i[0],d=i.pop();if(d!==x){i[0]=d;Z:for(var YZ=0,t=i.length,$=t>>>1;YZ<$;){var o=2*(YZ+1)-1,IZ=i[o],PZ=o+1,yZ=i[PZ];if(0>G(IZ,d))PZ<t&&0>G(yZ,IZ)?(i[YZ]=yZ,i[PZ]=d,YZ=PZ):(i[YZ]=IZ,i[o]=d,YZ=o);else if(PZ<t&&0>G(yZ,d))i[YZ]=yZ,i[PZ]=d,YZ=PZ;else break Z}}return x}function G(i,x){var d=i.sortIndex-x.sortIndex;return d!==0?d:i.id-x.id}function U(i){for(var x=J(A);x!==null;){if(x.callback===null)q(A);else if(x.startTime<=i)q(A),x.sortIndex=x.expirationTime,Q(V,x);else break;x=J(A)}}function K(i){if(f=!1,U(i),!y)if(J(V)!==null)y=!0,c||(c=!0,HZ());else{var x=J(A);x!==null&&B(K,x.startTime-i)}}function H(){return u?!0:Pa.unstable_now()-LZ<s?!1:!0}function B(i,x){GZ=n(function(){i(Pa.unstable_now())},x)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),Pa.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var F=performance;Pa.unstable_now=function(){return F.now()}}else{var M=Date,O=M.now();Pa.unstable_now=function(){return M.now()-O}}var V=[],A=[],N=1,T=null,P=3,C=!1,y=!1,f=!1,u=!1,n=typeof setTimeout==="function"?setTimeout:null,e=typeof clearTimeout==="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null,c=!1,GZ=-1,s=5,LZ=-1;if(typeof a==="function")var HZ=function(){a(Z)};else if(typeof MessageChannel<"u"){var KZ=new MessageChannel,v=KZ.port2;KZ.port1.onmessage=Z,HZ=function(){v.postMessage(null)}}else HZ=function(){n(Z,0)};Pa.unstable_IdlePriority=5,Pa.unstable_ImmediatePriority=1,Pa.unstable_LowPriority=4,Pa.unstable_NormalPriority=3,Pa.unstable_Profiling=null,Pa.unstable_UserBlockingPriority=2,Pa.unstable_cancelCallback=function(i){i.callback=null},Pa.unstable_forceFrameRate=function(i){0>i||125<i?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):s=0<i?Math.floor(1000/i):5},Pa.unstable_getCurrentPriorityLevel=function(){return P},Pa.unstable_next=function(i){switch(P){case 1:case 2:case 3:var x=3;break;default:x=P}var d=P;P=x;try{return i()}finally{P=d}},Pa.unstable_requestPaint=function(){u=!0},Pa.unstable_runWithPriority=function(i,x){switch(i){case 1:case 2:case 3:case 4:case 5:break;default:i=3}var d=P;P=i;try{return x()}finally{P=d}},Pa.unstable_scheduleCallback=function(i,x,d){var YZ=Pa.unstable_now();switch(typeof d==="object"&&d!==null?(d=d.delay,d=typeof d==="number"&&0<d?YZ+d:YZ):d=YZ,i){case 1:var t=-1;break;case 2:t=250;break;case 5:t=1073741823;break;case 4:t=1e4;break;default:t=5000}return t=d+t,i={id:N++,callback:x,priorityLevel:i,startTime:d,expirationTime:t,sortIndex:-1},d>YZ?(i.sortIndex=d,Q(A,i),J(V)===null&&i===J(A)&&(f?(e(GZ),GZ=-1):f=!0,B(K,d-YZ))):(i.sortIndex=t,Q(V,i),y||C||(y=!0,c||(c=!0,HZ()))),i},Pa.unstable_shouldYield=H,Pa.unstable_wrapCallback=function(i){var x=P;return function(){var d=P;P=x;try{return i.apply(this,arguments)}finally{P=d}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Ck=bG((Ra)=>{var iO=S(JZ());(function(){function Z(){}function Q(M){return""+M}function J(M,O,V){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{Q(A);var N=!1}catch(T){N=!0}return N&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol==="function"&&Symbol.toStringTag&&A[Symbol.toStringTag]||A.constructor.name||"Object"),Q(A)),{$$typeof:B,key:A==null?null:""+A,children:M,containerInfo:O,implementation:V}}function q(M,O){if(M==="font")return"";if(typeof O==="string")return O==="use-credentials"?O:""}function G(M){return M===null?"`null`":M===void 0?"`undefined`":M===""?"an empty string":'something with type "'+typeof M+'"'}function U(M){return M===null?"`null`":M===void 0?"`undefined`":M===""?"an empty string":typeof M==="string"?JSON.stringify(M):typeof M==="number"?"`"+M+"`":'something with type "'+typeof M+'"'}function K(){var M=F.H;return M===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
19
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
20
|
+
2. You might be breaking the Rules of Hooks
|
|
21
|
+
3. You might have more than one copy of React in the same app
|
|
22
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),M}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var H={d:{f:Z,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:Z,C:Z,L:Z,m:Z,X:Z,S:Z,M:Z},p:0,findDOMNode:null},B=Symbol.for("react.portal"),F=iO.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Ra.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Ra.createPortal=function(M,O){var V=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!O||O.nodeType!==1&&O.nodeType!==9&&O.nodeType!==11)throw Error("Target container is not a DOM element.");return J(M,O,null,V)},Ra.flushSync=function(M){var O=F.T,V=H.p;try{if(F.T=null,H.p=2,M)return M()}finally{F.T=O,H.p=V,H.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},Ra.preconnect=function(M,O){typeof M==="string"&&M?O!=null&&typeof O!=="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",U(O)):O!=null&&typeof O.crossOrigin!=="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",G(O.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",G(M)),typeof M==="string"&&(O?(O=O.crossOrigin,O=typeof O==="string"?O==="use-credentials"?O:"":void 0):O=null,H.d.C(M,O))},Ra.prefetchDNS=function(M){if(typeof M!=="string"||!M)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",G(M));else if(1<arguments.length){var O=arguments[1];typeof O==="object"&&O.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",U(O)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",U(O))}typeof M==="string"&&H.d.D(M)},Ra.preinit=function(M,O){if(typeof M==="string"&&M?O==null||typeof O!=="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",U(O)):O.as!=="style"&&O.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',U(O.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",G(M)),typeof M==="string"&&O&&typeof O.as==="string"){var V=O.as,A=q(V,O.crossOrigin),N=typeof O.integrity==="string"?O.integrity:void 0,T=typeof O.fetchPriority==="string"?O.fetchPriority:void 0;V==="style"?H.d.S(M,typeof O.precedence==="string"?O.precedence:void 0,{crossOrigin:A,integrity:N,fetchPriority:T}):V==="script"&&H.d.X(M,{crossOrigin:A,integrity:N,fetchPriority:T,nonce:typeof O.nonce==="string"?O.nonce:void 0})}},Ra.preinitModule=function(M,O){var V="";if(typeof M==="string"&&M||(V+=" The `href` argument encountered was "+G(M)+"."),O!==void 0&&typeof O!=="object"?V+=" The `options` argument encountered was "+G(O)+".":O&&("as"in O)&&O.as!=="script"&&(V+=" The `as` option encountered was "+U(O.as)+"."),V)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",V);else switch(V=O&&typeof O.as==="string"?O.as:"script",V){case"script":break;default:V=U(V),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',V,M)}if(typeof M==="string")if(typeof O==="object"&&O!==null){if(O.as==null||O.as==="script")V=q(O.as,O.crossOrigin),H.d.M(M,{crossOrigin:V,integrity:typeof O.integrity==="string"?O.integrity:void 0,nonce:typeof O.nonce==="string"?O.nonce:void 0})}else O==null&&H.d.M(M)},Ra.preload=function(M,O){var V="";if(typeof M==="string"&&M||(V+=" The `href` argument encountered was "+G(M)+"."),O==null||typeof O!=="object"?V+=" The `options` argument encountered was "+G(O)+".":typeof O.as==="string"&&O.as||(V+=" The `as` option encountered was "+G(O.as)+"."),V&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',V),typeof M==="string"&&typeof O==="object"&&O!==null&&typeof O.as==="string"){V=O.as;var A=q(V,O.crossOrigin);H.d.L(M,V,{crossOrigin:A,integrity:typeof O.integrity==="string"?O.integrity:void 0,nonce:typeof O.nonce==="string"?O.nonce:void 0,type:typeof O.type==="string"?O.type:void 0,fetchPriority:typeof O.fetchPriority==="string"?O.fetchPriority:void 0,referrerPolicy:typeof O.referrerPolicy==="string"?O.referrerPolicy:void 0,imageSrcSet:typeof O.imageSrcSet==="string"?O.imageSrcSet:void 0,imageSizes:typeof O.imageSizes==="string"?O.imageSizes:void 0,media:typeof O.media==="string"?O.media:void 0})}},Ra.preloadModule=function(M,O){var V="";typeof M==="string"&&M||(V+=" The `href` argument encountered was "+G(M)+"."),O!==void 0&&typeof O!=="object"?V+=" The `options` argument encountered was "+G(O)+".":O&&("as"in O)&&typeof O.as!=="string"&&(V+=" The `as` option encountered was "+G(O.as)+"."),V&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',V),typeof M==="string"&&(O?(V=q(O.as,O.crossOrigin),H.d.m(M,{as:typeof O.as==="string"&&O.as!=="script"?O.as:void 0,crossOrigin:V,integrity:typeof O.integrity==="string"?O.integrity:void 0})):H.d.m(M))},Ra.requestFormReset=function(M){H.d.r(M)},Ra.unstable_batchedUpdates=function(M,O){return M(O)},Ra.useFormState=function(M,O,V){return K().useFormState(M,O,V)},Ra.useFormStatus=function(){return K().useHostTransitionStatus()},Ra.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var uJ=bG((W6Z,Dk)=>{var Ca=S(Ck());Dk.exports=Ca});var $k=bG((Da)=>{var kQ=S(Rk()),l8=S(JZ()),nO=S(uJ());(function(){function Z(X,Y){for(X=X.memoizedState;X!==null&&0<Y;)X=X.next,Y--;return X}function Q(X,Y,z,W){if(z>=Y.length)return W;var _=Y[z],L=cX(X)?X.slice():BQ({},X);return L[_]=Q(X[_],Y,z+1,W),L}function J(X,Y,z){if(Y.length!==z.length)console.warn("copyWithRename() expects paths of the same length");else{for(var W=0;W<z.length-1;W++)if(Y[W]!==z[W]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return q(X,Y,z,0)}}function q(X,Y,z,W){var _=Y[W],L=cX(X)?X.slice():BQ({},X);return W+1===Y.length?(L[z[W]]=L[_],cX(L)?L.splice(_,1):delete L[_]):L[_]=q(X[_],Y,z,W+1),L}function G(X,Y,z){var W=Y[z],_=cX(X)?X.slice():BQ({},X);if(z+1===Y.length)return cX(_)?_.splice(W,1):delete _[W],_;return _[W]=G(X[W],Y,z+1),_}function U(){return!1}function K(){return null}function H(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function B(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function F(){}function M(){}function O(X){var Y=[];return X.forEach(function(z){Y.push(z)}),Y.sort().join(", ")}function V(X,Y,z,W){return new bl(X,Y,z,W)}function A(X,Y){X.context===b0&&(tL(X.current,2,Y,X,null,null),t6())}function N(X,Y){if(aY!==null){var z=Y.staleFamilies;Y=Y.updatedFamilies,y5(),AP(X.current,Y,z),t6()}}function T(X){aY=X}function P(X){return!(!X||X.nodeType!==1&&X.nodeType!==9&&X.nodeType!==11)}function C(X){var Y=X,z=X;if(X.alternate)for(;Y.return;)Y=Y.return;else{X=Y;do Y=X,(Y.flags&4098)!==0&&(z=Y.return),X=Y.return;while(X)}return Y.tag===3?z:null}function y(X){if(X.tag===13){var Y=X.memoizedState;if(Y===null&&(X=X.alternate,X!==null&&(Y=X.memoizedState)),Y!==null)return Y.dehydrated}return null}function f(X){if(X.tag===31){var Y=X.memoizedState;if(Y===null&&(X=X.alternate,X!==null&&(Y=X.memoizedState)),Y!==null)return Y.dehydrated}return null}function u(X){if(C(X)!==X)throw Error("Unable to find node on an unmounted component.")}function n(X){var Y=X.alternate;if(!Y){if(Y=C(X),Y===null)throw Error("Unable to find node on an unmounted component.");return Y!==X?null:X}for(var z=X,W=Y;;){var _=z.return;if(_===null)break;var L=_.alternate;if(L===null){if(W=_.return,W!==null){z=W;continue}break}if(_.child===L.child){for(L=_.child;L;){if(L===z)return u(_),X;if(L===W)return u(_),Y;L=L.sibling}throw Error("Unable to find node on an unmounted component.")}if(z.return!==W.return)z=_,W=L;else{for(var I=!1,j=_.child;j;){if(j===z){I=!0,z=_,W=L;break}if(j===W){I=!0,W=_,z=L;break}j=j.sibling}if(!I){for(j=L.child;j;){if(j===z){I=!0,z=L,W=_;break}if(j===W){I=!0,W=L,z=_;break}j=j.sibling}if(!I)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(z.alternate!==W)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(z.tag!==3)throw Error("Unable to find node on an unmounted component.");return z.stateNode.current===z?X:Y}function e(X){var Y=X.tag;if(Y===5||Y===26||Y===27||Y===6)return X;for(X=X.child;X!==null;){if(Y=e(X),Y!==null)return Y;X=X.sibling}return null}function a(X){if(X===null||typeof X!=="object")return null;return X=CD&&X[CD]||X["@@iterator"],typeof X==="function"?X:null}function c(X){if(X==null)return null;if(typeof X==="function")return X.$$typeof===Xn?null:X.displayName||X.name||null;if(typeof X==="string")return X;switch(X){case q8:return"Fragment";case YM:return"Profiler";case fW:return"StrictMode";case GM:return"Suspense";case zM:return"SuspenseList";case UM:return"Activity"}if(typeof X==="object")switch(typeof X.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),X.$$typeof){case Y8:return"Portal";case PG:return X.displayName||"Context";case qM:return(X._context.displayName||"Context")+".Consumer";case c5:var Y=X.render;return X=X.displayName,X||(X=Y.displayName||Y.name||"",X=X!==""?"ForwardRef("+X+")":"ForwardRef"),X;case mW:return Y=X.displayName||null,Y!==null?Y:c(X.type)||"Memo";case RY:Y=X._payload,X=X._init;try{return c(X(Y))}catch(z){}}return null}function GZ(X){return typeof X.tag==="number"?s(X):typeof X.name==="string"?X.name:null}function s(X){var Y=X.type;switch(X.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(Y._context.displayName||"Context")+".Consumer";case 10:return Y.displayName||"Context";case 18:return"DehydratedFragment";case 11:return X=Y.render,X=X.displayName||X.name||"",Y.displayName||(X!==""?"ForwardRef("+X+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return Y;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return c(Y);case 8:return Y===fW?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof Y==="function")return Y.displayName||Y.name||null;if(typeof Y==="string")return Y;break;case 29:if(Y=X._debugInfo,Y!=null){for(var z=Y.length-1;0<=z;z--)if(typeof Y[z].name==="string")return Y[z].name}if(X.return!==null)return s(X.return)}return null}function LZ(X){return{current:X}}function HZ(X,Y){0>_z?console.error("Unexpected pop."):(Y!==HM[_z]&&console.error("Unexpected Fiber popped."),X.current=KM[_z],KM[_z]=null,HM[_z]=null,_z--)}function KZ(X,Y,z){_z++,KM[_z]=X.current,HM[_z]=z,X.current=Y}function v(X){return X===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),X}function i(X,Y){KZ(E0,Y,X),KZ(p5,X,X),KZ($0,null,X);var z=Y.nodeType;switch(z){case 9:case 11:z=z===9?"#document":"#fragment",Y=(Y=Y.documentElement)?(Y=Y.namespaceURI)?rC(Y):Dz:Dz;break;default:if(z=Y.tagName,Y=Y.namespaceURI)Y=rC(Y),Y=oC(Y,z);else switch(z){case"svg":Y=u8;break;case"math":Y=u4;break;default:Y=Dz}}z=z.toLowerCase(),z=dT(null,z),z={context:Y,ancestorInfo:z},HZ($0,X),KZ($0,z,X)}function x(X){HZ($0,X),HZ(p5,X),HZ(E0,X)}function d(){return v($0.current)}function YZ(X){X.memoizedState!==null&&KZ(cW,X,X);var Y=v($0.current),z=X.type,W=oC(Y.context,z);z=dT(Y.ancestorInfo,z),W={context:W,ancestorInfo:z},Y!==W&&(KZ(p5,X,X),KZ($0,W,X))}function t(X){p5.current===X&&(HZ($0,X),HZ(p5,X)),cW.current===X&&(HZ(cW,X),x1._currentValue=wU)}function $(){}function o(){if(d5===0){DD=console.log,$D=console.info,ED=console.warn,kD=console.error,SD=console.group,yD=console.groupCollapsed,wD=console.groupEnd;var X={configurable:!0,enumerable:!0,value:$,writable:!0};Object.defineProperties(console,{info:X,log:X,warn:X,error:X,group:X,groupCollapsed:X,groupEnd:X})}d5++}function IZ(){if(d5--,d5===0){var X={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:BQ({},X,{value:DD}),info:BQ({},X,{value:$D}),warn:BQ({},X,{value:ED}),error:BQ({},X,{value:kD}),group:BQ({},X,{value:SD}),groupCollapsed:BQ({},X,{value:yD}),groupEnd:BQ({},X,{value:wD})})}0>d5&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function PZ(X){var Y=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,X=X.stack,Error.prepareStackTrace=Y,X.startsWith(`Error: react-stack-top-frame
|
|
23
|
+
`)&&(X=X.slice(29)),Y=X.indexOf(`
|
|
24
|
+
`),Y!==-1&&(X=X.slice(Y+1)),Y=X.indexOf("react_stack_bottom_frame"),Y!==-1&&(Y=X.lastIndexOf(`
|
|
25
|
+
`,Y)),Y!==-1)X=X.slice(0,Y);else return"";return X}function yZ(X){if(WM===void 0)try{throw Error()}catch(z){var Y=z.stack.trim().match(/\n( *(at )?)/);WM=Y&&Y[1]||"",xD=-1<z.stack.indexOf(`
|
|
26
|
+
at`)?" (<anonymous>)":-1<z.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
27
|
+
`+WM+X+xD}function sZ(X,Y){if(!X||BM)return"";var z=_M.get(X);if(z!==void 0)return z;BM=!0,z=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var W=null;W=XZ.H,XZ.H=null,o();try{var _={DetermineComponentFrameRoot:function(){try{if(Y){var g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(VZ){var ZZ=VZ}Reflect.construct(X,[],g)}else{try{g.call()}catch(VZ){ZZ=VZ}X.call(g.prototype)}}else{try{throw Error()}catch(VZ){ZZ=VZ}(g=X())&&typeof g.catch==="function"&&g.catch(function(){})}}catch(VZ){if(VZ&&ZZ&&typeof VZ.stack==="string")return[VZ.stack,ZZ.stack]}return[null,null]}};_.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var L=Object.getOwnPropertyDescriptor(_.DetermineComponentFrameRoot,"name");L&&L.configurable&&Object.defineProperty(_.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var I=_.DetermineComponentFrameRoot(),j=I[0],R=I[1];if(j&&R){var D=j.split(`
|
|
28
|
+
`),p=R.split(`
|
|
29
|
+
`);for(I=L=0;L<D.length&&!D[L].includes("DetermineComponentFrameRoot");)L++;for(;I<p.length&&!p[I].includes("DetermineComponentFrameRoot");)I++;if(L===D.length||I===p.length)for(L=D.length-1,I=p.length-1;1<=L&&0<=I&&D[L]!==p[I];)I--;for(;1<=L&&0<=I;L--,I--)if(D[L]!==p[I]){if(L!==1||I!==1)do if(L--,I--,0>I||D[L]!==p[I]){var l=`
|
|
30
|
+
`+D[L].replace(" at new "," at ");return X.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",X.displayName)),typeof X==="function"&&_M.set(X,l),l}while(1<=L&&0<=I);break}}}finally{BM=!1,XZ.H=W,IZ(),Error.prepareStackTrace=z}return D=(D=X?X.displayName||X.name:"")?yZ(D):"",typeof X==="function"&&_M.set(X,D),D}function CZ(X,Y){switch(X.tag){case 26:case 27:case 5:return yZ(X.type);case 16:return yZ("Lazy");case 13:return X.child!==Y&&Y!==null?yZ("Suspense Fallback"):yZ("Suspense");case 19:return yZ("SuspenseList");case 0:case 15:return sZ(X.type,!1);case 11:return sZ(X.type.render,!1);case 1:return sZ(X.type,!0);case 31:return yZ("Activity");default:return""}}function KQ(X){try{var Y="",z=null;do{Y+=CZ(X,z);var W=X._debugInfo;if(W)for(var _=W.length-1;0<=_;_--){var L=W[_];if(typeof L.name==="string"){var I=Y;Z:{var{name:j,env:R,debugLocation:D}=L;if(D!=null){var p=PZ(D),l=p.lastIndexOf(`
|
|
31
|
+
`),g=l===-1?p:p.slice(l+1);if(g.indexOf(j)!==-1){var ZZ=`
|
|
32
|
+
`+g;break Z}}ZZ=yZ(j+(R?" ["+R+"]":""))}Y=I+ZZ}}z=X,X=X.return}while(X);return Y}catch(VZ){return`
|
|
33
|
+
Error generating stack: `+VZ.message+`
|
|
34
|
+
`+VZ.stack}}function MZ(X){return(X=X?X.displayName||X.name:"")?yZ(X):""}function bZ(){if(CY===null)return null;var X=CY._debugOwner;return X!=null?GZ(X):null}function RQ(){if(CY===null)return"";var X=CY;try{var Y="";switch(X.tag===6&&(X=X.return),X.tag){case 26:case 27:case 5:Y+=yZ(X.type);break;case 13:Y+=yZ("Suspense");break;case 19:Y+=yZ("SuspenseList");break;case 31:Y+=yZ("Activity");break;case 30:case 0:case 15:case 1:X._debugOwner||Y!==""||(Y+=MZ(X.type));break;case 11:X._debugOwner||Y!==""||(Y+=MZ(X.type.render))}for(;X;)if(typeof X.tag==="number"){var z=X;X=z._debugOwner;var W=z._debugStack;if(X&&W){var _=PZ(W);_!==""&&(Y+=`
|
|
35
|
+
`+_)}}else if(X.debugStack!=null){var L=X.debugStack;(X=X.owner)&&L&&(Y+=`
|
|
36
|
+
`+PZ(L))}else break;var I=Y}catch(j){I=`
|
|
37
|
+
Error generating stack: `+j.message+`
|
|
38
|
+
`+j.stack}return I}function BZ(X,Y,z,W,_,L,I){var j=CY;GX(X);try{return X!==null&&X._debugTask?X._debugTask.run(Y.bind(null,z,W,_,L,I)):Y(z,W,_,L,I)}finally{GX(j)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function GX(X){XZ.getCurrentStack=X===null?null:RQ,RG=!1,CY=X}function kX(X){return typeof Symbol==="function"&&Symbol.toStringTag&&X[Symbol.toStringTag]||X.constructor.name||"Object"}function RX(X){try{return ZX(X),!1}catch(Y){return!0}}function ZX(X){return""+X}function gZ(X,Y){if(RX(X))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",Y,kX(X)),ZX(X)}function aJ(X,Y){if(RX(X))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",Y,kX(X)),ZX(X)}function qQ(X){if(RX(X))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",kX(X)),ZX(X)}function g6(X){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var Y=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(Y.isDisabled)return!0;if(!Y.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{z8=Y.inject(X),NJ=Y}catch(z){console.error("React instrumentation encountered an error: %o.",z)}return Y.checkDCE?!0:!1}function lQ(X){if(typeof Kn==="function"&&Hn(X),NJ&&typeof NJ.setStrictMode==="function")try{NJ.setStrictMode(z8,X)}catch(Y){CG||(CG=!0,console.error("React instrumentation encountered an error: %o",Y))}}function k7(X){return X>>>=0,X===0?32:31-(Wn(X)/Bn|0)|0}function GG(X){var Y=X&42;if(Y!==0)return Y;switch(X&-X){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 X&261888;case 262144:case 524288:case 1048576:case 2097152:return X&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return X&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),X}}function d9(X,Y,z){var W=X.pendingLanes;if(W===0)return 0;var _=0,L=X.suspendedLanes,I=X.pingedLanes;X=X.warmLanes;var j=W&134217727;return j!==0?(W=j&~L,W!==0?_=GG(W):(I&=j,I!==0?_=GG(I):z||(z=j&~X,z!==0&&(_=GG(z))))):(j=W&~L,j!==0?_=GG(j):I!==0?_=GG(I):z||(z=W&~X,z!==0&&(_=GG(z)))),_===0?0:Y!==0&&Y!==_&&(Y&L)===0&&(L=_&-_,z=Y&-Y,L>=z||L===32&&(z&4194048)!==0)?Y:_}function l9(X,Y){return(X.pendingLanes&~(X.suspendedLanes&~X.pingedLanes)&Y)===0}function t_(X,Y){switch(X){case 1:case 2:case 4:case 8:case 64:return Y+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 Y+5000;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function h6(){var X=lW;return lW<<=1,(lW&62914560)===0&&(lW=4194304),X}function u6(X){for(var Y=[],z=0;31>z;z++)Y.push(X);return Y}function _0(X,Y){X.pendingLanes|=Y,Y!==268435456&&(X.suspendedLanes=0,X.pingedLanes=0,X.warmLanes=0)}function S7(X,Y,z,W,_,L){var I=X.pendingLanes;X.pendingLanes=z,X.suspendedLanes=0,X.pingedLanes=0,X.warmLanes=0,X.expiredLanes&=z,X.entangledLanes&=z,X.errorRecoveryDisabledLanes&=z,X.shellSuspendCounter=0;var{entanglements:j,expirationTimes:R,hiddenUpdates:D}=X;for(z=I&~z;0<z;){var p=31-SJ(z),l=1<<p;j[p]=0,R[p]=-1;var g=D[p];if(g!==null)for(D[p]=null,p=0;p<g.length;p++){var ZZ=g[p];ZZ!==null&&(ZZ.lane&=-536870913)}z&=~l}W!==0&&i9(X,W,0),L!==0&&_===0&&X.tag!==0&&(X.suspendedLanes|=L&~(I&~Y))}function i9(X,Y,z){X.pendingLanes|=Y,X.suspendedLanes&=~Y;var W=31-SJ(Y);X.entangledLanes|=Y,X.entanglements[W]=X.entanglements[W]|1073741824|z&261930}function n9(X,Y){var z=X.entangledLanes|=Y;for(X=X.entanglements;z;){var W=31-SJ(z),_=1<<W;_&Y|X[W]&Y&&(X[W]|=Y),z&=~_}}function s9(X,Y){var z=Y&-Y;return z=(z&42)!==0?1:a9(z),(z&(X.suspendedLanes|Y))!==0?0:z}function a9(X){switch(X){case 2:X=1;break;case 8:X=4;break;case 32:X=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:X=128;break;case 268435456:X=134217728;break;default:X=0}return X}function q5(X,Y,z){if(DG)for(X=X.pendingUpdatersLaneMap;0<z;){var W=31-SJ(z),_=1<<W;X[W].add(Y),z&=~_}}function F0(X,Y){if(DG)for(var{pendingUpdatersLaneMap:z,memoizedUpdaters:W}=X;0<Y;){var _=31-SJ(Y);X=1<<_,_=z[_],0<_.size&&(_.forEach(function(L){var I=L.alternate;I!==null&&W.has(I)||W.add(L)}),_.clear()),Y&=~X}}function E(X){return X&=-X,DY!==0&&DY<X?xq!==0&&xq<X?(X&134217727)!==0?$G:iW:xq:DY}function r(){var X=vQ.p;if(X!==0)return X;return X=window.event,X===void 0?$G:AD(X.type)}function _Z(X,Y){var z=vQ.p;try{return vQ.p=X,Y()}finally{vQ.p=z}}function NZ(X){delete X[qJ],delete X[yJ],delete X[VM],delete X[_n],delete X[Fn]}function vZ(X){var Y=X[qJ];if(Y)return Y;for(var z=X.parentNode;z;){if(Y=z[S0]||z[qJ]){if(z=Y.alternate,Y.child!==null||z!==null&&z.child!==null)for(X=qD(X);X!==null;){if(z=X[qJ])return z;X=qD(X)}return Y}X=z,z=X.parentNode}return null}function eZ(X){if(X=X[qJ]||X[S0]){var Y=X.tag;if(Y===5||Y===6||Y===13||Y===31||Y===26||Y===27||Y===3)return X}return null}function ZQ(X){var Y=X.tag;if(Y===5||Y===26||Y===27||Y===6)return X.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function EQ(X){var Y=X[bD];return Y||(Y=X[bD]={hoistableStyles:new Map,hoistableScripts:new Map}),Y}function pZ(X){X[l5]=!0}function AJ(X,Y){MY(X,Y),MY(X+"Capture",Y)}function MY(X,Y){WU[X]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",X),WU[X]=Y;var z=X.toLowerCase();AM[z]=X,X==="onDoubleClick"&&(AM.ondblclick=X);for(X=0;X<Y.length;X++)vD.add(Y[X])}function L0(X,Y){Ln[Y.type]||Y.onChange||Y.onInput||Y.readOnly||Y.disabled||Y.value==null||(X==="select"?console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."):console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")),Y.onChange||Y.readOnly||Y.disabled||Y.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function G5(X){if(wq.call(hD,X))return!0;if(wq.call(gD,X))return!1;if(Mn.test(X))return hD[X]=!0;return gD[X]=!0,console.error("Invalid attribute name: `%s`",X),!1}function ET(X,Y,z){if(G5(Y)){if(!X.hasAttribute(Y)){switch(typeof z){case"symbol":case"object":return z;case"function":return z;case"boolean":if(z===!1)return z}return z===void 0?void 0:null}if(X=X.getAttribute(Y),X===""&&z===!0)return!0;return gZ(z,Y),X===""+z?z:X}}function y7(X,Y,z){if(G5(Y))if(z===null)X.removeAttribute(Y);else{switch(typeof z){case"undefined":case"function":case"symbol":X.removeAttribute(Y);return;case"boolean":var W=Y.toLowerCase().slice(0,5);if(W!=="data-"&&W!=="aria-"){X.removeAttribute(Y);return}}gZ(z,Y),X.setAttribute(Y,""+z)}}function w7(X,Y,z){if(z===null)X.removeAttribute(Y);else{switch(typeof z){case"undefined":case"function":case"symbol":case"boolean":X.removeAttribute(Y);return}gZ(z,Y),X.setAttribute(Y,""+z)}}function Yz(X,Y,z,W){if(W===null)X.removeAttribute(z);else{switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":X.removeAttribute(z);return}gZ(W,z),X.setAttributeNS(Y,z,""+W)}}function dY(X){switch(typeof X){case"bigint":case"boolean":case"number":case"string":case"undefined":return X;case"object":return qQ(X),X;default:return""}}function kT(X){var Y=X.type;return(X=X.nodeName)&&X.toLowerCase()==="input"&&(Y==="checkbox"||Y==="radio")}function Bl(X,Y,z){var W=Object.getOwnPropertyDescriptor(X.constructor.prototype,Y);if(!X.hasOwnProperty(Y)&&typeof W<"u"&&typeof W.get==="function"&&typeof W.set==="function"){var{get:_,set:L}=W;return Object.defineProperty(X,Y,{configurable:!0,get:function(){return _.call(this)},set:function(I){qQ(I),z=""+I,L.call(this,I)}}),Object.defineProperty(X,Y,{enumerable:W.enumerable}),{getValue:function(){return z},setValue:function(I){qQ(I),z=""+I},stopTracking:function(){X._valueTracker=null,delete X[Y]}}}}function e_(X){if(!X._valueTracker){var Y=kT(X)?"checked":"value";X._valueTracker=Bl(X,Y,""+X[Y])}}function ST(X){if(!X)return!1;var Y=X._valueTracker;if(!Y)return!0;var z=Y.getValue(),W="";return X&&(W=kT(X)?X.checked?"true":"false":X.value),X=W,X!==z?(Y.setValue(X),!0):!1}function x7(X){if(X=X||(typeof document<"u"?document:void 0),typeof X>"u")return null;try{return X.activeElement||X.body}catch(Y){return X.body}}function lY(X){return X.replace(On,function(Y){return"\\"+Y.charCodeAt(0).toString(16)+" "})}function yT(X,Y){Y.checked===void 0||Y.defaultChecked===void 0||fD||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",bZ()||"A component",Y.type),fD=!0),Y.value===void 0||Y.defaultValue===void 0||uD||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",bZ()||"A component",Y.type),uD=!0)}function ZF(X,Y,z,W,_,L,I,j){if(X.name="",I!=null&&typeof I!=="function"&&typeof I!=="symbol"&&typeof I!=="boolean"?(gZ(I,"type"),X.type=I):X.removeAttribute("type"),Y!=null)if(I==="number"){if(Y===0&&X.value===""||X.value!=Y)X.value=""+dY(Y)}else X.value!==""+dY(Y)&&(X.value=""+dY(Y));else I!=="submit"&&I!=="reset"||X.removeAttribute("value");Y!=null?QF(X,I,dY(Y)):z!=null?QF(X,I,dY(z)):W!=null&&X.removeAttribute("value"),_==null&&L!=null&&(X.defaultChecked=!!L),_!=null&&(X.checked=_&&typeof _!=="function"&&typeof _!=="symbol"),j!=null&&typeof j!=="function"&&typeof j!=="symbol"&&typeof j!=="boolean"?(gZ(j,"name"),X.name=""+dY(j)):X.removeAttribute("name")}function wT(X,Y,z,W,_,L,I,j){if(L!=null&&typeof L!=="function"&&typeof L!=="symbol"&&typeof L!=="boolean"&&(gZ(L,"type"),X.type=L),Y!=null||z!=null){if(!(L!=="submit"&&L!=="reset"||Y!==void 0&&Y!==null)){e_(X);return}z=z!=null?""+dY(z):"",Y=Y!=null?""+dY(Y):z,j||Y===X.value||(X.value=Y),X.defaultValue=Y}W=W!=null?W:_,W=typeof W!=="function"&&typeof W!=="symbol"&&!!W,X.checked=j?X.checked:!!W,X.defaultChecked=!!W,I!=null&&typeof I!=="function"&&typeof I!=="symbol"&&typeof I!=="boolean"&&(gZ(I,"name"),X.name=I),e_(X)}function QF(X,Y,z){Y==="number"&&x7(X.ownerDocument)===X||X.defaultValue===""+z||(X.defaultValue=""+z)}function xT(X,Y){Y.value==null&&(typeof Y.children==="object"&&Y.children!==null?l8.Children.forEach(Y.children,function(z){z==null||typeof z==="string"||typeof z==="number"||typeof z==="bigint"||cD||(cD=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):Y.dangerouslySetInnerHTML==null||pD||(pD=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),Y.selected==null||mD||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),mD=!0)}function bT(){var X=bZ();return X?`
|
|
39
|
+
|
|
40
|
+
Check the render method of \``+X+"`.":""}function f6(X,Y,z,W){if(X=X.options,Y){Y={};for(var _=0;_<z.length;_++)Y["$"+z[_]]=!0;for(z=0;z<X.length;z++)_=Y.hasOwnProperty("$"+X[z].value),X[z].selected!==_&&(X[z].selected=_),_&&W&&(X[z].defaultSelected=!0)}else{z=""+dY(z),Y=null;for(_=0;_<X.length;_++){if(X[_].value===z){X[_].selected=!0,W&&(X[_].defaultSelected=!0);return}Y!==null||X[_].disabled||(Y=X[_])}Y!==null&&(Y.selected=!0)}}function vT(X,Y){for(X=0;X<lD.length;X++){var z=lD[X];if(Y[z]!=null){var W=cX(Y[z]);Y.multiple&&!W?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",z,bT()):!Y.multiple&&W&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",z,bT())}}Y.value===void 0||Y.defaultValue===void 0||dD||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),dD=!0)}function gT(X,Y){Y.value===void 0||Y.defaultValue===void 0||iD||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",bZ()||"A component"),iD=!0),Y.children!=null&&Y.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function hT(X,Y,z){if(Y!=null&&(Y=""+dY(Y),Y!==X.value&&(X.value=Y),z==null)){X.defaultValue!==Y&&(X.defaultValue=Y);return}X.defaultValue=z!=null?""+dY(z):""}function uT(X,Y,z,W){if(Y==null){if(W!=null){if(z!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(cX(W)){if(1<W.length)throw Error("<textarea> can only have at most one child.");W=W[0]}z=W}z==null&&(z=""),Y=z}z=dY(Y),X.defaultValue=z,W=X.textContent,W===z&&W!==""&&W!==null&&(X.value=W),e_(X)}function fT(X,Y){return X.serverProps===void 0&&X.serverTail.length===0&&X.children.length===1&&3<X.distanceFromLeaf&&X.distanceFromLeaf>15-Y?fT(X.children[0],Y):X}function OY(X){return" "+" ".repeat(X)}function m6(X){return"+ "+" ".repeat(X)}function r9(X){return"- "+" ".repeat(X)}function mT(X){switch(X.tag){case 26:case 27:case 5:return X.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return X=X.type,X.displayName||X.name||null;case 11:return X=X.type.render,X.displayName||X.name||null;case 1:return X=X.type,X.displayName||X.name||null;default:return null}}function z5(X,Y){return nD.test(X)?(X=JSON.stringify(X),X.length>Y-2?8>Y?'{"..."}':"{"+X.slice(0,Y-7)+'..."}':"{"+X+"}"):X.length>Y?5>Y?'{"..."}':X.slice(0,Y-3)+"...":X}function b7(X,Y,z){var W=120-2*z;if(Y===null)return m6(z)+z5(X,W)+`
|
|
41
|
+
`;if(typeof Y==="string"){for(var _=0;_<Y.length&&_<X.length&&Y.charCodeAt(_)===X.charCodeAt(_);_++);return _>W-8&&10<_&&(X="..."+X.slice(_-8),Y="..."+Y.slice(_-8)),m6(z)+z5(X,W)+`
|
|
42
|
+
`+r9(z)+z5(Y,W)+`
|
|
43
|
+
`}return OY(z)+z5(X,W)+`
|
|
44
|
+
`}function XF(X){return Object.prototype.toString.call(X).replace(/^\[object (.*)\]$/,function(Y,z){return z})}function U5(X,Y){switch(typeof X){case"string":return X=JSON.stringify(X),X.length>Y?5>Y?'"..."':X.slice(0,Y-4)+'..."':X;case"object":if(X===null)return"null";if(cX(X))return"[...]";if(X.$$typeof===TG)return(Y=c(X.type))?"<"+Y+">":"<...>";var z=XF(X);if(z==="Object"){z="",Y-=2;for(var W in X)if(X.hasOwnProperty(W)){var _=JSON.stringify(W);if(_!=='"'+W+'"'&&(W=_),Y-=W.length-2,_=U5(X[W],15>Y?Y:15),Y-=_.length,0>Y){z+=z===""?"...":", ...";break}z+=(z===""?"":",")+W+":"+_}return"{"+z+"}"}return z;case"function":return(Y=X.displayName||X.name)?"function "+Y:"function";default:return String(X)}}function c6(X,Y){return typeof X!=="string"||nD.test(X)?"{"+U5(X,Y-2)+"}":X.length>Y-2?5>Y?'"..."':'"'+X.slice(0,Y-5)+'..."':'"'+X+'"'}function JF(X,Y,z){var W=120-z.length-X.length,_=[],L;for(L in Y)if(Y.hasOwnProperty(L)&&L!=="children"){var I=c6(Y[L],120-z.length-L.length-1);W-=L.length+I.length+2,_.push(L+"="+I)}return _.length===0?z+"<"+X+`>
|
|
45
|
+
`:0<W?z+"<"+X+" "+_.join(" ")+`>
|
|
46
|
+
`:z+"<"+X+`
|
|
47
|
+
`+z+" "+_.join(`
|
|
48
|
+
`+z+" ")+`
|
|
49
|
+
`+z+`>
|
|
50
|
+
`}function _l(X,Y,z){var W="",_=BQ({},Y),L;for(L in X)if(X.hasOwnProperty(L)){delete _[L];var I=120-2*z-L.length-2,j=U5(X[L],I);Y.hasOwnProperty(L)?(I=U5(Y[L],I),W+=m6(z)+L+": "+j+`
|
|
51
|
+
`,W+=r9(z)+L+": "+I+`
|
|
52
|
+
`):W+=m6(z)+L+": "+j+`
|
|
53
|
+
`}for(var R in _)_.hasOwnProperty(R)&&(X=U5(_[R],120-2*z-R.length-2),W+=r9(z)+R+": "+X+`
|
|
54
|
+
`);return W}function Fl(X,Y,z,W){var _="",L=new Map;for(D in z)z.hasOwnProperty(D)&&L.set(D.toLowerCase(),D);if(L.size===1&&L.has("children"))_+=JF(X,Y,OY(W));else{for(var I in Y)if(Y.hasOwnProperty(I)&&I!=="children"){var j=120-2*(W+1)-I.length-1,R=L.get(I.toLowerCase());if(R!==void 0){L.delete(I.toLowerCase());var D=Y[I];R=z[R];var p=c6(D,j);j=c6(R,j),typeof D==="object"&&D!==null&&typeof R==="object"&&R!==null&&XF(D)==="Object"&&XF(R)==="Object"&&(2<Object.keys(D).length||2<Object.keys(R).length||-1<p.indexOf("...")||-1<j.indexOf("..."))?_+=OY(W+1)+I+`={{
|
|
55
|
+
`+_l(D,R,W+2)+OY(W+1)+`}}
|
|
56
|
+
`:(_+=m6(W+1)+I+"="+p+`
|
|
57
|
+
`,_+=r9(W+1)+I+"="+j+`
|
|
58
|
+
`)}else _+=OY(W+1)+I+"="+c6(Y[I],j)+`
|
|
59
|
+
`}L.forEach(function(l){if(l!=="children"){var g=120-2*(W+1)-l.length-1;_+=r9(W+1)+l+"="+c6(z[l],g)+`
|
|
60
|
+
`}}),_=_===""?OY(W)+"<"+X+`>
|
|
61
|
+
`:OY(W)+"<"+X+`
|
|
62
|
+
`+_+OY(W)+`>
|
|
63
|
+
`}if(X=z.children,Y=Y.children,typeof X==="string"||typeof X==="number"||typeof X==="bigint"){if(L="",typeof Y==="string"||typeof Y==="number"||typeof Y==="bigint")L=""+Y;_+=b7(L,""+X,W+1)}else if(typeof Y==="string"||typeof Y==="number"||typeof Y==="bigint")_=X==null?_+b7(""+Y,null,W+1):_+b7(""+Y,void 0,W+1);return _}function cT(X,Y){var z=mT(X);if(z===null){z="";for(X=X.child;X;)z+=cT(X,Y),X=X.sibling;return z}return OY(Y)+"<"+z+`>
|
|
64
|
+
`}function YF(X,Y){var z=fT(X,Y);if(z!==X&&(X.children.length!==1||X.children[0]!==z))return OY(Y)+`...
|
|
65
|
+
`+YF(z,Y+1);z="";var W=X.fiber._debugInfo;if(W)for(var _=0;_<W.length;_++){var L=W[_].name;typeof L==="string"&&(z+=OY(Y)+"<"+L+`>
|
|
66
|
+
`,Y++)}if(W="",_=X.fiber.pendingProps,X.fiber.tag===6)W=b7(_,X.serverProps,Y),Y++;else if(L=mT(X.fiber),L!==null)if(X.serverProps===void 0){W=Y;var I=120-2*W-L.length-2,j="";for(D in _)if(_.hasOwnProperty(D)&&D!=="children"){var R=c6(_[D],15);if(I-=D.length+R.length+2,0>I){j+=" ...";break}j+=" "+D+"="+R}W=OY(W)+"<"+L+j+`>
|
|
67
|
+
`,Y++}else X.serverProps===null?(W=JF(L,_,m6(Y)),Y++):typeof X.serverProps==="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(W=Fl(L,_,X.serverProps,Y),Y++);var D="";_=X.fiber.child;for(L=0;_&&L<X.children.length;)I=X.children[L],I.fiber===_?(D+=YF(I,Y),L++):D+=cT(_,Y),_=_.sibling;_&&0<X.children.length&&(D+=OY(Y)+`...
|
|
68
|
+
`),_=X.serverTail,X.serverProps===null&&Y--;for(X=0;X<_.length;X++)L=_[X],D=typeof L==="string"?D+(r9(Y)+z5(L,120-2*Y)+`
|
|
69
|
+
`):D+JF(L.type,L.props,r9(Y));return z+W+D}function qF(X){try{return`
|
|
70
|
+
|
|
71
|
+
`+YF(X,0)}catch(Y){return""}}function pT(X,Y,z){for(var W=Y,_=null,L=0;W;)W===X&&(L=0),_={fiber:W,children:_!==null?[_]:[],serverProps:W===Y?z:W===X?null:void 0,serverTail:[],distanceFromLeaf:L},L++,W=W.return;return _!==null?qF(_).replaceAll(/^[+-]/gm,">"):""}function dT(X,Y){var z=BQ({},X||aD),W={tag:Y};if(sD.indexOf(Y)!==-1&&(z.aTagInScope=null,z.buttonTagInScope=null,z.nobrTagInScope=null),An.indexOf(Y)!==-1&&(z.pTagInButtonScope=null),Vn.indexOf(Y)!==-1&&Y!=="address"&&Y!=="div"&&Y!=="p"&&(z.listItemTagAutoclosing=null,z.dlItemTagAutoclosing=null),z.current=W,Y==="form"&&(z.formTag=W),Y==="a"&&(z.aTagInScope=W),Y==="button"&&(z.buttonTagInScope=W),Y==="nobr"&&(z.nobrTagInScope=W),Y==="p"&&(z.pTagInButtonScope=W),Y==="li"&&(z.listItemTagAutoclosing=W),Y==="dd"||Y==="dt")z.dlItemTagAutoclosing=W;return Y==="#document"||Y==="html"?z.containerTagInScope=null:z.containerTagInScope||(z.containerTagInScope=W),X!==null||Y!=="#document"&&Y!=="html"&&Y!=="body"?z.implicitRootScope===!0&&(z.implicitRootScope=!1):z.implicitRootScope=!0,z}function lT(X,Y,z){switch(Y){case"select":return X==="hr"||X==="option"||X==="optgroup"||X==="script"||X==="template"||X==="#text";case"optgroup":return X==="option"||X==="#text";case"option":return X==="#text";case"tr":return X==="th"||X==="td"||X==="style"||X==="script"||X==="template";case"tbody":case"thead":case"tfoot":return X==="tr"||X==="style"||X==="script"||X==="template";case"colgroup":return X==="col"||X==="template";case"table":return X==="caption"||X==="colgroup"||X==="tbody"||X==="tfoot"||X==="thead"||X==="style"||X==="script"||X==="template";case"head":return X==="base"||X==="basefont"||X==="bgsound"||X==="link"||X==="meta"||X==="title"||X==="noscript"||X==="noframes"||X==="style"||X==="script"||X==="template";case"html":if(z)break;return X==="head"||X==="body"||X==="frameset";case"frameset":return X==="frame";case"#document":if(!z)return X==="html"}switch(X){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Y!=="h1"&&Y!=="h2"&&Y!=="h3"&&Y!=="h4"&&Y!=="h5"&&Y!=="h6";case"rp":case"rt":return In.indexOf(Y)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return Y==null;case"head":return z||Y===null;case"html":return z&&Y==="#document"||Y===null;case"body":return z&&(Y==="#document"||Y==="html")||Y===null}return!0}function Ll(X,Y){switch(X){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Y.pTagInButtonScope;case"form":return Y.formTag||Y.pTagInButtonScope;case"li":return Y.listItemTagAutoclosing;case"dd":case"dt":return Y.dlItemTagAutoclosing;case"button":return Y.buttonTagInScope;case"a":return Y.aTagInScope;case"nobr":return Y.nobrTagInScope}return null}function iT(X,Y){for(;X;){switch(X.tag){case 5:case 26:case 27:if(X.type===Y)return X}X=X.return}return null}function GF(X,Y){Y=Y||aD;var z=Y.current;if(Y=(z=lT(X,z&&z.tag,Y.implicitRootScope)?null:z)?null:Ll(X,Y),Y=z||Y,!Y)return!0;var W=Y.tag;if(Y=String(!!z)+"|"+X+"|"+W,nW[Y])return!1;nW[Y]=!0;var _=(Y=CY)?iT(Y.return,W):null,L=Y!==null&&_!==null?pT(_,Y,null):"",I="<"+X+">";return z?(z="",W==="table"&&X==="tr"&&(z+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
|
|
72
|
+
This will cause a hydration error.%s`,I,W,z,L)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
73
|
+
This will cause a hydration error.%s`,I,W,L),Y&&(X=Y.return,_===null||X===null||_===X&&X._debugOwner===Y._debugOwner||BZ(_,function(){console.error(`<%s> cannot contain a nested %s.
|
|
74
|
+
See this log for the ancestor stack trace.`,W,I)})),!1}function v7(X,Y,z){if(z||lT("#text",Y,!1))return!0;if(z="#text|"+Y,nW[z])return!1;nW[z]=!0;var W=(z=CY)?iT(z,Y):null;return z=z!==null&&W!==null?pT(W,z,z.tag!==6?{children:null}:null):"",/\S/.test(X)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
75
|
+
This will cause a hydration error.%s`,Y,z):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
|
76
|
+
This will cause a hydration error.%s`,Y,z),!1}function K5(X,Y){if(Y){var z=X.firstChild;if(z&&z===X.lastChild&&z.nodeType===3){z.nodeValue=Y;return}}X.textContent=Y}function Ml(X){return X.replace(Tn,function(Y,z){return z.toUpperCase()})}function nT(X,Y,z){var W=Y.indexOf("--")===0;W||(-1<Y.indexOf("-")?U8.hasOwnProperty(Y)&&U8[Y]||(U8[Y]=!0,console.error("Unsupported style property %s. Did you mean %s?",Y,Ml(Y.replace(jn,"ms-")))):Nn.test(Y)?U8.hasOwnProperty(Y)&&U8[Y]||(U8[Y]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",Y,Y.charAt(0).toUpperCase()+Y.slice(1))):!tD.test(z)||NM.hasOwnProperty(z)&&NM[z]||(NM[z]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,Y,z.replace(tD,""))),typeof z==="number"&&(isNaN(z)?eD||(eD=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",Y)):isFinite(z)||Z$||(Z$=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",Y)))),z==null||typeof z==="boolean"||z===""?W?X.setProperty(Y,""):Y==="float"?X.cssFloat="":X[Y]="":W?X.setProperty(Y,z):typeof z!=="number"||z===0||Q$.has(Y)?Y==="float"?X.cssFloat=z:(aJ(z,Y),X[Y]=(""+z).trim()):X[Y]=z+"px"}function sT(X,Y,z){if(Y!=null&&typeof Y!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(Y&&Object.freeze(Y),X=X.style,z!=null){if(Y){var W={};if(z){for(var _ in z)if(z.hasOwnProperty(_)&&!Y.hasOwnProperty(_))for(var L=IM[_]||[_],I=0;I<L.length;I++)W[L[I]]=_}for(var j in Y)if(Y.hasOwnProperty(j)&&(!z||z[j]!==Y[j]))for(_=IM[j]||[j],L=0;L<_.length;L++)W[_[L]]=j;j={};for(var R in Y)for(_=IM[R]||[R],L=0;L<_.length;L++)j[_[L]]=R;R={};for(var D in W)if(_=W[D],(L=j[D])&&_!==L&&(I=_+","+L,!R[I])){R[I]=!0,I=console;var p=Y[_];I.error.call(I,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",p==null||typeof p==="boolean"||p===""?"Removing":"Updating",_,L)}}for(var l in z)!z.hasOwnProperty(l)||Y!=null&&Y.hasOwnProperty(l)||(l.indexOf("--")===0?X.setProperty(l,""):l==="float"?X.cssFloat="":X[l]="");for(var g in Y)D=Y[g],Y.hasOwnProperty(g)&&z[g]!==D&&nT(X,g,D)}else for(W in Y)Y.hasOwnProperty(W)&&nT(X,W,Y[W])}function H5(X){if(X.indexOf("-")===-1)return!1;switch(X){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}}function aT(X){return Pn.get(X)||X}function Ol(X,Y){if(wq.call(H8,Y)&&H8[Y])return!0;if(Cn.test(Y)){if(X="aria-"+Y.slice(4).toLowerCase(),X=X$.hasOwnProperty(X)?X:null,X==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",Y),H8[Y]=!0;if(Y!==X)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",Y,X),H8[Y]=!0}if(Rn.test(Y)){if(X=Y.toLowerCase(),X=X$.hasOwnProperty(X)?X:null,X==null)return H8[Y]=!0,!1;Y!==X&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",Y,X),H8[Y]=!0)}return!0}function Vl(X,Y){var z=[],W;for(W in Y)Ol(X,W)||z.push(W);Y=z.map(function(_){return"`"+_+"`"}).join(", "),z.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",Y,X):1<z.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",Y,X)}function Al(X,Y,z,W){if(wq.call(wJ,Y)&&wJ[Y])return!0;var _=Y.toLowerCase();if(_==="onfocusin"||_==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),wJ[Y]=!0;if(typeof z==="function"&&(X==="form"&&Y==="action"||X==="input"&&Y==="formAction"||X==="button"&&Y==="formAction"))return!0;if(W!=null){if(X=W.possibleRegistrationNames,W.registrationNameDependencies.hasOwnProperty(Y))return!0;if(W=X.hasOwnProperty(_)?X[_]:null,W!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",Y,W),wJ[Y]=!0;if(Y$.test(Y))return console.error("Unknown event handler property `%s`. It will be ignored.",Y),wJ[Y]=!0}else if(Y$.test(Y))return Dn.test(Y)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",Y),wJ[Y]=!0;if($n.test(Y)||En.test(Y))return!0;if(_==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),wJ[Y]=!0;if(_==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),wJ[Y]=!0;if(_==="is"&&z!==null&&z!==void 0&&typeof z!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof z),wJ[Y]=!0;if(typeof z==="number"&&isNaN(z))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",Y),wJ[Y]=!0;if(aW.hasOwnProperty(_)){if(_=aW[_],_!==Y)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",Y,_),wJ[Y]=!0}else if(Y!==_)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",Y,_),wJ[Y]=!0;switch(Y){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof z){case"boolean":switch(Y){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":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":case"capture":case"download":case"inert":return!0;default:if(_=Y.toLowerCase().slice(0,5),_==="data-"||_==="aria-")return!0;return z?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',z,Y,Y,z,Y):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',z,Y,Y,z,Y,Y,Y),wJ[Y]=!0}case"function":case"symbol":return wJ[Y]=!0,!1;case"string":if(z==="false"||z==="true"){switch(Y){case"checked":case"selected":case"multiple":case"muted":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":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",z,Y,z==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',Y,z),wJ[Y]=!0}}return!0}function Il(X,Y,z){var W=[],_;for(_ in Y)Al(X,_,Y[_],z)||W.push(_);Y=W.map(function(L){return"`"+L+"`"}).join(", "),W.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",Y,X):1<W.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",Y,X)}function W5(X){return kn.test(""+X)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":X}function qz(){}function zF(X){return X=X.target||X.srcElement||window,X.correspondingUseElement&&(X=X.correspondingUseElement),X.nodeType===3?X.parentNode:X}function rT(X){var Y=eZ(X);if(Y&&(X=Y.stateNode)){var z=X[yJ]||null;Z:switch(X=Y.stateNode,Y.type){case"input":if(ZF(X,z.value,z.defaultValue,z.defaultValue,z.checked,z.defaultChecked,z.type,z.name),Y=z.name,z.type==="radio"&&Y!=null){for(z=X;z.parentNode;)z=z.parentNode;gZ(Y,"name"),z=z.querySelectorAll('input[name="'+lY(""+Y)+'"][type="radio"]');for(Y=0;Y<z.length;Y++){var W=z[Y];if(W!==X&&W.form===X.form){var _=W[yJ]||null;if(!_)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");ZF(W,_.value,_.defaultValue,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name)}}for(Y=0;Y<z.length;Y++)W=z[Y],W.form===X.form&&ST(W)}break Z;case"textarea":hT(X,z.value,z.defaultValue);break Z;case"select":Y=z.value,Y!=null&&f6(X,!!z.multiple,Y,!1)}}}function oT(X,Y,z){if(jM)return X(Y,z);jM=!0;try{var W=X(Y);return W}finally{if(jM=!1,W8!==null||B8!==null){if(t6(),W8&&(Y=W8,X=B8,B8=W8=null,rT(Y),X))for(Y=0;Y<X.length;Y++)rT(X[Y])}}}function B5(X,Y){var z=X.stateNode;if(z===null)return null;var W=z[yJ]||null;if(W===null)return null;z=W[Y];Z:switch(Y){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(W=!W.disabled)||(X=X.type,W=!(X==="button"||X==="input"||X==="select"||X==="textarea")),X=!W;break Z;default:X=!1}if(X)return null;if(z&&typeof z!=="function")throw Error("Expected `"+Y+"` listener to be a function, instead got a value of `"+typeof z+"` type.");return z}function tT(){if(rW)return rW;var X,Y=PM,z=Y.length,W,_="value"in y0?y0.value:y0.textContent,L=_.length;for(X=0;X<z&&Y[X]===_[X];X++);var I=z-X;for(W=1;W<=I&&Y[z-W]===_[L-W];W++);return rW=_.slice(X,1<W?1-W:void 0)}function g7(X){var Y=X.keyCode;return"charCode"in X?(X=X.charCode,X===0&&Y===13&&(X=13)):X=Y,X===10&&(X=13),32<=X||X===13?X:0}function h7(){return!0}function eT(){return!1}function rJ(X){function Y(z,W,_,L,I){this._reactName=z,this._targetInst=_,this.type=W,this.nativeEvent=L,this.target=I,this.currentTarget=null;for(var j in X)X.hasOwnProperty(j)&&(z=X[j],this[j]=z?z(L):L[j]);return this.isDefaultPrevented=(L.defaultPrevented!=null?L.defaultPrevented:L.returnValue===!1)?h7:eT,this.isPropagationStopped=eT,this}return BQ(Y.prototype,{preventDefault:function(){this.defaultPrevented=!0;var z=this.nativeEvent;z&&(z.preventDefault?z.preventDefault():typeof z.returnValue!=="unknown"&&(z.returnValue=!1),this.isDefaultPrevented=h7)},stopPropagation:function(){var z=this.nativeEvent;z&&(z.stopPropagation?z.stopPropagation():typeof z.cancelBubble!=="unknown"&&(z.cancelBubble=!0),this.isPropagationStopped=h7)},persist:function(){},isPersistent:h7}),Y}function Nl(X){var Y=this.nativeEvent;return Y.getModifierState?Y.getModifierState(X):(X=pn[X])?!!Y[X]:!1}function UF(){return Nl}function ZP(X,Y){switch(X){case"keyup":return Xs.indexOf(Y.keyCode)!==-1;case"keydown":return Y.keyCode!==U$;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QP(X){return X=X.detail,typeof X==="object"&&"data"in X?X.data:null}function jl(X,Y){switch(X){case"compositionend":return QP(Y);case"keypress":if(Y.which!==H$)return null;return B$=!0,W$;case"textInput":return X=Y.data,X===W$&&B$?null:X;default:return null}}function Tl(X,Y){if(_8)return X==="compositionend"||!$M&&ZP(X,Y)?(X=tT(),rW=PM=y0=null,_8=!1,X):null;switch(X){case"paste":return null;case"keypress":if(!(Y.ctrlKey||Y.altKey||Y.metaKey)||Y.ctrlKey&&Y.altKey){if(Y.char&&1<Y.char.length)return Y.char;if(Y.which)return String.fromCharCode(Y.which)}return null;case"compositionend":return K$&&Y.locale!=="ko"?null:Y.data;default:return null}}function XP(X){var Y=X&&X.nodeName&&X.nodeName.toLowerCase();return Y==="input"?!!Ys[X.type]:Y==="textarea"?!0:!1}function Pl(X){if(!EG)return!1;X="on"+X;var Y=X in document;return Y||(Y=document.createElement("div"),Y.setAttribute(X,"return;"),Y=typeof Y[X]==="function"),Y}function JP(X,Y,z,W){W8?B8?B8.push(W):B8=[W]:W8=W,Y=kW(Y,"onChange"),0<Y.length&&(z=new oW("onChange","change",null,z,W),X.push({event:z,listeners:Y}))}function Rl(X){uC(X,0)}function u7(X){var Y=ZQ(X);if(ST(Y))return X}function YP(X,Y){if(X==="change")return Y}function qP(){o5&&(o5.detachEvent("onpropertychange",GP),t5=o5=null)}function GP(X){if(X.propertyName==="value"&&u7(t5)){var Y=[];JP(Y,t5,X,zF(X)),oT(Rl,Y)}}function Cl(X,Y,z){X==="focusin"?(qP(),o5=Y,t5=z,o5.attachEvent("onpropertychange",GP)):X==="focusout"&&qP()}function Dl(X){if(X==="selectionchange"||X==="keyup"||X==="keydown")return u7(t5)}function $l(X,Y){if(X==="click")return u7(Y)}function El(X,Y){if(X==="input"||X==="change")return u7(Y)}function kl(X,Y){return X===Y&&(X!==0||1/X===1/Y)||X!==X&&Y!==Y}function _5(X,Y){if(xJ(X,Y))return!0;if(typeof X!=="object"||X===null||typeof Y!=="object"||Y===null)return!1;var z=Object.keys(X),W=Object.keys(Y);if(z.length!==W.length)return!1;for(W=0;W<z.length;W++){var _=z[W];if(!wq.call(Y,_)||!xJ(X[_],Y[_]))return!1}return!0}function zP(X){for(;X&&X.firstChild;)X=X.firstChild;return X}function UP(X,Y){var z=zP(X);X=0;for(var W;z;){if(z.nodeType===3){if(W=X+z.textContent.length,X<=Y&&W>=Y)return{node:z,offset:Y-X};X=W}Z:{for(;z;){if(z.nextSibling){z=z.nextSibling;break Z}z=z.parentNode}z=void 0}z=zP(z)}}function KP(X,Y){return X&&Y?X===Y?!0:X&&X.nodeType===3?!1:Y&&Y.nodeType===3?KP(X,Y.parentNode):("contains"in X)?X.contains(Y):X.compareDocumentPosition?!!(X.compareDocumentPosition(Y)&16):!1:!1}function HP(X){X=X!=null&&X.ownerDocument!=null&&X.ownerDocument.defaultView!=null?X.ownerDocument.defaultView:window;for(var Y=x7(X.document);Y instanceof X.HTMLIFrameElement;){try{var z=typeof Y.contentWindow.location.href==="string"}catch(W){z=!1}if(z)X=Y.contentWindow;else break;Y=x7(X.document)}return Y}function KF(X){var Y=X&&X.nodeName&&X.nodeName.toLowerCase();return Y&&(Y==="input"&&(X.type==="text"||X.type==="search"||X.type==="tel"||X.type==="url"||X.type==="password")||Y==="textarea"||X.contentEditable==="true")}function WP(X,Y,z){var W=z.window===z?z.document:z.nodeType===9?z:z.ownerDocument;kM||F8==null||F8!==x7(W)||(W=F8,("selectionStart"in W)&&KF(W)?W={start:W.selectionStart,end:W.selectionEnd}:(W=(W.ownerDocument&&W.ownerDocument.defaultView||window).getSelection(),W={anchorNode:W.anchorNode,anchorOffset:W.anchorOffset,focusNode:W.focusNode,focusOffset:W.focusOffset}),e5&&_5(e5,W)||(e5=W,W=kW(EM,"onSelect"),0<W.length&&(Y=new oW("onSelect","select",null,Y,z),X.push({event:Y,listeners:W}),Y.target=F8)))}function o9(X,Y){var z={};return z[X.toLowerCase()]=Y.toLowerCase(),z["Webkit"+X]="webkit"+Y,z["Moz"+X]="moz"+Y,z}function t9(X){if(SM[X])return SM[X];if(!L8[X])return X;var Y=L8[X],z;for(z in Y)if(Y.hasOwnProperty(z)&&z in F$)return SM[X]=Y[z];return X}function kq(X,Y){A$.set(X,Y),AJ(Y,[X])}function Sl(X){for(var Y=eW,z=0;z<X.length;z++){var W=X[z];if(typeof W==="object"&&W!==null)if(cX(W)&&W.length===2&&typeof W[0]==="string"){if(Y!==eW&&Y!==vM)return xM;Y=vM}else return xM;else{if(typeof W==="function"||typeof W==="string"&&50<W.length||Y!==eW&&Y!==bM)return xM;Y=bM}}return Y}function HF(X,Y,z,W){for(var _ in X)wq.call(X,_)&&_[0]!=="_"&&zG(_,X[_],Y,z,W)}function zG(X,Y,z,W,_){switch(typeof Y){case"object":if(Y===null){Y="null";break}else{if(Y.$$typeof===TG){var L=c(Y.type)||"…",I=Y.key;Y=Y.props;var j=Object.keys(Y),R=j.length;if(I==null&&R===0){Y="<"+L+" />";break}if(3>W||R===1&&j[0]==="children"&&I==null){Y="<"+L+" … />";break}z.push([_+" ".repeat(W)+X,"<"+L]),I!==null&&zG("key",I,z,W+1,_),X=!1;for(var D in Y)D==="children"?Y.children!=null&&(!cX(Y.children)||0<Y.children.length)&&(X=!0):wq.call(Y,D)&&D[0]!=="_"&&zG(D,Y[D],z,W+1,_);z.push(["",X?">…</"+L+">":"/>"]);return}if(L=Object.prototype.toString.call(Y),L=L.slice(8,L.length-1),L==="Array"){if(D=Sl(Y),D===bM||D===eW){Y=JSON.stringify(Y);break}else if(D===vM){z.push([_+" ".repeat(W)+X,""]);for(X=0;X<Y.length;X++)L=Y[X],zG(L[0],L[1],z,W+1,_);return}}if(L==="Promise"){if(Y.status==="fulfilled"){if(L=z.length,zG(X,Y.value,z,W,_),z.length>L){z=z[L],z[1]="Promise<"+(z[1]||"Object")+">";return}}else if(Y.status==="rejected"&&(L=z.length,zG(X,Y.reason,z,W,_),z.length>L)){z=z[L],z[1]="Rejected Promise<"+z[1]+">";return}z.push([" ".repeat(W)+X,"Promise"]);return}L==="Object"&&(D=Object.getPrototypeOf(Y))&&typeof D.constructor==="function"&&(L=D.constructor.name),z.push([_+" ".repeat(W)+X,L==="Object"?3>W?"":"…":L]),3>W&&HF(Y,z,W+1,_);return}case"function":Y=Y.name===""?"() => {}":Y.name+"() {}";break;case"string":Y=Y===Ws?"…":JSON.stringify(Y);break;case"undefined":Y="undefined";break;case"boolean":Y=Y?"true":"false";break;default:Y=String(Y)}z.push([_+" ".repeat(W)+X,Y])}function BP(X,Y,z,W){var _=!0;for(I in X)I in Y||(z.push([Z4+" ".repeat(W)+I,"…"]),_=!1);for(var L in Y)if(L in X){var I=X[L],j=Y[L];if(I!==j){if(W===0&&L==="children")_=" ".repeat(W)+L,z.push([Z4+_,"…"],[Q4+_,"…"]);else{if(!(3<=W)){if(typeof I==="object"&&typeof j==="object"&&I!==null&&j!==null&&I.$$typeof===j.$$typeof)if(j.$$typeof===TG){if(I.type===j.type&&I.key===j.key){I=c(j.type)||"…",_=" ".repeat(W)+L,I="<"+I+" … />",z.push([Z4+_,I],[Q4+_,I]),_=!1;continue}}else{var R=Object.prototype.toString.call(I),D=Object.prototype.toString.call(j);if(R===D&&(D==="[object Object]"||D==="[object Array]")){R=[j$+" ".repeat(W)+L,D==="[object Array]"?"Array":""],z.push(R),D=z.length,BP(I,j,z,W+1)?D===z.length&&(R[1]="Referentially unequal but deeply equal objects. Consider memoization."):_=!1;continue}}else if(typeof I==="function"&&typeof j==="function"&&I.name===j.name&&I.length===j.length&&(R=Function.prototype.toString.call(I),D=Function.prototype.toString.call(j),R===D)){I=j.name===""?"() => {}":j.name+"() {}",z.push([j$+" ".repeat(W)+L,I+" Referentially unequal function closure. Consider memoization."]);continue}}zG(L,I,z,W,Z4),zG(L,j,z,W,Q4)}_=!1}}else z.push([Q4+" ".repeat(W)+L,"…"]),_=!1;return _}function VY(X){LQ=X&63?"Blocking":X&64?"Gesture":X&4194176?"Transition":X&62914560?"Suspense":X&2080374784?"Idle":"Other"}function UG(X,Y,z,W){aQ&&(x0.start=Y,x0.end=z,Fz.color="warning",Fz.tooltipText=W,Fz.properties=null,(X=X._debugTask)?X.run(performance.measure.bind(performance,W,x0)):performance.measure(W,x0))}function f7(X,Y,z){UG(X,Y,z,"Reconnect")}function m7(X,Y,z,W,_){var L=s(X);if(L!==null&&aQ){var{alternate:I,actualDuration:j}=X;if(I===null||I.child!==X.child)for(var R=X.child;R!==null;R=R.sibling)j-=R.actualDuration;W=0.5>j?W?"tertiary-light":"primary-light":10>j?W?"tertiary":"primary":100>j?W?"tertiary-dark":"primary-dark":"error";var D=X.memoizedProps;j=X._debugTask,D!==null&&I!==null&&I.memoizedProps!==D?(R=[Bs],D=BP(I.memoizedProps,D,R,0),1<R.length&&(D&&!w0&&(I.lanes&_)===0&&100<X.actualDuration?(w0=!0,R[0]=_s,Fz.color="warning",Fz.tooltipText=T$):(Fz.color=W,Fz.tooltipText=L),Fz.properties=R,x0.start=Y,x0.end=z,j!=null?j.run(performance.measure.bind(performance,""+L,x0)):performance.measure(""+L,x0))):j!=null?j.run(console.timeStamp.bind(console,L,Y,z,nY,void 0,W)):console.timeStamp(L,Y,z,nY,void 0,W)}}function WF(X,Y,z,W){if(aQ){var _=s(X);if(_!==null){for(var L=null,I=[],j=0;j<W.length;j++){var R=W[j];L==null&&R.source!==null&&(L=R.source._debugTask),R=R.value,I.push(["Error",typeof R==="object"&&R!==null&&typeof R.message==="string"?String(R.message):String(R)])}X.key!==null&&zG("key",X.key,I,0,""),X.memoizedProps!==null&&HF(X.memoizedProps,I,0,""),L==null&&(L=X._debugTask),X={start:Y,end:z,detail:{devtools:{color:"error",track:nY,tooltipText:X.tag===13?"Hydration failed":"Error boundary caught an error",properties:I}}},L?L.run(performance.measure.bind(performance,""+_,X)):performance.measure(""+_,X)}}}function KG(X,Y,z,W,_){if(_!==null){if(aQ){var L=s(X);if(L!==null){W=[];for(var I=0;I<_.length;I++){var j=_[I].value;W.push(["Error",typeof j==="object"&&j!==null&&typeof j.message==="string"?String(j.message):String(j)])}X.key!==null&&zG("key",X.key,W,0,""),X.memoizedProps!==null&&HF(X.memoizedProps,W,0,""),Y={start:Y,end:z,detail:{devtools:{color:"error",track:nY,tooltipText:"A lifecycle or effect errored",properties:W}}},(X=X._debugTask)?X.run(performance.measure.bind(performance,""+L,Y)):performance.measure(""+L,Y)}}}else L=s(X),L!==null&&aQ&&(_=1>W?"secondary-light":100>W?"secondary":500>W?"secondary-dark":"error",(X=X._debugTask)?X.run(console.timeStamp.bind(console,L,Y,z,nY,void 0,_)):console.timeStamp(L,Y,z,nY,void 0,_))}function yl(X,Y,z,W){if(aQ&&!(Y<=X)){var _=(z&738197653)===z?"tertiary-dark":"primary-dark";z=(z&536870912)===z?"Prepared":(z&201326741)===z?"Hydrated":"Render",W?W.run(console.timeStamp.bind(console,z,X,Y,LQ,_Q,_)):console.timeStamp(z,X,Y,LQ,_Q,_)}}function _P(X,Y,z,W){!aQ||Y<=X||(z=(z&738197653)===z?"tertiary-dark":"primary-dark",W?W.run(console.timeStamp.bind(console,"Prewarm",X,Y,LQ,_Q,z)):console.timeStamp("Prewarm",X,Y,LQ,_Q,z))}function FP(X,Y,z,W){!aQ||Y<=X||(z=(z&738197653)===z?"tertiary-dark":"primary-dark",W?W.run(console.timeStamp.bind(console,"Suspended",X,Y,LQ,_Q,z)):console.timeStamp("Suspended",X,Y,LQ,_Q,z))}function wl(X,Y,z,W,_,L){if(aQ&&!(Y<=X)){z=[];for(var I=0;I<W.length;I++){var j=W[I].value;z.push(["Recoverable Error",typeof j==="object"&&j!==null&&typeof j.message==="string"?String(j.message):String(j)])}X={start:X,end:Y,detail:{devtools:{color:"primary-dark",track:LQ,trackGroup:_Q,tooltipText:_?"Hydration Failed":"Recovered after Error",properties:z}}},L?L.run(performance.measure.bind(performance,"Recovered",X)):performance.measure("Recovered",X)}}function BF(X,Y,z,W){!aQ||Y<=X||(W?W.run(console.timeStamp.bind(console,"Errored",X,Y,LQ,_Q,"error")):console.timeStamp("Errored",X,Y,LQ,_Q,"error"))}function xl(X,Y,z,W){!aQ||Y<=X||(W?W.run(console.timeStamp.bind(console,z,X,Y,LQ,_Q,"secondary-light")):console.timeStamp(z,X,Y,LQ,_Q,"secondary-light"))}function LP(X,Y,z,W,_){if(aQ&&!(Y<=X)){for(var L=[],I=0;I<z.length;I++){var j=z[I].value;L.push(["Error",typeof j==="object"&&j!==null&&typeof j.message==="string"?String(j.message):String(j)])}X={start:X,end:Y,detail:{devtools:{color:"error",track:LQ,trackGroup:_Q,tooltipText:W?"Remaining Effects Errored":"Commit Errored",properties:L}}},_?_.run(performance.measure.bind(performance,"Errored",X)):performance.measure("Errored",X)}}function F5(X,Y,z){!aQ||Y<=X||(z?z.run(console.timeStamp.bind(console,"Animating",X,Y,LQ,_Q,"secondary-dark")):console.timeStamp("Animating",X,Y,LQ,_Q,"secondary-dark"))}function c7(){for(var X=M8,Y=gM=M8=0;Y<X;){var z=sY[Y];sY[Y++]=null;var W=sY[Y];sY[Y++]=null;var _=sY[Y];sY[Y++]=null;var L=sY[Y];if(sY[Y++]=null,W!==null&&_!==null){var I=W.pending;I===null?_.next=_:(_.next=I.next,I.next=_),W.pending=_}L!==0&&MP(z,_,L)}}function p7(X,Y,z,W){sY[M8++]=X,sY[M8++]=Y,sY[M8++]=z,sY[M8++]=W,gM|=W,X.lanes|=W,X=X.alternate,X!==null&&(X.lanes|=W)}function _F(X,Y,z,W){return p7(X,Y,z,W),d7(X)}function IJ(X,Y){return p7(X,null,null,Y),d7(X)}function MP(X,Y,z){X.lanes|=z;var W=X.alternate;W!==null&&(W.lanes|=z);for(var _=!1,L=X.return;L!==null;)L.childLanes|=z,W=L.alternate,W!==null&&(W.childLanes|=z),L.tag===22&&(X=L.stateNode,X===null||X._visibility&Z1||(_=!0)),X=L,L=L.return;return X.tag===3?(L=X.stateNode,_&&Y!==null&&(_=31-SJ(z),X=L.hiddenUpdates,W=X[_],W===null?X[_]=[Y]:W.push(Y),Y.lane=z|536870912),L):null}function d7(X){if(D1>$s)throw DU=D1=0,$1=MO=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");DU>Es&&(DU=0,$1=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),X.alternate===null&&(X.flags&4098)!==0&&yC(X);for(var Y=X,z=Y.return;z!==null;)Y.alternate===null&&(Y.flags&4098)!==0&&yC(X),Y=z,z=Y.return;return Y.tag===3?Y.stateNode:null}function e9(X){if(aY===null)return X;var Y=aY(X);return Y===void 0?X:Y.current}function FF(X){if(aY===null)return X;var Y=aY(X);return Y===void 0?X!==null&&X!==void 0&&typeof X.render==="function"&&(Y=e9(X.render),X.render!==Y)?(Y={$$typeof:c5,render:Y},X.displayName!==void 0&&(Y.displayName=X.displayName),Y):X:Y.current}function OP(X,Y){if(aY===null)return!1;var z=X.elementType;Y=Y.type;var W=!1,_=typeof Y==="object"&&Y!==null?Y.$$typeof:null;switch(X.tag){case 1:typeof Y==="function"&&(W=!0);break;case 0:typeof Y==="function"?W=!0:_===RY&&(W=!0);break;case 11:_===c5?W=!0:_===RY&&(W=!0);break;case 14:case 15:_===mW?W=!0:_===RY&&(W=!0);break;default:return!1}return W&&(X=aY(z),X!==void 0&&X===aY(Y))?!0:!1}function VP(X){aY!==null&&typeof WeakSet==="function"&&(O8===null&&(O8=new WeakSet),O8.add(X))}function AP(X,Y,z){do{var W=X,_=W.alternate,L=W.child,I=W.sibling,j=W.tag;W=W.type;var R=null;switch(j){case 0:case 15:case 1:R=W;break;case 11:R=W.render}if(aY===null)throw Error("Expected resolveFamily to be set during hot reload.");var D=!1;if(W=!1,R!==null&&(R=aY(R),R!==void 0&&(z.has(R)?W=!0:Y.has(R)&&(j===1?W=!0:D=!0))),O8!==null&&(O8.has(X)||_!==null&&O8.has(_))&&(W=!0),W&&(X._debugNeedsRemount=!0),W||D)_=IJ(X,2),_!==null&&HX(_,X,2);if(L===null||W||AP(L,Y,z),I===null)break;X=I}while(1)}function bl(X,Y,z,W){this.tag=X,this.key=z,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=Y,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=W,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,P$||typeof Object.preventExtensions!=="function"||Object.preventExtensions(this)}function LF(X){return X=X.prototype,!(!X||!X.isReactComponent)}function Gz(X,Y){var z=X.alternate;switch(z===null?(z=V(X.tag,Y,X.key,X.mode),z.elementType=X.elementType,z.type=X.type,z.stateNode=X.stateNode,z._debugOwner=X._debugOwner,z._debugStack=X._debugStack,z._debugTask=X._debugTask,z._debugHookTypes=X._debugHookTypes,z.alternate=X,X.alternate=z):(z.pendingProps=Y,z.type=X.type,z.flags=0,z.subtreeFlags=0,z.deletions=null,z.actualDuration=-0,z.actualStartTime=-1.1),z.flags=X.flags&65011712,z.childLanes=X.childLanes,z.lanes=X.lanes,z.child=X.child,z.memoizedProps=X.memoizedProps,z.memoizedState=X.memoizedState,z.updateQueue=X.updateQueue,Y=X.dependencies,z.dependencies=Y===null?null:{lanes:Y.lanes,firstContext:Y.firstContext,_debugThenableState:Y._debugThenableState},z.sibling=X.sibling,z.index=X.index,z.ref=X.ref,z.refCleanup=X.refCleanup,z.selfBaseDuration=X.selfBaseDuration,z.treeBaseDuration=X.treeBaseDuration,z._debugInfo=X._debugInfo,z._debugNeedsRemount=X._debugNeedsRemount,z.tag){case 0:case 15:z.type=e9(X.type);break;case 1:z.type=e9(X.type);break;case 11:z.type=FF(X.type)}return z}function IP(X,Y){X.flags&=65011714;var z=X.alternate;return z===null?(X.childLanes=0,X.lanes=Y,X.child=null,X.subtreeFlags=0,X.memoizedProps=null,X.memoizedState=null,X.updateQueue=null,X.dependencies=null,X.stateNode=null,X.selfBaseDuration=0,X.treeBaseDuration=0):(X.childLanes=z.childLanes,X.lanes=z.lanes,X.child=z.child,X.subtreeFlags=0,X.deletions=null,X.memoizedProps=z.memoizedProps,X.memoizedState=z.memoizedState,X.updateQueue=z.updateQueue,X.type=z.type,Y=z.dependencies,X.dependencies=Y===null?null:{lanes:Y.lanes,firstContext:Y.firstContext,_debugThenableState:Y._debugThenableState},X.selfBaseDuration=z.selfBaseDuration,X.treeBaseDuration=z.treeBaseDuration),X}function MF(X,Y,z,W,_,L){var I=0,j=X;if(typeof X==="function")LF(X)&&(I=1),j=e9(j);else if(typeof X==="string")I=d(),I=di(X,z,I)?26:X==="html"||X==="head"||X==="body"?27:5;else Z:switch(X){case UM:return Y=V(31,z,Y,_),Y.elementType=UM,Y.lanes=L,Y;case q8:return ZU(z.children,_,L,Y);case fW:I=8,_|=jJ,_|=bq;break;case YM:return X=z,W=_,typeof X.id!=="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof X.id),Y=V(12,X,Y,W|GQ),Y.elementType=YM,Y.lanes=L,Y.stateNode={effectDuration:0,passiveEffectDuration:0},Y;case GM:return Y=V(13,z,Y,_),Y.elementType=GM,Y.lanes=L,Y;case zM:return Y=V(19,z,Y,_),Y.elementType=zM,Y.lanes=L,Y;default:if(typeof X==="object"&&X!==null)switch(X.$$typeof){case PG:I=10;break Z;case qM:I=9;break Z;case c5:I=11,j=FF(j);break Z;case mW:I=14;break Z;case RY:I=16,j=null;break Z}if(j="",X===void 0||typeof X==="object"&&X!==null&&Object.keys(X).length===0)j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";X===null?z="null":cX(X)?z="array":X!==void 0&&X.$$typeof===TG?(z="<"+(c(X.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):z=typeof X,(I=W?GZ(W):null)&&(j+=`
|
|
77
|
+
|
|
78
|
+
Check the render method of \``+I+"`."),I=29,z=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(z+"."+j)),j=null}return Y=V(I,z,Y,_),Y.elementType=X,Y.type=j,Y.lanes=L,Y._debugOwner=W,Y}function l7(X,Y,z){return Y=MF(X.type,X.key,X.props,X._owner,Y,z),Y._debugOwner=X._owner,Y._debugStack=X._debugStack,Y._debugTask=X._debugTask,Y}function ZU(X,Y,z,W){return X=V(7,X,W,Y),X.lanes=z,X}function OF(X,Y,z){return X=V(6,X,null,Y),X.lanes=z,X}function NP(X){var Y=V(18,null,null,nZ);return Y.stateNode=X,Y}function VF(X,Y,z){return Y=V(4,X.children!==null?X.children:[],X.key,Y),Y.lanes=z,Y.stateNode={containerInfo:X.containerInfo,pendingChildren:null,implementation:X.implementation},Y}function AY(X,Y){if(typeof X==="object"&&X!==null){var z=hM.get(X);if(z!==void 0)return z;return Y={value:X,source:Y,stack:KQ(Y)},hM.set(X,Y),Y}return{value:X,source:Y,stack:KQ(Y)}}function zz(X,Y){M0(),V8[A8++]=Q1,V8[A8++]=X4,X4=X,Q1=Y}function jP(X,Y,z){M0(),rY[oY++]=Mz,rY[oY++]=Oz,rY[oY++]=_U,_U=X;var W=Mz;X=Oz;var _=32-SJ(W)-1;W&=~(1<<_),z+=1;var L=32-SJ(Y)+_;if(30<L){var I=_-_%5;L=(W&(1<<I)-1).toString(32),W>>=I,_-=I,Mz=1<<32-SJ(Y)+_|z<<_|W,Oz=L+X}else Mz=1<<L|z<<_|W,Oz=X}function AF(X){M0(),X.return!==null&&(zz(X,1),jP(X,1,0))}function IF(X){for(;X===X4;)X4=V8[--A8],V8[A8]=null,Q1=V8[--A8],V8[A8]=null;for(;X===_U;)_U=rY[--oY],rY[oY]=null,Oz=rY[--oY],rY[oY]=null,Mz=rY[--oY],rY[oY]=null}function TP(){return M0(),_U!==null?{id:Mz,overflow:Oz}:null}function PP(X,Y){M0(),rY[oY++]=Mz,rY[oY++]=Oz,rY[oY++]=_U,Mz=Y.id,Oz=Y.overflow,_U=X}function M0(){AQ||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function QU(X,Y){if(X.return===null){if($Y===null)$Y={fiber:X,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:Y};else{if($Y.fiber!==X)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");$Y.distanceFromLeaf>Y&&($Y.distanceFromLeaf=Y)}return $Y}var z=QU(X.return,Y+1).children;if(0<z.length&&z[z.length-1].fiber===X)return z=z[z.length-1],z.distanceFromLeaf>Y&&(z.distanceFromLeaf=Y),z;return Y={fiber:X,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:Y},z.push(Y),Y}function RP(){AQ&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function i7(X,Y){kG||(X=QU(X,0),X.serverProps=null,Y!==null&&(Y=JD(Y),X.serverTail.push(Y)))}function O0(X){var Y=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,z="",W=$Y;throw W!==null&&($Y=null,z=qF(W)),L5(AY(Error("Hydration failed because the server rendered "+(Y?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
79
|
+
|
|
80
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
81
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
82
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
83
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
84
|
+
- Invalid HTML tag nesting.
|
|
85
|
+
|
|
86
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
87
|
+
|
|
88
|
+
https://react.dev/link/hydration-mismatch`+z),X)),uM}function CP(X){var{stateNode:Y,type:z,memoizedProps:W}=X;switch(Y[qJ]=X,Y[yJ]=W,fL(z,W),z){case"dialog":jQ("cancel",Y),jQ("close",Y);break;case"iframe":case"object":case"embed":jQ("load",Y);break;case"video":case"audio":for(z=0;z<E1.length;z++)jQ(E1[z],Y);break;case"source":jQ("error",Y);break;case"img":case"image":case"link":jQ("error",Y),jQ("load",Y);break;case"details":jQ("toggle",Y);break;case"input":L0("input",W),jQ("invalid",Y),yT(Y,W),wT(Y,W.value,W.defaultValue,W.checked,W.defaultChecked,W.type,W.name,!0);break;case"option":xT(Y,W);break;case"select":L0("select",W),jQ("invalid",Y),vT(Y,W);break;case"textarea":L0("textarea",W),jQ("invalid",Y),gT(Y,W),uT(Y,W.value,W.defaultValue,W.children)}z=W.children,typeof z!=="string"&&typeof z!=="number"&&typeof z!=="bigint"||Y.textContent===""+z||W.suppressHydrationWarning===!0||pC(Y.textContent,z)?(W.popover!=null&&(jQ("beforetoggle",Y),jQ("toggle",Y)),W.onScroll!=null&&jQ("scroll",Y),W.onScrollEnd!=null&&jQ("scrollend",Y),W.onClick!=null&&(Y.onclick=qz),Y=!0):Y=!1,Y||O0(X,!0)}function DP(X){for(GJ=X.return;GJ;)switch(GJ.tag){case 5:case 31:case 13:tY=!1;return;case 27:case 3:tY=!0;return;default:GJ=GJ.return}}function p6(X){if(X!==GJ)return!1;if(!AQ)return DP(X),AQ=!0,!1;var Y=X.tag,z;if(z=Y!==3&&Y!==27){if(z=Y===5)z=X.type,z=!(z!=="form"&&z!=="button")||lL(X.type,X.memoizedProps);z=!z}if(z&&rQ){for(z=rQ;z;){var W=QU(X,0),_=JD(z);W.serverTail.push(_),z=_.type==="Suspense"?aL(z):PY(z.nextSibling)}O0(X)}if(DP(X),Y===13){if(X=X.memoizedState,X=X!==null?X.dehydrated:null,!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");rQ=aL(X)}else if(Y===31){if(X=X.memoizedState,X=X!==null?X.dehydrated:null,!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");rQ=aL(X)}else Y===27?(Y=rQ,D0(X.type)?(X=$O,$O=null,rQ=X):rQ=Y):rQ=GJ?PY(X.stateNode.nextSibling):null;return!0}function XU(){rQ=GJ=null,kG=AQ=!1}function NF(){var X=v0;return X!==null&&(hJ===null?hJ=X:hJ.push.apply(hJ,X),v0=null),X}function L5(X){v0===null?v0=[X]:v0.push(X)}function jF(){var X=$Y;if(X!==null){$Y=null;for(var Y=qF(X);0<X.children.length;)X=X.children[0];BZ(X.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
|
89
|
+
|
|
90
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
91
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
92
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
93
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
94
|
+
- Invalid HTML tag nesting.
|
|
95
|
+
|
|
96
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
97
|
+
|
|
98
|
+
%s%s`,"https://react.dev/link/hydration-mismatch",Y)})}}function n7(){I8=J4=null,N8=!1}function V0(X,Y,z){KZ(fM,Y._currentValue,X),Y._currentValue=z,KZ(mM,Y._currentRenderer,X),Y._currentRenderer!==void 0&&Y._currentRenderer!==null&&Y._currentRenderer!==C$&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),Y._currentRenderer=C$}function Uz(X,Y){X._currentValue=fM.current;var z=mM.current;HZ(mM,Y),X._currentRenderer=z,HZ(fM,Y)}function TF(X,Y,z){for(;X!==null;){var W=X.alternate;if((X.childLanes&Y)!==Y?(X.childLanes|=Y,W!==null&&(W.childLanes|=Y)):W!==null&&(W.childLanes&Y)!==Y&&(W.childLanes|=Y),X===z)break;X=X.return}X!==z&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function PF(X,Y,z,W){var _=X.child;_!==null&&(_.return=X);for(;_!==null;){var L=_.dependencies;if(L!==null){var I=_.child;L=L.firstContext;Z:for(;L!==null;){var j=L;L=_;for(var R=0;R<Y.length;R++)if(j.context===Y[R]){L.lanes|=z,j=L.alternate,j!==null&&(j.lanes|=z),TF(L.return,z,X),W||(I=null);break Z}L=j.next}}else if(_.tag===18){if(I=_.return,I===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");I.lanes|=z,L=I.alternate,L!==null&&(L.lanes|=z),TF(I,z,X),I=null}else I=_.child;if(I!==null)I.return=_;else for(I=_;I!==null;){if(I===X){I=null;break}if(_=I.sibling,_!==null){_.return=I.return,I=_;break}I=I.return}_=I}}function d6(X,Y,z,W){X=null;for(var _=Y,L=!1;_!==null;){if(!L){if((_.flags&524288)!==0)L=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var I=_.alternate;if(I===null)throw Error("Should have a current fiber. This is a bug in React.");if(I=I.memoizedProps,I!==null){var j=_.type;xJ(_.pendingProps.value,I.value)||(X!==null?X.push(j):X=[j])}}else if(_===cW.current){if(I=_.alternate,I===null)throw Error("Should have a current fiber. This is a bug in React.");I.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(X!==null?X.push(x1):X=[x1])}_=_.return}X!==null&&PF(Y,X,z,W),Y.flags|=262144}function s7(X){for(X=X.firstContext;X!==null;){if(!xJ(X.context._currentValue,X.memoizedValue))return!0;X=X.next}return!1}function JU(X){J4=X,I8=null,X=X.dependencies,X!==null&&(X.firstContext=null)}function QX(X){return N8&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),$P(J4,X)}function a7(X,Y){return J4===null&&JU(X),$P(X,Y)}function $P(X,Y){var z=Y._currentValue;if(Y={context:Y,memoizedValue:z,next:null},I8===null){if(X===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");I8=Y,X.dependencies={lanes:0,firstContext:Y,_debugThenableState:null},X.flags|=524288}else I8=I8.next=Y;return z}function RF(){return{controller:new Ms,data:new Map,refCount:0}}function YU(X){X.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),X.refCount++}function M5(X){X.refCount--,0>X.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),X.refCount===0&&Os(Vs,function(){X.controller.abort()})}function HG(X,Y,z){if((X&127)!==0)0>SG&&(SG=yX(),J1=Y4(Y),cM=Y,z!=null&&(pM=s(z)),(CQ&(dX|SY))!==oX&&(WX=!0,u0=X1),X=g5(),Y=v5(),X!==j8||Y!==Y1?j8=-1.1:Y!==null&&(u0=X1),LU=X,Y1=Y);else if((X&4194048)!==0&&0>eY&&(eY=yX(),q1=Y4(Y),D$=Y,z!=null&&($$=s(z)),0>Iz)){if(X=g5(),Y=v5(),X!==m0||Y!==MU)m0=-1.1;f0=X,MU=Y}}function vl(X){if(0>SG){SG=yX(),J1=X._debugTask!=null?X._debugTask:null,(CQ&(dX|SY))!==oX&&(u0=X1);var Y=g5(),z=v5();Y!==j8||z!==Y1?j8=-1.1:z!==null&&(u0=X1),LU=Y,Y1=z}if(0>eY&&(eY=yX(),q1=X._debugTask!=null?X._debugTask:null,0>Iz)){if(X=g5(),Y=v5(),X!==m0||Y!==MU)m0=-1.1;f0=X,MU=Y}}function Kz(){var X=FU;return FU=0,X}function r7(X){var Y=FU;return FU=X,Y}function O5(X){var Y=FU;return FU+=X,Y}function o7(){iZ=dZ=-1.1}function IY(){var X=dZ;return dZ=-1.1,X}function NY(X){0<=X&&(dZ=X)}function WG(){var X=zX;return zX=-0,X}function BG(X){0<=X&&(zX=X)}function _G(){var X=XX;return XX=null,X}function FG(){var X=WX;return WX=!1,X}function CF(X){bJ=yX(),0>X.actualStartTime&&(X.actualStartTime=bJ)}function DF(X){if(0<=bJ){var Y=yX()-bJ;X.actualDuration+=Y,X.selfBaseDuration=Y,bJ=-1}}function EP(X){if(0<=bJ){var Y=yX()-bJ;X.actualDuration+=Y,bJ=-1}}function LG(){if(0<=bJ){var X=yX(),Y=X-bJ;bJ=-1,FU+=Y,zX+=Y,iZ=X}}function kP(X){XX===null&&(XX=[]),XX.push(X),Az===null&&(Az=[]),Az.push(X)}function MG(){bJ=yX(),0>dZ&&(dZ=bJ)}function V5(X){for(var Y=X.child;Y;)X.actualDuration+=Y.actualDuration,Y=Y.sibling}function gl(X,Y){if(z1===null){var z=z1=[];lM=0,OU=vL(),T8={status:"pending",value:void 0,then:function(W){z.push(W)}}}return lM++,Y.then(SP,SP),Y}function SP(){if(--lM===0&&(-1<eY||(Iz=-1.1),z1!==null)){T8!==null&&(T8.status="fulfilled");var X=z1;z1=null,OU=0,T8=null;for(var Y=0;Y<X.length;Y++)(0,X[Y])()}}function hl(X,Y){var z=[],W={status:"pending",value:null,reason:null,then:function(_){z.push(_)}};return X.then(function(){W.status="fulfilled",W.value=Y;for(var _=0;_<z.length;_++)(0,z[_])(Y)},function(_){W.status="rejected",W.reason=_;for(_=0;_<z.length;_++)(0,z[_])(void 0)}),W}function $F(){var X=VU.current;return X!==null?X:pQ.pooledCache}function t7(X,Y){Y===null?KZ(VU,VU.current,X):KZ(VU,Y.pool,X)}function yP(){var X=$F();return X===null?null:{parent:SX._currentValue,pool:X}}function wP(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function xP(X){return X=X.status,X==="fulfilled"||X==="rejected"}function bP(X,Y,z){XZ.actQueue!==null&&(XZ.didUsePromise=!0);var W=X.thenables;if(z=W[z],z===void 0?W.push(Y):z!==Y&&(X.didWarnAboutUncachedPromise||(X.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),Y.then(qz,qz),Y=z),Y._debugInfo===void 0){X=performance.now(),W=Y.displayName;var _={name:typeof W==="string"?W:"Promise",start:X,end:X,value:Y};Y._debugInfo=[{awaited:_}],Y.status!=="fulfilled"&&Y.status!=="rejected"&&(X=function(){_.end=performance.now()},Y.then(X,X))}switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw X=Y.reason,gP(X),X;default:if(typeof Y.status==="string")Y.then(qz,qz);else{if(X=pQ,X!==null&&100<X.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");X=Y,X.status="pending",X.then(function(L){if(Y.status==="pending"){var I=Y;I.status="fulfilled",I.value=L}},function(L){if(Y.status==="pending"){var I=Y;I.status="rejected",I.reason=L}})}switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw X=Y.reason,gP(X),X}throw IU=Y,F1=!0,P8}}function A0(X){try{return js(X)}catch(Y){if(Y!==null&&typeof Y==="object"&&typeof Y.then==="function")throw IU=Y,F1=!0,P8;throw Y}}function vP(){if(IU===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var X=IU;return IU=null,F1=!1,X}function gP(X){if(X===P8||X===B4)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function XJ(X){var Y=zQ;return X!=null&&(zQ=Y===null?X:Y.concat(X)),Y}function EF(){var X=zQ;if(X!=null){for(var Y=X.length-1;0<=Y;Y--)if(X[Y].name!=null){var z=X[Y].debugTask;if(z!=null)return z}}return null}function e7(X,Y,z){for(var W=Object.keys(X.props),_=0;_<W.length;_++){var L=W[_];if(L!=="children"&&L!=="key"){Y===null&&(Y=l7(X,z.mode,0),Y._debugInfo=zQ,Y.return=z),BZ(Y,function(I){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",I)},L);break}}}function ZW(X){var Y=L1;return L1+=1,R8===null&&(R8=wP()),bP(R8,X,Y)}function A5(X,Y){Y=Y.props.ref,X.ref=Y!==void 0?Y:null}function hP(X,Y){if(Y.$$typeof===Zn)throw Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
99
|
+
- Multiple copies of the "react" package is used.
|
|
100
|
+
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
101
|
+
- A compiler tries to "inline" JSX instead of using the runtime.`);throw X=Object.prototype.toString.call(Y),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}function QW(X,Y){var z=EF();z!==null?z.run(hP.bind(null,X,Y)):hP(X,Y)}function uP(X,Y){var z=s(X)||"Component";s$[z]||(s$[z]=!0,Y=Y.displayName||Y.name||"Component",X.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
102
|
+
root.render(%s)`,Y,Y,Y):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
103
|
+
<%s>{%s}</%s>`,Y,Y,z,Y,z))}function XW(X,Y){var z=EF();z!==null?z.run(uP.bind(null,X,Y)):uP(X,Y)}function fP(X,Y){var z=s(X)||"Component";a$[z]||(a$[z]=!0,Y=String(Y),X.tag===3?console.error(`Symbols are not valid as a React child.
|
|
104
|
+
root.render(%s)`,Y):console.error(`Symbols are not valid as a React child.
|
|
105
|
+
<%s>%s</%s>`,z,Y,z))}function JW(X,Y){var z=EF();z!==null?z.run(fP.bind(null,X,Y)):fP(X,Y)}function mP(X){function Y(b,h){if(X){var m=b.deletions;m===null?(b.deletions=[h],b.flags|=16):m.push(h)}}function z(b,h){if(!X)return null;for(;h!==null;)Y(b,h),h=h.sibling;return null}function W(b){for(var h=new Map;b!==null;)b.key!==null?h.set(b.key,b):h.set(b.index,b),b=b.sibling;return h}function _(b,h){return b=Gz(b,h),b.index=0,b.sibling=null,b}function L(b,h,m){if(b.index=m,!X)return b.flags|=1048576,h;if(m=b.alternate,m!==null)return m=m.index,m<h?(b.flags|=67108866,h):m;return b.flags|=67108866,h}function I(b){return X&&b.alternate===null&&(b.flags|=67108866),b}function j(b,h,m,qZ){if(h===null||h.tag!==6)return h=OF(m,b.mode,qZ),h.return=b,h._debugOwner=b,h._debugTask=b._debugTask,h._debugInfo=zQ,h;return h=_(h,m),h.return=b,h._debugInfo=zQ,h}function R(b,h,m,qZ){var jZ=m.type;if(jZ===q8)return h=p(b,h,m.props.children,qZ,m.key),e7(m,h,b),h;if(h!==null&&(h.elementType===jZ||OP(h,m)||typeof jZ==="object"&&jZ!==null&&jZ.$$typeof===RY&&A0(jZ)===h.type))return h=_(h,m.props),A5(h,m),h.return=b,h._debugOwner=m._owner,h._debugInfo=zQ,h;return h=l7(m,b.mode,qZ),A5(h,m),h.return=b,h._debugInfo=zQ,h}function D(b,h,m,qZ){if(h===null||h.tag!==4||h.stateNode.containerInfo!==m.containerInfo||h.stateNode.implementation!==m.implementation)return h=VF(m,b.mode,qZ),h.return=b,h._debugInfo=zQ,h;return h=_(h,m.children||[]),h.return=b,h._debugInfo=zQ,h}function p(b,h,m,qZ,jZ){if(h===null||h.tag!==7)return h=ZU(m,b.mode,qZ,jZ),h.return=b,h._debugOwner=b,h._debugTask=b._debugTask,h._debugInfo=zQ,h;return h=_(h,m),h.return=b,h._debugInfo=zQ,h}function l(b,h,m){if(typeof h==="string"&&h!==""||typeof h==="number"||typeof h==="bigint")return h=OF(""+h,b.mode,m),h.return=b,h._debugOwner=b,h._debugTask=b._debugTask,h._debugInfo=zQ,h;if(typeof h==="object"&&h!==null){switch(h.$$typeof){case TG:return m=l7(h,b.mode,m),A5(m,h),m.return=b,b=XJ(h._debugInfo),m._debugInfo=zQ,zQ=b,m;case Y8:return h=VF(h,b.mode,m),h.return=b,h._debugInfo=zQ,h;case RY:var qZ=XJ(h._debugInfo);return h=A0(h),b=l(b,h,m),zQ=qZ,b}if(cX(h)||a(h))return m=ZU(h,b.mode,m,null),m.return=b,m._debugOwner=b,m._debugTask=b._debugTask,b=XJ(h._debugInfo),m._debugInfo=zQ,zQ=b,m;if(typeof h.then==="function")return qZ=XJ(h._debugInfo),b=l(b,ZW(h),m),zQ=qZ,b;if(h.$$typeof===PG)return l(b,a7(b,h),m);QW(b,h)}return typeof h==="function"&&XW(b,h),typeof h==="symbol"&&JW(b,h),null}function g(b,h,m,qZ){var jZ=h!==null?h.key:null;if(typeof m==="string"&&m!==""||typeof m==="number"||typeof m==="bigint")return jZ!==null?null:j(b,h,""+m,qZ);if(typeof m==="object"&&m!==null){switch(m.$$typeof){case TG:return m.key===jZ?(jZ=XJ(m._debugInfo),b=R(b,h,m,qZ),zQ=jZ,b):null;case Y8:return m.key===jZ?D(b,h,m,qZ):null;case RY:return jZ=XJ(m._debugInfo),m=A0(m),b=g(b,h,m,qZ),zQ=jZ,b}if(cX(m)||a(m)){if(jZ!==null)return null;return jZ=XJ(m._debugInfo),b=p(b,h,m,qZ,null),zQ=jZ,b}if(typeof m.then==="function")return jZ=XJ(m._debugInfo),b=g(b,h,ZW(m),qZ),zQ=jZ,b;if(m.$$typeof===PG)return g(b,h,a7(b,m),qZ);QW(b,m)}return typeof m==="function"&&XW(b,m),typeof m==="symbol"&&JW(b,m),null}function ZZ(b,h,m,qZ,jZ){if(typeof qZ==="string"&&qZ!==""||typeof qZ==="number"||typeof qZ==="bigint")return b=b.get(m)||null,j(h,b,""+qZ,jZ);if(typeof qZ==="object"&&qZ!==null){switch(qZ.$$typeof){case TG:return m=b.get(qZ.key===null?m:qZ.key)||null,b=XJ(qZ._debugInfo),h=R(h,m,qZ,jZ),zQ=b,h;case Y8:return b=b.get(qZ.key===null?m:qZ.key)||null,D(h,b,qZ,jZ);case RY:var oZ=XJ(qZ._debugInfo);return qZ=A0(qZ),h=ZZ(b,h,m,qZ,jZ),zQ=oZ,h}if(cX(qZ)||a(qZ))return m=b.get(m)||null,b=XJ(qZ._debugInfo),h=p(h,m,qZ,jZ,null),zQ=b,h;if(typeof qZ.then==="function")return oZ=XJ(qZ._debugInfo),h=ZZ(b,h,m,ZW(qZ),jZ),zQ=oZ,h;if(qZ.$$typeof===PG)return ZZ(b,h,m,a7(h,qZ),jZ);QW(h,qZ)}return typeof qZ==="function"&&XW(h,qZ),typeof qZ==="symbol"&&JW(h,qZ),null}function VZ(b,h,m,qZ){if(typeof m!=="object"||m===null)return qZ;switch(m.$$typeof){case TG:case Y8:M(b,h,m);var jZ=m.key;if(typeof jZ!=="string")break;if(qZ===null){qZ=new Set,qZ.add(jZ);break}if(!qZ.has(jZ)){qZ.add(jZ);break}BZ(h,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",jZ)});break;case RY:m=A0(m),VZ(b,h,m,qZ)}return qZ}function RZ(b,h,m,qZ){for(var jZ=null,oZ=null,cZ=null,hZ=h,JQ=h=0,oQ=null;hZ!==null&&JQ<m.length;JQ++){hZ.index>JQ?(oQ=hZ,hZ=null):oQ=hZ.sibling;var DX=g(b,hZ,m[JQ],qZ);if(DX===null){hZ===null&&(hZ=oQ);break}jZ=VZ(b,DX,m[JQ],jZ),X&&hZ&&DX.alternate===null&&Y(b,hZ),h=L(DX,h,JQ),cZ===null?oZ=DX:cZ.sibling=DX,cZ=DX,hZ=oQ}if(JQ===m.length)return z(b,hZ),AQ&&zz(b,JQ),oZ;if(hZ===null){for(;JQ<m.length;JQ++)hZ=l(b,m[JQ],qZ),hZ!==null&&(jZ=VZ(b,hZ,m[JQ],jZ),h=L(hZ,h,JQ),cZ===null?oZ=hZ:cZ.sibling=hZ,cZ=hZ);return AQ&&zz(b,JQ),oZ}for(hZ=W(hZ);JQ<m.length;JQ++)oQ=ZZ(hZ,b,JQ,m[JQ],qZ),oQ!==null&&(jZ=VZ(b,oQ,m[JQ],jZ),X&&oQ.alternate!==null&&hZ.delete(oQ.key===null?JQ:oQ.key),h=L(oQ,h,JQ),cZ===null?oZ=oQ:cZ.sibling=oQ,cZ=oQ);return X&&hZ.forEach(function(Ez){return Y(b,Ez)}),AQ&&zz(b,JQ),oZ}function nQ(b,h,m,qZ){if(m==null)throw Error("An iterable object provided no iterator.");for(var jZ=null,oZ=null,cZ=h,hZ=h=0,JQ=null,oQ=null,DX=m.next();cZ!==null&&!DX.done;hZ++,DX=m.next()){cZ.index>hZ?(JQ=cZ,cZ=null):JQ=cZ.sibling;var Ez=g(b,cZ,DX.value,qZ);if(Ez===null){cZ===null&&(cZ=JQ);break}oQ=VZ(b,Ez,DX.value,oQ),X&&cZ&&Ez.alternate===null&&Y(b,cZ),h=L(Ez,h,hZ),oZ===null?jZ=Ez:oZ.sibling=Ez,oZ=Ez,cZ=JQ}if(DX.done)return z(b,cZ),AQ&&zz(b,hZ),jZ;if(cZ===null){for(;!DX.done;hZ++,DX=m.next())cZ=l(b,DX.value,qZ),cZ!==null&&(oQ=VZ(b,cZ,DX.value,oQ),h=L(cZ,h,hZ),oZ===null?jZ=cZ:oZ.sibling=cZ,oZ=cZ);return AQ&&zz(b,hZ),jZ}for(cZ=W(cZ);!DX.done;hZ++,DX=m.next())JQ=ZZ(cZ,b,hZ,DX.value,qZ),JQ!==null&&(oQ=VZ(b,JQ,DX.value,oQ),X&&JQ.alternate!==null&&cZ.delete(JQ.key===null?hZ:JQ.key),h=L(JQ,h,hZ),oZ===null?jZ=JQ:oZ.sibling=JQ,oZ=JQ);return X&&cZ.forEach(function(is){return Y(b,is)}),AQ&&zz(b,hZ),jZ}function TQ(b,h,m,qZ){if(typeof m==="object"&&m!==null&&m.type===q8&&m.key===null&&(e7(m,null,b),m=m.props.children),typeof m==="object"&&m!==null){switch(m.$$typeof){case TG:var jZ=XJ(m._debugInfo);Z:{for(var oZ=m.key;h!==null;){if(h.key===oZ){if(oZ=m.type,oZ===q8){if(h.tag===7){z(b,h.sibling),qZ=_(h,m.props.children),qZ.return=b,qZ._debugOwner=m._owner,qZ._debugInfo=zQ,e7(m,qZ,b),b=qZ;break Z}}else if(h.elementType===oZ||OP(h,m)||typeof oZ==="object"&&oZ!==null&&oZ.$$typeof===RY&&A0(oZ)===h.type){z(b,h.sibling),qZ=_(h,m.props),A5(qZ,m),qZ.return=b,qZ._debugOwner=m._owner,qZ._debugInfo=zQ,b=qZ;break Z}z(b,h);break}else Y(b,h);h=h.sibling}m.type===q8?(qZ=ZU(m.props.children,b.mode,qZ,m.key),qZ.return=b,qZ._debugOwner=b,qZ._debugTask=b._debugTask,qZ._debugInfo=zQ,e7(m,qZ,b),b=qZ):(qZ=l7(m,b.mode,qZ),A5(qZ,m),qZ.return=b,qZ._debugInfo=zQ,b=qZ)}return b=I(b),zQ=jZ,b;case Y8:Z:{jZ=m;for(m=jZ.key;h!==null;){if(h.key===m)if(h.tag===4&&h.stateNode.containerInfo===jZ.containerInfo&&h.stateNode.implementation===jZ.implementation){z(b,h.sibling),qZ=_(h,jZ.children||[]),qZ.return=b,b=qZ;break Z}else{z(b,h);break}else Y(b,h);h=h.sibling}qZ=VF(jZ,b.mode,qZ),qZ.return=b,b=qZ}return I(b);case RY:return jZ=XJ(m._debugInfo),m=A0(m),b=TQ(b,h,m,qZ),zQ=jZ,b}if(cX(m))return jZ=XJ(m._debugInfo),b=RZ(b,h,m,qZ),zQ=jZ,b;if(a(m)){if(jZ=XJ(m._debugInfo),oZ=a(m),typeof oZ!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var cZ=oZ.call(m);if(cZ===m){if(b.tag!==0||Object.prototype.toString.call(b.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(cZ)!=="[object Generator]")i$||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),i$=!0}else m.entries!==oZ||aM||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),aM=!0);return b=nQ(b,h,cZ,qZ),zQ=jZ,b}if(typeof m.then==="function")return jZ=XJ(m._debugInfo),b=TQ(b,h,ZW(m),qZ),zQ=jZ,b;if(m.$$typeof===PG)return TQ(b,h,a7(b,m),qZ);QW(b,m)}if(typeof m==="string"&&m!==""||typeof m==="number"||typeof m==="bigint")return jZ=""+m,h!==null&&h.tag===6?(z(b,h.sibling),qZ=_(h,jZ),qZ.return=b,b=qZ):(z(b,h),qZ=OF(jZ,b.mode,qZ),qZ.return=b,qZ._debugOwner=b,qZ._debugTask=b._debugTask,qZ._debugInfo=zQ,b=qZ),I(b);return typeof m==="function"&&XW(b,m),typeof m==="symbol"&&JW(b,m),z(b,h)}return function(b,h,m,qZ){var jZ=zQ;zQ=null;try{L1=0;var oZ=TQ(b,h,m,qZ);return R8=null,oZ}catch(oQ){if(oQ===P8||oQ===B4)throw oQ;var cZ=V(29,oQ,null,b.mode);cZ.lanes=qZ,cZ.return=b;var hZ=cZ._debugInfo=zQ;if(cZ._debugOwner=b._debugOwner,cZ._debugTask=b._debugTask,hZ!=null){for(var JQ=hZ.length-1;0<=JQ;JQ--)if(typeof hZ[JQ].stack==="string"){cZ._debugOwner=hZ[JQ],cZ._debugTask=hZ[JQ].debugTask;break}}return cZ}finally{zQ=jZ}}}function cP(X,Y){var z=cX(X);return X=!z&&typeof a(X)==="function",z||X?(z=z?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",z,Y,z),!1):!0}function kF(X){X.updateQueue={baseState:X.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function SF(X,Y){X=X.updateQueue,Y.updateQueue===X&&(Y.updateQueue={baseState:X.baseState,firstBaseUpdate:X.firstBaseUpdate,lastBaseUpdate:X.lastBaseUpdate,shared:X.shared,callbacks:null})}function I0(X){return{lane:X,tag:o$,payload:null,callback:null,next:null}}function N0(X,Y,z){var W=X.updateQueue;if(W===null)return null;if(W=W.shared,oM===W&&!ZE){var _=s(X);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
106
|
+
|
|
107
|
+
Please update the following component: %s`,_),ZE=!0}if((CQ&dX)!==oX)return _=W.pending,_===null?Y.next=Y:(Y.next=_.next,_.next=Y),W.pending=Y,Y=d7(X),MP(X,null,z),Y;return p7(X,W,Y,z),d7(X)}function I5(X,Y,z){if(Y=Y.updateQueue,Y!==null&&(Y=Y.shared,(z&4194048)!==0)){var W=Y.lanes;W&=X.pendingLanes,z|=W,Y.lanes=z,n9(X,z)}}function YW(X,Y){var{updateQueue:z,alternate:W}=X;if(W!==null&&(W=W.updateQueue,z===W)){var _=null,L=null;if(z=z.firstBaseUpdate,z!==null){do{var I={lane:z.lane,tag:z.tag,payload:z.payload,callback:null,next:null};L===null?_=L=I:L=L.next=I,z=z.next}while(z!==null);L===null?_=L=Y:L=L.next=Y}else _=L=Y;z={baseState:W.baseState,firstBaseUpdate:_,lastBaseUpdate:L,shared:W.shared,callbacks:W.callbacks},X.updateQueue=z;return}X=z.lastBaseUpdate,X===null?z.firstBaseUpdate=Y:X.next=Y,z.lastBaseUpdate=Y}function N5(){if(tM){var X=T8;if(X!==null)throw X}}function j5(X,Y,z,W){tM=!1;var _=X.updateQueue;c0=!1,oM=_.shared;var{firstBaseUpdate:L,lastBaseUpdate:I}=_,j=_.shared.pending;if(j!==null){_.shared.pending=null;var R=j,D=R.next;R.next=null,I===null?L=D:I.next=D,I=R;var p=X.alternate;p!==null&&(p=p.updateQueue,j=p.lastBaseUpdate,j!==I&&(j===null?p.firstBaseUpdate=D:j.next=D,p.lastBaseUpdate=R))}if(L!==null){var l=_.baseState;I=0,p=D=R=null,j=L;do{var g=j.lane&-536870913,ZZ=g!==j.lane;if(ZZ?(UQ&g)===g:(W&g)===g){g!==0&&g===OU&&(tM=!0),p!==null&&(p=p.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});Z:{g=X;var VZ=j,RZ=Y,nQ=z;switch(VZ.tag){case t$:if(VZ=VZ.payload,typeof VZ==="function"){N8=!0;var TQ=VZ.call(nQ,l,RZ);if(g.mode&jJ){lQ(!0);try{VZ.call(nQ,l,RZ)}finally{lQ(!1)}}N8=!1,l=TQ;break Z}l=VZ;break Z;case rM:g.flags=g.flags&-65537|128;case o$:if(TQ=VZ.payload,typeof TQ==="function"){if(N8=!0,VZ=TQ.call(nQ,l,RZ),g.mode&jJ){lQ(!0);try{TQ.call(nQ,l,RZ)}finally{lQ(!1)}}N8=!1}else VZ=TQ;if(VZ===null||VZ===void 0)break Z;l=BQ({},l,VZ);break Z;case e$:c0=!0}}g=j.callback,g!==null&&(X.flags|=64,ZZ&&(X.flags|=8192),ZZ=_.callbacks,ZZ===null?_.callbacks=[g]:ZZ.push(g))}else ZZ={lane:g,tag:j.tag,payload:j.payload,callback:j.callback,next:null},p===null?(D=p=ZZ,R=l):p=p.next=ZZ,I|=g;if(j=j.next,j===null)if(j=_.shared.pending,j===null)break;else ZZ=j,j=ZZ.next,ZZ.next=null,_.lastBaseUpdate=ZZ,_.shared.pending=null}while(1);p===null&&(R=l),_.baseState=R,_.firstBaseUpdate=D,_.lastBaseUpdate=p,L===null&&(_.shared.lanes=0),l0|=I,X.lanes=I,X.memoizedState=l}oM=null}function pP(X,Y){if(typeof X!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+X);X.call(Y)}function ul(X,Y){var z=X.shared.hiddenCallbacks;if(z!==null)for(X.shared.hiddenCallbacks=null,X=0;X<z.length;X++)pP(z[X],Y)}function dP(X,Y){var z=X.callbacks;if(z!==null)for(X.callbacks=null,X=0;X<z.length;X++)pP(z[X],Y)}function lP(X,Y){var z=xG;KZ(F4,z,X),KZ(C8,Y,X),xG=z|Y.baseLanes}function yF(X){KZ(F4,xG,X),KZ(C8,C8.current,X)}function wF(X){xG=F4.current,HZ(C8,X),HZ(F4,X)}function j0(X){var Y=X.alternate;KZ(CX,CX.current&D8,X),KZ(EY,X,X),Zq===null&&(Y===null||C8.current!==null?Zq=X:Y.memoizedState!==null&&(Zq=X))}function xF(X){KZ(CX,CX.current,X),KZ(EY,X,X),Zq===null&&(Zq=X)}function iP(X){X.tag===22?(KZ(CX,CX.current,X),KZ(EY,X,X),Zq===null&&(Zq=X)):T0(X)}function T0(X){KZ(CX,CX.current,X),KZ(EY,EY.current,X)}function jY(X){HZ(EY,X),Zq===X&&(Zq=null),HZ(CX,X)}function qW(X){for(var Y=X;Y!==null;){if(Y.tag===13){var z=Y.memoizedState;if(z!==null&&(z=z.dehydrated,z===null||nL(z)||sL(z)))return Y}else if(Y.tag===19&&(Y.memoizedProps.revealOrder==="forwards"||Y.memoizedProps.revealOrder==="backwards"||Y.memoizedProps.revealOrder==="unstable_legacy-backwards"||Y.memoizedProps.revealOrder==="together")){if((Y.flags&128)!==0)return Y}else if(Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===X)break;for(;Y.sibling===null;){if(Y.return===null||Y.return===X)return null;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}return null}function WQ(){var X=QZ;Xq===null?Xq=[X]:Xq.push(X)}function WZ(){var X=QZ;if(Xq!==null&&(Pz++,Xq[Pz]!==X)){var Y=s(rZ);if(!QE.has(Y)&&(QE.add(Y),Xq!==null)){for(var z="",W=0;W<=Pz;W++){var _=Xq[W],L=W===Pz?X:_;for(_=W+1+". "+_;30>_.length;)_+=" ";_+=L+`
|
|
108
|
+
`,z+=_}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
|
|
109
|
+
|
|
110
|
+
Previous render Next render
|
|
111
|
+
------------------------------------------------------
|
|
112
|
+
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
113
|
+
`,Y,z)}}}function l6(X){X===void 0||X===null||cX(X)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",QZ,typeof X)}function GW(){var X=s(rZ);JE.has(X)||(JE.add(X),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",X))}function MX(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
114
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
115
|
+
2. You might be breaking the Rules of Hooks
|
|
116
|
+
3. You might have more than one copy of React in the same app
|
|
117
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function bF(X,Y){if(V1)return!1;if(Y===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",QZ),!1;X.length!==Y.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
118
|
+
|
|
119
|
+
Previous: %s
|
|
120
|
+
Incoming: %s`,QZ,"["+Y.join(", ")+"]","["+X.join(", ")+"]");for(var z=0;z<Y.length&&z<X.length;z++)if(!xJ(X[z],Y[z]))return!1;return!0}function vF(X,Y,z,W,_,L){if(jz=L,rZ=Y,Xq=X!==null?X._debugHookTypes:null,Pz=-1,V1=X!==null&&X.type!==Y.type,Object.prototype.toString.call(z)==="[object AsyncFunction]"||Object.prototype.toString.call(z)==="[object AsyncGeneratorFunction]")L=s(rZ),eM.has(L)||(eM.add(L),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",L===null?"An unknown Component":"<"+L+">"));Y.memoizedState=null,Y.updateQueue=null,Y.lanes=0,XZ.H=X!==null&&X.memoizedState!==null?QO:Xq!==null?YE:ZO,jU=L=(Y.mode&jJ)!==nZ;var I=iM(z,W,_);if(jU=!1,E8&&(I=gF(Y,z,W,_)),L){lQ(!0);try{I=gF(Y,z,W,_)}finally{lQ(!1)}}return nP(X,Y),I}function nP(X,Y){Y._debugHookTypes=Xq,Y.dependencies===null?Tz!==null&&(Y.dependencies={lanes:0,firstContext:null,_debugThenableState:Tz}):Y.dependencies._debugThenableState=Tz,XZ.H=A1;var z=cQ!==null&&cQ.next!==null;if(jz=0,Xq=QZ=wX=cQ=rZ=null,Pz=-1,X!==null&&(X.flags&65011712)!==(Y.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),M4=!1,O1=0,Tz=null,z)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");X===null||xX||(X=X.dependencies,X!==null&&s7(X)&&(xX=!0)),F1?(F1=!1,X=!0):X=!1,X&&(Y=s(Y)||"Unknown",XE.has(Y)||eM.has(Y)||(XE.add(Y),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function gF(X,Y,z,W){rZ=X;var _=0;do{if(E8&&(Tz=null),O1=0,E8=!1,_>=Ps)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(_+=1,V1=!1,wX=cQ=null,X.updateQueue!=null){var L=X.updateQueue;L.lastEffect=null,L.events=null,L.stores=null,L.memoCache!=null&&(L.memoCache.index=0)}Pz=-1,XZ.H=qE,L=iM(Y,z,W)}while(E8);return L}function fl(){var X=XZ.H,Y=X.useState()[0];return Y=typeof Y.then==="function"?T5(Y):Y,X=X.useState()[0],(cQ!==null?cQ.memoizedState:null)!==X&&(rZ.flags|=1024),Y}function hF(){var X=O4!==0;return O4=0,X}function uF(X,Y,z){Y.updateQueue=X.updateQueue,Y.flags=(Y.mode&bq)!==nZ?Y.flags&-402655237:Y.flags&-2053,X.lanes&=~z}function fF(X){if(M4){for(X=X.memoizedState;X!==null;){var Y=X.queue;Y!==null&&(Y.pending=null),X=X.next}M4=!1}jz=0,Xq=wX=cQ=rZ=null,Pz=-1,QZ=null,E8=!1,O1=O4=0,Tz=null}function kJ(){var X={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wX===null?rZ.memoizedState=wX=X:wX=wX.next=X,wX}function hQ(){if(cQ===null){var X=rZ.alternate;X=X!==null?X.memoizedState:null}else X=cQ.next;var Y=wX===null?rZ.memoizedState:wX.next;if(Y!==null)wX=Y,cQ=X;else{if(X===null){if(rZ.alternate===null)throw Error("Update hook called on initial render. This is likely a bug in React. Please file an issue.");throw Error("Rendered more hooks than during the previous render.")}cQ=X,X={memoizedState:cQ.memoizedState,baseState:cQ.baseState,baseQueue:cQ.baseQueue,queue:cQ.queue,next:null},wX===null?rZ.memoizedState=wX=X:wX=wX.next=X}return wX}function zW(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function T5(X){var Y=O1;return O1+=1,Tz===null&&(Tz=wP()),X=bP(Tz,X,Y),Y=rZ,(wX===null?Y.memoizedState:wX.next)===null&&(Y=Y.alternate,XZ.H=Y!==null&&Y.memoizedState!==null?QO:ZO),X}function P0(X){if(X!==null&&typeof X==="object"){if(typeof X.then==="function")return T5(X);if(X.$$typeof===PG)return QX(X)}throw Error("An unsupported type was passed to use(): "+String(X))}function qU(X){var Y=null,z=rZ.updateQueue;if(z!==null&&(Y=z.memoCache),Y==null){var W=rZ.alternate;W!==null&&(W=W.updateQueue,W!==null&&(W=W.memoCache,W!=null&&(Y={data:W.data.map(function(_){return _.slice()}),index:0})))}if(Y==null&&(Y={data:[],index:0}),z===null&&(z=zW(),rZ.updateQueue=z),z.memoCache=Y,z=Y.data[Y.index],z===void 0||V1)for(z=Y.data[Y.index]=Array(X),W=0;W<X;W++)z[W]=Qn;else z.length!==X&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",z.length,X);return Y.index++,z}function Sq(X,Y){return typeof Y==="function"?Y(X):Y}function mF(X,Y,z){var W=kJ();if(z!==void 0){var _=z(Y);if(jU){lQ(!0);try{z(Y)}finally{lQ(!1)}}}else _=Y;return W.memoizedState=W.baseState=_,X={pending:null,lanes:0,dispatch:null,lastRenderedReducer:X,lastRenderedState:_},W.queue=X,X=X.dispatch=ll.bind(null,rZ,X),[W.memoizedState,X]}function i6(X){var Y=hQ();return cF(Y,cQ,X)}function cF(X,Y,z){var W=X.queue;if(W===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");W.lastRenderedReducer=z;var _=X.baseQueue,L=W.pending;if(L!==null){if(_!==null){var I=_.next;_.next=L.next,L.next=I}Y.baseQueue!==_&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),Y.baseQueue=_=L,W.pending=null}if(L=X.baseState,_===null)X.memoizedState=L;else{Y=_.next;var j=I=null,R=null,D=Y,p=!1;do{var l=D.lane&-536870913;if(l!==D.lane?(UQ&l)===l:(jz&l)===l){var g=D.revertLane;if(g===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),l===OU&&(p=!0);else if((jz&g)===g){D=D.next,g===OU&&(p=!0);continue}else l={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},R===null?(j=R=l,I=L):R=R.next=l,rZ.lanes|=g,l0|=g;l=D.action,jU&&z(L,l),L=D.hasEagerState?D.eagerState:z(L,l)}else g={lane:l,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},R===null?(j=R=g,I=L):R=R.next=g,rZ.lanes|=l,l0|=l;D=D.next}while(D!==null&&D!==Y);if(R===null?I=L:R.next=j,!xJ(L,X.memoizedState)&&(xX=!0,p&&(z=T8,z!==null)))throw z;X.memoizedState=L,X.baseState=I,X.baseQueue=R,W.lastRenderedState=L}return _===null&&(W.lanes=0),[X.memoizedState,W.dispatch]}function P5(X){var Y=hQ(),z=Y.queue;if(z===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");z.lastRenderedReducer=X;var{dispatch:W,pending:_}=z,L=Y.memoizedState;if(_!==null){z.pending=null;var I=_=_.next;do L=X(L,I.action),I=I.next;while(I!==_);xJ(L,Y.memoizedState)||(xX=!0),Y.memoizedState=L,Y.baseQueue===null&&(Y.baseState=L),z.lastRenderedState=L}return[L,W]}function pF(X,Y,z){var W=rZ,_=kJ();if(AQ){if(z===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var L=z();$8||L===z()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),$8=!0)}else{if(L=Y(),$8||(z=Y(),xJ(L,z)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),$8=!0)),pQ===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(UQ&127)!==0||sP(W,Y,L)}return _.memoizedState=L,z={value:L,getSnapshot:Y},_.queue=z,WW(rP.bind(null,W,z,X),[X]),W.flags|=2048,s6(Qq|gJ,{destroy:void 0},aP.bind(null,W,z,L,Y),null),L}function UW(X,Y,z){var W=rZ,_=hQ(),L=AQ;if(L){if(z===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");z=z()}else if(z=Y(),!$8){var I=Y();xJ(z,I)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),$8=!0)}if(I=!xJ((cQ||_).memoizedState,z))_.memoizedState=z,xX=!0;_=_.queue;var j=rP.bind(null,W,_,X);if(oJ(2048,gJ,j,[X]),_.getSnapshot!==Y||I||wX!==null&&wX.memoizedState.tag&Qq){if(W.flags|=2048,s6(Qq|gJ,{destroy:void 0},aP.bind(null,W,_,z,Y),null),pQ===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");L||(jz&127)!==0||sP(W,Y,z)}return z}function sP(X,Y,z){X.flags|=16384,X={getSnapshot:Y,value:z},Y=rZ.updateQueue,Y===null?(Y=zW(),rZ.updateQueue=Y,Y.stores=[X]):(z=Y.stores,z===null?Y.stores=[X]:z.push(X))}function aP(X,Y,z,W){Y.value=z,Y.getSnapshot=W,oP(Y)&&tP(X)}function rP(X,Y,z){return z(function(){oP(Y)&&(HG(2,"updateSyncExternalStore()",X),tP(X))})}function oP(X){var Y=X.getSnapshot;X=X.value;try{var z=Y();return!xJ(X,z)}catch(W){return!0}}function tP(X){var Y=IJ(X,2);Y!==null&&HX(Y,X,2)}function dF(X){var Y=kJ();if(typeof X==="function"){var z=X;if(X=z(),jU){lQ(!0);try{z()}finally{lQ(!1)}}}return Y.memoizedState=Y.baseState=X,Y.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sq,lastRenderedState:X},Y}function lF(X){X=dF(X);var Y=X.queue,z=OR.bind(null,rZ,Y);return Y.dispatch=z,[X.memoizedState,z]}function iF(X){var Y=kJ();Y.memoizedState=Y.baseState=X;var z={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return Y.queue=z,Y=GL.bind(null,rZ,!0,z),z.dispatch=Y,[X,Y]}function eP(X,Y){var z=hQ();return ZR(z,cQ,X,Y)}function ZR(X,Y,z,W){return X.baseState=z,cF(X,cQ,typeof W==="function"?W:Sq)}function QR(X,Y){var z=hQ();if(cQ!==null)return ZR(z,cQ,X,Y);return z.baseState=X,[X,z.queue.dispatch]}function ml(X,Y,z,W,_){if(OW(X))throw Error("Cannot update form state while rendering.");if(X=Y.action,X!==null){var L={payload:_,action:X,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){L.listeners.push(I)}};XZ.T!==null?z(!0):L.isTransition=!1,W(L),z=Y.pending,z===null?(L.next=Y.pending=L,XR(Y,L)):(L.next=z.next,Y.pending=z.next=L)}}function XR(X,Y){var{action:z,payload:W}=Y,_=X.state;if(Y.isTransition){var L=XZ.T,I={};I._updatedFibers=new Set,XZ.T=I;try{var j=z(_,W),R=XZ.S;R!==null&&R(I,j),JR(X,Y,j)}catch(D){nF(X,Y,D)}finally{L!==null&&I.types!==null&&(L.types!==null&&L.types!==I.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),L.types=I.types),XZ.T=L,L===null&&I._updatedFibers&&(X=I._updatedFibers.size,I._updatedFibers.clear(),10<X&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{I=z(_,W),JR(X,Y,I)}catch(D){nF(X,Y,D)}}function JR(X,Y,z){z!==null&&typeof z==="object"&&typeof z.then==="function"?(XZ.asyncTransitions++,z.then(MW,MW),z.then(function(W){YR(X,Y,W)},function(W){return nF(X,Y,W)}),Y.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):YR(X,Y,z)}function YR(X,Y,z){Y.status="fulfilled",Y.value=z,qR(Y),X.state=z,Y=X.pending,Y!==null&&(z=Y.next,z===Y?X.pending=null:(z=z.next,Y.next=z,XR(X,z)))}function nF(X,Y,z){var W=X.pending;if(X.pending=null,W!==null){W=W.next;do Y.status="rejected",Y.reason=z,qR(Y),Y=Y.next;while(Y!==W)}X.action=null}function qR(X){X=X.listeners;for(var Y=0;Y<X.length;Y++)(0,X[Y])()}function GR(X,Y){return Y}function n6(X,Y){if(AQ){var z=pQ.formState;if(z!==null){Z:{var W=rZ;if(AQ){if(rQ){Q:{var _=rQ;for(var L=tY;_.nodeType!==8;){if(!L){_=null;break Q}if(_=PY(_.nextSibling),_===null){_=null;break Q}}L=_.data,_=L===PO||L===dE?_:null}if(_){rQ=PY(_.nextSibling),W=_.data===PO;break Z}}O0(W)}W=!1}W&&(Y=z[0])}}return z=kJ(),z.memoizedState=z.baseState=Y,W={pending:null,lanes:0,dispatch:null,lastRenderedReducer:GR,lastRenderedState:Y},z.queue=W,z=OR.bind(null,rZ,W),W.dispatch=z,W=dF(!1),L=GL.bind(null,rZ,!1,W.queue),W=kJ(),_={state:Y,dispatch:null,action:X,pending:null},W.queue=_,z=ml.bind(null,rZ,_,L,z),_.dispatch=z,W.memoizedState=X,[Y,z,!1]}function KW(X){var Y=hQ();return zR(Y,cQ,X)}function zR(X,Y,z){if(Y=cF(X,Y,GR)[0],X=i6(Sq)[0],typeof Y==="object"&&Y!==null&&typeof Y.then==="function")try{var W=T5(Y)}catch(I){if(I===P8)throw B4;throw I}else W=Y;Y=hQ();var _=Y.queue,L=_.dispatch;return z!==Y.memoizedState&&(rZ.flags|=2048,s6(Qq|gJ,{destroy:void 0},cl.bind(null,_,z),null)),[W,L,X]}function cl(X,Y){X.action=Y}function HW(X){var Y=hQ(),z=cQ;if(z!==null)return zR(Y,z,X);hQ(),Y=Y.memoizedState,z=hQ();var W=z.queue.dispatch;return z.memoizedState=X,[Y,W,!1]}function s6(X,Y,z,W){return X={tag:X,create:z,deps:W,inst:Y,next:null},Y=rZ.updateQueue,Y===null&&(Y=zW(),rZ.updateQueue=Y),z=Y.lastEffect,z===null?Y.lastEffect=X.next=X:(W=z.next,z.next=X,X.next=W,Y.lastEffect=X),X}function sF(X){var Y=kJ();return X={current:X},Y.memoizedState=X}function GU(X,Y,z,W){var _=kJ();rZ.flags|=X,_.memoizedState=s6(Qq|Y,{destroy:void 0},z,W===void 0?null:W)}function oJ(X,Y,z,W){var _=hQ();W=W===void 0?null:W;var L=_.memoizedState.inst;cQ!==null&&W!==null&&bF(W,cQ.memoizedState.deps)?_.memoizedState=s6(Y,L,z,W):(rZ.flags|=X,_.memoizedState=s6(Qq|Y,L,z,W))}function WW(X,Y){(rZ.mode&bq)!==nZ?GU(276826112,gJ,X,Y):GU(8390656,gJ,X,Y)}function pl(X){rZ.flags|=4;var Y=rZ.updateQueue;if(Y===null)Y=zW(),rZ.updateQueue=Y,Y.events=[X];else{var z=Y.events;z===null?Y.events=[X]:z.push(X)}}function aF(X){var Y=kJ(),z={impl:X};return Y.memoizedState=z,function(){if((CQ&dX)!==oX)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return z.impl.apply(void 0,arguments)}}function BW(X){var Y=hQ().memoizedState;return pl({ref:Y,nextImpl:X}),function(){if((CQ&dX)!==oX)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return Y.impl.apply(void 0,arguments)}}function rF(X,Y){var z=4194308;return(rZ.mode&bq)!==nZ&&(z|=134217728),GU(z,kY,X,Y)}function UR(X,Y){if(typeof Y==="function"){X=X();var z=Y(X);return function(){typeof z==="function"?z():Y(null)}}if(Y!==null&&Y!==void 0)return Y.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(Y).join(", ")+"}"),X=X(),Y.current=X,function(){Y.current=null}}function oF(X,Y,z){typeof Y!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Y!==null?typeof Y:"null"),z=z!==null&&z!==void 0?z.concat([X]):null;var W=4194308;(rZ.mode&bq)!==nZ&&(W|=134217728),GU(W,kY,UR.bind(null,Y,X),z)}function _W(X,Y,z){typeof Y!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Y!==null?typeof Y:"null"),z=z!==null&&z!==void 0?z.concat([X]):null,oJ(4,kY,UR.bind(null,Y,X),z)}function tF(X,Y){return kJ().memoizedState=[X,Y===void 0?null:Y],X}function FW(X,Y){var z=hQ();Y=Y===void 0?null:Y;var W=z.memoizedState;if(Y!==null&&bF(Y,W[1]))return W[0];return z.memoizedState=[X,Y],X}function eF(X,Y){var z=kJ();Y=Y===void 0?null:Y;var W=X();if(jU){lQ(!0);try{X()}finally{lQ(!1)}}return z.memoizedState=[W,Y],W}function LW(X,Y){var z=hQ();Y=Y===void 0?null:Y;var W=z.memoizedState;if(Y!==null&&bF(Y,W[1]))return W[0];if(W=X(),jU){lQ(!0);try{X()}finally{lQ(!1)}}return z.memoizedState=[W,Y],W}function ZL(X,Y){var z=kJ();return QL(z,X,Y)}function KR(X,Y){var z=hQ();return WR(z,cQ.memoizedState,X,Y)}function HR(X,Y){var z=hQ();return cQ===null?QL(z,X,Y):WR(z,cQ.memoizedState,X,Y)}function QL(X,Y,z){if(z===void 0||(jz&1073741824)!==0&&(UQ&261930)===0)return X.memoizedState=Y;return X.memoizedState=z,X=BC(),rZ.lanes|=X,l0|=X,z}function WR(X,Y,z,W){if(xJ(z,Y))return z;if(C8.current!==null)return X=QL(X,z,W),xJ(X,Y)||(xX=!0),X;if((jz&42)===0||(jz&1073741824)!==0&&(UQ&261930)===0)return xX=!0,X.memoizedState=z;return X=BC(),rZ.lanes|=X,l0|=X,Y}function MW(){XZ.asyncTransitions--}function BR(X,Y,z,W,_){var L=vQ.p;vQ.p=L!==0&&L<xq?L:xq;var I=XZ.T,j={};j._updatedFibers=new Set,XZ.T=j,GL(X,!1,Y,z);try{var R=_(),D=XZ.S;if(D!==null&&D(j,R),R!==null&&typeof R==="object"&&typeof R.then==="function"){XZ.asyncTransitions++,R.then(MW,MW);var p=hl(R,W);R5(X,Y,p,TY(X))}else R5(X,Y,W,TY(X))}catch(l){R5(X,Y,{then:function(){},status:"rejected",reason:l},TY(X))}finally{vQ.p=L,I!==null&&j.types!==null&&(I.types!==null&&I.types!==j.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),I.types=j.types),XZ.T=I,I===null&&j._updatedFibers&&(X=j._updatedFibers.size,j._updatedFibers.clear(),10<X&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function XL(X,Y,z,W){if(X.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var _=_R(X).queue;vl(X),BR(X,_,Y,wU,z===null?F:function(){return FR(X),z(W)})}function _R(X){var Y=X.memoizedState;if(Y!==null)return Y;Y={memoizedState:wU,baseState:wU,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sq,lastRenderedState:wU},next:null};var z={};return Y.next={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sq,lastRenderedState:z},next:null},X.memoizedState=Y,X=X.alternate,X!==null&&(X.memoizedState=Y),Y}function FR(X){XZ.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var Y=_R(X);Y.next===null&&(Y=X.alternate.memoizedState),R5(X,Y.next.queue,{},TY(X))}function JL(){var X=dF(!1);return X=BR.bind(null,rZ,X.queue,!0,!1),kJ().memoizedState=X,[!1,X]}function LR(){var X=i6(Sq)[0],Y=hQ().memoizedState;return[typeof X==="boolean"?X:T5(X),Y]}function MR(){var X=P5(Sq)[0],Y=hQ().memoizedState;return[typeof X==="boolean"?X:T5(X),Y]}function zU(){return QX(x1)}function YL(){var X=kJ(),Y=pQ.identifierPrefix;if(AQ){var z=Oz,W=Mz;z=(W&~(1<<32-SJ(W)-1)).toString(32)+z,Y="_"+Y+"R_"+z,z=O4++,0<z&&(Y+="H"+z.toString(32)),Y+="_"}else z=Ts++,Y="_"+Y+"r_"+z.toString(32)+"_";return X.memoizedState=Y}function qL(){return kJ().memoizedState=dl.bind(null,rZ)}function dl(X,Y){for(var z=X.return;z!==null;){switch(z.tag){case 24:case 3:var W=TY(z),_=I0(W),L=N0(z,_,W);L!==null&&(HG(W,"refresh()",X),HX(L,z,W),I5(L,z,W)),X=RF(),Y!==null&&Y!==void 0&&L!==null&&console.error("The seed argument is not enabled outside experimental channels."),_.payload={cache:X};return}z=z.return}}function ll(X,Y,z){var W=arguments;typeof W[3]==="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),W=TY(X);var _={lane:W,revertLane:0,gesture:null,action:z,hasEagerState:!1,eagerState:null,next:null};OW(X)?VR(Y,_):(_=_F(X,Y,_,W),_!==null&&(HG(W,"dispatch()",X),HX(_,X,W),AR(_,Y,W)))}function OR(X,Y,z){var W=arguments;typeof W[3]==="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),W=TY(X),R5(X,Y,z,W)&&HG(W,"setState()",X)}function R5(X,Y,z,W){var _={lane:W,revertLane:0,gesture:null,action:z,hasEagerState:!1,eagerState:null,next:null};if(OW(X))VR(Y,_);else{var L=X.alternate;if(X.lanes===0&&(L===null||L.lanes===0)&&(L=Y.lastRenderedReducer,L!==null)){var I=XZ.H;XZ.H=gq;try{var j=Y.lastRenderedState,R=L(j,z);if(_.hasEagerState=!0,_.eagerState=R,xJ(R,j))return p7(X,Y,_,0),pQ===null&&c7(),!1}catch(D){}finally{XZ.H=I}}if(z=_F(X,Y,_,W),z!==null)return HX(z,X,W),AR(z,Y,W),!0}return!1}function GL(X,Y,z,W){if(XZ.T===null&&OU===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),W={lane:2,revertLane:vL(),gesture:null,action:W,hasEagerState:!1,eagerState:null,next:null},OW(X)){if(Y)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else Y=_F(X,z,W,2),Y!==null&&(HG(2,"setOptimistic()",X),HX(Y,X,2))}function OW(X){var Y=X.alternate;return X===rZ||Y!==null&&Y===rZ}function VR(X,Y){E8=M4=!0;var z=X.pending;z===null?Y.next=Y:(Y.next=z.next,z.next=Y),X.pending=Y}function AR(X,Y,z){if((z&4194048)!==0){var W=Y.lanes;W&=X.pendingLanes,z|=W,Y.lanes=z,n9(X,z)}}function zL(X){if(X!==null&&typeof X!=="function"){var Y=String(X);ME.has(Y)||(ME.add(Y),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",X))}}function UL(X,Y,z,W){var _=X.memoizedState,L=z(W,_);if(X.mode&jJ){lQ(!0);try{L=z(W,_)}finally{lQ(!1)}}L===void 0&&(Y=c(Y)||"Component",BE.has(Y)||(BE.add(Y),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",Y))),_=L===null||L===void 0?_:BQ({},_,L),X.memoizedState=_,X.lanes===0&&(X.updateQueue.baseState=_)}function IR(X,Y,z,W,_,L,I){var j=X.stateNode;if(typeof j.shouldComponentUpdate==="function"){if(z=j.shouldComponentUpdate(W,L,I),X.mode&jJ){lQ(!0);try{z=j.shouldComponentUpdate(W,L,I)}finally{lQ(!1)}}return z===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",c(Y)||"Component"),z}return Y.prototype&&Y.prototype.isPureReactComponent?!_5(z,W)||!_5(_,L):!0}function NR(X,Y,z,W){var _=Y.state;typeof Y.componentWillReceiveProps==="function"&&Y.componentWillReceiveProps(z,W),typeof Y.UNSAFE_componentWillReceiveProps==="function"&&Y.UNSAFE_componentWillReceiveProps(z,W),Y.state!==_&&(X=s(X)||"Component",zE.has(X)||(zE.add(X),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",X)),XO.enqueueReplaceState(Y,Y.state,null))}function UU(X,Y){var z=Y;if("ref"in Y){z={};for(var W in Y)W!=="ref"&&(z[W]=Y[W])}if(X=X.defaultProps){z===Y&&(z=BQ({},z));for(var _ in X)z[_]===void 0&&(z[_]=X[_])}return z}function jR(X){wM(X),console.warn(`%s
|
|
121
|
+
|
|
122
|
+
%s
|
|
123
|
+
`,k8?"An error occurred in the <"+k8+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
124
|
+
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function TR(X){var Y=k8?"The above error occurred in the <"+k8+"> component.":"The above error occurred in one of your React components.",z="React will try to recreate this component tree from scratch using the error boundary you provided, "+((JO||"Anonymous")+".");if(typeof X==="object"&&X!==null&&typeof X.environmentName==="string"){var W=X.environmentName;X=[`%o
|
|
125
|
+
|
|
126
|
+
%s
|
|
127
|
+
|
|
128
|
+
%s
|
|
129
|
+
`,X,Y,z].slice(0),typeof X[0]==="string"?X.splice(0,1,tE+" "+X[0],eE,c4+W+c4,Zk):X.splice(0,0,tE,eE,c4+W+c4,Zk),X.unshift(console),W=ds.apply(console.error,X),W()}else console.error(`%o
|
|
130
|
+
|
|
131
|
+
%s
|
|
132
|
+
|
|
133
|
+
%s
|
|
134
|
+
`,X,Y,z)}function PR(X){wM(X)}function VW(X,Y){try{k8=Y.source?s(Y.source):null,JO=null;var z=Y.value;if(XZ.actQueue!==null)XZ.thrownErrors.push(z);else{var W=X.onUncaughtError;W(z,{componentStack:Y.stack})}}catch(_){setTimeout(function(){throw _})}}function RR(X,Y,z){try{k8=z.source?s(z.source):null,JO=s(Y);var W=X.onCaughtError;W(z.value,{componentStack:z.stack,errorBoundary:Y.tag===1?Y.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function KL(X,Y,z){return z=I0(z),z.tag=rM,z.payload={element:null},z.callback=function(){BZ(Y.source,VW,X,Y)},z}function HL(X){return X=I0(X),X.tag=rM,X}function WL(X,Y,z,W){var _=z.type.getDerivedStateFromError;if(typeof _==="function"){var L=W.value;X.payload=function(){return _(L)},X.callback=function(){VP(z),BZ(W.source,RR,Y,z,W)}}var I=z.stateNode;I!==null&&typeof I.componentDidCatch==="function"&&(X.callback=function(){VP(z),BZ(W.source,RR,Y,z,W),typeof _!=="function"&&(n0===null?n0=new Set([this]):n0.add(this)),As(this,W),typeof _==="function"||(z.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",s(z)||"Unknown")})}function il(X,Y,z,W,_){if(z.flags|=32768,DG&&w5(X,_),W!==null&&typeof W==="object"&&typeof W.then==="function"){if(Y=z.alternate,Y!==null&&d6(Y,z,_,!0),AQ&&(kG=!0),z=EY.current,z!==null){switch(z.tag){case 31:case 13:return Zq===null?DW():z.alternate===null&&UX===Cz&&(UX=I4),z.flags&=-257,z.flags|=65536,z.lanes=_,W===_4?z.flags|=16384:(Y=z.updateQueue,Y===null?z.updateQueue=new Set([W]):Y.add(W),yL(X,W,_)),!1;case 22:return z.flags|=65536,W===_4?z.flags|=16384:(Y=z.updateQueue,Y===null?(Y={transitions:null,markerInstances:null,retryQueue:new Set([W])},z.updateQueue=Y):(z=Y.retryQueue,z===null?Y.retryQueue=new Set([W]):z.add(W)),yL(X,W,_)),!1}throw Error("Unexpected Suspense handler tag ("+z.tag+"). This is a bug in React.")}return yL(X,W,_),DW(),!1}if(AQ)return kG=!0,Y=EY.current,Y!==null?((Y.flags&65536)===0&&(Y.flags|=256),Y.flags|=65536,Y.lanes=_,W!==uM&&L5(AY(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:W}),z))):(W!==uM&&L5(AY(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:W}),z)),X=X.current.alternate,X.flags|=65536,_&=-_,X.lanes|=_,W=AY(W,z),_=KL(X.stateNode,W,_),YW(X,_),UX!==p0&&(UX=TU)),!1;var L=AY(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:W}),z);if(R1===null?R1=[L]:R1.push(L),UX!==p0&&(UX=TU),Y===null)return!0;W=AY(W,z),z=Y;do{switch(z.tag){case 3:return z.flags|=65536,X=_&-_,z.lanes|=X,X=KL(z.stateNode,W,X),YW(z,X),!1;case 1:if(Y=z.type,L=z.stateNode,(z.flags&128)===0&&(typeof Y.getDerivedStateFromError==="function"||L!==null&&typeof L.componentDidCatch==="function"&&(n0===null||!n0.has(L))))return z.flags|=65536,_&=-_,z.lanes|=_,_=HL(_),WL(_,X,z,W),YW(z,_),!1}z=z.return}while(z!==null);return!1}function JJ(X,Y,z,W){Y.child=X===null?r$(Y,null,z,W):NU(Y,X.child,z,W)}function CR(X,Y,z,W,_){z=z.render;var L=Y.ref;if("ref"in W){var I={};for(var j in W)j!=="ref"&&(I[j]=W[j])}else I=W;if(JU(Y),W=vF(X,Y,z,I,L,_),j=hF(),X!==null&&!xX)return uF(X,Y,_),Hz(X,Y,_);return AQ&&j&&AF(Y),Y.flags|=1,JJ(X,Y,W,_),Y.child}function DR(X,Y,z,W,_){if(X===null){var L=z.type;if(typeof L==="function"&&!LF(L)&&L.defaultProps===void 0&&z.compare===null)return z=e9(L),Y.tag=15,Y.type=z,_L(Y,L),$R(X,Y,z,W,_);return X=MF(z.type,null,W,Y,Y.mode,_),X.ref=Y.ref,X.return=Y,Y.child=X}if(L=X.child,!AL(X,_)){var I=L.memoizedProps;if(z=z.compare,z=z!==null?z:_5,z(I,W)&&X.ref===Y.ref)return Hz(X,Y,_)}return Y.flags|=1,X=Gz(L,W),X.ref=Y.ref,X.return=Y,Y.child=X}function $R(X,Y,z,W,_){if(X!==null){var L=X.memoizedProps;if(_5(L,W)&&X.ref===Y.ref&&Y.type===X.type)if(xX=!1,Y.pendingProps=W=L,AL(X,_))(X.flags&131072)!==0&&(xX=!0);else return Y.lanes=X.lanes,Hz(X,Y,_)}return BL(X,Y,z,W,_)}function ER(X,Y,z,W){var _=W.children,L=X!==null?X.memoizedState:null;if(X===null&&Y.stateNode===null&&(Y.stateNode={_visibility:Z1,_pendingMarkers:null,_retryCache:null,_transitions:null}),W.mode==="hidden"){if((Y.flags&128)!==0){if(L=L!==null?L.baseLanes|z:z,X!==null){W=Y.child=X.child;for(_=0;W!==null;)_=_|W.lanes|W.childLanes,W=W.sibling;W=_&~L}else W=0,Y.child=null;return kR(X,Y,L,z,W)}if((z&536870912)!==0)Y.memoizedState={baseLanes:0,cachePool:null},X!==null&&t7(Y,L!==null?L.cachePool:null),L!==null?lP(Y,L):yF(Y),iP(Y);else return W=Y.lanes=536870912,kR(X,Y,L!==null?L.baseLanes|z:z,z,W)}else L!==null?(t7(Y,L.cachePool),lP(Y,L),T0(Y),Y.memoizedState=null):(X!==null&&t7(Y,null),yF(Y),T0(Y));return JJ(X,Y,_,z),Y.child}function C5(X,Y){return X!==null&&X.tag===22||Y.stateNode!==null||(Y.stateNode={_visibility:Z1,_pendingMarkers:null,_retryCache:null,_transitions:null}),Y.sibling}function kR(X,Y,z,W,_){var L=$F();return L=L===null?null:{parent:SX._currentValue,pool:L},Y.memoizedState={baseLanes:z,cachePool:L},X!==null&&t7(Y,null),yF(Y),iP(Y),X!==null&&d6(X,Y,W,!0),Y.childLanes=_,null}function AW(X,Y){var z=Y.hidden;return z!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
135
|
+
- <Activity %s>
|
|
136
|
+
+ <Activity %s>`,z===!0?"hidden":z===!1?"hidden={false}":"hidden={...}",z?'mode="hidden"':'mode="visible"'),Y=NW({mode:Y.mode,children:Y.children},X.mode),Y.ref=X.ref,X.child=Y,Y.return=X,Y}function SR(X,Y,z){return NU(Y,X.child,null,z),X=AW(Y,Y.pendingProps),X.flags|=2,jY(Y),Y.memoizedState=null,X}function nl(X,Y,z){var W=Y.pendingProps,_=(Y.flags&128)!==0;if(Y.flags&=-129,X===null){if(AQ){if(W.mode==="hidden")return X=AW(Y,W),Y.lanes=536870912,C5(null,X);if(xF(Y),(X=rQ)?(z=XD(X,tY),z=z!==null&&z.data===EU?z:null,z!==null&&(W={dehydrated:z,treeContext:TP(),retryLane:536870912,hydrationErrors:null},Y.memoizedState=W,W=NP(z),W.return=Y,Y.child=W,GJ=Y,rQ=null)):z=null,z===null)throw i7(Y,X),O0(Y);return Y.lanes=536870912,null}return AW(Y,W)}var L=X.memoizedState;if(L!==null){var I=L.dehydrated;if(xF(Y),_)if(Y.flags&256)Y.flags&=-257,Y=SR(X,Y,z);else if(Y.memoizedState!==null)Y.child=X.child,Y.flags|=128,Y=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(RP(),(z&536870912)!==0&&CW(Y),xX||d6(X,Y,z,!1),_=(z&X.childLanes)!==0,xX||_){if(W=pQ,W!==null&&(I=s9(W,z),I!==0&&I!==L.retryLane))throw L.retryLane=I,IJ(X,I),HX(W,X,I),YO;DW(),Y=SR(X,Y,z)}else X=L.treeContext,rQ=PY(I.nextSibling),GJ=Y,AQ=!0,v0=null,kG=!1,$Y=null,tY=!1,X!==null&&PP(Y,X),Y=AW(Y,W),Y.flags|=4096;return Y}return L=X.child,W={mode:W.mode,children:W.children},(z&536870912)!==0&&(z&X.lanes)!==0&&CW(Y),X=Gz(L,W),X.ref=Y.ref,Y.child=X,X.return=Y,X}function IW(X,Y){var z=Y.ref;if(z===null)X!==null&&X.ref!==null&&(Y.flags|=4194816);else{if(typeof z!=="function"&&typeof z!=="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");if(X===null||X.ref!==z)Y.flags|=4194816}}function BL(X,Y,z,W,_){if(z.prototype&&typeof z.prototype.render==="function"){var L=c(z)||"Unknown";OE[L]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",L,L),OE[L]=!0)}if(Y.mode&jJ&&vq.recordLegacyContextWarning(Y,null),X===null&&(_L(Y,Y.type),z.contextTypes&&(L=c(z)||"Unknown",AE[L]||(AE[L]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",L)))),JU(Y),z=vF(X,Y,z,W,void 0,_),W=hF(),X!==null&&!xX)return uF(X,Y,_),Hz(X,Y,_);return AQ&&W&&AF(Y),Y.flags|=1,JJ(X,Y,z,_),Y.child}function yR(X,Y,z,W,_,L){if(JU(Y),Pz=-1,V1=X!==null&&X.type!==Y.type,Y.updateQueue=null,z=gF(Y,W,z,_),nP(X,Y),W=hF(),X!==null&&!xX)return uF(X,Y,L),Hz(X,Y,L);return AQ&&W&&AF(Y),Y.flags|=1,JJ(X,Y,z,L),Y.child}function wR(X,Y,z,W,_){switch(K(Y)){case!1:var L=Y.stateNode,I=new Y.type(Y.memoizedProps,L.context).state;L.updater.enqueueSetState(L,I,null);break;case!0:Y.flags|=128,Y.flags|=65536,L=Error("Simulated error coming from DevTools");var j=_&-_;if(Y.lanes|=j,I=pQ,I===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");j=HL(j),WL(j,I,Y,AY(L,Y)),YW(Y,j)}if(JU(Y),Y.stateNode===null){if(I=b0,L=z.contextType,"contextType"in z&&L!==null&&(L===void 0||L.$$typeof!==PG)&&!LE.has(z)&&(LE.add(z),j=L===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof L!=="object"?" However, it is set to a "+typeof L+".":L.$$typeof===qM?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(L).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",c(z)||"Component",j)),typeof L==="object"&&L!==null&&(I=QX(L)),L=new z(W,I),Y.mode&jJ){lQ(!0);try{L=new z(W,I)}finally{lQ(!1)}}if(I=Y.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,L.updater=XO,Y.stateNode=L,L._reactInternals=Y,L._reactInternalInstance=GE,typeof z.getDerivedStateFromProps==="function"&&I===null&&(I=c(z)||"Component",UE.has(I)||(UE.add(I),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",I,L.state===null?"null":"undefined",I))),typeof z.getDerivedStateFromProps==="function"||typeof L.getSnapshotBeforeUpdate==="function"){var R=j=I=null;if(typeof L.componentWillMount==="function"&&L.componentWillMount.__suppressDeprecationWarning!==!0?I="componentWillMount":typeof L.UNSAFE_componentWillMount==="function"&&(I="UNSAFE_componentWillMount"),typeof L.componentWillReceiveProps==="function"&&L.componentWillReceiveProps.__suppressDeprecationWarning!==!0?j="componentWillReceiveProps":typeof L.UNSAFE_componentWillReceiveProps==="function"&&(j="UNSAFE_componentWillReceiveProps"),typeof L.componentWillUpdate==="function"&&L.componentWillUpdate.__suppressDeprecationWarning!==!0?R="componentWillUpdate":typeof L.UNSAFE_componentWillUpdate==="function"&&(R="UNSAFE_componentWillUpdate"),I!==null||j!==null||R!==null){L=c(z)||"Component";var D=typeof z.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";HE.has(L)||(HE.add(L),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
137
|
+
|
|
138
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
139
|
+
|
|
140
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
141
|
+
https://react.dev/link/unsafe-component-lifecycles`,L,D,I!==null?`
|
|
142
|
+
`+I:"",j!==null?`
|
|
143
|
+
`+j:"",R!==null?`
|
|
144
|
+
`+R:""))}}L=Y.stateNode,I=c(z)||"Component",L.render||(z.prototype&&typeof z.prototype.render==="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",I):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",I)),!L.getInitialState||L.getInitialState.isReactClassApproved||L.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",I),L.getDefaultProps&&!L.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",I),L.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",I),z.childContextTypes&&!FE.has(z)&&(FE.add(z),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",I)),z.contextTypes&&!_E.has(z)&&(_E.add(z),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",I)),typeof L.componentShouldUpdate==="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",I),z.prototype&&z.prototype.isPureReactComponent&&typeof L.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",c(z)||"A pure component"),typeof L.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",I),typeof L.componentDidReceiveProps==="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",I),typeof L.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",I),typeof L.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",I),j=L.props!==W,L.props!==void 0&&j&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",I),L.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",I,I),typeof L.getSnapshotBeforeUpdate!=="function"||typeof L.componentDidUpdate==="function"||KE.has(z)||(KE.add(z),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",c(z))),typeof L.getDerivedStateFromProps==="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",I),typeof L.getDerivedStateFromError==="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",I),typeof z.getSnapshotBeforeUpdate==="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",I),(j=L.state)&&(typeof j!=="object"||cX(j))&&console.error("%s.state: must be set to an object or null",I),typeof L.getChildContext==="function"&&typeof z.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",I),L=Y.stateNode,L.props=W,L.state=Y.memoizedState,L.refs={},kF(Y),I=z.contextType,L.context=typeof I==="object"&&I!==null?QX(I):b0,L.state===W&&(I=c(z)||"Component",WE.has(I)||(WE.add(I),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",I))),Y.mode&jJ&&vq.recordLegacyContextWarning(Y,L),vq.recordUnsafeLifecycleWarnings(Y,L),L.state=Y.memoizedState,I=z.getDerivedStateFromProps,typeof I==="function"&&(UL(Y,z,I,W),L.state=Y.memoizedState),typeof z.getDerivedStateFromProps==="function"||typeof L.getSnapshotBeforeUpdate==="function"||typeof L.UNSAFE_componentWillMount!=="function"&&typeof L.componentWillMount!=="function"||(I=L.state,typeof L.componentWillMount==="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount==="function"&&L.UNSAFE_componentWillMount(),I!==L.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",s(Y)||"Component"),XO.enqueueReplaceState(L,L.state,null)),j5(Y,W,L,_),N5(),L.state=Y.memoizedState),typeof L.componentDidMount==="function"&&(Y.flags|=4194308),(Y.mode&bq)!==nZ&&(Y.flags|=134217728),L=!0}else if(X===null){L=Y.stateNode;var p=Y.memoizedProps;j=UU(z,p),L.props=j;var l=L.context;R=z.contextType,I=b0,typeof R==="object"&&R!==null&&(I=QX(R)),D=z.getDerivedStateFromProps,R=typeof D==="function"||typeof L.getSnapshotBeforeUpdate==="function",p=Y.pendingProps!==p,R||typeof L.UNSAFE_componentWillReceiveProps!=="function"&&typeof L.componentWillReceiveProps!=="function"||(p||l!==I)&&NR(Y,L,W,I),c0=!1;var g=Y.memoizedState;L.state=g,j5(Y,W,L,_),N5(),l=Y.memoizedState,p||g!==l||c0?(typeof D==="function"&&(UL(Y,z,D,W),l=Y.memoizedState),(j=c0||IR(Y,z,j,W,g,l,I))?(R||typeof L.UNSAFE_componentWillMount!=="function"&&typeof L.componentWillMount!=="function"||(typeof L.componentWillMount==="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount==="function"&&L.UNSAFE_componentWillMount()),typeof L.componentDidMount==="function"&&(Y.flags|=4194308),(Y.mode&bq)!==nZ&&(Y.flags|=134217728)):(typeof L.componentDidMount==="function"&&(Y.flags|=4194308),(Y.mode&bq)!==nZ&&(Y.flags|=134217728),Y.memoizedProps=W,Y.memoizedState=l),L.props=W,L.state=l,L.context=I,L=j):(typeof L.componentDidMount==="function"&&(Y.flags|=4194308),(Y.mode&bq)!==nZ&&(Y.flags|=134217728),L=!1)}else{L=Y.stateNode,SF(X,Y),I=Y.memoizedProps,R=UU(z,I),L.props=R,D=Y.pendingProps,g=L.context,l=z.contextType,j=b0,typeof l==="object"&&l!==null&&(j=QX(l)),p=z.getDerivedStateFromProps,(l=typeof p==="function"||typeof L.getSnapshotBeforeUpdate==="function")||typeof L.UNSAFE_componentWillReceiveProps!=="function"&&typeof L.componentWillReceiveProps!=="function"||(I!==D||g!==j)&&NR(Y,L,W,j),c0=!1,g=Y.memoizedState,L.state=g,j5(Y,W,L,_),N5();var ZZ=Y.memoizedState;I!==D||g!==ZZ||c0||X!==null&&X.dependencies!==null&&s7(X.dependencies)?(typeof p==="function"&&(UL(Y,z,p,W),ZZ=Y.memoizedState),(R=c0||IR(Y,z,R,W,g,ZZ,j)||X!==null&&X.dependencies!==null&&s7(X.dependencies))?(l||typeof L.UNSAFE_componentWillUpdate!=="function"&&typeof L.componentWillUpdate!=="function"||(typeof L.componentWillUpdate==="function"&&L.componentWillUpdate(W,ZZ,j),typeof L.UNSAFE_componentWillUpdate==="function"&&L.UNSAFE_componentWillUpdate(W,ZZ,j)),typeof L.componentDidUpdate==="function"&&(Y.flags|=4),typeof L.getSnapshotBeforeUpdate==="function"&&(Y.flags|=1024)):(typeof L.componentDidUpdate!=="function"||I===X.memoizedProps&&g===X.memoizedState||(Y.flags|=4),typeof L.getSnapshotBeforeUpdate!=="function"||I===X.memoizedProps&&g===X.memoizedState||(Y.flags|=1024),Y.memoizedProps=W,Y.memoizedState=ZZ),L.props=W,L.state=ZZ,L.context=j,L=R):(typeof L.componentDidUpdate!=="function"||I===X.memoizedProps&&g===X.memoizedState||(Y.flags|=4),typeof L.getSnapshotBeforeUpdate!=="function"||I===X.memoizedProps&&g===X.memoizedState||(Y.flags|=1024),L=!1)}if(j=L,IW(X,Y),I=(Y.flags&128)!==0,j||I){if(j=Y.stateNode,GX(Y),I&&typeof z.getDerivedStateFromError!=="function")z=null,bJ=-1;else if(z=v$(j),Y.mode&jJ){lQ(!0);try{v$(j)}finally{lQ(!1)}}Y.flags|=1,X!==null&&I?(Y.child=NU(Y,X.child,null,_),Y.child=NU(Y,null,z,_)):JJ(X,Y,z,_),Y.memoizedState=j.state,X=Y.child}else X=Hz(X,Y,_);return _=Y.stateNode,L&&_.props!==W&&(S8||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",s(Y)||"a component"),S8=!0),X}function xR(X,Y,z,W){return XU(),Y.flags|=256,JJ(X,Y,z,W),Y.child}function _L(X,Y){Y&&Y.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
145
|
+
%s.childContextTypes = ...`,Y.displayName||Y.name||"Component"),typeof Y.getDerivedStateFromProps==="function"&&(X=c(Y)||"Unknown",IE[X]||(console.error("%s: Function components do not support getDerivedStateFromProps.",X),IE[X]=!0)),typeof Y.contextType==="object"&&Y.contextType!==null&&(Y=c(Y)||"Unknown",VE[Y]||(console.error("%s: Function components do not support contextType.",Y),VE[Y]=!0))}function FL(X){return{baseLanes:X,cachePool:yP()}}function LL(X,Y,z){return X=X!==null?X.childLanes&~z:0,Y&&(X|=XY),X}function bR(X,Y,z){var W,_=Y.pendingProps;U(Y)&&(Y.flags|=128);var L=!1,I=(Y.flags&128)!==0;if((W=I)||(W=X!==null&&X.memoizedState===null?!1:(CX.current&M1)!==0),W&&(L=!0,Y.flags&=-129),W=(Y.flags&32)!==0,Y.flags&=-33,X===null){if(AQ){if(L?j0(Y):T0(Y),(X=rQ)?(z=XD(X,tY),z=z!==null&&z.data!==EU?z:null,z!==null&&(W={dehydrated:z,treeContext:TP(),retryLane:536870912,hydrationErrors:null},Y.memoizedState=W,W=NP(z),W.return=Y,Y.child=W,GJ=Y,rQ=null)):z=null,z===null)throw i7(Y,X),O0(Y);return sL(z)?Y.lanes=32:Y.lanes=536870912,null}var j=_.children;if(_=_.fallback,L){T0(Y);var R=Y.mode;return j=NW({mode:"hidden",children:j},R),_=ZU(_,R,z,null),j.return=Y,_.return=Y,j.sibling=_,Y.child=j,_=Y.child,_.memoizedState=FL(z),_.childLanes=LL(X,W,z),Y.memoizedState=qO,C5(null,_)}return j0(Y),ML(Y,j)}var D=X.memoizedState;if(D!==null){var p=D.dehydrated;if(p!==null){if(I)Y.flags&256?(j0(Y),Y.flags&=-257,Y=OL(X,Y,z)):Y.memoizedState!==null?(T0(Y),Y.child=X.child,Y.flags|=128,Y=null):(T0(Y),j=_.fallback,R=Y.mode,_=NW({mode:"visible",children:_.children},R),j=ZU(j,R,z,null),j.flags|=2,_.return=Y,j.return=Y,_.sibling=j,Y.child=_,NU(Y,X.child,null,z),_=Y.child,_.memoizedState=FL(z),_.childLanes=LL(X,W,z),Y.memoizedState=qO,Y=C5(null,_));else if(j0(Y),RP(),(z&536870912)!==0&&CW(Y),sL(p)){if(W=p.nextSibling&&p.nextSibling.dataset,W){j=W.dgst;var l=W.msg;R=W.stck;var g=W.cstck}L=l,W=j,_=R,p=g,j=L,R=p,j=j?Error(j):Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),j.stack=_||"",j.digest=W,W=R===void 0?null:R,_={value:j,source:null,stack:W},typeof W==="string"&&hM.set(j,_),L5(_),Y=OL(X,Y,z)}else if(xX||d6(X,Y,z,!1),W=(z&X.childLanes)!==0,xX||W){if(W=pQ,W!==null&&(_=s9(W,z),_!==0&&_!==D.retryLane))throw D.retryLane=_,IJ(X,_),HX(W,X,_),YO;nL(p)||DW(),Y=OL(X,Y,z)}else nL(p)?(Y.flags|=192,Y.child=X.child,Y=null):(X=D.treeContext,rQ=PY(p.nextSibling),GJ=Y,AQ=!0,v0=null,kG=!1,$Y=null,tY=!1,X!==null&&PP(Y,X),Y=ML(Y,_.children),Y.flags|=4096);return Y}}if(L)return T0(Y),j=_.fallback,R=Y.mode,g=X.child,p=g.sibling,_=Gz(g,{mode:"hidden",children:_.children}),_.subtreeFlags=g.subtreeFlags&65011712,p!==null?j=Gz(p,j):(j=ZU(j,R,z,null),j.flags|=2),j.return=Y,_.return=Y,_.sibling=j,Y.child=_,C5(null,_),_=Y.child,j=X.child.memoizedState,j===null?j=FL(z):(R=j.cachePool,R!==null?(g=SX._currentValue,R=R.parent!==g?{parent:g,pool:g}:R):R=yP(),j={baseLanes:j.baseLanes|z,cachePool:R}),_.memoizedState=j,_.childLanes=LL(X,W,z),Y.memoizedState=qO,C5(X.child,_);return D!==null&&(z&62914560)===z&&(z&X.lanes)!==0&&CW(Y),j0(Y),z=X.child,X=z.sibling,z=Gz(z,{mode:"visible",children:_.children}),z.return=Y,z.sibling=null,X!==null&&(W=Y.deletions,W===null?(Y.deletions=[X],Y.flags|=16):W.push(X)),Y.child=z,Y.memoizedState=null,z}function ML(X,Y){return Y=NW({mode:"visible",children:Y},X.mode),Y.return=X,X.child=Y}function NW(X,Y){return X=V(22,X,null,Y),X.lanes=0,X}function OL(X,Y,z){return NU(Y,X.child,null,z),X=ML(Y,Y.pendingProps.children),X.flags|=2,Y.memoizedState=null,X}function vR(X,Y,z){X.lanes|=Y;var W=X.alternate;W!==null&&(W.lanes|=Y),TF(X.return,Y,z)}function VL(X,Y,z,W,_,L){var I=X.memoizedState;I===null?X.memoizedState={isBackwards:Y,rendering:null,renderingStartTime:0,last:W,tail:z,tailMode:_,treeForkCount:L}:(I.isBackwards=Y,I.rendering=null,I.renderingStartTime=0,I.last=W,I.tail=z,I.tailMode=_,I.treeForkCount=L)}function gR(X,Y,z){var W=Y.pendingProps,_=W.revealOrder,L=W.tail,I=W.children,j=CX.current;if((W=(j&M1)!==0)?(j=j&D8|M1,Y.flags|=128):j&=D8,KZ(CX,j,Y),j=_==null?"null":_,_!=="forwards"&&_!=="unstable_legacy-backwards"&&_!=="together"&&_!=="independent"&&!NE[j])if(NE[j]=!0,_==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(_==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof _==="string")switch(_.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',_,_.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',_,_.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',_)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',_);if(j=L==null?"null":L,!A4[j])if(L==null){if(_==="forwards"||_==="backwards"||_==="unstable_legacy-backwards")A4[j]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')}else L!=="visible"&&L!=="collapsed"&&L!=="hidden"?(A4[j]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',L)):_!=="forwards"&&_!=="backwards"&&_!=="unstable_legacy-backwards"&&(A4[j]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',L));Z:if((_==="forwards"||_==="backwards"||_==="unstable_legacy-backwards")&&I!==void 0&&I!==null&&I!==!1)if(cX(I)){for(j=0;j<I.length;j++)if(!cP(I[j],j))break Z}else if(j=a(I),typeof j==="function"){if(j=j.call(I))for(var R=j.next(),D=0;!R.done;R=j.next()){if(!cP(R.value,D))break Z;D++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',_);if(JJ(X,Y,I,z),AQ?(M0(),I=Q1):I=0,!W&&X!==null&&(X.flags&128)!==0)Z:for(X=Y.child;X!==null;){if(X.tag===13)X.memoizedState!==null&&vR(X,z,Y);else if(X.tag===19)vR(X,z,Y);else if(X.child!==null){X.child.return=X,X=X.child;continue}if(X===Y)break Z;for(;X.sibling===null;){if(X.return===null||X.return===Y)break Z;X=X.return}X.sibling.return=X.return,X=X.sibling}switch(_){case"forwards":z=Y.child;for(_=null;z!==null;)X=z.alternate,X!==null&&qW(X)===null&&(_=z),z=z.sibling;z=_,z===null?(_=Y.child,Y.child=null):(_=z.sibling,z.sibling=null),VL(Y,!1,_,z,L,I);break;case"backwards":case"unstable_legacy-backwards":z=null,_=Y.child;for(Y.child=null;_!==null;){if(X=_.alternate,X!==null&&qW(X)===null){Y.child=_;break}X=_.sibling,_.sibling=z,z=_,_=X}VL(Y,!0,z,null,L,I);break;case"together":VL(Y,!1,null,null,void 0,I);break;default:Y.memoizedState=null}return Y.child}function Hz(X,Y,z){if(X!==null&&(Y.dependencies=X.dependencies),bJ=-1,l0|=Y.lanes,(z&Y.childLanes)===0)if(X!==null){if(d6(X,Y,z,!1),(z&Y.childLanes)===0)return null}else return null;if(X!==null&&Y.child!==X.child)throw Error("Resuming work not yet implemented.");if(Y.child!==null){X=Y.child,z=Gz(X,X.pendingProps),Y.child=z;for(z.return=Y;X.sibling!==null;)X=X.sibling,z=z.sibling=Gz(X,X.pendingProps),z.return=Y;z.sibling=null}return Y.child}function AL(X,Y){if((X.lanes&Y)!==0)return!0;return X=X.dependencies,X!==null&&s7(X)?!0:!1}function sl(X,Y,z){switch(Y.tag){case 3:i(Y,Y.stateNode.containerInfo),V0(Y,SX,X.memoizedState.cache),XU();break;case 27:case 5:YZ(Y);break;case 4:i(Y,Y.stateNode.containerInfo);break;case 10:V0(Y,Y.type,Y.memoizedProps.value);break;case 12:(z&Y.childLanes)!==0&&(Y.flags|=4),Y.flags|=2048;var W=Y.stateNode;W.effectDuration=-0,W.passiveEffectDuration=-0;break;case 31:if(Y.memoizedState!==null)return Y.flags|=128,xF(Y),null;break;case 13:if(W=Y.memoizedState,W!==null){if(W.dehydrated!==null)return j0(Y),Y.flags|=128,null;if((z&Y.child.childLanes)!==0)return bR(X,Y,z);return j0(Y),X=Hz(X,Y,z),X!==null?X.sibling:null}j0(Y);break;case 19:var _=(X.flags&128)!==0;if(W=(z&Y.childLanes)!==0,W||(d6(X,Y,z,!1),W=(z&Y.childLanes)!==0),_){if(W)return gR(X,Y,z);Y.flags|=128}if(_=Y.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),KZ(CX,CX.current,Y),W)break;else return null;case 22:return Y.lanes=0,ER(X,Y,z,Y.pendingProps);case 24:V0(Y,SX,X.memoizedState.cache)}return Hz(X,Y,z)}function IL(X,Y,z){if(Y._debugNeedsRemount&&X!==null){z=MF(Y.type,Y.key,Y.pendingProps,Y._debugOwner||null,Y.mode,Y.lanes),z._debugStack=Y._debugStack,z._debugTask=Y._debugTask;var W=Y.return;if(W===null)throw Error("Cannot swap the root fiber.");if(X.alternate=null,Y.alternate=null,z.index=Y.index,z.sibling=Y.sibling,z.return=Y.return,z.ref=Y.ref,z._debugInfo=Y._debugInfo,Y===W.child)W.child=z;else{var _=W.child;if(_===null)throw Error("Expected parent to have a child.");for(;_.sibling!==Y;)if(_=_.sibling,_===null)throw Error("Expected to find the previous sibling.");_.sibling=z}return Y=W.deletions,Y===null?(W.deletions=[X],W.flags|=16):Y.push(X),z.flags|=2,z}if(X!==null)if(X.memoizedProps!==Y.pendingProps||Y.type!==X.type)xX=!0;else{if(!AL(X,z)&&(Y.flags&128)===0)return xX=!1,sl(X,Y,z);xX=(X.flags&131072)!==0?!0:!1}else{if(xX=!1,W=AQ)M0(),W=(Y.flags&1048576)!==0;W&&(W=Y.index,M0(),jP(Y,Q1,W))}switch(Y.lanes=0,Y.tag){case 16:Z:if(W=Y.pendingProps,X=A0(Y.elementType),Y.type=X,typeof X==="function")LF(X)?(W=UU(X,W),Y.tag=1,Y.type=X=e9(X),Y=wR(null,Y,X,W,z)):(Y.tag=0,_L(Y,X),Y.type=X=e9(X),Y=BL(null,Y,X,W,z));else{if(X!==void 0&&X!==null){if(_=X.$$typeof,_===c5){Y.tag=11,Y.type=X=FF(X),Y=CR(null,Y,X,W,z);break Z}else if(_===mW){Y.tag=14,Y=DR(null,Y,X,W,z);break Z}}throw Y="",X!==null&&typeof X==="object"&&X.$$typeof===RY&&(Y=" Did you wrap a component in React.lazy() more than once?"),z=c(X)||X,Error("Element type is invalid. Received a promise that resolves to: "+z+". Lazy element type must resolve to a class or function."+Y)}return Y;case 0:return BL(X,Y,Y.type,Y.pendingProps,z);case 1:return W=Y.type,_=UU(W,Y.pendingProps),wR(X,Y,W,_,z);case 3:Z:{if(i(Y,Y.stateNode.containerInfo),X===null)throw Error("Should have a current fiber. This is a bug in React.");W=Y.pendingProps;var L=Y.memoizedState;_=L.element,SF(X,Y),j5(Y,W,null,z);var I=Y.memoizedState;if(W=I.cache,V0(Y,SX,W),W!==L.cache&&PF(Y,[SX],z,!0),N5(),W=I.element,L.isDehydrated)if(L={element:W,isDehydrated:!1,cache:I.cache},Y.updateQueue.baseState=L,Y.memoizedState=L,Y.flags&256){Y=xR(X,Y,W,z);break Z}else if(W!==_){_=AY(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),Y),L5(_),Y=xR(X,Y,W,z);break Z}else{switch(X=Y.stateNode.containerInfo,X.nodeType){case 9:X=X.body;break;default:X=X.nodeName==="HTML"?X.ownerDocument.body:X}rQ=PY(X.firstChild),GJ=Y,AQ=!0,v0=null,kG=!1,$Y=null,tY=!0,z=r$(Y,null,W,z);for(Y.child=z;z;)z.flags=z.flags&-3|4096,z=z.sibling}else{if(XU(),W===_){Y=Hz(X,Y,z);break Z}JJ(X,Y,W,z)}Y=Y.child}return Y;case 26:return IW(X,Y),X===null?(z=UD(Y.type,null,Y.pendingProps,null))?Y.memoizedState=z:AQ||(z=Y.type,X=Y.pendingProps,W=v(E0.current),W=SW(W).createElement(z),W[qJ]=Y,W[yJ]=X,YJ(W,z,X),pZ(W),Y.stateNode=W):Y.memoizedState=UD(Y.type,X.memoizedProps,Y.pendingProps,X.memoizedState),null;case 27:return YZ(Y),X===null&&AQ&&(W=v(E0.current),_=d(),W=Y.stateNode=GD(Y.type,Y.pendingProps,W,_,!1),kG||(_=sC(W,Y.type,Y.pendingProps,_),_!==null&&(QU(Y,0).serverProps=_)),GJ=Y,tY=!0,_=rQ,D0(Y.type)?($O=_,rQ=PY(W.firstChild)):rQ=_),JJ(X,Y,Y.pendingProps.children,z),IW(X,Y),X===null&&(Y.flags|=4194304),Y.child;case 5:return X===null&&AQ&&(L=d(),W=GF(Y.type,L.ancestorInfo),_=rQ,(I=!_)||(I=vi(_,Y.type,Y.pendingProps,tY),I!==null?(Y.stateNode=I,kG||(L=sC(I,Y.type,Y.pendingProps,L),L!==null&&(QU(Y,0).serverProps=L)),GJ=Y,rQ=PY(I.firstChild),tY=!1,L=!0):L=!1,I=!L),I&&(W&&i7(Y,_),O0(Y))),YZ(Y),_=Y.type,L=Y.pendingProps,I=X!==null?X.memoizedProps:null,W=L.children,lL(_,L)?W=null:I!==null&&lL(_,I)&&(Y.flags|=32),Y.memoizedState!==null&&(_=vF(X,Y,fl,null,null,z),x1._currentValue=_),IW(X,Y),JJ(X,Y,W,z),Y.child;case 6:return X===null&&AQ&&(z=Y.pendingProps,X=d(),W=X.ancestorInfo.current,z=W!=null?v7(z,W.tag,X.ancestorInfo.implicitRootScope):!0,X=rQ,(W=!X)||(W=gi(X,Y.pendingProps,tY),W!==null?(Y.stateNode=W,GJ=Y,rQ=null,W=!0):W=!1,W=!W),W&&(z&&i7(Y,X),O0(Y))),null;case 13:return bR(X,Y,z);case 4:return i(Y,Y.stateNode.containerInfo),W=Y.pendingProps,X===null?Y.child=NU(Y,null,W,z):JJ(X,Y,W,z),Y.child;case 11:return CR(X,Y,Y.type,Y.pendingProps,z);case 7:return JJ(X,Y,Y.pendingProps,z),Y.child;case 8:return JJ(X,Y,Y.pendingProps.children,z),Y.child;case 12:return Y.flags|=4,Y.flags|=2048,W=Y.stateNode,W.effectDuration=-0,W.passiveEffectDuration=-0,JJ(X,Y,Y.pendingProps.children,z),Y.child;case 10:return W=Y.type,_=Y.pendingProps,L=_.value,"value"in _||jE||(jE=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),V0(Y,W,L),JJ(X,Y,_.children,z),Y.child;case 9:return _=Y.type._context,W=Y.pendingProps.children,typeof W!=="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),JU(Y),_=QX(_),W=iM(W,_,void 0),Y.flags|=1,JJ(X,Y,W,z),Y.child;case 14:return DR(X,Y,Y.type,Y.pendingProps,z);case 15:return $R(X,Y,Y.type,Y.pendingProps,z);case 19:return gR(X,Y,z);case 31:return nl(X,Y,z);case 22:return ER(X,Y,z,Y.pendingProps);case 24:return JU(Y),W=QX(SX),X===null?(_=$F(),_===null&&(_=pQ,L=RF(),_.pooledCache=L,YU(L),L!==null&&(_.pooledCacheLanes|=z),_=L),Y.memoizedState={parent:W,cache:_},kF(Y),V0(Y,SX,_)):((X.lanes&z)!==0&&(SF(X,Y),j5(Y,null,null,z),N5()),_=X.memoizedState,L=Y.memoizedState,_.parent!==W?(_={parent:W,cache:W},Y.memoizedState=_,Y.lanes===0&&(Y.memoizedState=Y.updateQueue.baseState=_),V0(Y,SX,W)):(W=L.cache,V0(Y,SX,W),W!==_.cache&&PF(Y,[SX],z,!0))),JJ(X,Y,Y.pendingProps.children,z),Y.child;case 29:throw Y.pendingProps}throw Error("Unknown unit of work tag ("+Y.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Wz(X){X.flags|=4}function NL(X,Y,z,W,_){if(Y=(X.mode&Ls)!==nZ)Y=!1;if(Y){if(X.flags|=16777216,(_&335544128)===_)if(X.stateNode.complete)X.flags|=8192;else if(MC())X.flags|=8192;else throw IU=_4,sM}else X.flags&=-16777217}function hR(X,Y){if(Y.type!=="stylesheet"||(Y.state.loading&Jq)!==yU)X.flags&=-16777217;else if(X.flags|=16777216,!_D(Y))if(MC())X.flags|=8192;else throw IU=_4,sM}function jW(X,Y){Y!==null&&(X.flags|=4),X.flags&16384&&(Y=X.tag!==22?h6():536870912,X.lanes|=Y,CU|=Y)}function D5(X,Y){if(!AQ)switch(X.tailMode){case"hidden":Y=X.tail;for(var z=null;Y!==null;)Y.alternate!==null&&(z=Y),Y=Y.sibling;z===null?X.tail=null:z.sibling=null;break;case"collapsed":z=X.tail;for(var W=null;z!==null;)z.alternate!==null&&(W=z),z=z.sibling;W===null?Y||X.tail===null?X.tail=null:X.tail.sibling=null:W.sibling=null}}function iQ(X){var Y=X.alternate!==null&&X.alternate.child===X.child,z=0,W=0;if(Y)if((X.mode&GQ)!==nZ){for(var{selfBaseDuration:_,child:L}=X;L!==null;)z|=L.lanes|L.childLanes,W|=L.subtreeFlags&65011712,W|=L.flags&65011712,_+=L.treeBaseDuration,L=L.sibling;X.treeBaseDuration=_}else for(_=X.child;_!==null;)z|=_.lanes|_.childLanes,W|=_.subtreeFlags&65011712,W|=_.flags&65011712,_.return=X,_=_.sibling;else if((X.mode&GQ)!==nZ){_=X.actualDuration,L=X.selfBaseDuration;for(var I=X.child;I!==null;)z|=I.lanes|I.childLanes,W|=I.subtreeFlags,W|=I.flags,_+=I.actualDuration,L+=I.treeBaseDuration,I=I.sibling;X.actualDuration=_,X.treeBaseDuration=L}else for(_=X.child;_!==null;)z|=_.lanes|_.childLanes,W|=_.subtreeFlags,W|=_.flags,_.return=X,_=_.sibling;return X.subtreeFlags|=W,X.childLanes=z,Y}function al(X,Y,z){var W=Y.pendingProps;switch(IF(Y),Y.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return iQ(Y),null;case 1:return iQ(Y),null;case 3:if(z=Y.stateNode,W=null,X!==null&&(W=X.memoizedState.cache),Y.memoizedState.cache!==W&&(Y.flags|=2048),Uz(SX,Y),x(Y),z.pendingContext&&(z.context=z.pendingContext,z.pendingContext=null),X===null||X.child===null)p6(Y)?(jF(),Wz(Y)):X===null||X.memoizedState.isDehydrated&&(Y.flags&256)===0||(Y.flags|=1024,NF());return iQ(Y),null;case 26:var{type:_,memoizedState:L}=Y;return X===null?(Wz(Y),L!==null?(iQ(Y),hR(Y,L)):(iQ(Y),NL(Y,_,null,W,z))):L?L!==X.memoizedState?(Wz(Y),iQ(Y),hR(Y,L)):(iQ(Y),Y.flags&=-16777217):(X=X.memoizedProps,X!==W&&Wz(Y),iQ(Y),NL(Y,_,X,W,z)),null;case 27:if(t(Y),z=v(E0.current),_=Y.type,X!==null&&Y.stateNode!=null)X.memoizedProps!==W&&Wz(Y);else{if(!W){if(Y.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return iQ(Y),null}X=d(),p6(Y)?CP(Y,X):(X=GD(_,W,z,X,!0),Y.stateNode=X,Wz(Y))}return iQ(Y),null;case 5:if(t(Y),_=Y.type,X!==null&&Y.stateNode!=null)X.memoizedProps!==W&&Wz(Y);else{if(!W){if(Y.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return iQ(Y),null}var I=d();if(p6(Y))CP(Y,I);else{switch(L=v(E0.current),GF(_,I.ancestorInfo),I=I.context,L=SW(L),I){case u8:L=L.createElementNS(K8,_);break;case u4:L=L.createElementNS(sW,_);break;default:switch(_){case"svg":L=L.createElementNS(K8,_);break;case"math":L=L.createElementNS(sW,_);break;case"script":L=L.createElement("div"),L.innerHTML="<script></script>",L=L.removeChild(L.firstChild);break;case"select":L=typeof W.is==="string"?L.createElement("select",{is:W.is}):L.createElement("select"),W.multiple?L.multiple=!0:W.size&&(L.size=W.size);break;default:L=typeof W.is==="string"?L.createElement(_,{is:W.is}):L.createElement(_),_.indexOf("-")===-1&&(_!==_.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",_),Object.prototype.toString.call(L)!=="[object HTMLUnknownElement]"||wq.call(iE,_)||(iE[_]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",_)))}}L[qJ]=Y,L[yJ]=W;Z:for(I=Y.child;I!==null;){if(I.tag===5||I.tag===6)L.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===Y)break Z;for(;I.sibling===null;){if(I.return===null||I.return===Y)break Z;I=I.return}I.sibling.return=I.return,I=I.sibling}Y.stateNode=L;Z:switch(YJ(L,_,W),_){case"button":case"input":case"select":case"textarea":W=!!W.autoFocus;break Z;case"img":W=!0;break Z;default:W=!1}W&&Wz(Y)}}return iQ(Y),NL(Y,Y.type,X===null?null:X.memoizedProps,Y.pendingProps,z),null;case 6:if(X&&Y.stateNode!=null)X.memoizedProps!==W&&Wz(Y);else{if(typeof W!=="string"&&Y.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(X=v(E0.current),z=d(),p6(Y)){if(X=Y.stateNode,z=Y.memoizedProps,_=!kG,W=null,L=GJ,L!==null)switch(L.tag){case 3:_&&(_=YD(X,z,W),_!==null&&(QU(Y,0).serverProps=_));break;case 27:case 5:W=L.memoizedProps,_&&(_=YD(X,z,W),_!==null&&(QU(Y,0).serverProps=_))}X[qJ]=Y,X=X.nodeValue===z||W!==null&&W.suppressHydrationWarning===!0||pC(X.nodeValue,z)?!0:!1,X||O0(Y,!0)}else _=z.ancestorInfo.current,_!=null&&v7(W,_.tag,z.ancestorInfo.implicitRootScope),X=SW(X).createTextNode(W),X[qJ]=Y,Y.stateNode=X}return iQ(Y),null;case 31:if(z=Y.memoizedState,X===null||X.memoizedState!==null){if(W=p6(Y),z!==null){if(X===null){if(!W)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(X=Y.memoizedState,X=X!==null?X.dehydrated:null,!X)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");X[qJ]=Y,iQ(Y),(Y.mode&GQ)!==nZ&&z!==null&&(X=Y.child,X!==null&&(Y.treeBaseDuration-=X.treeBaseDuration))}else jF(),XU(),(Y.flags&128)===0&&(z=Y.memoizedState=null),Y.flags|=4,iQ(Y),(Y.mode&GQ)!==nZ&&z!==null&&(X=Y.child,X!==null&&(Y.treeBaseDuration-=X.treeBaseDuration));X=!1}else z=NF(),X!==null&&X.memoizedState!==null&&(X.memoizedState.hydrationErrors=z),X=!0;if(!X){if(Y.flags&256)return jY(Y),Y;return jY(Y),null}if((Y.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return iQ(Y),null;case 13:if(W=Y.memoizedState,X===null||X.memoizedState!==null&&X.memoizedState.dehydrated!==null){if(_=W,L=p6(Y),_!==null&&_.dehydrated!==null){if(X===null){if(!L)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(L=Y.memoizedState,L=L!==null?L.dehydrated:null,!L)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");L[qJ]=Y,iQ(Y),(Y.mode&GQ)!==nZ&&_!==null&&(_=Y.child,_!==null&&(Y.treeBaseDuration-=_.treeBaseDuration))}else jF(),XU(),(Y.flags&128)===0&&(_=Y.memoizedState=null),Y.flags|=4,iQ(Y),(Y.mode&GQ)!==nZ&&_!==null&&(_=Y.child,_!==null&&(Y.treeBaseDuration-=_.treeBaseDuration));_=!1}else _=NF(),X!==null&&X.memoizedState!==null&&(X.memoizedState.hydrationErrors=_),_=!0;if(!_){if(Y.flags&256)return jY(Y),Y;return jY(Y),null}}if(jY(Y),(Y.flags&128)!==0)return Y.lanes=z,(Y.mode&GQ)!==nZ&&V5(Y),Y;return z=W!==null,X=X!==null&&X.memoizedState!==null,z&&(W=Y.child,_=null,W.alternate!==null&&W.alternate.memoizedState!==null&&W.alternate.memoizedState.cachePool!==null&&(_=W.alternate.memoizedState.cachePool.pool),L=null,W.memoizedState!==null&&W.memoizedState.cachePool!==null&&(L=W.memoizedState.cachePool.pool),L!==_&&(W.flags|=2048)),z!==X&&z&&(Y.child.flags|=8192),jW(Y,Y.updateQueue),iQ(Y),(Y.mode&GQ)!==nZ&&z&&(X=Y.child,X!==null&&(Y.treeBaseDuration-=X.treeBaseDuration)),null;case 4:return x(Y),X===null&&hL(Y.stateNode.containerInfo),iQ(Y),null;case 10:return Uz(Y.type,Y),iQ(Y),null;case 19:if(HZ(CX,Y),W=Y.memoizedState,W===null)return iQ(Y),null;if(_=(Y.flags&128)!==0,L=W.rendering,L===null)if(_)D5(W,!1);else{if(UX!==Cz||X!==null&&(X.flags&128)!==0)for(X=Y.child;X!==null;){if(L=qW(X),L!==null){Y.flags|=128,D5(W,!1),X=L.updateQueue,Y.updateQueue=X,jW(Y,X),Y.subtreeFlags=0,X=z;for(z=Y.child;z!==null;)IP(z,X),z=z.sibling;return KZ(CX,CX.current&D8|M1,Y),AQ&&zz(Y,W.treeForkCount),Y.child}X=X.sibling}W.tail!==null&&sX()>C4&&(Y.flags|=128,_=!0,D5(W,!1),Y.lanes=4194304)}else{if(!_)if(X=qW(L),X!==null){if(Y.flags|=128,_=!0,X=X.updateQueue,Y.updateQueue=X,jW(Y,X),D5(W,!0),W.tail===null&&W.tailMode==="hidden"&&!L.alternate&&!AQ)return iQ(Y),null}else 2*sX()-W.renderingStartTime>C4&&z!==536870912&&(Y.flags|=128,_=!0,D5(W,!1),Y.lanes=4194304);W.isBackwards?(L.sibling=Y.child,Y.child=L):(X=W.last,X!==null?X.sibling=L:Y.child=L,W.last=L)}if(W.tail!==null)return X=W.tail,W.rendering=X,W.tail=X.sibling,W.renderingStartTime=sX(),X.sibling=null,z=CX.current,z=_?z&D8|M1:z&D8,KZ(CX,z,Y),AQ&&zz(Y,W.treeForkCount),X;return iQ(Y),null;case 22:case 23:return jY(Y),wF(Y),W=Y.memoizedState!==null,X!==null?X.memoizedState!==null!==W&&(Y.flags|=8192):W&&(Y.flags|=8192),W?(z&536870912)!==0&&(Y.flags&128)===0&&(iQ(Y),Y.subtreeFlags&6&&(Y.flags|=8192)):iQ(Y),z=Y.updateQueue,z!==null&&jW(Y,z.retryQueue),z=null,X!==null&&X.memoizedState!==null&&X.memoizedState.cachePool!==null&&(z=X.memoizedState.cachePool.pool),W=null,Y.memoizedState!==null&&Y.memoizedState.cachePool!==null&&(W=Y.memoizedState.cachePool.pool),W!==z&&(Y.flags|=2048),X!==null&&HZ(VU,Y),null;case 24:return z=null,X!==null&&(z=X.memoizedState.cache),Y.memoizedState.cache!==z&&(Y.flags|=2048),Uz(SX,Y),iQ(Y),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+Y.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function rl(X,Y){switch(IF(Y),Y.tag){case 1:return X=Y.flags,X&65536?(Y.flags=X&-65537|128,(Y.mode&GQ)!==nZ&&V5(Y),Y):null;case 3:return Uz(SX,Y),x(Y),X=Y.flags,(X&65536)!==0&&(X&128)===0?(Y.flags=X&-65537|128,Y):null;case 26:case 27:case 5:return t(Y),null;case 31:if(Y.memoizedState!==null){if(jY(Y),Y.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");XU()}return X=Y.flags,X&65536?(Y.flags=X&-65537|128,(Y.mode&GQ)!==nZ&&V5(Y),Y):null;case 13:if(jY(Y),X=Y.memoizedState,X!==null&&X.dehydrated!==null){if(Y.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");XU()}return X=Y.flags,X&65536?(Y.flags=X&-65537|128,(Y.mode&GQ)!==nZ&&V5(Y),Y):null;case 19:return HZ(CX,Y),null;case 4:return x(Y),null;case 10:return Uz(Y.type,Y),null;case 22:case 23:return jY(Y),wF(Y),X!==null&&HZ(VU,Y),X=Y.flags,X&65536?(Y.flags=X&-65537|128,(Y.mode&GQ)!==nZ&&V5(Y),Y):null;case 24:return Uz(SX,Y),null;case 25:return null;default:return null}}function uR(X,Y){switch(IF(Y),Y.tag){case 3:Uz(SX,Y),x(Y);break;case 26:case 27:case 5:t(Y);break;case 4:x(Y);break;case 31:Y.memoizedState!==null&&jY(Y);break;case 13:jY(Y);break;case 19:HZ(CX,Y);break;case 10:Uz(Y.type,Y);break;case 22:case 23:jY(Y),wF(Y),X!==null&&HZ(VU,Y);break;case 24:Uz(SX,Y)}}function OG(X){return(X.mode&GQ)!==nZ}function fR(X,Y){OG(X)?(MG(),$5(Y,X),LG()):$5(Y,X)}function jL(X,Y,z){OG(X)?(MG(),a6(z,X,Y),LG()):a6(z,X,Y)}function $5(X,Y){try{var z=Y.updateQueue,W=z!==null?z.lastEffect:null;if(W!==null){var _=W.next;z=_;do{if((z.tag&X)===X&&(W=void 0,(X&vJ)!==L4&&(v8=!0),W=BZ(Y,Is,z),(X&vJ)!==L4&&(v8=!1),W!==void 0&&typeof W!=="function")){var L=void 0;L=(z.tag&kY)!==0?"useLayoutEffect":(z.tag&vJ)!==0?"useInsertionEffect":"useEffect";var I=void 0;I=W===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof W.then==="function"?`
|
|
146
|
+
|
|
147
|
+
It looks like you wrote `+L+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
148
|
+
|
|
149
|
+
`+L+`(() => {
|
|
150
|
+
async function fetchData() {
|
|
151
|
+
// You can await here
|
|
152
|
+
const response = await MyAPI.getData(someId);
|
|
153
|
+
// ...
|
|
154
|
+
}
|
|
155
|
+
fetchData();
|
|
156
|
+
}, [someId]); // Or [] if effect doesn't need props or state
|
|
157
|
+
|
|
158
|
+
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+W,BZ(Y,function(j,R){console.error("%s must not return anything besides a function, which is used for clean-up.%s",j,R)},L,I)}z=z.next}while(z!==_)}}catch(j){bQ(Y,Y.return,j)}}function a6(X,Y,z){try{var W=Y.updateQueue,_=W!==null?W.lastEffect:null;if(_!==null){var L=_.next;W=L;do{if((W.tag&X)===X){var I=W.inst,j=I.destroy;j!==void 0&&(I.destroy=void 0,(X&vJ)!==L4&&(v8=!0),_=Y,BZ(_,Ns,_,z,j),(X&vJ)!==L4&&(v8=!1))}W=W.next}while(W!==L)}}catch(R){bQ(Y,Y.return,R)}}function mR(X,Y){OG(X)?(MG(),$5(Y,X),LG()):$5(Y,X)}function TL(X,Y,z){OG(X)?(MG(),a6(z,X,Y),LG()):a6(z,X,Y)}function cR(X){var Y=X.updateQueue;if(Y!==null){var z=X.stateNode;X.type.defaultProps||"ref"in X.memoizedProps||S8||(z.props!==X.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",s(X)||"instance"),z.state!==X.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",s(X)||"instance"));try{BZ(X,dP,Y,z)}catch(W){bQ(X,X.return,W)}}}function ol(X,Y,z){return X.getSnapshotBeforeUpdate(Y,z)}function tl(X,Y){var{memoizedProps:z,memoizedState:W}=Y;Y=X.stateNode,X.type.defaultProps||"ref"in X.memoizedProps||S8||(Y.props!==X.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",s(X)||"instance"),Y.state!==X.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",s(X)||"instance"));try{var _=UU(X.type,z),L=BZ(X,ol,Y,_,W);z=TE,L!==void 0||z.has(X.type)||(z.add(X.type),BZ(X,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",s(X))})),Y.__reactInternalSnapshotBeforeUpdate=L}catch(I){bQ(X,X.return,I)}}function pR(X,Y,z){z.props=UU(X.type,X.memoizedProps),z.state=X.memoizedState,OG(X)?(MG(),BZ(X,c$,X,Y,z),LG()):BZ(X,c$,X,Y,z)}function el(X){var Y=X.ref;if(Y!==null){switch(X.tag){case 26:case 27:case 5:var z=X.stateNode;break;case 30:z=X.stateNode;break;default:z=X.stateNode}if(typeof Y==="function")if(OG(X))try{MG(),X.refCleanup=Y(z)}finally{LG()}else X.refCleanup=Y(z);else typeof Y==="string"?console.error("String refs are no longer supported."):Y.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",s(X)),Y.current=z}}function E5(X,Y){try{BZ(X,el,X)}catch(z){bQ(X,Y,z)}}function VG(X,Y){var{ref:z,refCleanup:W}=X;if(z!==null)if(typeof W==="function")try{if(OG(X))try{MG(),BZ(X,W)}finally{LG(X)}else BZ(X,W)}catch(_){bQ(X,Y,_)}finally{X.refCleanup=null,X=X.alternate,X!=null&&(X.refCleanup=null)}else if(typeof z==="function")try{if(OG(X))try{MG(),BZ(X,z,null)}finally{LG(X)}else BZ(X,z,null)}catch(_){bQ(X,Y,_)}else z.current=null}function dR(X,Y,z,W){var _=X.memoizedProps,L=_.id,I=_.onCommit;_=_.onRender,Y=Y===null?"mount":"update",K4&&(Y="nested-update"),typeof _==="function"&&_(L,Y,X.actualDuration,X.treeBaseDuration,X.actualStartTime,z),typeof I==="function"&&I(L,Y,W,z)}function Zi(X,Y,z,W){var _=X.memoizedProps;X=_.id,_=_.onPostCommit,Y=Y===null?"mount":"update",K4&&(Y="nested-update"),typeof _==="function"&&_(X,Y,W,z)}function lR(X){var{type:Y,memoizedProps:z,stateNode:W}=X;try{BZ(X,Pi,W,Y,z,X)}catch(_){bQ(X,X.return,_)}}function PL(X,Y,z){try{BZ(X,Ci,X.stateNode,X.type,z,Y,X)}catch(W){bQ(X,X.return,W)}}function iR(X){return X.tag===5||X.tag===3||X.tag===26||X.tag===27&&D0(X.type)||X.tag===4}function RL(X){Z:for(;;){for(;X.sibling===null;){if(X.return===null||iR(X.return))return null;X=X.return}X.sibling.return=X.return;for(X=X.sibling;X.tag!==5&&X.tag!==6&&X.tag!==18;){if(X.tag===27&&D0(X.type))continue Z;if(X.flags&2)continue Z;if(X.child===null||X.tag===4)continue Z;else X.child.return=X,X=X.child}if(!(X.flags&2))return X.stateNode}}function CL(X,Y,z){var W=X.tag;if(W===5||W===6)X=X.stateNode,Y?(eC(z),(z.nodeType===9?z.body:z.nodeName==="HTML"?z.ownerDocument.body:z).insertBefore(X,Y)):(eC(z),Y=z.nodeType===9?z.body:z.nodeName==="HTML"?z.ownerDocument.body:z,Y.appendChild(X),z=z._reactRootContainer,z!==null&&z!==void 0||Y.onclick!==null||(Y.onclick=qz));else if(W!==4&&(W===27&&D0(X.type)&&(z=X.stateNode,Y=null),X=X.child,X!==null))for(CL(X,Y,z),X=X.sibling;X!==null;)CL(X,Y,z),X=X.sibling}function TW(X,Y,z){var W=X.tag;if(W===5||W===6)X=X.stateNode,Y?z.insertBefore(X,Y):z.appendChild(X);else if(W!==4&&(W===27&&D0(X.type)&&(z=X.stateNode),X=X.child,X!==null))for(TW(X,Y,z),X=X.sibling;X!==null;)TW(X,Y,z),X=X.sibling}function Qi(X){for(var Y,z=X.return;z!==null;){if(iR(z)){Y=z;break}z=z.return}if(Y==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(Y.tag){case 27:Y=Y.stateNode,z=RL(X),TW(X,z,Y);break;case 5:z=Y.stateNode,Y.flags&32&&(tC(z),Y.flags&=-33),Y=RL(X),TW(X,Y,z);break;case 3:case 4:Y=Y.stateNode.containerInfo,z=RL(X),CL(X,z,Y);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function nR(X){var{stateNode:Y,memoizedProps:z}=X;try{BZ(X,ci,X.type,z,Y,X)}catch(W){bQ(X,X.return,W)}}function sR(X,Y){return Y.tag===31?(Y=Y.memoizedState,X.memoizedState!==null&&Y===null):Y.tag===13?(X=X.memoizedState,Y=Y.memoizedState,X!==null&&X.dehydrated!==null&&(Y===null||Y.dehydrated===null)):Y.tag===3?X.memoizedState.isDehydrated&&(Y.flags&256)===0:!1}function Xi(X,Y){if(X=X.containerInfo,RO=p4,X=HP(X),KF(X)){if("selectionStart"in X)var z={start:X.selectionStart,end:X.selectionEnd};else Z:{z=(z=X.ownerDocument)&&z.defaultView||window;var W=z.getSelection&&z.getSelection();if(W&&W.rangeCount!==0){z=W.anchorNode;var{anchorOffset:_,focusNode:L}=W;W=W.focusOffset;try{z.nodeType,L.nodeType}catch(VZ){z=null;break Z}var I=0,j=-1,R=-1,D=0,p=0,l=X,g=null;Q:for(;;){for(var ZZ;;){if(l!==z||_!==0&&l.nodeType!==3||(j=I+_),l!==L||W!==0&&l.nodeType!==3||(R=I+W),l.nodeType===3&&(I+=l.nodeValue.length),(ZZ=l.firstChild)===null)break;g=l,l=ZZ}for(;;){if(l===X)break Q;if(g===z&&++D===_&&(j=I),g===L&&++p===W&&(R=I),(ZZ=l.nextSibling)!==null)break;l=g,g=l.parentNode}l=ZZ}z=j===-1||R===-1?null:{start:j,end:R}}else z=null}z=z||{start:0,end:0}}else z=null;CO={focusedElem:X,selectionRange:z},p4=!1;for(rX=Y;rX!==null;)if(Y=rX,X=Y.child,(Y.subtreeFlags&1028)!==0&&X!==null)X.return=Y,rX=X;else for(;rX!==null;){switch(X=Y=rX,z=X.alternate,_=X.flags,X.tag){case 0:if((_&4)!==0&&(X=X.updateQueue,X=X!==null?X.events:null,X!==null))for(z=0;z<X.length;z++)_=X[z],_.ref.impl=_.nextImpl;break;case 11:case 15:break;case 1:(_&1024)!==0&&z!==null&&tl(X,z);break;case 3:if((_&1024)!==0){if(X=X.stateNode.containerInfo,z=X.nodeType,z===9)iL(X);else if(z===1)switch(X.nodeName){case"HEAD":case"HTML":case"BODY":iL(X);break;default:X.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((_&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(X=Y.sibling,X!==null){X.return=Y.return,rX=X;break}rX=Y.return}}function aR(X,Y,z){var W=IY(),_=WG(),L=_G(),I=FG(),j=z.flags;switch(z.tag){case 0:case 11:case 15:AG(X,z),j&4&&fR(z,kY|Qq);break;case 1:if(AG(X,z),j&4)if(X=z.stateNode,Y===null)z.type.defaultProps||"ref"in z.memoizedProps||S8||(X.props!==z.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",s(z)||"instance"),X.state!==z.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",s(z)||"instance")),OG(z)?(MG(),BZ(z,nM,z,X),LG()):BZ(z,nM,z,X);else{var R=UU(z.type,Y.memoizedProps);Y=Y.memoizedState,z.type.defaultProps||"ref"in z.memoizedProps||S8||(X.props!==z.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",s(z)||"instance"),X.state!==z.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",s(z)||"instance")),OG(z)?(MG(),BZ(z,u$,z,X,R,Y,X.__reactInternalSnapshotBeforeUpdate),LG()):BZ(z,u$,z,X,R,Y,X.__reactInternalSnapshotBeforeUpdate)}j&64&&cR(z),j&512&&E5(z,z.return);break;case 3:if(Y=Kz(),AG(X,z),j&64&&(j=z.updateQueue,j!==null)){if(R=null,z.child!==null)switch(z.child.tag){case 27:case 5:R=z.child.stateNode;break;case 1:R=z.child.stateNode}try{BZ(z,dP,j,R)}catch(p){bQ(z,z.return,p)}}X.effectDuration+=r7(Y);break;case 27:Y===null&&j&4&&nR(z);case 26:case 5:if(AG(X,z),Y===null){if(j&4)lR(z);else if(j&64){X=z.type,Y=z.memoizedProps,R=z.stateNode;try{BZ(z,Ri,R,X,Y,z)}catch(p){bQ(z,z.return,p)}}}j&512&&E5(z,z.return);break;case 12:if(j&4){j=Kz(),AG(X,z),X=z.stateNode,X.effectDuration+=O5(j);try{BZ(z,dR,z,Y,g0,X.effectDuration)}catch(p){bQ(z,z.return,p)}}else AG(X,z);break;case 31:AG(X,z),j&4&&tR(X,z);break;case 13:AG(X,z),j&4&&eR(X,z),j&64&&(X=z.memoizedState,X!==null&&(X=X.dehydrated,X!==null&&(j=Wi.bind(null,z),hi(X,j))));break;case 22:if(j=z.memoizedState!==null||Rz,!j){Y=Y!==null&&Y.memoizedState!==null||bX,R=Rz;var D=bX;Rz=j,(bX=Y)&&!D?(IG(X,z,(z.subtreeFlags&8772)!==0),(z.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&0.05<iZ-dZ&&f7(z,dZ,iZ)):AG(X,z),Rz=R,bX=D}break;case 30:break;default:AG(X,z)}(z.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&((WX||0.05<zX)&&KG(z,dZ,iZ,zX,XX),z.alternate===null&&z.return!==null&&z.return.alternate!==null&&0.05<iZ-dZ&&(sR(z.return.alternate,z.return)||UG(z,dZ,iZ,"Mount"))),NY(W),BG(_),XX=L,WX=I}function rR(X){var Y=X.alternate;Y!==null&&(X.alternate=null,rR(Y)),X.child=null,X.deletions=null,X.sibling=null,X.tag===5&&(Y=X.stateNode,Y!==null&&NZ(Y)),X.stateNode=null,X._debugOwner=null,X.return=null,X.dependencies=null,X.memoizedProps=null,X.memoizedState=null,X.pendingProps=null,X.stateNode=null,X.updateQueue=null}function Bz(X,Y,z){for(z=z.child;z!==null;)oR(X,Y,z),z=z.sibling}function oR(X,Y,z){if(NJ&&typeof NJ.onCommitFiberUnmount==="function")try{NJ.onCommitFiberUnmount(z8,z)}catch(D){CG||(CG=!0,console.error("React instrumentation encountered an error: %o",D))}var W=IY(),_=WG(),L=_G(),I=FG();switch(z.tag){case 26:bX||VG(z,Y),Bz(X,Y,z),z.memoizedState?z.memoizedState.count--:z.stateNode&&(X=z.stateNode,X.parentNode.removeChild(X));break;case 27:bX||VG(z,Y);var j=vX,R=ZY;D0(z.type)&&(vX=z.stateNode,ZY=!1),Bz(X,Y,z),BZ(z,h5,z.stateNode),vX=j,ZY=R;break;case 5:bX||VG(z,Y);case 6:if(j=vX,R=ZY,vX=null,Bz(X,Y,z),vX=j,ZY=R,vX!==null)if(ZY)try{BZ(z,Ei,vX,z.stateNode)}catch(D){bQ(z,Y,D)}else try{BZ(z,$i,vX,z.stateNode)}catch(D){bQ(z,Y,D)}break;case 18:vX!==null&&(ZY?(X=vX,ZD(X.nodeType===9?X.body:X.nodeName==="HTML"?X.ownerDocument.body:X,z.stateNode),J8(X)):ZD(vX,z.stateNode));break;case 4:j=vX,R=ZY,vX=z.stateNode.containerInfo,ZY=!0,Bz(X,Y,z),vX=j,ZY=R;break;case 0:case 11:case 14:case 15:a6(vJ,z,Y),bX||jL(z,Y,kY),Bz(X,Y,z);break;case 1:bX||(VG(z,Y),j=z.stateNode,typeof j.componentWillUnmount==="function"&&pR(z,Y,j)),Bz(X,Y,z);break;case 21:Bz(X,Y,z);break;case 22:bX=(j=bX)||z.memoizedState!==null,Bz(X,Y,z),bX=j;break;default:Bz(X,Y,z)}(z.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&(WX||0.05<zX)&&KG(z,dZ,iZ,zX,XX),NY(W),BG(_),XX=L,WX=I}function tR(X,Y){if(Y.memoizedState===null&&(X=Y.alternate,X!==null&&(X=X.memoizedState,X!==null))){X=X.dehydrated;try{BZ(Y,fi,X)}catch(z){bQ(Y,Y.return,z)}}}function eR(X,Y){if(Y.memoizedState===null&&(X=Y.alternate,X!==null&&(X=X.memoizedState,X!==null&&(X=X.dehydrated,X!==null))))try{BZ(Y,mi,X)}catch(z){bQ(Y,Y.return,z)}}function Ji(X){switch(X.tag){case 31:case 13:case 19:var Y=X.stateNode;return Y===null&&(Y=X.stateNode=new PE),Y;case 22:return X=X.stateNode,Y=X._retryCache,Y===null&&(Y=X._retryCache=new PE),Y;default:throw Error("Unexpected Suspense handler tag ("+X.tag+"). This is a bug in React.")}}function PW(X,Y){var z=Ji(X);Y.forEach(function(W){if(!z.has(W)){if(z.add(W),DG)if(y8!==null&&w8!==null)w5(w8,y8);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var _=Bi.bind(null,X,W);W.then(_,_)}})}function tJ(X,Y){var z=Y.deletions;if(z!==null)for(var W=0;W<z.length;W++){var _=X,L=Y,I=z[W],j=IY(),R=L;Z:for(;R!==null;){switch(R.tag){case 27:if(D0(R.type)){vX=R.stateNode,ZY=!1;break Z}break;case 5:vX=R.stateNode,ZY=!1;break Z;case 3:case 4:vX=R.stateNode.containerInfo,ZY=!0;break Z}R=R.return}if(vX===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");oR(_,L,I),vX=null,ZY=!1,(I.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&0.05<iZ-dZ&&UG(I,dZ,iZ,"Unmount"),NY(j),_=I,L=_.alternate,L!==null&&(L.return=null),_.return=null}if(Y.subtreeFlags&13886)for(Y=Y.child;Y!==null;)ZC(Y,X),Y=Y.sibling}function ZC(X,Y){var z=IY(),W=WG(),_=_G(),L=FG(),I=X.alternate,j=X.flags;switch(X.tag){case 0:case 11:case 14:case 15:tJ(Y,X),eJ(X),j&4&&(a6(vJ|Qq,X,X.return),$5(vJ|Qq,X),jL(X,X.return,kY|Qq));break;case 1:if(tJ(Y,X),eJ(X),j&512&&(bX||I===null||VG(I,I.return)),j&64&&Rz&&(j=X.updateQueue,j!==null&&(I=j.callbacks,I!==null))){var R=j.shared.hiddenCallbacks;j.shared.hiddenCallbacks=R===null?I:R.concat(I)}break;case 26:if(R=hq,tJ(Y,X),eJ(X),j&512&&(bX||I===null||VG(I,I.return)),j&4){var D=I!==null?I.memoizedState:null;if(j=X.memoizedState,I===null)if(j===null)if(X.stateNode===null){Z:{j=X.type,I=X.memoizedProps,R=R.ownerDocument||R;Q:switch(j){case"title":if(D=R.getElementsByTagName("title")[0],!D||D[l5]||D[qJ]||D.namespaceURI===K8||D.hasAttribute("itemprop"))D=R.createElement(j),R.head.insertBefore(D,R.querySelector("head > title"));YJ(D,j,I),D[qJ]=X,pZ(D),j=D;break Z;case"link":var p=WD("link","href",R).get(j+(I.href||""));if(p){for(var l=0;l<p.length;l++)if(D=p[l],D.getAttribute("href")===(I.href==null||I.href===""?null:I.href)&&D.getAttribute("rel")===(I.rel==null?null:I.rel)&&D.getAttribute("title")===(I.title==null?null:I.title)&&D.getAttribute("crossorigin")===(I.crossOrigin==null?null:I.crossOrigin)){p.splice(l,1);break Q}}D=R.createElement(j),YJ(D,j,I),R.head.appendChild(D);break;case"meta":if(p=WD("meta","content",R).get(j+(I.content||""))){for(l=0;l<p.length;l++)if(D=p[l],gZ(I.content,"content"),D.getAttribute("content")===(I.content==null?null:""+I.content)&&D.getAttribute("name")===(I.name==null?null:I.name)&&D.getAttribute("property")===(I.property==null?null:I.property)&&D.getAttribute("http-equiv")===(I.httpEquiv==null?null:I.httpEquiv)&&D.getAttribute("charset")===(I.charSet==null?null:I.charSet)){p.splice(l,1);break Q}}D=R.createElement(j),YJ(D,j,I),R.head.appendChild(D);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+j+'". This is a bug in React.')}D[qJ]=X,pZ(D),j=D}X.stateNode=j}else BD(R,X.type,X.stateNode);else X.stateNode=HD(R,j,X.memoizedProps);else D!==j?(D===null?I.stateNode!==null&&(I=I.stateNode,I.parentNode.removeChild(I)):D.count--,j===null?BD(R,X.type,X.stateNode):HD(R,j,X.memoizedProps)):j===null&&X.stateNode!==null&&PL(X,X.memoizedProps,I.memoizedProps)}break;case 27:tJ(Y,X),eJ(X),j&512&&(bX||I===null||VG(I,I.return)),I!==null&&j&4&&PL(X,X.memoizedProps,I.memoizedProps);break;case 5:if(tJ(Y,X),eJ(X),j&512&&(bX||I===null||VG(I,I.return)),X.flags&32){R=X.stateNode;try{BZ(X,tC,R)}catch(RZ){bQ(X,X.return,RZ)}}j&4&&X.stateNode!=null&&(R=X.memoizedProps,PL(X,R,I!==null?I.memoizedProps:R)),j&1024&&(GO=!0,X.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(tJ(Y,X),eJ(X),j&4){if(X.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");j=X.memoizedProps,I=I!==null?I.memoizedProps:j,R=X.stateNode;try{BZ(X,Di,R,I,j)}catch(RZ){bQ(X,X.return,RZ)}}break;case 3:if(R=Kz(),f4=null,D=hq,hq=yW(Y.containerInfo),tJ(Y,X),hq=D,eJ(X),j&4&&I!==null&&I.memoizedState.isDehydrated)try{BZ(X,ui,Y.containerInfo)}catch(RZ){bQ(X,X.return,RZ)}GO&&(GO=!1,QC(X)),Y.effectDuration+=r7(R);break;case 4:j=hq,hq=yW(X.stateNode.containerInfo),tJ(Y,X),eJ(X),hq=j;break;case 12:j=Kz(),tJ(Y,X),eJ(X),X.stateNode.effectDuration+=O5(j);break;case 31:tJ(Y,X),eJ(X),j&4&&(j=X.updateQueue,j!==null&&(X.updateQueue=null,PW(X,j)));break;case 13:tJ(Y,X),eJ(X),X.child.flags&8192&&X.memoizedState!==null!==(I!==null&&I.memoizedState!==null)&&(R4=sX()),j&4&&(j=X.updateQueue,j!==null&&(X.updateQueue=null,PW(X,j)));break;case 22:R=X.memoizedState!==null;var g=I!==null&&I.memoizedState!==null,ZZ=Rz,VZ=bX;if(Rz=ZZ||R,bX=VZ||g,tJ(Y,X),bX=VZ,Rz=ZZ,g&&!R&&!ZZ&&!VZ&&(X.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&0.05<iZ-dZ&&f7(X,dZ,iZ),eJ(X),j&8192)Z:for(Y=X.stateNode,Y._visibility=R?Y._visibility&~Z1:Y._visibility|Z1,!R||I===null||g||Rz||bX||(KU(X),(X.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&0.05<iZ-dZ&&UG(X,dZ,iZ,"Disconnect")),I=null,Y=X;;){if(Y.tag===5||Y.tag===26){if(I===null){g=I=Y;try{D=g.stateNode,R?BZ(g,Si,D):BZ(g,xi,g.stateNode,g.memoizedProps)}catch(RZ){bQ(g,g.return,RZ)}}}else if(Y.tag===6){if(I===null){g=Y;try{p=g.stateNode,R?BZ(g,yi,p):BZ(g,bi,p,g.memoizedProps)}catch(RZ){bQ(g,g.return,RZ)}}}else if(Y.tag===18){if(I===null){g=Y;try{l=g.stateNode,R?BZ(g,ki,l):BZ(g,wi,g.stateNode)}catch(RZ){bQ(g,g.return,RZ)}}}else if((Y.tag!==22&&Y.tag!==23||Y.memoizedState===null||Y===X)&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===X)break Z;for(;Y.sibling===null;){if(Y.return===null||Y.return===X)break Z;I===Y&&(I=null),Y=Y.return}I===Y&&(I=null),Y.sibling.return=Y.return,Y=Y.sibling}j&4&&(j=X.updateQueue,j!==null&&(I=j.retryQueue,I!==null&&(j.retryQueue=null,PW(X,I))));break;case 19:tJ(Y,X),eJ(X),j&4&&(j=X.updateQueue,j!==null&&(X.updateQueue=null,PW(X,j)));break;case 30:break;case 21:break;default:tJ(Y,X),eJ(X)}(X.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&((WX||0.05<zX)&&KG(X,dZ,iZ,zX,XX),X.alternate===null&&X.return!==null&&X.return.alternate!==null&&0.05<iZ-dZ&&(sR(X.return.alternate,X.return)||UG(X,dZ,iZ,"Mount"))),NY(z),BG(W),XX=_,WX=L}function eJ(X){var Y=X.flags;if(Y&2){try{BZ(X,Qi,X)}catch(z){bQ(X,X.return,z)}X.flags&=-3}Y&4096&&(X.flags&=-4097)}function QC(X){if(X.subtreeFlags&1024)for(X=X.child;X!==null;){var Y=X;QC(Y),Y.tag===5&&Y.flags&1024&&Y.stateNode.reset(),X=X.sibling}}function AG(X,Y){if(Y.subtreeFlags&8772)for(Y=Y.child;Y!==null;)aR(X,Y.alternate,Y),Y=Y.sibling}function XC(X){var Y=IY(),z=WG(),W=_G(),_=FG();switch(X.tag){case 0:case 11:case 14:case 15:jL(X,X.return,kY),KU(X);break;case 1:VG(X,X.return);var L=X.stateNode;typeof L.componentWillUnmount==="function"&&pR(X,X.return,L),KU(X);break;case 27:BZ(X,h5,X.stateNode);case 26:case 5:VG(X,X.return),KU(X);break;case 22:X.memoizedState===null&&KU(X);break;case 30:KU(X);break;default:KU(X)}(X.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&(WX||0.05<zX)&&KG(X,dZ,iZ,zX,XX),NY(Y),BG(z),XX=W,WX=_}function KU(X){for(X=X.child;X!==null;)XC(X),X=X.sibling}function JC(X,Y,z,W){var _=IY(),L=WG(),I=_G(),j=FG(),R=z.flags;switch(z.tag){case 0:case 11:case 15:IG(X,z,W),fR(z,kY);break;case 1:if(IG(X,z,W),Y=z.stateNode,typeof Y.componentDidMount==="function"&&BZ(z,nM,z,Y),Y=z.updateQueue,Y!==null){X=z.stateNode;try{BZ(z,ul,Y,X)}catch(D){bQ(z,z.return,D)}}W&&R&64&&cR(z),E5(z,z.return);break;case 27:nR(z);case 26:case 5:IG(X,z,W),W&&Y===null&&R&4&&lR(z),E5(z,z.return);break;case 12:if(W&&R&4){R=Kz(),IG(X,z,W),W=z.stateNode,W.effectDuration+=O5(R);try{BZ(z,dR,z,Y,g0,W.effectDuration)}catch(D){bQ(z,z.return,D)}}else IG(X,z,W);break;case 31:IG(X,z,W),W&&R&4&&tR(X,z);break;case 13:IG(X,z,W),W&&R&4&&eR(X,z);break;case 22:z.memoizedState===null&&IG(X,z,W),E5(z,z.return);break;case 30:break;default:IG(X,z,W)}(z.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&(WX||0.05<zX)&&KG(z,dZ,iZ,zX,XX),NY(_),BG(L),XX=I,WX=j}function IG(X,Y,z){z=z&&(Y.subtreeFlags&8772)!==0;for(Y=Y.child;Y!==null;)JC(X,Y.alternate,Y,z),Y=Y.sibling}function DL(X,Y){var z=null;X!==null&&X.memoizedState!==null&&X.memoizedState.cachePool!==null&&(z=X.memoizedState.cachePool.pool),X=null,Y.memoizedState!==null&&Y.memoizedState.cachePool!==null&&(X=Y.memoizedState.cachePool.pool),X!==z&&(X!=null&&YU(X),z!=null&&M5(z))}function $L(X,Y){X=null,Y.alternate!==null&&(X=Y.alternate.memoizedState.cache),Y=Y.memoizedState.cache,Y!==X&&(YU(Y),X!=null&&M5(X))}function yq(X,Y,z,W,_){if(Y.subtreeFlags&10256||Y.actualDuration!==0&&(Y.alternate===null||Y.alternate.child!==Y.child))for(Y=Y.child;Y!==null;){var L=Y.sibling;YC(X,Y,z,W,L!==null?L.actualStartTime:_),Y=L}}function YC(X,Y,z,W,_){var L=IY(),I=WG(),j=_G(),R=FG(),D=w0,p=Y.flags;switch(Y.tag){case 0:case 11:case 15:(Y.mode&GQ)!==nZ&&0<Y.actualStartTime&&(Y.flags&1)!==0&&m7(Y,Y.actualStartTime,_,pX,z),yq(X,Y,z,W,_),p&2048&&mR(Y,gJ|Qq);break;case 1:(Y.mode&GQ)!==nZ&&0<Y.actualStartTime&&((Y.flags&128)!==0?WF(Y,Y.actualStartTime,_,[]):(Y.flags&1)!==0&&m7(Y,Y.actualStartTime,_,pX,z)),yq(X,Y,z,W,_);break;case 3:var l=Kz(),g=pX;pX=Y.alternate!==null&&Y.alternate.memoizedState.isDehydrated&&(Y.flags&256)===0,yq(X,Y,z,W,_),pX=g,p&2048&&(z=null,Y.alternate!==null&&(z=Y.alternate.memoizedState.cache),W=Y.memoizedState.cache,W!==z&&(YU(W),z!=null&&M5(z))),X.passiveEffectDuration+=r7(l);break;case 12:if(p&2048){p=Kz(),yq(X,Y,z,W,_),X=Y.stateNode,X.passiveEffectDuration+=O5(p);try{BZ(Y,Zi,Y,Y.alternate,g0,X.passiveEffectDuration)}catch(ZZ){bQ(Y,Y.return,ZZ)}}else yq(X,Y,z,W,_);break;case 31:p=pX,l=Y.alternate!==null?Y.alternate.memoizedState:null,g=Y.memoizedState,l!==null&&g===null?(g=Y.deletions,g!==null&&0<g.length&&g[0].tag===18?(pX=!1,l=l.hydrationErrors,l!==null&&WF(Y,Y.actualStartTime,_,l)):pX=!0):pX=!1,yq(X,Y,z,W,_),pX=p;break;case 13:p=pX,l=Y.alternate!==null?Y.alternate.memoizedState:null,g=Y.memoizedState,l===null||l.dehydrated===null||g!==null&&g.dehydrated!==null?pX=!1:(g=Y.deletions,g!==null&&0<g.length&&g[0].tag===18?(pX=!1,l=l.hydrationErrors,l!==null&&WF(Y,Y.actualStartTime,_,l)):pX=!0),yq(X,Y,z,W,_),pX=p;break;case 23:break;case 22:g=Y.stateNode,l=Y.alternate,Y.memoizedState!==null?g._visibility&Lz?yq(X,Y,z,W,_):k5(X,Y,z,W,_):g._visibility&Lz?yq(X,Y,z,W,_):(g._visibility|=Lz,r6(X,Y,z,W,(Y.subtreeFlags&10256)!==0||Y.actualDuration!==0&&(Y.alternate===null||Y.alternate.child!==Y.child),_),(Y.mode&GQ)===nZ||pX||(X=Y.actualStartTime,0<=X&&0.05<_-X&&f7(Y,X,_),0<=dZ&&0<=iZ&&0.05<iZ-dZ&&f7(Y,dZ,iZ))),p&2048&&DL(l,Y);break;case 24:yq(X,Y,z,W,_),p&2048&&$L(Y.alternate,Y);break;default:yq(X,Y,z,W,_)}if((Y.mode&GQ)!==nZ){if(X=!pX&&Y.alternate===null&&Y.return!==null&&Y.return.alternate!==null)z=Y.actualStartTime,0<=z&&0.05<_-z&&UG(Y,z,_,"Mount");0<=dZ&&0<=iZ&&((WX||0.05<zX)&&KG(Y,dZ,iZ,zX,XX),X&&0.05<iZ-dZ&&UG(Y,dZ,iZ,"Mount"))}NY(L),BG(I),XX=j,WX=R,w0=D}function r6(X,Y,z,W,_,L){_=_&&((Y.subtreeFlags&10256)!==0||Y.actualDuration!==0&&(Y.alternate===null||Y.alternate.child!==Y.child));for(Y=Y.child;Y!==null;){var I=Y.sibling;qC(X,Y,z,W,_,I!==null?I.actualStartTime:L),Y=I}}function qC(X,Y,z,W,_,L){var I=IY(),j=WG(),R=_G(),D=FG(),p=w0;_&&(Y.mode&GQ)!==nZ&&0<Y.actualStartTime&&(Y.flags&1)!==0&&m7(Y,Y.actualStartTime,L,pX,z);var l=Y.flags;switch(Y.tag){case 0:case 11:case 15:r6(X,Y,z,W,_,L),mR(Y,gJ);break;case 23:break;case 22:var g=Y.stateNode;Y.memoizedState!==null?g._visibility&Lz?r6(X,Y,z,W,_,L):k5(X,Y,z,W,L):(g._visibility|=Lz,r6(X,Y,z,W,_,L)),_&&l&2048&&DL(Y.alternate,Y);break;case 24:r6(X,Y,z,W,_,L),_&&l&2048&&$L(Y.alternate,Y);break;default:r6(X,Y,z,W,_,L)}(Y.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&(WX||0.05<zX)&&KG(Y,dZ,iZ,zX,XX),NY(I),BG(j),XX=R,WX=D,w0=p}function k5(X,Y,z,W,_){if(Y.subtreeFlags&10256||Y.actualDuration!==0&&(Y.alternate===null||Y.alternate.child!==Y.child))for(var L=Y.child;L!==null;){Y=L.sibling;var I=X,j=z,R=W,D=Y!==null?Y.actualStartTime:_,p=w0;(L.mode&GQ)!==nZ&&0<L.actualStartTime&&(L.flags&1)!==0&&m7(L,L.actualStartTime,D,pX,j);var l=L.flags;switch(L.tag){case 22:k5(I,L,j,R,D),l&2048&&DL(L.alternate,L);break;case 24:k5(I,L,j,R,D),l&2048&&$L(L.alternate,L);break;default:k5(I,L,j,R,D)}w0=p,L=Y}}function o6(X,Y,z){if(X.subtreeFlags&I1)for(X=X.child;X!==null;)GC(X,Y,z),X=X.sibling}function GC(X,Y,z){switch(X.tag){case 26:o6(X,Y,z),X.flags&I1&&X.memoizedState!==null&&li(z,hq,X.memoizedState,X.memoizedProps);break;case 5:o6(X,Y,z);break;case 3:case 4:var W=hq;hq=yW(X.stateNode.containerInfo),o6(X,Y,z),hq=W;break;case 22:X.memoizedState===null&&(W=X.alternate,W!==null&&W.memoizedState!==null?(W=I1,I1=16777216,o6(X,Y,z),I1=W):o6(X,Y,z));break;default:o6(X,Y,z)}}function zC(X){var Y=X.alternate;if(Y!==null&&(X=Y.child,X!==null)){Y.child=null;do Y=X.sibling,X.sibling=null,X=Y;while(X!==null)}}function S5(X){var Y=X.deletions;if((X.flags&16)!==0){if(Y!==null)for(var z=0;z<Y.length;z++){var W=Y[z],_=IY();rX=W,HC(W,X),(W.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&0.05<iZ-dZ&&UG(W,dZ,iZ,"Unmount"),NY(_)}zC(X)}if(X.subtreeFlags&10256)for(X=X.child;X!==null;)UC(X),X=X.sibling}function UC(X){var Y=IY(),z=WG(),W=_G(),_=FG();switch(X.tag){case 0:case 11:case 15:S5(X),X.flags&2048&&TL(X,X.return,gJ|Qq);break;case 3:var L=Kz();S5(X),X.stateNode.passiveEffectDuration+=r7(L);break;case 12:L=Kz(),S5(X),X.stateNode.passiveEffectDuration+=O5(L);break;case 22:L=X.stateNode,X.memoizedState!==null&&L._visibility&Lz&&(X.return===null||X.return.tag!==13)?(L._visibility&=~Lz,RW(X),(X.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&0.05<iZ-dZ&&UG(X,dZ,iZ,"Disconnect")):S5(X);break;default:S5(X)}(X.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&(WX||0.05<zX)&&KG(X,dZ,iZ,zX,XX),NY(Y),BG(z),WX=_,XX=W}function RW(X){var Y=X.deletions;if((X.flags&16)!==0){if(Y!==null)for(var z=0;z<Y.length;z++){var W=Y[z],_=IY();rX=W,HC(W,X),(W.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&0.05<iZ-dZ&&UG(W,dZ,iZ,"Unmount"),NY(_)}zC(X)}for(X=X.child;X!==null;)KC(X),X=X.sibling}function KC(X){var Y=IY(),z=WG(),W=_G(),_=FG();switch(X.tag){case 0:case 11:case 15:TL(X,X.return,gJ),RW(X);break;case 22:var L=X.stateNode;L._visibility&Lz&&(L._visibility&=~Lz,RW(X));break;default:RW(X)}(X.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&(WX||0.05<zX)&&KG(X,dZ,iZ,zX,XX),NY(Y),BG(z),WX=_,XX=W}function HC(X,Y){for(;rX!==null;){var z=rX,W=z,_=Y,L=IY(),I=WG(),j=_G(),R=FG();switch(W.tag){case 0:case 11:case 15:TL(W,_,gJ);break;case 23:case 22:W.memoizedState!==null&&W.memoizedState.cachePool!==null&&(_=W.memoizedState.cachePool.pool,_!=null&&YU(_));break;case 24:M5(W.memoizedState.cache)}if((W.mode&GQ)!==nZ&&0<=dZ&&0<=iZ&&(WX||0.05<zX)&&KG(W,dZ,iZ,zX,XX),NY(L),BG(I),WX=R,XX=j,W=z.child,W!==null)W.return=z,rX=W;else Z:for(z=X;rX!==null;){if(W=rX,L=W.sibling,I=W.return,rR(W),W===z){rX=null;break Z}if(L!==null){L.return=I,rX=L;break Z}rX=I}}}function Yi(){Cs.forEach(function(X){return X()})}function WC(){var X=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return X||XZ.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),X}function TY(X){if((CQ&dX)!==oX&&UQ!==0)return UQ&-UQ;var Y=XZ.T;return Y!==null?(Y._updatedFibers||(Y._updatedFibers=new Set),Y._updatedFibers.add(X),vL()):r()}function BC(){if(XY===0)if((UQ&536870912)===0||AQ){var X=dW;dW<<=1,(dW&3932160)===0&&(dW=262144),XY=X}else XY=536870912;return X=EY.current,X!==null&&(X.flags|=32),XY}function HX(X,Y,z){if(v8&&console.error("useInsertionEffect must not schedule updates."),OO&&(E4=!0),X===pQ&&(uQ===PU||uQ===RU)||X.cancelPendingCommit!==null)e6(X,0),R0(X,UQ,XY,!1);if(_0(X,z),(CQ&dX)!==oX&&X===pQ){if(RG)switch(Y.tag){case 0:case 11:case 15:X=HQ&&s(HQ)||"Unknown",uE.has(X)||(uE.add(X),Y=s(Y)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",Y,X,X));break;case 1:hE||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),hE=!0)}}else DG&&q5(X,Y,z),Fi(Y),X===pQ&&((CQ&dX)===oX&&(i0|=z),UX===p0&&R0(X,UQ,XY,!1)),NG(X)}function _C(X,Y,z){if((CQ&(dX|SY))!==oX)throw Error("Should not already be working.");if(UQ!==0&&HQ!==null){var W=HQ,_=sX();switch(S$){case T1:case PU:var L=G1;aQ&&((W=W._debugTask)?W.run(console.timeStamp.bind(console,"Suspended",L,_,nY,void 0,"primary-light")):console.timeStamp("Suspended",L,_,nY,void 0,"primary-light"));break;case RU:L=G1,aQ&&((W=W._debugTask)?W.run(console.timeStamp.bind(console,"Action",L,_,nY,void 0,"primary-light")):console.timeStamp("Action",L,_,nY,void 0,"primary-light"));break;default:aQ&&(W=_-G1,3>W||console.timeStamp("Blocked",G1,_,nY,void 0,5>W?"primary-light":10>W?"primary":100>W?"primary-dark":"error"))}}L=(z=!z&&(Y&127)===0&&(Y&X.expiredLanes)===0||l9(X,Y))?Gi(X,Y):kL(X,Y,!0);var I=z;do{if(L===Cz){x8&&!z&&R0(X,Y,0,!1),Y=uQ,G1=yX(),S$=Y;break}else{if(W=sX(),_=X.current.alternate,I&&!qi(_)){VY(Y),_=aX,L=W,!aQ||L<=_||(OX?OX.run(console.timeStamp.bind(console,"Teared Render",_,L,LQ,_Q,"error")):console.timeStamp("Teared Render",_,L,LQ,_Q,"error")),HU(Y,W),L=kL(X,Y,!1),I=!1;continue}if(L===TU){if(I=Y,X.errorRecoveryDisabledLanes&I)var j=0;else j=X.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){VY(Y),BF(aX,W,Y,OX),HU(Y,W),Y=j;Z:{W=X,L=I,I=R1;var R=W.current.memoizedState.isDehydrated;if(R&&(e6(W,j).flags|=256),j=kL(W,j,!1),j!==TU){if(KO&&!R){W.errorRecoveryDisabledLanes|=L,i0|=L,L=p0;break Z}W=hJ,hJ=I,W!==null&&(hJ===null?hJ=W:hJ.push.apply(hJ,W))}L=j}if(I=!1,L!==TU)continue;else W=sX()}}if(L===j1){VY(Y),BF(aX,W,Y,OX),HU(Y,W),e6(X,0),R0(X,Y,0,!0);break}Z:{switch(z=X,L){case Cz:case j1:throw Error("Root did not complete. This is a bug in React.");case p0:if((Y&4194048)!==Y)break;case N4:VY(Y),_P(aX,W,Y,OX),HU(Y,W),_=Y,(_&127)!==0?G4=W:(_&4194048)!==0&&(z4=W),R0(z,Y,XY,!d0);break Z;case TU:hJ=null;break;case I4:case RE:break;default:throw Error("Unknown root exit status.")}if(XZ.actQueue!==null)SL(z,_,Y,hJ,C1,P4,XY,i0,CU,L,null,null,aX,W);else{if((Y&62914560)===Y&&(I=R4+$E-sX(),10<I)){if(R0(z,Y,XY,!d0),d9(z,0,!0)!==0)break Z;uq=Y,z.timeoutHandle=nE(FC.bind(null,z,_,hJ,C1,P4,Y,XY,i0,CU,d0,L,"Throttled",aX,W),I);break Z}FC(z,_,hJ,C1,P4,Y,XY,i0,CU,d0,L,null,aX,W)}}}break}while(1);NG(X)}function FC(X,Y,z,W,_,L,I,j,R,D,p,l,g,ZZ){X.timeoutHandle=SU;var VZ=Y.subtreeFlags,RZ=null;if(VZ&8192||(VZ&16785408)===16785408){if(RZ={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qz},GC(Y,L,RZ),VZ=(L&62914560)===L?R4-sX():(L&4194048)===L?DE-sX():0,VZ=ii(RZ,VZ),VZ!==null){uq=L,X.cancelPendingCommit=VZ(SL.bind(null,X,Y,L,z,W,_,I,j,R,p,RZ,RZ.waitingForViewTransition?"Waiting for the previous Animation":0<RZ.count?0<RZ.imgCount?"Suspended on CSS and Images":"Suspended on CSS":RZ.imgCount===1?"Suspended on an Image":0<RZ.imgCount?"Suspended on Images":null,g,ZZ)),R0(X,L,I,!D);return}}SL(X,Y,L,z,W,_,I,j,R,p,RZ,l,g,ZZ)}function qi(X){for(var Y=X;;){var z=Y.tag;if((z===0||z===11||z===15)&&Y.flags&16384&&(z=Y.updateQueue,z!==null&&(z=z.stores,z!==null)))for(var W=0;W<z.length;W++){var _=z[W],L=_.getSnapshot;_=_.value;try{if(!xJ(L(),_))return!1}catch(I){return!1}}if(z=Y.child,Y.subtreeFlags&16384&&z!==null)z.return=Y,Y=z;else{if(Y===X)break;for(;Y.sibling===null;){if(Y.return===null||Y.return===X)return!0;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}}return!0}function R0(X,Y,z,W){Y&=~HO,Y&=~i0,X.suspendedLanes|=Y,X.pingedLanes&=~Y,W&&(X.warmLanes|=Y),W=X.expirationTimes;for(var _=Y;0<_;){var L=31-SJ(_),I=1<<L;W[L]=-1,_&=~I}z!==0&&i9(X,z,Y)}function t6(){return(CQ&(dX|SY))===oX?(x5(0,!1),!1):!0}function EL(){if(HQ!==null){if(uQ===QY)var X=HQ.return;else X=HQ,n7(),fF(X),R8=null,L1=0,X=HQ;for(;X!==null;)uR(X.alternate,X),X=X.return;HQ=null}}function HU(X,Y){(X&127)!==0&&(h0=Y),(X&4194048)!==0&&(yG=Y),(X&62914560)!==0&&(E$=Y),(X&2080374784)!==0&&(k$=Y)}function e6(X,Y){aQ&&(console.timeStamp("Blocking Track",0.003,0.003,"Blocking",_Q,"primary-light"),console.timeStamp("Transition Track",0.003,0.003,"Transition",_Q,"primary-light"),console.timeStamp("Suspense Track",0.003,0.003,"Suspense",_Q,"primary-light"),console.timeStamp("Idle Track",0.003,0.003,"Idle",_Q,"primary-light"));var z=aX;if(aX=yX(),UQ!==0&&0<z){if(VY(UQ),UX===I4||UX===p0)_P(z,aX,Y,OX);else{var W=aX,_=OX;if(aQ&&!(W<=z)){var L=(Y&738197653)===Y?"tertiary-dark":"primary-dark",I=(Y&536870912)===Y?"Prewarm":(Y&201326741)===Y?"Interrupted Hydration":"Interrupted Render";_?_.run(console.timeStamp.bind(console,I,z,W,LQ,_Q,L)):console.timeStamp(I,z,W,LQ,_Q,L)}}HU(UQ,aX)}if(z=OX,OX=null,(Y&127)!==0){OX=J1,_=0<=SG&&SG<h0?h0:SG,W=0<=LU&&LU<h0?h0:LU,L=0<=W?W:0<=_?_:aX,0<=G4?(VY(2),FP(G4,L,Y,z)):(U4&127)!==0&&(VY(2),F5(h0,L,Nz)),z=_;var j=W,R=Y1,D=0<j8,p=u0===X1,l=u0===q4;if(_=aX,W=J1,L=cM,I=pM,aQ){if(LQ="Blocking",0<z?z>_&&(z=_):z=_,0<j?j>z&&(j=z):j=z,R!==null&&z>j){var g=D?"secondary-light":"warning";W?W.run(console.timeStamp.bind(console,D?"Consecutive":"Event: "+R,j,z,LQ,_Q,g)):console.timeStamp(D?"Consecutive":"Event: "+R,j,z,LQ,_Q,g)}_>z&&(j=p?"error":(Y&738197653)===Y?"tertiary-light":"primary-light",p=l?"Promise Resolved":p?"Cascading Update":5<_-z?"Update Blocked":"Update",l=[],I!=null&&l.push(["Component name",I]),L!=null&&l.push(["Method name",L]),z={start:z,end:_,detail:{devtools:{properties:l,track:LQ,trackGroup:_Q,color:j}}},W?W.run(performance.measure.bind(performance,p,z)):performance.measure(p,z))}SG=-1.1,u0=0,pM=cM=null,G4=-1.1,j8=LU,LU=-1.1,h0=yX()}if((Y&4194048)!==0&&(OX=q1,_=0<=Iz&&Iz<yG?yG:Iz,z=0<=eY&&eY<yG?yG:eY,W=0<=f0&&f0<yG?yG:f0,L=0<=W?W:0<=z?z:aX,0<=z4?(VY(256),FP(z4,L,Y,OX)):(U4&4194048)!==0&&(VY(256),F5(yG,L,Nz)),l=W,j=MU,R=0<m0,D=dM===q4,L=aX,W=q1,I=D$,p=$$,aQ&&(LQ="Transition",0<z?z>L&&(z=L):z=L,0<_?_>z&&(_=z):_=z,0<l?l>_&&(l=_):l=_,_>l&&j!==null&&(g=R?"secondary-light":"warning",W?W.run(console.timeStamp.bind(console,R?"Consecutive":"Event: "+j,l,_,LQ,_Q,g)):console.timeStamp(R?"Consecutive":"Event: "+j,l,_,LQ,_Q,g)),z>_&&(W?W.run(console.timeStamp.bind(console,"Action",_,z,LQ,_Q,"primary-dark")):console.timeStamp("Action",_,z,LQ,_Q,"primary-dark")),L>z&&(_=D?"Promise Resolved":5<L-z?"Update Blocked":"Update",l=[],p!=null&&l.push(["Component name",p]),I!=null&&l.push(["Method name",I]),z={start:z,end:L,detail:{devtools:{properties:l,track:LQ,trackGroup:_Q,color:"primary-light"}}},W?W.run(performance.measure.bind(performance,_,z)):performance.measure(_,z))),eY=Iz=-1.1,dM=0,z4=-1.1,m0=f0,f0=-1.1,yG=yX()),(Y&62914560)!==0&&(U4&62914560)!==0&&(VY(4194304),F5(E$,aX,Nz)),(Y&2080374784)!==0&&(U4&2080374784)!==0&&(VY(268435456),F5(k$,aX,Nz)),z=X.timeoutHandle,z!==SU&&(X.timeoutHandle=SU,us(z)),z=X.cancelPendingCommit,z!==null&&(X.cancelPendingCommit=null,z()),uq=0,EL(),pQ=X,HQ=z=Gz(X.current,null),UQ=Y,uQ=QY,yY=null,d0=!1,x8=l9(X,Y),KO=!1,UX=Cz,CU=XY=HO=i0=l0=0,hJ=R1=null,P4=!1,(Y&8)!==0&&(Y|=Y&32),W=X.entangledLanes,W!==0)for(X=X.entanglements,W&=Y;0<W;)_=31-SJ(W),L=1<<_,Y|=X[_],W&=~L;return xG=Y,c7(),X=N$(),1000<X-I$&&(XZ.recentlyCreatedOwnerStacks=0,I$=X),vq.discardPendingWarnings(),z}function LC(X,Y){rZ=null,XZ.H=A1,XZ.getCurrentStack=null,RG=!1,CY=null,Y===P8||Y===B4?(Y=vP(),uQ=T1):Y===sM?(Y=vP(),uQ=CE):uQ=Y===YO?UO:Y!==null&&typeof Y==="object"&&typeof Y.then==="function"?P1:j4,yY=Y;var z=HQ;z===null?(UX=j1,VW(X,AY(Y,X.current))):z.mode&GQ&&DF(z)}function MC(){var X=EY.current;return X===null?!0:(UQ&4194048)===UQ?Zq===null?!0:!1:(UQ&62914560)===UQ||(UQ&536870912)!==0?X===Zq:!1}function OC(){var X=XZ.H;return XZ.H=A1,X===null?A1:X}function VC(){var X=XZ.A;return XZ.A=Rs,X}function CW(X){OX===null&&(OX=X._debugTask==null?null:X._debugTask)}function DW(){UX=p0,d0||(UQ&4194048)!==UQ&&EY.current!==null||(x8=!0),(l0&134217727)===0&&(i0&134217727)===0||pQ===null||R0(pQ,UQ,XY,!1)}function kL(X,Y,z){var W=CQ;CQ|=dX;var _=OC(),L=VC();if(pQ!==X||UQ!==Y){if(DG){var I=X.memoizedUpdaters;0<I.size&&(w5(X,UQ),I.clear()),F0(X,Y)}C1=null,e6(X,Y)}Y=!1,I=UX;Z:do try{if(uQ!==QY&&HQ!==null){var j=HQ,R=yY;switch(uQ){case UO:EL(),I=N4;break Z;case T1:case PU:case RU:case P1:EY.current===null&&(Y=!0);var D=uQ;if(uQ=QY,yY=null,Z8(X,j,R,D),z&&x8){I=Cz;break Z}break;default:D=uQ,uQ=QY,yY=null,Z8(X,j,R,D)}}AC(),I=UX;break}catch(p){LC(X,p)}while(1);return Y&&X.shellSuspendCounter++,n7(),CQ=W,XZ.H=_,XZ.A=L,HQ===null&&(pQ=null,UQ=0,c7()),I}function AC(){for(;HQ!==null;)IC(HQ)}function Gi(X,Y){var z=CQ;CQ|=dX;var W=OC(),_=VC();if(pQ!==X||UQ!==Y){if(DG){var L=X.memoizedUpdaters;0<L.size&&(w5(X,UQ),L.clear()),F0(X,Y)}C1=null,C4=sX()+EE,e6(X,Y)}else x8=l9(X,Y);Z:do try{if(uQ!==QY&&HQ!==null)Q:switch(Y=HQ,L=yY,uQ){case j4:uQ=QY,yY=null,Z8(X,Y,L,j4);break;case PU:case RU:if(xP(L)){uQ=QY,yY=null,NC(Y);break}Y=function(){uQ!==PU&&uQ!==RU||pQ!==X||(uQ=T4),NG(X)},L.then(Y,Y);break Z;case T1:uQ=T4;break Z;case CE:uQ=zO;break Z;case T4:xP(L)?(uQ=QY,yY=null,NC(Y)):(uQ=QY,yY=null,Z8(X,Y,L,T4));break;case zO:var I=null;switch(HQ.tag){case 26:I=HQ.memoizedState;case 5:case 27:var j=HQ;if(I?_D(I):j.stateNode.complete){uQ=QY,yY=null;var R=j.sibling;if(R!==null)HQ=R;else{var D=j.return;D!==null?(HQ=D,$W(D)):HQ=null}break Q}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}uQ=QY,yY=null,Z8(X,Y,L,zO);break;case P1:uQ=QY,yY=null,Z8(X,Y,L,P1);break;case UO:EL(),UX=N4;break Z;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}XZ.actQueue!==null?AC():zi();break}catch(p){LC(X,p)}while(1);if(n7(),XZ.H=W,XZ.A=_,CQ=z,HQ!==null)return Cz;return pQ=null,UQ=0,c7(),UX}function zi(){for(;HQ!==null&&!qn();)IC(HQ)}function IC(X){var Y=X.alternate;(X.mode&GQ)!==nZ?(CF(X),Y=BZ(X,IL,Y,X,xG),DF(X)):Y=BZ(X,IL,Y,X,xG),X.memoizedProps=X.pendingProps,Y===null?$W(X):HQ=Y}function NC(X){var Y=BZ(X,Ui,X);X.memoizedProps=X.pendingProps,Y===null?$W(X):HQ=Y}function Ui(X){var Y=X.alternate,z=(X.mode&GQ)!==nZ;switch(z&&CF(X),X.tag){case 15:case 0:Y=yR(Y,X,X.pendingProps,X.type,void 0,UQ);break;case 11:Y=yR(Y,X,X.pendingProps,X.type.render,X.ref,UQ);break;case 5:fF(X);default:uR(Y,X),X=HQ=IP(X,xG),Y=IL(Y,X,xG)}return z&&DF(X),Y}function Z8(X,Y,z,W){n7(),fF(Y),R8=null,L1=0;var _=Y.return;try{if(il(X,_,Y,z,UQ)){UX=j1,VW(X,AY(z,X.current)),HQ=null;return}}catch(L){if(_!==null)throw HQ=_,L;UX=j1,VW(X,AY(z,X.current)),HQ=null;return}if(Y.flags&32768){if(AQ||W===j4)X=!0;else if(x8||(UQ&536870912)!==0)X=!1;else if(d0=X=!0,W===PU||W===RU||W===T1||W===P1)W=EY.current,W!==null&&W.tag===13&&(W.flags|=16384);jC(Y,X)}else $W(Y)}function $W(X){var Y=X;do{if((Y.flags&32768)!==0){jC(Y,d0);return}var z=Y.alternate;if(X=Y.return,CF(Y),z=BZ(Y,al,z,Y,xG),(Y.mode&GQ)!==nZ&&EP(Y),z!==null){HQ=z;return}if(Y=Y.sibling,Y!==null){HQ=Y;return}HQ=Y=X}while(Y!==null);UX===Cz&&(UX=RE)}function jC(X,Y){do{var z=rl(X.alternate,X);if(z!==null){z.flags&=32767,HQ=z;return}if((X.mode&GQ)!==nZ){EP(X),z=X.actualDuration;for(var W=X.child;W!==null;)z+=W.actualDuration,W=W.sibling;X.actualDuration=z}if(z=X.return,z!==null&&(z.flags|=32768,z.subtreeFlags=0,z.deletions=null),!Y&&(X=X.sibling,X!==null)){HQ=X;return}HQ=X=z}while(X!==null);UX=N4,HQ=null}function SL(X,Y,z,W,_,L,I,j,R,D,p,l,g,ZZ){X.cancelPendingCommit=null;do y5();while(gX!==s0);if(vq.flushLegacyContextWarning(),vq.flushPendingUnsafeLifecycleWarnings(),(CQ&(dX|SY))!==oX)throw Error("Should not already be working.");if(VY(z),D===TU?BF(g,ZZ,z,OX):W!==null?wl(g,ZZ,z,W,Y!==null&&Y.alternate!==null&&Y.alternate.memoizedState.isDehydrated&&(Y.flags&256)!==0,OX):yl(g,ZZ,z,OX),Y!==null){if(z===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),Y===X.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(L=Y.lanes|Y.childLanes,L|=gM,S7(X,z,L,I,j,R),X===pQ&&(HQ=pQ=null,UQ=0),b8=Y,a0=X,uq=z,_O=L,LO=_,bE=W,FO=ZZ,vE=l,fq=D4,gE=null,Y.actualDuration!==0||(Y.subtreeFlags&10256)!==0||(Y.flags&10256)!==0?(X.callbackNode=null,X.callbackPriority=0,_i(G8,function(){return y1=window.event,fq===D4&&(fq=BO),DC(),null})):(X.callbackNode=null,X.callbackPriority=0),Az=null,g0=yX(),l!==null&&xl(ZZ,g0,l,OX),W=(Y.flags&13878)!==0,(Y.subtreeFlags&13878)!==0||W){W=XZ.T,XZ.T=null,_=vQ.p,vQ.p=DY,I=CQ,CQ|=SY;try{Xi(X,Y,z)}finally{CQ=I,vQ.p=_,XZ.T=W}}gX=SE,TC(),PC(),RC()}}function TC(){if(gX===SE){gX=s0;var X=a0,Y=b8,z=uq,W=(Y.flags&13878)!==0;if((Y.subtreeFlags&13878)!==0||W){W=XZ.T,XZ.T=null;var _=vQ.p;vQ.p=DY;var L=CQ;CQ|=SY;try{y8=z,w8=X,o7(),ZC(Y,X),w8=y8=null,z=CO;var I=HP(X.containerInfo),j=z.focusedElem,R=z.selectionRange;if(I!==j&&j&&j.ownerDocument&&KP(j.ownerDocument.documentElement,j)){if(R!==null&&KF(j)){var{start:D,end:p}=R;if(p===void 0&&(p=D),"selectionStart"in j)j.selectionStart=D,j.selectionEnd=Math.min(p,j.value.length);else{var l=j.ownerDocument||document,g=l&&l.defaultView||window;if(g.getSelection){var ZZ=g.getSelection(),VZ=j.textContent.length,RZ=Math.min(R.start,VZ),nQ=R.end===void 0?RZ:Math.min(R.end,VZ);!ZZ.extend&&RZ>nQ&&(I=nQ,nQ=RZ,RZ=I);var TQ=UP(j,RZ),b=UP(j,nQ);if(TQ&&b&&(ZZ.rangeCount!==1||ZZ.anchorNode!==TQ.node||ZZ.anchorOffset!==TQ.offset||ZZ.focusNode!==b.node||ZZ.focusOffset!==b.offset)){var h=l.createRange();h.setStart(TQ.node,TQ.offset),ZZ.removeAllRanges(),RZ>nQ?(ZZ.addRange(h),ZZ.extend(b.node,b.offset)):(h.setEnd(b.node,b.offset),ZZ.addRange(h))}}}}l=[];for(ZZ=j;ZZ=ZZ.parentNode;)ZZ.nodeType===1&&l.push({element:ZZ,left:ZZ.scrollLeft,top:ZZ.scrollTop});typeof j.focus==="function"&&j.focus();for(j=0;j<l.length;j++){var m=l[j];m.element.scrollLeft=m.left,m.element.scrollTop=m.top}}p4=!!RO,CO=RO=null}finally{CQ=L,vQ.p=_,XZ.T=W}}X.current=Y,gX=yE}}function PC(){if(gX===yE){gX=s0;var X=gE;if(X!==null){g0=yX();var Y=Vz,z=g0;!aQ||z<=Y||(Nz?Nz.run(console.timeStamp.bind(console,X,Y,z,LQ,_Q,"secondary-light")):console.timeStamp(X,Y,z,LQ,_Q,"secondary-light"))}X=a0,Y=b8,z=uq;var W=(Y.flags&8772)!==0;if((Y.subtreeFlags&8772)!==0||W){W=XZ.T,XZ.T=null;var _=vQ.p;vQ.p=DY;var L=CQ;CQ|=SY;try{y8=z,w8=X,o7(),aR(X,Y.alternate,Y),w8=y8=null}finally{CQ=L,vQ.p=_,XZ.T=W}}X=FO,Y=vE,Vz=yX(),X=Y===null?X:g0,Y=Vz,z=fq===WO,W=OX,Az!==null?LP(X,Y,Az,!1,W):!aQ||Y<=X||(W?W.run(console.timeStamp.bind(console,z?"Commit Interrupted View Transition":"Commit",X,Y,LQ,_Q,z?"error":"secondary-dark")):console.timeStamp(z?"Commit Interrupted View Transition":"Commit",X,Y,LQ,_Q,z?"error":"secondary-dark")),gX=wE}}function RC(){if(gX===xE||gX===wE){if(gX===xE){var X=Vz;Vz=yX();var Y=Vz,z=fq===WO;!aQ||Y<=X||(Nz?Nz.run(console.timeStamp.bind(console,z?"Interrupted View Transition":"Starting Animation",X,Y,LQ,_Q,z?"error":"secondary-light")):console.timeStamp(z?"Interrupted View Transition":"Starting Animation",X,Y,LQ,_Q,z?" error":"secondary-light")),fq!==WO&&(fq=kE)}gX=s0,Gn(),X=a0;var W=b8;Y=uq,z=bE;var _=W.actualDuration!==0||(W.subtreeFlags&10256)!==0||(W.flags&10256)!==0;_?gX=$4:(gX=s0,b8=a0=null,CC(X,X.pendingLanes),DU=0,$1=null);var L=X.pendingLanes;if(L===0&&(n0=null),_||SC(X),L=E(Y),W=W.stateNode,NJ&&typeof NJ.onCommitFiberRoot==="function")try{var I=(W.current.flags&128)===128;switch(L){case DY:var j=LM;break;case xq:j=MM;break;case $G:j=G8;break;case iW:j=OM;break;default:j=G8}NJ.onCommitFiberRoot(z8,W,j,I)}catch(l){CG||(CG=!0,console.error("React instrumentation encountered an error: %o",l))}if(DG&&X.memoizedUpdaters.clear(),Yi(),z!==null){I=XZ.T,j=vQ.p,vQ.p=DY,XZ.T=null;try{var R=X.onRecoverableError;for(W=0;W<z.length;W++){var D=z[W],p=Ki(D.stack);BZ(D.source,R,D.value,p)}}finally{XZ.T=I,vQ.p=j}}(uq&3)!==0&&y5(),NG(X),L=X.pendingLanes,(Y&261930)!==0&&(L&42)!==0?(H4=!0,X===MO?D1++:(D1=0,MO=X)):D1=0,_||HU(Y,Vz),x5(0,!1)}}function Ki(X){return X={componentStack:X},Object.defineProperty(X,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),X}function CC(X,Y){(X.pooledCacheLanes&=Y)===0&&(Y=X.pooledCache,Y!=null&&(X.pooledCache=null,M5(Y)))}function y5(){return TC(),PC(),RC(),DC()}function DC(){if(gX!==$4)return!1;var X=a0,Y=_O;_O=0;var z=E(uq),W=$G===0||$G>z?$G:z;z=XZ.T;var _=vQ.p;try{vQ.p=W,XZ.T=null;var L=LO;LO=null,W=a0;var I=uq;if(gX=s0,b8=a0=null,uq=0,(CQ&(dX|SY))!==oX)throw Error("Cannot flush passive effects while already rendering.");VY(I),OO=!0,E4=!1;var j=0;if(Az=null,j=sX(),fq===kE)F5(Vz,j,Nz);else{var R=Vz,D=j,p=fq===BO;!aQ||D<=R||(OX?OX.run(console.timeStamp.bind(console,p?"Waiting for Paint":"Waiting",R,D,LQ,_Q,"secondary-light")):console.timeStamp(p?"Waiting for Paint":"Waiting",R,D,LQ,_Q,"secondary-light"))}R=CQ,CQ|=SY;var l=W.current;o7(),UC(l);var g=W.current;l=FO,o7(),YC(W,g,I,L,l),SC(W),CQ=R;var ZZ=sX();if(g=j,l=OX,Az!==null?LP(g,ZZ,Az,!0,l):!aQ||ZZ<=g||(l?l.run(console.timeStamp.bind(console,"Remaining Effects",g,ZZ,LQ,_Q,"secondary-dark")):console.timeStamp("Remaining Effects",g,ZZ,LQ,_Q,"secondary-dark")),HU(I,ZZ),x5(0,!1),E4?W===$1?DU++:(DU=0,$1=W):DU=0,E4=OO=!1,NJ&&typeof NJ.onPostCommitFiberRoot==="function")try{NJ.onPostCommitFiberRoot(z8,W)}catch(RZ){CG||(CG=!0,console.error("React instrumentation encountered an error: %o",RZ))}var VZ=W.current.stateNode;return VZ.effectDuration=0,VZ.passiveEffectDuration=0,!0}finally{vQ.p=_,XZ.T=z,CC(X,Y)}}function $C(X,Y,z){Y=AY(z,Y),kP(Y),Y=KL(X.stateNode,Y,2),X=N0(X,Y,2),X!==null&&(_0(X,2),NG(X))}function bQ(X,Y,z){if(v8=!1,X.tag===3)$C(X,X,z);else{for(;Y!==null;){if(Y.tag===3){$C(Y,X,z);return}if(Y.tag===1){var W=Y.stateNode;if(typeof Y.type.getDerivedStateFromError==="function"||typeof W.componentDidCatch==="function"&&(n0===null||!n0.has(W))){X=AY(z,X),kP(X),z=HL(2),W=N0(Y,z,2),W!==null&&(WL(z,W,Y,X),_0(W,2),NG(W));return}}Y=Y.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
159
|
+
|
|
160
|
+
Error message:
|
|
161
|
+
|
|
162
|
+
%s`,z)}}function yL(X,Y,z){var W=X.pingCache;if(W===null){W=X.pingCache=new Ds;var _=new Set;W.set(Y,_)}else _=W.get(Y),_===void 0&&(_=new Set,W.set(Y,_));_.has(z)||(KO=!0,_.add(z),W=Hi.bind(null,X,Y,z),DG&&w5(X,z),Y.then(W,W))}function Hi(X,Y,z){var W=X.pingCache;W!==null&&W.delete(Y),X.pingedLanes|=X.suspendedLanes&z,X.warmLanes&=~z,(z&127)!==0?0>SG&&(h0=SG=yX(),J1=Y4("Promise Resolved"),u0=q4):(z&4194048)!==0&&0>eY&&(yG=eY=yX(),q1=Y4("Promise Resolved"),dM=q4),WC()&&XZ.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
163
|
+
|
|
164
|
+
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
165
|
+
|
|
166
|
+
act(() => {
|
|
167
|
+
/* finish loading suspended data */
|
|
168
|
+
});
|
|
169
|
+
/* assert on the output */
|
|
170
|
+
|
|
171
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),pQ===X&&(UQ&z)===z&&(UX===p0||UX===I4&&(UQ&62914560)===UQ&&sX()-R4<$E?(CQ&dX)===oX&&e6(X,0):HO|=z,CU===UQ&&(CU=0)),NG(X)}function EC(X,Y){Y===0&&(Y=h6()),X=IJ(X,Y),X!==null&&(_0(X,Y),NG(X))}function Wi(X){var Y=X.memoizedState,z=0;Y!==null&&(z=Y.retryLane),EC(X,z)}function Bi(X,Y){var z=0;switch(X.tag){case 31:case 13:var{stateNode:W,memoizedState:_}=X;_!==null&&(z=_.retryLane);break;case 19:W=X.stateNode;break;case 22:W=X.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}W!==null&&W.delete(Y),EC(X,z)}function wL(X,Y,z){if((Y.subtreeFlags&67117056)!==0)for(Y=Y.child;Y!==null;){var W=X,_=Y,L=_.type===fW;L=z||L,_.tag!==22?_.flags&67108864?L&&BZ(_,kC,W,_):wL(W,_,L):_.memoizedState===null&&(L&&_.flags&8192?BZ(_,kC,W,_):_.subtreeFlags&67108864&&BZ(_,wL,W,_,L)),Y=Y.sibling}}function kC(X,Y){lQ(!0);try{XC(Y),KC(Y),JC(X,Y.alternate,Y,!1),qC(X,Y,0,null,!1,0)}finally{lQ(!1)}}function SC(X){var Y=!0;X.current.mode&(jJ|bq)||(Y=!1),wL(X,X.current,Y)}function yC(X){if((CQ&dX)===oX){var Y=X.tag;if(Y===3||Y===1||Y===0||Y===11||Y===14||Y===15){if(Y=s(X)||"ReactComponent",k4!==null){if(k4.has(Y))return;k4.add(Y)}else k4=new Set([Y]);BZ(X,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function w5(X,Y){DG&&X.memoizedUpdaters.forEach(function(z){q5(X,z,Y)})}function _i(X,Y){var z=XZ.actQueue;return z!==null?(z.push(Y),ks):FM(X,Y)}function Fi(X){WC()&&XZ.actQueue===null&&BZ(X,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
172
|
+
|
|
173
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
174
|
+
|
|
175
|
+
act(() => {
|
|
176
|
+
/* fire events that update state */
|
|
177
|
+
});
|
|
178
|
+
/* assert on the output */
|
|
179
|
+
|
|
180
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,s(X))})}function NG(X){X!==g8&&X.next===null&&(g8===null?S4=g8=X:g8=g8.next=X),y4=!0,XZ.actQueue!==null?AO||(AO=!0,vC()):VO||(VO=!0,vC())}function x5(X,Y){if(!IO&&y4){IO=!0;do{var z=!1;for(var W=S4;W!==null;){if(!Y)if(X!==0){var _=W.pendingLanes;if(_===0)var L=0;else{var{suspendedLanes:I,pingedLanes:j}=W;L=(1<<31-SJ(42|X)+1)-1,L&=_&~(I&~j),L=L&201326741?L&201326741|1:L?L|2:0}L!==0&&(z=!0,bC(W,L))}else L=UQ,L=d9(W,W===pQ?L:0,W.cancelPendingCommit!==null||W.timeoutHandle!==SU),(L&3)===0||l9(W,L)||(z=!0,bC(W,L));W=W.next}}while(z);IO=!1}}function Li(){y1=window.event,xL()}function xL(){y4=AO=VO=!1;var X=0;r0!==0&&ji()&&(X=r0);for(var Y=sX(),z=null,W=S4;W!==null;){var _=W.next,L=wC(W,Y);if(L===0)W.next=null,z===null?S4=_:z.next=_,_===null&&(g8=z);else if(z=W,X!==0||(L&3)!==0)y4=!0;W=_}gX!==s0&&gX!==$4||x5(X,!1),r0!==0&&(r0=0)}function wC(X,Y){for(var{suspendedLanes:z,pingedLanes:W,expirationTimes:_}=X,L=X.pendingLanes&-62914561;0<L;){var I=31-SJ(L),j=1<<I,R=_[I];if(R===-1){if((j&z)===0||(j&W)!==0)_[I]=t_(j,Y)}else R<=Y&&(X.expiredLanes|=j);L&=~j}if(Y=pQ,z=UQ,z=d9(X,X===Y?z:0,X.cancelPendingCommit!==null||X.timeoutHandle!==SU),W=X.callbackNode,z===0||X===Y&&(uQ===PU||uQ===RU)||X.cancelPendingCommit!==null)return W!==null&&bL(W),X.callbackNode=null,X.callbackPriority=0;if((z&3)===0||l9(X,z)){if(Y=z&-z,Y!==X.callbackPriority||XZ.actQueue!==null&&W!==NO)bL(W);else return Y;switch(E(z)){case DY:case xq:z=MM;break;case $G:z=G8;break;case iW:z=OM;break;default:z=G8}return W=xC.bind(null,X),XZ.actQueue!==null?(XZ.actQueue.push(W),z=NO):z=FM(z,W),X.callbackPriority=Y,X.callbackNode=z,Y}return W!==null&&bL(W),X.callbackPriority=2,X.callbackNode=null,2}function xC(X,Y){if(H4=K4=!1,y1=window.event,gX!==s0&&gX!==$4)return X.callbackNode=null,X.callbackPriority=0,null;var z=X.callbackNode;if(fq===D4&&(fq=BO),y5()&&X.callbackNode!==z)return null;var W=UQ;if(W=d9(X,X===pQ?W:0,X.cancelPendingCommit!==null||X.timeoutHandle!==SU),W===0)return null;return _C(X,W,Y),wC(X,sX()),X.callbackNode!=null&&X.callbackNode===z?xC.bind(null,X):null}function bC(X,Y){if(y5())return null;K4=H4,H4=!1,_C(X,Y,!0)}function bL(X){X!==NO&&X!==null&&Yn(X)}function vC(){XZ.actQueue!==null&&XZ.actQueue.push(function(){return xL(),null}),fs(function(){(CQ&(dX|SY))!==oX?FM(LM,Li):xL()})}function vL(){if(r0===0){var X=OU;X===0&&(X=pW,pW<<=1,(pW&261888)===0&&(pW=256)),r0=X}return r0}function gC(X){if(X==null||typeof X==="symbol"||typeof X==="boolean")return null;if(typeof X==="function")return X;return gZ(X,"action"),W5(""+X)}function hC(X,Y){var z=Y.ownerDocument.createElement("input");return z.name=Y.name,z.value=Y.value,X.id&&z.setAttribute("form",X.id),Y.parentNode.insertBefore(z,Y),X=new FormData(X),z.parentNode.removeChild(z),X}function Mi(X,Y,z,W,_){if(Y==="submit"&&z&&z.stateNode===_){var L=gC((_[yJ]||null).action),I=W.submitter;I&&(Y=(Y=I[yJ]||null)?gC(Y.formAction):I.getAttribute("formAction"),Y!==null&&(L=Y,I=null));var j=new oW("action","action",null,W,_);X.push({event:j,listeners:[{instance:null,listener:function(){if(W.defaultPrevented){if(r0!==0){var R=I?hC(_,I):new FormData(_),D={pending:!0,data:R,method:_.method,action:L};Object.freeze(D),XL(z,D,null,R)}}else typeof L==="function"&&(j.preventDefault(),R=I?hC(_,I):new FormData(_),D={pending:!0,data:R,method:_.method,action:L},Object.freeze(D),XL(z,D,L,R))},currentTarget:_}]})}}function EW(X,Y,z){X.currentTarget=z;try{Y(X)}catch(W){wM(W)}X.currentTarget=null}function uC(X,Y){Y=(Y&4)!==0;for(var z=0;z<X.length;z++){var W=X[z];Z:{var _=void 0,L=W.event;if(W=W.listeners,Y)for(var I=W.length-1;0<=I;I--){var j=W[I],R=j.instance,D=j.currentTarget;if(j=j.listener,R!==_&&L.isPropagationStopped())break Z;R!==null?BZ(R,EW,L,j,D):EW(L,j,D),_=R}else for(I=0;I<W.length;I++){if(j=W[I],R=j.instance,D=j.currentTarget,j=j.listener,R!==_&&L.isPropagationStopped())break Z;R!==null?BZ(R,EW,L,j,D):EW(L,j,D),_=R}}}}function jQ(X,Y){jO.has(X)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',X);var z=Y[VM];z===void 0&&(z=Y[VM]=new Set);var W=X+"__bubble";z.has(W)||(fC(Y,X,2,!1),z.add(W))}function gL(X,Y,z){jO.has(X)&&!Y&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',X);var W=0;Y&&(W|=4),fC(z,X,W,Y)}function hL(X){if(!X[w4]){X[w4]=!0,vD.forEach(function(z){z!=="selectionchange"&&(jO.has(z)||gL(z,!1,X),gL(z,!0,X))});var Y=X.nodeType===9?X:X.ownerDocument;Y===null||Y[w4]||(Y[w4]=!0,gL("selectionchange",!1,Y))}}function fC(X,Y,z,W){switch(AD(Y)){case DY:var _=ri;break;case xq:_=oi;break;default:_=ZM}z=_.bind(null,Y,z,X),_=void 0,!TM||Y!=="touchstart"&&Y!=="touchmove"&&Y!=="wheel"||(_=!0),W?_!==void 0?X.addEventListener(Y,z,{capture:!0,passive:_}):X.addEventListener(Y,z,!0):_!==void 0?X.addEventListener(Y,z,{passive:_}):X.addEventListener(Y,z,!1)}function uL(X,Y,z,W,_){var L=W;if((Y&1)===0&&(Y&2)===0&&W!==null)Z:for(;;){if(W===null)return;var I=W.tag;if(I===3||I===4){var j=W.stateNode.containerInfo;if(j===_)break;if(I===4)for(I=W.return;I!==null;){var R=I.tag;if((R===3||R===4)&&I.stateNode.containerInfo===_)return;I=I.return}for(;j!==null;){if(I=vZ(j),I===null)return;if(R=I.tag,R===5||R===6||R===26||R===27){W=L=I;continue Z}j=j.parentNode}}W=W.return}oT(function(){var D=L,p=zF(z),l=[];Z:{var g=A$.get(X);if(g!==void 0){var ZZ=oW,VZ=X;switch(X){case"keypress":if(g7(z)===0)break Z;case"keydown":case"keyup":ZZ=ln;break;case"focusin":VZ="focus",ZZ=DM;break;case"focusout":VZ="blur",ZZ=DM;break;case"beforeblur":case"afterblur":ZZ=DM;break;case"click":if(z.button===2)break Z;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ZZ=q$;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ZZ=wn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ZZ=an;break;case L$:case M$:case O$:ZZ=vn;break;case V$:ZZ=on;break;case"scroll":case"scrollend":ZZ=Sn;break;case"wheel":ZZ=en;break;case"copy":case"cut":case"paste":ZZ=hn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ZZ=z$;break;case"toggle":case"beforetoggle":ZZ=Qs}var RZ=(Y&4)!==0,nQ=!RZ&&(X==="scroll"||X==="scrollend"),TQ=RZ?g!==null?g+"Capture":null:g;RZ=[];for(var b=D,h;b!==null;){var m=b;if(h=m.stateNode,m=m.tag,m!==5&&m!==26&&m!==27||h===null||TQ===null||(m=B5(b,TQ),m!=null&&RZ.push(b5(b,m,h))),nQ)break;b=b.return}0<RZ.length&&(g=new ZZ(g,VZ,null,z,p),l.push({event:g,listeners:RZ}))}}if((Y&7)===0){Z:{if(g=X==="mouseover"||X==="pointerover",ZZ=X==="mouseout"||X==="pointerout",g&&z!==i5&&(VZ=z.relatedTarget||z.fromElement)&&(vZ(VZ)||VZ[S0]))break Z;if(ZZ||g){if(g=p.window===p?p:(g=p.ownerDocument)?g.defaultView||g.parentWindow:window,ZZ){if(VZ=z.relatedTarget||z.toElement,ZZ=D,VZ=VZ?vZ(VZ):null,VZ!==null&&(nQ=C(VZ),RZ=VZ.tag,VZ!==nQ||RZ!==5&&RZ!==27&&RZ!==6))VZ=null}else ZZ=null,VZ=D;if(ZZ!==VZ){if(RZ=q$,m="onMouseLeave",TQ="onMouseEnter",b="mouse",X==="pointerout"||X==="pointerover")RZ=z$,m="onPointerLeave",TQ="onPointerEnter",b="pointer";if(nQ=ZZ==null?g:ZQ(ZZ),h=VZ==null?g:ZQ(VZ),g=new RZ(m,b+"leave",ZZ,z,p),g.target=nQ,g.relatedTarget=h,m=null,vZ(p)===D&&(RZ=new RZ(TQ,b+"enter",VZ,z,p),RZ.target=h,RZ.relatedTarget=nQ,m=RZ),nQ=m,ZZ&&VZ)Q:{RZ=Oi,TQ=ZZ,b=VZ,h=0;for(m=TQ;m;m=RZ(m))h++;m=0;for(var qZ=b;qZ;qZ=RZ(qZ))m++;for(;0<h-m;)TQ=RZ(TQ),h--;for(;0<m-h;)b=RZ(b),m--;for(;h--;){if(TQ===b||b!==null&&TQ===b.alternate){RZ=TQ;break Q}TQ=RZ(TQ),b=RZ(b)}RZ=null}else RZ=null;ZZ!==null&&mC(l,g,ZZ,RZ,!1),VZ!==null&&nQ!==null&&mC(l,nQ,VZ,RZ,!0)}}}Z:{if(g=D?ZQ(D):window,ZZ=g.nodeName&&g.nodeName.toLowerCase(),ZZ==="select"||ZZ==="input"&&g.type==="file")var jZ=YP;else if(XP(g))if(_$)jZ=El;else{jZ=Dl;var oZ=Cl}else ZZ=g.nodeName,!ZZ||ZZ.toLowerCase()!=="input"||g.type!=="checkbox"&&g.type!=="radio"?D&&H5(D.elementType)&&(jZ=YP):jZ=$l;if(jZ&&(jZ=jZ(X,D))){JP(l,jZ,z,p);break Z}oZ&&oZ(X,g,D),X==="focusout"&&D&&g.type==="number"&&D.memoizedProps.value!=null&&QF(g,"number",g.value)}switch(oZ=D?ZQ(D):window,X){case"focusin":if(XP(oZ)||oZ.contentEditable==="true")F8=oZ,EM=D,e5=null;break;case"focusout":e5=EM=F8=null;break;case"mousedown":kM=!0;break;case"contextmenu":case"mouseup":case"dragend":kM=!1,WP(l,z,p);break;case"selectionchange":if(qs)break;case"keydown":case"keyup":WP(l,z,p)}var cZ;if($M)Z:{switch(X){case"compositionstart":var hZ="onCompositionStart";break Z;case"compositionend":hZ="onCompositionEnd";break Z;case"compositionupdate":hZ="onCompositionUpdate";break Z}hZ=void 0}else _8?ZP(X,z)&&(hZ="onCompositionEnd"):X==="keydown"&&z.keyCode===U$&&(hZ="onCompositionStart");if(hZ&&(K$&&z.locale!=="ko"&&(_8||hZ!=="onCompositionStart"?hZ==="onCompositionEnd"&&_8&&(cZ=tT()):(y0=p,PM=("value"in y0)?y0.value:y0.textContent,_8=!0)),oZ=kW(D,hZ),0<oZ.length&&(hZ=new G$(hZ,X,null,z,p),l.push({event:hZ,listeners:oZ}),cZ?hZ.data=cZ:(cZ=QP(z),cZ!==null&&(hZ.data=cZ)))),cZ=Js?jl(X,z):Tl(X,z))hZ=kW(D,"onBeforeInput"),0<hZ.length&&(oZ=new fn("onBeforeInput","beforeinput",null,z,p),l.push({event:oZ,listeners:hZ}),oZ.data=cZ);Mi(l,X,D,z,p)}uC(l,Y)})}function b5(X,Y,z){return{instance:X,listener:Y,currentTarget:z}}function kW(X,Y){for(var z=Y+"Capture",W=[];X!==null;){var _=X,L=_.stateNode;if(_=_.tag,_!==5&&_!==26&&_!==27||L===null||(_=B5(X,z),_!=null&&W.unshift(b5(X,_,L)),_=B5(X,Y),_!=null&&W.push(b5(X,_,L))),X.tag===3)return W;X=X.return}return[]}function Oi(X){if(X===null)return null;do X=X.return;while(X&&X.tag!==5&&X.tag!==27);return X?X:null}function mC(X,Y,z,W,_){for(var L=Y._reactName,I=[];z!==null&&z!==W;){var j=z,R=j.alternate,D=j.stateNode;if(j=j.tag,R!==null&&R===W)break;j!==5&&j!==26&&j!==27||D===null||(R=D,_?(D=B5(z,L),D!=null&&I.unshift(b5(z,D,R))):_||(D=B5(z,L),D!=null&&I.push(b5(z,D,R)))),z=z.return}I.length!==0&&X.push({event:Y,listeners:I})}function fL(X,Y){Vl(X,Y),X!=="input"&&X!=="textarea"&&X!=="select"||Y==null||Y.value!==null||J$||(J$=!0,X==="select"&&Y.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",X):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",X));var z={registrationNameDependencies:WU,possibleRegistrationNames:AM};H5(X)||typeof Y.is==="string"||Il(X,Y,z),Y.contentEditable&&!Y.suppressContentEditableWarning&&Y.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function nX(X,Y,z,W){Y!==z&&(z=C0(z),C0(Y)!==z&&(W[X]=Y))}function Vi(X,Y,z){Y.forEach(function(W){z[dC(W)]=W==="style"?cL(X):X.getAttribute(W)})}function jG(X,Y){Y===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",X,X,X):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",X,typeof Y)}function cC(X,Y){return X=X.namespaceURI===sW||X.namespaceURI===K8?X.ownerDocument.createElementNS(X.namespaceURI,X.tagName):X.ownerDocument.createElement(X.tagName),X.innerHTML=Y,X.innerHTML}function C0(X){return RX(X)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",kX(X)),ZX(X)),(typeof X==="string"?X:""+X).replace(Ss,`
|
|
181
|
+
`).replace(ys,"")}function pC(X,Y){return Y=C0(Y),C0(X)===Y?!0:!1}function mQ(X,Y,z,W,_,L){switch(z){case"children":if(typeof W==="string")v7(W,Y,!1),Y==="body"||Y==="textarea"&&W===""||K5(X,W);else if(typeof W==="number"||typeof W==="bigint")v7(""+W,Y,!1),Y!=="body"&&K5(X,""+W);break;case"className":w7(X,"class",W);break;case"tabIndex":w7(X,"tabindex",W);break;case"dir":case"role":case"viewBox":case"width":case"height":w7(X,z,W);break;case"style":sT(X,W,L);break;case"data":if(Y!=="object"){w7(X,"data",W);break}case"src":case"href":if(W===""&&(Y!=="a"||z!=="href")){z==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',z,z):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',z,z),X.removeAttribute(z);break}if(W==null||typeof W==="function"||typeof W==="symbol"||typeof W==="boolean"){X.removeAttribute(z);break}gZ(W,z),W=W5(""+W),X.setAttribute(z,W);break;case"action":case"formAction":if(W!=null&&(Y==="form"?z==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof W==="function"&&(_.encType==null&&_.method==null||v4||(v4=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),_.target==null||b4||(b4=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):Y==="input"||Y==="button"?z==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):Y!=="input"||_.type==="submit"||_.type==="image"||x4?Y!=="button"||_.type==null||_.type==="submit"||x4?typeof W==="function"&&(_.name==null||cE||(cE=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),_.formEncType==null&&_.formMethod==null||v4||(v4=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),_.formTarget==null||b4||(b4=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(x4=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(x4=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):z==="action"?console.error("You can only pass the action prop to <form>."):console.error("You can only pass the formAction prop to <input> or <button>.")),typeof W==="function"){X.setAttribute(z,"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 L==="function"&&(z==="formAction"?(Y!=="input"&&mQ(X,Y,"name",_.name,_,null),mQ(X,Y,"formEncType",_.formEncType,_,null),mQ(X,Y,"formMethod",_.formMethod,_,null),mQ(X,Y,"formTarget",_.formTarget,_,null)):(mQ(X,Y,"encType",_.encType,_,null),mQ(X,Y,"method",_.method,_,null),mQ(X,Y,"target",_.target,_,null)));if(W==null||typeof W==="symbol"||typeof W==="boolean"){X.removeAttribute(z);break}gZ(W,z),W=W5(""+W),X.setAttribute(z,W);break;case"onClick":W!=null&&(typeof W!=="function"&&jG(z,W),X.onclick=qz);break;case"onScroll":W!=null&&(typeof W!=="function"&&jG(z,W),jQ("scroll",X));break;case"onScrollEnd":W!=null&&(typeof W!=="function"&&jG(z,W),jQ("scrollend",X));break;case"dangerouslySetInnerHTML":if(W!=null){if(typeof W!=="object"||!("__html"in W))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(z=W.__html,z!=null){if(_.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");X.innerHTML=z}}break;case"multiple":X.multiple=W&&typeof W!=="function"&&typeof W!=="symbol";break;case"muted":X.muted=W&&typeof W!=="function"&&typeof W!=="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(W==null||typeof W==="function"||typeof W==="boolean"||typeof W==="symbol"){X.removeAttribute("xlink:href");break}gZ(W,z),z=W5(""+W),X.setAttributeNS($U,"xlink:href",z);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":W!=null&&typeof W!=="function"&&typeof W!=="symbol"?(gZ(W,z),X.setAttribute(z,""+W)):X.removeAttribute(z);break;case"inert":W!==""||g4[z]||(g4[z]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",z));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":W&&typeof W!=="function"&&typeof W!=="symbol"?X.setAttribute(z,""):X.removeAttribute(z);break;case"capture":case"download":W===!0?X.setAttribute(z,""):W!==!1&&W!=null&&typeof W!=="function"&&typeof W!=="symbol"?(gZ(W,z),X.setAttribute(z,W)):X.removeAttribute(z);break;case"cols":case"rows":case"size":case"span":W!=null&&typeof W!=="function"&&typeof W!=="symbol"&&!isNaN(W)&&1<=W?(gZ(W,z),X.setAttribute(z,W)):X.removeAttribute(z);break;case"rowSpan":case"start":W==null||typeof W==="function"||typeof W==="symbol"||isNaN(W)?X.removeAttribute(z):(gZ(W,z),X.setAttribute(z,W));break;case"popover":jQ("beforetoggle",X),jQ("toggle",X),y7(X,"popover",W);break;case"xlinkActuate":Yz(X,$U,"xlink:actuate",W);break;case"xlinkArcrole":Yz(X,$U,"xlink:arcrole",W);break;case"xlinkRole":Yz(X,$U,"xlink:role",W);break;case"xlinkShow":Yz(X,$U,"xlink:show",W);break;case"xlinkTitle":Yz(X,$U,"xlink:title",W);break;case"xlinkType":Yz(X,$U,"xlink:type",W);break;case"xmlBase":Yz(X,TO,"xml:base",W);break;case"xmlLang":Yz(X,TO,"xml:lang",W);break;case"xmlSpace":Yz(X,TO,"xml:space",W);break;case"is":L!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),y7(X,"is",W);break;case"innerText":case"textContent":break;case"popoverTarget":pE||W==null||typeof W!=="object"||(pE=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",W));default:!(2<z.length)||z[0]!=="o"&&z[0]!=="O"||z[1]!=="n"&&z[1]!=="N"?(z=aT(z),y7(X,z,W)):WU.hasOwnProperty(z)&&W!=null&&typeof W!=="function"&&jG(z,W)}}function mL(X,Y,z,W,_,L){switch(z){case"style":sT(X,W,L);break;case"dangerouslySetInnerHTML":if(W!=null){if(typeof W!=="object"||!("__html"in W))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(z=W.__html,z!=null){if(_.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");X.innerHTML=z}}break;case"children":typeof W==="string"?K5(X,W):(typeof W==="number"||typeof W==="bigint")&&K5(X,""+W);break;case"onScroll":W!=null&&(typeof W!=="function"&&jG(z,W),jQ("scroll",X));break;case"onScrollEnd":W!=null&&(typeof W!=="function"&&jG(z,W),jQ("scrollend",X));break;case"onClick":W!=null&&(typeof W!=="function"&&jG(z,W),X.onclick=qz);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(WU.hasOwnProperty(z))W!=null&&typeof W!=="function"&&jG(z,W);else Z:{if(z[0]==="o"&&z[1]==="n"&&(_=z.endsWith("Capture"),Y=z.slice(2,_?z.length-7:void 0),L=X[yJ]||null,L=L!=null?L[z]:null,typeof L==="function"&&X.removeEventListener(Y,L,_),typeof W==="function")){typeof L!=="function"&&L!==null&&(z in X?X[z]=null:X.hasAttribute(z)&&X.removeAttribute(z)),X.addEventListener(Y,W,_);break Z}z in X?X[z]=W:W===!0?X.setAttribute(z,""):y7(X,z,W)}}}function YJ(X,Y,z){switch(fL(Y,z),Y){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":jQ("error",X),jQ("load",X);var W=!1,_=!1,L;for(L in z)if(z.hasOwnProperty(L)){var I=z[L];if(I!=null)switch(L){case"src":W=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(Y+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:mQ(X,Y,L,I,z,null)}}_&&mQ(X,Y,"srcSet",z.srcSet,z,null),W&&mQ(X,Y,"src",z.src,z,null);return;case"input":L0("input",z),jQ("invalid",X);var j=L=I=_=null,R=null,D=null;for(W in z)if(z.hasOwnProperty(W)){var p=z[W];if(p!=null)switch(W){case"name":_=p;break;case"type":I=p;break;case"checked":R=p;break;case"defaultChecked":D=p;break;case"value":L=p;break;case"defaultValue":j=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(Y+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:mQ(X,Y,W,p,z,null)}}yT(X,z),wT(X,L,j,R,D,I,_,!1);return;case"select":L0("select",z),jQ("invalid",X),W=I=L=null;for(_ in z)if(z.hasOwnProperty(_)&&(j=z[_],j!=null))switch(_){case"value":L=j;break;case"defaultValue":I=j;break;case"multiple":W=j;default:mQ(X,Y,_,j,z,null)}vT(X,z),Y=L,z=I,X.multiple=!!W,Y!=null?f6(X,!!W,Y,!1):z!=null&&f6(X,!!W,z,!0);return;case"textarea":L0("textarea",z),jQ("invalid",X),L=_=W=null;for(I in z)if(z.hasOwnProperty(I)&&(j=z[I],j!=null))switch(I){case"value":W=j;break;case"defaultValue":_=j;break;case"children":L=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:mQ(X,Y,I,j,z,null)}gT(X,z),uT(X,W,_,L);return;case"option":xT(X,z);for(R in z)if(z.hasOwnProperty(R)&&(W=z[R],W!=null))switch(R){case"selected":X.selected=W&&typeof W!=="function"&&typeof W!=="symbol";break;default:mQ(X,Y,R,W,z,null)}return;case"dialog":jQ("beforetoggle",X),jQ("toggle",X),jQ("cancel",X),jQ("close",X);break;case"iframe":case"object":jQ("load",X);break;case"video":case"audio":for(W=0;W<E1.length;W++)jQ(E1[W],X);break;case"image":jQ("error",X),jQ("load",X);break;case"details":jQ("toggle",X);break;case"embed":case"source":case"link":jQ("error",X),jQ("load",X);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in z)if(z.hasOwnProperty(D)&&(W=z[D],W!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(Y+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:mQ(X,Y,D,W,z,null)}return;default:if(H5(Y)){for(p in z)z.hasOwnProperty(p)&&(W=z[p],W!==void 0&&mL(X,Y,p,W,z,void 0));return}}for(j in z)z.hasOwnProperty(j)&&(W=z[j],W!=null&&mQ(X,Y,j,W,z,null))}function Ai(X,Y,z,W){switch(fL(Y,W),Y){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,L=null,I=null,j=null,R=null,D=null,p=null;for(ZZ in z){var l=z[ZZ];if(z.hasOwnProperty(ZZ)&&l!=null)switch(ZZ){case"checked":break;case"value":break;case"defaultValue":R=l;default:W.hasOwnProperty(ZZ)||mQ(X,Y,ZZ,null,W,l)}}for(var g in W){var ZZ=W[g];if(l=z[g],W.hasOwnProperty(g)&&(ZZ!=null||l!=null))switch(g){case"type":L=ZZ;break;case"name":_=ZZ;break;case"checked":D=ZZ;break;case"defaultChecked":p=ZZ;break;case"value":I=ZZ;break;case"defaultValue":j=ZZ;break;case"children":case"dangerouslySetInnerHTML":if(ZZ!=null)throw Error(Y+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ZZ!==l&&mQ(X,Y,g,ZZ,W,l)}}Y=z.type==="checkbox"||z.type==="radio"?z.checked!=null:z.value!=null,W=W.type==="checkbox"||W.type==="radio"?W.checked!=null:W.value!=null,Y||!W||mE||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),mE=!0),!Y||W||fE||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),fE=!0),ZF(X,I,j,R,D,p,L,_);return;case"select":ZZ=I=j=g=null;for(L in z)if(R=z[L],z.hasOwnProperty(L)&&R!=null)switch(L){case"value":break;case"multiple":ZZ=R;default:W.hasOwnProperty(L)||mQ(X,Y,L,null,W,R)}for(_ in W)if(L=W[_],R=z[_],W.hasOwnProperty(_)&&(L!=null||R!=null))switch(_){case"value":g=L;break;case"defaultValue":j=L;break;case"multiple":I=L;default:L!==R&&mQ(X,Y,_,L,W,R)}W=j,Y=I,z=ZZ,g!=null?f6(X,!!Y,g,!1):!!z!==!!Y&&(W!=null?f6(X,!!Y,W,!0):f6(X,!!Y,Y?[]:"",!1));return;case"textarea":ZZ=g=null;for(j in z)if(_=z[j],z.hasOwnProperty(j)&&_!=null&&!W.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:mQ(X,Y,j,null,W,_)}for(I in W)if(_=W[I],L=z[I],W.hasOwnProperty(I)&&(_!=null||L!=null))switch(I){case"value":g=_;break;case"defaultValue":ZZ=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:_!==L&&mQ(X,Y,I,_,W,L)}hT(X,g,ZZ);return;case"option":for(var VZ in z)if(g=z[VZ],z.hasOwnProperty(VZ)&&g!=null&&!W.hasOwnProperty(VZ))switch(VZ){case"selected":X.selected=!1;break;default:mQ(X,Y,VZ,null,W,g)}for(R in W)if(g=W[R],ZZ=z[R],W.hasOwnProperty(R)&&g!==ZZ&&(g!=null||ZZ!=null))switch(R){case"selected":X.selected=g&&typeof g!=="function"&&typeof g!=="symbol";break;default:mQ(X,Y,R,g,W,ZZ)}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 RZ in z)g=z[RZ],z.hasOwnProperty(RZ)&&g!=null&&!W.hasOwnProperty(RZ)&&mQ(X,Y,RZ,null,W,g);for(D in W)if(g=W[D],ZZ=z[D],W.hasOwnProperty(D)&&g!==ZZ&&(g!=null||ZZ!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(Y+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:mQ(X,Y,D,g,W,ZZ)}return;default:if(H5(Y)){for(var nQ in z)g=z[nQ],z.hasOwnProperty(nQ)&&g!==void 0&&!W.hasOwnProperty(nQ)&&mL(X,Y,nQ,void 0,W,g);for(p in W)g=W[p],ZZ=z[p],!W.hasOwnProperty(p)||g===ZZ||g===void 0&&ZZ===void 0||mL(X,Y,p,g,W,ZZ);return}}for(var TQ in z)g=z[TQ],z.hasOwnProperty(TQ)&&g!=null&&!W.hasOwnProperty(TQ)&&mQ(X,Y,TQ,null,W,g);for(l in W)g=W[l],ZZ=z[l],!W.hasOwnProperty(l)||g===ZZ||g==null&&ZZ==null||mQ(X,Y,l,g,W,ZZ)}function dC(X){switch(X){case"class":return"className";case"for":return"htmlFor";default:return X}}function cL(X){var Y={};X=X.style;for(var z=0;z<X.length;z++){var W=X[z];Y[W]=X.getPropertyValue(W)}return Y}function lC(X,Y,z){if(Y!=null&&typeof Y!=="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var W,_=W="",L;for(L in Y)if(Y.hasOwnProperty(L)){var I=Y[L];I!=null&&typeof I!=="boolean"&&I!==""&&(L.indexOf("--")===0?(aJ(I,L),W+=_+L+":"+(""+I).trim()):typeof I!=="number"||I===0||Q$.has(L)?(aJ(I,L),W+=_+L.replace(rD,"-$1").toLowerCase().replace(oD,"-ms-")+":"+(""+I).trim()):W+=_+L.replace(rD,"-$1").toLowerCase().replace(oD,"-ms-")+":"+I+"px",_=";")}W=W||null,Y=X.getAttribute("style"),Y!==W&&(W=C0(W),C0(Y)!==W&&(z.style=cL(X)))}}function iY(X,Y,z,W,_,L){if(_.delete(z),X=X.getAttribute(z),X===null)switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":return}else if(W!=null)switch(typeof W){case"function":case"symbol":case"boolean":break;default:if(gZ(W,Y),X===""+W)return}nX(Y,X,W,L)}function iC(X,Y,z,W,_,L){if(_.delete(z),X=X.getAttribute(z),X===null){switch(typeof W){case"function":case"symbol":return}if(!W)return}else switch(typeof W){case"function":case"symbol":break;default:if(W)return}nX(Y,X,W,L)}function pL(X,Y,z,W,_,L){if(_.delete(z),X=X.getAttribute(z),X===null)switch(typeof W){case"undefined":case"function":case"symbol":return}else if(W!=null)switch(typeof W){case"function":case"symbol":break;default:if(gZ(W,z),X===""+W)return}nX(Y,X,W,L)}function nC(X,Y,z,W,_,L){if(_.delete(z),X=X.getAttribute(z),X===null)switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(W))return}else if(W!=null)switch(typeof W){case"function":case"symbol":case"boolean":break;default:if(!isNaN(W)&&(gZ(W,Y),X===""+W))return}nX(Y,X,W,L)}function dL(X,Y,z,W,_,L){if(_.delete(z),X=X.getAttribute(z),X===null)switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":return}else if(W!=null)switch(typeof W){case"function":case"symbol":case"boolean":break;default:if(gZ(W,Y),z=W5(""+W),X===z)return}nX(Y,X,W,L)}function sC(X,Y,z,W){for(var _={},L=new Set,I=X.attributes,j=0;j<I.length;j++)switch(I[j].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:L.add(I[j].name)}if(H5(Y)){for(var R in z)if(z.hasOwnProperty(R)){var D=z[R];if(D!=null){if(WU.hasOwnProperty(R))typeof D!=="function"&&jG(R,D);else if(z.suppressHydrationWarning!==!0)switch(R){case"children":typeof D!=="string"&&typeof D!=="number"||nX("children",X.textContent,D,_);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":I=X.innerHTML,D=D?D.__html:void 0,D!=null&&(D=cC(X,D),nX(R,I,D,_));continue;case"style":L.delete(R),lC(X,D,_);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":L.delete(R.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",R);continue;case"className":L.delete("class"),I=ET(X,"class",D),nX("className",I,D,_);continue;default:W.context===Dz&&Y!=="svg"&&Y!=="math"?L.delete(R.toLowerCase()):L.delete(R),I=ET(X,R,D),nX(R,I,D,_)}}}}else for(D in z)if(z.hasOwnProperty(D)&&(R=z[D],R!=null)){if(WU.hasOwnProperty(D))typeof R!=="function"&&jG(D,R);else if(z.suppressHydrationWarning!==!0)switch(D){case"children":typeof R!=="string"&&typeof R!=="number"||nX("children",X.textContent,R,_);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":I=X.innerHTML,R=R?R.__html:void 0,R!=null&&(R=cC(X,R),I!==R&&(_[D]={__html:I}));continue;case"className":iY(X,D,"class",R,L,_);continue;case"tabIndex":iY(X,D,"tabindex",R,L,_);continue;case"style":L.delete(D),lC(X,R,_);continue;case"multiple":L.delete(D),nX(D,X.multiple,R,_);continue;case"muted":L.delete(D),nX(D,X.muted,R,_);continue;case"autoFocus":L.delete("autofocus"),nX(D,X.autofocus,R,_);continue;case"data":if(Y!=="object"){L.delete(D),I=X.getAttribute("data"),nX(D,I,R,_);continue}case"src":case"href":if(!(R!==""||Y==="a"&&D==="href"||Y==="object"&&D==="data")){D==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',D,D):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',D,D);continue}dL(X,D,D,R,L,_);continue;case"action":case"formAction":if(I=X.getAttribute(D),typeof R==="function"){L.delete(D.toLowerCase()),D==="formAction"?(L.delete("name"),L.delete("formenctype"),L.delete("formmethod"),L.delete("formtarget")):(L.delete("enctype"),L.delete("method"),L.delete("target"));continue}else if(I===ws){L.delete(D.toLowerCase()),nX(D,"function",R,_);continue}dL(X,D,D.toLowerCase(),R,L,_);continue;case"xlinkHref":dL(X,D,"xlink:href",R,L,_);continue;case"contentEditable":pL(X,D,"contenteditable",R,L,_);continue;case"spellCheck":pL(X,D,"spellcheck",R,L,_);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":pL(X,D,D,R,L,_);continue;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":iC(X,D,D.toLowerCase(),R,L,_);continue;case"capture":case"download":Z:{j=X;var p=I=D,l=_;if(L.delete(p),j=j.getAttribute(p),j===null)switch(typeof R){case"undefined":case"function":case"symbol":break Z;default:if(R===!1)break Z}else if(R!=null)switch(typeof R){case"function":case"symbol":break;case"boolean":if(R===!0&&j==="")break Z;break;default:if(gZ(R,I),j===""+R)break Z}nX(I,j,R,l)}continue;case"cols":case"rows":case"size":case"span":Z:{if(j=X,p=I=D,l=_,L.delete(p),j=j.getAttribute(p),j===null)switch(typeof R){case"undefined":case"function":case"symbol":case"boolean":break Z;default:if(isNaN(R)||1>R)break Z}else if(R!=null)switch(typeof R){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(R)||1>R)&&(gZ(R,I),j===""+R))break Z}nX(I,j,R,l)}continue;case"rowSpan":nC(X,D,"rowspan",R,L,_);continue;case"start":nC(X,D,D,R,L,_);continue;case"xHeight":iY(X,D,"x-height",R,L,_);continue;case"xlinkActuate":iY(X,D,"xlink:actuate",R,L,_);continue;case"xlinkArcrole":iY(X,D,"xlink:arcrole",R,L,_);continue;case"xlinkRole":iY(X,D,"xlink:role",R,L,_);continue;case"xlinkShow":iY(X,D,"xlink:show",R,L,_);continue;case"xlinkTitle":iY(X,D,"xlink:title",R,L,_);continue;case"xlinkType":iY(X,D,"xlink:type",R,L,_);continue;case"xmlBase":iY(X,D,"xml:base",R,L,_);continue;case"xmlLang":iY(X,D,"xml:lang",R,L,_);continue;case"xmlSpace":iY(X,D,"xml:space",R,L,_);continue;case"inert":R!==""||g4[D]||(g4[D]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",D)),iC(X,D,D,R,L,_);continue;default:if(!(2<D.length)||D[0]!=="o"&&D[0]!=="O"||D[1]!=="n"&&D[1]!=="N"){j=aT(D),I=!1,W.context===Dz&&Y!=="svg"&&Y!=="math"?L.delete(j.toLowerCase()):(p=D.toLowerCase(),p=aW.hasOwnProperty(p)?aW[p]||null:null,p!==null&&p!==D&&(I=!0,L.delete(p)),L.delete(j));Z:if(p=X,l=j,j=R,G5(l))if(p.hasAttribute(l))p=p.getAttribute(l),gZ(j,l),j=p===""+j?j:p;else{switch(typeof j){case"function":case"symbol":break Z;case"boolean":if(p=l.toLowerCase().slice(0,5),p!=="data-"&&p!=="aria-")break Z}j=j===void 0?void 0:null}else j=void 0;I||nX(D,j,R,_)}}}return 0<L.size&&z.suppressHydrationWarning!==!0&&Vi(X,L,_),Object.keys(_).length===0?null:_}function Ii(X,Y){switch(X.length){case 0:return"";case 1:return X[0];case 2:return X[0]+" "+Y+" "+X[1];default:return X.slice(0,-1).join(", ")+", "+Y+" "+X[X.length-1]}}function aC(X){switch(X){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ni(){if(typeof performance.getEntriesByType==="function"){for(var X=0,Y=0,z=performance.getEntriesByType("resource"),W=0;W<z.length;W++){var _=z[W],L=_.transferSize,I=_.initiatorType,j=_.duration;if(L&&j&&aC(I)){I=0,j=_.responseEnd;for(W+=1;W<z.length;W++){var R=z[W],D=R.startTime;if(D>j)break;var{transferSize:p,initiatorType:l}=R;p&&aC(l)&&(R=R.responseEnd,I+=p*(R<j?1:(j-D)/(R-D)))}if(--W,Y+=8*(L+I)/(_.duration/1000),X++,10<X)break}}if(0<X)return Y/X/1e6}return navigator.connection&&(X=navigator.connection.downlink,typeof X==="number")?X:5}function SW(X){return X.nodeType===9?X:X.ownerDocument}function rC(X){switch(X){case K8:return u8;case sW:return u4;default:return Dz}}function oC(X,Y){if(X===Dz)switch(Y){case"svg":return u8;case"math":return u4;default:return Dz}return X===u8&&Y==="foreignObject"?Dz:X}function lL(X,Y){return X==="textarea"||X==="noscript"||typeof Y.children==="string"||typeof Y.children==="number"||typeof Y.children==="bigint"||typeof Y.dangerouslySetInnerHTML==="object"&&Y.dangerouslySetInnerHTML!==null&&Y.dangerouslySetInnerHTML.__html!=null}function ji(){var X=window.event;if(X&&X.type==="popstate"){if(X===DO)return!1;return DO=X,!0}return DO=null,!1}function v5(){var X=window.event;return X&&X!==y1?X.type:null}function g5(){var X=window.event;return X&&X!==y1?X.timeStamp:-1.1}function Ti(X){setTimeout(function(){throw X})}function Pi(X,Y,z){switch(Y){case"button":case"input":case"select":case"textarea":z.autoFocus&&X.focus();break;case"img":z.src?X.src=z.src:z.srcSet&&(X.srcset=z.srcSet)}}function Ri(){}function Ci(X,Y,z,W){Ai(X,Y,z,W),X[yJ]=W}function tC(X){K5(X,"")}function Di(X,Y,z){X.nodeValue=z}function eC(X){if(!X.__reactWarnedAboutChildrenConflict){var Y=X[yJ]||null;if(Y!==null){var z=eZ(X);z!==null&&(typeof Y.children==="string"||typeof Y.children==="number"?(X.__reactWarnedAboutChildrenConflict=!0,BZ(z,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):Y.dangerouslySetInnerHTML!=null&&(X.__reactWarnedAboutChildrenConflict=!0,BZ(z,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function D0(X){return X==="head"}function $i(X,Y){X.removeChild(Y)}function Ei(X,Y){(X.nodeType===9?X.body:X.nodeName==="HTML"?X.ownerDocument.body:X).removeChild(Y)}function ZD(X,Y){var z=Y,W=0;do{var _=z.nextSibling;if(X.removeChild(z),_&&_.nodeType===8)if(z=_.data,z===S1||z===h4){if(W===0){X.removeChild(_),J8(Y);return}W--}else if(z===k1||z===o0||z===kU||z===h8||z===EU)W++;else if(z===bs)h5(X.ownerDocument.documentElement);else if(z===gs){z=X.ownerDocument.head,h5(z);for(var L=z.firstChild;L;){var{nextSibling:I,nodeName:j}=L;L[l5]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&L.rel.toLowerCase()==="stylesheet"||z.removeChild(L),L=I}}else z===vs&&h5(X.ownerDocument.body);z=_}while(z);J8(Y)}function QD(X,Y){var z=X;X=0;do{var W=z.nextSibling;if(z.nodeType===1?Y?(z._stashedDisplay=z.style.display,z.style.display="none"):(z.style.display=z._stashedDisplay||"",z.getAttribute("style")===""&&z.removeAttribute("style")):z.nodeType===3&&(Y?(z._stashedText=z.nodeValue,z.nodeValue=""):z.nodeValue=z._stashedText||""),W&&W.nodeType===8)if(z=W.data,z===S1)if(X===0)break;else X--;else z!==k1&&z!==o0&&z!==kU&&z!==h8||X++;z=W}while(z)}function ki(X){QD(X,!0)}function Si(X){X=X.style,typeof X.setProperty==="function"?X.setProperty("display","none","important"):X.display="none"}function yi(X){X.nodeValue=""}function wi(X){QD(X,!1)}function xi(X,Y){Y=Y[hs],Y=Y!==void 0&&Y!==null&&Y.hasOwnProperty("display")?Y.display:null,X.style.display=Y==null||typeof Y==="boolean"?"":(""+Y).trim()}function bi(X,Y){X.nodeValue=Y}function iL(X){var Y=X.firstChild;Y&&Y.nodeType===10&&(Y=Y.nextSibling);for(;Y;){var z=Y;switch(Y=Y.nextSibling,z.nodeName){case"HTML":case"HEAD":case"BODY":iL(z),NZ(z);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(z.rel.toLowerCase()==="stylesheet")continue}X.removeChild(z)}}function vi(X,Y,z,W){for(;X.nodeType===1;){var _=z;if(X.nodeName.toLowerCase()!==Y.toLowerCase()){if(!W&&(X.nodeName!=="INPUT"||X.type!=="hidden"))break}else if(!W)if(Y==="input"&&X.type==="hidden"){gZ(_.name,"name");var L=_.name==null?null:""+_.name;if(_.type==="hidden"&&X.getAttribute("name")===L)return X}else return X;else if(!X[l5])switch(Y){case"meta":if(!X.hasAttribute("itemprop"))break;return X;case"link":if(L=X.getAttribute("rel"),L==="stylesheet"&&X.hasAttribute("data-precedence"))break;else if(L!==_.rel||X.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||X.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||X.getAttribute("title")!==(_.title==null?null:_.title))break;return X;case"style":if(X.hasAttribute("data-precedence"))break;return X;case"script":if(L=X.getAttribute("src"),(L!==(_.src==null?null:_.src)||X.getAttribute("type")!==(_.type==null?null:_.type)||X.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&L&&X.hasAttribute("async")&&!X.hasAttribute("itemprop"))break;return X;default:return X}if(X=PY(X.nextSibling),X===null)break}return null}function gi(X,Y,z){if(Y==="")return null;for(;X.nodeType!==3;){if((X.nodeType!==1||X.nodeName!=="INPUT"||X.type!=="hidden")&&!z)return null;if(X=PY(X.nextSibling),X===null)return null}return X}function XD(X,Y){for(;X.nodeType!==8;){if((X.nodeType!==1||X.nodeName!=="INPUT"||X.type!=="hidden")&&!Y)return null;if(X=PY(X.nextSibling),X===null)return null}return X}function nL(X){return X.data===o0||X.data===kU}function sL(X){return X.data===h8||X.data===o0&&X.ownerDocument.readyState!==lE}function hi(X,Y){var z=X.ownerDocument;if(X.data===kU)X._reactRetry=Y;else if(X.data!==o0||z.readyState!==lE)Y();else{var W=function(){Y(),z.removeEventListener("DOMContentLoaded",W)};z.addEventListener("DOMContentLoaded",W),X._reactRetry=W}}function PY(X){for(;X!=null;X=X.nextSibling){var Y=X.nodeType;if(Y===1||Y===3)break;if(Y===8){if(Y=X.data,Y===k1||Y===h8||Y===o0||Y===kU||Y===EU||Y===PO||Y===dE)break;if(Y===S1||Y===h4)return null}}return X}function JD(X){if(X.nodeType===1){for(var Y=X.nodeName.toLowerCase(),z={},W=X.attributes,_=0;_<W.length;_++){var L=W[_];z[dC(L.name)]=L.name.toLowerCase()==="style"?cL(X):L.value}return{type:Y,props:z}}return X.nodeType===8?X.data===EU?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:X.nodeValue}function YD(X,Y,z){return z===null||z[xs]!==!0?(X.nodeValue===Y?X=null:(Y=C0(Y),X=C0(X.nodeValue)===Y?null:X.nodeValue),X):null}function aL(X){X=X.nextSibling;for(var Y=0;X;){if(X.nodeType===8){var z=X.data;if(z===S1||z===h4){if(Y===0)return PY(X.nextSibling);Y--}else z!==k1&&z!==h8&&z!==o0&&z!==kU&&z!==EU||Y++}X=X.nextSibling}return null}function qD(X){X=X.previousSibling;for(var Y=0;X;){if(X.nodeType===8){var z=X.data;if(z===k1||z===h8||z===o0||z===kU||z===EU){if(Y===0)return X;Y--}else z!==S1&&z!==h4||Y++}X=X.previousSibling}return null}function ui(X){J8(X)}function fi(X){J8(X)}function mi(X){J8(X)}function GD(X,Y,z,W,_){switch(_&&GF(X,W.ancestorInfo),Y=SW(z),X){case"html":if(X=Y.documentElement,!X)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return X;case"head":if(X=Y.head,!X)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return X;case"body":if(X=Y.body,!X)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return X;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function ci(X,Y,z,W){if(!z[S0]&&eZ(z)){var _=z.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",_,_,_)}switch(X){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(_=z.attributes;_.length;)z.removeAttributeNode(_[0]);YJ(z,X,Y),z[qJ]=W,z[yJ]=Y}function h5(X){for(var Y=X.attributes;Y.length;)X.removeAttributeNode(Y[0]);NZ(X)}function yW(X){return typeof X.getRootNode==="function"?X.getRootNode():X.nodeType===9?X:X.ownerDocument}function zD(X,Y,z){var W=f8;if(W&&typeof Y==="string"&&Y){var _=lY(Y);_='link[rel="'+X+'"][href="'+_+'"]',typeof z==="string"&&(_+='[crossorigin="'+z+'"]'),oE.has(_)||(oE.add(_),X={rel:X,crossOrigin:z,href:Y},W.querySelector(_)===null&&(Y=W.createElement("link"),YJ(Y,"link",X),pZ(Y),W.head.appendChild(Y)))}}function UD(X,Y,z,W){var _=(_=E0.current)?yW(_):null;if(!_)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(X){case"meta":case"title":return null;case"style":return typeof z.precedence==="string"&&typeof z.href==="string"?(z=Q8(z.href),Y=EQ(_).hoistableStyles,W=Y.get(z),W||(W={type:"style",instance:null,count:0,state:null},Y.set(z,W)),W):{type:"void",instance:null,count:0,state:null};case"link":if(z.rel==="stylesheet"&&typeof z.href==="string"&&typeof z.precedence==="string"){X=Q8(z.href);var L=EQ(_).hoistableStyles,I=L.get(X);if(!I&&(_=_.ownerDocument||_,I={type:"stylesheet",instance:null,count:0,state:{loading:yU,preload:null}},L.set(X,I),(L=_.querySelector(u5(X)))&&!L._p&&(I.instance=L,I.state.loading=w1|Jq),!Yq.has(X))){var j={rel:"preload",as:"style",href:z.href,crossOrigin:z.crossOrigin,integrity:z.integrity,media:z.media,hrefLang:z.hrefLang,referrerPolicy:z.referrerPolicy};Yq.set(X,j),L||pi(_,X,j,I.state)}if(Y&&W===null)throw z=`
|
|
182
|
+
|
|
183
|
+
- `+wW(Y)+`
|
|
184
|
+
+ `+wW(z),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+z);return I}if(Y&&W!==null)throw z=`
|
|
185
|
+
|
|
186
|
+
- `+wW(Y)+`
|
|
187
|
+
+ `+wW(z),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+z);return null;case"script":return Y=z.async,z=z.src,typeof z==="string"&&Y&&typeof Y!=="function"&&typeof Y!=="symbol"?(z=X8(z),Y=EQ(_).hoistableScripts,W=Y.get(z),W||(W={type:"script",instance:null,count:0,state:null},Y.set(z,W)),W):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+X+'". this is a bug in React.')}}function wW(X){var Y=0,z="<link";return typeof X.rel==="string"?(Y++,z+=' rel="'+X.rel+'"'):wq.call(X,"rel")&&(Y++,z+=' rel="'+(X.rel===null?"null":"invalid type "+typeof X.rel)+'"'),typeof X.href==="string"?(Y++,z+=' href="'+X.href+'"'):wq.call(X,"href")&&(Y++,z+=' href="'+(X.href===null?"null":"invalid type "+typeof X.href)+'"'),typeof X.precedence==="string"?(Y++,z+=' precedence="'+X.precedence+'"'):wq.call(X,"precedence")&&(Y++,z+=" precedence={"+(X.precedence===null?"null":"invalid type "+typeof X.precedence)+"}"),Object.getOwnPropertyNames(X).length>Y&&(z+=" ..."),z+" />"}function Q8(X){return'href="'+lY(X)+'"'}function u5(X){return'link[rel="stylesheet"]['+X+"]"}function KD(X){return BQ({},X,{"data-precedence":X.precedence,precedence:null})}function pi(X,Y,z,W){X.querySelector('link[rel="preload"][as="style"]['+Y+"]")?W.loading=w1:(Y=X.createElement("link"),W.preload=Y,Y.addEventListener("load",function(){return W.loading|=w1}),Y.addEventListener("error",function(){return W.loading|=aE}),YJ(Y,"link",z),pZ(Y),X.head.appendChild(Y))}function X8(X){return'[src="'+lY(X)+'"]'}function f5(X){return"script[async]"+X}function HD(X,Y,z){if(Y.count++,Y.instance===null)switch(Y.type){case"style":var W=X.querySelector('style[data-href~="'+lY(z.href)+'"]');if(W)return Y.instance=W,pZ(W),W;var _=BQ({},z,{"data-href":z.href,"data-precedence":z.precedence,href:null,precedence:null});return W=(X.ownerDocument||X).createElement("style"),pZ(W),YJ(W,"style",_),xW(W,z.precedence,X),Y.instance=W;case"stylesheet":_=Q8(z.href);var L=X.querySelector(u5(_));if(L)return Y.state.loading|=Jq,Y.instance=L,pZ(L),L;W=KD(z),(_=Yq.get(_))&&rL(W,_),L=(X.ownerDocument||X).createElement("link"),pZ(L);var I=L;return I._p=new Promise(function(j,R){I.onload=j,I.onerror=R}),YJ(L,"link",W),Y.state.loading|=Jq,xW(L,z.precedence,X),Y.instance=L;case"script":if(L=X8(z.src),_=X.querySelector(f5(L)))return Y.instance=_,pZ(_),_;if(W=z,_=Yq.get(L))W=BQ({},z),oL(W,_);return X=X.ownerDocument||X,_=X.createElement("script"),pZ(_),YJ(_,"link",W),X.head.appendChild(_),Y.instance=_;case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+Y.type+'". this is a bug in React.')}else Y.type==="stylesheet"&&(Y.state.loading&Jq)===yU&&(W=Y.instance,Y.state.loading|=Jq,xW(W,z.precedence,X));return Y.instance}function xW(X,Y,z){for(var W=z.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=W.length?W[W.length-1]:null,L=_,I=0;I<W.length;I++){var j=W[I];if(j.dataset.precedence===Y)L=j;else if(L!==_)break}L?L.parentNode.insertBefore(X,L.nextSibling):(Y=z.nodeType===9?z.head:z,Y.insertBefore(X,Y.firstChild))}function rL(X,Y){X.crossOrigin==null&&(X.crossOrigin=Y.crossOrigin),X.referrerPolicy==null&&(X.referrerPolicy=Y.referrerPolicy),X.title==null&&(X.title=Y.title)}function oL(X,Y){X.crossOrigin==null&&(X.crossOrigin=Y.crossOrigin),X.referrerPolicy==null&&(X.referrerPolicy=Y.referrerPolicy),X.integrity==null&&(X.integrity=Y.integrity)}function WD(X,Y,z){if(f4===null){var W=new Map,_=f4=new Map;_.set(z,W)}else _=f4,W=_.get(z),W||(W=new Map,_.set(z,W));if(W.has(X))return W;W.set(X,null),z=z.getElementsByTagName(X);for(_=0;_<z.length;_++){var L=z[_];if(!(L[l5]||L[qJ]||X==="link"&&L.getAttribute("rel")==="stylesheet")&&L.namespaceURI!==K8){var I=L.getAttribute(Y)||"";I=X+I;var j=W.get(I);j?j.push(L):W.set(I,[L])}}return W}function BD(X,Y,z){X=X.ownerDocument||X,X.head.insertBefore(z,Y==="title"?X.querySelector("head > title"):null)}function di(X,Y,z){var W=!z.ancestorInfo.containerTagInScope;if(z.context===u8||Y.itemProp!=null)return!W||Y.itemProp==null||X!=="meta"&&X!=="title"&&X!=="style"&&X!=="link"&&X!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",X,X),!1;switch(X){case"meta":case"title":return!0;case"style":if(typeof Y.precedence!=="string"||typeof Y.href!=="string"||Y.href===""){W&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof Y.rel!=="string"||typeof Y.href!=="string"||Y.href===""||Y.onLoad||Y.onError){if(Y.rel==="stylesheet"&&typeof Y.precedence==="string"){X=Y.href;var{onError:_,disabled:L}=Y;z=[],Y.onLoad&&z.push("`onLoad`"),_&&z.push("`onError`"),L!=null&&z.push("`disabled`"),_=Ii(z,"and"),_+=z.length===1?" prop":" props",L=z.length===1?"an "+_:"the "+_,z.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',X,L,_)}W&&(typeof Y.rel!=="string"||typeof Y.href!=="string"||Y.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(Y.onError||Y.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(Y.rel){case"stylesheet":return X=Y.precedence,Y=Y.disabled,typeof X!=="string"&&W&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof X==="string"&&Y==null;default:return!0}case"script":if(X=Y.async&&typeof Y.async!=="function"&&typeof Y.async!=="symbol",!X||Y.onLoad||Y.onError||!Y.src||typeof Y.src!=="string"){W&&(X?Y.onLoad||Y.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":W&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",X)}return!1}function _D(X){return X.type==="stylesheet"&&(X.state.loading&rE)===yU?!1:!0}function li(X,Y,z,W){if(z.type==="stylesheet"&&(typeof W.media!=="string"||matchMedia(W.media).matches!==!1)&&(z.state.loading&Jq)===yU){if(z.instance===null){var _=Q8(W.href),L=Y.querySelector(u5(_));if(L){Y=L._p,Y!==null&&typeof Y==="object"&&typeof Y.then==="function"&&(X.count++,X=bW.bind(X),Y.then(X,X)),z.state.loading|=Jq,z.instance=L,pZ(L);return}L=Y.ownerDocument||Y,W=KD(W),(_=Yq.get(_))&&rL(W,_),L=L.createElement("link"),pZ(L);var I=L;I._p=new Promise(function(j,R){I.onload=j,I.onerror=R}),YJ(L,"link",W),z.instance=L}X.stylesheets===null&&(X.stylesheets=new Map),X.stylesheets.set(z,Y),(Y=z.state.preload)&&(z.state.loading&rE)===yU&&(X.count++,z=bW.bind(X),Y.addEventListener("load",z),Y.addEventListener("error",z))}}function ii(X,Y){return X.stylesheets&&X.count===0&&vW(X,X.stylesheets),0<X.count||0<X.imgCount?function(z){var W=setTimeout(function(){if(X.stylesheets&&vW(X,X.stylesheets),X.unsuspend){var L=X.unsuspend;X.unsuspend=null,L()}},ms+Y);0<X.imgBytes&&EO===0&&(EO=125*Ni()*ps);var _=setTimeout(function(){if(X.waitingForImages=!1,X.count===0&&(X.stylesheets&&vW(X,X.stylesheets),X.unsuspend)){var L=X.unsuspend;X.unsuspend=null,L()}},(X.imgBytes>EO?50:cs)+Y);return X.unsuspend=z,function(){X.unsuspend=null,clearTimeout(W),clearTimeout(_)}}:null}function bW(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vW(this,this.stylesheets);else if(this.unsuspend){var X=this.unsuspend;this.unsuspend=null,X()}}}function vW(X,Y){X.stylesheets=null,X.unsuspend!==null&&(X.count++,m4=new Map,Y.forEach(ni,X),m4=null,bW.call(X))}function ni(X,Y){if(!(Y.state.loading&Jq)){var z=m4.get(X);if(z)var W=z.get(kO);else{z=new Map,m4.set(X,z);for(var _=X.querySelectorAll("link[data-precedence],style[data-precedence]"),L=0;L<_.length;L++){var I=_[L];if(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")z.set(I.dataset.precedence,I),W=I}W&&z.set(kO,W)}_=Y.instance,I=_.getAttribute("data-precedence"),L=z.get(I)||W,L===W&&z.set(kO,_),z.set(I,_),this.count++,W=bW.bind(this),_.addEventListener("load",W),_.addEventListener("error",W),L?L.parentNode.insertBefore(_,L.nextSibling):(X=X.nodeType===9?X.head:X,X.insertBefore(_,X.firstChild)),Y.state.loading|=Jq}}function si(X,Y,z,W,_,L,I,j,R){this.tag=1,this.containerInfo=X,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=SU,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=u6(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=u6(0),this.hiddenUpdates=u6(null),this.identifierPrefix=W,this.onUncaughtError=_,this.onCaughtError=L,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,X=this.pendingUpdatersLaneMap=[];for(Y=0;31>Y;Y++)X.push(new Set);this._debugRootType=z?"hydrateRoot()":"createRoot()"}function FD(X,Y,z,W,_,L,I,j,R,D,p,l){return X=new si(X,Y,z,I,R,D,p,l,j),Y=Fs,L===!0&&(Y|=jJ|bq),Y|=GQ,L=V(3,null,null,Y),X.current=L,L.stateNode=X,Y=RF(),YU(Y),X.pooledCache=Y,YU(Y),L.memoizedState={element:W,isDehydrated:z,cache:Y},kF(L),X}function LD(X){if(!X)return b0;return X=b0,X}function tL(X,Y,z,W,_,L){if(NJ&&typeof NJ.onScheduleFiberRoot==="function")try{NJ.onScheduleFiberRoot(z8,W,z)}catch(I){CG||(CG=!0,console.error("React instrumentation encountered an error: %o",I))}_=LD(_),W.context===null?W.context=_:W.pendingContext=_,RG&&CY!==null&&!Qk&&(Qk=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
188
|
+
|
|
189
|
+
Check the render method of %s.`,s(CY)||"Unknown")),W=I0(Y),W.payload={element:z},L=L===void 0?null:L,L!==null&&(typeof L!=="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",L),W.callback=L),z=N0(X,W,Y),z!==null&&(HG(Y,"root.render()",null),HX(z,X,Y),I5(z,X,Y))}function MD(X,Y){if(X=X.memoizedState,X!==null&&X.dehydrated!==null){var z=X.retryLane;X.retryLane=z!==0&&z<Y?z:Y}}function eL(X,Y){MD(X,Y),(X=X.alternate)&&MD(X,Y)}function OD(X){if(X.tag===13||X.tag===31){var Y=IJ(X,67108864);Y!==null&&HX(Y,X,67108864),eL(X,67108864)}}function VD(X){if(X.tag===13||X.tag===31){var Y=TY(X);Y=a9(Y);var z=IJ(X,Y);z!==null&&HX(z,X,Y),eL(X,Y)}}function ai(){return CY}function ri(X,Y,z,W){var _=XZ.T;XZ.T=null;var L=vQ.p;try{vQ.p=DY,ZM(X,Y,z,W)}finally{vQ.p=L,XZ.T=_}}function oi(X,Y,z,W){var _=XZ.T;XZ.T=null;var L=vQ.p;try{vQ.p=xq,ZM(X,Y,z,W)}finally{vQ.p=L,XZ.T=_}}function ZM(X,Y,z,W){if(p4){var _=QM(W);if(_===null)uL(X,Y,W,d4,z),ID(X,W);else if(ti(_,X,Y,z,W))W.stopPropagation();else if(ID(X,W),Y&4&&-1<ls.indexOf(X)){for(;_!==null;){var L=eZ(_);if(L!==null)switch(L.tag){case 3:if(L=L.stateNode,L.current.memoizedState.isDehydrated){var I=GG(L.pendingLanes);if(I!==0){var j=L;j.pendingLanes|=2;for(j.entangledLanes|=2;I;){var R=1<<31-SJ(I);j.entanglements[1]|=R,I&=~R}NG(L),(CQ&(dX|SY))===oX&&(C4=sX()+EE,x5(0,!1))}}break;case 31:case 13:j=IJ(L,2),j!==null&&HX(j,L,2),t6(),eL(L,2)}if(L=QM(W),L===null&&uL(X,Y,W,d4,z),L===_)break;_=L}_!==null&&W.stopPropagation()}else uL(X,Y,W,null,z)}}function QM(X){return X=zF(X),XM(X)}function XM(X){if(d4=null,X=vZ(X),X!==null){var Y=C(X);if(Y===null)X=null;else{var z=Y.tag;if(z===13){if(X=y(Y),X!==null)return X;X=null}else if(z===31){if(X=f(Y),X!==null)return X;X=null}else if(z===3){if(Y.stateNode.current.memoizedState.isDehydrated)return Y.tag===3?Y.stateNode.containerInfo:null;X=null}else Y!==X&&(X=null)}}return d4=X,null}function AD(X){switch(X){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 DY;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 xq;case"message":switch(zn()){case LM:return DY;case MM:return xq;case G8:case Un:return $G;case OM:return iW;default:return $G}default:return $G}}function ID(X,Y){switch(X){case"focusin":case"focusout":t0=null;break;case"dragenter":case"dragleave":e0=null;break;case"mouseover":case"mouseout":Z9=null;break;case"pointerover":case"pointerout":b1.delete(Y.pointerId);break;case"gotpointercapture":case"lostpointercapture":v1.delete(Y.pointerId)}}function m5(X,Y,z,W,_,L){if(X===null||X.nativeEvent!==L)return X={blockedOn:Y,domEventName:z,eventSystemFlags:W,nativeEvent:L,targetContainers:[_]},Y!==null&&(Y=eZ(Y),Y!==null&&OD(Y)),X;return X.eventSystemFlags|=W,Y=X.targetContainers,_!==null&&Y.indexOf(_)===-1&&Y.push(_),X}function ti(X,Y,z,W,_){switch(Y){case"focusin":return t0=m5(t0,X,Y,z,W,_),!0;case"dragenter":return e0=m5(e0,X,Y,z,W,_),!0;case"mouseover":return Z9=m5(Z9,X,Y,z,W,_),!0;case"pointerover":var L=_.pointerId;return b1.set(L,m5(b1.get(L)||null,X,Y,z,W,_)),!0;case"gotpointercapture":return L=_.pointerId,v1.set(L,m5(v1.get(L)||null,X,Y,z,W,_)),!0}return!1}function ND(X){var Y=vZ(X.target);if(Y!==null){var z=C(Y);if(z!==null){if(Y=z.tag,Y===13){if(Y=y(z),Y!==null){X.blockedOn=Y,_Z(X.priority,function(){VD(z)});return}}else if(Y===31){if(Y=f(z),Y!==null){X.blockedOn=Y,_Z(X.priority,function(){VD(z)});return}}else if(Y===3&&z.stateNode.current.memoizedState.isDehydrated){X.blockedOn=z.tag===3?z.stateNode.containerInfo:null;return}}}X.blockedOn=null}function gW(X){if(X.blockedOn!==null)return!1;for(var Y=X.targetContainers;0<Y.length;){var z=QM(X.nativeEvent);if(z===null){z=X.nativeEvent;var W=new z.constructor(z.type,z),_=W;i5!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),i5=_,z.target.dispatchEvent(W),i5===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),i5=null}else return Y=eZ(z),Y!==null&&OD(Y),X.blockedOn=z,!1;Y.shift()}return!0}function jD(X,Y,z){gW(X)&&z.delete(Y)}function ei(){SO=!1,t0!==null&&gW(t0)&&(t0=null),e0!==null&&gW(e0)&&(e0=null),Z9!==null&&gW(Z9)&&(Z9=null),b1.forEach(jD),v1.forEach(jD)}function hW(X,Y){X.blockedOn===Y&&(X.blockedOn=null,SO||(SO=!0,kQ.unstable_scheduleCallback(kQ.unstable_NormalPriority,ei)))}function TD(X){l4!==X&&(l4=X,kQ.unstable_scheduleCallback(kQ.unstable_NormalPriority,function(){l4===X&&(l4=null);for(var Y=0;Y<X.length;Y+=3){var z=X[Y],W=X[Y+1],_=X[Y+2];if(typeof W!=="function")if(XM(W||z)===null)continue;else break;var L=eZ(z);L!==null&&(X.splice(Y,3),Y-=3,z={pending:!0,data:_,method:z.method,action:W},Object.freeze(z),XL(L,z,W,_))}}))}function J8(X){function Y(R){return hW(R,X)}t0!==null&&hW(t0,X),e0!==null&&hW(e0,X),Z9!==null&&hW(Z9,X),b1.forEach(Y),v1.forEach(Y);for(var z=0;z<Q9.length;z++){var W=Q9[z];W.blockedOn===X&&(W.blockedOn=null)}for(;0<Q9.length&&(z=Q9[0],z.blockedOn===null);)ND(z),z.blockedOn===null&&Q9.shift();if(z=(X.ownerDocument||X).$$reactFormReplay,z!=null)for(W=0;W<z.length;W+=3){var _=z[W],L=z[W+1],I=_[yJ]||null;if(typeof L==="function")I||TD(z);else if(I){var j=null;if(L&&L.hasAttribute("formAction")){if(_=L,I=L[yJ]||null)j=I.formAction;else if(XM(_)!==null)continue}else j=I.action;typeof j==="function"?z[W+1]=j:(z.splice(W,3),W-=3),TD(z)}}}function PD(){function X(L){L.canIntercept&&L.info==="react-transition"&&L.intercept({handler:function(){return new Promise(function(I){return _=I})},focusReset:"manual",scroll:"manual"})}function Y(){_!==null&&(_(),_=null),W||setTimeout(z,20)}function z(){if(!W&&!navigation.transition){var L=navigation.currentEntry;L&&L.url!=null&&navigation.navigate(L.url,{state:L.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var W=!1,_=null;return navigation.addEventListener("navigate",X),navigation.addEventListener("navigatesuccess",Y),navigation.addEventListener("navigateerror",Y),setTimeout(z,100),function(){W=!0,navigation.removeEventListener("navigate",X),navigation.removeEventListener("navigatesuccess",Y),navigation.removeEventListener("navigateerror",Y),_!==null&&(_(),_=null)}}}function JM(X){this._internalRoot=X}function uW(X){this._internalRoot=X}function RD(X){X[S0]&&(X._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var BQ=Object.assign,Zn=Symbol.for("react.element"),TG=Symbol.for("react.transitional.element"),Y8=Symbol.for("react.portal"),q8=Symbol.for("react.fragment"),fW=Symbol.for("react.strict_mode"),YM=Symbol.for("react.profiler"),qM=Symbol.for("react.consumer"),PG=Symbol.for("react.context"),c5=Symbol.for("react.forward_ref"),GM=Symbol.for("react.suspense"),zM=Symbol.for("react.suspense_list"),mW=Symbol.for("react.memo"),RY=Symbol.for("react.lazy"),UM=Symbol.for("react.activity"),Qn=Symbol.for("react.memo_cache_sentinel"),CD=Symbol.iterator,Xn=Symbol.for("react.client.reference"),cX=Array.isArray,XZ=l8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,vQ=nO.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Jn=Object.freeze({pending:!1,data:null,method:null,action:null}),KM=[],HM=[],_z=-1,$0=LZ(null),p5=LZ(null),E0=LZ(null),cW=LZ(null),d5=0,DD,$D,ED,kD,SD,yD,wD;$.__reactDisabledLog=!0;var WM,xD,BM=!1,_M=new(typeof WeakMap==="function"?WeakMap:Map),CY=null,RG=!1,wq=Object.prototype.hasOwnProperty,FM=kQ.unstable_scheduleCallback,Yn=kQ.unstable_cancelCallback,qn=kQ.unstable_shouldYield,Gn=kQ.unstable_requestPaint,sX=kQ.unstable_now,zn=kQ.unstable_getCurrentPriorityLevel,LM=kQ.unstable_ImmediatePriority,MM=kQ.unstable_UserBlockingPriority,G8=kQ.unstable_NormalPriority,Un=kQ.unstable_LowPriority,OM=kQ.unstable_IdlePriority,Kn=kQ.log,Hn=kQ.unstable_setDisableYieldValue,z8=null,NJ=null,CG=!1,DG=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",SJ=Math.clz32?Math.clz32:k7,Wn=Math.log,Bn=Math.LN2,pW=256,dW=262144,lW=4194304,DY=2,xq=8,$G=32,iW=268435456,k0=Math.random().toString(36).slice(2),qJ="__reactFiber$"+k0,yJ="__reactProps$"+k0,S0="__reactContainer$"+k0,VM="__reactEvents$"+k0,_n="__reactListeners$"+k0,Fn="__reactHandles$"+k0,bD="__reactResources$"+k0,l5="__reactMarker$"+k0,vD=new Set,WU={},AM={},Ln={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},Mn=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]*$"),gD={},hD={},On=/[\n"\\]/g,uD=!1,fD=!1,mD=!1,cD=!1,pD=!1,dD=!1,lD=["value","defaultValue"],iD=!1,nD=/["'&<>\n\t]|^\s|\s$/,Vn="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),sD="applet caption html table td th marquee object template foreignObject desc title".split(" "),An=sD.concat(["button"]),In="dd dt li option optgroup p rp rt".split(" "),aD={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},nW={},IM={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},rD=/([A-Z])/g,oD=/^ms-/,Nn=/^(?:webkit|moz|o)[A-Z]/,jn=/^-ms-/,Tn=/-(.)/g,tD=/;\s*$/,U8={},NM={},eD=!1,Z$=!1,Q$=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(" ")),sW="http://www.w3.org/1998/Math/MathML",K8="http://www.w3.org/2000/svg",Pn=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"]]),aW={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},X$={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},H8={},Rn=RegExp("^(aria)-[: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]*$"),Cn=RegExp("^(aria)[A-Z][: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]*$"),J$=!1,wJ={},Y$=/^on./,Dn=/^on[^A-Z]/,$n=RegExp("^(aria)-[: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]*$"),En=RegExp("^(aria)[A-Z][: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]*$"),kn=/^[\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,i5=null,W8=null,B8=null,jM=!1,EG=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),TM=!1;if(EG)try{var n5={};Object.defineProperty(n5,"passive",{get:function(){TM=!0}}),window.addEventListener("test",n5,n5),window.removeEventListener("test",n5,n5)}catch(X){TM=!1}var y0=null,PM=null,rW=null,BU={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(X){return X.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oW=rJ(BU),s5=BQ({},BU,{view:0,detail:0}),Sn=rJ(s5),RM,CM,a5,tW=BQ({},s5,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:UF,button:0,buttons:0,relatedTarget:function(X){return X.relatedTarget===void 0?X.fromElement===X.srcElement?X.toElement:X.fromElement:X.relatedTarget},movementX:function(X){if("movementX"in X)return X.movementX;return X!==a5&&(a5&&X.type==="mousemove"?(RM=X.screenX-a5.screenX,CM=X.screenY-a5.screenY):CM=RM=0,a5=X),RM},movementY:function(X){return"movementY"in X?X.movementY:CM}}),q$=rJ(tW),yn=BQ({},tW,{dataTransfer:0}),wn=rJ(yn),xn=BQ({},s5,{relatedTarget:0}),DM=rJ(xn),bn=BQ({},BU,{animationName:0,elapsedTime:0,pseudoElement:0}),vn=rJ(bn),gn=BQ({},BU,{clipboardData:function(X){return"clipboardData"in X?X.clipboardData:window.clipboardData}}),hn=rJ(gn),un=BQ({},BU,{data:0}),G$=rJ(un),fn=G$,mn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cn={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"},pn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},dn=BQ({},s5,{key:function(X){if(X.key){var Y=mn[X.key]||X.key;if(Y!=="Unidentified")return Y}return X.type==="keypress"?(X=g7(X),X===13?"Enter":String.fromCharCode(X)):X.type==="keydown"||X.type==="keyup"?cn[X.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:UF,charCode:function(X){return X.type==="keypress"?g7(X):0},keyCode:function(X){return X.type==="keydown"||X.type==="keyup"?X.keyCode:0},which:function(X){return X.type==="keypress"?g7(X):X.type==="keydown"||X.type==="keyup"?X.keyCode:0}}),ln=rJ(dn),nn=BQ({},tW,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),z$=rJ(nn),sn=BQ({},s5,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:UF}),an=rJ(sn),rn=BQ({},BU,{propertyName:0,elapsedTime:0,pseudoElement:0}),on=rJ(rn),tn=BQ({},tW,{deltaX:function(X){return"deltaX"in X?X.deltaX:("wheelDeltaX"in X)?-X.wheelDeltaX:0},deltaY:function(X){return"deltaY"in X?X.deltaY:("wheelDeltaY"in X)?-X.wheelDeltaY:("wheelDelta"in X)?-X.wheelDelta:0},deltaZ:0,deltaMode:0}),en=rJ(tn),Zs=BQ({},BU,{newState:0,oldState:0}),Qs=rJ(Zs),Xs=[9,13,27,32],U$=229,$M=EG&&"CompositionEvent"in window,r5=null;EG&&"documentMode"in document&&(r5=document.documentMode);var Js=EG&&"TextEvent"in window&&!r5,K$=EG&&(!$M||r5&&8<r5&&11>=r5),H$=32,W$=String.fromCharCode(H$),B$=!1,_8=!1,Ys={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},o5=null,t5=null,_$=!1;EG&&(_$=Pl("input")&&(!document.documentMode||9<document.documentMode));var xJ=typeof Object.is==="function"?Object.is:kl,qs=EG&&"documentMode"in document&&11>=document.documentMode,F8=null,EM=null,e5=null,kM=!1,L8={animationend:o9("Animation","AnimationEnd"),animationiteration:o9("Animation","AnimationIteration"),animationstart:o9("Animation","AnimationStart"),transitionrun:o9("Transition","TransitionRun"),transitionstart:o9("Transition","TransitionStart"),transitioncancel:o9("Transition","TransitionCancel"),transitionend:o9("Transition","TransitionEnd")},SM={},F$={};EG&&(F$=document.createElement("div").style,("AnimationEvent"in window)||(delete L8.animationend.animation,delete L8.animationiteration.animation,delete L8.animationstart.animation),("TransitionEvent"in window)||delete L8.transitionend.transition);var L$=t9("animationend"),M$=t9("animationiteration"),O$=t9("animationstart"),Gs=t9("transitionrun"),zs=t9("transitionstart"),Us=t9("transitioncancel"),V$=t9("transitionend"),A$=new Map,yM="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(" ");yM.push("scrollEnd");var I$=0;if(typeof performance==="object"&&typeof performance.now==="function")var Ks=performance,N$=function(){return Ks.now()};else{var Hs=Date;N$=function(){return Hs.now()}}var wM=typeof reportError==="function"?reportError:function(X){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof X==="object"&&X!==null&&typeof X.message==="string"?String(X.message):String(X),error:X});if(!window.dispatchEvent(Y))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",X);return}console.error(X)},Ws="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",eW=0,xM=1,bM=2,vM=3,Z4="– ",Q4="+ ",j$=" ",aQ=typeof console<"u"&&typeof console.timeStamp==="function"&&typeof performance<"u"&&typeof performance.measure==="function",nY="Components ⚛",_Q="Scheduler ⚛",LQ="Blocking",w0=!1,Fz={color:"primary",properties:null,tooltipText:"",track:nY},x0={start:-0,end:-0,detail:{devtools:Fz}},Bs=["Changed Props",""],T$="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",_s=["Changed Props",T$],Z1=1,Lz=2,sY=[],M8=0,gM=0,b0={};Object.freeze(b0);var aY=null,O8=null,nZ=0,Fs=1,GQ=2,jJ=8,bq=16,Ls=32,P$=!1;try{var R$=Object.preventExtensions({})}catch(X){P$=!0}var hM=new WeakMap,V8=[],A8=0,X4=null,Q1=0,rY=[],oY=0,_U=null,Mz=1,Oz="",GJ=null,rQ=null,AQ=!1,kG=!1,$Y=null,v0=null,tY=!1,uM=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),fM=LZ(null),mM=LZ(null),C$={},J4=null,I8=null,N8=!1,Ms=typeof AbortController<"u"?AbortController:function(){var X=[],Y=this.signal={aborted:!1,addEventListener:function(z,W){X.push(W)}};this.abort=function(){Y.aborted=!0,X.forEach(function(z){return z()})}},Os=kQ.unstable_scheduleCallback,Vs=kQ.unstable_NormalPriority,SX={$$typeof:PG,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},yX=kQ.unstable_now,Y4=console.createTask?console.createTask:function(){return null},X1=1,q4=2,aX=-0,g0=-0,Vz=-0,Az=null,bJ=-1.1,FU=-0,zX=-0,dZ=-1.1,iZ=-1.1,XX=null,WX=!1,h0=-0,SG=-1.1,J1=null,u0=0,cM=null,pM=null,LU=-1.1,Y1=null,j8=-1.1,G4=-1.1,yG=-0,Iz=-1.1,eY=-1.1,dM=0,q1=null,D$=null,$$=null,f0=-1.1,MU=null,m0=-1.1,z4=-1.1,E$=-0,k$=-0,U4=0,Nz=null,S$=0,G1=-1.1,K4=!1,H4=!1,z1=null,lM=0,OU=0,T8=null,y$=XZ.S;XZ.S=function(X,Y){if(DE=sX(),typeof Y==="object"&&Y!==null&&typeof Y.then==="function"){if(0>Iz&&0>eY){Iz=yX();var z=g5(),W=v5();if(z!==m0||W!==MU)m0=-1.1;f0=z,MU=W}gl(X,Y)}y$!==null&&y$(X,Y)};var VU=LZ(null),vq={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},U1=[],K1=[],H1=[],W1=[],B1=[],_1=[],AU=new Set;vq.recordUnsafeLifecycleWarnings=function(X,Y){AU.has(X.type)||(typeof Y.componentWillMount==="function"&&Y.componentWillMount.__suppressDeprecationWarning!==!0&&U1.push(X),X.mode&jJ&&typeof Y.UNSAFE_componentWillMount==="function"&&K1.push(X),typeof Y.componentWillReceiveProps==="function"&&Y.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&H1.push(X),X.mode&jJ&&typeof Y.UNSAFE_componentWillReceiveProps==="function"&&W1.push(X),typeof Y.componentWillUpdate==="function"&&Y.componentWillUpdate.__suppressDeprecationWarning!==!0&&B1.push(X),X.mode&jJ&&typeof Y.UNSAFE_componentWillUpdate==="function"&&_1.push(X))},vq.flushPendingUnsafeLifecycleWarnings=function(){var X=new Set;0<U1.length&&(U1.forEach(function(j){X.add(s(j)||"Component"),AU.add(j.type)}),U1=[]);var Y=new Set;0<K1.length&&(K1.forEach(function(j){Y.add(s(j)||"Component"),AU.add(j.type)}),K1=[]);var z=new Set;0<H1.length&&(H1.forEach(function(j){z.add(s(j)||"Component"),AU.add(j.type)}),H1=[]);var W=new Set;0<W1.length&&(W1.forEach(function(j){W.add(s(j)||"Component"),AU.add(j.type)}),W1=[]);var _=new Set;0<B1.length&&(B1.forEach(function(j){_.add(s(j)||"Component"),AU.add(j.type)}),B1=[]);var L=new Set;if(0<_1.length&&(_1.forEach(function(j){L.add(s(j)||"Component"),AU.add(j.type)}),_1=[]),0<Y.size){var I=O(Y);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
190
|
+
|
|
191
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
192
|
+
|
|
193
|
+
Please update the following components: %s`,I)}0<W.size&&(I=O(W),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
194
|
+
|
|
195
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
196
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
197
|
+
|
|
198
|
+
Please update the following components: %s`,I)),0<L.size&&(I=O(L),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
199
|
+
|
|
200
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
201
|
+
|
|
202
|
+
Please update the following components: %s`,I)),0<X.size&&(I=O(X),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
203
|
+
|
|
204
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
205
|
+
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
206
|
+
|
|
207
|
+
Please update the following components: %s`,I)),0<z.size&&(I=O(z),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
208
|
+
|
|
209
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
210
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
211
|
+
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
212
|
+
|
|
213
|
+
Please update the following components: %s`,I)),0<_.size&&(I=O(_),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
214
|
+
|
|
215
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
216
|
+
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
217
|
+
|
|
218
|
+
Please update the following components: %s`,I))};var W4=new Map,w$=new Set;vq.recordLegacyContextWarning=function(X,Y){var z=null;for(var W=X;W!==null;)W.mode&jJ&&(z=W),W=W.return;z===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!w$.has(X.type)&&(W=W4.get(z),X.type.contextTypes!=null||X.type.childContextTypes!=null||Y!==null&&typeof Y.getChildContext==="function")&&(W===void 0&&(W=[],W4.set(z,W)),W.push(X))},vq.flushLegacyContextWarning=function(){W4.forEach(function(X){if(X.length!==0){var Y=X[0],z=new Set;X.forEach(function(_){z.add(s(_)||"Component"),w$.add(_.type)});var W=O(z);BZ(Y,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
|
219
|
+
|
|
220
|
+
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
221
|
+
|
|
222
|
+
Please update the following components: %s
|
|
223
|
+
|
|
224
|
+
Learn more about this warning here: https://react.dev/link/legacy-context`,W)})}})},vq.discardPendingWarnings=function(){U1=[],K1=[],H1=[],W1=[],B1=[],_1=[],W4=new Map};var x$={react_stack_bottom_frame:function(X,Y,z){var W=RG;RG=!0;try{return X(Y,z)}finally{RG=W}}},iM=x$.react_stack_bottom_frame.bind(x$),b$={react_stack_bottom_frame:function(X){var Y=RG;RG=!0;try{return X.render()}finally{RG=Y}}},v$=b$.react_stack_bottom_frame.bind(b$),g$={react_stack_bottom_frame:function(X,Y){try{Y.componentDidMount()}catch(z){bQ(X,X.return,z)}}},nM=g$.react_stack_bottom_frame.bind(g$),h$={react_stack_bottom_frame:function(X,Y,z,W,_){try{Y.componentDidUpdate(z,W,_)}catch(L){bQ(X,X.return,L)}}},u$=h$.react_stack_bottom_frame.bind(h$),f$={react_stack_bottom_frame:function(X,Y){var z=Y.stack;X.componentDidCatch(Y.value,{componentStack:z!==null?z:""})}},As=f$.react_stack_bottom_frame.bind(f$),m$={react_stack_bottom_frame:function(X,Y,z){try{z.componentWillUnmount()}catch(W){bQ(X,Y,W)}}},c$=m$.react_stack_bottom_frame.bind(m$),p$={react_stack_bottom_frame:function(X){var Y=X.create;return X=X.inst,Y=Y(),X.destroy=Y}},Is=p$.react_stack_bottom_frame.bind(p$),d$={react_stack_bottom_frame:function(X,Y,z){try{z()}catch(W){bQ(X,Y,W)}}},Ns=d$.react_stack_bottom_frame.bind(d$),l$={react_stack_bottom_frame:function(X){var Y=X._init;return Y(X._payload)}},js=l$.react_stack_bottom_frame.bind(l$),P8=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),sM=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),B4=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),_4={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},IU=null,F1=!1,R8=null,L1=0,zQ=null,aM,i$=aM=!1,n$={},s$={},a$={};M=function(X,Y,z){if(z!==null&&typeof z==="object"&&z._store&&(!z._store.validated&&z.key==null||z._store.validated===2)){if(typeof z._store!=="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");z._store.validated=1;var W=s(X),_=W||"null";if(!n$[_]){n$[_]=!0,z=z._owner,X=X._debugOwner;var L="";X&&typeof X.tag==="number"&&(_=s(X))&&(L=`
|
|
225
|
+
|
|
226
|
+
Check the render method of \``+_+"`."),L||W&&(L=`
|
|
227
|
+
|
|
228
|
+
Check the top-level render call using <`+W+">.");var I="";z!=null&&X!==z&&(W=null,typeof z.tag==="number"?W=s(z):typeof z.name==="string"&&(W=z.name),W&&(I=" It was passed a child from "+W+".")),BZ(Y,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',L,I)})}}};var NU=mP(!0),r$=mP(!1),o$=0,t$=1,e$=2,rM=3,c0=!1,ZE=!1,oM=null,tM=!1,C8=LZ(null),F4=LZ(0),EY=LZ(null),Zq=null,D8=1,M1=2,CX=LZ(0),L4=0,Qq=1,vJ=2,kY=4,gJ=8,$8,QE=new Set,XE=new Set,eM=new Set,JE=new Set,jz=0,rZ=null,cQ=null,wX=null,M4=!1,E8=!1,jU=!1,O4=0,O1=0,Tz=null,Ts=0,Ps=25,QZ=null,Xq=null,Pz=-1,V1=!1,A1={readContext:QX,use:P0,useCallback:MX,useContext:MX,useEffect:MX,useImperativeHandle:MX,useLayoutEffect:MX,useInsertionEffect:MX,useMemo:MX,useReducer:MX,useRef:MX,useState:MX,useDebugValue:MX,useDeferredValue:MX,useTransition:MX,useSyncExternalStore:MX,useId:MX,useHostTransitionStatus:MX,useFormState:MX,useActionState:MX,useOptimistic:MX,useMemoCache:MX,useCacheRefresh:MX};A1.useEffectEvent=MX;var ZO=null,YE=null,QO=null,qE=null,wG=null,gq=null,V4=null;ZO={readContext:function(X){return QX(X)},use:P0,useCallback:function(X,Y){return QZ="useCallback",WQ(),l6(Y),tF(X,Y)},useContext:function(X){return QZ="useContext",WQ(),QX(X)},useEffect:function(X,Y){return QZ="useEffect",WQ(),l6(Y),WW(X,Y)},useImperativeHandle:function(X,Y,z){return QZ="useImperativeHandle",WQ(),l6(z),oF(X,Y,z)},useInsertionEffect:function(X,Y){QZ="useInsertionEffect",WQ(),l6(Y),GU(4,vJ,X,Y)},useLayoutEffect:function(X,Y){return QZ="useLayoutEffect",WQ(),l6(Y),rF(X,Y)},useMemo:function(X,Y){QZ="useMemo",WQ(),l6(Y);var z=XZ.H;XZ.H=wG;try{return eF(X,Y)}finally{XZ.H=z}},useReducer:function(X,Y,z){QZ="useReducer",WQ();var W=XZ.H;XZ.H=wG;try{return mF(X,Y,z)}finally{XZ.H=W}},useRef:function(X){return QZ="useRef",WQ(),sF(X)},useState:function(X){QZ="useState",WQ();var Y=XZ.H;XZ.H=wG;try{return lF(X)}finally{XZ.H=Y}},useDebugValue:function(){QZ="useDebugValue",WQ()},useDeferredValue:function(X,Y){return QZ="useDeferredValue",WQ(),ZL(X,Y)},useTransition:function(){return QZ="useTransition",WQ(),JL()},useSyncExternalStore:function(X,Y,z){return QZ="useSyncExternalStore",WQ(),pF(X,Y,z)},useId:function(){return QZ="useId",WQ(),YL()},useFormState:function(X,Y){return QZ="useFormState",WQ(),GW(),n6(X,Y)},useActionState:function(X,Y){return QZ="useActionState",WQ(),n6(X,Y)},useOptimistic:function(X){return QZ="useOptimistic",WQ(),iF(X)},useHostTransitionStatus:zU,useMemoCache:qU,useCacheRefresh:function(){return QZ="useCacheRefresh",WQ(),qL()},useEffectEvent:function(X){return QZ="useEffectEvent",WQ(),aF(X)}},YE={readContext:function(X){return QX(X)},use:P0,useCallback:function(X,Y){return QZ="useCallback",WZ(),tF(X,Y)},useContext:function(X){return QZ="useContext",WZ(),QX(X)},useEffect:function(X,Y){return QZ="useEffect",WZ(),WW(X,Y)},useImperativeHandle:function(X,Y,z){return QZ="useImperativeHandle",WZ(),oF(X,Y,z)},useInsertionEffect:function(X,Y){QZ="useInsertionEffect",WZ(),GU(4,vJ,X,Y)},useLayoutEffect:function(X,Y){return QZ="useLayoutEffect",WZ(),rF(X,Y)},useMemo:function(X,Y){QZ="useMemo",WZ();var z=XZ.H;XZ.H=wG;try{return eF(X,Y)}finally{XZ.H=z}},useReducer:function(X,Y,z){QZ="useReducer",WZ();var W=XZ.H;XZ.H=wG;try{return mF(X,Y,z)}finally{XZ.H=W}},useRef:function(X){return QZ="useRef",WZ(),sF(X)},useState:function(X){QZ="useState",WZ();var Y=XZ.H;XZ.H=wG;try{return lF(X)}finally{XZ.H=Y}},useDebugValue:function(){QZ="useDebugValue",WZ()},useDeferredValue:function(X,Y){return QZ="useDeferredValue",WZ(),ZL(X,Y)},useTransition:function(){return QZ="useTransition",WZ(),JL()},useSyncExternalStore:function(X,Y,z){return QZ="useSyncExternalStore",WZ(),pF(X,Y,z)},useId:function(){return QZ="useId",WZ(),YL()},useActionState:function(X,Y){return QZ="useActionState",WZ(),n6(X,Y)},useFormState:function(X,Y){return QZ="useFormState",WZ(),GW(),n6(X,Y)},useOptimistic:function(X){return QZ="useOptimistic",WZ(),iF(X)},useHostTransitionStatus:zU,useMemoCache:qU,useCacheRefresh:function(){return QZ="useCacheRefresh",WZ(),qL()},useEffectEvent:function(X){return QZ="useEffectEvent",WZ(),aF(X)}},QO={readContext:function(X){return QX(X)},use:P0,useCallback:function(X,Y){return QZ="useCallback",WZ(),FW(X,Y)},useContext:function(X){return QZ="useContext",WZ(),QX(X)},useEffect:function(X,Y){QZ="useEffect",WZ(),oJ(2048,gJ,X,Y)},useImperativeHandle:function(X,Y,z){return QZ="useImperativeHandle",WZ(),_W(X,Y,z)},useInsertionEffect:function(X,Y){return QZ="useInsertionEffect",WZ(),oJ(4,vJ,X,Y)},useLayoutEffect:function(X,Y){return QZ="useLayoutEffect",WZ(),oJ(4,kY,X,Y)},useMemo:function(X,Y){QZ="useMemo",WZ();var z=XZ.H;XZ.H=gq;try{return LW(X,Y)}finally{XZ.H=z}},useReducer:function(X,Y,z){QZ="useReducer",WZ();var W=XZ.H;XZ.H=gq;try{return i6(X,Y,z)}finally{XZ.H=W}},useRef:function(){return QZ="useRef",WZ(),hQ().memoizedState},useState:function(){QZ="useState",WZ();var X=XZ.H;XZ.H=gq;try{return i6(Sq)}finally{XZ.H=X}},useDebugValue:function(){QZ="useDebugValue",WZ()},useDeferredValue:function(X,Y){return QZ="useDeferredValue",WZ(),KR(X,Y)},useTransition:function(){return QZ="useTransition",WZ(),LR()},useSyncExternalStore:function(X,Y,z){return QZ="useSyncExternalStore",WZ(),UW(X,Y,z)},useId:function(){return QZ="useId",WZ(),hQ().memoizedState},useFormState:function(X){return QZ="useFormState",WZ(),GW(),KW(X)},useActionState:function(X){return QZ="useActionState",WZ(),KW(X)},useOptimistic:function(X,Y){return QZ="useOptimistic",WZ(),eP(X,Y)},useHostTransitionStatus:zU,useMemoCache:qU,useCacheRefresh:function(){return QZ="useCacheRefresh",WZ(),hQ().memoizedState},useEffectEvent:function(X){return QZ="useEffectEvent",WZ(),BW(X)}},qE={readContext:function(X){return QX(X)},use:P0,useCallback:function(X,Y){return QZ="useCallback",WZ(),FW(X,Y)},useContext:function(X){return QZ="useContext",WZ(),QX(X)},useEffect:function(X,Y){QZ="useEffect",WZ(),oJ(2048,gJ,X,Y)},useImperativeHandle:function(X,Y,z){return QZ="useImperativeHandle",WZ(),_W(X,Y,z)},useInsertionEffect:function(X,Y){return QZ="useInsertionEffect",WZ(),oJ(4,vJ,X,Y)},useLayoutEffect:function(X,Y){return QZ="useLayoutEffect",WZ(),oJ(4,kY,X,Y)},useMemo:function(X,Y){QZ="useMemo",WZ();var z=XZ.H;XZ.H=V4;try{return LW(X,Y)}finally{XZ.H=z}},useReducer:function(X,Y,z){QZ="useReducer",WZ();var W=XZ.H;XZ.H=V4;try{return P5(X,Y,z)}finally{XZ.H=W}},useRef:function(){return QZ="useRef",WZ(),hQ().memoizedState},useState:function(){QZ="useState",WZ();var X=XZ.H;XZ.H=V4;try{return P5(Sq)}finally{XZ.H=X}},useDebugValue:function(){QZ="useDebugValue",WZ()},useDeferredValue:function(X,Y){return QZ="useDeferredValue",WZ(),HR(X,Y)},useTransition:function(){return QZ="useTransition",WZ(),MR()},useSyncExternalStore:function(X,Y,z){return QZ="useSyncExternalStore",WZ(),UW(X,Y,z)},useId:function(){return QZ="useId",WZ(),hQ().memoizedState},useFormState:function(X){return QZ="useFormState",WZ(),GW(),HW(X)},useActionState:function(X){return QZ="useActionState",WZ(),HW(X)},useOptimistic:function(X,Y){return QZ="useOptimistic",WZ(),QR(X,Y)},useHostTransitionStatus:zU,useMemoCache:qU,useCacheRefresh:function(){return QZ="useCacheRefresh",WZ(),hQ().memoizedState},useEffectEvent:function(X){return QZ="useEffectEvent",WZ(),BW(X)}},wG={readContext:function(X){return B(),QX(X)},use:function(X){return H(),P0(X)},useCallback:function(X,Y){return QZ="useCallback",H(),WQ(),tF(X,Y)},useContext:function(X){return QZ="useContext",H(),WQ(),QX(X)},useEffect:function(X,Y){return QZ="useEffect",H(),WQ(),WW(X,Y)},useImperativeHandle:function(X,Y,z){return QZ="useImperativeHandle",H(),WQ(),oF(X,Y,z)},useInsertionEffect:function(X,Y){QZ="useInsertionEffect",H(),WQ(),GU(4,vJ,X,Y)},useLayoutEffect:function(X,Y){return QZ="useLayoutEffect",H(),WQ(),rF(X,Y)},useMemo:function(X,Y){QZ="useMemo",H(),WQ();var z=XZ.H;XZ.H=wG;try{return eF(X,Y)}finally{XZ.H=z}},useReducer:function(X,Y,z){QZ="useReducer",H(),WQ();var W=XZ.H;XZ.H=wG;try{return mF(X,Y,z)}finally{XZ.H=W}},useRef:function(X){return QZ="useRef",H(),WQ(),sF(X)},useState:function(X){QZ="useState",H(),WQ();var Y=XZ.H;XZ.H=wG;try{return lF(X)}finally{XZ.H=Y}},useDebugValue:function(){QZ="useDebugValue",H(),WQ()},useDeferredValue:function(X,Y){return QZ="useDeferredValue",H(),WQ(),ZL(X,Y)},useTransition:function(){return QZ="useTransition",H(),WQ(),JL()},useSyncExternalStore:function(X,Y,z){return QZ="useSyncExternalStore",H(),WQ(),pF(X,Y,z)},useId:function(){return QZ="useId",H(),WQ(),YL()},useFormState:function(X,Y){return QZ="useFormState",H(),WQ(),n6(X,Y)},useActionState:function(X,Y){return QZ="useActionState",H(),WQ(),n6(X,Y)},useOptimistic:function(X){return QZ="useOptimistic",H(),WQ(),iF(X)},useMemoCache:function(X){return H(),qU(X)},useHostTransitionStatus:zU,useCacheRefresh:function(){return QZ="useCacheRefresh",WQ(),qL()},useEffectEvent:function(X){return QZ="useEffectEvent",H(),WQ(),aF(X)}},gq={readContext:function(X){return B(),QX(X)},use:function(X){return H(),P0(X)},useCallback:function(X,Y){return QZ="useCallback",H(),WZ(),FW(X,Y)},useContext:function(X){return QZ="useContext",H(),WZ(),QX(X)},useEffect:function(X,Y){QZ="useEffect",H(),WZ(),oJ(2048,gJ,X,Y)},useImperativeHandle:function(X,Y,z){return QZ="useImperativeHandle",H(),WZ(),_W(X,Y,z)},useInsertionEffect:function(X,Y){return QZ="useInsertionEffect",H(),WZ(),oJ(4,vJ,X,Y)},useLayoutEffect:function(X,Y){return QZ="useLayoutEffect",H(),WZ(),oJ(4,kY,X,Y)},useMemo:function(X,Y){QZ="useMemo",H(),WZ();var z=XZ.H;XZ.H=gq;try{return LW(X,Y)}finally{XZ.H=z}},useReducer:function(X,Y,z){QZ="useReducer",H(),WZ();var W=XZ.H;XZ.H=gq;try{return i6(X,Y,z)}finally{XZ.H=W}},useRef:function(){return QZ="useRef",H(),WZ(),hQ().memoizedState},useState:function(){QZ="useState",H(),WZ();var X=XZ.H;XZ.H=gq;try{return i6(Sq)}finally{XZ.H=X}},useDebugValue:function(){QZ="useDebugValue",H(),WZ()},useDeferredValue:function(X,Y){return QZ="useDeferredValue",H(),WZ(),KR(X,Y)},useTransition:function(){return QZ="useTransition",H(),WZ(),LR()},useSyncExternalStore:function(X,Y,z){return QZ="useSyncExternalStore",H(),WZ(),UW(X,Y,z)},useId:function(){return QZ="useId",H(),WZ(),hQ().memoizedState},useFormState:function(X){return QZ="useFormState",H(),WZ(),KW(X)},useActionState:function(X){return QZ="useActionState",H(),WZ(),KW(X)},useOptimistic:function(X,Y){return QZ="useOptimistic",H(),WZ(),eP(X,Y)},useMemoCache:function(X){return H(),qU(X)},useHostTransitionStatus:zU,useCacheRefresh:function(){return QZ="useCacheRefresh",WZ(),hQ().memoizedState},useEffectEvent:function(X){return QZ="useEffectEvent",H(),WZ(),BW(X)}},V4={readContext:function(X){return B(),QX(X)},use:function(X){return H(),P0(X)},useCallback:function(X,Y){return QZ="useCallback",H(),WZ(),FW(X,Y)},useContext:function(X){return QZ="useContext",H(),WZ(),QX(X)},useEffect:function(X,Y){QZ="useEffect",H(),WZ(),oJ(2048,gJ,X,Y)},useImperativeHandle:function(X,Y,z){return QZ="useImperativeHandle",H(),WZ(),_W(X,Y,z)},useInsertionEffect:function(X,Y){return QZ="useInsertionEffect",H(),WZ(),oJ(4,vJ,X,Y)},useLayoutEffect:function(X,Y){return QZ="useLayoutEffect",H(),WZ(),oJ(4,kY,X,Y)},useMemo:function(X,Y){QZ="useMemo",H(),WZ();var z=XZ.H;XZ.H=gq;try{return LW(X,Y)}finally{XZ.H=z}},useReducer:function(X,Y,z){QZ="useReducer",H(),WZ();var W=XZ.H;XZ.H=gq;try{return P5(X,Y,z)}finally{XZ.H=W}},useRef:function(){return QZ="useRef",H(),WZ(),hQ().memoizedState},useState:function(){QZ="useState",H(),WZ();var X=XZ.H;XZ.H=gq;try{return P5(Sq)}finally{XZ.H=X}},useDebugValue:function(){QZ="useDebugValue",H(),WZ()},useDeferredValue:function(X,Y){return QZ="useDeferredValue",H(),WZ(),HR(X,Y)},useTransition:function(){return QZ="useTransition",H(),WZ(),MR()},useSyncExternalStore:function(X,Y,z){return QZ="useSyncExternalStore",H(),WZ(),UW(X,Y,z)},useId:function(){return QZ="useId",H(),WZ(),hQ().memoizedState},useFormState:function(X){return QZ="useFormState",H(),WZ(),HW(X)},useActionState:function(X){return QZ="useActionState",H(),WZ(),HW(X)},useOptimistic:function(X,Y){return QZ="useOptimistic",H(),WZ(),QR(X,Y)},useMemoCache:function(X){return H(),qU(X)},useHostTransitionStatus:zU,useCacheRefresh:function(){return QZ="useCacheRefresh",WZ(),hQ().memoizedState},useEffectEvent:function(X){return QZ="useEffectEvent",H(),WZ(),BW(X)}};var GE={},zE=new Set,UE=new Set,KE=new Set,HE=new Set,WE=new Set,BE=new Set,_E=new Set,FE=new Set,LE=new Set,ME=new Set;Object.freeze(GE);var XO={enqueueSetState:function(X,Y,z){X=X._reactInternals;var W=TY(X),_=I0(W);_.payload=Y,z!==void 0&&z!==null&&(zL(z),_.callback=z),Y=N0(X,_,W),Y!==null&&(HG(W,"this.setState()",X),HX(Y,X,W),I5(Y,X,W))},enqueueReplaceState:function(X,Y,z){X=X._reactInternals;var W=TY(X),_=I0(W);_.tag=t$,_.payload=Y,z!==void 0&&z!==null&&(zL(z),_.callback=z),Y=N0(X,_,W),Y!==null&&(HG(W,"this.replaceState()",X),HX(Y,X,W),I5(Y,X,W))},enqueueForceUpdate:function(X,Y){X=X._reactInternals;var z=TY(X),W=I0(z);W.tag=e$,Y!==void 0&&Y!==null&&(zL(Y),W.callback=Y),Y=N0(X,W,z),Y!==null&&(HG(z,"this.forceUpdate()",X),HX(Y,X,z),I5(Y,X,z))}},k8=null,JO=null,YO=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),xX=!1,OE={},VE={},AE={},IE={},S8=!1,NE={},A4={},qO={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},jE=!1,TE=null;TE=new Set;var Rz=!1,bX=!1,GO=!1,PE=typeof WeakSet==="function"?WeakSet:Set,rX=null,y8=null,w8=null,vX=null,ZY=!1,hq=null,pX=!1,I1=8192,Rs={getCacheForType:function(X){var Y=QX(SX),z=Y.data.get(X);return z===void 0&&(z=X(),Y.data.set(X,z)),z},cacheSignal:function(){return QX(SX).controller.signal},getOwner:function(){return CY}};if(typeof Symbol==="function"&&Symbol.for){var N1=Symbol.for;N1("selector.component"),N1("selector.has_pseudo_class"),N1("selector.role"),N1("selector.test_id"),N1("selector.text")}var Cs=[],Ds=typeof WeakMap==="function"?WeakMap:Map,oX=0,dX=2,SY=4,Cz=0,j1=1,TU=2,I4=3,p0=4,N4=6,RE=5,CQ=oX,pQ=null,HQ=null,UQ=0,QY=0,j4=1,PU=2,T1=3,CE=4,zO=5,P1=6,T4=7,UO=8,RU=9,uQ=QY,yY=null,d0=!1,x8=!1,KO=!1,xG=0,UX=Cz,l0=0,i0=0,HO=0,XY=0,CU=0,R1=null,hJ=null,P4=!1,R4=0,DE=0,$E=300,C4=1/0,EE=500,C1=null,OX=null,n0=null,D4=0,WO=1,BO=2,kE=3,s0=0,SE=1,yE=2,wE=3,xE=4,$4=5,gX=0,a0=null,b8=null,uq=0,_O=0,FO=-0,LO=null,bE=null,vE=null,fq=D4,gE=null,$s=50,D1=0,MO=null,OO=!1,E4=!1,Es=50,DU=0,$1=null,v8=!1,k4=null,hE=!1,uE=new Set,ks={},S4=null,g8=null,VO=!1,AO=!1,y4=!1,IO=!1,r0=0,NO={};(function(){for(var X=0;X<yM.length;X++){var Y=yM[X],z=Y.toLowerCase();Y=Y[0].toUpperCase()+Y.slice(1),kq(z,"on"+Y)}kq(L$,"onAnimationEnd"),kq(M$,"onAnimationIteration"),kq(O$,"onAnimationStart"),kq("dblclick","onDoubleClick"),kq("focusin","onFocus"),kq("focusout","onBlur"),kq(Gs,"onTransitionRun"),kq(zs,"onTransitionStart"),kq(Us,"onTransitionCancel"),kq(V$,"onTransitionEnd")})(),MY("onMouseEnter",["mouseout","mouseover"]),MY("onMouseLeave",["mouseout","mouseover"]),MY("onPointerEnter",["pointerout","pointerover"]),MY("onPointerLeave",["pointerout","pointerover"]),AJ("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),AJ("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),AJ("onBeforeInput",["compositionend","keypress","textInput","paste"]),AJ("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),AJ("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),AJ("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var E1="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(" "),jO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(E1)),w4="_reactListening"+Math.random().toString(36).slice(2),fE=!1,mE=!1,x4=!1,cE=!1,b4=!1,v4=!1,pE=!1,g4={},Ss=/\r\n?/g,ys=/\u0000|\uFFFD/g,$U="http://www.w3.org/1999/xlink",TO="http://www.w3.org/XML/1998/namespace",ws="javascript:throw new Error('React form unexpectedly submitted.')",xs="suppressHydrationWarning",EU="&",h4="/&",k1="$",S1="/$",o0="$?",kU="$~",h8="$!",bs="html",vs="body",gs="head",PO="F!",dE="F",lE="loading",hs="style",Dz=0,u8=1,u4=2,RO=null,CO=null,iE={dialog:!0,webview:!0},DO=null,y1=void 0,nE=typeof setTimeout==="function"?setTimeout:void 0,us=typeof clearTimeout==="function"?clearTimeout:void 0,SU=-1,sE=typeof Promise==="function"?Promise:void 0,fs=typeof queueMicrotask==="function"?queueMicrotask:typeof sE<"u"?function(X){return sE.resolve(null).then(X).catch(Ti)}:nE,$O=null,yU=0,w1=1,aE=2,rE=3,Jq=4,Yq=new Map,oE=new Set,$z=vQ.d;vQ.d={f:function(){var X=$z.f(),Y=t6();return X||Y},r:function(X){var Y=eZ(X);Y!==null&&Y.tag===5&&Y.type==="form"?FR(Y):$z.r(X)},D:function(X){$z.D(X),zD("dns-prefetch",X,null)},C:function(X,Y){$z.C(X,Y),zD("preconnect",X,Y)},L:function(X,Y,z){$z.L(X,Y,z);var W=f8;if(W&&X&&Y){var _='link[rel="preload"][as="'+lY(Y)+'"]';Y==="image"?z&&z.imageSrcSet?(_+='[imagesrcset="'+lY(z.imageSrcSet)+'"]',typeof z.imageSizes==="string"&&(_+='[imagesizes="'+lY(z.imageSizes)+'"]')):_+='[href="'+lY(X)+'"]':_+='[href="'+lY(X)+'"]';var L=_;switch(Y){case"style":L=Q8(X);break;case"script":L=X8(X)}Yq.has(L)||(X=BQ({rel:"preload",href:Y==="image"&&z&&z.imageSrcSet?void 0:X,as:Y},z),Yq.set(L,X),W.querySelector(_)!==null||Y==="style"&&W.querySelector(u5(L))||Y==="script"&&W.querySelector(f5(L))||(Y=W.createElement("link"),YJ(Y,"link",X),pZ(Y),W.head.appendChild(Y)))}},m:function(X,Y){$z.m(X,Y);var z=f8;if(z&&X){var W=Y&&typeof Y.as==="string"?Y.as:"script",_='link[rel="modulepreload"][as="'+lY(W)+'"][href="'+lY(X)+'"]',L=_;switch(W){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":L=X8(X)}if(!Yq.has(L)&&(X=BQ({rel:"modulepreload",href:X},Y),Yq.set(L,X),z.querySelector(_)===null)){switch(W){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(z.querySelector(f5(L)))return}W=z.createElement("link"),YJ(W,"link",X),pZ(W),z.head.appendChild(W)}}},X:function(X,Y){$z.X(X,Y);var z=f8;if(z&&X){var W=EQ(z).hoistableScripts,_=X8(X),L=W.get(_);L||(L=z.querySelector(f5(_)),L||(X=BQ({src:X,async:!0},Y),(Y=Yq.get(_))&&oL(X,Y),L=z.createElement("script"),pZ(L),YJ(L,"link",X),z.head.appendChild(L)),L={type:"script",instance:L,count:1,state:null},W.set(_,L))}},S:function(X,Y,z){$z.S(X,Y,z);var W=f8;if(W&&X){var _=EQ(W).hoistableStyles,L=Q8(X);Y=Y||"default";var I=_.get(L);if(!I){var j={loading:yU,preload:null};if(I=W.querySelector(u5(L)))j.loading=w1|Jq;else{X=BQ({rel:"stylesheet",href:X,"data-precedence":Y},z),(z=Yq.get(L))&&rL(X,z);var R=I=W.createElement("link");pZ(R),YJ(R,"link",X),R._p=new Promise(function(D,p){R.onload=D,R.onerror=p}),R.addEventListener("load",function(){j.loading|=w1}),R.addEventListener("error",function(){j.loading|=aE}),j.loading|=Jq,xW(I,Y,W)}I={type:"stylesheet",instance:I,count:1,state:j},_.set(L,I)}}},M:function(X,Y){$z.M(X,Y);var z=f8;if(z&&X){var W=EQ(z).hoistableScripts,_=X8(X),L=W.get(_);L||(L=z.querySelector(f5(_)),L||(X=BQ({src:X,async:!0,type:"module"},Y),(Y=Yq.get(_))&&oL(X,Y),L=z.createElement("script"),pZ(L),YJ(L,"link",X),z.head.appendChild(L)),L={type:"script",instance:L,count:1,state:null},W.set(_,L))}}};var f8=typeof document>"u"?null:document,f4=null,ms=60000,cs=800,ps=500,EO=0,kO=null,m4=null,wU=Jn,x1={$$typeof:PG,Provider:null,Consumer:null,_currentValue:wU,_currentValue2:wU,_threadCount:0},tE="%c%s%c",eE="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",Zk="",c4=" ",ds=Function.prototype.bind,Qk=!1,Xk=null,Jk=null,Yk=null,qk=null,Gk=null,zk=null,Uk=null,Kk=null,Hk=null,Wk=null;Xk=function(X,Y,z,W){Y=Z(X,Y),Y!==null&&(z=Q(Y.memoizedState,z,0,W),Y.memoizedState=z,Y.baseState=z,X.memoizedProps=BQ({},X.memoizedProps),z=IJ(X,2),z!==null&&HX(z,X,2))},Jk=function(X,Y,z){Y=Z(X,Y),Y!==null&&(z=G(Y.memoizedState,z,0),Y.memoizedState=z,Y.baseState=z,X.memoizedProps=BQ({},X.memoizedProps),z=IJ(X,2),z!==null&&HX(z,X,2))},Yk=function(X,Y,z,W){Y=Z(X,Y),Y!==null&&(z=J(Y.memoizedState,z,W),Y.memoizedState=z,Y.baseState=z,X.memoizedProps=BQ({},X.memoizedProps),z=IJ(X,2),z!==null&&HX(z,X,2))},qk=function(X,Y,z){X.pendingProps=Q(X.memoizedProps,Y,0,z),X.alternate&&(X.alternate.pendingProps=X.pendingProps),Y=IJ(X,2),Y!==null&&HX(Y,X,2)},Gk=function(X,Y){X.pendingProps=G(X.memoizedProps,Y,0),X.alternate&&(X.alternate.pendingProps=X.pendingProps),Y=IJ(X,2),Y!==null&&HX(Y,X,2)},zk=function(X,Y,z){X.pendingProps=J(X.memoizedProps,Y,z),X.alternate&&(X.alternate.pendingProps=X.pendingProps),Y=IJ(X,2),Y!==null&&HX(Y,X,2)},Uk=function(X){var Y=IJ(X,2);Y!==null&&HX(Y,X,2)},Kk=function(X){var Y=h6(),z=IJ(X,Y);z!==null&&HX(z,X,Y)},Hk=function(X){K=X},Wk=function(X){U=X};var p4=!0,d4=null,SO=!1,t0=null,e0=null,Z9=null,b1=new Map,v1=new Map,Q9=[],ls="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(" "),l4=null;if(uW.prototype.render=JM.prototype.render=function(X){var Y=this._internalRoot;if(Y===null)throw Error("Cannot update an unmounted root.");var z=arguments;typeof z[1]==="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):P(z[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof z[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),z=X;var W=Y.current,_=TY(W);tL(W,_,z,Y,null,null)},uW.prototype.unmount=JM.prototype.unmount=function(){var X=arguments;if(typeof X[0]==="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),X=this._internalRoot,X!==null){this._internalRoot=null;var Y=X.containerInfo;(CQ&(dX|SY))!==oX&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),tL(X.current,2,null,X,null,null),t6(),Y[S0]=null}},uW.prototype.unstable_scheduleHydration=function(X){if(X){var Y=r();X={blockedOn:null,target:X,priority:Y};for(var z=0;z<Q9.length&&Y!==0&&Y<Q9[z].priority;z++);Q9.splice(z,0,X),z===0&&ND(X)}},function(){var X=l8.version;if(X!=="19.2.7")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
229
|
+
- react: `+(X+`
|
|
230
|
+
- react-dom: 19.2.7
|
|
231
|
+
Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),vQ.findDOMNode=function(X){var Y=X._reactInternals;if(Y===void 0){if(typeof X.render==="function")throw Error("Unable to find node on an unmounted component.");throw X=Object.keys(X).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+X)}return X=n(Y),X=X!==null?e(X):null,X=X===null?null:X.stateNode,X},!function(){var X={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:XZ,reconcilerVersion:"19.2.7"};return X.overrideHookState=Xk,X.overrideHookStateDeletePath=Jk,X.overrideHookStateRenamePath=Yk,X.overrideProps=qk,X.overridePropsDeletePath=Gk,X.overridePropsRenamePath=zk,X.scheduleUpdate=Uk,X.scheduleRetry=Kk,X.setErrorHandler=Hk,X.setSuspenseHandler=Wk,X.scheduleRefresh=N,X.scheduleRoot=A,X.setRefreshHandler=T,X.getCurrentFiber=ai,g6(X)}()&&EG&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var Bk=window.location.protocol;/^(https?|file):$/.test(Bk)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(Bk==="file:"?`
|
|
232
|
+
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Da.createRoot=function(X,Y){if(!P(X))throw Error("Target container is not a DOM element.");RD(X);var z=!1,W="",_=jR,L=TR,I=PR;return Y!==null&&Y!==void 0&&(Y.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof Y==="object"&&Y!==null&&Y.$$typeof===TG&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
233
|
+
|
|
234
|
+
let root = createRoot(domContainer);
|
|
235
|
+
root.render(<App />);`),Y.unstable_strictMode===!0&&(z=!0),Y.identifierPrefix!==void 0&&(W=Y.identifierPrefix),Y.onUncaughtError!==void 0&&(_=Y.onUncaughtError),Y.onCaughtError!==void 0&&(L=Y.onCaughtError),Y.onRecoverableError!==void 0&&(I=Y.onRecoverableError)),Y=FD(X,1,!1,null,null,z,W,null,_,L,I,PD),X[S0]=Y.current,hL(X),new JM(Y)},Da.hydrateRoot=function(X,Y,z){if(!P(X))throw Error("Target container is not a DOM element.");RD(X),Y===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var W=!1,_="",L=jR,I=TR,j=PR,R=null;return z!==null&&z!==void 0&&(z.unstable_strictMode===!0&&(W=!0),z.identifierPrefix!==void 0&&(_=z.identifierPrefix),z.onUncaughtError!==void 0&&(L=z.onUncaughtError),z.onCaughtError!==void 0&&(I=z.onCaughtError),z.onRecoverableError!==void 0&&(j=z.onRecoverableError),z.formState!==void 0&&(R=z.formState)),Y=FD(X,1,!0,Y,z!=null?z:null,W,_,R,L,I,j,PD),Y.context=LD(null),z=Y.current,W=TY(z),W=a9(W),_=I0(W),_.callback=null,N0(z,_,W),HG(W,"hydrateRoot()",null),z=W,Y.current.lanes=z,_0(Y,z),NG(Y),X[S0]=Y.current,hL(X),new uW(Y)},Da.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var kk=bG((A6Z,Ek)=>{var $a=S($k());Ek.exports=$a});function Sk(Z,Q){if(typeof Z==="function")return Z(Q);else if(Z!==null&&Z!==void 0)Z.current=Q}function yk(...Z){return(Q)=>{let J=!1,q=Z.map((G)=>{let U=Sk(G,Q);if(!J&&typeof U=="function")J=!0;return U});if(J)return()=>{for(let G=0;G<q.length;G++){let U=q[G];if(typeof U=="function")U();else Sk(Z[G],null)}}}}var Ea;var wk=k(()=>{Ea=S(JZ(),1)});function Sa(Z){return typeof Z==="object"&&Z!==null&&"then"in Z}function xk(Z){return Z!=null&&typeof Z==="object"&&"$$typeof"in Z&&Z.$$typeof===ka&&"_payload"in Z&&Sa(Z._payload)}function ya(Z){let Q=wa(Z),J=hX.forwardRef((q,G)=>{let{children:U,...K}=q;if(xk(U)&&typeof J3==="function")U=J3(U._payload);let H=hX.Children.toArray(U),B=H.find(ba);if(B){let F=B.props.children,M=H.map((O)=>{if(O===B){if(hX.Children.count(F)>1)return hX.Children.only(null);return hX.isValidElement(F)?F.props.children:null}else return O});return X3.jsx(Q,{...K,ref:G,children:hX.isValidElement(F)?hX.cloneElement(F,void 0,M):null})}return X3.jsx(Q,{...K,ref:G,children:U})});return J.displayName=`${Z}.Slot`,J}function wa(Z){let Q=hX.forwardRef((J,q)=>{let{children:G,...U}=J;if(xk(G)&&typeof J3==="function")G=J3(G._payload);if(hX.isValidElement(G)){let K=ga(G),H=va(U,G.props);if(G.type!==hX.Fragment)H.ref=q?yk(q,K):K;return hX.cloneElement(G,H)}return hX.Children.count(G)>1?hX.Children.only(null):null});return Q.displayName=`${Z}.SlotClone`,Q}function ba(Z){return hX.isValidElement(Z)&&typeof Z.type==="function"&&"__radixId"in Z.type&&Z.type.__radixId===xa}function va(Z,Q){let J={...Q};for(let q in Q){let G=Z[q],U=Q[q];if(/^on[A-Z]/.test(q)){if(G&&U)J[q]=(...H)=>{let B=U(...H);return G(...H),B};else if(G)J[q]=G}else if(q==="style")J[q]={...G,...U};else if(q==="className")J[q]=[G,U].filter(Boolean).join(" ")}return{...Z,...J}}function ga(Z){let Q=Object.getOwnPropertyDescriptor(Z.props,"ref")?.get,J=Q&&"isReactWarning"in Q&&Q.isReactWarning;if(J)return Z.ref;if(Q=Object.getOwnPropertyDescriptor(Z,"ref")?.get,J=Q&&"isReactWarning"in Q&&Q.isReactWarning,J)return Z.props.ref;return Z.props.ref||Z.ref}var hX,X3,ka,J3,bk,xa;var vk=k(()=>{wk();hX=S(JZ(),1),X3=S(JY(),1),ka=Symbol.for("react.lazy"),J3=hX[" use ".trim().toString()];bk=ya("Slot");xa=Symbol("radix.slottable")});function gk(Z){var Q,J,q="";if(typeof Z=="string"||typeof Z=="number")q+=Z;else if(typeof Z=="object")if(Array.isArray(Z)){var G=Z.length;for(Q=0;Q<G;Q++)Z[Q]&&(J=gk(Z[Q]))&&(q&&(q+=" "),q+=J)}else for(J in Z)Z[J]&&(q&&(q+=" "),q+=J);return q}function bY(){for(var Z,Q,J=0,q="",G=arguments.length;J<G;J++)(Z=arguments[J])&&(Q=gk(Z))&&(q&&(q+=" "),q+=Q);return q}var hk;var kz=k(()=>{hk=bY});var uk=(Z)=>typeof Z==="boolean"?`${Z}`:Z===0?"0":Z,fk,mk=(Z,Q)=>(J)=>{var q;if((Q===null||Q===void 0?void 0:Q.variants)==null)return fk(Z,J===null||J===void 0?void 0:J.class,J===null||J===void 0?void 0:J.className);let{variants:G,defaultVariants:U}=Q,K=Object.keys(G).map((F)=>{let M=J===null||J===void 0?void 0:J[F],O=U===null||U===void 0?void 0:U[F];if(M===null)return null;let V=uk(M)||uk(O);return G[F][V]}),H=J&&Object.entries(J).reduce((F,M)=>{let[O,V]=M;if(V===void 0)return F;return F[O]=V,F},{}),B=Q===null||Q===void 0?void 0:(q=Q.compoundVariants)===null||q===void 0?void 0:q.reduce((F,M)=>{let{class:O,className:V,...A}=M;return Object.entries(A).every((N)=>{let[T,P]=N;return Array.isArray(P)?P.includes({...U,...H}[T]):{...U,...H}[T]===P})?[...F,O,V]:F},[]);return fk(Z,K,B,J===null||J===void 0?void 0:J.class,J===null||J===void 0?void 0:J.className)};var ck=k(()=>{kz();fk=bY});var ha=(Z,Q)=>{let J=Array(Z.length+Q.length);for(let q=0;q<Z.length;q++)J[q]=Z[q];for(let q=0;q<Q.length;q++)J[Z.length+q]=Q[q];return J},ua=(Z,Q)=>({classGroupId:Z,validator:Q}),rk=(Z=new Map,Q=null,J)=>({nextPart:Z,validators:Q,classGroupId:J}),pk,fa=(Z)=>{let Q=ca(Z),{conflictingClassGroups:J,conflictingClassGroupModifiers:q}=Z;return{getClassGroupId:(K)=>{if(K.startsWith("[")&&K.endsWith("]"))return ma(K);let H=K.split("-"),B=H[0]===""&&H.length>1?1:0;return ok(H,B,Q)},getConflictingClassGroupIds:(K,H)=>{if(H){let B=q[K],F=J[K];if(B){if(F)return ha(F,B);return B}return F||pk}return J[K]||pk}}},ok=(Z,Q,J)=>{if(Z.length-Q===0)return J.classGroupId;let G=Z[Q],U=J.nextPart.get(G);if(U){let F=ok(Z,Q+1,U);if(F)return F}let K=J.validators;if(K===null)return;let H=Q===0?Z.join("-"):Z.slice(Q).join("-"),B=K.length;for(let F=0;F<B;F++){let M=K[F];if(M.validator(H))return M.classGroupId}return},ma=(Z)=>Z.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let Q=Z.slice(1,-1),J=Q.indexOf(":"),q=Q.slice(0,J);return q?"arbitrary.."+q:void 0})(),ca=(Z)=>{let{theme:Q,classGroups:J}=Z;return pa(J,Q)},pa=(Z,Q)=>{let J=rk();for(let q in Z){let G=Z[q];rO(G,J,q,Q)}return J},rO=(Z,Q,J,q)=>{let G=Z.length;for(let U=0;U<G;U++){let K=Z[U];da(K,Q,J,q)}},da=(Z,Q,J,q)=>{if(typeof Z==="string"){la(Z,Q,J);return}if(typeof Z==="function"){ia(Z,Q,J,q);return}na(Z,Q,J,q)},la=(Z,Q,J)=>{let q=Z===""?Q:tk(Q,Z);q.classGroupId=J},ia=(Z,Q,J,q)=>{if(sa(Z)){rO(Z(q),Q,J,q);return}if(Q.validators===null)Q.validators=[];Q.validators.push(ua(J,Z))},na=(Z,Q,J,q)=>{let G=Object.entries(Z),U=G.length;for(let K=0;K<U;K++){let[H,B]=G[K];rO(B,tk(Q,H),J,q)}},tk=(Z,Q)=>{let J=Z,q=Q.split("-"),G=q.length;for(let U=0;U<G;U++){let K=q[U],H=J.nextPart.get(K);if(!H)H=rk(),J.nextPart.set(K,H);J=H}return J},sa=(Z)=>("isThemeGetter"in Z)&&Z.isThemeGetter===!0,aa=(Z)=>{if(Z<1)return{get:()=>{return},set:()=>{}};let Q=0,J=Object.create(null),q=Object.create(null),G=(U,K)=>{if(J[U]=K,Q++,Q>Z)Q=0,q=J,J=Object.create(null)};return{get(U){let K=J[U];if(K!==void 0)return K;if((K=q[U])!==void 0)return G(U,K),K},set(U,K){if(U in J)J[U]=K;else G(U,K)}}},ra,dk=(Z,Q,J,q,G)=>({modifiers:Z,hasImportantModifier:Q,baseClassName:J,maybePostfixModifierPosition:q,isExternal:G}),oa=(Z)=>{let{prefix:Q,experimentalParseClassName:J}=Z,q=(G)=>{let U=[],K=0,H=0,B=0,F,M=G.length;for(let T=0;T<M;T++){let P=G[T];if(K===0&&H===0){if(P===":"){U.push(G.slice(B,T)),B=T+1;continue}if(P==="/"){F=T;continue}}if(P==="[")K++;else if(P==="]")K--;else if(P==="(")H++;else if(P===")")H--}let O=U.length===0?G:G.slice(B),V=O,A=!1;if(O.endsWith("!"))V=O.slice(0,-1),A=!0;else if(O.startsWith("!"))V=O.slice(1),A=!0;let N=F&&F>B?F-B:void 0;return dk(U,A,V,N)};if(Q){let G=Q+":",U=q;q=(K)=>K.startsWith(G)?U(K.slice(G.length)):dk(ra,!1,K,void 0,!0)}if(J){let G=q;q=(U)=>J({className:U,parseClassName:G})}return q},ta=(Z)=>{let Q=new Map;return Z.orderSensitiveModifiers.forEach((J,q)=>{Q.set(J,1e6+q)}),(J)=>{let q=[],G=[];for(let U=0;U<J.length;U++){let K=J[U],H=K[0]==="[",B=Q.has(K);if(H||B){if(G.length>0)G.sort(),q.push(...G),G=[];q.push(K)}else G.push(K)}if(G.length>0)G.sort(),q.push(...G);return q}},ea=(Z)=>({cache:aa(Z.cacheSize),parseClassName:oa(Z),sortModifiers:ta(Z),postfixLookupClassGroupIds:Zr(Z),...fa(Z)}),Zr=(Z)=>{let Q=Object.create(null),J=Z.postfixLookupClassGroups;if(J)for(let q=0;q<J.length;q++)Q[J[q]]=!0;return Q},Qr,Xr=(Z,Q)=>{let{parseClassName:J,getClassGroupId:q,getConflictingClassGroupIds:G,sortModifiers:U,postfixLookupClassGroupIds:K}=Q,H=[],B=Z.trim().split(Qr),F="";for(let M=B.length-1;M>=0;M-=1){let O=B[M],{isExternal:V,modifiers:A,hasImportantModifier:N,baseClassName:T,maybePostfixModifierPosition:P}=J(O);if(V){F=O+(F.length>0?" "+F:F);continue}let C=!!P,y;if(C){let a=T.substring(0,P);y=q(a);let c=y&&K[y]?q(T):void 0;if(c&&c!==y)y=c,C=!1}else y=q(T);if(!y){if(!C){F=O+(F.length>0?" "+F:F);continue}if(y=q(T),!y){F=O+(F.length>0?" "+F:F);continue}C=!1}let f=A.length===0?"":A.length===1?A[0]:U(A).join(":"),u=N?f+"!":f,n=u+y;if(H.indexOf(n)>-1)continue;H.push(n);let e=G(y,C);for(let a=0;a<e.length;++a){let c=e[a];H.push(u+c)}F=O+(F.length>0?" "+F:F)}return F},Jr=(...Z)=>{let Q=0,J,q,G="";while(Q<Z.length)if(J=Z[Q++]){if(q=ek(J))G&&(G+=" "),G+=q}return G},ek=(Z)=>{if(typeof Z==="string")return Z;let Q,J="";for(let q=0;q<Z.length;q++)if(Z[q]){if(Q=ek(Z[q]))J&&(J+=" "),J+=Q}return J},lk=(Z,...Q)=>{let J,q,G,U,K=(B)=>{let F=Q.reduce((M,O)=>O(M),Z());return J=ea(F),q=J.cache.get,G=J.cache.set,U=H,H(B)},H=(B)=>{let F=q(B);if(F)return F;let M=Xr(B,J);return G(B,M),M};return U=K,(...B)=>U(Jr(...B))},Yr,lX=(Z)=>{let Q=(J)=>J[Z]||Yr;return Q.isThemeGetter=!0,Q},ZS,QS,qr,Gr,zr,Ur,Kr,Hr,Y9=(Z)=>qr.test(Z),MQ=(Z)=>!!Z&&!Number.isNaN(Number(Z)),gG=(Z)=>!!Z&&Number.isInteger(Number(Z)),sO=(Z)=>Z.endsWith("%")&&MQ(Z.slice(0,-1)),Sz=(Z)=>Gr.test(Z),XS=()=>!0,Wr=(Z)=>zr.test(Z)&&!Ur.test(Z),oO=()=>!1,Br=(Z)=>Kr.test(Z),_r=(Z)=>Hr.test(Z),Fr=(Z)=>!EZ(Z)&&!kZ(Z),Lr=(Z)=>Z.startsWith("@container")&&(Z[10]==="/"&&Z[11]!==void 0||Z[11]==="s"&&Z[16]!==void 0&&Z.startsWith("-size/",10)||Z[11]==="n"&&Z[18]!==void 0&&Z.startsWith("-normal/",10)),Mr=(Z)=>q9(Z,qS,oO),EZ=(Z)=>ZS.test(Z),gU=(Z)=>q9(Z,GS,Wr),ik=(Z)=>q9(Z,Pr,MQ),Or=(Z)=>q9(Z,US,XS),Vr=(Z)=>q9(Z,zS,oO),nk=(Z)=>q9(Z,JS,oO),Ar=(Z)=>q9(Z,YS,_r),Y3=(Z)=>q9(Z,KS,Br),kZ=(Z)=>QS.test(Z),p1=(Z)=>hU(Z,GS),Ir=(Z)=>hU(Z,zS),sk=(Z)=>hU(Z,JS),Nr=(Z)=>hU(Z,qS),jr=(Z)=>hU(Z,YS),q3=(Z)=>hU(Z,KS,!0),Tr=(Z)=>hU(Z,US,!0),q9=(Z,Q,J)=>{let q=ZS.exec(Z);if(q){if(q[1])return Q(q[1]);return J(q[2])}return!1},hU=(Z,Q,J=!1)=>{let q=QS.exec(Z);if(q){if(q[1])return Q(q[1]);return J}return!1},JS=(Z)=>Z==="position"||Z==="percentage",YS=(Z)=>Z==="image"||Z==="url",qS=(Z)=>Z==="length"||Z==="size"||Z==="bg-size",GS=(Z)=>Z==="length",Pr=(Z)=>Z==="number",zS=(Z)=>Z==="family-name",US=(Z)=>Z==="number"||Z==="weight",KS=(Z)=>Z==="shadow",ak=()=>{let Z=lX("color"),Q=lX("font"),J=lX("text"),q=lX("font-weight"),G=lX("tracking"),U=lX("leading"),K=lX("breakpoint"),H=lX("container"),B=lX("spacing"),F=lX("radius"),M=lX("shadow"),O=lX("inset-shadow"),V=lX("text-shadow"),A=lX("drop-shadow"),N=lX("blur"),T=lX("perspective"),P=lX("aspect"),C=lX("ease"),y=lX("animate"),f=()=>["auto","avoid","all","avoid-page","page","left","right","column"],u=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],n=()=>[...u(),kZ,EZ],e=()=>["auto","hidden","clip","visible","scroll"],a=()=>["auto","contain","none"],c=()=>[kZ,EZ,B],GZ=()=>[Y9,"full","auto",...c()],s=()=>[gG,"none","subgrid",kZ,EZ],LZ=()=>["auto",{span:["full",gG,kZ,EZ]},gG,kZ,EZ],HZ=()=>[gG,"auto",kZ,EZ],KZ=()=>["auto","min","max","fr",kZ,EZ],v=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],i=()=>["start","end","center","stretch","center-safe","end-safe"],x=()=>["auto",...c()],d=()=>[Y9,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...c()],YZ=()=>[Y9,"screen","full","dvw","lvw","svw","min","max","fit",...c()],t=()=>[Y9,"screen","full","lh","dvh","lvh","svh","min","max","fit",...c()],$=()=>[Z,kZ,EZ],o=()=>[...u(),sk,nk,{position:[kZ,EZ]}],IZ=()=>["no-repeat",{repeat:["","x","y","space","round"]}],PZ=()=>["auto","cover","contain",Nr,Mr,{size:[kZ,EZ]}],yZ=()=>[sO,p1,gU],sZ=()=>["","none","full",F,kZ,EZ],CZ=()=>["",MQ,p1,gU],KQ=()=>["solid","dashed","dotted","double"],MZ=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],bZ=()=>[MQ,sO,sk,nk],RQ=()=>["","none",N,kZ,EZ],BZ=()=>["none",MQ,kZ,EZ],GX=()=>["none",MQ,kZ,EZ],kX=()=>[MQ,kZ,EZ],RX=()=>[Y9,"full",...c()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Sz],breakpoint:[Sz],color:[XS],container:[Sz],"drop-shadow":[Sz],ease:["in","out","in-out"],font:[Fr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Sz],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Sz],shadow:[Sz],spacing:["px",MQ],text:[Sz],"text-shadow":[Sz],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Y9,EZ,kZ,P]}],container:["container"],"container-type":[{"@container":["","normal","size",kZ,EZ]}],"container-named":[Lr],columns:[{columns:[MQ,EZ,kZ,H]}],"break-after":[{"break-after":f()}],"break-before":[{"break-before":f()}],"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:n()}],overflow:[{overflow:e()}],"overflow-x":[{"overflow-x":e()}],"overflow-y":[{"overflow-y":e()}],overscroll:[{overscroll:a()}],"overscroll-x":[{"overscroll-x":a()}],"overscroll-y":[{"overscroll-y":a()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:GZ()}],"inset-x":[{"inset-x":GZ()}],"inset-y":[{"inset-y":GZ()}],start:[{"inset-s":GZ(),start:GZ()}],end:[{"inset-e":GZ(),end:GZ()}],"inset-bs":[{"inset-bs":GZ()}],"inset-be":[{"inset-be":GZ()}],top:[{top:GZ()}],right:[{right:GZ()}],bottom:[{bottom:GZ()}],left:[{left:GZ()}],visibility:["visible","invisible","collapse"],z:[{z:[gG,"auto",kZ,EZ]}],basis:[{basis:[Y9,"full","auto",H,...c()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[MQ,Y9,"auto","initial","none",EZ]}],grow:[{grow:["",MQ,kZ,EZ]}],shrink:[{shrink:["",MQ,kZ,EZ]}],order:[{order:[gG,"first","last","none",kZ,EZ]}],"grid-cols":[{"grid-cols":s()}],"col-start-end":[{col:LZ()}],"col-start":[{"col-start":HZ()}],"col-end":[{"col-end":HZ()}],"grid-rows":[{"grid-rows":s()}],"row-start-end":[{row:LZ()}],"row-start":[{"row-start":HZ()}],"row-end":[{"row-end":HZ()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":KZ()}],"auto-rows":[{"auto-rows":KZ()}],gap:[{gap:c()}],"gap-x":[{"gap-x":c()}],"gap-y":[{"gap-y":c()}],"justify-content":[{justify:[...v(),"normal"]}],"justify-items":[{"justify-items":[...i(),"normal"]}],"justify-self":[{"justify-self":["auto",...i()]}],"align-content":[{content:["normal",...v()]}],"align-items":[{items:[...i(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...i(),{baseline:["","last"]}]}],"place-content":[{"place-content":v()}],"place-items":[{"place-items":[...i(),"baseline"]}],"place-self":[{"place-self":["auto",...i()]}],p:[{p:c()}],px:[{px:c()}],py:[{py:c()}],ps:[{ps:c()}],pe:[{pe:c()}],pbs:[{pbs:c()}],pbe:[{pbe:c()}],pt:[{pt:c()}],pr:[{pr:c()}],pb:[{pb:c()}],pl:[{pl:c()}],m:[{m:x()}],mx:[{mx:x()}],my:[{my:x()}],ms:[{ms:x()}],me:[{me:x()}],mbs:[{mbs:x()}],mbe:[{mbe:x()}],mt:[{mt:x()}],mr:[{mr:x()}],mb:[{mb:x()}],ml:[{ml:x()}],"space-x":[{"space-x":c()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":c()}],"space-y-reverse":["space-y-reverse"],size:[{size:d()}],"inline-size":[{inline:["auto",...YZ()]}],"min-inline-size":[{"min-inline":["auto",...YZ()]}],"max-inline-size":[{"max-inline":["none",...YZ()]}],"block-size":[{block:["auto",...t()]}],"min-block-size":[{"min-block":["auto",...t()]}],"max-block-size":[{"max-block":["none",...t()]}],w:[{w:[H,"screen",...d()]}],"min-w":[{"min-w":[H,"screen","none",...d()]}],"max-w":[{"max-w":[H,"screen","none","prose",{screen:[K]},...d()]}],h:[{h:["screen","lh",...d()]}],"min-h":[{"min-h":["screen","lh","none",...d()]}],"max-h":[{"max-h":["screen","lh",...d()]}],"font-size":[{text:["base",J,p1,gU]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[q,Tr,Or]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sO,EZ]}],"font-family":[{font:[Ir,Vr,Q]}],"font-features":[{"font-features":[EZ]}],"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:[G,kZ,EZ]}],"line-clamp":[{"line-clamp":[MQ,"none",kZ,ik]}],leading:[{leading:[U,...c()]}],"list-image":[{"list-image":["none",kZ,EZ]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",kZ,EZ]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...KQ(),"wavy"]}],"text-decoration-thickness":[{decoration:[MQ,"from-font","auto",kZ,gU]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[MQ,"auto",kZ,EZ]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:c()}],"tab-size":[{tab:[gG,kZ,EZ]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",kZ,EZ]}],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",kZ,EZ]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:o()}],"bg-repeat":[{bg:IZ()}],"bg-size":[{bg:PZ()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gG,kZ,EZ],radial:["",kZ,EZ],conic:[gG,kZ,EZ]},jr,Ar]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:yZ()}],"gradient-via-pos":[{via:yZ()}],"gradient-to-pos":[{to:yZ()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:sZ()}],"rounded-s":[{"rounded-s":sZ()}],"rounded-e":[{"rounded-e":sZ()}],"rounded-t":[{"rounded-t":sZ()}],"rounded-r":[{"rounded-r":sZ()}],"rounded-b":[{"rounded-b":sZ()}],"rounded-l":[{"rounded-l":sZ()}],"rounded-ss":[{"rounded-ss":sZ()}],"rounded-se":[{"rounded-se":sZ()}],"rounded-ee":[{"rounded-ee":sZ()}],"rounded-es":[{"rounded-es":sZ()}],"rounded-tl":[{"rounded-tl":sZ()}],"rounded-tr":[{"rounded-tr":sZ()}],"rounded-br":[{"rounded-br":sZ()}],"rounded-bl":[{"rounded-bl":sZ()}],"border-w":[{border:CZ()}],"border-w-x":[{"border-x":CZ()}],"border-w-y":[{"border-y":CZ()}],"border-w-s":[{"border-s":CZ()}],"border-w-e":[{"border-e":CZ()}],"border-w-bs":[{"border-bs":CZ()}],"border-w-be":[{"border-be":CZ()}],"border-w-t":[{"border-t":CZ()}],"border-w-r":[{"border-r":CZ()}],"border-w-b":[{"border-b":CZ()}],"border-w-l":[{"border-l":CZ()}],"divide-x":[{"divide-x":CZ()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":CZ()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...KQ(),"hidden","none"]}],"divide-style":[{divide:[...KQ(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...KQ(),"none","hidden"]}],"outline-offset":[{"outline-offset":[MQ,kZ,EZ]}],"outline-w":[{outline:["",MQ,p1,gU]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",M,q3,Y3]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",O,q3,Y3]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:CZ()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[MQ,gU]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":CZ()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",V,q3,Y3]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[MQ,kZ,EZ]}],"mix-blend":[{"mix-blend":[...MZ(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":MZ()}],"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":[MQ]}],"mask-image-linear-from-pos":[{"mask-linear-from":bZ()}],"mask-image-linear-to-pos":[{"mask-linear-to":bZ()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":bZ()}],"mask-image-t-to-pos":[{"mask-t-to":bZ()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":bZ()}],"mask-image-r-to-pos":[{"mask-r-to":bZ()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":bZ()}],"mask-image-b-to-pos":[{"mask-b-to":bZ()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":bZ()}],"mask-image-l-to-pos":[{"mask-l-to":bZ()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":bZ()}],"mask-image-x-to-pos":[{"mask-x-to":bZ()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":bZ()}],"mask-image-y-to-pos":[{"mask-y-to":bZ()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[kZ,EZ]}],"mask-image-radial-from-pos":[{"mask-radial-from":bZ()}],"mask-image-radial-to-pos":[{"mask-radial-to":bZ()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":u()}],"mask-image-conic-pos":[{"mask-conic":[MQ]}],"mask-image-conic-from-pos":[{"mask-conic-from":bZ()}],"mask-image-conic-to-pos":[{"mask-conic-to":bZ()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:o()}],"mask-repeat":[{mask:IZ()}],"mask-size":[{mask:PZ()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",kZ,EZ]}],filter:[{filter:["","none",kZ,EZ]}],blur:[{blur:RQ()}],brightness:[{brightness:[MQ,kZ,EZ]}],contrast:[{contrast:[MQ,kZ,EZ]}],"drop-shadow":[{"drop-shadow":["","none",A,q3,Y3]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",MQ,kZ,EZ]}],"hue-rotate":[{"hue-rotate":[MQ,kZ,EZ]}],invert:[{invert:["",MQ,kZ,EZ]}],saturate:[{saturate:[MQ,kZ,EZ]}],sepia:[{sepia:["",MQ,kZ,EZ]}],"backdrop-filter":[{"backdrop-filter":["","none",kZ,EZ]}],"backdrop-blur":[{"backdrop-blur":RQ()}],"backdrop-brightness":[{"backdrop-brightness":[MQ,kZ,EZ]}],"backdrop-contrast":[{"backdrop-contrast":[MQ,kZ,EZ]}],"backdrop-grayscale":[{"backdrop-grayscale":["",MQ,kZ,EZ]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[MQ,kZ,EZ]}],"backdrop-invert":[{"backdrop-invert":["",MQ,kZ,EZ]}],"backdrop-opacity":[{"backdrop-opacity":[MQ,kZ,EZ]}],"backdrop-saturate":[{"backdrop-saturate":[MQ,kZ,EZ]}],"backdrop-sepia":[{"backdrop-sepia":["",MQ,kZ,EZ]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":c()}],"border-spacing-x":[{"border-spacing-x":c()}],"border-spacing-y":[{"border-spacing-y":c()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",kZ,EZ]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[MQ,"initial",kZ,EZ]}],ease:[{ease:["linear","initial",C,kZ,EZ]}],delay:[{delay:[MQ,kZ,EZ]}],animate:[{animate:["none",y,kZ,EZ]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,kZ,EZ]}],"perspective-origin":[{"perspective-origin":n()}],rotate:[{rotate:BZ()}],"rotate-x":[{"rotate-x":BZ()}],"rotate-y":[{"rotate-y":BZ()}],"rotate-z":[{"rotate-z":BZ()}],scale:[{scale:GX()}],"scale-x":[{"scale-x":GX()}],"scale-y":[{"scale-y":GX()}],"scale-z":[{"scale-z":GX()}],"scale-3d":["scale-3d"],skew:[{skew:kX()}],"skew-x":[{"skew-x":kX()}],"skew-y":[{"skew-y":kX()}],transform:[{transform:[kZ,EZ,"","none","gpu","cpu"]}],"transform-origin":[{origin:n()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:RX()}],"translate-x":[{"translate-x":RX()}],"translate-y":[{"translate-y":RX()}],"translate-z":[{"translate-z":RX()}],"translate-none":["translate-none"],zoom:[{zoom:[gG,kZ,EZ]}],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",kZ,EZ]}],"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":$()}],"scrollbar-track-color":[{"scrollbar-track":$()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":c()}],"scroll-mx":[{"scroll-mx":c()}],"scroll-my":[{"scroll-my":c()}],"scroll-ms":[{"scroll-ms":c()}],"scroll-me":[{"scroll-me":c()}],"scroll-mbs":[{"scroll-mbs":c()}],"scroll-mbe":[{"scroll-mbe":c()}],"scroll-mt":[{"scroll-mt":c()}],"scroll-mr":[{"scroll-mr":c()}],"scroll-mb":[{"scroll-mb":c()}],"scroll-ml":[{"scroll-ml":c()}],"scroll-p":[{"scroll-p":c()}],"scroll-px":[{"scroll-px":c()}],"scroll-py":[{"scroll-py":c()}],"scroll-ps":[{"scroll-ps":c()}],"scroll-pe":[{"scroll-pe":c()}],"scroll-pbs":[{"scroll-pbs":c()}],"scroll-pbe":[{"scroll-pbe":c()}],"scroll-pt":[{"scroll-pt":c()}],"scroll-pr":[{"scroll-pr":c()}],"scroll-pb":[{"scroll-pb":c()}],"scroll-pl":[{"scroll-pl":c()}],"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",kZ,EZ]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[MQ,p1,gU,ik]}],stroke:[{stroke:["none",...$()]}],"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"]}},Rr=(Z,{cacheSize:Q,prefix:J,experimentalParseClassName:q,extend:G={},override:U={}})=>{return i8(Z,"cacheSize",Q),i8(Z,"prefix",J),i8(Z,"experimentalParseClassName",q),G3(Z.theme,U.theme),G3(Z.classGroups,U.classGroups),G3(Z.conflictingClassGroups,U.conflictingClassGroups),G3(Z.conflictingClassGroupModifiers,U.conflictingClassGroupModifiers),i8(Z,"postfixLookupClassGroups",U.postfixLookupClassGroups),i8(Z,"orderSensitiveModifiers",U.orderSensitiveModifiers),z3(Z.theme,G.theme),z3(Z.classGroups,G.classGroups),z3(Z.conflictingClassGroups,G.conflictingClassGroups),z3(Z.conflictingClassGroupModifiers,G.conflictingClassGroupModifiers),aO(Z,G,"postfixLookupClassGroups"),aO(Z,G,"orderSensitiveModifiers"),Z},i8=(Z,Q,J)=>{if(J!==void 0)Z[Q]=J},G3=(Z,Q)=>{if(Q)for(let J in Q)i8(Z,J,Q[J])},z3=(Z,Q)=>{if(Q)for(let J in Q)aO(Z,Q,J)},aO=(Z,Q,J)=>{let q=Q[J];if(q!==void 0)Z[J]=Z[J]?Z[J].concat(q):q},HS=(Z,...Q)=>typeof Z==="function"?lk(ak,Z,...Q):lk(()=>Rr(ak(),Z),...Q);var WS=k(()=>{pk=[],ra=[],Qr=/\s+/,Yr=[],ZS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,QS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Gr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zr=/\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$/,Ur=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/});var yz,Cr,Dr=(Z)=>{if(typeof Z==="boolean")return Z?"":void 0;if(Z===void 0||Z===null)return;return String(Z)},$r=(Z)=>{let Q=JSON.stringify(Z),J=yz.useRef({signature:Q,value:Z});if(J.current.signature!==Q)J.current={signature:Q,value:Z};return J.current.value},fZ=(Z,Q)=>{let J=mk(Q?.baseClass,{variants:Q?.variants,defaultVariants:Q?.defaultVariants,compoundVariants:Q?.compoundVariants}),q=Q?.passVariantProps?new Set(Q.passVariantProps):void 0,G=yz.forwardRef((U,K)=>{let{children:H,...B}=U,F=B.className;delete B.className;let M={};for(let C in Q?.variants)if(M[C]=B[C],C in B&&!q?.has(C))delete B[C];let O=$r(M),V={};if(Q?.variantsAsDataAttrs&&Q.variants)for(let C of Q.variantsAsDataAttrs){let y=C.toString(),f=U[y]??Q.defaultVariants?.[C];V[`data-${y}`]=Dr(f)}let A=B.style,N=yz.useMemo(()=>Q?.style?{...Q.style,...A}:A,[A]),T=yz.useMemo(()=>Cr(bY(J(O),F)),[O,F]),P=Z;if(U.asChild&&typeof Z==="string")P=bk,delete B.asChild;return yz.createElement(P,{ref:K,className:T,...Q.defaultProps,...V,...B,style:N},H)});return G.displayName=Q?.displayName??"uic",G};var $X=k(()=>{vk();ck();kz();WS();yz=S(JZ(),1),Cr=HS({extend:{classGroups:{"font-size":[{text:["micro","caption","label","compact","small","callout","body","subtitle","title","headline","display","display-large","panel-heading","heading1","heading2","heading3","heading4","heading5"]}]},theme:{spacing:["nav-x","control-tall"],radius:["panel"],blur:["modal-backdrop"],shadow:["modal-surface"]}}})});function mq(...Z){return(...Q)=>{for(let J of Z)if(typeof J==="function")J(...Q)}}var n8=()=>{};var BS,QQ;var UJ=k(()=>{BS=S(JZ(),1),QQ=typeof document<"u"?BS.default.useLayoutEffect:()=>{}});function Sr(Z=!1){let Q=eX.useContext(_S),J=eX.useRef(null);if(J.current===null&&!Z){let q=eX.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(q){let G=tO.get(q);if(G==null)tO.set(q,{id:Q.current,state:q.memoizedState});else if(q.memoizedState!==G.state)Q.current=G.id,tO.delete(q)}J.current=++Q.current}return J.current}function yr(Z){let Q=eX.useContext(_S);if(Q===U3&&!kr)console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let J=Sr(!!Z),q=`react-aria${Q.prefix}`;return Z||`${q}-${J}`}function wr(Z){let Q=eX.default.useId(),[J]=eX.useState(fJ()),q=J?"react-aria":`react-aria${U3.prefix}`;return Z||`${q}-${Q}`}function xr(){return!1}function br(){return!0}function vr(Z){return()=>{}}function fJ(){if(typeof eX.default.useSyncExternalStore==="function")return eX.default.useSyncExternalStore(vr,xr,br);return eX.useContext(Er)}var eX,U3,_S,Er,kr,tO,FS;var G9=k(()=>{eX=S(JZ(),1),U3={prefix:String(Math.round(Math.random()*10000000000)),current:0},_S=eX.default.createContext(U3),Er=eX.default.createContext(!1),kr=Boolean(typeof window<"u"&&window.document&&window.document.createElement),tO=new WeakMap;FS=typeof eX.default.useId==="function"?wr:yr});function LS(Z){let[Q,J]=z9.useState(Z),q=z9.useRef(Q),G=z9.useRef(null),U=z9.useRef(()=>{if(!G.current)return;let H=G.current.next();if(H.done){G.current=null;return}if(q.current===H.value)U.current();else J(H.value)});QQ(()=>{if(q.current=Q,G.current)U.current()});let K=z9.useCallback((H)=>{G.current=H(q.current),U.current()},[U]);return[Q,K]}var z9;var MS=k(()=>{UJ();z9=S(JZ(),1)});function EX(Z){let[Q,J]=wz.useState(Z),q=wz.useRef(null),G=FS(Q),U=wz.useRef(null);if(d1)d1.register(U,G);if(gr){let K=s8.get(G);if(K&&!K.includes(q))K.push(q);else s8.set(G,[q])}return QQ(()=>{let K=G;return()=>{if(d1)d1.unregister(U);s8.delete(K)}},[G]),wz.useEffect(()=>{let K=q.current;if(K)J(K);return()=>{if(K)q.current=null}}),G}function OS(Z,Q){if(Z===Q)return Z;let J=s8.get(Z);if(J)return J.forEach((G)=>G.current=Q),Q;let q=s8.get(Q);if(q)return q.forEach((G)=>G.current=Z),Z;return Q}function zq(Z=[]){let Q=EX(),[J,q]=LS(Q),G=wz.useCallback(()=>{q(function*(){yield Q,yield document.getElementById(Q)?Q:void 0})},[Q,q]);return QQ(G,[Q,G,...Z]),J}var wz,gr,s8,d1;var vY=k(()=>{UJ();G9();MS();wz=S(JZ(),1),gr=Boolean(typeof window<"u"&&window.document&&window.document.createElement),s8=new Map;if(typeof FinalizationRegistry<"u")d1=new FinalizationRegistry((Z)=>{s8.delete(Z)})});function hG(...Z){if(Z.length===1&&Z[0])return Z[0];return(Q)=>{let J=!1,q=Z.map((G)=>{let U=VS(G,Q);return J||=typeof U=="function",U});if(J)return()=>{q.forEach((G,U)=>{if(typeof G==="function")G();else VS(Z[U],null)})}}}function VS(Z,Q){if(typeof Z==="function")return Z(Q);else if(Z!=null)Z.current=Q}var eO=()=>{};function xZ(...Z){let Q={...Z[0]};for(let J=1;J<Z.length;J++){let q=Z[J];for(let G in q){let U=Q[G],K=q[G];if(typeof U==="function"&&typeof K==="function"&&G[0]==="o"&&G[1]==="n"&&G.charCodeAt(2)>=65&&G.charCodeAt(2)<=90)Q[G]=mq(U,K);else if((G==="className"||G==="UNSAFE_className")&&typeof U==="string"&&typeof K==="string")Q[G]=hk(U,K);else if(G==="id"&&U&&K)Q.id=OS(U,K);else if(G==="ref"&&U&&K)Q.ref=hG(U,K);else Q[G]=K!==void 0?K:U}}return Q}var KJ=k(()=>{n8();vY();eO();kz()});var Uq=k(()=>{KJ()});var K3=k(()=>{eO()});var AS=k(()=>{UJ()});function qY(Z){let Q=uU.useRef(null),J=uU.useRef(void 0),q=uU.useCallback((G)=>{if(typeof Z==="function"){let U=Z,K=U(G);return()=>{if(typeof K==="function")K();else U(null)}}else if(Z)return Z.current=G,()=>{Z.current=null}},[Z]);return uU.useMemo(()=>({get current(){return Q.current},set current(G){if(Q.current=G,J.current)J.current(),J.current=void 0;if(G!=null)J.current=q(G)}}),[q])}var uU;var IS=k(()=>{uU=S(JZ(),1)});var a8=k(()=>{IS()});function mJ({values:Z,children:Q}){for(let[J,q]of Z)Q=ZJ.default.createElement(J.Provider,{value:q},Q);return Q}function sQ(Z){let{className:Q,style:J,children:q,defaultClassName:G,defaultChildren:U,defaultStyle:K,values:H,render:B}=Z;return ZJ.useMemo(()=>{let F,M,O;if(typeof Q==="function")F=Q({...H,defaultClassName:G});else F=Q;if(typeof J==="function")M=J({...H,defaultStyle:K||{}});else M=J;if(typeof q==="function")O=q({...H,defaultChildren:U});else if(q==null)O=U;else O=q;return{className:F??G,style:M||K?{...K,...M}:void 0,children:O??U,"data-rac":"",render:B?(V)=>B(V,H):void 0}},[Q,J,q,G,U,K,H,B])}function fU(Z,Q){let J=ZJ.useContext(Z);if(Q===null)return null;if(J&&typeof J==="object"&&"slots"in J&&J.slots){let q=Q||uG;if(!J.slots[q]){let G=new Intl.ListFormat().format(Object.keys(J.slots).map((K)=>`"${K}"`)),U=Q?`Invalid slot "${Q}".`:"A slot prop is required.";throw Error(`${U} Valid slot names are ${G}.`)}return J.slots[q]}return J}function JX(Z,Q,J){let q=fU(J,Z.slot)||{},{ref:G,...U}=q,K=qY(ZJ.useMemo(()=>hG(Q,G),[Q,G])),H=xZ(U,Z);if("style"in U&&U.style&&"style"in Z&&Z.style)if(typeof U.style==="function"||typeof Z.style==="function")H.style=(B)=>{let F=typeof U.style==="function"?U.style(B):U.style,M={...B.defaultStyle,...F},O=typeof Z.style==="function"?Z.style({...B,defaultStyle:M}):Z.style;return{...M,...O}};else H.style={...U.style,...Z.style};return[H,K]}function H3(Z=!0){let[Q,J]=ZJ.useState(Z),q=ZJ.useRef(!1),G=ZJ.useCallback((U)=>{q.current=!0,J(!!U)},[]);return QQ(()=>{if(!q.current)J(!1)},[]),[G,Q]}function jS(Z){let Q=/^(data-.*)$/,J={};for(let q in Z)if(!Q.test(q))J[q]=Z[q];return J}function hr(Z,Q,J){let{render:q,...G}=Q,U=ZJ.useRef(null),K=ZJ.useMemo(()=>hG(J,U),[J,U]);QQ(()=>{if(q){if(!U.current)console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?");else if(U.current.localName!==Z)console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${Z}>, got <${U.current.localName}>. This may break the component behavior and accessibility.`)}},[Z,q]);let H={...G,ref:K};if(q)return q(H,void 0);return ZJ.default.createElement(Z,H)}var ZJ,uG,NS,SQ;var cJ=k(()=>{Uq();K3();AS();a8();ZJ=S(JZ(),1),uG=Symbol("default");NS={},SQ=new Proxy({},{get(Z,Q){if(typeof Q!=="string")return;let J=NS[Q];if(!J)J=ZJ.forwardRef(hr.bind(null,Q)),NS[Q]=J;return J}})});var TS="react-aria-clear-focus",PS="react-aria-focus";var RS=()=>{};function ur(Z){return Z!==null&&typeof Z==="object"&&"nodeType"in Z&&typeof Z.nodeType==="number"}function CS(Z){return ur(Z)&&Z.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in Z}var XQ=(Z)=>{return Z?.ownerDocument??document},BX=(Z)=>{if(Z&&"window"in Z&&Z.window===Z)return Z;return XQ(Z).defaultView||window};var HJ=()=>{};function gY(){return fr}var fr=!1;var DS=()=>{};var W3=k(()=>{DS()});function OQ(Z,Q){if(!gY())return Q&&Z?Z.contains(Q):!1;if(!Z||!Q)return!1;let J=Q;while(J!==null){if(J===Z)return!0;if(J.tagName==="SLOT"&&J.assignedSlot)J=J.assignedSlot.parentNode;else if(CS(J))J=J.host;else J=J.parentNode}return!1}function TZ(Z){if(gY()&&Z.target instanceof Element&&Z.target.shadowRoot){if("composedPath"in Z)return Z.composedPath()[0]??null;else if("composedPath"in Z.nativeEvent)return Z.nativeEvent.composedPath()[0]??null}return Z.target}function l1(Z){if(!Z)return!1;let Q=Z.getRootNode(),J=BX(Z);if(!(Q instanceof J.Document||Q instanceof J.ShadowRoot))return!1;let q=Q.activeElement;return q!=null&&Z.contains(q)}var PQ=(Z=document)=>{if(!gY())return Z.activeElement;let Q=Z.activeElement;while(Q&&"shadowRoot"in Q&&Q.shadowRoot?.activeElement)Q=Q.shadowRoot.activeElement;return Q};var KX=k(()=>{HJ();W3()});function B3(Z){let Q=cr(XQ(Z));if(Q!==Z){if(Q)mr(Q,Z);if(Z)ZV(Z,Q)}}function mr(Z,Q){Z.dispatchEvent(new FocusEvent("blur",{relatedTarget:Q})),Z.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:Q}))}function ZV(Z,Q){Z.dispatchEvent(new FocusEvent("focus",{relatedTarget:Q})),Z.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:Q}))}function cr(Z){let Q=PQ(Z),J=Q?.getAttribute("aria-activedescendant");if(J)return Z.getElementById(J)||Q;return Q}var QV=k(()=>{KX();HJ()});function pJ(Z){if(pr())Z.focus({preventScroll:!0});else{let Q=dr(Z);Z.focus(),lr(Q)}}function pr(){if(_3==null){_3=!1;try{document.createElement("div").focus({get preventScroll(){return _3=!0,!0}})}catch{}}return _3}function dr(Z){let Q=Z.parentNode,J=[],q=document.scrollingElement||document.documentElement;while(Q instanceof HTMLElement&&Q!==q){if(Q.offsetHeight<Q.scrollHeight||Q.offsetWidth<Q.scrollWidth)J.push({element:Q,scrollTop:Q.scrollTop,scrollLeft:Q.scrollLeft});Q=Q.parentNode}if(q instanceof HTMLElement)J.push({element:q,scrollTop:q.scrollTop,scrollLeft:q.scrollLeft});return J}function lr(Z){for(let{element:Q,scrollTop:J,scrollLeft:q}of Z)Q.scrollTop=J,Q.scrollLeft=q}var _3=null;var mU=()=>{};function nr(Z){let Q=BX(Z);if(!(Z instanceof Q.HTMLElement)&&!(Z instanceof Q.SVGElement))return!1;let{display:J,visibility:q}=Z.style,G=J!=="none"&&q!=="hidden"&&q!=="collapse";if(G){let{getComputedStyle:U}=Z.ownerDocument.defaultView,{display:K,visibility:H}=U(Z);G=K!=="none"&&H!=="hidden"&&H!=="collapse"}return G}function sr(Z,Q){return!Z.hasAttribute("hidden")&&!Z.hasAttribute("data-react-aria-prevent-focus")&&(Z.nodeName==="DETAILS"&&Q&&Q.nodeName!=="SUMMARY"?Z.hasAttribute("open"):!0)}function F3(Z,Q){if(ir)return Z.checkVisibility({visibilityProperty:!0})&&!Z.closest("[data-react-aria-prevent-focus]");return Z.nodeName!=="#comment"&&nr(Z)&&sr(Z,Q)&&(!Z.parentElement||F3(Z.parentElement,Z))}var ir;var $S=k(()=>{HJ();ir=typeof Element<"u"&&"checkVisibility"in Element.prototype});function L3(Z,Q){return Z.matches(ar)&&!ES(Z)&&(Q?.skipVisibilityCheck||F3(Z))}function M3(Z){return Z.matches(rr)&&F3(Z)&&!ES(Z)}function ES(Z){let Q=Z;while(Q!=null){if(Q instanceof Q.ownerDocument.defaultView.HTMLElement&&Q.inert)return!0;Q=Q.parentElement}return!1}var XV,ar,rr;var O3=k(()=>{$S();XV=["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"],ar=XV.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";XV.push('[tabindex]:not([tabindex="-1"]):not([disabled])');rr=XV.join(':not([hidden]):not([tabindex="-1"]),')});function n1(Z){let Q=Z;return Q.nativeEvent=Z,Q.isDefaultPrevented=()=>Q.defaultPrevented,Q.isPropagationStopped=()=>Q.cancelBubble,Q.persist=()=>{},Q}function A3(Z,Q){Object.defineProperty(Z,"target",{value:Q}),Object.defineProperty(Z,"currentTarget",{value:Q})}function I3(Z){let Q=V3.useRef({isFocused:!1,observer:null});return QQ(()=>{let J=Q.current;return()=>{if(J.observer)J.observer.disconnect(),J.observer=null}},[]),V3.useCallback((J)=>{let q=TZ(J);if(q instanceof HTMLButtonElement||q instanceof HTMLInputElement||q instanceof HTMLTextAreaElement||q instanceof HTMLSelectElement){Q.current.isFocused=!0;let G=q,U=(K)=>{if(Q.current.isFocused=!1,G.disabled){let H=n1(K);Z?.(H)}if(Q.current.observer)Q.current.observer.disconnect(),Q.current.observer=null};G.addEventListener("focusout",U,{once:!0}),Q.current.observer=new MutationObserver(()=>{if(Q.current.isFocused&&G.disabled){Q.current.observer?.disconnect();let K=G===PQ()?null:PQ();G.dispatchEvent(new FocusEvent("blur",{relatedTarget:K})),G.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:K}))}}),Q.current.observer.observe(G,{attributes:!0,attributeFilter:["disabled"]})}},[Z])}function kS(Z){while(Z&&!L3(Z,{skipVisibilityCheck:!0}))Z=Z.parentElement;let Q=BX(Z),J=Q.document.activeElement;if(!J||J===Z)return;i1=!0;let q=!1,G=(M)=>{if(TZ(M)===J||q)M.stopImmediatePropagation()},U=(M)=>{if(TZ(M)===J||q){if(M.stopImmediatePropagation(),!Z&&!q)q=!0,pJ(J),B()}},K=(M)=>{if(TZ(M)===Z||q)M.stopImmediatePropagation()},H=(M)=>{if(TZ(M)===Z||q){if(M.stopImmediatePropagation(),!q)q=!0,pJ(J),B()}};Q.addEventListener("blur",G,!0),Q.addEventListener("focusout",U,!0),Q.addEventListener("focusin",H,!0),Q.addEventListener("focus",K,!0);let B=()=>{cancelAnimationFrame(F),Q.removeEventListener("blur",G,!0),Q.removeEventListener("focusout",U,!0),Q.removeEventListener("focusin",H,!0),Q.removeEventListener("focus",K,!0),i1=!1,q=!1},F=requestAnimationFrame(B);return B}var V3,i1=!1;var s1=k(()=>{mU();KX();HJ();O3();UJ();V3=S(JZ(),1)});function N3(Z){if(typeof window>"u"||window.navigator==null)return!1;let Q=window.navigator.userAgentData?.brands;return Array.isArray(Q)&&Q.some((J)=>Z.test(J.brand))||Z.test(window.navigator.userAgent)}function JV(Z){return typeof window<"u"&&window.navigator!=null?Z.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function xz(Z){let Q=null;return()=>{if(Q==null)Q=Z();return Q}}var cq,or,YV,pq,SS,yS,qV,a1,wS;var Kq=k(()=>{cq=xz(function(){return JV(/^Mac/i)}),or=xz(function(){return JV(/^iPhone/i)}),YV=xz(function(){return JV(/^iPad/i)||cq()&&navigator.maxTouchPoints>1}),pq=xz(function(){return or()||YV()}),SS=xz(function(){return cq()||pq()}),yS=xz(function(){return N3(/AppleWebKit/i)&&!qV()}),qV=xz(function(){return N3(/Chrome/i)}),a1=xz(function(){return N3(/Android/i)}),wS=xz(function(){return N3(/Firefox/i)})});function j3(Z){if(Z.pointerType===""&&Z.isTrusted)return!0;if(a1()&&Z.pointerType)return Z.type==="click"&&Z.buttons===1;return Z.detail===0&&!Z.pointerType}function xS(Z){return!a1()&&Z.width===0&&Z.height===0||Z.width===1&&Z.height===1&&Z.pressure===0&&Z.detail===0&&Z.pointerType==="mouse"}var GV=k(()=>{Kq()});function cU(){return r8.useContext(tr)}function er(Z,Q){let J=Z.getAttribute("target");return(!J||J==="_self")&&Z.origin===location.origin&&!Z.hasAttribute("download")&&!Q.metaKey&&!Q.ctrlKey&&!Q.altKey&&!Q.shiftKey}function Hq(Z,Q,J=!0){let{metaKey:q,ctrlKey:G,altKey:U,shiftKey:K}=Q;if(wS()&&window.event?.type?.startsWith("key")&&Z.target==="_blank")if(cq())q=!0;else G=!0;let H=yS()&&cq()&&!YV()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:q,ctrlKey:G,altKey:U,shiftKey:K}):new MouseEvent("click",{metaKey:q,ctrlKey:G,altKey:U,shiftKey:K,detail:1,bubbles:!0,cancelable:!0});Hq.isOpening=J,pJ(Z),Z.dispatchEvent(H),Hq.isOpening=!1}function Zo(Z,Q){if(Z instanceof HTMLAnchorElement)Q(Z);else if(Z.hasAttribute("data-href")){let J=document.createElement("a");if(J.href=Z.getAttribute("data-href"),Z.hasAttribute("data-target"))J.target=Z.getAttribute("data-target");if(Z.hasAttribute("data-rel"))J.rel=Z.getAttribute("data-rel");if(Z.hasAttribute("data-download"))J.download=Z.getAttribute("data-download");if(Z.hasAttribute("data-ping"))J.ping=Z.getAttribute("data-ping");if(Z.hasAttribute("data-referrer-policy"))J.referrerPolicy=Z.getAttribute("data-referrer-policy");Z.appendChild(J),Q(J),Z.removeChild(J)}}function Qo(Z,Q){Zo(Z,(J)=>Hq(J,Q))}function o8(Z){let J=cU().useHref(Z?.href??""),q={};if(Z){for(let G of["href","target","rel","download","ping","referrerPolicy"])if(G in Z)q[G]=G==="href"?J:Z[G]}return q}function bS(Z,Q,J,q){if(!Q.isNative&&Z.currentTarget instanceof HTMLAnchorElement&&Z.currentTarget.href&&!Z.isDefaultPrevented()&&er(Z.currentTarget,Z)&&J)Z.preventDefault(),Q.open(Z.currentTarget,Z,J,q)}var r8,tr;var U9=k(()=>{mU();Kq();r8=S(JZ(),1),tr=r8.createContext({isNative:!0,open:Qo,useHref:(Z)=>Z});Hq.isOpening=!1});function P3(Z,Q){for(let J of zV)J(Z,Q)}function Jo(Z){return!(Z.metaKey||!cq()&&Z.altKey||Z.ctrlKey||Z.key==="Control"||Z.key==="Shift"||Z.key==="Meta")}function T3(Z){if(pU=!0,!Hq.isOpening&&Jo(Z))dU="keyboard",o1="keyboard",P3("keyboard",Z)}function t8(Z){if(dU="pointer",o1="pointerType"in Z?Z.pointerType:"mouse",Z.type==="mousedown"||Z.type==="pointerdown")pU=!0,P3("pointer",Z)}function vS(Z){if(!Hq.isOpening&&j3(Z))pU=!0,dU="virtual",o1="virtual"}function gS(Z){let Q=BX(TZ(Z)),J=XQ(TZ(Z));if(TZ(Z)===Q||TZ(Z)===J||i1||!Z.isTrusted)return;if(!pU&&!UV)dU="virtual",o1="virtual",P3("virtual",Z);pU=!1,UV=!1}function hS(){if(i1)return;pU=!1,UV=!0}function KV(Z){if(typeof window>"u"||typeof document>"u")return;let Q=BX(Z),J=XQ(Z);if(r1.get(Q))return;let q=Q.HTMLElement.prototype.focus;if(Q.HTMLElement.prototype.focus=function(){pU=!0,q.apply(this,arguments)},J.addEventListener("keydown",T3,!0),J.addEventListener("keyup",T3,!0),J.addEventListener("click",vS,!0),Q.addEventListener("focus",gS,!0),Q.addEventListener("blur",hS,!1),typeof PointerEvent<"u")J.addEventListener("pointerdown",t8,!0),J.addEventListener("pointermove",t8,!0),J.addEventListener("pointerup",t8,!0);Q.addEventListener("beforeunload",()=>{uS(Z)},{once:!0}),r1.set(Q,{focus:q})}function Yo(Z){let Q=XQ(Z),J;if(Q.readyState!=="loading")KV(Z);else J=()=>{KV(Z)},Q.addEventListener("DOMContentLoaded",J);return()=>uS(Z,J)}function fG(){return dU!=="pointer"}function lU(){return dU}function t1(Z){dU=Z,o1=Z==="pointer"?"mouse":Z,P3(Z,null)}function Go(Z,Q,J){let q=J?TZ(J):void 0,G=XQ(q),U=BX(q),K=typeof U<"u"?U.HTMLInputElement:HTMLInputElement,H=typeof U<"u"?U.HTMLTextAreaElement:HTMLTextAreaElement,B=typeof U<"u"?U.HTMLElement:HTMLElement,F=typeof U<"u"?U.KeyboardEvent:KeyboardEvent,M=PQ(G);return Z=Z||M instanceof K&&!qo.has(M.type)||M instanceof H||M instanceof B&&M.isContentEditable,!(Z&&Q==="keyboard"&&J instanceof F&&!Xo[J.key])}function fS(Z,Q,J){KV(),HV.useEffect(()=>{if(J?.enabled===!1)return;let q=(G,U)=>{if(!Go(!!J?.isTextInput,G,U))return;Z(fG())};return zV.add(q),()=>{zV.delete(q)}},Q)}var HV,dU=null,o1="keyboard",zV,r1,pU=!1,UV=!1,Xo,uS=(Z,Q)=>{let J=BX(Z),q=XQ(Z);if(Q)q.removeEventListener("DOMContentLoaded",Q);if(!r1.has(J))return;if(J.HTMLElement.prototype.focus=r1.get(J).focus,q.removeEventListener("keydown",T3,!0),q.removeEventListener("keyup",T3,!0),q.removeEventListener("click",vS,!0),J.removeEventListener("focus",gS,!0),J.removeEventListener("blur",hS,!1),typeof PointerEvent<"u")q.removeEventListener("pointerdown",t8,!0),q.removeEventListener("pointermove",t8,!0),q.removeEventListener("pointerup",t8,!0);r1.delete(J)},qo;var K9=k(()=>{KX();HJ();s1();Kq();GV();U9();HV=S(JZ(),1),zV=new Set,r1=new Map,Xo={Tab:!0,Escape:!0};if(typeof document<"u")Yo();qo=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function H9(Z){if(cq())return Z.metaKey;return Z.ctrlKey}function iU(Z){return Z instanceof HTMLInputElement&&!zo.has(Z.type)||Z instanceof HTMLTextAreaElement||Z instanceof HTMLElement&&Z.isContentEditable}var zo;var e1=k(()=>{Kq();zo=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function WJ(Z){let Q=e8.useRef(null);return Uo(()=>{Q.current=Z},[Z]),e8.useCallback((...J)=>{let q=Q.current;return q?.(...J)},[])}var e8,Uo;var nU=k(()=>{UJ();e8=S(JZ(),1),Uo=e8.default.useInsertionEffect??QQ});function sU(Z,Q,J,q){let G=WJ(J),U=J==null;mS.useEffect(()=>{if(U||!Z.current)return;let K=Z.current;return K.addEventListener(Q,G,q),()=>{K.removeEventListener(Q,G,q)}},[Z,Q,q,U])}var mS;var WV=k(()=>{nU();mS=S(JZ(),1)});function W9(Z,Q){let{id:J,"aria-label":q,"aria-labelledby":G}=Z;if(J=EX(J),G&&q)G=[...new Set([J,...G.trim().split(/\s+/)])].join(" ");else if(G)G=G.trim().split(/\s+/).join(" ");if(!q&&!G&&Q)q=Q;return{id:J,"aria-label":q,"aria-labelledby":G}}var ZH=k(()=>{vY()});function cS(Z){if(Intl.Locale){let J=new Intl.Locale(Z).maximize(),q=typeof J.getTextInfo==="function"?J.getTextInfo():J.textInfo;if(q)return q.direction==="rtl";if(J.script)return Ko.has(J.script)}let Q=Z.split("-")[0];return Ho.has(Q)}var Ko,Ho;var pS=k(()=>{Ko=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Ho=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"])});function iS(){let Z=typeof window<"u"&&window[lS]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([Z])}catch{Z="en-US"}return{locale:Z,direction:cS(Z)?"rtl":"ltr"}}function dS(){BV=iS();for(let Z of QH)Z(BV)}function nS(){let Z=fJ(),[Q,J]=R3.useState(BV);if(R3.useEffect(()=>{if(QH.size===0)window.addEventListener("languagechange",dS);return QH.add(J),()=>{if(QH.delete(J),QH.size===0)window.removeEventListener("languagechange",dS)}},[]),Z)return{locale:typeof window<"u"&&window[lS]||"en-US",direction:"ltr"};return Q}var R3,lS,BV,QH;var sS=k(()=>{pS();G9();R3=S(JZ(),1),lS=Symbol.for("react-aria.i18n.locale");BV=iS(),QH=new Set});function ZK(){let Z=nS();return C3.useContext(Wo)||Z}var C3,Wo;var D3=k(()=>{sS();C3=S(JZ(),1),Wo=C3.default.createContext(null)});class QK{constructor(Z,Q="en-US"){this.strings=Object.fromEntries(Object.entries(Z).filter(([,J])=>J)),this.defaultLocale=Q}getStringForLocale(Z,Q){let q=this.getStringsForLocale(Q)[Z];if(!q)throw Error(`Could not find intl message ${Z} in ${Q} locale`);return q}getStringsForLocale(Z){let Q=this.strings[Z];if(!Q)Q=Fo(Z,this.strings,this.defaultLocale),this.strings[Z]=Q;return Q}static getGlobalDictionaryForPackage(Z){if(typeof window>"u")return null;let Q=window[Bo];if($3===void 0){let q=window[_o];if(!q)return null;$3={};for(let G in q)$3[G]=new QK({[Q]:q[G]},Q)}let J=$3?.[Z];if(!J)throw Error(`Strings for package "${Z}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return J}}function Fo(Z,Q,J="en-US"){if(Q[Z])return Q[Z];let q=Lo(Z);if(Q[q])return Q[q];for(let G in Q)if(G.startsWith(q+"-"))return Q[G];return Q[J]}function Lo(Z){if(Intl.Locale)return new Intl.Locale(Z).language;return Z.split("-")[0]}var Bo,_o,$3=void 0;var aS=k(()=>{Bo=Symbol.for("react-aria.i18n.locale"),_o=Symbol.for("react-aria.i18n.strings")});class E3{constructor(Z,Q){this.locale=Z,this.strings=Q}format(Z,Q){let J=this.strings.getStringForLocale(Z,this.locale);return typeof J==="function"?J(Q,this):J}plural(Z,Q,J="cardinal"){let q=Q["="+Z];if(q)return typeof q==="function"?q():q;let G=this.locale+":"+J,U=rS.get(G);if(!U)U=new Intl.PluralRules(this.locale,{type:J}),rS.set(G,U);let K=U.select(Z);return q=Q[K]||Q.other,typeof q==="function"?q():q}number(Z){let Q=oS.get(this.locale);if(!Q)Q=new Intl.NumberFormat(this.locale),oS.set(this.locale,Q);return Q.format(Z)}select(Z,Q){let J=Z[Q]||Z.other;return typeof J==="function"?J():J}}var rS,oS;var tS=k(()=>{rS=new Map,oS=new Map});var eS=k(()=>{aS();tS()});function Mo(Z){let Q=Zy.get(Z);if(!Q)Q=new QK(Z),Zy.set(Z,Q);return Q}function Oo(Z,Q){return Q&&QK.getGlobalDictionaryForPackage(Q)||Mo(Z)}function Xy(Z,Q){let{locale:J}=ZK(),q=Oo(Z,Q);return Qy.useMemo(()=>new E3(J,q),[J,q])}var Qy,Zy;var Jy=k(()=>{D3();eS();Qy=S(JZ(),1),Zy=new WeakMap});function aU(Z,Q,J){let[q,G]=GY.useState(Z||Q),U=GY.useRef(q),K=GY.useRef(Z!==void 0),H=Z!==void 0;GY.useEffect(()=>{let O=K.current;if(O!==H)console.warn(`WARN: A component changed from ${O?"controlled":"uncontrolled"} to ${H?"controlled":"uncontrolled"}.`);K.current=H},[H]);let B=H?Z:q;Vo(()=>{U.current=B});let[,F]=GY.useReducer(()=>({}),{}),M=GY.useCallback((O,...V)=>{let A=typeof O==="function"?O(U.current):O;if(!Object.is(U.current,A))U.current=A,G(A),F(),J?.(A,...V)},[J]);return[B,M]}var GY,Vo;var k3=k(()=>{GY=S(JZ(),1),Vo=typeof document<"u"?GY.default.useInsertionEffect??GY.default.useLayoutEffect:()=>{}});var S3,Yy;var qy=k(()=>{S3=S(JZ(),1),Yy=S3.createContext(null)});function dq(Z){let Q=(J,q)=>{if(rU.useContext(Ao))return null;return Z(J,q)};return Q.displayName=Z.displayName||Z.name,rU.forwardRef(Q)}var rU,Ao;var Gy=k(()=>{rU=S(JZ(),1);if(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(Z){return this.content.appendChild(Z)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(Z){return this.content.removeChild(Z)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(Z,Q){return this.content.insertBefore(Z,Q)}});Ao=rU.createContext(!1)});var XK=k(()=>{Gy()});var y3,w3,B9;var _V=k(()=>{cJ();XK();y3=S(JZ(),1),w3=y3.createContext({}),B9=dq(function(Q,J){[Q,J]=JX(Q,J,w3);let{elementType:q="label",...G}=Q,U=SQ[q];return y3.default.createElement(U,{className:"react-aria-Label",...G,ref:J})})});function FQ(Z,Q={}){let{labelable:J,isLink:q,global:G,events:U=G,propNames:K}=Q,H={};for(let B in Z)if(Object.prototype.hasOwnProperty.call(Z,B)&&(Io.has(B)||J&&No.has(B)||q&&jo.has(B)||G&&To.has(B)||U&&(zy.has(B)||B.endsWith("Capture")&&zy.has(B.slice(0,-7)))||K?.has(B)||Po.test(B)))H[B]=Z[B];return H}var Io,No,jo,To,zy,Po;var bz=k(()=>{Io=new Set(["id"]),No=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),jo=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),To=new Set(["dir","lang","hidden","inert","translate"]),zy=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"]),Po=/^(data-.*)$/});function Uy(Z){let{id:Q,label:J,"aria-labelledby":q,"aria-label":G,labelElementType:U="label"}=Z;Q=EX(Q);let K=EX(),H={};if(J)q=q?`${K} ${q}`:K,H={id:K,htmlFor:U==="label"?Q:void 0};else if(!q&&!G)console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let B=W9({id:Q,"aria-label":G,"aria-labelledby":q});return{labelProps:H,fieldProps:B}}var Ky=k(()=>{vY();ZH()});var lq=k(()=>{bz()});var x3,Hy;var Wy=k(()=>{x3=S(JZ(),1),Hy=x3.createContext(null)});function b3(Z,Q="assertive",J=7000){if(!JK)if(JK=new By,!(typeof IS_REACT_ACT_ENVIRONMENT==="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"))setTimeout(()=>{if(JK?.isAttached())JK?.announce(Z,Q,J)},100);else JK.announce(Z,Q,J);else JK.announce(Z,Q,J)}class By{constructor(){if(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(Z){let Q=document.createElement("div");return Q.setAttribute("role","log"),Q.setAttribute("aria-live",Z),Q.setAttribute("aria-relevant","additions"),Q}destroy(){if(!this.node)return;document.body.removeChild(this.node),this.node=null}announce(Z,Q="assertive",J=7000){if(!this.node)return;let q=document.createElement("div");if(typeof Z==="object")q.setAttribute("role","img"),q.setAttribute("aria-labelledby",Z["aria-labelledby"]);else q.textContent=Z;if(Q==="assertive")this.assertiveLog?.appendChild(q);else this.politeLog?.appendChild(q);if(Z!=="")setTimeout(()=>{q.remove()},J)}clear(Z){if(!this.node)return;if((!Z||Z==="assertive")&&this.assertiveLog)this.assertiveLog.innerHTML="";if((!Z||Z==="polite")&&this.politeLog)this.politeLog.innerHTML=""}}var JK=null;var _y=()=>{};var Fy=k(()=>{_y()});function Ly(){if(typeof window>"u")return;function Z(q){return"propertyName"in q}let Q=(q)=>{let G=TZ(q);if(!Z(q)||!G)return;let U=_9.get(G);if(!U)U=new Set,_9.set(G,U),G.addEventListener("transitioncancel",J,{once:!0});U.add(q.propertyName)},J=(q)=>{let G=TZ(q);if(!Z(q)||!G)return;let U=_9.get(G);if(!U)return;if(U.delete(q.propertyName),U.size===0)G.removeEventListener("transitioncancel",J),_9.delete(G);if(_9.size===0){for(let K of FV)K();FV.clear()}};document.body.addEventListener("transitionrun",Q),document.body.addEventListener("transitionend",J)}function Ro(){for(let[Z]of _9)if("isConnected"in Z&&!Z.isConnected)_9.delete(Z)}function v3(Z){requestAnimationFrame(()=>{if(Ro(),_9.size===0)Z();else FV.add(Z)})}var _9,FV;var LV=k(()=>{KX();_9=new Map,FV=new Set;if(typeof document<"u")if(document.readyState!=="loading")Ly();else document.addEventListener("DOMContentLoaded",Ly)});function Wq(Z){if(!Z.isConnected)return;let Q=XQ(Z);if(lU()==="virtual"){let J=PQ(Q);v3(()=>{let q=PQ(Q);if((q===J||q===Q.body)&&Z.isConnected)pJ(Z)})}else pJ(Z)}var YK=k(()=>{mU();KX();K9();HJ();LV()});function oU(Z){let{isDisabled:Q,onFocus:J,onBlur:q,onFocusChange:G}=Z,U=MV.useCallback((B)=>{if(TZ(B)===B.currentTarget){if(q)q(B);if(G)G(!1);return!0}},[q,G]),K=I3(U),H=MV.useCallback((B)=>{let F=TZ(B),M=XQ(F),O=M?PQ(M):PQ();if(F===B.currentTarget&&F===O){if(J)J(B);if(G)G(!0);K(B)}},[G,J,K]);return{focusProps:{onFocus:!Q&&(J||G||q)?H:void 0,onBlur:!Q&&(q||G)?U:void 0}}}var MV;var g3=k(()=>{KX();HJ();s1();MV=S(JZ(),1)});function OV(Z){if(!Z)return;let Q=!0;return(J)=>{let q={...J,preventDefault(){J.preventDefault()},isDefaultPrevented(){return J.isDefaultPrevented()},stopPropagation(){if(Q)console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");else Q=!0},continuePropagation(){Q=!1},isPropagationStopped(){return Q}};if(Z(q),Q)J.stopPropagation()}}var My=()=>{};function tU(Z){return{keyboardProps:Z.isDisabled?{}:{onKeyDown:OV(Z.onKeyDown),onKeyUp:OV(Z.onKeyUp)}}}var h3=k(()=>{My()});function u3(Z,Q){QQ(()=>{if(Z&&Z.ref&&Q)return Z.ref.current=Q.current,()=>{if(Z.ref)Z.ref.current=null}})}var VV=k(()=>{UJ()});function Co(Z){let Q=vz.useContext(f3)||{};u3(Q,Z);let{ref:J,...q}=Q;return q}function F9(Z,Q){let{focusProps:J}=oU(Z),{keyboardProps:q}=tU(Z),G=xZ(J,q),U=Co(Q),K=Z.isDisabled?{}:U,H=vz.useRef(Z.autoFocus);vz.useEffect(()=>{if(H.current&&Q.current)Wq(Q.current);H.current=!1},[Q]);let B=Z.excludeFromTabOrder?-1:0;if(Z.isDisabled)B=void 0;return{focusableProps:xZ({...G,tabIndex:B},K)}}var vz,f3;var qK=k(()=>{YK();KJ();g3();h3();VV();vz=S(JZ(),1),f3=vz.default.createContext(null)});function Oy(Z){if(pq()){if(GK==="default"){let Q=XQ(Z);AV=Q.documentElement.style.webkitUserSelect,Q.documentElement.style.webkitUserSelect="none"}GK="disabled"}else if(Z instanceof HTMLElement||Z instanceof SVGElement){let Q="userSelect"in Z.style?"userSelect":"webkitUserSelect";m3.set(Z,Z.style[Q]),Z.style[Q]="none"}}function IV(Z){if(pq()){if(GK!=="disabled")return;GK="restoring",setTimeout(()=>{v3(()=>{if(GK==="restoring"){let Q=XQ(Z);if(Q.documentElement.style.webkitUserSelect==="none")Q.documentElement.style.webkitUserSelect=AV||"";AV="",GK="default"}})},300)}else if(Z instanceof HTMLElement||Z instanceof SVGElement){if(Z&&m3.has(Z)){let Q=m3.get(Z),J="userSelect"in Z.style?"userSelect":"webkitUserSelect";if(Z.style[J]==="none")Z.style[J]=Q;if(Z.getAttribute("style")==="")Z.removeAttribute("style");m3.delete(Z)}}}var GK="default",AV="",m3;var Vy=k(()=>{HJ();Kq();LV();m3=new WeakMap});function Ay(Z){return Z?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}function c3(Z){let Q=Z??(typeof document<"u"?document:void 0);if(!Q)return Ay(Q);if(NV.has(Q))return NV.get(Q);let J=Q.querySelector('meta[property="csp-nonce"]'),q=J&&J instanceof BX(J).HTMLMetaElement&&(J.nonce||J.content)||Ay(Q)||void 0;if(q!==void 0)NV.set(Q,q);return q}var NV;var jV=k(()=>{HJ();NV=new WeakMap});var Iy,XH;var TV=k(()=>{Iy=S(JZ(),1),XH=Iy.default.createContext({register:()=>{}});XH.displayName="PressResponderContext"});function M9(){let Z=L9.useRef(new Map),Q=L9.useCallback((G,U,K,H)=>{let B=H?.once?(...F)=>{Z.current.delete(K),K(...F)}:K;Z.current.set(K,{type:U,eventTarget:G,fn:B,options:H}),G.addEventListener(U,B,H)},[]),J=L9.useCallback((G,U,K,H)=>{let B=Z.current.get(K)?.fn||K;G.removeEventListener(U,B,H),Z.current.delete(K)},[]),q=L9.useCallback(()=>{Z.current.forEach((G,U)=>{J(G.eventTarget,G.type,U,G.options)})},[J]);return L9.useEffect(()=>{return q},[q]),{addGlobalListener:Q,removeGlobalListener:J,removeAllGlobalListeners:q}}var L9;var JH=k(()=>{L9=S(JZ(),1)});function $o(Z){let Q=uX.useContext(XH);if(Q){let{register:J,ref:q,...G}=Q;Z=xZ(G,Z),J()}return u3(Q,Z.ref),Z}class YH{#Z;constructor(Z,Q,J,q){this.#Z=!0;let U=(q?.target??J.currentTarget)?.getBoundingClientRect(),K,H=0,B,F=null;if(J.clientX!=null&&J.clientY!=null)B=J.clientX,F=J.clientY;if(U)if(B!=null&&F!=null)K=B-U.left,H=F-U.top;else K=U.width/2,H=U.height/2;this.type=Z,this.pointerType=Q,this.target=J.currentTarget,this.shiftKey=J.shiftKey,this.metaKey=J.metaKey,this.ctrlKey=J.ctrlKey,this.altKey=J.altKey,this.x=K,this.y=H,this.key=J.key}continuePropagation(){this.#Z=!1}get shouldStopPropagation(){return this.#Z}}function O9(Z){let{onPress:Q,onPressChange:J,onPressStart:q,onPressEnd:G,onPressUp:U,onClick:K,isDisabled:H,isPressed:B,preventFocusOnPress:F,shouldCancelOnPointerExit:M,allowTextSelectionOnPress:O,ref:V,...A}=$o(Z),[N,T]=uX.useState(!1),P=uX.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:C,removeAllGlobalListeners:y}=M9(),f=uX.useCallback((v,i)=>{let x=P.current;if(H||x.didFirePressStart)return!1;let d=!0;if(x.isTriggeringEvent=!0,q){let YZ=new YH("pressstart",i,v);q(YZ),d=YZ.shouldStopPropagation}if(J)J(!0);return x.isTriggeringEvent=!1,x.didFirePressStart=!0,T(!0),d},[H,q,J]),u=uX.useCallback((v,i,x=!0)=>{let d=P.current;if(!d.didFirePressStart)return!1;d.didFirePressStart=!1,d.isTriggeringEvent=!0;let YZ=!0;if(G){let t=new YH("pressend",i,v);G(t),YZ=t.shouldStopPropagation}if(J)J(!1);if(T(!1),Q&&x&&!H){let t=new YH("press",i,v);Q(t),YZ&&=t.shouldStopPropagation}return d.isTriggeringEvent=!1,YZ},[H,G,J,Q]),n=WJ(u),e=uX.useCallback((v,i)=>{let x=P.current;if(H)return!1;if(U){x.isTriggeringEvent=!0;let d=new YH("pressup",i,v);return U(d),x.isTriggeringEvent=!1,d.shouldStopPropagation}return!0},[H,U]),a=WJ(e),c=uX.useCallback((v)=>{let i=P.current;if(i.isPressed&&i.target){if(i.didFirePressStart&&i.pointerType!=null)u(eU(i.target,v),i.pointerType,!1);if(i.isPressed=!1,i.isOverTarget=!1,i.activePointerId=null,i.pointerType=null,y(),!O)IV(i.target);for(let x of i.disposables)x();i.disposables=[]}},[O,y,u]),GZ=WJ(c);uX.useEffect(()=>{if(H&&P.current.isPressed)GZ({currentTarget:P.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[H]);let s=uX.useCallback((v)=>{if(M)c(v)},[M,c]),LZ=uX.useCallback((v)=>{if(H)return;K?.(v)},[H,K]),HZ=uX.useCallback((v,i)=>{if(H)return;if(K){let x=new MouseEvent("click",v);A3(x,i),K(n1(x))}},[H,K]),KZ=uX.useMemo(()=>{let v=P.current,i={onKeyDown(d){if(PV(d.nativeEvent,d.currentTarget)&&OQ(d.currentTarget,TZ(d))){if(Py(TZ(d),d.key))d.preventDefault();let YZ=!0;if(!v.isPressed&&!d.repeat)v.target=d.currentTarget,v.isPressed=!0,v.pointerType="keyboard",YZ=f(d,"keyboard");let t=d.currentTarget,$=(o)=>{if(PV(o,t)&&!o.repeat&&OQ(t,TZ(o))&&v.target)a(eU(v.target,o),"keyboard")};if(C(XQ(d.currentTarget),"keyup",mq($,x),!0),YZ)d.stopPropagation();if(d.metaKey&&cq())v.metaKeyEvents?.set(d.key,d.nativeEvent)}else if(d.key==="Meta")v.metaKeyEvents=new Map},onClick(d){if(d&&!OQ(d.currentTarget,TZ(d)))return;if(d&&d.button===0&&!v.isTriggeringEvent&&!Hq.isOpening){let YZ=!0;if(H)d.preventDefault();if(!v.ignoreEmulatedMouseEvents&&!v.isPressed&&(v.pointerType==="virtual"||j3(d.nativeEvent))){let t=f(d,"virtual"),$=a(d,"virtual"),o=n(d,"virtual");LZ(d),YZ=t&&$&&o}else if(v.isPressed&&v.pointerType!=="keyboard"){let t=v.pointerType||d.nativeEvent.pointerType||"virtual",$=a(eU(d.currentTarget,d),t),o=n(eU(d.currentTarget,d),t,!0);YZ=$&&o,v.isOverTarget=!1,LZ(d),GZ(d)}if(v.ignoreEmulatedMouseEvents=!1,YZ)d.stopPropagation()}}},x=(d)=>{if(v.isPressed&&v.target&&PV(d,v.target)){if(Py(TZ(d),d.key))d.preventDefault();let YZ=TZ(d),t=OQ(v.target,YZ);if(n(eU(v.target,d),"keyboard",t),t)HZ(d,v.target);if(y(),d.key!=="Enter"&&RV(v.target)&&OQ(v.target,YZ)&&!d[Ny])d[Ny]=!0,Hq(v.target,d,!1);v.isPressed=!1,v.metaKeyEvents?.delete(d.key)}else if(d.key==="Meta"&&v.metaKeyEvents?.size){let YZ=v.metaKeyEvents;v.metaKeyEvents=void 0;for(let t of YZ.values())v.target?.dispatchEvent(new KeyboardEvent("keyup",t))}};if(typeof PointerEvent<"u"){i.onPointerDown=(t)=>{if(t.button!==0||!OQ(t.currentTarget,TZ(t)))return;if(xS(t.nativeEvent)){v.pointerType="virtual";return}v.pointerType=t.pointerType;let $=!0;if(!v.isPressed){if(v.isPressed=!0,v.isOverTarget=!0,v.activePointerId=t.pointerId,v.target=t.currentTarget,!O)Oy(v.target);$=f(t,v.pointerType);let o=TZ(t);if("releasePointerCapture"in o)if("hasPointerCapture"in o){if(o.hasPointerCapture(t.pointerId))o.releasePointerCapture(t.pointerId)}else o.releasePointerCapture(t.pointerId);C(XQ(t.currentTarget),"pointerup",d,!1),C(XQ(t.currentTarget),"pointercancel",YZ,!1)}if($)t.stopPropagation()},i.onMouseDown=(t)=>{if(!OQ(t.currentTarget,TZ(t)))return;if(t.button===0){if(F){let $=kS(t.target);if($)v.disposables.push($)}t.stopPropagation()}},i.onPointerUp=(t)=>{if(!OQ(t.currentTarget,TZ(t))||v.pointerType==="virtual")return;if(t.button===0&&!v.isPressed)a(t,v.pointerType||t.pointerType)},i.onPointerEnter=(t)=>{if(t.pointerId===v.activePointerId&&v.target&&!v.isOverTarget&&v.pointerType!=null)v.isOverTarget=!0,f(eU(v.target,t),v.pointerType)},i.onPointerLeave=(t)=>{if(t.pointerId===v.activePointerId&&v.target&&v.isOverTarget&&v.pointerType!=null)v.isOverTarget=!1,n(eU(v.target,t),v.pointerType,!1),s(t)};let d=(t)=>{if(t.pointerId===v.activePointerId&&v.isPressed&&t.button===0&&v.target){if(OQ(v.target,TZ(t))&&v.pointerType!=null){let $=!1,o=setTimeout(()=>{if(v.isPressed&&v.target instanceof HTMLElement)if($)GZ(t);else pJ(v.target),v.target.click()},80);C(t.currentTarget,"click",()=>$=!0,!0),v.disposables.push(()=>clearTimeout(o))}else GZ(t);v.isOverTarget=!1}},YZ=(t)=>{GZ(t)};i.onDragStart=(t)=>{if(!OQ(t.currentTarget,TZ(t)))return;GZ(t)}}return i},[C,H,F,y,O,s,f,LZ,HZ]);return uX.useEffect(()=>{if(!V)return;let v=XQ(V.current);if(!v||!v.head||v.getElementById(jy))return;let i=v.createElement("style");i.id=jy;let x=c3(v);if(x)i.nonce=x;i.textContent=`
|
|
236
|
+
@layer {
|
|
237
|
+
[${Ty}] {
|
|
238
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
`.trim(),v.head.prepend(i)},[V]),uX.useEffect(()=>{let v=P.current;return()=>{if(!O)IV(v.target??void 0);for(let i of v.disposables)i();v.disposables=[]}},[O]),{isPressed:B||N,pressProps:xZ(A,KZ,{[Ty]:!0})}}function RV(Z){return Z.tagName==="A"&&Z.hasAttribute("href")}function PV(Z,Q){let{key:J,code:q}=Z,G=Q,U=G.getAttribute("role");return(J==="Enter"||J===" "||J==="Spacebar"||q==="Space")&&!(G instanceof BX(G).HTMLInputElement&&!Ry(G,J)||G instanceof BX(G).HTMLTextAreaElement||G.isContentEditable)&&!((U==="link"||!U&&RV(G))&&J!=="Enter")}function eU(Z,Q){let{clientX:J,clientY:q}=Q;return{currentTarget:Z,shiftKey:Q.shiftKey,ctrlKey:Q.ctrlKey,metaKey:Q.metaKey,altKey:Q.altKey,clientX:J,clientY:q,key:Q.key}}function Eo(Z){if(Z instanceof HTMLInputElement)return!1;if(Z instanceof HTMLButtonElement)return Z.type!=="submit"&&Z.type!=="reset";if(RV(Z))return!1;return!0}function Py(Z,Q){if(Z instanceof HTMLInputElement)return!Ry(Z,Q);return Eo(Z)}function Ry(Z,Q){return Z.type==="checkbox"||Z.type==="radio"?Q===" ":ko.has(Z.type)}var Do,uX,Ny,jy="react-aria-pressable-style",Ty="data-react-aria-pressable",ko;var qH=k(()=>{n8();s1();Vy();mU();KX();jV();HJ();Kq();GV();KJ();U9();TV();nU();JH();VV();Do=S(uJ(),1),uX=S(JZ(),1);Ny=Symbol("linkClicked");ko=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function CV(Z,Q){let{elementType:J="button",isDisabled:q,onPress:G,onPressStart:U,onPressEnd:K,onPressUp:H,onPressChange:B,preventFocusOnPress:F,allowFocusWhenDisabled:M,onClick:O,href:V,target:A,rel:N,type:T="button"}=Z,P;if(J==="button")P={type:T,disabled:q,form:Z.form,formAction:Z.formAction,formEncType:Z.formEncType,formMethod:Z.formMethod,formNoValidate:Z.formNoValidate,formTarget:Z.formTarget,name:Z.name,value:Z.value};else P={role:"button",href:J==="a"&&!q?V:void 0,target:J==="a"?A:void 0,type:J==="input"?T:void 0,disabled:J==="input"?q:void 0,"aria-disabled":!q||J==="input"?void 0:q,rel:J==="a"?N:void 0};let{pressProps:C,isPressed:y}=O9({onPressStart:U,onPressEnd:K,onPressChange:B,onPress:G,onPressUp:H,onClick:O,isDisabled:q,preventFocusOnPress:F,ref:Q}),{focusableProps:f}=F9(Z,Q);if(M)f.tabIndex=q?-1:f.tabIndex;let u=xZ(f,C,FQ(Z,{labelable:!0}));return{isPressed:y,buttonProps:xZ(P,u,{"aria-haspopup":Z["aria-haspopup"],"aria-expanded":Z["aria-expanded"],"aria-controls":Z["aria-controls"],"aria-pressed":Z["aria-pressed"],"aria-current":Z["aria-current"],"aria-disabled":Z["aria-disabled"]})}}var Cy=k(()=>{bz();KJ();qK();qH()});var Dy=k(()=>{Cy()});function zK(Z){let{isDisabled:Q,onBlurWithin:J,onFocusWithin:q,onFocusWithinChange:G}=Z,U=GH.useRef({isFocusWithin:!1}),{addGlobalListener:K,removeAllGlobalListeners:H}=M9(),B=GH.useCallback((O)=>{if(!OQ(O.currentTarget,TZ(O)))return;if(U.current.isFocusWithin&&!OQ(O.currentTarget,O.relatedTarget)){if(U.current.isFocusWithin=!1,H(),J)J(O);if(G)G(!1)}},[J,G,U,H]),F=I3(B),M=GH.useCallback((O)=>{if(!OQ(O.currentTarget,TZ(O)))return;let V=TZ(O),A=XQ(V),N=PQ(A);if(!U.current.isFocusWithin&&N===V){if(q)q(O);if(G)G(!0);U.current.isFocusWithin=!0,F(O);let T=O.currentTarget;K(A,"focus",(P)=>{let C=TZ(P);if(U.current.isFocusWithin&&!OQ(T,C)){let y=new A.defaultView.FocusEvent("blur",{relatedTarget:C});A3(y,T);let f=n1(y);B(f)}},{capture:!0})}},[q,G,F,K,B]);if(Q)return{focusWithinProps:{onFocus:void 0,onBlur:void 0}};return{focusWithinProps:{onFocus:M,onBlur:B}}}var GH;var p3=k(()=>{s1();KX();HJ();JH();GH=S(JZ(),1)});function hY(Z={}){let{autoFocus:Q=!1,isTextInput:J,within:q}=Z,G=V9.useRef({isFocused:!1,isFocusVisible:Q||fG()}),[U,K]=V9.useState(!1),[H,B]=V9.useState(()=>G.current.isFocused&&G.current.isFocusVisible),F=V9.useCallback(()=>B(G.current.isFocused&&G.current.isFocusVisible),[]),M=V9.useCallback((A)=>{G.current.isFocused=A,G.current.isFocusVisible=fG(),K(A),F()},[F]);fS((A)=>{G.current.isFocusVisible=A,F()},[J,U],{enabled:U,isTextInput:J});let{focusProps:O}=oU({isDisabled:q,onFocusChange:M}),{focusWithinProps:V}=zK({isDisabled:!q,onFocusWithinChange:M});return{isFocused:U,isFocusVisible:H,focusProps:q?V:O}}var V9;var $y=k(()=>{K9();g3();p3();V9=S(JZ(),1)});var UK=k(()=>{$y()});function So(){DV=!0,setTimeout(()=>{DV=!1},500)}function Ey(Z){if(Z.pointerType==="touch")So()}function yo(){let Z=XQ(null);if(typeof Z>"u")return;if(d3===0){if(typeof PointerEvent<"u")Z.addEventListener("pointerup",Ey)}return d3++,()=>{if(d3--,d3>0)return;if(typeof PointerEvent<"u")Z.removeEventListener("pointerup",Ey)}}function BJ(Z){let{onHoverStart:Q,onHoverChange:J,onHoverEnd:q,isDisabled:G}=Z,[U,K]=gz.useState(!1),H=gz.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;gz.useEffect(yo,[]);let{addGlobalListener:B,removeAllGlobalListeners:F}=M9(),{hoverProps:M,triggerHoverEnd:O}=gz.useMemo(()=>{let V=(T,P)=>{if(H.pointerType=P,G||P==="touch"||H.isHovered||!OQ(T.currentTarget,TZ(T)))return;H.isHovered=!0;let C=T.currentTarget;if(H.target=C,B(XQ(TZ(T)),"pointerover",(y)=>{if(H.isHovered&&H.target&&!OQ(H.target,TZ(y)))A(y,y.pointerType)},{capture:!0}),Q)Q({type:"hoverstart",target:C,pointerType:P});if(J)J(!0);K(!0)},A=(T,P)=>{let C=H.target;if(H.pointerType="",H.target=null,P==="touch"||!H.isHovered||!C)return;if(H.isHovered=!1,F(),q)q({type:"hoverend",target:C,pointerType:P});if(J)J(!1);K(!1)},N={};if(typeof PointerEvent<"u")N.onPointerEnter=(T)=>{if(DV&&T.pointerType==="mouse")return;V(T,T.pointerType)},N.onPointerLeave=(T)=>{if(!G&&OQ(T.currentTarget,TZ(T)))A(T,T.pointerType)};return{hoverProps:N,triggerHoverEnd:A}},[Q,J,q,G,H,B,F]);return gz.useEffect(()=>{if(G)O({currentTarget:H.target},H.pointerType)},[G]),{hoverProps:M,isHovered:U}}var gz,DV=!1,d3=0;var l3=k(()=>{KX();HJ();JH();gz=S(JZ(),1)});var Z6=k(()=>{l3()});var $V=k(()=>{vY()});function xo(Z,Q){if(Q){for(let J in Z)if(J.startsWith("on")&&!wo.test(J))Z[J]=void 0;Z.href=void 0,Z.target=void 0}return Z}var hz,Q6,uz,wo;var i3=k(()=>{cJ();Wy();Fy();Dy();XK();lq();Uq();UK();Z6();$V();hz=S(JZ(),1),Q6=hz.createContext({}),uz=dq(function(Q,J){[Q,J]=JX(Q,J,Q6);let q=Q,{isPending:G}=q,{buttonProps:U,isPressed:K}=CV(Q,J);U=xo(U,G);let{focusProps:H,isFocused:B,isFocusVisible:F}=hY(Q),{hoverProps:M,isHovered:O}=BJ({...Q,isDisabled:Q.isDisabled||G}),V={isHovered:O,isPressed:(q.isPressed||K)&&!G,isFocused:B,isFocusVisible:F,isDisabled:Q.isDisabled||!1,isPending:G??!1},A=sQ({...Q,values:V,defaultClassName:"react-aria-Button"}),N=EX(U.id),T=EX(),P=U["aria-labelledby"];if(G){if(P)P=`${P} ${T}`;else if(U["aria-label"])P=`${N} ${T}`}let C=hz.useRef(G);hz.useEffect(()=>{let f={"aria-labelledby":P||N};if(!C.current&&B&&G)b3(f,"assertive");else if(C.current&&B&&!G)b3(f,"assertive");C.current=G},[G,B,P,N]);let y=FQ(Q,{global:!0});return delete y.onClick,hz.default.createElement(SQ.button,{...xZ(y,A,U,H,M),type:U.type==="submit"&&G?"button":U.type,id:N,ref:J,"aria-labelledby":P,slot:Q.slot||void 0,"aria-disabled":G?"true":U["aria-disabled"],"data-disabled":Q.isDisabled||void 0,"data-pressed":V.isPressed||void 0,"data-hovered":O||void 0,"data-focused":B||void 0,"data-pending":G||void 0,"data-focus-visible":F||void 0},hz.default.createElement(Hy.Provider,{value:{id:T}},A.children))}),wo=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/});var n3,ky;var Sy=k(()=>{n3=S(JZ(),1),ky=n3.createContext({})});var KK,A9,mG;var HK=k(()=>{cJ();KK=S(JZ(),1),A9=KK.createContext({}),mG=KK.forwardRef(function(Q,J){[Q,J]=JX(Q,J,A9);let{elementType:q="span",...G}=Q,U=SQ[q];return KK.default.createElement(U,{className:"react-aria-Text",...G,ref:J})})});function cG(Z,Q){if(!Z)return!1;let J=window.getComputedStyle(Z),q=document.scrollingElement||document.documentElement,G=/(auto|scroll)/.test(J.overflow+J.overflowX+J.overflowY);if(Z===q&&J.overflow!=="hidden")G=!0;if(G&&Q)G=Z.scrollHeight!==Z.clientHeight||Z.scrollWidth!==Z.clientWidth;return G}var zH=()=>{};function UH(Z,Q){let J=Z;if(cG(J,Q))J=J.parentElement;while(J&&!cG(J,Q))J=J.parentElement;return J||document.scrollingElement||document.documentElement}var EV=k(()=>{zH()});function s3(Z,Q){let J=[],q=document.scrollingElement||document.documentElement;while(Z){if(cG(Z,Q))J.push(Z);if(Z===q)break;Z=Z.parentElement}return J}var yy=k(()=>{zH()});function KH(Z,Q,J={}){let{block:q="nearest",inline:G="nearest"}=J;if(Z===Q)return;let{scrollTop:U,scrollLeft:K}=Z,H=Q.getBoundingClientRect(),B=Z.getBoundingClientRect(),F=window.getComputedStyle(Q),M=window.getComputedStyle(Z),O=document.scrollingElement||document.documentElement,V=Z===O,A=Z===O?0:B.top,N=Z===O?Z.clientHeight:B.bottom,T=Z===O?0:B.left,P=Z===O?Z.clientWidth:B.right,C=parseFloat(F.scrollMarginTop)||0,y=parseFloat(F.scrollMarginBottom)||0,f=parseFloat(F.scrollMarginLeft)||0,u=parseFloat(F.scrollMarginRight)||0,n=parseFloat(M.scrollPaddingTop)||0,e=parseFloat(M.scrollPaddingBottom)||0,a=parseFloat(M.scrollPaddingLeft)||0,c=parseFloat(M.scrollPaddingRight)||0,GZ=parseFloat(M.borderTopWidth)||0,s=parseFloat(M.borderBottomWidth)||0,LZ=parseFloat(M.borderLeftWidth)||0,HZ=parseFloat(M.borderRightWidth)||0,KZ=H.top-C,v=H.bottom+y,i=H.left-f,x=H.right+u,d=Z===O?0:LZ+HZ,YZ=Z===O?0:GZ+s,t=Z===O?0:Z.offsetWidth-Z.clientWidth-d,$=Z===O?0:Z.offsetHeight-Z.clientHeight-YZ,o=A+(V?0:GZ)+n,IZ=N-(V?0:s)-e-$,PZ=T+(V?0:LZ)+a,yZ=P-(V?0:HZ)-c;if(M.direction==="rtl"&&!pq())PZ+=t;else yZ-=t;let sZ=KZ<o||v>IZ,CZ=i<PZ||x>yZ;if(sZ&&q==="start")U+=KZ-o;else if(sZ&&q==="center")U+=(KZ+v)/2-(o+IZ)/2;else if(sZ&&q==="end")U+=v-IZ;else if(sZ&&q==="nearest"){let KQ=KZ-o,MZ=v-IZ;U+=Math.abs(KQ)<=Math.abs(MZ)?KQ:MZ}if(CZ&&G==="start")K+=i-PZ;else if(CZ&&G==="center")K+=(i+x)/2-(PZ+yZ)/2;else if(CZ&&G==="end")K+=x-yZ;else if(CZ&&G==="nearest"){let KQ=i-PZ,MZ=x-yZ;K+=Math.abs(KQ)<=Math.abs(MZ)?KQ:MZ}Z.scrollTo({left:K,top:U})}function kV(Z,Q={}){let{containingElement:J}=Q;if(Z&&Z.isConnected){let q=document.scrollingElement||document.documentElement;if(window.getComputedStyle(q).overflow!=="hidden"){let{left:U,top:K}=Z.getBoundingClientRect();Z?.scrollIntoView?.({block:"nearest"});let{left:H,top:B}=Z.getBoundingClientRect();if(Math.abs(U-H)>1||Math.abs(K-B)>1)J?.scrollIntoView?.({block:"center",inline:"center"}),Z.scrollIntoView?.({block:"nearest"})}else{let{left:U,top:K}=Z.getBoundingClientRect(),H=s3(Z,!0);for(let M of H)KH(M,Z);let{left:B,top:F}=Z.getBoundingClientRect();if(Math.abs(U-B)>1||Math.abs(K-F)>1){H=J?s3(J,!0):[];for(let M of H)KH(M,J,{block:"center",inline:"center"});for(let M of s3(Z,!0))KH(M,Z)}}}}var wy=k(()=>{yy();Kq()});function by(Z){let[Q,J]=xy.useState();return QQ(()=>{if(!Z)return;let q=SV.get(Z);if(!q){let G=`react-aria-description-${bo++}`;J(G);let U=document.createElement("div");U.id=G,U.style.display="none",U.textContent=Z,document.body.appendChild(U),q={refCount:0,element:U},SV.set(Z,q)}else J(q.element.id);return q.refCount++,()=>{if(q&&--q.refCount===0)q.element.remove(),SV.delete(Z)}},[Z]),{"aria-describedby":Z?Q:void 0}}var xy,bo=0,SV;var vy=k(()=>{UJ();xy=S(JZ(),1),SV=new Map});function vo(Z={}){let{style:Q,isFocusable:J}=Z,[q,G]=WK.useState(!1),{focusWithinProps:U}=zK({isDisabled:!J,onFocusWithinChange:(H)=>G(H)}),K=WK.useMemo(()=>{if(q)return Q;else if(Q)return{...gy,...Q};else return gy},[q]);return{visuallyHiddenProps:{...U,style:K}}}function hy(Z){let{children:Q,elementType:J="div",isFocusable:q,style:G,...U}=Z,{visuallyHiddenProps:K}=vo(Z);return WK.default.createElement(J,xZ(U,K),Q)}var WK,gy;var uy=k(()=>{KJ();p3();WK=S(JZ(),1),gy={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"}});var iq,HH,X6,go;var yV=k(()=>{cJ();HK();lq();iq=S(JZ(),1),HH=iq.createContext(null),X6=iq.forwardRef(function(Q,J){if(!iq.useContext(HH)?.isInvalid)return null;return iq.default.createElement(go,{...Q,ref:J})}),go=iq.forwardRef((Z,Q)=>{let J=iq.useContext(HH),{elementType:q,...G}=Z,U=FQ(G,{global:!0}),K=sQ({...G,defaultClassName:"react-aria-FieldError",defaultChildren:J.validationErrors.length===0?void 0:J.validationErrors.join(" "),values:J});if(K.children==null)return null;return iq.default.createElement(mG,{slot:"errorMessage",elementType:q,...U,...K,ref:Q})})});function gV(Z){if(Z[xV]){let{realtimeValidation:Q,displayValidation:J,updateValidation:q,resetValidation:G,commitValidation:U}=Z[xV];return{realtimeValidation:Q,displayValidation:J,updateValidation:q,resetValidation:G,commitValidation:U}}return ho(Z)}function ho(Z){let{isInvalid:Q,validationState:J,name:q,value:G,builtinValidation:U,validate:K,validationBehavior:H="aria"}=Z;if(J)Q||=J==="invalid";let B=Q!==void 0?{isInvalid:Q,validationErrors:[],validationDetails:my}:null,F=QJ.useMemo(()=>{if(!K||G==null)return null;let s=uo(K,G);return fy(s)},[K,G]);if(U?.validationDetails.valid)U=void 0;let M=QJ.useContext(cy),O=QJ.useMemo(()=>{if(q)return Array.isArray(q)?q.flatMap((s)=>bV(M[s])):bV(M[q]);return[]},[M,q]),[V,A]=QJ.useState(M),[N,T]=QJ.useState(!1);if(M!==V)A(M),T(!1);let P=QJ.useMemo(()=>fy(N?[]:O),[N,O]),C=QJ.useRef(BK),[y,f]=QJ.useState(BK),u=QJ.useRef(BK),n=()=>{if(!e)return;a(!1);let s=F||U||C.current;if(!wV(s,u.current))u.current=s,f(s)},[e,a]=QJ.useState(!1);return QJ.useEffect(n),{realtimeValidation:B||P||F||U||BK,displayValidation:H==="native"?B||P||y:B||P||F||U||y,updateValidation(s){if(H==="aria"&&!wV(y,s))f(s);else C.current=s},resetValidation(){let s=BK;if(!wV(s,u.current))u.current=s,f(s);if(H==="native")a(!1);T(!0)},commitValidation(){if(H==="native")a(!0);T(!0)}}}function bV(Z){if(!Z)return[];return Array.isArray(Z)?Z:[Z]}function uo(Z,Q){if(typeof Z==="function"){let J=Z(Q);if(J&&typeof J!=="boolean")return bV(J)}return[]}function fy(Z){return Z.length?{isInvalid:!0,validationErrors:Z,validationDetails:my}:null}function wV(Z,Q){if(Z===Q)return!0;return!!Z&&!!Q&&Z.isInvalid===Q.isInvalid&&Z.validationErrors.length===Q.validationErrors.length&&Z.validationErrors.every((J,q)=>J===Q.validationErrors[q])&&Object.entries(Z.validationDetails).every(([J,q])=>Q.validationDetails[J]===q)}var QJ,vV,my,BK,cy,xV="__reactAriaFormValidationState";var py=k(()=>{QJ=S(JZ(),1),vV={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},my={...vV,customError:!0,valid:!1},BK={isInvalid:!1,validationDetails:vV,validationErrors:[]},cy=QJ.createContext({})});var dy=k(()=>{py()});var a3,ly;var iy=k(()=>{a3=S(JZ(),1),ly=a3.createContext(null)});function ny(Z){let{description:Q,errorMessage:J,isInvalid:q,validationState:G}=Z,{labelProps:U,fieldProps:K}=Uy(Z),H=zq([Boolean(Q),Boolean(J),q,G]),B=zq([Boolean(Q),Boolean(J),q,G]);return K=xZ(K,{"aria-describedby":[H,B,Z["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:U,fieldProps:K,descriptionProps:{id:H},errorMessageProps:{id:B}}}var sy=k(()=>{Ky();KJ();vY()});function ry(Z,Q,J){let q=WJ((G)=>{if(J&&!G.defaultPrevented)J(Q)});ay.useEffect(()=>{let G=Z?.current?.form;return G?.addEventListener("reset",q),()=>{G?.removeEventListener("reset",q)}},[Z])}var ay;var oy=k(()=>{nU();ay=S(JZ(),1)});function ty(Z,Q,J){let{validationBehavior:q,focus:G}=Z;QQ(()=>{if(q==="native"&&J?.current&&!J.current.disabled){let F=Q.realtimeValidation.isInvalid?Q.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";if(J.current.setCustomValidity(F),!J.current.hasAttribute("title"))J.current.title="";if(!Q.realtimeValidation.isInvalid)Q.updateValidation(mo(J.current))}});let U=r3.useRef(!1),K=WJ(()=>{if(!U.current)Q.resetValidation()}),H=WJ((F)=>{if(!Q.displayValidation.isInvalid)Q.commitValidation();let M=J?.current?.form;if(!F.defaultPrevented&&J&&M&&co(M)===J.current){if(G)G();else J.current?.focus();t1("keyboard")}F.preventDefault()}),B=WJ(()=>{Q.commitValidation()});r3.useEffect(()=>{let F=J?.current;if(!F)return;let M=F.form,O=M?.reset;if(M)M.reset=()=>{U.current=!window.event||window.event.type==="message"&&TZ(window.event)instanceof MessagePort,O?.call(M),U.current=!1};return F.addEventListener("invalid",H),F.addEventListener("change",B),M?.addEventListener("reset",K),()=>{if(F.removeEventListener("invalid",H),F.removeEventListener("change",B),M?.removeEventListener("reset",K),M)M.reset=O}},[J,q])}function fo(Z){let Q=Z.validity;return{badInput:Q.badInput,customError:Q.customError,patternMismatch:Q.patternMismatch,rangeOverflow:Q.rangeOverflow,rangeUnderflow:Q.rangeUnderflow,stepMismatch:Q.stepMismatch,tooLong:Q.tooLong,tooShort:Q.tooShort,typeMismatch:Q.typeMismatch,valueMissing:Q.valueMissing,valid:Q.valid}}function mo(Z){return{isInvalid:!Z.validity.valid,validationDetails:fo(Z),validationErrors:Z.validationMessage?[Z.validationMessage]:[]}}function co(Z){for(let Q=0;Q<Z.elements.length;Q++){let J=Z.elements[Q];if(J.validity?.valid===!1)return J}return null}var r3;var ey=k(()=>{KX();K9();nU();UJ();r3=S(JZ(),1)});var o3,Zw;var Qw=k(()=>{o3=S(JZ(),1),Zw=o3.createContext({})});var t3,e3,po=(Z)=>{let{onHoverStart:Q,onHoverChange:J,onHoverEnd:q,...G}=Z;return G},J6;var hV=k(()=>{cJ();XK();Uq();UK();Z6();t3=S(JZ(),1),e3=t3.createContext({}),J6=dq(function(Q,J){[Q,J]=JX(Q,J,e3);let{hoverProps:q,isHovered:G}=BJ({...Q,isDisabled:Q.disabled}),{isFocused:U,isFocusVisible:K,focusProps:H}=hY({isTextInput:!0,autoFocus:Q.autoFocus}),B=!!Q["aria-invalid"]&&Q["aria-invalid"]!=="false",F=sQ({...Q,values:{isHovered:G,isFocused:U,isFocusVisible:K,isDisabled:Q.disabled||!1,isInvalid:B},defaultClassName:"react-aria-Input"});return t3.default.createElement(SQ.input,{...xZ(po(Q),H,q),...F,ref:J,"data-focused":U||void 0,"data-disabled":Q.disabled||void 0,"data-hovered":G||void 0,"data-focus-visible":K||void 0,"data-invalid":B||void 0})})});class uY{constructor(Z){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=Z}get childNodes(){throw Error("childNodes is not supported")}clone(){let Z=new this.constructor(this.key);return Z.value=this.value,Z.level=this.level,Z.hasChildNodes=this.hasChildNodes,Z.rendered=this.rendered,Z.textValue=this.textValue,Z["aria-label"]=this["aria-label"],Z.index=this.index,Z.parentKey=this.parentKey,Z.prevKey=this.prevKey,Z.nextKey=this.nextKey,Z.firstChildKey=this.firstChildKey,Z.lastChildKey=this.lastChildKey,Z.props=this.props,Z.render=this.render,Z.colSpan=this.colSpan,Z.colIndex=this.colIndex,Z}filter(Z,Q,J){let q=this.clone();return Q.addDescendants(q,Z),q}}function lo(Z,Q,J,q){if(J==null)return[null,null];let G=null,U=null,K=Z.getItem(J);while(K!=null){let H=K.filter(Z,Q,q);if(H!=null){if(H.nextKey=null,U)H.prevKey=U.key,U.nextKey=H.key;if(G==null)G=H;Q.addNode(H),U=H}K=K.nextKey!=null?Z.getItem(K.nextKey):null}if(U&&U.type==="separator"){let H=U.prevKey;if(Q.removeNode(U.key),H!=null)U=Q.getItem(H),U.nextKey=null;else U=null}return[G?.key??null,U?.key??null]}var Z2,Xw,Q2,_K,X2;var uV=k(()=>{Z2=class Z2 extends uY{filter(Z,Q,J){let[q,G]=lo(Z,Q,this.firstChildKey,J),U=this.clone();return U.firstChildKey=q,U.lastChildKey=G,U}};Xw=class Xw extends uY{static{this.type="header"}};Q2=class Q2 extends uY{static{this.type="loader"}};_K=class _K extends Z2{static{this.type="item"}filter(Z,Q,J){if(J(this.textValue,this)){let q=this.clone();return Q.addDescendants(q,Z),q}return null}};X2=class X2 extends Z2{static{this.type="section"}filter(Z,Q,J){let q=super.filter(Z,Q,J);if(q){if(q.lastChildKey!==null){let G=Z.getItem(q.lastChildKey);if(G&&G.type!=="header")return q}}return null}}});function WH(Z){let{children:Q,items:J,idScope:q,addIdAndValue:G,dependencies:U=[]}=Z,K=FK.useMemo(()=>typeof Q==="function"?Q.toString():void 0,[Q]),H=FK.useMemo(()=>new WeakMap,[...U,K]);return FK.useMemo(()=>{if(J&&typeof Q==="function"){let B=[];for(let F of J){let M=io(F)?F:null,O=M?H.get(M):null;if(!O){O=Q(F);let V=O.props.id??F?.key??F?.id;if(q!=null&&O.props.id==null&&V!=null)V=q+":"+V;let A=V??B.length;if(O=FK.cloneElement(O,G?{key:A,id:V,value:F}:{key:A}),M)H.set(M,O)}B.push(O)}return B}else if(typeof Q!=="function")return Q},[Q,J,H,q,G])}function io(Z){switch(typeof Z){case"object":return Z!=null;case"function":case"symbol":return!0;default:return!1}}var FK;var fV=k(()=>{FK=S(JZ(),1)});var LK=bG((no)=>{var fY=S(JZ());(function(){function Z(V,A){return V===A&&(V!==0||1/V===1/A)||V!==V&&A!==A}function Q(V,A){F||fY.startTransition===void 0||(F=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var N=A();if(!M){var T=A();G(N,T)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),M=!0)}T=U({inst:{value:N,getSnapshot:A}});var P=T[0].inst,C=T[1];return H(function(){P.value=N,P.getSnapshot=A,J(P)&&C({inst:P})},[V,N,A]),K(function(){return J(P)&&C({inst:P}),V(function(){J(P)&&C({inst:P})})},[V]),B(N),N}function J(V){var A=V.getSnapshot;V=V.value;try{var N=A();return!G(V,N)}catch(T){return!0}}function q(V,A){return A()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var G=typeof Object.is==="function"?Object.is:Z,U=fY.useState,K=fY.useEffect,H=fY.useLayoutEffect,B=fY.useDebugValue,F=!1,M=!1,O=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?q:Q;no.useSyncExternalStore=fY.useSyncExternalStore!==void 0?fY.useSyncExternalStore:O,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});function ao(Z,Q,J){let q=fJ(),G=DQ.useRef(q);G.current=q;let U=DQ.useCallback(()=>{return G.current?J():Q()},[Q,J]);return qw.useSyncExternalStore(Z,U)}function ro(Z){return class extends uY{static{this.type=Z}}}function oo(Z,Q,J,q,G,U){if(typeof Z==="string")Z=ro(Z);let K=DQ.useCallback((B)=>{B?.setProps(Q,J,Z,q,U)},[Q,J,q,U,Z]),H=DQ.useContext(cV);if(H){let B=H.ownerDocument.nodesByProps.get(Q);if(!B)B=H.ownerDocument.createElement(Z.type),B.setProps(Q,J,Z,q,U),H.appendChild(B),H.ownerDocument.updateCollection(),H.ownerDocument.nodesByProps.set(Q,B);return G?DQ.default.createElement(cV.Provider,{value:B},G):null}return DQ.default.createElement(Z.type,{ref:K},G)}function pG(Z,Q){let J=({node:G})=>Q(G.props,G.props.ref,G),q=DQ.forwardRef((G,U)=>{let K=DQ.useContext(f3);if(!DQ.useContext(Gw)){if(Q.length>=3)throw Error(Q.name+" cannot be rendered outside a collection.");return Q(G,U)}return oo(Z,G,U,"children"in G?G.children:null,null,(B)=>DQ.default.createElement(f3.Provider,{value:K},DQ.default.createElement(J,{node:B})))});return q.displayName=Q.name,q}function to(Z){return WH({...Z,addIdAndValue:!0})}function pV(Z){let Q=DQ.useContext(Jw),J=(Q?.dependencies||[]).concat(Z.dependencies),q=Z.idScope??Q?.idScope,G=to({...Z,idScope:q,dependencies:J});if(DQ.useContext(mV))G=DQ.default.createElement(eo,null,G);return Q=DQ.useMemo(()=>({dependencies:J,idScope:q}),[q,...J]),DQ.default.createElement(Jw.Provider,{value:Q},G)}function eo({children:Z}){let Q=DQ.useContext(mV),J=DQ.useMemo(()=>DQ.default.createElement(mV.Provider,{value:null},DQ.default.createElement(Gw.Provider,{value:!0},Z)),[Z]);return fJ()?DQ.default.createElement(cV.Provider,{value:Q},J):Yw.createPortal(J,Q)}var Yw,DQ,qw,Gw,mV,UHZ,cV,Jw;var dV=k(()=>{uV();fV();qK();G9();Yw=S(uJ(),1),DQ=S(JZ(),1),qw=S(LK(),1),Gw=DQ.createContext(!1),mV=DQ.createContext(null);UHZ=typeof DQ.default.useSyncExternalStore==="function"?DQ.default.useSyncExternalStore:ao,cV=DQ.createContext(null);Jw=DQ.createContext(null)});var BH=k(()=>{dV()});var Uw=k(()=>{fV()});function Kw(Z,Q,J){return WH({items:Q?Z.getChildren(Q.key):Z,dependencies:[J],children(q){if(q.type==="content")return zY.default.createElement(zY.default.Fragment,null);let G=q.render(q);if(!J||q.type!=="item")return G;return zY.default.createElement(zY.default.Fragment,null,J({type:"item",key:q.key,dropPosition:"before"}),G,Zt(Z,q,J))}})}function Zt(Z,Q,J){let q=Q.key,G=Z.getKeyAfter(q),U=G!=null?Z.getItem(G):null;while(U!=null&&U.type!=="item")G=Z.getKeyAfter(U.key),U=G!=null?Z.getItem(G):null;let K=Q.nextKey!=null?Z.getItem(Q.nextKey):null;while(K!=null&&K.type!=="item")K=K.nextKey!=null?Z.getItem(K.nextKey):null;let H=[];if(K==null){let B=Q;while(B?.type==="item"&&(!U||B.parentKey!==U.parentKey&&U.level<B.level)){let F=J({type:"item",key:B.key,dropPosition:"after"});if(zY.isValidElement(F))H.push(zY.cloneElement(F,{key:`${B.key}-after`}));B=B.parentKey!=null?Z.getItem(B.parentKey):null}}return H}function nV(Z){return zY.useMemo(()=>Z!=null?new Set([Z]):null,[Z])}var zY,iV,_H;var sV=k(()=>{Uw();zY=S(JZ(),1),iV={CollectionRoot({collection:Z,renderDropIndicator:Q}){return Kw(Z,null,Q)},CollectionBranch({collection:Z,parent:Q,renderDropIndicator:J}){return Kw(Z,Q,J)}};_H=zY.createContext(iV)});var Y6,Hw;var Ww=k(()=>{Y6=S(JZ(),1),Hw=Y6.createContext({})});var FH=k(()=>{uV()});function Bw(Z){let Q=fz.useRef({});return fz.default.createElement(Xt.Provider,{value:Q},Z.children)}var Qt,fz,Xt;var _w=k(()=>{Qt=S(uJ(),1),fz=S(JZ(),1),Xt=fz.createContext(null)});var J2,MK;var Y2=k(()=>{J2=S(JZ(),1),MK=J2.createContext({isSelected:!1})});function aV(Z){let Q=FQ(Z,{labelable:!0}),J;if(Z.orientation==="vertical")J="vertical";if(Z.elementType!=="hr")return{separatorProps:{...Q,role:"separator","aria-orientation":J}};return{separatorProps:Q}}var Fw=k(()=>{bz()});var Lw=k(()=>{Fw()});var q2,Mw,Ow,rV;var Vw=k(()=>{cJ();Lw();FH();BH();lq();Uq();q2=S(JZ(),1),Mw=q2.createContext({});Ow=class Ow extends uY{static{this.type="separator"}filter(Z,Q){let J=Q.getItem(this.prevKey);if(J&&J.type!=="separator"){let q=this.clone();return Q.addDescendants(q,Z),q}return null}};rV=pG(Ow,function(Q,J){[Q,J]=JX(Q,J,Mw);let{elementType:q,orientation:G,style:U,className:K,slot:H,...B}=Q,F=q||"hr";if(F==="hr"&&G==="vertical")F="div";let M=SQ[F],{separatorProps:O}=aV({...B,elementType:q,orientation:G}),V=FQ(Q,{global:!0});return q2.default.createElement(M,{render:Q.render,...xZ(V,O),style:U,className:K??"react-aria-Separator",ref:J,slot:H||void 0})})});function Jt(Z){if(typeof Z==="string")return Z.replace(/\s*/g,"");return""+Z}function Aw(Z,Q){let J=oV.get(Z);if(!J)throw Error("Unknown list");return`${J.id}-option-${Jt(Q)}`}var oV;var Iw=k(()=>{oV=new WeakMap});class Nw{constructor(Z,Q,J,q){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=(U)=>{if(U.nodeType===Node.ELEMENT_NODE){let K=U.shadowRoot;if(K){let H=this._doc.createTreeWalker(K,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(H),NodeFilter.FILTER_ACCEPT}else if(typeof this.filter==="function")return this.filter(U);else if(this.filter?.acceptNode)return this.filter.acceptNode(U);else if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=Z,this.root=Q,this.filter=q??null,this.whatToShow=J??NodeFilter.SHOW_ALL,this._currentNode=Q,this._walkerStack.unshift(Z.createTreeWalker(Q,J,this._acceptNode));let G=Q.shadowRoot;if(G){let U=this._doc.createTreeWalker(G,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(U)}}get currentNode(){return this._currentNode}set currentNode(Z){if(!OQ(this.root,Z))throw Error("Cannot set currentNode to a node that is not contained by the root node.");let Q=[],J=Z,q=Z;this._currentNode=Z;while(J&&J!==this.root)if(J.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let U=J,K=this._doc.createTreeWalker(U,this.whatToShow,{acceptNode:this._acceptNode});Q.push(K),K.currentNode=q,this._currentSetFor.add(K),J=q=U.host}else J=J.parentNode;let G=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});Q.push(G),G.currentNode=q,this._currentSetFor.add(G),this._walkerStack=Q}get doc(){return this._doc}firstChild(){let Z=this.currentNode,Q=this.nextNode();if(!OQ(Z,Q))return this.currentNode=Z,null;if(Q)this.currentNode=Q;return Q}lastChild(){let Q=this._walkerStack[0].lastChild();if(Q)this.currentNode=Q;return Q}nextNode(){let Z=this._walkerStack[0].nextNode();if(Z){if(Z.shadowRoot){let J;if(typeof this.filter==="function")J=this.filter(Z);else if(this.filter?.acceptNode)J=this.filter.acceptNode(Z);if(J===NodeFilter.FILTER_ACCEPT)return this.currentNode=Z,Z;let q=this.nextNode();if(q)this.currentNode=q;return q}if(Z)this.currentNode=Z;return Z}else if(this._walkerStack.length>1){this._walkerStack.shift();let Q=this.nextNode();if(Q)this.currentNode=Q;return Q}else return null}previousNode(){let Z=this._walkerStack[0];if(Z.currentNode===Z.root){if(this._currentSetFor.has(Z))if(this._currentSetFor.delete(Z),this._walkerStack.length>1){this._walkerStack.shift();let J=this.previousNode();if(J)this.currentNode=J;return J}else return null;return null}let Q=Z.previousNode();if(Q){if(Q.shadowRoot){let q;if(typeof this.filter==="function")q=this.filter(Q);else if(this.filter?.acceptNode)q=this.filter.acceptNode(Q);if(q===NodeFilter.FILTER_ACCEPT){if(Q)this.currentNode=Q;return Q}let G=this.lastChild();if(G)this.currentNode=G;return G}if(Q)this.currentNode=Q;return Q}else if(this._walkerStack.length>1){this._walkerStack.shift();let J=this.previousNode();if(J)this.currentNode=J;return J}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function G2(Z,Q,J,q){if(gY())return new Nw(Z,Q,J,q);return Z.createTreeWalker(Q,J,q)}var tV=k(()=>{KX();W3()});function Rw(Z){let{children:Q,contain:J,restoreFocus:q,autoFocus:G}=Z,U=VX.useRef(null),K=VX.useRef(null),H=VX.useRef([]),{parentNode:B}=VX.useContext(jw)||{},F=VX.useMemo(()=>new U2({scopeRef:H}),[H]);QQ(()=>{let V=B||fX.root;if(fX.getTreeNode(V.scopeRef)&&tQ&&!z2(tQ,V.scopeRef)){let A=fX.getTreeNode(tQ);if(A)V=A}V.addChild(F),fX.addNode(F)},[F,B]),QQ(()=>{let V=fX.getTreeNode(H);if(V)V.contain=!!J},[J]),QQ(()=>{let V=U.current?.nextSibling,A=[],N=(T)=>T.stopPropagation();while(V&&V!==K.current)A.push(V),V.addEventListener(eV,N),V=V.nextSibling;return H.current=A,()=>{for(let T of A)T.removeEventListener(eV,N)}},[Q]),Kt(H,q,J),zt(H,J),Ht(H,q,J),Ut(H,G),VX.useEffect(()=>{let V=PQ(XQ(H.current?H.current[0]:void 0)),A=null;if(_q(V,H.current)){for(let N of fX.traverse())if(N.scopeRef&&_q(V,N.scopeRef.current))A=N;if(A===fX.getTreeNode(H))tQ=A.scopeRef}},[H]),QQ(()=>{return()=>{let V=fX.getTreeNode(H)?.parent?.scopeRef??null;if((H===tQ||z2(H,tQ))&&(!V||fX.getTreeNode(V)))tQ=V;fX.removeTreeNode(H)}},[H]);let M=VX.useMemo(()=>Yt(H),[]),O=VX.useMemo(()=>({focusManager:M,parentNode:F}),[F,M]);return VX.default.createElement(jw.Provider,{value:O},VX.default.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:U}),Q,VX.default.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:K}))}function Yt(Z){return{focusNext(Q={}){let J=Z.current,{from:q,tabbable:G,wrap:U,accept:K}=Q,H=q||PQ(XQ(J[0]??void 0)),B=J[0].previousElementSibling,F=q6(J),M=Bq(F,{tabbable:G,accept:K},J);M.currentNode=_q(H,J)?H:B;let O=M.nextNode();if(!O&&U)M.currentNode=B,O=M.nextNode();if(O)mz(O,!0);return O},focusPrevious(Q={}){let J=Z.current,{from:q,tabbable:G,wrap:U,accept:K}=Q,H=q||PQ(XQ(J[0]??void 0)),B=J[J.length-1].nextElementSibling,F=q6(J),M=Bq(F,{tabbable:G,accept:K},J);M.currentNode=_q(H,J)?H:B;let O=M.previousNode();if(!O&&U)M.currentNode=B,O=M.previousNode();if(O)mz(O,!0);return O},focusFirst(Q={}){let J=Z.current,{tabbable:q,accept:G}=Q,U=q6(J),K=Bq(U,{tabbable:q,accept:G},J);K.currentNode=J[0].previousElementSibling;let H=K.nextNode();if(H)mz(H,!0);return H},focusLast(Q={}){let J=Z.current,{tabbable:q,accept:G}=Q,U=q6(J),K=Bq(U,{tabbable:q,accept:G},J);K.currentNode=J[J.length-1].nextElementSibling;let H=K.previousNode();if(H)mz(H,!0);return H}}}function q6(Z){return Z[0].parentElement}function LH(Z){let Q=fX.getTreeNode(tQ);while(Q&&Q.scopeRef!==Z){if(Q.contain)return!1;Q=Q.parent}return!0}function qt(Z){if(!Z.form)return Array.from(XQ(Z).querySelectorAll(`input[type="radio"][name="${CSS.escape(Z.name)}"]`)).filter((q)=>!q.form);let Q=Z.form.elements.namedItem(Z.name),J=BX(Z);if(Q instanceof J.RadioNodeList)return Array.from(Q).filter((q)=>q instanceof J.HTMLInputElement);if(Q instanceof J.HTMLInputElement)return[Q];return[]}function Gt(Z){if(Z.checked)return!0;let Q=qt(Z);return Q.length>0&&!Q.some((J)=>J.checked)}function zt(Z,Q){let J=VX.useRef(void 0),q=VX.useRef(void 0);QQ(()=>{let G=Z.current;if(!Q){if(q.current)cancelAnimationFrame(q.current),q.current=void 0;return}let U=XQ(G?G[0]:void 0),K=(F)=>{if(F.key!=="Tab"||F.altKey||F.ctrlKey||F.metaKey||!LH(Z)||F.isComposing)return;let M=PQ(U),O=Z.current;if(!O||!_q(M,O))return;let V=q6(O),A=Bq(V,{tabbable:!0},O);if(!M)return;A.currentNode=M;let N=F.shiftKey?A.previousNode():A.nextNode();if(!N)A.currentNode=F.shiftKey?O[O.length-1].nextElementSibling:O[0].previousElementSibling,N=F.shiftKey?A.previousNode():A.nextNode();if(F.preventDefault(),N){if(mz(N,!0),N instanceof BX(N).HTMLInputElement)N.select()}},H=(F)=>{if((!tQ||z2(tQ,Z))&&_q(TZ(F),Z.current))tQ=Z,J.current=TZ(F);else if(LH(Z)&&!I9(TZ(F),Z)){if(J.current)J.current.focus();else if(tQ&&tQ.current)ZA(tQ.current)}else if(LH(Z))J.current=TZ(F)},B=(F)=>{if(q.current)cancelAnimationFrame(q.current);q.current=requestAnimationFrame(()=>{let M=lU(),O=(M==="virtual"||M===null)&&a1()&&qV(),V=PQ(U);if(!O&&V&&LH(Z)&&!I9(V,Z)){tQ=Z;let A=TZ(F);if(A&&A.isConnected)J.current=A,J.current?.focus();else if(tQ.current)ZA(tQ.current)}})};return U.addEventListener("keydown",K,!1),U.addEventListener("focusin",H,!1),G?.forEach((F)=>F.addEventListener("focusin",H,!1)),G?.forEach((F)=>F.addEventListener("focusout",B,!1)),()=>{U.removeEventListener("keydown",K,!1),U.removeEventListener("focusin",H,!1),G?.forEach((F)=>F.removeEventListener("focusin",H,!1)),G?.forEach((F)=>F.removeEventListener("focusout",B,!1))}},[Z,Q]),QQ(()=>{return()=>{if(q.current)cancelAnimationFrame(q.current)}},[q])}function Cw(Z){return I9(Z)}function _q(Z,Q){if(!Z)return!1;if(!Q)return!1;return Q.some((J)=>OQ(J,Z))}function I9(Z,Q=null){if(Z instanceof Element&&Z.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:J}of fX.traverse(fX.getTreeNode(Q)))if(J&&_q(Z,J.current))return!0;return!1}function Dw(Z){return I9(Z,tQ)}function z2(Z,Q){let J=fX.getTreeNode(Q)?.parent;while(J){if(J.scopeRef===Z)return!0;J=J.parent}return!1}function mz(Z,Q=!1){if(Z!=null&&!Q)try{Wq(Z)}catch{}else if(Z!=null)try{Z.focus()}catch{}}function $w(Z,Q=!0){let J=Z[0].previousElementSibling,q=q6(Z),G=Bq(q,{tabbable:Q},Z);G.currentNode=J;let U=G.nextNode();if(Q&&!U)q=q6(Z),G=Bq(q,{tabbable:!1},Z),G.currentNode=J,U=G.nextNode();return U}function ZA(Z,Q=!0){mz($w(Z,Q))}function Ut(Z,Q){let J=VX.default.useRef(Q);VX.useEffect(()=>{if(J.current){tQ=Z;let q=XQ(Z.current?Z.current[0]:void 0);if(!_q(PQ(q),tQ.current)&&Z.current)ZA(Z.current)}J.current=!1},[Z])}function Kt(Z,Q,J){QQ(()=>{if(Q||J)return;let q=Z.current,G=XQ(q?q[0]:void 0),U=(K)=>{let H=TZ(K);if(_q(H,Z.current))tQ=Z;else if(!Cw(H))tQ=null};return G.addEventListener("focusin",U,!1),q?.forEach((K)=>K.addEventListener("focusin",U,!1)),()=>{G.removeEventListener("focusin",U,!1),q?.forEach((K)=>K.removeEventListener("focusin",U,!1))}},[Z,Q,J])}function Tw(Z){let Q=fX.getTreeNode(tQ);while(Q&&Q.scopeRef!==Z){if(Q.nodeToRestore)return!1;Q=Q.parent}return Q?.scopeRef===Z}function Ht(Z,Q,J){let q=VX.useRef(typeof document<"u"?PQ(XQ(Z.current?Z.current[0]:void 0)):null);QQ(()=>{let G=Z.current,U=XQ(G?G[0]:void 0);if(!Q||J)return;let K=()=>{if((!tQ||z2(tQ,Z))&&_q(PQ(U),Z.current))tQ=Z};return U.addEventListener("focusin",K,!1),G?.forEach((H)=>H.addEventListener("focusin",K,!1)),()=>{U.removeEventListener("focusin",K,!1),G?.forEach((H)=>H.removeEventListener("focusin",K,!1))}},[Z,J]),QQ(()=>{let G=XQ(Z.current?Z.current[0]:void 0);if(!Q)return;let U=(K)=>{if(K.key!=="Tab"||K.altKey||K.ctrlKey||K.metaKey||!LH(Z)||K.isComposing)return;let H=G.activeElement;if(!I9(H,Z)||!Tw(Z))return;let B=fX.getTreeNode(Z);if(!B)return;let F=B.nodeToRestore,M=Bq(G.body,{tabbable:!0});M.currentNode=H;let O=K.shiftKey?M.previousNode():M.nextNode();if(!F||!F.isConnected||F===G.body)F=void 0,B.nodeToRestore=void 0;if((!O||!I9(O,Z))&&F){M.currentNode=F;do O=K.shiftKey?M.previousNode():M.nextNode();while(I9(O,Z));if(K.preventDefault(),K.stopPropagation(),O)mz(O,!0);else if(!Cw(F))H.blur();else mz(F,!0)}};if(!J)G.addEventListener("keydown",U,!0);return()=>{if(!J)G.removeEventListener("keydown",U,!0)}},[Z,Q,J]),QQ(()=>{let G=XQ(Z.current?Z.current[0]:void 0);if(!Q)return;let U=fX.getTreeNode(Z);if(!U)return;return U.nodeToRestore=q.current??void 0,()=>{let K=fX.getTreeNode(Z);if(!K)return;let H=K.nodeToRestore,B=PQ(G);if(Q&&H&&(B&&I9(B,Z)||B===G.body&&Tw(Z))){let F=fX.clone();requestAnimationFrame(()=>{if(G.activeElement===G.body){let M=F.getTreeNode(Z);while(M){if(M.nodeToRestore&&M.nodeToRestore.isConnected){Pw(M.nodeToRestore);return}M=M.parent}M=F.getTreeNode(Z);while(M){if(M.scopeRef&&M.scopeRef.current&&fX.getTreeNode(M.scopeRef)){let O=$w(M.scopeRef.current,!0);Pw(O);return}M=M.parent}}})}}},[Z,Q])}function Pw(Z){if(Z.dispatchEvent(new CustomEvent(eV,{bubbles:!0,cancelable:!0})))mz(Z)}function Bq(Z,Q,J){let q=Q?.tabbable?M3:L3,G=Z?.nodeType===Node.ELEMENT_NODE?Z:null,U=XQ(G),K=G2(U,Z||U,NodeFilter.SHOW_ELEMENT,{acceptNode(H){if(OQ(Q?.from,H))return NodeFilter.FILTER_REJECT;if(Q?.tabbable&&H.tagName==="INPUT"&&H.getAttribute("type")==="radio"){if(!Gt(H))return NodeFilter.FILTER_REJECT;if(K.currentNode.tagName==="INPUT"&&K.currentNode.type==="radio"&&K.currentNode.name===H.name)return NodeFilter.FILTER_REJECT}if(q(H)&&(!J||_q(H,J))&&(!Q?.accept||Q.accept(H)))return NodeFilter.FILTER_ACCEPT;return NodeFilter.FILTER_SKIP}});if(Q?.from)K.currentNode=Q.from;return K}class QA{constructor(){this.fastMap=new Map,this.root=new U2({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(Z){return this.fastMap.get(Z)}addTreeNode(Z,Q,J){let q=this.fastMap.get(Q??null);if(!q)return;let G=new U2({scopeRef:Z});if(q.addChild(G),G.parent=q,this.fastMap.set(Z,G),J)G.nodeToRestore=J}addNode(Z){this.fastMap.set(Z.scopeRef,Z)}removeTreeNode(Z){if(Z===null)return;let Q=this.fastMap.get(Z);if(!Q)return;let J=Q.parent;for(let G of this.traverse())if(G!==Q&&Q.nodeToRestore&&G.nodeToRestore&&Q.scopeRef&&Q.scopeRef.current&&_q(G.nodeToRestore,Q.scopeRef.current))G.nodeToRestore=Q.nodeToRestore;let q=Q.children;if(J){if(J.removeChild(Q),q.size>0)q.forEach((G)=>J&&J.addChild(G))}this.fastMap.delete(Q.scopeRef)}*traverse(Z=this.root){if(Z.scopeRef!=null)yield Z;if(Z.children.size>0)for(let Q of Z.children)yield*this.traverse(Q)}clone(){let Z=new QA;for(let Q of this.traverse())Z.addTreeNode(Q.scopeRef,Q.parent?.scopeRef??null,Q.nodeToRestore);return Z}}class U2{constructor(Z){this.children=new Set,this.contain=!1,this.scopeRef=Z.scopeRef}addChild(Z){this.children.add(Z),Z.parent=this}removeChild(Z){this.children.delete(Z),Z.parent=void 0}}var VX,jw,eV="react-aria-focus-scope-restore",tQ=null,fX;var MH=k(()=>{tV();YK();KX();K9();HJ();Kq();O3();UJ();VX=S(JZ(),1),jw=VX.default.createContext(null);fX=new QA});function OH(Z){return SS()?Z.altKey:Z.ctrlKey}function K2(Z,Q){let J=`[data-key="${CSS.escape(String(Q))}"]`,q=Z.current?.dataset.collection;if(q)J=`[data-collection="${CSS.escape(q)}"]${J}`;return Z.current?.querySelector(J)}function kw(Z){let Q=EX();return Ew.set(Z,Q),Q}function Sw(Z){return Ew.get(Z)}var Ew;var XA=k(()=>{Kq();vY();Ew=new WeakMap});function ww(Z){let{keyboardDelegate:Q,selectionManager:J,onTypeSelect:q}=Z,G=yw.useRef({search:"",timeout:void 0}).current,U=(K)=>{let H=Bt(K.key);if(!H||K.ctrlKey||K.metaKey||!OQ(K.currentTarget,TZ(K))||G.search.length===0&&H===" ")return;if(H===" "&&G.search.trim().length>0){if(K.preventDefault(),!("continuePropagation"in K))K.stopPropagation()}if(G.search+=H,Q.getKeyForSearch!=null){let B=Q.getKeyForSearch(G.search,J.focusedKey);if(B==null)B=Q.getKeyForSearch(G.search);if(B!=null){if(J.setFocusedKey(B),q)q(B)}}clearTimeout(G.timeout),G.timeout=setTimeout(()=>{G.search=""},Wt)};return{typeSelectProps:{onKeyDownCapture:Q.getKeyForSearch?U:void 0}}}function Bt(Z){if(Z.length===1||!/^[A-Z]/i.test(Z))return Z;return""}var yw,Wt=1000;var xw=k(()=>{KX();yw=S(JZ(),1)});function YA(Z,Q){let J=JA.useRef(!0),q=JA.useRef(null);QQ(()=>{return J.current=!0,()=>{J.current=!1}},[]),QQ(()=>{if(J.current)J.current=!1;else if(!q.current||Q.some((G,U)=>!Object.is(G,q[U])))Z();q.current=Q},Q)}var JA;var bw=k(()=>{UJ();JA=S(JZ(),1)});function gw(Z){let{selectionManager:Q,keyboardDelegate:J,ref:q,autoFocus:G=!1,shouldFocusWrap:U=!1,disallowEmptySelection:K=!1,disallowSelectAll:H=!1,escapeKeyBehavior:B="clearSelection",selectOnFocus:F=Q.selectionBehavior==="replace",disallowTypeAhead:M=!1,shouldUseVirtualFocus:O,allowsTabNavigation:V=!1,scrollRef:A=q,linkBehavior:N="action"}=Z,{direction:T}=ZK(),P=cU(),C=(v)=>{if(v.altKey&&v.key==="Tab")v.preventDefault();if(!q.current||!OQ(q.current,TZ(v)))return;let i=(x,d)=>{if(x!=null){if(Q.isLink(x)&&N==="selection"&&F&&!OH(v)){vw.flushSync(()=>{Q.setFocusedKey(x,d)});let YZ=K2(q,x),t=Q.getItemProps(x);if(YZ)P.open(YZ,v,t.href,t.routerOptions);return}if(Q.setFocusedKey(x,d),Q.isLink(x)&&N==="override")return;if(v.shiftKey&&Q.selectionMode==="multiple")Q.extendSelection(x);else if(F&&!OH(v))Q.replaceSelection(x)}};switch(v.key){case"ArrowDown":if(J.getKeyBelow){let x=Q.focusedKey!=null?J.getKeyBelow?.(Q.focusedKey):J.getFirstKey?.();if(x==null&&U)x=J.getFirstKey?.(Q.focusedKey);if(x!=null)v.preventDefault(),i(x)}break;case"ArrowUp":if(J.getKeyAbove){let x=Q.focusedKey!=null?J.getKeyAbove?.(Q.focusedKey):J.getLastKey?.();if(x==null&&U)x=J.getLastKey?.(Q.focusedKey);if(x!=null)v.preventDefault(),i(x)}break;case"ArrowLeft":if(J.getKeyLeftOf){let x=Q.focusedKey!=null?J.getKeyLeftOf?.(Q.focusedKey):J.getFirstKey?.();if(x==null&&U)x=T==="rtl"?J.getFirstKey?.(Q.focusedKey):J.getLastKey?.(Q.focusedKey);if(x!=null)v.preventDefault(),i(x,T==="rtl"?"first":"last")}break;case"ArrowRight":if(J.getKeyRightOf){let x=Q.focusedKey!=null?J.getKeyRightOf?.(Q.focusedKey):J.getFirstKey?.();if(x==null&&U)x=T==="rtl"?J.getLastKey?.(Q.focusedKey):J.getFirstKey?.(Q.focusedKey);if(x!=null)v.preventDefault(),i(x,T==="rtl"?"last":"first")}break;case"Home":if(J.getFirstKey){if(Q.focusedKey===null&&v.shiftKey)return;v.preventDefault();let x=J.getFirstKey(Q.focusedKey,H9(v));if(Q.setFocusedKey(x),x!=null){if(H9(v)&&v.shiftKey&&Q.selectionMode==="multiple")Q.extendSelection(x);else if(F)Q.replaceSelection(x)}}break;case"End":if(J.getLastKey){if(Q.focusedKey===null&&v.shiftKey)return;v.preventDefault();let x=J.getLastKey(Q.focusedKey,H9(v));if(Q.setFocusedKey(x),x!=null){if(H9(v)&&v.shiftKey&&Q.selectionMode==="multiple")Q.extendSelection(x);else if(F)Q.replaceSelection(x)}}break;case"PageDown":if(J.getKeyPageBelow&&Q.focusedKey!=null){let x=J.getKeyPageBelow(Q.focusedKey);if(x!=null)v.preventDefault(),i(x)}break;case"PageUp":if(J.getKeyPageAbove&&Q.focusedKey!=null){let x=J.getKeyPageAbove(Q.focusedKey);if(x!=null)v.preventDefault(),i(x)}break;case"a":if(H9(v)&&Q.selectionMode==="multiple"&&H!==!0)v.preventDefault(),Q.selectAll();break;case"Escape":if(B==="clearSelection"&&!K&&Q.selectedKeys.size!==0)v.stopPropagation(),v.preventDefault(),Q.clearSelection();break;case"Tab":if(!V){if(v.shiftKey)q.current.focus();else{let x=Bq(q.current,{tabbable:!0}),d=void 0,YZ;do if(YZ=x.lastChild(),YZ)d=YZ;while(YZ);let t=PQ();if(d&&(!l1(d)||t&&!M3(t)))pJ(d)}break}}},y=nq.useRef({top:0,left:0});sU(A,"scroll",()=>{y.current={top:A.current?.scrollTop??0,left:A.current?.scrollLeft??0}});let f=(v)=>{if(Q.isFocused){if(!OQ(v.currentTarget,TZ(v)))Q.setFocused(!1);return}if(!OQ(v.currentTarget,TZ(v)))return;if(Q.setFocused(!0),Q.focusedKey==null){let i=(d)=>{if(d!=null){if(Q.setFocusedKey(d),F&&!Q.isSelected(d))Q.replaceSelection(d)}},x=v.relatedTarget;if(x&&v.currentTarget.compareDocumentPosition(x)&Node.DOCUMENT_POSITION_FOLLOWING)i(Q.lastSelectedKey??J.getLastKey?.());else i(Q.firstSelectedKey??J.getFirstKey?.())}else if(A.current)A.current.scrollTop=y.current.top,A.current.scrollLeft=y.current.left;if(Q.focusedKey!=null&&A.current){let i=K2(q,Q.focusedKey);if(i instanceof HTMLElement){if(!l1(i)&&!O)pJ(i);if(lU()==="keyboard")kV(i,{containingElement:q.current})}}},u=(v)=>{if(!OQ(v.currentTarget,v.relatedTarget))Q.setFocused(!1)},n=nq.useRef(!1);sU(q,PS,!O?void 0:(v)=>{let{detail:i}=v;if(v.stopPropagation(),Q.setFocused(!0),i?.focusStrategy==="first")n.current=!0}),YA(()=>{if(n.current){let v=J.getFirstKey?.()??null;if(v==null){let i=PQ();if(B3(q.current),ZV(i,null),Q.collection.size>0)n.current=!1}else Q.setFocusedKey(v),n.current=!1}},[Q.collection]),YA(()=>{if(Q.collection.size>0)n.current=!1},[Q.focusedKey]),sU(q,TS,!O?void 0:(v)=>{if(v.stopPropagation(),Q.setFocused(!1),v.detail?.clearFocusKey)Q.setFocusedKey(null)});let e=nq.useRef(G),a=nq.useRef(!1);nq.useEffect(()=>{if(e.current){let v=null;if(G==="first")v=J.getFirstKey?.()??null;if(G==="last")v=J.getLastKey?.()??null;let i=Q.selectedKeys;if(i.size){for(let x of i)if(Q.canSelectItem(x)){v=x;break}}if(Q.setFocused(!0),Q.setFocusedKey(v),v==null&&!O&&q.current)Wq(q.current);if(Q.collection.size>0)e.current=!1,a.current=!0}});let c=nq.useRef(Q.focusedKey),GZ=nq.useRef(null);nq.useEffect(()=>{if(Q.isFocused&&Q.focusedKey!=null&&(Q.focusedKey!==c.current||a.current)&&A.current&&q.current){let v=lU(),i=K2(q,Q.focusedKey);if(!(i instanceof HTMLElement))return;if(v==="keyboard"||a.current){if(GZ.current)cancelAnimationFrame(GZ.current);GZ.current=requestAnimationFrame(()=>{if(A.current){if(KH(A.current,i),v!=="virtual")kV(i,{containingElement:q.current})}})}}if(!O&&Q.isFocused&&Q.focusedKey==null&&c.current!=null&&q.current)Wq(q.current);c.current=Q.focusedKey,a.current=!1}),nq.useEffect(()=>{return()=>{if(GZ.current)cancelAnimationFrame(GZ.current)}},[]),sU(q,"react-aria-focus-scope-restore",(v)=>{v.preventDefault(),Q.setFocused(!0)});let s={onKeyDown:C,onFocus:f,onBlur:u,onMouseDown(v){if(A.current===TZ(v))v.preventDefault()}},{typeSelectProps:LZ}=ww({keyboardDelegate:J,selectionManager:Q});if(!M)s=xZ(LZ,s);let HZ=void 0;if(!O)HZ=Q.focusedKey==null?0:-1;let KZ=kw(Q.collection);return{collectionProps:xZ(s,{tabIndex:HZ,"data-collection":KZ})}}var vw,nq;var hw=k(()=>{RS();QV();YK();mU();KX();MH();K9();XA();e1();O3();KJ();wy();WV();D3();U9();xw();bw();vw=S(uJ(),1),nq=S(JZ(),1)});function fw(Z){let{isDisabled:Q,onLongPressStart:J,onLongPressEnd:q,onLongPress:G,threshold:U=_t,accessibilityDescription:K}=Z,H=uw.useRef(void 0),{addGlobalListener:B,removeGlobalListener:F}=M9(),{pressProps:M}=O9({isDisabled:Q,onPressStart(V){if(V.continuePropagation(),V.pointerType==="mouse"||V.pointerType==="touch"){if(J)J({...V,type:"longpressstart"});if(H.current=setTimeout(()=>{if(V.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),XQ(V.target).activeElement!==V.target)pJ(V.target);if(G)G({...V,type:"longpress"});H.current=void 0},U),V.pointerType==="touch"){let A=(T)=>{T.preventDefault()},N=BX(V.target);B(V.target,"contextmenu",A,{once:!0}),B(N,"pointerup",()=>{setTimeout(()=>{F(V.target,"contextmenu",A)},30)},{once:!0})}}},onPressEnd(V){if(H.current)clearTimeout(H.current);if(q&&(V.pointerType==="mouse"||V.pointerType==="touch"))q({...V,type:"longpressend"})}}),O=by(G&&!Q?K:void 0);return{longPressProps:xZ(M,O)}}var uw,_t=500;var mw=k(()=>{mU();HJ();KJ();vy();JH();qH();uw=S(JZ(),1)});function OK(Z){let{id:Q,selectionManager:J,key:q,ref:G,shouldSelectOnPressUp:U,shouldUseVirtualFocus:K,focus:H,isDisabled:B,onAction:F,allowsDifferentPressOrigin:M,linkBehavior:O="action"}=Z,V=cU();Q=EX(Q);let A=($)=>{if($.pointerType==="keyboard"&&OH($))J.toggleSelection(q);else{if(J.selectionMode==="none")return;if(J.isLink(q)){if(O==="selection"&&G.current){let o=J.getItemProps(q);V.open(G.current,$,o.href,o.routerOptions),J.setSelectedKeys(J.selectedKeys);return}else if(O==="override"||O==="none")return}if(J.selectionMode==="single")if(J.isSelected(q)&&!J.disallowEmptySelection)J.toggleSelection(q);else J.replaceSelection(q);else if($&&$.shiftKey)J.extendSelection(q);else if(J.selectionBehavior==="toggle"||$&&(H9($)||$.pointerType==="touch"||$.pointerType==="virtual"))J.toggleSelection(q);else J.replaceSelection(q)}};G6.useEffect(()=>{if(q===J.focusedKey&&J.isFocused)if(!K){if(H)H();else if(PQ()!==G.current&&G.current)Wq(G.current)}else B3(G.current)},[G,q,J.focusedKey,J.childFocusStrategy,J.isFocused,K]),B=B||J.isDisabled(q);let N={};if(!K&&!B)N={tabIndex:q===J.focusedKey?0:-1,onFocus($){if(TZ($)===G.current)J.setFocusedKey(q)}};else if(B)N.onMouseDown=($)=>{$.preventDefault()};G6.useEffect(()=>{if(B&&J.focusedKey===q)J.setFocusedKey(null)},[J,B,q]);let T=J.isLink(q)&&O==="override",P=F&&Z.UNSTABLE_itemBehavior==="action",C=J.isLink(q)&&O!=="selection"&&O!=="none",y=!B&&J.canSelectItem(q)&&!T&&!P,f=(F||C)&&!B,u=f&&(J.selectionBehavior==="replace"?!y:!y||J.isEmpty),n=f&&y&&J.selectionBehavior==="replace",e=u||n,a=G6.useRef(null),c=e&&y,GZ=G6.useRef(!1),s=G6.useRef(!1),LZ=J.getItemProps(q),HZ=($)=>{if(F)F(),G.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}));if(C&&G.current)V.open(G.current,$,LZ.href,LZ.routerOptions)},KZ={ref:G};if(U)if(KZ.onPressStart=($)=>{if(a.current=$.pointerType,GZ.current=c,$.pointerType==="keyboard"&&(!e||pw($.key)))A($)},!M)KZ.onPress=($)=>{if(u||n&&$.pointerType!=="mouse"){if($.pointerType==="keyboard"&&!cw($.key))return;HZ($)}else if($.pointerType!=="keyboard"&&y)A($)};else KZ.onPressUp=u?void 0:($)=>{if($.pointerType==="mouse"&&y)A($)},KZ.onPress=u?HZ:($)=>{if($.pointerType!=="keyboard"&&$.pointerType!=="mouse"&&y)A($)};else KZ.onPressStart=($)=>{if(a.current=$.pointerType,GZ.current=c,s.current=u,y&&($.pointerType==="mouse"&&!u||$.pointerType==="keyboard"&&(!f||pw($.key))))A($)},KZ.onPress=($)=>{if($.pointerType==="touch"||$.pointerType==="pen"||$.pointerType==="virtual"||$.pointerType==="keyboard"&&e&&cw($.key)||$.pointerType==="mouse"&&s.current){if(e)HZ($);else if(y)A($)}};if(N["data-collection"]=Sw(J.collection),N["data-key"]=q,KZ.preventFocusOnPress=K,K)KZ=xZ(KZ,{onPressStart($){if($.pointerType!=="touch")J.setFocused(!0),J.setFocusedKey(q)},onPress($){if($.pointerType==="touch")J.setFocused(!0),J.setFocusedKey(q)}});if(LZ){for(let $ of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])if(LZ[$])KZ[$]=mq(KZ[$],LZ[$])}let{pressProps:v,isPressed:i}=O9(KZ),x=n?($)=>{if(a.current==="mouse")$.stopPropagation(),$.preventDefault(),HZ($)}:void 0,{longPressProps:d}=fw({isDisabled:!c,onLongPress($){if($.pointerType==="touch")A($),J.setSelectionBehavior("toggle")}}),YZ=($)=>{if(a.current==="touch"&&GZ.current)$.preventDefault()},t=O!=="none"&&J.isLink(q)?($)=>{if(!Hq.isOpening)$.preventDefault()}:void 0;return{itemProps:xZ(N,y||u||K&&!B?v:{},c?d:{},{onDoubleClick:x,onDragStartCapture:YZ,onClick:t,id:Q},K?{onMouseDown:($)=>$.preventDefault()}:void 0),isPressed:i,isSelected:J.isSelected(q),isFocused:J.isFocused&&J.focusedKey===q,isDisabled:B,allowsSelection:y,hasAction:e}}function cw(Z){return Z==="Enter"}function pw(Z){return Z===" "}var G6;var H2=k(()=>{n8();YK();KX();XA();e1();KJ();QV();U9();qH();vY();mw();G6=S(JZ(),1)});function dw(Z,Q){if(typeof Q.getChildren==="function")return Q.getChildren(Z.key);return Z.childNodes}var lw=()=>{};function VH(Z){let Q=iw.get(Z);if(Q!=null)return Q;let J=0,q=(G)=>{for(let U of G)if(U.type==="section")q(dw(U,Z));else if(U.type==="item")J++};return q(Z),iw.set(Z,J),J}var iw;var nw=k(()=>{lw();iw=new WeakMap});var qA=k(()=>{nw()});function GA(Z,Q,J){let{key:q}=Z,G=oV.get(Q),U=Z.isDisabled??Q.selectionManager.isDisabled(q),K=Z.isSelected??Q.selectionManager.isSelected(q),H=Z.shouldSelectOnPressUp??G?.shouldSelectOnPressUp,B=Z.shouldFocusOnHover??G?.shouldFocusOnHover,F=Z.shouldUseVirtualFocus??G?.shouldUseVirtualFocus,M=Z.isVirtualized??G?.isVirtualized,O=zq(),V=zq(),A={role:"option","aria-disabled":U||void 0,"aria-selected":Q.selectionManager.selectionMode!=="none"?K:void 0,"aria-label":Z["aria-label"],"aria-labelledby":O,"aria-describedby":V},N=Q.collection.getItem(q);if(M){let GZ=Number(N?.index);A["aria-posinset"]=Number.isNaN(GZ)?void 0:GZ+1,A["aria-setsize"]=VH(Q.collection)}let T=G?.onAction?()=>G?.onAction?.(q):void 0,P=Aw(Q,q),{itemProps:C,isPressed:y,isFocused:f,hasAction:u,allowsSelection:n}=OK({selectionManager:Q.selectionManager,key:q,ref:J,shouldSelectOnPressUp:H,allowsDifferentPressOrigin:H&&B,isVirtualized:M,shouldUseVirtualFocus:F,isDisabled:U,onAction:T||N?.props?.onAction?mq(N?.props?.onAction,T):void 0,linkBehavior:G?.linkBehavior,UNSTABLE_itemBehavior:G?.UNSTABLE_itemBehavior,id:P}),{hoverProps:e}=BJ({isDisabled:U||!B,onHoverStart(){if(!fG())Q.selectionManager.setFocused(!0),Q.selectionManager.setFocusedKey(q)}}),a=FQ(N?.props);delete a.id;let c=o8(N?.props);return{optionProps:{...A,...xZ(a,C,e,c),id:P},labelProps:{id:O},descriptionProps:{id:V},isFocused:f,isFocusVisible:f&&Q.selectionManager.isFocused&&fG(),isSelected:K,isDisabled:U,isPressed:y,allowsSelection:n,hasAction:u}}var sw=k(()=>{n8();bz();Iw();K9();KJ();H2();l3();U9();vY();qA()});var aw=k(()=>{sw()});var rw=k(()=>{dV()});function VK(Z){let Q=ow.version.split(".");if(parseInt(Q[0],10)>=19)return Z;return Z?"true":void 0}var ow;var tw=k(()=>{ow=S(JZ(),1)});var zA=k(()=>{tw()});function UA(Z,Q){let{collection:J,onLoadMore:q,scrollOffset:G=1}=Z,U=ew.useRef(null),K=WJ((H)=>{for(let B of H)if(B.isIntersecting&&q)q()});QQ(()=>{if(Q.current)U.current=new IntersectionObserver(K,{root:UH(Q?.current),rootMargin:`0px ${100*G}% ${100*G}% ${100*G}%`}),U.current.observe(Q.current);return()=>{if(U.current)U.current.disconnect()}},[J,Q,G])}var ew;var Zx=k(()=>{EV();nU();UJ();ew=S(JZ(),1)});var Qx=k(()=>{Zx()});var Xx=k(()=>{g3()});var Jx=k(()=>{h3()});var _X,KA,cz,Ft;var Yx=k(()=>{cJ();Ww();Y2();HK();aw();BH();lq();zA();FH();Qx();Uq();Xx();Z6();Jx();a8();_X=S(JZ(),1),KA=_X.createContext(null),cz=pG(_K,function(Q,J,q){let G=qY(J),U=_X.useContext(KA),{dragAndDropHooks:K,dragState:H,dropState:B}=_X.useContext(Hw),F=H&&!(H.isDisabled||H.selectionManager.isDisabled(q.key)),{optionProps:M,labelProps:O,descriptionProps:V,...A}=GA({key:q.key,"aria-label":Q?.["aria-label"]},U,G),{hoverProps:N,isHovered:T}=BJ({isDisabled:!A.allowsSelection&&!A.hasAction&&!F,onHoverStart:q.props.onHoverStart,onHoverChange:q.props.onHoverChange,onHoverEnd:q.props.onHoverEnd}),{keyboardProps:P}=tU(Q),{focusProps:C}=oU(Q),y=null;if(H&&K)y=K.useDraggableItem({key:q.key,hasAction:A.hasAction},H);let f=null;if(B&&K)f=K.useDroppableItem({target:{type:"item",key:q.key,dropPosition:"on"}},B,G);let u=H&&H.isDragging(q.key),n=sQ({...Q,id:void 0,children:Q.children,defaultClassName:"react-aria-ListBoxItem",values:{...A,isHovered:T,selectionMode:U.selectionManager.selectionMode,selectionBehavior:U.selectionManager.selectionBehavior,allowsDragging:!!H,isDragging:u,isDropTarget:f?.isDropTarget}});_X.useEffect(()=>{if(!q.textValue)console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.")},[q.textValue]);let e=Q.href?SQ.a:SQ.div,a=FQ(Q,{global:!0});if(delete a.id,delete a.onClick,Q.href&&M.tabIndex==null)M.tabIndex=-1;return _X.default.createElement(e,{...xZ(a,n,M,N,P,C,y?.dragProps,f?.dropProps),ref:G,"data-allows-dragging":!!H||void 0,"data-selected":A.isSelected||void 0,"data-disabled":A.isDisabled||void 0,"data-hovered":T||void 0,"data-focused":A.isFocused||void 0,"data-focus-visible":A.isFocusVisible||void 0,"data-pressed":A.isPressed||void 0,"data-dragging":u||void 0,"data-drop-target":f?.isDropTarget||void 0,"data-selection-mode":U.selectionManager.selectionMode==="none"?void 0:U.selectionManager.selectionMode},_X.default.createElement(mJ,{values:[[A9,{slots:{[uG]:O,label:O,description:V}}],[MK,{isSelected:A.isSelected}]]},n.children))}),Ft=pG(Q2,function(Q,J,q){let G=_X.useContext(KA),{isLoading:U,onLoadMore:K,scrollOffset:H,...B}=Q,F=_X.useRef(null),M=_X.useMemo(()=>({onLoadMore:K,collection:G?.collection,sentinelRef:F,scrollOffset:H}),[K,H,G?.collection]);UA(M,F);let O=sQ({...B,id:void 0,children:q.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),V={tabIndex:-1};return _X.default.createElement(_X.default.Fragment,null,_X.default.createElement("div",{style:{position:"relative",width:0,height:0},inert:VK(!0)},_X.default.createElement("div",{"data-testid":"loadMoreSentinel",ref:F,style:{position:"absolute",height:1,width:1}})),U&&O.children&&_X.default.createElement(_X.default.Fragment,null,_X.default.createElement(SQ.div,{...xZ(FQ(Q,{global:!0}),V),...O,role:"option",ref:J},O.children)))})});function qx(Z){return Z.dataset.liveAnnouncer==="true"||Z.dataset.reactAriaTopLayer!==void 0}function Gx(Z,Q){let J=BX(Z?.[0]),q=Q instanceof J.Element?{root:Q}:Q,G=q?.root??document.body,U=q?.shouldUseInert&&Lt,K=new Set(Z),H=new Set,B=(P)=>{return U&&P instanceof J.HTMLElement?P.inert:P.getAttribute("aria-hidden")==="true"},F=(P,C)=>{if(U&&P instanceof J.HTMLElement)P.inert=C;else if(C)P.setAttribute("aria-hidden","true");else if(P.removeAttribute("aria-hidden"),P instanceof J.HTMLElement)P.inert=!1},M=new Set;if(gY())for(let P of Z){let C=P;while(C&&C!==G){let y=C.getRootNode();if("shadowRoot"in y)M.add(y.shadowRoot);C=y.parentNode}}let O=(P)=>{for(let u of P.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))K.add(u);let C=(u)=>{if(H.has(u)||K.has(u)||u.parentElement&&H.has(u.parentElement)&&u.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let n of K)if(OQ(u,n))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},y=G2(XQ(P),P,NodeFilter.SHOW_ELEMENT,{acceptNode:C}),f=C(P);if(f===NodeFilter.FILTER_ACCEPT)V(P);if(f!==NodeFilter.FILTER_REJECT){let u=y.nextNode();while(u!=null)V(u),u=y.nextNode()}},V=(P)=>{let C=AH.get(P)??0;if(B(P)&&C===0)return;if(C===0)F(P,!0);H.add(P),AH.set(P,C+1)};if(Fq.length)Fq[Fq.length-1].disconnect();O(G);let A=new MutationObserver((P)=>{for(let C of P){if(C.type!=="childList")continue;if(C.target.isConnected&&![...K,...H].some((y)=>OQ(y,C.target))){for(let y of C.addedNodes)if((y instanceof HTMLElement||y instanceof SVGElement)&&qx(y))K.add(y);else if(y instanceof Element)O(y)}if(gY()){for(let y of M)if(!y.isConnected){A.disconnect();break}}}});A.observe(G,{childList:!0,subtree:!0});let N=new Set;if(gY())for(let P of M){let C=new MutationObserver((y)=>{for(let f of y){if(f.type!=="childList")continue;if(f.target.isConnected&&![...K,...H].some((u)=>OQ(u,f.target))){for(let u of f.addedNodes)if((u instanceof HTMLElement||u instanceof SVGElement)&&qx(u))K.add(u);else if(u instanceof Element)O(u)}if(gY()){for(let u of M)if(!u.isConnected){A.disconnect();break}}}});C.observe(P,{childList:!0,subtree:!0}),N.add(C)}let T={visibleNodes:K,hiddenNodes:H,observe(){A.observe(G,{childList:!0,subtree:!0})},disconnect(){A.disconnect()}};return Fq.push(T),()=>{if(A.disconnect(),gY())for(let P of N)P.disconnect();for(let P of H){let C=AH.get(P);if(C==null)continue;if(C===1)F(P,!1),AH.delete(P);else AH.set(P,C-1)}if(T===Fq[Fq.length-1]){if(Fq.pop(),Fq.length)Fq[Fq.length-1].observe()}else Fq.splice(Fq.indexOf(T),1)}}var Lt,AH,Fq;var zx=k(()=>{tV();HJ();KX();W3();Lt=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;AH=new WeakMap,Fq=[]});function Kx(Z){let{ref:Q,onInteractOutside:J,isDisabled:q,onInteractOutsideStart:G}=Z,U=W2.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),K=WJ((B)=>{if(J&&Ux(B,Q)){if(G)G(B);U.current.isPointerDown=!0}}),H=WJ((B)=>{if(J)J(B)});W2.useEffect(()=>{let B=U.current;if(q)return;let F=Q.current,M=XQ(F);if(typeof PointerEvent<"u"){let O=(V)=>{if(B.isPointerDown&&Ux(V,Q))H(V);B.isPointerDown=!1};return M.addEventListener("pointerdown",K,!0),M.addEventListener("click",O,!0),()=>{M.removeEventListener("pointerdown",K,!0),M.removeEventListener("click",O,!0)}}},[Q,q])}function Ux(Z,Q){if(Z.button>0)return!1;let J=TZ(Z);if(J){let q=J.ownerDocument;if(!q||!OQ(q.documentElement,J))return!1;if(J.closest("[data-react-aria-top-layer]"))return!1}if(!Q.current)return!1;return!Z.composedPath().includes(Q.current)}var W2;var Hx=k(()=>{KX();HJ();nU();W2=S(JZ(),1)});function Wx(Z,Q){let{onClose:J,shouldCloseOnBlur:q,isOpen:G,isDismissable:U=!1,isKeyboardDismissDisabled:K=!1,shouldCloseOnInteractOutside:H}=Z,B=B2.useRef(void 0);B2.useEffect(()=>{if(G&&!dG.includes(Q))return dG.push(Q),()=>{let N=dG.indexOf(Q);if(N>=0)dG.splice(N,1)}},[G,Q]);let F=()=>{if(dG[dG.length-1]===Q&&J)J()},M=(N)=>{let T=dG[dG.length-1];if(B.current=T,!H||H(TZ(N))){if(T===Q)N.stopPropagation()}},O=(N)=>{if(!H||H(TZ(N))){if(dG[dG.length-1]===Q)N.stopPropagation();if(B.current===Q)F()}B.current=void 0},V=(N)=>{if(N.key==="Escape"&&!K&&!N.nativeEvent.isComposing)N.stopPropagation(),N.preventDefault(),F()};Kx({ref:Q,onInteractOutside:U&&G?O:void 0,onInteractOutsideStart:M});let{focusWithinProps:A}=zK({isDisabled:!q,onBlurWithin:(N)=>{if(!N.relatedTarget||Dw(N.relatedTarget))return;if(!H||H(N.relatedTarget))J?.()}});return{overlayProps:{onKeyDown:V,...A},underlayProps:{}}}var B2,dG;var Bx=k(()=>{KX();MH();p3();Hx();B2=S(JZ(),1),dG=[]});function Lx(Z={}){let{isDisabled:Q}=Z;QQ(()=>{if(Q)return;if(_2++,_2===1)if(pq())HA=Ot();else HA=Mt();return()=>{if(_2--,_2===0)HA()}},[Q])}function Mt(){let Z=window.innerWidth-document.documentElement.clientWidth;return mq(Z>0&&("scrollbarGutter"in document.documentElement.style?F2(document.documentElement,"scrollbarGutter","stable"):F2(document.documentElement,"paddingRight",`${Z}px`)),F2(document.documentElement,"overflow","hidden"))}function Ot(){let Z=F2(document.documentElement,"overflow","hidden"),Q,J=!1,q=(M)=>{let O=TZ(M);Q=cG(O)?O:UH(O,!0),J=!1;let V=O.ownerDocument.defaultView.getSelection();if(V&&!V.isCollapsed&&V.containsNode(O,!0))J=!0;if(M.composedPath().some((A)=>A instanceof HTMLInputElement&&A.type==="range"))J=!0;if("selectionStart"in O&&"selectionEnd"in O&&O.selectionStart<O.selectionEnd&&O.ownerDocument.activeElement===O)J=!0},G=document.createElement("style"),U=c3();if(U)G.nonce=U;G.textContent=`
|
|
242
|
+
@layer {
|
|
243
|
+
* {
|
|
244
|
+
overscroll-behavior: contain;
|
|
245
|
+
}
|
|
246
|
+
}`.trim(),document.head.prepend(G);let K=(M)=>{if(M.touches.length===2||J)return;if(!Q||Q===document.documentElement||Q===document.body){M.preventDefault();return}if(Q.scrollHeight===Q.clientHeight&&Q.scrollWidth===Q.clientWidth)M.preventDefault()},H=(M)=>{let O=TZ(M),V=M.relatedTarget;if(V&&iU(V))V.focus({preventScroll:!0}),_x(V,iU(O));else if(!V)O.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},B=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(M){let O=PQ(),V=O!=null&&iU(O);if(B.call(this,{...M,preventScroll:!0}),!M||!M.preventScroll)_x(this,V)};let F=mq(WA(document,"touchstart",q,{passive:!1,capture:!0}),WA(document,"touchmove",K,{passive:!1,capture:!0}),WA(document,"blur",H,!0));return()=>{Z(),F(),G.remove(),HTMLElement.prototype.focus=B}}function F2(Z,Q,J){let q=Z.style[Q];return Z.style[Q]=J,()=>{Z.style[Q]=q}}function WA(Z,Q,J,q){return Z.addEventListener(Q,J,q),()=>{Z.removeEventListener(Q,J,q)}}function _x(Z,Q){if(Q||!IH)Fx(Z);else IH.addEventListener("resize",()=>Fx(Z),{once:!0})}function Fx(Z){let Q=document.scrollingElement||document.documentElement,J=Z;while(J&&J!==Q){let q=UH(J);if(q!==document.documentElement&&q!==document.body&&q!==J){let G=q.getBoundingClientRect(),U=J.getBoundingClientRect();if(U.top<G.top||U.bottom>G.top+J.clientHeight){let K=G.bottom;if(IH)K=Math.min(K,IH.offsetTop+IH.height);let H=U.top-G.top-((K-G.top)/2-U.height/2);q.scrollTo({top:Math.max(0,Math.min(q.scrollHeight-q.clientHeight,q.scrollTop+H)),behavior:"smooth"})}}J=q.parentElement}}var IH,_2=0,HA;var Mx=k(()=>{n8();KX();jV();EV();Kq();zH();UJ();e1();IH=typeof document<"u"&&window.visualViewport});var BA;var Ox=k(()=>{BA={};BA={dismiss:"تجاهل"}});var _A;var Vx=k(()=>{_A={};_A={dismiss:"Отхвърляне"}});var FA;var Ax=k(()=>{FA={};FA={dismiss:"Odstranit"}});var LA;var Ix=k(()=>{LA={};LA={dismiss:"Luk"}});var MA;var Nx=k(()=>{MA={};MA={dismiss:"Schließen"}});var OA;var jx=k(()=>{OA={};OA={dismiss:"Απόρριψη"}});var VA;var Tx=k(()=>{VA={};VA={dismiss:"Dismiss"}});var AA;var Px=k(()=>{AA={};AA={dismiss:"Descartar"}});var IA;var Rx=k(()=>{IA={};IA={dismiss:"Lõpeta"}});var NA;var Cx=k(()=>{NA={};NA={dismiss:"Hylkää"}});var jA;var Dx=k(()=>{jA={};jA={dismiss:"Rejeter"}});var TA;var $x=k(()=>{TA={};TA={dismiss:"התעלם"}});var PA;var Ex=k(()=>{PA={};PA={dismiss:"Odbaci"}});var RA;var kx=k(()=>{RA={};RA={dismiss:"Elutasítás"}});var CA;var Sx=k(()=>{CA={};CA={dismiss:"Ignora"}});var DA;var yx=k(()=>{DA={};DA={dismiss:"閉じる"}});var $A;var wx=k(()=>{$A={};$A={dismiss:"무시"}});var EA;var xx=k(()=>{EA={};EA={dismiss:"Atmesti"}});var kA;var bx=k(()=>{kA={};kA={dismiss:"Nerādīt"}});var SA;var vx=k(()=>{SA={};SA={dismiss:"Lukk"}});var yA;var gx=k(()=>{yA={};yA={dismiss:"Negeren"}});var wA;var hx=k(()=>{wA={};wA={dismiss:"Zignoruj"}});var xA;var ux=k(()=>{xA={};xA={dismiss:"Descartar"}});var bA;var fx=k(()=>{bA={};bA={dismiss:"Dispensar"}});var vA;var mx=k(()=>{vA={};vA={dismiss:"Revocare"}});var gA;var cx=k(()=>{gA={};gA={dismiss:"Пропустить"}});var hA;var px=k(()=>{hA={};hA={dismiss:"Zrušiť"}});var uA;var dx=k(()=>{uA={};uA={dismiss:"Opusti"}});var fA;var lx=k(()=>{fA={};fA={dismiss:"Odbaci"}});var mA;var ix=k(()=>{mA={};mA={dismiss:"Avvisa"}});var cA;var nx=k(()=>{cA={};cA={dismiss:"Kapat"}});var pA;var sx=k(()=>{pA={};pA={dismiss:"Скасувати"}});var dA;var ax=k(()=>{dA={};dA={dismiss:"取消"}});var lA;var rx=k(()=>{lA={};lA={dismiss:"關閉"}});var iA;var ox=k(()=>{Ox();Vx();Ax();Ix();Nx();jx();Tx();Px();Rx();Cx();Dx();$x();Ex();kx();Sx();yx();wx();xx();bx();vx();gx();hx();ux();fx();mx();cx();px();dx();lx();ix();nx();sx();ax();rx();iA={};iA={"ar-AE":BA,"bg-BG":_A,"cs-CZ":FA,"da-DK":LA,"de-DE":MA,"el-GR":OA,"en-US":VA,"es-ES":AA,"et-EE":IA,"fi-FI":NA,"fr-FR":jA,"he-IL":TA,"hr-HR":PA,"hu-HU":RA,"it-IT":CA,"ja-JP":DA,"ko-KR":$A,"lt-LT":EA,"lv-LV":kA,"nb-NO":SA,"nl-NL":yA,"pl-PL":wA,"pt-BR":xA,"pt-PT":bA,"ro-RO":vA,"ru-RU":gA,"sk-SK":hA,"sl-SI":uA,"sr-SP":fA,"sv-SE":mA,"tr-TR":cA,"uk-UA":pA,"zh-CN":dA,"zh-TW":lA}});function Vt(Z){return Z&&Z.__esModule?Z.default:Z}function sA(Z){let{onDismiss:Q,...J}=Z,q=Xy(Vt(iA),"@react-aria/overlays"),G=W9(J,q.format("dismiss")),U=()=>{if(Q)Q()};return nA.default.createElement(hy,null,nA.default.createElement("button",{...G,tabIndex:-1,onClick:U,style:{width:1,height:1}}))}var nA;var tx=k(()=>{ox();ZH();Jy();uy();nA=S(JZ(),1)});function ex({children:Z}){let Q=z6.useMemo(()=>({register:()=>{}}),[]);return z6.default.createElement(XH.Provider,{value:Q},Z)}var z6;var Zb=k(()=>{TV();z6=S(JZ(),1)});function Qb(){return NH.useContext(At)??{}}var NH,At;var Xb=k(()=>{NH=S(JZ(),1),At=NH.createContext({})});function aA(Z){let Q=fJ(),{portalContainer:J=Q?null:document.body,isExiting:q}=Z,[G,U]=sq.useState(!1),K=sq.useMemo(()=>({contain:G,setContain:U}),[G,U]),{getContainer:H}=Qb();if(!Z.portalContainer&&H)J=H();if(!J)return null;let B=Z.children;if(!Z.disableFocusManagement)B=sq.default.createElement(Rw,{restoreFocus:!0,contain:(Z.shouldContainFocus||G)&&!q},B);return B=sq.default.createElement(Yb.Provider,{value:K},sq.default.createElement(ex,null,B)),Jb.default.createPortal(B,J)}function L2(){let Q=sq.useContext(Yb)?.setContain;QQ(()=>{Q?.(!0)},[Q])}var sq,Jb,Yb;var M2=k(()=>{Zb();MH();G9();UJ();Xb();sq=S(JZ(),1),Jb=S(uJ(),1),Yb=sq.default.createContext(null)});var qb=k(()=>{tx();M2()});function rA(Z){let[Q,J]=aU(Z.isOpen,Z.defaultOpen||!1,Z.onOpenChange),q=O2.useCallback(()=>{J(!0)},[J]),G=O2.useCallback(()=>{J(!1)},[J]),U=O2.useCallback(()=>{J(!Q)},[J,Q]);return{isOpen:Q,setOpen:J,open:q,close:G,toggle:U}}var O2;var Gb=k(()=>{k3();O2=S(JZ(),1)});var zb=k(()=>{Gb()});function IK(Z,Q=!0){let[J,q]=AK.useState(!0),G=J&&Q;return QQ(()=>{if(G&&Z.current&&"getAnimations"in Z.current){for(let U of Z.current.getAnimations())if(U instanceof CSSTransition)U.cancel()}},[Z,G]),Kb(Z,G,AK.useCallback(()=>q(!1),[])),G}function NK(Z,Q){let[J,q]=AK.useState(Q?"open":"closed");switch(J){case"open":if(!Q)q("exiting");break;case"closed":case"exiting":if(Q)q("open");break}let G=J==="exiting";return Kb(Z,G,AK.useCallback(()=>{q((U)=>U==="exiting"?"closed":U)},[])),G}function Kb(Z,Q,J){QQ(()=>{if(Q&&Z.current){if(!("getAnimations"in Z.current)){J();return}let q=Z.current.getAnimations();if(q.length===0){J();return}let G=!1;return Promise.allSettled(q.map((U)=>U.finished)).then(()=>{if(!G)Ub.flushSync(()=>{J()})}),()=>{G=!0}}},[Z,Q,J])}var Ub,AK;var Hb=k(()=>{UJ();Ub=S(uJ(),1),AK=S(JZ(),1)});var oA=k(()=>{Hb()});var V2,Wb;var Bb=k(()=>{V2=S(JZ(),1),Wb=V2.createContext({})});var _b;var Fb=k(()=>{_b=new WeakMap});function eA(Z,Q,J){let{id:q,key:G,closeOnSelect:U,shouldCloseOnSelect:K,isVirtualized:H,"aria-haspopup":B,onPressStart:F,onPressUp:M,onPress:O,onPressChange:V,onPressEnd:A,onClick:N,onHoverStart:T,onHoverChange:P,onHoverEnd:C,onKeyDown:y,onKeyUp:f,onFocus:u,onFocusChange:n,onBlur:e,selectionManager:a=Q.selectionManager}=Z,c=!!B,GZ=c&&Z["aria-expanded"]==="true",s=Z.isDisabled??a.isDisabled(G),LZ=Z.isSelected??a.isSelected(G),HZ=_b.get(Q),KZ=Q.collection.getItem(G),v=Z.onClose||HZ.onClose,i=cU(),x=()=>{if(c)return;if(KZ?.props?.onAction)KZ.props.onAction();else if(Z.onAction)Z.onAction(G);if(HZ.onAction){let gZ=HZ.onAction;gZ(G)}},d="menuitem";if(!c){if(a.selectionMode==="single")d="menuitemradio";else if(a.selectionMode==="multiple")d="menuitemcheckbox"}let YZ=zq(),t=zq(),$=zq(),o={id:q,"aria-disabled":s||void 0,role:d,"aria-label":Z["aria-label"],"aria-labelledby":YZ,"aria-describedby":[Z["aria-describedby"],t,$].filter(Boolean).join(" ")||void 0,"aria-controls":Z["aria-controls"],"aria-haspopup":B,"aria-expanded":Z["aria-expanded"]};if(a.selectionMode!=="none"&&!c)o["aria-checked"]=LZ;if(H){let gZ=Number(KZ?.index);o["aria-posinset"]=Number.isNaN(gZ)?void 0:gZ+1,o["aria-setsize"]=VH(Q.collection)}let IZ=tA.useRef(!1),PZ=(gZ)=>{V?.(gZ),IZ.current=gZ},yZ=tA.useRef(null),sZ=(gZ)=>{if(gZ.pointerType!=="keyboard")yZ.current={pointerType:gZ.pointerType};if(gZ.pointerType==="mouse"){if(!IZ.current)gZ.target.click()}M?.(gZ)},CZ=(gZ)=>{N?.(gZ),x(),bS(gZ,i,KZ.props.href,KZ?.props.routerOptions);let aJ=yZ.current?.pointerType==="keyboard"?yZ.current?.key==="Enter"||a.selectionMode==="none"||a.isLink(G):a.selectionMode!=="multiple"||a.isLink(G);if(aJ=K??U??aJ,v&&!c&&aJ)v();yZ.current=null},{itemProps:KQ,isFocused:MZ}=OK({id:q,selectionManager:a,key:G,ref:J,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:HZ.shouldUseVirtualFocus}),{pressProps:bZ,isPressed:RQ}=O9({onPressStart:F,onPress:O,onPressUp:sZ,onPressChange:PZ,onPressEnd:A,isDisabled:s}),{hoverProps:BZ}=BJ({isDisabled:s,onHoverStart(gZ){if(!fG()&&!(GZ&&B))a.setFocused(!0),a.setFocusedKey(G);T?.(gZ)},onHoverChange:P,onHoverEnd:C}),{keyboardProps:GX}=tU({onKeyDown:(gZ)=>{if(gZ.repeat){gZ.continuePropagation();return}switch(gZ.key){case" ":yZ.current={pointerType:"keyboard",key:" "},TZ(gZ).click(),t1("keyboard");break;case"Enter":if(yZ.current={pointerType:"keyboard",key:"Enter"},TZ(gZ).tagName!=="A")TZ(gZ).click();t1("keyboard");break;default:if(!c)gZ.continuePropagation();y?.(gZ);break}},onKeyUp:f}),{focusableProps:kX}=F9({onBlur:e,onFocus:u,onFocusChange:n},J),RX=FQ(KZ?.props);delete RX.id;let ZX=o8(KZ?.props);return{menuItemProps:{...o,...xZ(RX,ZX,c?{onFocus:KQ.onFocus,"data-collection":KQ["data-collection"],"data-key":KQ["data-key"]}:KQ,bZ,BZ,GX,kX,HZ.shouldUseVirtualFocus||c?{onMouseDown:(gZ)=>gZ.preventDefault()}:void 0,s?void 0:{onClick:CZ}),tabIndex:KQ.tabIndex!=null&&GZ&&!HZ.shouldUseVirtualFocus?-1:KQ.tabIndex},labelProps:{id:YZ},descriptionProps:{id:t},keyboardShortcutProps:{id:$},isFocused:MZ,isFocusVisible:MZ&&a.isFocused&&fG()&&!GZ,isSelected:LZ,isPressed:RQ,isDisabled:s}}var tA;var Lb=k(()=>{bz();KX();U9();K9();Fb();KJ();qK();l3();h3();qH();H2();vY();qA();tA=S(JZ(),1)});var Mb=k(()=>{Lb()});var UY,Vb,It,Nt,Ob,U6;var Ab=k(()=>{cJ();sV();Bb();Y2();HK();Mb();FH();BH();lq();Uq();Z6();a8();UY=S(JZ(),1),Vb=UY.createContext(null),It=UY.createContext(null);Nt=class Nt extends uY{static{this.type="submenutrigger"}filter(Z,Q,J){let q=Z.getItem(this.firstChildKey);if(q&&J(q.textValue,this)){let G=this.clone();return Q.addDescendants(G,Z),G}return null}};Ob=UY.createContext(null),U6=pG(_K,function(Q,J,q){[Q,J]=JX(Q,J,Ob);let G=fU(Ob)?.id,U=UY.useContext(Vb),K=qY(J),H=UY.useContext(It),{isVirtualized:B}=UY.useContext(_H),{menuItemProps:F,labelProps:M,descriptionProps:O,keyboardShortcutProps:V,...A}=eA({...Q,id:G,key:q.key,selectionManager:H,isVirtualized:B},U,K),{hoverProps:N,isHovered:T}=BJ({isDisabled:A.isDisabled}),P=sQ({...Q,id:void 0,children:q.rendered,defaultClassName:"react-aria-MenuItem",values:{...A,isHovered:T,isFocusVisible:A.isFocusVisible,selectionMode:H.selectionMode,selectionBehavior:H.selectionBehavior,hasSubmenu:!!Q["aria-haspopup"],isOpen:Q["aria-expanded"]==="true"}}),C=Q.href?SQ.a:SQ.div,y=FQ(Q,{global:!0});return delete y.id,delete y.onClick,UY.default.createElement(C,{...xZ(y,P,F,N),ref:K,"data-disabled":A.isDisabled||void 0,"data-hovered":T||void 0,"data-focused":A.isFocused||void 0,"data-focus-visible":A.isFocusVisible||void 0,"data-pressed":A.isPressed||void 0,"data-selected":A.isSelected||void 0,"data-selection-mode":H.selectionMode==="none"?void 0:H.selectionMode,"data-has-submenu":!!Q["aria-haspopup"]||void 0,"data-open":Q["aria-expanded"]==="true"||void 0},UY.default.createElement(mJ,{values:[[A9,{slots:{[uG]:M,label:M,description:O}}],[Wb,V],[MK,{isSelected:A.isSelected}]]},P.children))})});function ZI(Z,Q){let{role:J="dialog"}=Z,q=zq();q=Z["aria-label"]?void 0:q;let G=jK.useRef(!1);jK.useEffect(()=>{if(Q.current&&!l1(Q.current)){Wq(Q.current);let K=setTimeout(()=>{if(PQ()===Q.current||PQ()===document.body){if(G.current=!0,Q.current)Q.current.blur(),Wq(Q.current);G.current=!1}},500);return()=>{clearTimeout(K)}}},[Q]),L2();let U=jK.useRef(!1);return jK.useEffect(()=>{if(!U.current&&Q.current){let K=Q.current,H=K.hasAttribute("aria-label"),B=K.hasAttribute("aria-labelledby");if(!H&&!B)console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),U.current=!0}}),{dialogProps:{...FQ(Z,{labelable:!0}),role:J,tabIndex:-1,"aria-labelledby":Z["aria-labelledby"]||q,onBlur:(K)=>{if(G.current)K.stopPropagation()}},titleProps:{id:q}}}var jK;var Ib=k(()=>{bz();YK();KX();M2();vY();jK=S(JZ(),1)});var Nb=k(()=>{Ib()});var aq,jb,TK,QI;var XI=k(()=>{i3();cJ();Sy();Nb();lq();Uq();aq=S(JZ(),1),jb=aq.createContext(null),TK=aq.createContext(null),QI=aq.forwardRef(function(Q,J){let q=Q["aria-labelledby"];[Q,J]=JX(Q,J,jb);let{dialogProps:G,titleProps:U}=ZI({...Q,"aria-labelledby":q},J),K=aq.useContext(TK);if(!G["aria-label"]&&!G["aria-labelledby"])if(Q["aria-labelledby"])G["aria-labelledby"]=Q["aria-labelledby"];else console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.');let H=sQ({defaultClassName:"react-aria-Dialog",className:Q.className,style:Q.style,children:Q.children,values:{close:K?.close||(()=>{})}}),B=FQ(Q,{global:!0});return aq.default.createElement(SQ.section,{...xZ(B,H,G),render:Q.render,ref:J,slot:Q.slot||void 0},aq.default.createElement(mJ,{values:[[ky,{slots:{[uG]:{},title:{...U,level:2}}}],[Q6,{slots:{[uG]:{},close:{onPress:()=>K?.close()}}}]]},H.children))})});var Tb=k(()=>{k3()});function JI(Z,Q){let{inputElementType:J="input",isDisabled:q=!1,isRequired:G=!1,isReadOnly:U=!1,type:K="text",validationBehavior:H="aria"}=Z,[B,F]=aU(Z.value,Z.defaultValue||"",Z.onChange),{focusableProps:M}=F9(Z,Q),O=gV({...Z,value:B}),{isInvalid:V,validationErrors:A,validationDetails:N}=O.displayValidation,{labelProps:T,fieldProps:P,descriptionProps:C,errorMessageProps:y}=ny({...Z,isInvalid:V,errorMessage:Z.errorMessage||A}),f=FQ(Z,{labelable:!0}),u={type:K,pattern:Z.pattern},[n]=A2.useState(B);return ry(Q,Z.defaultValue??n,F),ty(Z,O,Q),{labelProps:T,inputProps:xZ(f,J==="input"?u:void 0,{disabled:q,readOnly:U,required:G&&H==="native","aria-required":G&&H==="aria"||void 0,"aria-invalid":V||void 0,"aria-errormessage":Z["aria-errormessage"],"aria-activedescendant":Z["aria-activedescendant"],"aria-autocomplete":Z["aria-autocomplete"],"aria-haspopup":Z["aria-haspopup"],"aria-controls":Z["aria-controls"],value:B,onChange:(e)=>F(TZ(e).value),autoComplete:Z.autoComplete,autoCapitalize:Z.autoCapitalize,maxLength:Z.maxLength,minLength:Z.minLength,name:Z.name,form:Z.form,placeholder:Z.placeholder,inputMode:Z.inputMode,autoCorrect:Z.autoCorrect,spellCheck:Z.spellCheck,[parseInt(A2.default.version,10)>=17?"enterKeyHint":"enterkeyhint"]:Z.enterKeyHint,onCopy:Z.onCopy,onCut:Z.onCut,onPaste:Z.onPaste,onCompositionEnd:Z.onCompositionEnd,onCompositionStart:Z.onCompositionStart,onCompositionUpdate:Z.onCompositionUpdate,onSelect:Z.onSelect,onBeforeInput:Z.onBeforeInput,onInput:Z.onInput,...M,...P}),descriptionProps:C,errorMessageProps:y,isInvalid:V,validationErrors:A,validationDetails:N}}var A2;var Pb=k(()=>{bz();KX();KJ();sy();qK();oy();ey();Tb();dy();A2=S(JZ(),1)});function YI(Z,Q,J){let{isDisabled:q}=Z,G=EX(),U=EX(),K=fJ(),H=K6.useRef(null),B=K6.useCallback(()=>{H.current=requestAnimationFrame(()=>{if(J.current)J.current.setAttribute("hidden","until-found")}),Rb.flushSync(()=>{Q.toggle()})},[J,Q]);sU(J,"beforematch",B);let F=K6.useRef(null);return QQ(()=>{if(H.current)cancelAnimationFrame(H.current);if(J.current&&!K){let M=J.current;if(F.current==null||typeof M.getAnimations!=="function")if(Q.isExpanded)M.removeAttribute("hidden"),M.style.setProperty("--disclosure-panel-width","auto"),M.style.setProperty("--disclosure-panel-height","auto");else M.setAttribute("hidden","until-found"),M.style.setProperty("--disclosure-panel-width","0px"),M.style.setProperty("--disclosure-panel-height","0px");else if(Q.isExpanded!==F.current)if(Q.isExpanded)M.removeAttribute("hidden"),M.style.setProperty("--disclosure-panel-width",M.scrollWidth+"px"),M.style.setProperty("--disclosure-panel-height",M.scrollHeight+"px"),Promise.all(M.getAnimations().map((O)=>O.finished)).then(()=>{M.style.setProperty("--disclosure-panel-width","auto"),M.style.setProperty("--disclosure-panel-height","auto")}).catch(()=>{});else M.style.setProperty("--disclosure-panel-width",M.scrollWidth+"px"),M.style.setProperty("--disclosure-panel-height",M.scrollHeight+"px"),window.getComputedStyle(M).height,M.style.setProperty("--disclosure-panel-width","0px"),M.style.setProperty("--disclosure-panel-height","0px"),Promise.all(M.getAnimations().map((O)=>O.finished)).then(()=>M.setAttribute("hidden","until-found")).catch(()=>{});F.current=Q.isExpanded}},[q,J,Q.isExpanded,K]),K6.useEffect(()=>{return()=>{if(H.current)cancelAnimationFrame(H.current)}},[]),{buttonProps:{id:G,"aria-expanded":Q.isExpanded,"aria-controls":U,onPress:(M)=>{if(!q&&M.pointerType!=="keyboard")Q.toggle()},isDisabled:q,onPressStart(M){if(M.pointerType==="keyboard"&&!q)Q.toggle()}},panelProps:{id:U,role:"group","aria-labelledby":G,"aria-hidden":!Q.isExpanded,hidden:K?!Q.isExpanded:void 0}}}var Rb,K6;var Cb=k(()=>{WV();vY();G9();UJ();Rb=S(uJ(),1),K6=S(JZ(),1)});var Db=k(()=>{Cb()});function qI(Z){let[Q,J]=aU(Z.isExpanded,Z.defaultExpanded||!1,Z.onExpandedChange),q=I2.useCallback(()=>{J(!0)},[J]),G=I2.useCallback(()=>{J(!1)},[J]),U=I2.useCallback(()=>{J(!Q)},[J,Q]);return{isExpanded:Q,setExpanded:J,expand:q,collapse:G,toggle:U}}var I2;var $b=k(()=>{k3();I2=S(JZ(),1)});var Eb=k(()=>{$b()});var _J,kb,Sb,yb,wb,GI,zI;var xb=k(()=>{i3();cJ();Db();Eb();lq();Uq();K3();UK();$V();_J=S(JZ(),1),kb=_J.createContext(null),Sb=_J.createContext(null),yb=_J.createContext(null),wb=_J.createContext(null),GI=_J.forwardRef(function(Q,J){[Q,J]=JX(Q,J,Sb);let q=_J.useContext(kb),{id:G,...U}=Q,K=EX();G||=K;let H=q?q.expandedKeys.has(G):Q.isExpanded,B=qI({...Q,isExpanded:H,onExpandedChange(C){if(q)q.toggleKey(G);Q.onExpandedChange?.(C)}}),F=_J.default.useRef(null),M=Q.isDisabled||q?.isDisabled||!1,{buttonProps:O,panelProps:V}=YI({...Q,isExpanded:H,isDisabled:M},B,F),{isFocusVisible:A,focusProps:N}=hY({within:!0}),T=sQ({...Q,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:B.isExpanded,isDisabled:M,isFocusVisibleWithin:A,state:B}}),P=FQ(U,{global:!0});return _J.default.createElement(mJ,{values:[[Q6,{slots:{[uG]:{},trigger:O}}],[wb,{panelProps:V,panelRef:F}],[yb,B]]},_J.default.createElement(SQ.div,{...xZ(P,T,N),ref:J,"data-expanded":B.isExpanded||void 0,"data-disabled":M||void 0,"data-focus-visible-within":A||void 0},T.children))}),zI=_J.forwardRef(function(Q,J){let{role:q="group"}=Q,{panelProps:G,panelRef:U}=_J.useContext(wb),{isFocusVisible:K,focusProps:H}=hY({within:!0}),B=sQ({...Q,defaultClassName:"react-aria-DisclosurePanel",values:{isFocusVisibleWithin:K}}),F=FQ(Q,{global:!0,labelable:!0});return _J.default.createElement(SQ.div,{...xZ(F,B,G,H),ref:hG(J,U),role:q,"data-focus-visible-within":K||void 0},_J.default.createElement(mJ,{values:[[Q6,null]]},Q.children))})});function UI(Z,Q,J){let{overlayProps:q,underlayProps:G}=Wx({...Z,isOpen:Q.isOpen,onClose:Q.close},J);return Lx({isDisabled:!Q.isOpen}),L2(),bb.useEffect(()=>{if(Q.isOpen&&J.current)return Gx([J.current],{shouldUseInert:!0})},[Q.isOpen,J]),{modalProps:xZ(q),underlayProps:G}}var bb;var vb=k(()=>{zx();Bx();KJ();M2();Mx();bb=S(JZ(),1)});var gb=k(()=>{vb()});var hb=k(()=>{zH()});var ub=k(()=>{G9()});function HI(){let Z=fJ(),[Q,J]=N2.useState(()=>Z?{width:0,height:0}:KI());return N2.useEffect(()=>{let q=(H)=>{J((B)=>{if(H.width===B.width&&H.height===B.height)return B;return H})},G=()=>{if(KY&&KY.scale>1)return;q(KI())},U,K=(H)=>{if(KY&&KY.scale>1)return;if(iU(TZ(H)))U=requestAnimationFrame(()=>{let B=PQ();if(!B||!iU(B))q({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})})};if(q(KI()),pq())window.addEventListener("blur",K,!0);if(!KY)window.addEventListener("resize",G);else KY.addEventListener("resize",G);return()=>{if(cancelAnimationFrame(U),pq())window.removeEventListener("blur",K,!0);if(!KY)window.removeEventListener("resize",G);else KY.removeEventListener("resize",G)}},[]),Q}function KI(){return{width:KY?Math.min(KY.width*KY.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:KY?KY.height*KY.scale:document.documentElement.clientHeight}}var N2,KY;var fb=k(()=>{KX();Kq();G9();e1();N2=S(JZ(),1),KY=typeof document<"u"&&window.visualViewport});var mb=k(()=>{fb()});function jt(Z,Q){[Z,Q]=JX(Z,Q,pb);let J=YX.useContext(TK),q=rA(Z),G=Z.isOpen!=null||Z.defaultOpen!=null||!J?q:J;if(G===J){if(Z.onOpenChange||Z.defaultOpen!==void 0||Z.isOpen!==void 0)console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.")}let U=qY(Q),K=YX.useRef(null),H=NK(U,G.isOpen),B=NK(K,G.isOpen),F=H||B||Z.isExiting||!1,M=fJ();if(!G.isOpen&&!F||M)return null;return YX.default.createElement(Tt,{...Z,state:G,isExiting:F,overlayRef:U,modalRef:K})}function Tt({UNSTABLE_portalContainer:Z,...Q}){let J=Q.modalRef,{state:q}=Q,{modalProps:G,underlayProps:U}=UI(Q,q,J),K=IK(Q.overlayRef)||Q.isEntering||!1,H=sQ({...Q,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:K,isExiting:Q.isExiting,state:q}}),B=HI(),F=void 0,M=void 0;if(typeof document<"u"){let V=cG(document.body)?document.body:document.scrollingElement||document.documentElement,A=V.getBoundingClientRect().width%1,N=V.getBoundingClientRect().height%1;F=V.scrollWidth-A,M=V.scrollHeight-N}let O={...H.style,"--visual-viewport-width":B.width+"px","--visual-viewport-height":B.height+"px","--page-width":F!==void 0?F+"px":void 0,"--page-height":M!==void 0?M+"px":void 0};return YX.default.createElement(aA,{isExiting:Q.isExiting,portalContainer:Z},YX.default.createElement(SQ.div,{...xZ(FQ(Q,{global:!0}),U),...H,style:O,ref:Q.overlayRef,"data-entering":K||void 0,"data-exiting":Q.isExiting||void 0},YX.default.createElement(mJ,{values:[[WI,{modalProps:G,modalRef:J,isExiting:Q.isExiting,isDismissable:Q.isDismissable}],[TK,q]]},H.children)))}function cb(Z){let{modalProps:Q,modalRef:J,isExiting:q,isDismissable:G}=YX.useContext(WI),U=YX.useContext(TK),K=YX.useMemo(()=>hG(Z.modalRef,J),[Z.modalRef,J]),H=qY(K),B=IK(H),F=sQ({...Z,defaultClassName:"react-aria-Modal",values:{isEntering:B,isExiting:q,state:U}});return YX.default.createElement(SQ.div,{...xZ(FQ(Z,{global:!0}),Q),...F,ref:H,"data-entering":B||void 0,"data-exiting":q||void 0},G&&YX.default.createElement(sA,{onDismiss:U.close}),F.children)}var YX,pb,WI,BI,j2;var db=k(()=>{cJ();XI();gb();qb();lq();hb();Uq();K3();zb();oA();ub();a8();mb();YX=S(JZ(),1),pb=YX.createContext(null),WI=YX.createContext(null),BI=YX.forwardRef(function(Q,J){if(YX.useContext(WI)){if(Q.onOpenChange||Q.defaultOpen!==void 0||Q.isOpen!==void 0){let T=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),P=Object.keys(Q).filter((C)=>T.has(C));console.warn(`This modal is already wrapped in a ModalOverlay, props [${P.join(", ")}] should be placed on the ModalOverlay instead.`)}return YX.default.createElement(cb,{...Q,modalRef:J},Q.children)}let{isDismissable:G,isKeyboardDismissDisabled:U,isOpen:K,defaultOpen:H,onOpenChange:B,children:F,isEntering:M,isExiting:O,UNSTABLE_portalContainer:V,shouldCloseOnInteractOutside:A,...N}=Q;return YX.default.createElement(j2,{isDismissable:G,isKeyboardDismissDisabled:U,isOpen:K,defaultOpen:H,onOpenChange:B,isEntering:M,isExiting:O,UNSTABLE_portalContainer:V,shouldCloseOnInteractOutside:A},YX.default.createElement(cb,{...N,modalRef:J},F))});j2=YX.forwardRef(jt)});function PK(Z,Q,J){if(!Z)return"";if(typeof Q==="string")Q=Q.replace(/\s+/g,"");let q=_I.get(Z);if(!q)console.error("There is no tab id, please check if you have rendered the tab panel before the tab list.");return`${q}-${J}-${Q}`}var _I;var T2=k(()=>{_I=new WeakMap});function FI(Z,Q,J){let{key:q,isDisabled:G,shouldSelectOnPressUp:U}=Z,{selectionManager:K,selectedKey:H}=Q,B=q===H,F=G||Q.isDisabled||Q.selectionManager.isDisabled(q),M=Q.collection.getItem(q),{itemProps:O,isPressed:V}=OK({selectionManager:K,key:q,ref:J,isDisabled:F,shouldSelectOnPressUp:U??M?.props.href!=null,linkBehavior:"selection"}),A=PK(Q,q,"tab"),N=PK(Q,q,"tabpanel"),{tabIndex:T}=O,P=FQ(M?.props,{labelable:!0});delete P.id;let C=o8(M?.props),{focusableProps:y}=F9({...M?.props,isDisabled:F},J);return{tabProps:xZ(P,y,C,O,{id:A,"aria-selected":B,"aria-disabled":F||void 0,"aria-controls":B?N:void 0,tabIndex:F?void 0:T,role:"tab"}),isSelected:B,isDisabled:F,isPressed:V}}var lb=k(()=>{bz();T2();KJ();qK();U9();H2()});function nb(Z,Q){let J=Q?.isDisabled,[q,G]=ib.useState(!1);return QQ(()=>{if(Z?.current&&!J){let U=()=>{if(Z.current){let H=Bq(Z.current,{tabbable:!0});G(!!H.nextNode())}};U();let K=new MutationObserver(U);return K.observe(Z.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{K.disconnect()}}}),J?!1:q}var ib;var sb=k(()=>{MH();UJ();ib=S(JZ(),1)});function LI(Z,Q,J){let q=nb(J)?void 0:0,G=PK(Q,Z.id??Q?.selectedKey,"tabpanel"),U=W9({...Z,id:G,"aria-labelledby":PK(Q,Q?.selectedKey,"tab")});return{tabPanelProps:xZ(U,{tabIndex:q,role:"tabpanel","aria-describedby":Z["aria-describedby"],"aria-details":Z["aria-details"]})}}var ab=k(()=>{T2();KJ();sb();ZH()});class MI{constructor(Z,Q,J,q=new Set){this.collection=Z,this.flipDirection=Q==="rtl"&&J==="horizontal",this.disabledKeys=q,this.tabDirection=J==="horizontal"}getKeyLeftOf(Z){if(this.flipDirection)return this.getNextKey(Z);return this.getPreviousKey(Z)}getKeyRightOf(Z){if(this.flipDirection)return this.getPreviousKey(Z);return this.getNextKey(Z)}isDisabled(Z){return this.disabledKeys.has(Z)||!!this.collection.getItem(Z)?.props?.isDisabled}getFirstKey(){let Z=this.collection.getFirstKey();if(Z!=null&&this.isDisabled(Z))Z=this.getNextKey(Z);return Z}getLastKey(){let Z=this.collection.getLastKey();if(Z!=null&&this.isDisabled(Z))Z=this.getPreviousKey(Z);return Z}getKeyAbove(Z){if(this.tabDirection)return null;return this.getPreviousKey(Z)}getKeyBelow(Z){if(this.tabDirection)return null;return this.getNextKey(Z)}getNextKey(Z){let Q=Z;do if(Q=this.collection.getKeyAfter(Q),Q==null)Q=this.collection.getFirstKey();while(Q!=null&&this.isDisabled(Q));return Q}getPreviousKey(Z){let Q=Z;do if(Q=this.collection.getKeyBefore(Q),Q==null)Q=this.collection.getLastKey();while(Q!=null&&this.isDisabled(Q));return Q}}var rb=()=>{};function OI(Z,Q,J){let{orientation:q="horizontal",keyboardActivation:G="automatic"}=Z,{collection:U,selectionManager:K,disabledKeys:H}=Q,{direction:B}=ZK(),F=ob.useMemo(()=>new MI(U,B,q,H),[U,H,q,B]),{collectionProps:M}=gw({ref:J,selectionManager:K,keyboardDelegate:F,selectOnFocus:G==="automatic",disallowEmptySelection:!0,scrollRef:J,linkBehavior:"selection"}),O=EX();_I.set(Q,O);let V=W9({...Z,id:O});return{tabListProps:{...xZ(M,V),role:"tablist","aria-orientation":q,tabIndex:void 0}}}var ob;var tb=k(()=>{KJ();T2();rb();vY();ZH();D3();hw();ob=S(JZ(),1)});var eb=k(()=>{lb();ab();tb()});function Pt({props:Z,forwardedRef:Q}){let J=fQ.useContext(H6),{CollectionRoot:q}=fQ.useContext(_H),{orientation:G="horizontal",keyboardActivation:U="automatic"}=fU(VI),K=qY(Q),{tabListProps:H}=OI({...Z,orientation:G,keyboardActivation:U},J,K),B=sQ({...Z,children:null,defaultClassName:"react-aria-TabList",values:{orientation:G,state:J}}),F=FQ(Z,{global:!0});return delete F.id,fQ.default.createElement(SQ.div,{...xZ(F,B,H),ref:K,"data-orientation":G||void 0},fQ.default.createElement(Bw,null,fQ.default.createElement(q,{collection:J.collection,persistedKeys:nV(J.selectionManager.focusedKey)})))}function Rt(Z){let Q=fQ.useContext(H6),{id:J,tabPanelRef:q,isInitiallySelected:G,isExiting:U,...K}=Z,{tabPanelProps:H}=LI(Z,Q,q),{focusProps:B,isFocused:F,isFocusVisible:M}=hY(),O=Q.selectedKey===Z.id,V=IK(q)&&!G,A=sQ({...Z,defaultClassName:"react-aria-TabPanel",values:{isFocused:F,isFocusVisible:M,isInert:VK(!O),isEntering:V,isExiting:U,state:Q}}),N=FQ(K,{global:!0});delete N.id;let T=O?xZ(N,H,B,A):xZ(N,A);return fQ.default.createElement(SQ.div,{...T,ref:q,"data-focused":F||void 0,"data-focus-visible":M||void 0,inert:VK(!O||Z.inert),"data-inert":!O?"true":void 0,"data-entering":V||void 0,"data-exiting":U||void 0},fQ.default.createElement(mJ,{values:[[VI,null],[H6,null]]},fQ.default.createElement(_H.Provider,{value:iV},A.children)))}var fQ,VI,H6,AI,Zv,II,NI;var Qv=k(()=>{cJ();sV();Y2();_w();eb();rw();BH();FH();XK();lq();zA();Uq();oA();UK();Z6();a8();fQ=S(JZ(),1),VI=fQ.createContext(null),H6=fQ.createContext(null),AI=fQ.forwardRef(function(Q,J){return fQ.useContext(H6)?fQ.default.createElement(Pt,{props:Q,forwardedRef:J}):fQ.default.createElement(pV,Q)});Zv=class Zv extends uY{static{this.type="item"}};II=pG(Zv,(Z,Q,J)=>{let q=fQ.useContext(H6),G=qY(Q),{tabProps:U,isSelected:K,isDisabled:H,isPressed:B}=FI({key:J.key,...Z},q,G),{focusProps:F,isFocused:M,isFocusVisible:O}=hY(),{hoverProps:V,isHovered:A}=BJ({isDisabled:H,onHoverStart:Z.onHoverStart,onHoverEnd:Z.onHoverEnd,onHoverChange:Z.onHoverChange}),N=sQ({...Z,id:void 0,children:J.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:K,isDisabled:H,isFocused:M,isFocusVisible:O,isPressed:B,isHovered:A}}),T=J.props.href?SQ.a:SQ.div,P=FQ(Z,{global:!0});return delete P.id,delete P.onClick,fQ.default.createElement(T,{...xZ(P,N,U,F,V),ref:G,"data-selected":K||void 0,"data-disabled":H||void 0,"data-focused":M||void 0,"data-focus-visible":O||void 0,"data-pressed":B||void 0,"data-hovered":A||void 0},fQ.default.createElement(MK.Provider,{value:{isSelected:K}},N.children))}),NI=dq(function(Q,J){let q=fQ.useContext(H6),G=qY(J),U=q.selectedKey===Q.id,[K,H]=fQ.useState(q.selectedKey!=null?U:null);if(K==null&&q.selectedKey!=null)H(U);else if(!U&&K)H(!1);let B=NK(G,U);if(!U&&!Q.shouldForceMount&&!B)return null;return fQ.default.createElement(Rt,{...Q,tabPanelRef:G,isInitiallySelected:K||!1,isExiting:B})})});var RK,P2,Ct=(Z)=>{let{onHoverStart:Q,onHoverChange:J,onHoverEnd:q,...G}=Z;return G},jI;var TI=k(()=>{cJ();Uq();UK();Z6();RK=S(JZ(),1),P2=RK.createContext({}),jI=RK.forwardRef(function(Q,J){[Q,J]=JX(Q,J,P2);let{hoverProps:q,isHovered:G}=BJ(Q),{isFocused:U,isFocusVisible:K,focusProps:H}=hY({isTextInput:!0,autoFocus:Q.autoFocus}),B=!!Q["aria-invalid"]&&Q["aria-invalid"]!=="false",F=sQ({...Q,values:{isHovered:G,isFocused:U,isFocusVisible:K,isDisabled:Q.disabled||!1,isInvalid:B},defaultClassName:"react-aria-TextArea"});return RK.default.createElement(SQ.textarea,{...xZ(Ct(Q),H,q),...F,ref:J,"data-focused":U||void 0,"data-disabled":Q.disabled||void 0,"data-hovered":G||void 0,"data-focus-visible":K||void 0,"data-invalid":B||void 0})})});var Xv=k(()=>{Pb()});var rq,Jv,jH;var Yv=k(()=>{cJ();yV();qy();iy();Qw();hV();_V();TI();HK();Xv();XK();lq();rq=S(JZ(),1),Jv=rq.createContext(null),jH=dq(function(Q,J){[Q,J]=JX(Q,J,Jv);let{validationBehavior:q}=fU(ly)||{},G=Q.validationBehavior??q??"native",U=rq.useRef(null);[Q,U]=JX(Q,U,Yy);let[K,H]=H3(!Q["aria-label"]&&!Q["aria-labelledby"]),[B,F]=rq.useState("input"),{labelProps:M,inputProps:O,descriptionProps:V,errorMessageProps:A,...N}=JI({...jS(Q),inputElementType:B,label:H,validationBehavior:G},U),T=rq.useCallback((y)=>{if(U.current=y,y)F(y instanceof HTMLTextAreaElement?"textarea":"input")},[U]),P=sQ({...Q,values:{isDisabled:Q.isDisabled||!1,isInvalid:N.isInvalid,isReadOnly:Q.isReadOnly||!1,isRequired:Q.isRequired||!1},defaultClassName:"react-aria-TextField"}),C=FQ(Q,{global:!0});return delete C.id,rq.default.createElement(SQ.div,{...C,...P,ref:J,slot:Q.slot||void 0,"data-disabled":Q.isDisabled||void 0,"data-invalid":N.isInvalid||void 0,"data-readonly":Q.isReadOnly||void 0,"data-required":Q.isRequired||void 0},rq.default.createElement(mJ,{values:[[w3,{...M,ref:K}],[e3,{...O,ref:T}],[P2,{...O,ref:T}],[Zw,{role:"presentation",isInvalid:N.isInvalid,isDisabled:Q.isDisabled||!1}],[A9,{slots:{description:V,errorMessage:A}}],[HH,N]]},P.children))})});class TH{constructor(Z){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=Z?.maxVisibleToasts??1/0,this.wrapUpdate=Z?.wrapUpdate}runWithWrapUpdate(Z,Q){if(this.wrapUpdate)this.wrapUpdate(Z,Q);else Z()}subscribe(Z){return this.subscriptions.add(Z),()=>this.subscriptions.delete(Z)}add(Z,Q={}){let J="_"+Math.random().toString(36).slice(2),q={...Q,content:Z,key:J,timer:Q.timeout?new Gv(()=>this.close(J),Q.timeout):void 0};return this.queue.unshift(q),this.updateVisibleToasts("add"),J}close(Z){let Q=this.queue.findIndex((J)=>J.key===Z);if(Q>=0)this.queue[Q].onClose?.(),this.queue.splice(Q,1);this.updateVisibleToasts("remove")}updateVisibleToasts(Z){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let Q of this.subscriptions)Q()},Z)}pauseAll(){for(let Z of this.visibleToasts)if(Z.timer)Z.timer.pause()}resumeAll(){for(let Z of this.visibleToasts)if(Z.timer)Z.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class Gv{constructor(Z,Q){this.startTime=null,this.remaining=Q,this.callback=Z}reset(Z){this.remaining=Z,this.resume()}pause(){if(this.timerId==null)return;clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime}resume(){if(this.remaining<=0)return;this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining)}}var qv,Dt;var zv=k(()=>{qv=S(JZ(),1),Dt=S(LK(),1)});var Uv=k(()=>{zv()});var Kv=()=>{};var HY=k(()=>{i3();XI();xb();yV();hV();_V();Yx();Ab();db();Vw();Qv();HK();TI();Yv();Kv();Uv()});var $Z;var lG=k(()=>{HY();$X();$Z=fZ(uz,{displayName:"Button",baseClass:"inline-flex items-center justify-center gap-2 rounded-full text-compact leading-4 transition-all duration-200 ease-in-out outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[pending]:opacity-70 data-[pending]:cursor-progress",variants:{variant:{primary:"bg-brand-primary text-fg-inverted hover:bg-neutral-600 hover:shadow-[0_0_5px_0_rgba(0,0,0,0.5)] data-[pressed]:bg-brand-primary data-[pressed]:shadow-none",secondary:"bg-surface-card text-fg border border-border hover:bg-surface-muted hover:border-fg-subtle data-[pressed]:bg-surface-muted",ghost:"bg-transparent text-fg hover:bg-surface-muted data-[pressed]:bg-surface-muted",destructive:"bg-danger text-danger-fg hover:opacity-90 data-[pressed]:opacity-80"},size:{sm:"py-2 px-4",md:"py-3 px-6",lg:"py-4 px-8",prominent:"h-11 px-6 py-0 text-panel-heading font-medium"}},defaultVariants:{variant:"primary",size:"md"}})});var zZ=bG((kt)=>{var W6=S(JZ());(function(){function Z($){if($==null)return null;if(typeof $==="function")return $.$$typeof===s?null:$.displayName||$.name||null;if(typeof $==="string")return $;switch($){case T:return"Fragment";case C:return"Profiler";case P:return"StrictMode";case n:return"Suspense";case e:return"SuspenseList";case GZ:return"Activity"}if(typeof $==="object")switch(typeof $.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case N:return"Portal";case f:return $.displayName||"Context";case y:return($._context.displayName||"Context")+".Consumer";case u:var o=$.render;return $=$.displayName,$||($=o.displayName||o.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case a:return o=$.displayName||null,o!==null?o:Z($.type)||"Memo";case c:o=$._payload,$=$._init;try{return Z($(o))}catch(IZ){}}return null}function Q($){return""+$}function J($){try{Q($);var o=!1}catch(yZ){o=!0}if(o){o=console;var IZ=o.error,PZ=typeof Symbol==="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return IZ.call(o,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",PZ),Q($)}}function q($){if($===T)return"<>";if(typeof $==="object"&&$!==null&&$.$$typeof===c)return"<...>";try{var o=Z($);return o?"<"+o+">":"<...>"}catch(IZ){return"<...>"}}function G(){var $=LZ.A;return $===null?null:$.getOwner()}function U(){return Error("react-stack-top-frame")}function K($){if(HZ.call($,"key")){var o=Object.getOwnPropertyDescriptor($,"key").get;if(o&&o.isReactWarning)return!1}return $.key!==void 0}function H($,o){function IZ(){i||(i=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",o))}IZ.isReactWarning=!0,Object.defineProperty($,"key",{get:IZ,configurable:!0})}function B(){var $=Z(this.type);return x[$]||(x[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function F($,o,IZ,PZ,yZ,sZ){var CZ=IZ.ref;return $={$$typeof:A,type:$,key:o,props:IZ,_owner:PZ},(CZ!==void 0?CZ:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:B}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty($,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:yZ}),Object.defineProperty($,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:sZ}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function M($,o,IZ,PZ,yZ,sZ){var CZ=o.children;if(CZ!==void 0)if(PZ)if(KZ(CZ)){for(PZ=0;PZ<CZ.length;PZ++)O(CZ[PZ]);Object.freeze&&Object.freeze(CZ)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else O(CZ);if(HZ.call(o,"key")){CZ=Z($);var KQ=Object.keys(o).filter(function(bZ){return bZ!=="key"});PZ=0<KQ.length?"{key: someKey, "+KQ.join(": ..., ")+": ...}":"{key: someKey}",t[CZ+PZ]||(KQ=0<KQ.length?"{"+KQ.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
247
|
+
let props = %s;
|
|
248
|
+
<%s {...props} />
|
|
249
|
+
React keys must be passed directly to JSX without using spread:
|
|
250
|
+
let props = %s;
|
|
251
|
+
<%s key={someKey} {...props} />`,PZ,CZ,KQ,CZ),t[CZ+PZ]=!0)}if(CZ=null,IZ!==void 0&&(J(IZ),CZ=""+IZ),K(o)&&(J(o.key),CZ=""+o.key),"key"in o){IZ={};for(var MZ in o)MZ!=="key"&&(IZ[MZ]=o[MZ])}else IZ=o;return CZ&&H(IZ,typeof $==="function"?$.displayName||$.name||"Unknown":$),F($,CZ,IZ,G(),yZ,sZ)}function O($){V($)?$._store&&($._store.validated=1):typeof $==="object"&&$!==null&&$.$$typeof===c&&($._payload.status==="fulfilled"?V($._payload.value)&&$._payload.value._store&&($._payload.value._store.validated=1):$._store&&($._store.validated=1))}function V($){return typeof $==="object"&&$!==null&&$.$$typeof===A}var A=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),f=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),n=Symbol.for("react.suspense"),e=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),GZ=Symbol.for("react.activity"),s=Symbol.for("react.client.reference"),LZ=W6.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,HZ=Object.prototype.hasOwnProperty,KZ=Array.isArray,v=console.createTask?console.createTask:function(){return null};W6={react_stack_bottom_frame:function($){return $()}};var i,x={},d=W6.react_stack_bottom_frame.bind(W6,U)(),YZ=v(q(U)),t={};kt.Fragment=T,kt.jsxDEV=function($,o,IZ,PZ){var yZ=1e4>LZ.recentlyCreatedOwnerStacks++;return M($,o,IZ,PZ,yZ?Error("react-stack-top-frame"):d,yZ?v(q($)):YZ)}})()});var CK,St,AX=({label:Z,description:Q,errorMessage:J,placeholder:q,size:G,rootClassName:U,inputClassName:K,...H})=>CK.jsxDEV(jH,{...H,className:`flex w-full flex-col gap-3 ${U??""}`,children:[CK.jsxDEV(B9,{className:"text-panel-heading font-medium text-fg",children:Z},void 0,!1,void 0,this),CK.jsxDEV(St,{className:K,placeholder:q,fieldSize:G},void 0,!1,void 0,this),Q?CK.jsxDEV(mG,{slot:"description",className:"text-label text-fg-muted",children:Q},void 0,!1,void 0,this):null,CK.jsxDEV(X6,{className:"text-label text-danger",children:J},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var C2=k(()=>{HY();$X();CK=S(zZ(),1),St=fZ(J6,{displayName:"InputControl",baseClass:"w-full rounded-lg border border-border bg-surface px-4 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-2 data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none",variants:{fieldSize:{sm:"h-8",md:"h-10",lg:"h-12",tall:"h-control-tall"}},defaultVariants:{fieldSize:"md"}})});var DK,yt,D2=({label:Z,description:Q,errorMessage:J,placeholder:q,rows:G,...U})=>DK.jsxDEV(jH,{...U,className:"flex w-full flex-col gap-2",children:[DK.jsxDEV(B9,{className:"text-small font-medium text-fg",children:Z},void 0,!1,void 0,this),DK.jsxDEV(yt,{placeholder:q,rows:G},void 0,!1,void 0,this),Q?DK.jsxDEV(mG,{slot:"description",className:"text-label text-fg-muted",children:Q},void 0,!1,void 0,this):null,DK.jsxDEV(X6,{className:"text-label text-danger",children:J},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var Bv=k(()=>{HY();$X();DK=S(zZ(),1),yt=fZ(jI,{displayName:"TextAreaControl",baseClass:"min-h-[120px] w-full resize-y rounded-lg border border-border bg-surface px-4 py-3 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"})});function RI(Z){let Q=Z.trim();return/^(https?:\/\/|mailto:|tel:|\/|#)/i.test(Q)?Q:null}var CI="Only http(s), mailto, tel, or relative (/, #) links are allowed.";var DI,wt;var pz=k(()=>{DI=S(JZ(),1),wt=DI.createContext(!1)});var _v,xt;var Fv=k(()=>{kz();pz();_v=S(JZ(),1),xt=S(zZ(),1)});var dz,bt,Lv,HVZ;var Mv=k(()=>{kz();pz();dz=S(JZ(),1),bt=S(uJ(),1),Lv=S(zZ(),1),HVZ=dz.createContext(null)});var Ov;var Vv=k(()=>{Ov=S(zZ(),1)});var vt;var Av=k(()=>{vt=S(zZ(),1)});var gt;var Iv=k(()=>{gt=S(zZ(),1)});var Nv,IVZ,ht;var $I=k(()=>{HY();$X();pz();Nv=S(zZ(),1),IVZ=fZ(uz,{displayName:"SelectTrigger",baseClass:"flex h-control-tall w-full items-center justify-between gap-2.5 rounded-lg border border-border bg-surface px-5 text-small text-fg outline-none transition-colors data-[hovered]:border-fg-subtle data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"}),ht=fZ(cz,{displayName:"SelectItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"})});var pt,RVZ,CVZ;var jv=k(()=>{HY();$X();pz();pt=S(zZ(),1),RVZ=fZ(J6,{displayName:"ComboBoxInput",baseClass:"h-12 w-full rounded-lg border border-border bg-surface pl-4 pr-11 text-small text-fg outline-none transition-colors placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60"}),CVZ=fZ(cz,{displayName:"ComboBoxItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"})});var EI,Tv,yVZ;var Pv=k(()=>{HY();kz();$X();pz();EI=S(JZ(),1),Tv=S(zZ(),1),yVZ=fZ(cz,{displayName:"MultiSelectItem",baseClass:"group flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"})});var dt;var Rv=k(()=>{dt=S(zZ(),1)});var lt;var Cv=k(()=>{lt=S(zZ(),1)});var Dv;var $v=k(()=>{Dv=S(zZ(),1)});var Ev;var kv=k(()=>{Ev=S(zZ(),1)});var it,nt;var Sv=k(()=>{lG();pz();it=S(JZ(),1),nt=S(zZ(),1)});var st;var kI=k(()=>{st=S(zZ(),1)});var at;var yv=k(()=>{kz();kI();pz();at=S(zZ(),1)});var wv,$2,E2,k2;var B6=k(()=>{HY();$X();wv=S(zZ(),1),$2=fZ(j2,{displayName:"DialogOverlay",baseClass:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-modal-backdrop backdrop-blur-modal-backdrop data-[entering]:animate-modal-overlay-in data-[exiting]:animate-modal-overlay-out"}),E2=fZ(BI,{displayName:"DialogModal",baseClass:"rounded-lg bg-surface p-5 outline-none shadow-modal-surface data-[entering]:animate-modal-surface-in data-[exiting]:animate-modal-surface-out"}),k2=QI});var ot,ZAZ,QAZ;var xv=k(()=>{HY();$X();ot=S(zZ(),1),ZAZ=fZ(U6,{displayName:"DropdownMenuItem",baseClass:"flex cursor-pointer select-none items-center gap-2.5 rounded-md px-4 py-3 text-small text-fg outline-none data-[focused]:bg-surface-card data-[hovered]:bg-surface-card data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",variants:{destructive:{true:"text-danger data-[focused]:text-danger data-[hovered]:text-danger"}}}),QAZ=fZ(rV,{displayName:"DropdownMenuSeparator",baseClass:"my-2 h-px border-0 bg-border"})});var S2,bv,qAZ;var vv=k(()=>{HY();$X();S2=S(JZ(),1),bv=S(zZ(),1),qAZ=fZ(U6,{displayName:"ContextMenuItem",baseClass:"flex min-h-[34px] cursor-pointer select-none items-center gap-2.5 rounded-[10px] px-3 py-1.5 text-compact text-white outline-none data-[focused]:bg-[#2f2f2f] data-[focused]:font-medium data-[hovered]:bg-[#2f2f2f] data-[hovered]:font-medium data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45",variants:{destructive:{true:"text-[#ffb5b5] data-[focused]:text-[#ffb5b5]"}}})});var tt;var SI=k(()=>{tt=S(zZ(),1)});var gv,BAZ;var hv=k(()=>{HY();gv=S(zZ(),1),BAZ=new TH({maxVisibleToasts:5})});var MAZ,OAZ;var uv=k(()=>{HY();$X();MAZ=fZ(GI,{displayName:"Disclosure"}),OAZ=fZ(zI,{displayName:"DisclosurePanel"})});var et;var fv=k(()=>{et=S(zZ(),1)});var jAZ,TAZ,PAZ;var mv=k(()=>{HY();$X();jAZ=fZ(AI,{displayName:"TabList",baseClass:"flex gap-2 border-b border-border"}),TAZ=fZ(II,{displayName:"Tab",baseClass:"cursor-pointer select-none border-b-2 border-transparent px-4 py-3 text-small font-medium text-fg-muted outline-none transition-colors data-[hovered]:text-fg data-[selected]:border-brand-primary data-[selected]:text-fg data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),PAZ=fZ(NI,{displayName:"TabPanel",baseClass:"py-4 text-small text-fg outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring"})});var Ze;var cv=k(()=>{lG();Ze=S(zZ(),1)});var Qe;var pv=k(()=>{Qe=S(zZ(),1)});var Xe,kAZ,y2,w2;var yI=k(()=>{$X();Xe=fZ("h2",{displayName:"DisplayHeading",baseClass:"text-display-large font-medium text-fg"}),kAZ=fZ("h3",{displayName:"PanelHeading",baseClass:"text-panel-heading font-medium text-fg"}),y2=fZ("span",{displayName:"Text",baseClass:"text-fg",variants:{size:{micro:"text-micro",caption:"text-caption",label:"text-label",compact:"text-compact",small:"text-small",callout:"text-callout",body:"text-body",subtitle:"text-subtitle",title:"text-title",headline:"text-headline",display:"text-display"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-medium",bold:"font-medium"},tone:{default:"text-fg",muted:"text-fg-muted",subtle:"text-fg-subtle",inverted:"text-fg-inverted"}},defaultVariants:{size:"body",weight:"regular",tone:"default"}}),w2=fZ("h2",{displayName:"Heading",baseClass:"font-medium tracking-tight text-fg",variants:{level:{"1":"text-heading1","2":"text-heading2","3":"text-heading3","4":"text-heading4","5":"text-heading5"}},defaultVariants:{level:"2"}})});var Je;var dv=k(()=>{SI();Je=S(zZ(),1)});var lv;var iv=k(()=>{$X();lv=fZ("div",{displayName:"Card",baseClass:"relative rounded-lg bg-surface-card",variants:{variant:{plain:"",outlined:"border border-border",elevated:"shadow-md"},padding:{none:"p-0",sm:"p-4",md:"p-6",lg:"p-8"}},defaultVariants:{variant:"plain",padding:"md"}})});var uAZ;var nv=k(()=>{$X();uAZ=fZ("section",{displayName:"Section",baseClass:"w-full",variants:{padding:{none:"py-0",sm:"py-4",md:"py-6 sm:py-8",lg:"py-8 sm:py-12",xl:"py-12 sm:py-16"}},defaultVariants:{padding:"md"}})});var cAZ;var sv=k(()=>{$X();cAZ=fZ("div",{displayName:"PageContainer",baseClass:"w-full",variants:{size:{sm:"max-w-screen-sm mx-auto",md:"max-w-screen-md mx-auto",lg:"max-w-screen-lg mx-auto",xl:"max-w-screen-xl ml-0 mr-0 min-[1200px]:max-w-full","2xl":"max-w-screen-2xl mx-auto min-[1600px]:max-w-full min-[1600px]:mx-0",full:"max-w-full"}}})});var av,Ye,lAZ,iAZ,nAZ;var rv=k(()=>{$X();av=S(JZ(),1),Ye=S(zZ(),1),lAZ=fZ("div",{displayName:"AppShell",baseClass:"grid h-screen w-full overflow-hidden bg-surface grid-rows-[100%] grid-cols-[1fr] md:grid-cols-[auto_1fr]"}),iAZ=fZ("aside",{displayName:"AppShell.Sidebar",baseClass:"h-full w-64 shrink-0 overflow-y-auto border-r border-border bg-surface"}),nAZ=fZ("main",{displayName:"AppShell.Main",baseClass:"min-w-0 flex-1 bg-surface px-6 pb-6 pt-6"})});var ov,qe,Ge,ze,Ue=(Z)=>ov.jsxDEV(ze,{...Z},void 0,!1,void 0,this),Ke,He,oAZ,tAZ,CH;var tv=k(()=>{HY();$X();ov=S(zZ(),1),qe=fZ("header",{displayName:"Topbar",baseClass:"flex h-14 w-full items-center gap-5 border-b border-border"}),Ge=fZ("div",{displayName:"Topbar.Brand",baseClass:"flex min-w-0 items-center gap-3 text-compact leading-4 font-medium tracking-tight text-fg"}),ze=fZ("nav",{displayName:"Topbar.Nav",baseClass:"ml-auto flex min-w-0 items-center gap-2 overflow-x-auto"}),Ke=fZ("div",{displayName:"Topbar.Actions",baseClass:"ml-auto flex items-center gap-4"}),He=fZ("a",{displayName:"Topbar.NavLink",baseClass:"inline-flex items-center rounded-sm px-[13px] py-[6px] text-compact leading-4 whitespace-nowrap text-fg no-underline transition-colors hover:bg-surface-muted hover:text-fg outline-none focus-visible:ring-2 focus-visible:ring-ring data-[active]:bg-surface-muted data-[active]:text-fg",variants:{active:{true:"",false:""}},variantsAsDataAttrs:["active"]}),oAZ=fZ(cz,{displayName:"WorkspaceSwitcher.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[selected]:font-medium"}),tAZ=fZ(U6,{displayName:"UserMenu.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),CH=Object.assign(qe,{Brand:Ge,Nav:Ue,NavLink:He,Actions:Ke})});var We,Be,QIZ;var ev=k(()=>{$X();We=S(JZ(),1),Be=S(zZ(),1),QIZ=fZ("header",{displayName:"PersistentPageShell.Header",baseClass:"flex w-full flex-col gap-6 bg-surface",variants:{sticky:{true:"sticky top-0 z-[1]",false:""}},defaultVariants:{sticky:!1}})});var _e;var Zg=k(()=>{_e=S(zZ(),1)});var Fe,Qg;var Xg=k(()=>{lG();yI();Fe=S(JZ(),1),Qg=S(zZ(),1)});var wI,Le;var xI=k(()=>{wI=S(JZ(),1),Le=S(zZ(),1)});var Me;var Jg=k(()=>{Me=S(zZ(),1)});var Oe;var Yg=k(()=>{xI();Oe=S(zZ(),1)});var $K,qg,Gg=(Z)=>$K.jsxDEV("svg",{...qg,...Z,children:[$K.jsxDEV("circle",{cx:"12",cy:"12",r:"4"},void 0,!1,void 0,this),$K.jsxDEV("path",{d:"M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),zg=(Z)=>$K.jsxDEV("svg",{...qg,...Z,children:$K.jsxDEV("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"},void 0,!1,void 0,this)},void 0,!1,void 0,this);var x2=k(()=>{$K=S(zZ(),1),qg={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0}});var Ve;var Ug=k(()=>{Ve=S(zZ(),1)});function Kg({label:Z,color:Q="grey"}){return vI.jsxDEV("span",{className:`inline-flex items-center rounded-full px-3 py-1 text-caption font-medium leading-none ${Ae[Q]}`,children:Z},void 0,!1,void 0,this)}var bI,vI,Ae;var gI=k(()=>{x2();bI=S(JZ(),1),vI=S(zZ(),1),Ae={green:"bg-brand-green text-fg-on-brand",yellow:"bg-accent-yellow text-fg-on-brand",grey:"bg-surface-muted text-fg",dark:"bg-surface-inverted text-fg-inverted"}});var Ie,Ne;var Hg=k(()=>{gI();Ie=S(JZ(),1),Ne=S(zZ(),1)});var Wg,je;var Bg=k(()=>{x2();Wg=S(JZ(),1),je=S(zZ(),1)});var Te;var _g=k(()=>{Te=S(zZ(),1)});var Fg,Pe;var Lg=k(()=>{lG();B6();Fg=S(JZ(),1),Pe=S(zZ(),1)});var Mg,Re;var Og=k(()=>{lG();B6();Mg=S(JZ(),1),Re=S(zZ(),1)});var Ce,Vg;var Ag=k(()=>{lG();B6();Ce=S(JZ(),1),Vg=S(zZ(),1)});var Ig,De;var Ng=k(()=>{lG();B6();C2();Ig=S(JZ(),1),De=S(zZ(),1)});var $e,Ee;var jg=k(()=>{lG();B6();C2();$I();$e=S(JZ(),1),Ee=S(zZ(),1)});var ke,lIZ,iIZ;var Tg=k(()=>{$X();ke=S(zZ(),1),lIZ=fZ("div",{displayName:"DeliveryStatusModule",baseClass:"grid gap-3 rounded-md bg-surface-inverted p-4 text-fg-inverted"}),iIZ=fZ("span",{displayName:"DeliveryStatusPill",baseClass:"inline-flex min-h-5 items-center rounded-full border border-white/30 px-3"})});var iG=k(()=>{$X();lG();C2();Bv();Fv();Mv();pz();Vv();Av();Iv();$I();jv();Pv();Rv();Cv();$v();kv();Sv();kI();yv();B6();xv();vv();SI();hv();uv();fv();mv();cv();pv();yI();dv();iv();nv();sv();rv();tv();ev();Zg();Xg();xI();Jg();Yg();x2();Ug();Hg();gI();Bg();_g();Lg();Og();Ag();Ng();jg();Tg()});function v2(Z){try{let Q=String(Z).split(".")[1];if(!Q)return!1;let J=JSON.parse(atob(Q.replace(/-/g,"+").replace(/_/g,"/")));return typeof J.exp==="number"&&Date.now()>=J.exp*1000}catch{return!1}}function Pg(){try{let Z=localStorage.getItem(hI);if(Z)return JSON.parse(Z)}catch{}return{baseUrl:"http://localhost:8787",token:"",tenant:"main"}}function Rg(Z){localStorage.setItem(hI,JSON.stringify(Z))}function Cg(){try{localStorage.removeItem(hI)}catch{}}class uI{cfg;onExpired;constructor(Z,Q){this.cfg=Z;this.onExpired=Q}setConfig(Z){this.cfg=Z}base(){return this.cfg.baseUrl.replace(/\/+$/,"")}async call(Z,Q){if(this.onExpired&&this.cfg.token&&v2(this.cfg.token))return this.onExpired(),new Promise(()=>{});let J=await fetch(`${this.base()}/rpc/${Z}`,{method:"POST",headers:{"content-type":"application/json","x-pramen-tenant":this.cfg.tenant||"main",...this.cfg.token?{authorization:`Bearer ${this.cfg.token}`}:{}},body:JSON.stringify(Q??{})}),q;try{q=await J.json()}catch{throw new EK(`non-JSON response (HTTP ${J.status})`,"bad_response",J.status)}if(q.ok!==!0){let G=q.error??`request failed (HTTP ${J.status})`,U=J.status===403?" — check your token has an editor/reviewer role":"";throw new EK(G+U,q.code??"error",J.status)}return q.result}async put(Z,Q,J){let q=Z.startsWith("http")?Z:`${this.base()}${Z}`,G=await fetch(q,{method:"PUT",headers:{"content-type":J},body:Q});if(!G.ok)throw new EK(`upload failed (HTTP ${G.status})`,"upload_failed",G.status)}resolve(Z){return Z.startsWith("http")?Z:`${this.base()}${Z}`}listBlockTypes=()=>this.call("listBlockTypes");listContentTypes=()=>this.call("listContentTypes");getContentType=(Z)=>this.call("getContentType",{id:Z});listPages=()=>this.call("listPages");getPagePreview=(Z,Q)=>this.call("getPage",{slug:Z,locale:Q,preview:!0});listPageAudit=(Z)=>this.call("listPageAudit",{pageId:Z});listMedia=(Z=50,Q=0)=>this.call("listMedia",{limit:Z,offset:Q});getMedia=(Z)=>this.call("getMedia",{id:Z});updateMedia=(Z,Q)=>this.call("updateMedia",{id:Z,alt:Q});deleteMedia=(Z)=>this.call("deleteMedia",{id:Z});async uploadMedia(Z){let Q=Z.type||"application/octet-stream",J=await this.call("signMediaUpload",{contentType:Q,filename:Z.name});return await this.put(J.url,await Z.arrayBuffer(),Q),this.call("createMedia",{ref:J.ref,alt:Z.name})}}var EK,hI="pramen.cmsEditor";var fI=k(()=>{EK=class EK extends Error{code;status;constructor(Z,Q,J){super(Z);this.code=Q;this.status=J;this.name="ApiError"}}});function mI(){Cg(),location.replace(DH)}function PJ(){let Z=dJ.use(Dg);if(!Z)throw Error("useApp must be used within <AppProvider>");return Z}function $g({children:Z}){let[Q,J]=dJ.useState(Pg()),[q,G]=dJ.useState(null),[U,K]=dJ.useState([]),[H,B]=dJ.useState(""),F=Boolean(Q.baseUrl&&Q.token)&&!v2(Q.token),M=dJ.useMemo(()=>new uI(Q,DH?mI:void 0),[Q]);if(dJ.useEffect(()=>{if(!DH)return;let V=()=>{if(!Q.token||v2(Q.token))mI()};V();let A=()=>{if(!document.hidden)V()},N=window.setInterval(V,30000);return window.addEventListener("visibilitychange",A),window.addEventListener("focus",V),()=>{window.clearInterval(N),window.removeEventListener("visibilitychange",A),window.removeEventListener("focus",V)}},[Q.token]),dJ.useEffect(()=>{if(!F)return;M.call("me").then(G).catch(()=>G({})),M.call("listCollections").then(K).catch(()=>K([]))},[M,F]),!F)return DH?null:WY.jsxDEV(Se,{cfg:Q,onSave:(V)=>{Rg(V),J(V)}},void 0,!1,void 0,this);let O={api:M,cfg:Q,me:q,isAdmin:(q?.roles??[]).includes("admin"),collections:U,error:H,setError:B,reconfigure:()=>{if(DH){mI();return}G(null),B(""),J({...Q,token:""})}};return WY.jsxDEV(Dg,{value:O,children:Z},void 0,!1,void 0,this)}function Se({cfg:Z,onSave:Q}){let[J,q]=dJ.useState(Z);return WY.jsxDEV("div",{className:"mx-auto mt-[14vh] w-full max-w-[520px] px-6",children:WY.jsxDEV("div",{className:"rounded-panel border border-border bg-surface-card px-10 py-8 shadow-[0_24px_60px_rgba(30,20,10,0.08)]",children:[WY.jsxDEV("h1",{className:"mb-4 text-display text-fg",children:["pramen ",WY.jsxDEV("span",{className:"text-fg-subtle",children:"· cms editor"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),WY.jsxDEV("p",{className:"mb-6 text-sm text-fg-muted",children:["Point at your Worker and paste an editor/reviewer JWT. CORS must allow this origin (",WY.jsxDEV("code",{children:"CORS_ORIGINS"},void 0,!1,void 0,this),")."]},void 0,!0,void 0,this),WY.jsxDEV("div",{className:"flex flex-col gap-4",children:[WY.jsxDEV(AX,{label:"Worker base URL",value:J.baseUrl,onChange:(G)=>q({...J,baseUrl:G}),placeholder:"https://your-worker.workers.dev"},void 0,!1,void 0,this),WY.jsxDEV(AX,{label:"Tenant",value:J.tenant,onChange:(G)=>q({...J,tenant:G}),placeholder:"main"},void 0,!1,void 0,this),WY.jsxDEV(AX,{label:"Bearer token (editor or reviewer)",value:J.token,onChange:(G)=>q({...J,token:G}),placeholder:"eyJ…"},void 0,!1,void 0,this),WY.jsxDEV($Z,{className:"mt-2 w-full",onPress:()=>Q(J),isDisabled:!J.baseUrl||!J.token,children:"Connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var dJ,WY,DH,Dg;var nG=k(()=>{iG();fI();dJ=S(JZ(),1),WY=S(zZ(),1),DH=typeof window<"u"&&!new URLSearchParams(window.location.search).has("setup")?window.PRAMEN_CMS_EDITOR?.signInUrl:void 0;Dg=dJ.createContext(null)});function RJ(Z){this.content=Z}var pI;var kg=k(()=>{RJ.prototype={constructor:RJ,find:function(Z){for(var Q=0;Q<this.content.length;Q+=2)if(this.content[Q]===Z)return Q;return-1},get:function(Z){var Q=this.find(Z);return Q==-1?void 0:this.content[Q+1]},update:function(Z,Q,J){var q=J&&J!=Z?this.remove(J):this,G=q.find(Z),U=q.content.slice();if(G==-1)U.push(J||Z,Q);else if(U[G+1]=Q,J)U[G]=J;return new RJ(U)},remove:function(Z){var Q=this.find(Z);if(Q==-1)return this;var J=this.content.slice();return J.splice(Q,2),new RJ(J)},addToStart:function(Z,Q){return new RJ([Z,Q].concat(this.remove(Z).content))},addToEnd:function(Z,Q){var J=this.remove(Z).content.slice();return J.push(Z,Q),new RJ(J)},addBefore:function(Z,Q,J){var q=this.remove(Q),G=q.content.slice(),U=q.find(Z);return G.splice(U==-1?G.length:U,0,Q,J),new RJ(G)},forEach:function(Z){for(var Q=0;Q<this.content.length;Q+=2)Z(this.content[Q],this.content[Q+1])},prepend:function(Z){if(Z=RJ.from(Z),!Z.size)return this;return new RJ(Z.content.concat(this.subtract(Z).content))},append:function(Z){if(Z=RJ.from(Z),!Z.size)return this;return new RJ(this.subtract(Z).content.concat(Z.content))},subtract:function(Z){var Q=this;Z=RJ.from(Z);for(var J=0;J<Z.content.length;J+=2)Q=Q.remove(Z.content[J]);return Q},toObject:function(){var Z={};return this.forEach(function(Q,J){Z[Q]=J}),Z},get size(){return this.content.length>>1}};RJ.from=function(Z){if(Z instanceof RJ)return Z;var Q=[];if(Z)for(var J in Z)Q.push(J,Z[J]);return new RJ(Q)};pI=RJ});function fg(Z,Q,J){for(let q=0;;q++){if(q==Z.childCount||q==Q.childCount)return Z.childCount==Q.childCount?null:J;let G=Z.child(q),U=Q.child(q);if(G==U){J+=G.nodeSize;continue}if(!G.sameMarkup(U))return J;if(G.isText&&G.text!=U.text){let K=G.text,H=U.text,B=0;for(;K[B]==H[B];B++)J++;if(B&&B<K.length&&B<H.length&&pg(K.charCodeAt(B-1))&&cg(K.charCodeAt(B)))J--;return J}if(G.content.size||U.content.size){let K=fg(G.content,U.content,J+1);if(K!=null)return K}J+=G.nodeSize}}function mg(Z,Q,J,q){for(let G=Z.childCount,U=Q.childCount;;){if(G==0||U==0)return G==U?null:{a:J,b:q};let K=Z.child(--G),H=Q.child(--U),B=K.nodeSize;if(K==H){J-=B,q-=B;continue}if(!K.sameMarkup(H))return{a:J,b:q};if(K.isText&&K.text!=H.text){let F=K.text,M=H.text,O=F.length,V=M.length;while(O>0&&V>0&&F[O-1]==M[V-1])O--,V--,J--,q--;if(O&&V&&O<F.length&&pg(F.charCodeAt(O-1))&&cg(F.charCodeAt(O)))J++,q++;return{a:J,b:q}}if(K.content.size||H.content.size){let F=mg(K.content,H.content,J-1,q-1);if(F)return F}J-=B,q-=B}}function cg(Z){return Z>=56320&&Z<57344}function pg(Z){return Z>=55296&&Z<56320}class UZ{constructor(Z,Q){if(this.content=Z,this.size=Q||0,Q==null)for(let J=0;J<Z.length;J++)this.size+=Z[J].nodeSize}nodesBetween(Z,Q,J,q=0,G){for(let U=0,K=0;K<Q;U++){let H=this.content[U],B=K+H.nodeSize;if(B>Z&&J(H,q+K,G||null,U)!==!1&&H.content.size){let F=K+1;H.nodesBetween(Math.max(0,Z-F),Math.min(H.content.size,Q-F),J,q+F)}K=B}}descendants(Z){this.nodesBetween(0,this.size,Z)}textBetween(Z,Q,J,q){let G="",U=!0;return this.nodesBetween(Z,Q,(K,H)=>{let B=K.isText?K.text.slice(Math.max(Z,H)-H,Q-H):!K.isLeaf?"":q?typeof q==="function"?q(K):q:K.type.spec.leafText?K.type.spec.leafText(K):"";if(K.isBlock&&(K.isLeaf&&B||K.isTextblock)&&J)if(U)U=!1;else G+=J;G+=B},0),G}append(Z){if(!Z.size)return this;if(!this.size)return Z;let Q=this.lastChild,J=Z.firstChild,q=this.content.slice(),G=0;if(Q.isText&&Q.sameMarkup(J))q[q.length-1]=Q.withText(Q.text+J.text),G=1;for(;G<Z.content.length;G++)q.push(Z.content[G]);return new UZ(q,this.size+Z.size)}cut(Z,Q=this.size){if(Z==0&&Q==this.size)return this;let J=[],q=0;if(Q>Z)for(let G=0,U=0;U<Q;G++){let K=this.content[G],H=U+K.nodeSize;if(H>Z){if(U<Z||H>Q)if(K.isText)K=K.cut(Math.max(0,Z-U),Math.min(K.text.length,Q-U));else K=K.cut(Math.max(0,Z-U-1),Math.min(K.content.size,Q-U-1));J.push(K),q+=K.nodeSize}U=H}return new UZ(J,q)}cutByIndex(Z,Q){if(Z==Q)return UZ.empty;if(Z==0&&Q==this.content.length)return this;return new UZ(this.content.slice(Z,Q))}replaceChild(Z,Q){let J=this.content[Z];if(J==Q)return this;let q=this.content.slice(),G=this.size+Q.nodeSize-J.nodeSize;return q[Z]=Q,new UZ(q,G)}addToStart(Z){return new UZ([Z].concat(this.content),this.size+Z.nodeSize)}addToEnd(Z){return new UZ(this.content.concat(Z),this.size+Z.nodeSize)}eq(Z){if(this.content.length!=Z.content.length)return!1;for(let Q=0;Q<this.content.length;Q++)if(!this.content[Q].eq(Z.content[Q]))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(Z){let Q=this.content[Z];if(!Q)throw RangeError("Index "+Z+" out of range for "+this);return Q}maybeChild(Z){return this.content[Z]||null}forEach(Z){for(let Q=0,J=0;Q<this.content.length;Q++){let q=this.content[Q];Z(q,J,Q),J+=q.nodeSize}}findDiffStart(Z,Q=0){return fg(this,Z,Q)}findDiffEnd(Z,Q=this.size,J=Z.size){return mg(this,Z,Q,J)}findIndex(Z){if(Z==0)return h2(0,Z);if(Z==this.size)return h2(this.content.length,Z);if(Z>this.size||Z<0)throw RangeError(`Position ${Z} outside of fragment (${this})`);for(let Q=0,J=0;;Q++){let q=this.child(Q),G=J+q.nodeSize;if(G>=Z){if(G==Z)return h2(Q+1,G);return h2(Q,J)}J=G}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((Z)=>Z.toJSON()):null}static fromJSON(Z,Q){if(!Q)return UZ.empty;if(!Array.isArray(Q))throw RangeError("Invalid input for Fragment.fromJSON");return UZ.fromArray(Q.map(Z.nodeFromJSON))}static fromArray(Z){if(!Z.length)return UZ.empty;let Q,J=0;for(let q=0;q<Z.length;q++){let G=Z[q];if(J+=G.nodeSize,q&&G.isText&&Z[q-1].sameMarkup(G)){if(!Q)Q=Z.slice(0,q);Q[Q.length-1]=G.withText(Q[Q.length-1].text+G.text)}else if(Q)Q.push(G)}return new UZ(Q||Z,J)}static from(Z){if(!Z)return UZ.empty;if(Z instanceof UZ)return Z;if(Array.isArray(Z))return this.fromArray(Z);if(Z.attrs)return new UZ([Z],Z.nodeSize);throw RangeError("Can not convert "+Z+" to a Fragment"+(Z.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}function h2(Z,Q){return dI.index=Z,dI.offset=Q,dI}function m2(Z,Q){if(Z===Q)return!0;if(!(Z&&typeof Z=="object")||!(Q&&typeof Q=="object"))return!1;let J=Array.isArray(Z);if(Array.isArray(Q)!=J)return!1;if(J){if(Z.length!=Q.length)return!1;for(let q=0;q<Z.length;q++)if(!m2(Z[q],Q[q]))return!1}else{for(let q in Z)if(!(q in Q)||!m2(Z[q],Q[q]))return!1;for(let q in Q)if(!(q in Z))return!1}return!0}class wQ{constructor(Z,Q){this.type=Z,this.attrs=Q}addToSet(Z){let Q,J=!1;for(let q=0;q<Z.length;q++){let G=Z[q];if(this.eq(G))return Z;if(this.type.excludes(G.type)){if(!Q)Q=Z.slice(0,q)}else if(G.type.excludes(this.type))return Z;else{if(!J&&G.type.rank>this.type.rank){if(!Q)Q=Z.slice(0,q);Q.push(this),J=!0}if(Q)Q.push(G)}}if(!Q)Q=Z.slice();if(!J)Q.push(this);return Q}removeFromSet(Z){for(let Q=0;Q<Z.length;Q++)if(this.eq(Z[Q]))return Z.slice(0,Q).concat(Z.slice(Q+1));return Z}isInSet(Z){for(let Q=0;Q<Z.length;Q++)if(this.eq(Z[Q]))return!0;return!1}eq(Z){return this==Z||this.type==Z.type&&m2(this.attrs,Z.attrs)}toJSON(){let Z={type:this.type.name};for(let Q in this.attrs){Z.attrs=this.attrs;break}return Z}static fromJSON(Z,Q){if(!Q)throw RangeError("Invalid input for Mark.fromJSON");let J=Z.marks[Q.type];if(!J)throw RangeError(`There is no mark type ${Q.type} in this schema`);let q=J.create(Q.attrs);return J.checkAttrs(q.attrs),q}static sameSet(Z,Q){if(Z==Q)return!0;if(Z.length!=Q.length)return!1;for(let J=0;J<Z.length;J++)if(!Z[J].eq(Q[J]))return!1;return!0}static setFrom(Z){if(!Z||Array.isArray(Z)&&Z.length==0)return wQ.none;if(Z instanceof wQ)return[Z];let Q=Z.slice();return Q.sort((J,q)=>J.type.rank-q.type.rank),Q}}class AZ{constructor(Z,Q,J){this.content=Z,this.openStart=Q,this.openEnd=J}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(Z,Q){let J=lg(this.content,Z+this.openStart,Q,this.openStart+1,this.openEnd+1);return J&&new AZ(J,this.openStart,this.openEnd)}removeBetween(Z,Q){return new AZ(dg(this.content,Z+this.openStart,Q+this.openStart),this.openStart,this.openEnd)}eq(Z){return this.content.eq(Z.content)&&this.openStart==Z.openStart&&this.openEnd==Z.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let Z={content:this.content.toJSON()};if(this.openStart>0)Z.openStart=this.openStart;if(this.openEnd>0)Z.openEnd=this.openEnd;return Z}static fromJSON(Z,Q){if(!Q)return AZ.empty;let J=Q.openStart||0,q=Q.openEnd||0;if(typeof J!="number"||typeof q!="number")throw RangeError("Invalid input for Slice.fromJSON");return new AZ(UZ.fromJSON(Z,Q.content),J,q)}static maxOpen(Z,Q=!0){let J=0,q=0;for(let G=Z.firstChild;G&&!G.isLeaf&&(Q||!G.type.spec.isolating);G=G.firstChild)J++;for(let G=Z.lastChild;G&&!G.isLeaf&&(Q||!G.type.spec.isolating);G=G.lastChild)q++;return new AZ(Z,J,q)}}function dg(Z,Q,J){let{index:q,offset:G}=Z.findIndex(Q),U=Z.maybeChild(q),{index:K,offset:H}=Z.findIndex(J);if(G==Q||U.isText){if(H!=J&&!Z.child(K).isText)throw RangeError("Removing non-flat range");return Z.cut(0,Q).append(Z.cut(J))}if(q!=K)throw RangeError("Removing non-flat range");return Z.replaceChild(q,U.copy(dg(U.content,Q-G-1,J-G-1)))}function lg(Z,Q,J,q,G,U){let{index:K,offset:H}=Z.findIndex(Q),B=Z.maybeChild(K);if(H==Q||B.isText){if(U&&q<=0&&G<=0&&!U.canReplace(K,K,J))return null;return Z.cut(0,Q).append(J).append(Z.cut(Q))}let F=lg(B.content,Q-H-1,J,K==0?q-1:0,K==Z.childCount-1?G-1:0,B);return F&&Z.replaceChild(K,B.copy(F))}function ye(Z,Q,J){if(J.openStart>Z.depth)throw new L6("Inserted content deeper than insertion position");if(Z.depth-J.openStart!=Q.depth-J.openEnd)throw new L6("Inconsistent open depths");return ig(Z,Q,J,0)}function ig(Z,Q,J,q){let G=Z.index(q),U=Z.node(q);if(G==Q.index(q)&&q<Z.depth-J.openStart){let K=ig(Z,Q,J,q+1);return U.copy(U.content.replaceChild(G,K))}else if(!J.content.size)return F6(U,c2(Z,Q,q));else if(!J.openStart&&!J.openEnd&&Z.depth==q&&Q.depth==q){let K=Z.parent,H=K.content;return F6(K,H.cut(0,Z.parentOffset).append(J.content).append(H.cut(Q.parentOffset)))}else{let{start:K,end:H}=we(J,Z);return F6(U,sg(Z,K,H,Q,q))}}function ng(Z,Q){if(!Q.type.compatibleContent(Z.type))throw new L6("Cannot join "+Q.type.name+" onto "+Z.type.name)}function lI(Z,Q,J){let q=Z.node(J);return ng(q,Q.node(J)),q}function _6(Z,Q){let J=Q.length-1;if(J>=0&&Z.isText&&Z.sameMarkup(Q[J]))Q[J]=Z.withText(Q[J].text+Z.text);else Q.push(Z)}function EH(Z,Q,J,q){let G=(Q||Z).node(J),U=0,K=Q?Q.index(J):G.childCount;if(Z){if(U=Z.index(J),Z.depth>J)U++;else if(Z.textOffset)_6(Z.nodeAfter,q),U++}for(let H=U;H<K;H++)_6(G.child(H),q);if(Q&&Q.depth==J&&Q.textOffset)_6(Q.nodeBefore,q)}function F6(Z,Q){if(!Z.type.validContent(Q))throw new L6("Invalid content for node "+Z.type.name);return Z.copy(Q)}function sg(Z,Q,J,q,G){let U=Z.depth>G&&lI(Z,Q,G+1),K=q.depth>G&&lI(J,q,G+1),H=[];if(EH(null,Z,G,H),U&&K&&Q.index(G)==J.index(G))ng(U,K),_6(F6(U,sg(Z,Q,J,q,G+1)),H);else{if(U)_6(F6(U,c2(Z,Q,G+1)),H);if(EH(Q,J,G,H),K)_6(F6(K,c2(J,q,G+1)),H)}return EH(q,null,G,H),new UZ(H)}function c2(Z,Q,J){let q=[];if(EH(null,Z,J,q),Z.depth>J){let G=lI(Z,Q,J+1);_6(F6(G,c2(Z,Q,J+1)),q)}return EH(Q,null,J,q),new UZ(q)}function we(Z,Q){let J=Q.depth-Z.openStart,G=Q.node(J).copy(Z.content);for(let U=J-1;U>=0;U--)G=Q.node(U).copy(UZ.from(G));return{start:G.resolveNoCache(Z.openStart+J),end:G.resolveNoCache(G.content.size-Z.openEnd-J)}}class SH{constructor(Z,Q,J){this.pos=Z,this.path=Q,this.parentOffset=J,this.depth=Q.length/3-1}resolveDepth(Z){if(Z==null)return this.depth;if(Z<0)return this.depth+Z;return Z}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(Z){return this.path[this.resolveDepth(Z)*3]}index(Z){return this.path[this.resolveDepth(Z)*3+1]}indexAfter(Z){return Z=this.resolveDepth(Z),this.index(Z)+(Z==this.depth&&!this.textOffset?0:1)}start(Z){return Z=this.resolveDepth(Z),Z==0?0:this.path[Z*3-1]+1}end(Z){return Z=this.resolveDepth(Z),this.start(Z)+this.node(Z).content.size}before(Z){if(Z=this.resolveDepth(Z),!Z)throw RangeError("There is no position before the top-level node");return Z==this.depth+1?this.pos:this.path[Z*3-1]}after(Z){if(Z=this.resolveDepth(Z),!Z)throw RangeError("There is no position after the top-level node");return Z==this.depth+1?this.pos:this.path[Z*3-1]+this.path[Z*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let Z=this.parent,Q=this.index(this.depth);if(Q==Z.childCount)return null;let J=this.pos-this.path[this.path.length-1],q=Z.child(Q);return J?Z.child(Q).cut(J):q}get nodeBefore(){let Z=this.index(this.depth),Q=this.pos-this.path[this.path.length-1];if(Q)return this.parent.child(Z).cut(0,Q);return Z==0?null:this.parent.child(Z-1)}posAtIndex(Z,Q){Q=this.resolveDepth(Q);let J=this.path[Q*3],q=Q==0?0:this.path[Q*3-1]+1;for(let G=0;G<Z;G++)q+=J.child(G).nodeSize;return q}marks(){let Z=this.parent,Q=this.index();if(Z.content.size==0)return wQ.none;if(this.textOffset)return Z.child(Q).marks;let J=Z.maybeChild(Q-1),q=Z.maybeChild(Q);if(!J){let K=J;J=q,q=K}let G=J.marks;for(var U=0;U<G.length;U++)if(G[U].type.spec.inclusive===!1&&(!q||!G[U].isInSet(q.marks)))G=G[U--].removeFromSet(G);return G}marksAcross(Z){let Q=this.parent.maybeChild(this.index());if(!Q||!Q.isInline)return null;let J=Q.marks,q=Z.parent.maybeChild(Z.index());for(var G=0;G<J.length;G++)if(J[G].type.spec.inclusive===!1&&(!q||!J[G].isInSet(q.marks)))J=J[G--].removeFromSet(J);return J}sharedDepth(Z){for(let Q=this.depth;Q>0;Q--)if(this.start(Q)<=Z&&this.end(Q)>=Z)return Q;return 0}blockRange(Z=this,Q){if(Z.pos<this.pos)return Z.blockRange(this);for(let J=this.depth-(this.parent.inlineContent||this.pos==Z.pos?1:0);J>=0;J--)if(Z.pos<=this.end(J)&&(!Q||Q(this.node(J))))return new kK(this,Z,J);return null}sameParent(Z){return this.pos-this.parentOffset==Z.pos-Z.parentOffset}max(Z){return Z.pos>this.pos?Z:this}min(Z){return Z.pos<this.pos?Z:this}toString(){let Z="";for(let Q=1;Q<=this.depth;Q++)Z+=(Z?"/":"")+this.node(Q).type.name+"_"+this.index(Q-1);return Z+":"+this.parentOffset}static resolve(Z,Q){if(!(Q>=0&&Q<=Z.content.size))throw RangeError("Position "+Q+" out of range");let J=[],q=0,G=Q;for(let U=Z;;){let{index:K,offset:H}=U.content.findIndex(G),B=G-H;if(J.push(U,K,q+H),!B)break;if(U=U.child(K),U.isText)break;G=B-1,q+=H+1}return new SH(Q,J,G)}static resolveCached(Z,Q){let J=Sg.get(Z);if(J)for(let G=0;G<J.elts.length;G++){let U=J.elts[G];if(U.pos==Q)return U}else Sg.set(Z,J=new ag);let q=J.elts[J.i]=SH.resolve(Z,Q);return J.i=(J.i+1)%xe,q}}class ag{constructor(){this.elts=[],this.i=0}}class kK{constructor(Z,Q,J){this.$from=Z,this.$to=Q,this.depth=J}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)}}class lJ{constructor(Z,Q,J,q=wQ.none){this.type=Z,this.attrs=Q,this.marks=q,this.content=J||UZ.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(Z){return this.content.child(Z)}maybeChild(Z){return this.content.maybeChild(Z)}forEach(Z){this.content.forEach(Z)}nodesBetween(Z,Q,J,q=0){this.content.nodesBetween(Z,Q,J,q,this)}descendants(Z){this.nodesBetween(0,this.content.size,Z)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(Z,Q,J,q){return this.content.textBetween(Z,Q,J,q)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(Z){return this==Z||this.sameMarkup(Z)&&this.content.eq(Z.content)}sameMarkup(Z){return this.hasMarkup(Z.type,Z.attrs,Z.marks)}hasMarkup(Z,Q,J){return this.type==Z&&m2(this.attrs,Q||Z.defaultAttrs||be)&&wQ.sameSet(this.marks,J||wQ.none)}copy(Z=null){if(Z==this.content)return this;return new lJ(this.type,this.attrs,Z,this.marks)}mark(Z){return Z==this.marks?this:new lJ(this.type,this.attrs,this.content,Z)}cut(Z,Q=this.content.size){if(Z==0&&Q==this.content.size)return this;return this.copy(this.content.cut(Z,Q))}slice(Z,Q=this.content.size,J=!1){if(Z==Q)return AZ.empty;let q=this.resolve(Z),G=this.resolve(Q),U=J?0:q.sharedDepth(Q),K=q.start(U),B=q.node(U).content.cut(q.pos-K,G.pos-K);return new AZ(B,q.depth-U,G.depth-U)}replace(Z,Q,J){return ye(this.resolve(Z),this.resolve(Q),J)}nodeAt(Z){for(let Q=this;;){let{index:J,offset:q}=Q.content.findIndex(Z);if(Q=Q.maybeChild(J),!Q)return null;if(q==Z||Q.isText)return Q;Z-=q+1}}childAfter(Z){let{index:Q,offset:J}=this.content.findIndex(Z);return{node:this.content.maybeChild(Q),index:Q,offset:J}}childBefore(Z){if(Z==0)return{node:null,index:0,offset:0};let{index:Q,offset:J}=this.content.findIndex(Z);if(J<Z)return{node:this.content.child(Q),index:Q,offset:J};let q=this.content.child(Q-1);return{node:q,index:Q-1,offset:J-q.nodeSize}}resolve(Z){return SH.resolveCached(this,Z)}resolveNoCache(Z){return SH.resolve(this,Z)}rangeHasMark(Z,Q,J){let q=!1;if(Q>Z)this.nodesBetween(Z,Q,(G)=>{if(J.isInSet(G.marks))q=!0;return!q});return q}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 Z=this.type.name;if(this.content.size)Z+="("+this.content.toStringInner()+")";return rg(this.marks,Z)}contentMatchAt(Z){let Q=this.type.contentMatch.matchFragment(this.content,0,Z);if(!Q)throw Error("Called contentMatchAt on a node with invalid content");return Q}canReplace(Z,Q,J=UZ.empty,q=0,G=J.childCount){let U=this.contentMatchAt(Z).matchFragment(J,q,G),K=U&&U.matchFragment(this.content,Q);if(!K||!K.validEnd)return!1;for(let H=q;H<G;H++)if(!this.type.allowsMarks(J.child(H).marks))return!1;return!0}canReplaceWith(Z,Q,J,q){if(q&&!this.type.allowsMarks(q))return!1;let G=this.contentMatchAt(Z).matchType(J),U=G&&G.matchFragment(this.content,Q);return U?U.validEnd:!1}canAppend(Z){if(Z.content.size)return this.canReplace(this.childCount,this.childCount,Z.content);else return this.type.compatibleContent(Z.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let Z=wQ.none;for(let Q=0;Q<this.marks.length;Q++){let J=this.marks[Q];J.type.checkAttrs(J.attrs),Z=J.addToSet(Z)}if(!wQ.sameSet(Z,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((Q)=>Q.type.name)}`);this.content.forEach((Q)=>Q.check())}toJSON(){let Z={type:this.type.name};for(let Q in this.attrs){Z.attrs=this.attrs;break}if(this.content.size)Z.content=this.content.toJSON();if(this.marks.length)Z.marks=this.marks.map((Q)=>Q.toJSON());return Z}static fromJSON(Z,Q){if(!Q)throw RangeError("Invalid input for Node.fromJSON");let J=void 0;if(Q.marks){if(!Array.isArray(Q.marks))throw RangeError("Invalid mark data for Node.fromJSON");J=Q.marks.map(Z.markFromJSON)}if(Q.type=="text"){if(typeof Q.text!="string")throw RangeError("Invalid text node in JSON");return Z.text(Q.text,J)}let q=UZ.fromJSON(Z,Q.content),G=Z.nodeType(Q.type).create(Q.attrs,q,J);return G.type.checkAttrs(G.attrs),G}}function rg(Z,Q){for(let J=Z.length-1;J>=0;J--)Q=Z[J].type.name+"("+Q+")";return Q}class M6{constructor(Z){this.validEnd=Z,this.next=[],this.wrapCache=[]}static parse(Z,Q){let J=new og(Z,Q);if(J.next==null)return M6.empty;let q=tg(J);if(J.next)J.err("Unexpected trailing text");let G=ce(me(q));return pe(G,J),G}matchType(Z){for(let Q=0;Q<this.next.length;Q++)if(this.next[Q].type==Z)return this.next[Q].next;return null}matchFragment(Z,Q=0,J=Z.childCount){let q=this;for(let G=Q;q&&G<J;G++)q=q.matchType(Z.child(G).type);return q}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let Z=0;Z<this.next.length;Z++){let{type:Q}=this.next[Z];if(!(Q.isText||Q.hasRequiredAttrs()))return Q}return null}compatible(Z){for(let Q=0;Q<this.next.length;Q++)for(let J=0;J<Z.next.length;J++)if(this.next[Q].type==Z.next[J].type)return!0;return!1}fillBefore(Z,Q=!1,J=0){let q=[this];function G(U,K){let H=U.matchFragment(Z,J);if(H&&(!Q||H.validEnd))return UZ.from(K.map((B)=>B.createAndFill()));for(let B=0;B<U.next.length;B++){let{type:F,next:M}=U.next[B];if(!(F.isText||F.hasRequiredAttrs())&&q.indexOf(M)==-1){q.push(M);let O=G(M,K.concat(F));if(O)return O}}return null}return G(this,[])}findWrapping(Z){for(let J=0;J<this.wrapCache.length;J+=2)if(this.wrapCache[J]==Z)return this.wrapCache[J+1];let Q=this.computeWrapping(Z);return this.wrapCache.push(Z,Q),Q}computeWrapping(Z){let Q=Object.create(null),J=[{match:this,type:null,via:null}];while(J.length){let q=J.shift(),G=q.match;if(G.matchType(Z)){let U=[];for(let K=q;K.type;K=K.via)U.push(K.type);return U.reverse()}for(let U=0;U<G.next.length;U++){let{type:K,next:H}=G.next[U];if(!K.isLeaf&&!K.hasRequiredAttrs()&&!(K.name in Q)&&(!q.type||H.validEnd))J.push({match:K.contentMatch,type:K,via:q}),Q[K.name]=!0}}return null}get edgeCount(){return this.next.length}edge(Z){if(Z>=this.next.length)throw RangeError(`There's no ${Z}th edge in this content match`);return this.next[Z]}toString(){let Z=[];function Q(J){Z.push(J);for(let q=0;q<J.next.length;q++)if(Z.indexOf(J.next[q].next)==-1)Q(J.next[q].next)}return Q(this),Z.map((J,q)=>{let G=q+(J.validEnd?"*":" ")+" ";for(let U=0;U<J.next.length;U++)G+=(U?", ":"")+J.next[U].type.name+"->"+Z.indexOf(J.next[U].next);return G}).join(`
|
|
252
|
+
`)}}class og{constructor(Z,Q){if(this.string=Z,this.nodeTypes=Q,this.inline=null,this.pos=0,this.tokens=Z.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]=="")this.tokens.pop();if(this.tokens[0]=="")this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(Z){return this.next==Z&&(this.pos++||!0)}err(Z){throw SyntaxError(Z+" (in content expression '"+this.string+"')")}}function tg(Z){let Q=[];do Q.push(ve(Z));while(Z.eat("|"));return Q.length==1?Q[0]:{type:"choice",exprs:Q}}function ve(Z){let Q=[];do Q.push(ge(Z));while(Z.next&&Z.next!=")"&&Z.next!="|");return Q.length==1?Q[0]:{type:"seq",exprs:Q}}function ge(Z){let Q=fe(Z);for(;;)if(Z.eat("+"))Q={type:"plus",expr:Q};else if(Z.eat("*"))Q={type:"star",expr:Q};else if(Z.eat("?"))Q={type:"opt",expr:Q};else if(Z.eat("{"))Q=he(Z,Q);else break;return Q}function yg(Z){if(/\D/.test(Z.next))Z.err("Expected number, got '"+Z.next+"'");let Q=Number(Z.next);return Z.pos++,Q}function he(Z,Q){let J=yg(Z),q=J;if(Z.eat(","))if(Z.next!="}")q=yg(Z);else q=-1;if(!Z.eat("}"))Z.err("Unclosed braced range");return{type:"range",min:J,max:q,expr:Q}}function ue(Z,Q){let J=Z.nodeTypes,q=J[Q];if(q)return[q];let G=[];for(let U in J){let K=J[U];if(K.isInGroup(Q))G.push(K)}if(G.length==0)Z.err("No node type or group '"+Q+"' found");return G}function fe(Z){if(Z.eat("(")){let Q=tg(Z);if(!Z.eat(")"))Z.err("Missing closing paren");return Q}else if(!/\W/.test(Z.next)){let Q=ue(Z,Z.next).map((J)=>{if(Z.inline==null)Z.inline=J.isInline;else if(Z.inline!=J.isInline)Z.err("Mixing inline and block content");return{type:"name",value:J}});return Z.pos++,Q.length==1?Q[0]:{type:"choice",exprs:Q}}else Z.err("Unexpected token '"+Z.next+"'")}function me(Z){let Q=[[]];return G(U(Z,0),J()),Q;function J(){return Q.push([])-1}function q(K,H,B){let F={term:B,to:H};return Q[K].push(F),F}function G(K,H){K.forEach((B)=>B.to=H)}function U(K,H){if(K.type=="choice")return K.exprs.reduce((B,F)=>B.concat(U(F,H)),[]);else if(K.type=="seq")for(let B=0;;B++){let F=U(K.exprs[B],H);if(B==K.exprs.length-1)return F;G(F,H=J())}else if(K.type=="star"){let B=J();return q(H,B),G(U(K.expr,B),B),[q(B)]}else if(K.type=="plus"){let B=J();return G(U(K.expr,H),B),G(U(K.expr,B),B),[q(B)]}else if(K.type=="opt")return[q(H)].concat(U(K.expr,H));else if(K.type=="range"){let B=H;for(let F=0;F<K.min;F++){let M=J();G(U(K.expr,B),M),B=M}if(K.max==-1)G(U(K.expr,B),B);else for(let F=K.min;F<K.max;F++){let M=J();q(B,M),G(U(K.expr,B),M),B=M}return[q(B)]}else if(K.type=="name")return[q(H,void 0,K.value)];else throw Error("Unknown expr type")}}function eg(Z,Q){return Q-Z}function wg(Z,Q){let J=[];return q(Q),J.sort(eg);function q(G){let U=Z[G];if(U.length==1&&!U[0].term)return q(U[0].to);J.push(G);for(let K=0;K<U.length;K++){let{term:H,to:B}=U[K];if(!H&&J.indexOf(B)==-1)q(B)}}}function ce(Z){let Q=Object.create(null);return J(wg(Z,0));function J(q){let G=[];q.forEach((K)=>{Z[K].forEach(({term:H,to:B})=>{if(!H)return;let F;for(let M=0;M<G.length;M++)if(G[M][0]==H)F=G[M][1];wg(Z,B).forEach((M)=>{if(!F)G.push([H,F=[]]);if(F.indexOf(M)==-1)F.push(M)})})});let U=Q[q.join(",")]=new M6(q.indexOf(Z.length-1)>-1);for(let K=0;K<G.length;K++){let H=G[K][1].sort(eg);U.next.push({type:G[K][0],next:Q[H.join(",")]||J(H)})}return U}}function pe(Z,Q){for(let J=0,q=[Z];J<q.length;J++){let G=q[J],U=!G.validEnd,K=[];for(let H=0;H<G.next.length;H++){let{type:B,next:F}=G.next[H];if(K.push(B.name),U&&!(B.isText||B.hasRequiredAttrs()))U=!1;if(q.indexOf(F)==-1)q.push(F)}if(U)Q.err("Only non-generatable nodes ("+K.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Zh(Z){let Q=Object.create(null);for(let J in Z){let q=Z[J];if(!q.hasDefault)return null;Q[J]=q.default}return Q}function Qh(Z,Q){let J=Object.create(null);for(let q in Z){let G=Q&&Q[q];if(G===void 0){let U=Z[q];if(U.hasDefault)G=U.default;else throw RangeError("No value supplied for attribute "+q)}J[q]=G}return J}function Xh(Z,Q,J,q){for(let G in Q)if(!(G in Z))throw RangeError(`Unsupported attribute ${G} for ${J} of type ${q}`);for(let G in Z)if(Z[G].validate)Z[G].validate(Q[G])}function Jh(Z,Q){let J=Object.create(null);if(Q)for(let q in Q)J[q]=new Yh(Z,q,Q[q]);return J}class d2{constructor(Z,Q,J){this.name=Z,this.schema=Q,this.spec=J,this.markSet=null,this.groups=J.group?J.group.split(" "):[],this.attrs=Jh(Z,J.attrs),this.defaultAttrs=Zh(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(J.inline||Z=="text"),this.isText=Z=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==M6.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(Z){return this.groups.indexOf(Z)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let Z in this.attrs)if(this.attrs[Z].isRequired)return!0;return!1}compatibleContent(Z){return this==Z||this.contentMatch.compatible(Z.contentMatch)}computeAttrs(Z){if(!Z&&this.defaultAttrs)return this.defaultAttrs;else return Qh(this.attrs,Z)}create(Z=null,Q,J){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new lJ(this,this.computeAttrs(Z),UZ.from(Q),wQ.setFrom(J))}createChecked(Z=null,Q,J){return Q=UZ.from(Q),this.checkContent(Q),new lJ(this,this.computeAttrs(Z),Q,wQ.setFrom(J))}createAndFill(Z=null,Q,J){if(Z=this.computeAttrs(Z),Q=UZ.from(Q),Q.size){let U=this.contentMatch.fillBefore(Q);if(!U)return null;Q=U.append(Q)}let q=this.contentMatch.matchFragment(Q),G=q&&q.fillBefore(UZ.empty,!0);if(!G)return null;return new lJ(this,Z,Q.append(G),wQ.setFrom(J))}validContent(Z){let Q=this.contentMatch.matchFragment(Z);if(!Q||!Q.validEnd)return!1;for(let J=0;J<Z.childCount;J++)if(!this.allowsMarks(Z.child(J).marks))return!1;return!0}checkContent(Z){if(!this.validContent(Z))throw RangeError(`Invalid content for node ${this.name}: ${Z.toString().slice(0,50)}`)}checkAttrs(Z){Xh(this.attrs,Z,"node",this.name)}allowsMarkType(Z){return this.markSet==null||this.markSet.indexOf(Z)>-1}allowsMarks(Z){if(this.markSet==null)return!0;for(let Q=0;Q<Z.length;Q++)if(!this.allowsMarkType(Z[Q].type))return!1;return!0}allowedMarks(Z){if(this.markSet==null)return Z;let Q;for(let J=0;J<Z.length;J++)if(!this.allowsMarkType(Z[J].type)){if(!Q)Q=Z.slice(0,J)}else if(Q)Q.push(Z[J]);return!Q?Z:Q.length?Q:wQ.none}static compile(Z,Q){let J=Object.create(null);Z.forEach((G,U)=>J[G]=new d2(G,Q,U));let q=Q.spec.topNode||"doc";if(!J[q])throw RangeError("Schema is missing its top node type ('"+q+"')");if(!J.text)throw RangeError("Every schema needs a 'text' type");for(let G in J.text.attrs)throw RangeError("The text node type should not have attributes");return J}}function de(Z,Q,J){let q=J.split("|");return(G)=>{let U=G===null?"null":typeof G;if(q.indexOf(U)<0)throw RangeError(`Expected value of type ${q} for attribute ${Q} on type ${Z}, got ${U}`)}}class Yh{constructor(Z,Q,J){this.hasDefault=Object.prototype.hasOwnProperty.call(J,"default"),this.default=J.default,this.validate=typeof J.validate=="string"?de(Z,Q,J.validate):J.validate}get isRequired(){return!this.hasDefault}}class wH{constructor(Z,Q,J,q){this.name=Z,this.rank=Q,this.schema=J,this.spec=q,this.attrs=Jh(Z,q.attrs),this.excluded=null;let G=Zh(this.attrs);this.instance=G?new wQ(this,G):null}create(Z=null){if(!Z&&this.instance)return this.instance;return new wQ(this,Qh(this.attrs,Z))}static compile(Z,Q){let J=Object.create(null),q=0;return Z.forEach((G,U)=>J[G]=new wH(G,q++,Q,U)),J}removeFromSet(Z){for(var Q=0;Q<Z.length;Q++)if(Z[Q].type==this)Z=Z.slice(0,Q).concat(Z.slice(Q+1)),Q--;return Z}isInSet(Z){for(let Q=0;Q<Z.length;Q++)if(Z[Q].type==this)return Z[Q]}checkAttrs(Z){Xh(this.attrs,Z,"mark",this.name)}excludes(Z){return this.excluded.indexOf(Z)>-1}}class xH{constructor(Z){this.linebreakReplacement=null,this.cached=Object.create(null);let Q=this.spec={};for(let q in Z)Q[q]=Z[q];Q.nodes=pI.from(Z.nodes),Q.marks=pI.from(Z.marks||{}),this.nodes=d2.compile(this.spec.nodes,this),this.marks=wH.compile(this.spec.marks,this);let J=Object.create(null);for(let q in this.nodes){if(q in this.marks)throw RangeError(q+" can not be both a node and a mark");let G=this.nodes[q],U=G.spec.content||"",K=G.spec.marks;if(G.contentMatch=J[U]||(J[U]=M6.parse(U,this.nodes)),G.inlineContent=G.contentMatch.inlineContent,G.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!G.isInline||!G.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=G}G.markSet=K=="_"?null:K?xg(this,K.split(" ")):K==""||!G.inlineContent?[]:null}for(let q in this.marks){let G=this.marks[q],U=G.spec.excludes;G.excluded=U==null?[G]:U==""?[]:xg(this,U.split(" "))}this.nodeFromJSON=(q)=>lJ.fromJSON(this,q),this.markFromJSON=(q)=>wQ.fromJSON(this,q),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(Z,Q=null,J,q){if(typeof Z=="string")Z=this.nodeType(Z);else if(!(Z instanceof d2))throw RangeError("Invalid node type: "+Z);else if(Z.schema!=this)throw RangeError("Node type from different schema used ("+Z.name+")");return Z.createChecked(Q,J,q)}text(Z,Q){let J=this.nodes.text;return new p2(J,J.defaultAttrs,Z,wQ.setFrom(Q))}mark(Z,Q){if(typeof Z=="string")Z=this.marks[Z];return Z.create(Q)}nodeType(Z){let Q=this.nodes[Z];if(!Q)throw RangeError("Unknown node type: "+Z);return Q}}function xg(Z,Q){let J=[];for(let q=0;q<Q.length;q++){let G=Q[q],U=Z.marks[G],K=U;if(U)J.push(U);else for(let H in Z.marks){let B=Z.marks[H];if(G=="_"||B.spec.group&&B.spec.group.split(" ").indexOf(G)>-1)J.push(K=B)}if(!K)throw SyntaxError("Unknown mark type: '"+Q[q]+"'")}return J}function le(Z){return Z.tag!=null}function ie(Z){return Z.style!=null}class Lq{constructor(Z,Q){this.schema=Z,this.rules=Q,this.tags=[],this.styles=[];let J=this.matchedStyles=[];Q.forEach((q)=>{if(le(q))this.tags.push(q);else if(ie(q)){let G=/[^=]*/.exec(q.style)[0];if(J.indexOf(G)<0)J.push(G);this.styles.push(q)}}),this.normalizeLists=!this.tags.some((q)=>{if(!/^(ul|ol)\b/.test(q.tag)||!q.node)return!1;let G=Z.nodes[q.node];return G.contentMatch.matchType(G)})}parse(Z,Q={}){let J=new nI(this,Q,!1);return J.addAll(Z,wQ.none,Q.from,Q.to),J.finish()}parseSlice(Z,Q={}){let J=new nI(this,Q,!0);return J.addAll(Z,wQ.none,Q.from,Q.to),AZ.maxOpen(J.finish())}matchTag(Z,Q,J){for(let q=J?this.tags.indexOf(J)+1:0;q<this.tags.length;q++){let G=this.tags[q];if(ae(Z,G.tag)&&(G.namespace===void 0||Z.namespaceURI==G.namespace)&&(!G.context||Q.matchesContext(G.context))){if(G.getAttrs){let U=G.getAttrs(Z);if(U===!1)continue;G.attrs=U||void 0}return G}}}matchStyle(Z,Q,J,q){for(let G=q?this.styles.indexOf(q)+1:0;G<this.styles.length;G++){let U=this.styles[G],K=U.style;if(K.indexOf(Z)!=0||U.context&&!J.matchesContext(U.context)||K.length>Z.length&&(K.charCodeAt(Z.length)!=61||K.slice(Z.length+1)!=Q))continue;if(U.getAttrs){let H=U.getAttrs(Q);if(H===!1)continue;U.attrs=H||void 0}return U}}static schemaRules(Z){let Q=[];function J(q){let G=q.priority==null?50:q.priority,U=0;for(;U<Q.length;U++){let K=Q[U];if((K.priority==null?50:K.priority)<G)break}Q.splice(U,0,q)}for(let q in Z.marks){let G=Z.marks[q].spec.parseDOM;if(G)G.forEach((U)=>{if(J(U=vg(U)),!(U.mark||U.ignore||U.clearMark))U.mark=q})}for(let q in Z.nodes){let G=Z.nodes[q].spec.parseDOM;if(G)G.forEach((U)=>{if(J(U=vg(U)),!(U.node||U.ignore||U.mark))U.node=q})}return Q}static fromSchema(Z){return Z.cached.domParser||(Z.cached.domParser=new Lq(Z,Lq.schemaRules(Z)))}}function bg(Z,Q,J){if(Q!=null)return(Q?yH:0)|(Q==="full"?iI:0);return Z&&Z.whitespace=="pre"?yH|iI:J&~kH}class $H{constructor(Z,Q,J,q,G,U){this.type=Z,this.attrs=Q,this.marks=J,this.solid=q,this.options=U,this.content=[],this.activeMarks=wQ.none,this.match=G||(U&kH?null:Z.contentMatch)}findWrapping(Z){if(!this.match){if(!this.type)return[];let Q=this.type.contentMatch.fillBefore(UZ.from(Z));if(Q)this.match=this.type.contentMatch.matchFragment(Q);else{let J=this.type.contentMatch,q;if(q=J.findWrapping(Z.type))return this.match=J,q;else return null}}return this.match.findWrapping(Z.type)}finish(Z){if(!(this.options&yH)){let J=this.content[this.content.length-1],q;if(J&&J.isText&&(q=/[ \t\r\n\u000c]+$/.exec(J.text))){let G=J;if(J.text.length==q[0].length)this.content.pop();else this.content[this.content.length-1]=G.withText(G.text.slice(0,G.text.length-q[0].length))}}let Q=UZ.from(this.content);if(!Z&&this.match)Q=Q.append(this.match.fillBefore(UZ.empty,!0));return this.type?this.type.create(this.attrs,Q,this.marks):Q}inlineContext(Z){if(this.type)return this.type.inlineContent;if(this.content.length)return this.content[0].isInline;return Z.parentNode&&!qh.hasOwnProperty(Z.parentNode.nodeName.toLowerCase())}}class nI{constructor(Z,Q,J){this.parser=Z,this.options=Q,this.isOpen=J,this.open=0,this.localPreserveWS=!1;let q=Q.topNode,G,U=bg(null,Q.preserveWhitespace,0)|(J?kH:0);if(q)G=new $H(q.type,q.attrs,wQ.none,!0,Q.topMatch||q.type.contentMatch,U);else if(J)G=new $H(null,null,wQ.none,!0,null,U);else G=new $H(Z.schema.topNodeType,null,wQ.none,!0,null,U);this.nodes=[G],this.find=Q.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(Z,Q){if(Z.nodeType==3)this.addTextNode(Z,Q);else if(Z.nodeType==1)this.addElement(Z,Q)}addTextNode(Z,Q){let J=Z.nodeValue,q=this.top,G=q.options&iI?"full":this.localPreserveWS||(q.options&yH)>0,{schema:U}=this.parser;if(G==="full"||q.inlineContext(Z)||/[^ \t\r\n\u000c]/.test(J)){if(!G){if(J=J.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(J)&&this.open==this.nodes.length-1){let K=q.content[q.content.length-1],H=Z.previousSibling;if(!K||H&&H.nodeName=="BR"||K.isText&&/[ \t\r\n\u000c]$/.test(K.text))J=J.slice(1)}}else if(G==="full")J=J.replace(/\r\n?/g,`
|
|
253
|
+
`);else if(U.linebreakReplacement&&/[\r\n]/.test(J)&&this.top.findWrapping(U.linebreakReplacement.create())){let K=J.split(/\r?\n|\r/);for(let H=0;H<K.length;H++){if(H)this.insertNode(U.linebreakReplacement.create(),Q,!0);if(K[H])this.insertNode(U.text(K[H]),Q,!/\S/.test(K[H]))}J=""}else J=J.replace(/\r?\n|\r/g," ");if(J)this.insertNode(U.text(J),Q,!/\S/.test(J));this.findInText(Z)}else this.findInside(Z)}addElement(Z,Q,J){let q=this.localPreserveWS,G=this.top;if(Z.tagName=="PRE"||/pre/.test(Z.style&&Z.style.whiteSpace))this.localPreserveWS=!0;let U=Z.nodeName.toLowerCase(),K;if(Gh.hasOwnProperty(U)&&this.parser.normalizeLists)se(Z);let H=this.options.ruleFromNode&&this.options.ruleFromNode(Z)||(K=this.parser.matchTag(Z,this,J));Z:if(H?H.ignore:ne.hasOwnProperty(U))this.findInside(Z),this.ignoreFallback(Z,Q);else if(!H||H.skip||H.closeParent){if(H&&H.closeParent)this.open=Math.max(0,this.open-1);else if(H&&H.skip.nodeType)Z=H.skip;let B,F=this.needsBlock;if(qh.hasOwnProperty(U)){if(G.content.length&&G.content[0].isInline&&this.open)this.open--,G=this.top;if(B=!0,!G.type)this.needsBlock=!0}else if(!Z.firstChild){this.leafFallback(Z,Q);break Z}let M=H&&H.skip?Q:this.readStyles(Z,Q);if(M)this.addAll(Z,M);if(B)this.sync(G);this.needsBlock=F}else{let B=this.readStyles(Z,Q);if(B)this.addElementByRule(Z,H,B,H.consuming===!1?K:void 0)}this.localPreserveWS=q}leafFallback(Z,Q){if(Z.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent)this.addTextNode(Z.ownerDocument.createTextNode(`
|
|
254
|
+
`),Q)}ignoreFallback(Z,Q){if(Z.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent))this.findPlace(this.parser.schema.text("-"),Q,!0)}readStyles(Z,Q){let J=Z.style;if(J&&J.length)for(let q=0;q<this.parser.matchedStyles.length;q++){let G=this.parser.matchedStyles[q],U=J.getPropertyValue(G);if(U)for(let K=void 0;;){let H=this.parser.matchStyle(G,U,this,K);if(!H)break;if(H.ignore)return null;if(H.clearMark)Q=Q.filter((B)=>!H.clearMark(B));else Q=Q.concat(this.parser.schema.marks[H.mark].create(H.attrs));if(H.consuming===!1)K=H;else break}}return Q}addElementByRule(Z,Q,J,q){let G,U;if(Q.node){if(U=this.parser.schema.nodes[Q.node],!U.isLeaf){let H=this.enter(U,Q.attrs||null,J,Q.preserveWhitespace);if(H)G=!0,J=H}else if(!this.insertNode(U.create(Q.attrs),J,Z.nodeName=="BR"))this.leafFallback(Z,J)}else{let H=this.parser.schema.marks[Q.mark];J=J.concat(H.create(Q.attrs))}let K=this.top;if(U&&U.isLeaf)this.findInside(Z);else if(q)this.addElement(Z,J,q);else if(Q.getContent)this.findInside(Z),Q.getContent(Z,this.parser.schema).forEach((H)=>this.insertNode(H,J,!1));else{let H=Z;if(typeof Q.contentElement=="string")H=Z.querySelector(Q.contentElement);else if(typeof Q.contentElement=="function")H=Q.contentElement(Z);else if(Q.contentElement)H=Q.contentElement;this.findAround(Z,H,!0),this.addAll(H,J),this.findAround(Z,H,!1)}if(G&&this.sync(K))this.open--}addAll(Z,Q,J,q){let G=J||0;for(let U=J?Z.childNodes[J]:Z.firstChild,K=q==null?null:Z.childNodes[q];U!=K;U=U.nextSibling,++G)this.findAtPoint(Z,G),this.addDOM(U,Q);this.findAtPoint(Z,G)}findPlace(Z,Q,J){let q,G;for(let U=this.open,K=0;U>=0;U--){let H=this.nodes[U],B=H.findWrapping(Z);if(B&&(!q||q.length>B.length+K)){if(q=B,G=H,!B.length)break}if(H.solid){if(J)break;K+=2}}if(!q)return null;this.sync(G);for(let U=0;U<q.length;U++)Q=this.enterInner(q[U],null,Q,!1);return Q}insertNode(Z,Q,J){if(Z.isInline&&this.needsBlock&&!this.top.type){let G=this.textblockFromContext();if(G)Q=this.enterInner(G,null,Q)}let q=this.findPlace(Z,Q,J);if(q){this.closeExtra();let G=this.top;if(G.match)G.match=G.match.matchType(Z.type);let U=wQ.none;for(let K of q.concat(Z.marks))if(G.type?G.type.allowsMarkType(K.type):gg(K.type,Z.type))U=K.addToSet(U);return G.content.push(Z.mark(U)),!0}return!1}enter(Z,Q,J,q){let G=this.findPlace(Z.create(Q),J,!1);if(G)G=this.enterInner(Z,Q,J,!0,q);return G}enterInner(Z,Q,J,q=!1,G){this.closeExtra();let U=this.top;U.match=U.match&&U.match.matchType(Z);let K=bg(Z,G,U.options);if(U.options&kH&&U.content.length==0)K|=kH;let H=wQ.none;return J=J.filter((B)=>{if(U.type?U.type.allowsMarkType(B.type):gg(B.type,Z))return H=B.addToSet(H),!1;return!0}),this.nodes.push(new $H(Z,Q,H,q,null,K)),this.open++,J}closeExtra(Z=!1){let Q=this.nodes.length-1;if(Q>this.open){for(;Q>this.open;Q--)this.nodes[Q-1].content.push(this.nodes[Q].finish(Z));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(Z){for(let Q=this.open;Q>=0;Q--)if(this.nodes[Q]==Z)return this.open=Q,!0;else if(this.localPreserveWS)this.nodes[Q].options|=yH;return!1}get currentPos(){this.closeExtra();let Z=0;for(let Q=this.open;Q>=0;Q--){let J=this.nodes[Q].content;for(let q=J.length-1;q>=0;q--)Z+=J[q].nodeSize;if(Q)Z++}return Z}findAtPoint(Z,Q){if(this.find){for(let J=0;J<this.find.length;J++)if(this.find[J].node==Z&&this.find[J].offset==Q)this.find[J].pos=this.currentPos}}findInside(Z){if(this.find){for(let Q=0;Q<this.find.length;Q++)if(this.find[Q].pos==null&&Z.nodeType==1&&Z.contains(this.find[Q].node))this.find[Q].pos=this.currentPos}}findAround(Z,Q,J){if(Z!=Q&&this.find){for(let q=0;q<this.find.length;q++)if(this.find[q].pos==null&&Z.nodeType==1&&Z.contains(this.find[q].node)){if(Q.compareDocumentPosition(this.find[q].node)&(J?2:4))this.find[q].pos=this.currentPos}}}findInText(Z){if(this.find){for(let Q=0;Q<this.find.length;Q++)if(this.find[Q].node==Z)this.find[Q].pos=this.currentPos-(Z.nodeValue.length-this.find[Q].offset)}}matchesContext(Z){if(Z.indexOf("|")>-1)return Z.split(/\s*\|\s*/).some(this.matchesContext,this);let Q=Z.split("/"),J=this.options.context,q=!this.isOpen&&(!J||J.parent.type==this.nodes[0].type),G=-(J?J.depth+1:0)+(q?0:1),U=(K,H)=>{for(;K>=0;K--){let B=Q[K];if(B==""){if(K==Q.length-1||K==0)continue;for(;H>=G;H--)if(U(K-1,H))return!0;return!1}else{let F=H>0||H==0&&q?this.nodes[H].type:J&&H>=G?J.node(H-G).type:null;if(!F||F.name!=B&&!F.isInGroup(B))return!1;H--}}return!0};return U(Q.length-1,this.open)}textblockFromContext(){let Z=this.options.context;if(Z)for(let Q=Z.depth;Q>=0;Q--){let J=Z.node(Q).contentMatchAt(Z.indexAfter(Q)).defaultType;if(J&&J.isTextblock&&J.defaultAttrs)return J}for(let Q in this.parser.schema.nodes){let J=this.parser.schema.nodes[Q];if(J.isTextblock&&J.defaultAttrs)return J}}}function se(Z){for(let Q=Z.firstChild,J=null;Q;Q=Q.nextSibling){let q=Q.nodeType==1?Q.nodeName.toLowerCase():null;if(q&&Gh.hasOwnProperty(q)&&J)J.appendChild(Q),Q=J;else if(q=="li")J=Q;else if(q)J=null}}function ae(Z,Q){return(Z.matches||Z.msMatchesSelector||Z.webkitMatchesSelector||Z.mozMatchesSelector).call(Z,Q)}function vg(Z){let Q={};for(let J in Z)Q[J]=Z[J];return Q}function gg(Z,Q){let J=Q.schema.nodes;for(let q in J){let G=J[q];if(!G.allowsMarkType(Z))continue;let U=[],K=(H)=>{U.push(H);for(let B=0;B<H.edgeCount;B++){let{type:F,next:M}=H.edge(B);if(F==Q)return!0;if(U.indexOf(M)<0&&K(M))return!0}};if(K(G.contentMatch))return!0}}class sG{constructor(Z,Q){this.nodes=Z,this.marks=Q}serializeFragment(Z,Q={},J){if(!J)J=u2(Q).createDocumentFragment();let q=J,G=[];return Z.forEach((U)=>{if(G.length||U.marks.length){let K=0,H=0;while(K<G.length&&H<U.marks.length){let B=U.marks[H];if(!this.marks[B.type.name]){H++;continue}if(!B.eq(G[K][0])||B.type.spec.spanning===!1)break;K++,H++}while(K<G.length)q=G.pop()[1];while(H<U.marks.length){let B=U.marks[H++],F=this.serializeMark(B,U.isInline,Q);if(F)G.push([B,q]),q.appendChild(F.dom),q=F.contentDOM||F.dom}}q.appendChild(this.serializeNodeInner(U,Q))}),J}serializeNodeInner(Z,Q){if(Z.isText)return u2(Q).createTextNode(Z.text);let{dom:J,contentDOM:q}=f2(u2(Q),this.nodes[Z.type.name](Z),null,Z.attrs);if(q){if(Z.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(Z.content,Q,q)}return J}serializeNode(Z,Q={}){let J=this.serializeNodeInner(Z,Q);for(let q=Z.marks.length-1;q>=0;q--){let G=this.serializeMark(Z.marks[q],Z.isInline,Q);if(G)(G.contentDOM||G.dom).appendChild(J),J=G.dom}return J}serializeMark(Z,Q,J={}){let q=this.marks[Z.type.name];return q&&f2(u2(J),q(Z,Q),null,Z.attrs)}static renderSpec(Z,Q,J=null,q){if(typeof Q=="string")return{dom:Z.createTextNode(Q)};return f2(Z,Q,J,q)}static fromSchema(Z){return Z.cached.domSerializer||(Z.cached.domSerializer=new sG(this.nodesFromSchema(Z),this.marksFromSchema(Z)))}static nodesFromSchema(Z){let Q=hg(Z.nodes);if(!Q.text)Q.text=(J)=>J.text;return Q}static marksFromSchema(Z){return hg(Z.marks)}}function hg(Z){let Q={};for(let J in Z){let q=Z[J].spec.toDOM;if(q)Q[J]=q}return Q}function u2(Z){return Z.document||window.document}function re(Z){let Q=ug.get(Z);if(Q===void 0)ug.set(Z,Q=oe(Z));return Q}function oe(Z){let Q=null;function J(q){if(q&&typeof q=="object")if(Array.isArray(q))if(typeof q[0]=="string"){if(!Q)Q=[];Q.push(q)}else for(let G=0;G<q.length;G++)J(q[G]);else for(let G in q)J(q[G])}return J(Z),Q}function f2(Z,Q,J,q){if(Q.nodeType==1)return{dom:Q};if(Q.dom&&Q.dom.nodeType==1)return Q;let G=Q[0],U;if(typeof G!="string")throw RangeError("Invalid array passed to renderSpec");if(q&&(U=re(q))&&U.indexOf(Q)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let K=G.indexOf(" ");if(K>0)J=G.slice(0,K),G=G.slice(K+1);let H,B=J?Z.createElementNS(J,G):Z.createElement(G),F=Q[1],M=1;if(F&&typeof F=="object"&&F.nodeType==null&&!Array.isArray(F)){M=2;for(let O in F)if(F[O]!=null){let V=O.indexOf(" ");if(V>0)B.setAttributeNS(O.slice(0,V),O.slice(V+1),F[O]);else if(O=="style"&&B.style)B.style.cssText=F[O];else B.setAttribute(O,F[O])}}for(let O=M;O<Q.length;O++){let V=Q[O];if(V===0){if(O<Q.length-1||O>M)throw RangeError("Content hole must be the only child of its parent node");return{dom:B,contentDOM:B}}else if(typeof V=="string")B.appendChild(Z.createTextNode(V));else{let{dom:A,contentDOM:N}=f2(Z,V,J,q);if(B.appendChild(A),N){if(H)throw RangeError("Multiple content holes");H=N}}}return{dom:B,contentDOM:H}}var dI,L6,xe=12,Sg,be,p2,qh,ne,Gh,yH=1,iI=2,kH=4,ug;var lz=k(()=>{kg();UZ.empty=new UZ([],0);dI={index:0,offset:0};wQ.none=[];L6=class L6 extends Error{};AZ.empty=new AZ(UZ.empty,0,0);Sg=new WeakMap;be=Object.create(null);lJ.prototype.text=void 0;p2=class p2 extends lJ{constructor(Z,Q,J,q){super(Z,Q,null,q);if(!J)throw RangeError("Empty text nodes are not allowed");this.text=J}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);return rg(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(Z,Q){return this.text.slice(Z,Q)}get nodeSize(){return this.text.length}mark(Z){return Z==this.marks?this:new p2(this.type,this.attrs,this.text,Z)}withText(Z){if(Z==this.text)return this;return new p2(this.type,this.attrs,Z,this.marks)}cut(Z=0,Q=this.text.length){if(Z==0&&Q==this.text.length)return this;return this.withText(this.text.slice(Z,Q))}eq(Z){return this.sameMarkup(Z)&&this.text==Z.text}toJSON(){let Z=super.toJSON();return Z.text=this.text,Z}};M6.empty=new M6(!0);qh={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},ne={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Gh={ol:!0,ul:!0};ug=new WeakMap});function te(Z,Q){return Z+Q*Hh}function zh(Z){return Z&Kh}function ee(Z){return(Z-(Z&Kh))/Hh}class i2{constructor(Z,Q,J){this.pos=Z,this.delInfo=Q,this.recover=J}get deleted(){return(this.delInfo&_h)>0}get deletedBefore(){return(this.delInfo&(Wh|l2))>0}get deletedAfter(){return(this.delInfo&(Bh|l2))>0}get deletedAcross(){return(this.delInfo&l2)>0}}class mY{constructor(Z,Q=!1){if(this.ranges=Z,this.inverted=Q,!Z.length&&mY.empty)return mY.empty}recover(Z){let Q=0,J=zh(Z);if(!this.inverted)for(let q=0;q<J;q++)Q+=this.ranges[q*3+2]-this.ranges[q*3+1];return this.ranges[J*3]+Q+ee(Z)}mapResult(Z,Q=1){return this._map(Z,Q,!1)}map(Z,Q=1){return this._map(Z,Q,!0)}_map(Z,Q,J){let q=0,G=this.inverted?2:1,U=this.inverted?1:2;for(let K=0;K<this.ranges.length;K+=3){let H=this.ranges[K]-(this.inverted?q:0);if(H>Z)break;let B=this.ranges[K+G],F=this.ranges[K+U],M=H+B;if(Z<=M){let O=!B?Q:Z==H?-1:Z==M?1:Q,V=H+q+(O<0?0:F);if(J)return V;let A=Z==(Q<0?H:M)?null:te(K/3,Z-H),N=Z==H?Bh:Z==M?Wh:l2;if(Q<0?Z!=H:Z!=M)N|=_h;return new i2(V,N,A)}q+=F-B}return J?Z+q:new i2(Z+q,0,null)}touches(Z,Q){let J=0,q=zh(Q),G=this.inverted?2:1,U=this.inverted?1:2;for(let K=0;K<this.ranges.length;K+=3){let H=this.ranges[K]-(this.inverted?J:0);if(H>Z)break;let B=this.ranges[K+G],F=H+B;if(Z<=F&&K==q*3)return!0;J+=this.ranges[K+U]-B}return!1}forEach(Z){let Q=this.inverted?2:1,J=this.inverted?1:2;for(let q=0,G=0;q<this.ranges.length;q+=3){let U=this.ranges[q],K=U-(this.inverted?G:0),H=U+(this.inverted?0:G),B=this.ranges[q+Q],F=this.ranges[q+J];Z(K,K+B,H,H+F),G+=F-B}}invert(){return new mY(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(Z){return Z==0?mY.empty:new mY(Z<0?[0,-Z,0]:[0,0,Z])}}class yK{constructor(Z,Q,J=0,q=Z?Z.length:0){this.mirror=Q,this.from=J,this.to=q,this._maps=Z||[],this.ownData=!(Z||Q)}get maps(){return this._maps}slice(Z=0,Q=this.maps.length){return new yK(this._maps,this.mirror,Z,Q)}appendMap(Z,Q){if(!this.ownData)this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0;if(this.to=this._maps.push(Z),Q!=null)this.setMirror(this._maps.length-1,Q)}appendMapping(Z){for(let Q=0,J=this._maps.length;Q<Z._maps.length;Q++){let q=Z.getMirror(Q);this.appendMap(Z._maps[Q],q!=null&&q<Q?J+q:void 0)}}getMirror(Z){if(this.mirror){for(let Q=0;Q<this.mirror.length;Q++)if(this.mirror[Q]==Z)return this.mirror[Q+(Q%2?-1:1)]}}setMirror(Z,Q){if(!this.mirror)this.mirror=[];this.mirror.push(Z,Q)}appendMappingInverted(Z){for(let Q=Z.maps.length-1,J=this._maps.length+Z._maps.length;Q>=0;Q--){let q=Z.getMirror(Q);this.appendMap(Z._maps[Q].invert(),q!=null&&q>Q?J-q-1:void 0)}}invert(){let Z=new yK;return Z.appendMappingInverted(this),Z}map(Z,Q=1){if(this.mirror)return this._map(Z,Q,!0);for(let J=this.from;J<this.to;J++)Z=this._maps[J].map(Z,Q);return Z}mapResult(Z,Q=1){return this._map(Z,Q,!1)}_map(Z,Q,J){let q=0;for(let G=this.from;G<this.to;G++){let U=this._maps[G],K=U.mapResult(Z,Q);if(K.recover!=null){let H=this.getMirror(G);if(H!=null&&H>G&&H<this.to){G=H,Z=this._maps[H].recover(K.recover);continue}}q|=K.delInfo,Z=K.pos}return J?Z:new i2(Z,q,null)}}class FJ{getMap(){return mY.empty}merge(Z){return null}static fromJSON(Z,Q){if(!Q||!Q.stepType)throw RangeError("Invalid input for Step.fromJSON");let J=sI[Q.stepType];if(!J)throw RangeError(`No step type ${Q.stepType} defined`);return J.fromJSON(Z,Q)}static jsonID(Z,Q){if(Z in sI)throw RangeError("Duplicate use of step JSON ID "+Z);return sI[Z]=Q,Q.prototype.jsonID=Z,Q}}class mX{constructor(Z,Q){this.doc=Z,this.failed=Q}static ok(Z){return new mX(Z,null)}static fail(Z){return new mX(null,Z)}static fromReplace(Z,Q,J,q){try{return mX.ok(Z.replace(Q,J,q))}catch(G){if(G instanceof L6)return mX.fail(G.message);throw G}}}function tI(Z,Q,J){let q=[];for(let G=0;G<Z.childCount;G++){let U=Z.child(G);if(U.content.size)U=U.copy(tI(U.content,Q,U));if(U.isInline)U=Q(U,J,G);q.push(U)}return UZ.fromArray(q)}function oI(Z,Q,J){let q=Z.resolve(Q),G=J-Q,U=q.depth;while(G>0&&U>0&&q.indexAfter(U)==q.node(U).childCount)U--,G--;if(G>0){let K=q.node(U).maybeChild(q.indexAfter(U));while(G>0){if(!K||K.isLeaf)return!0;K=K.firstChild,G--}}return!1}function ZZZ(Z,Q,J,q){let G=[],U=[],K,H;Z.doc.nodesBetween(Q,J,(B,F,M)=>{if(!B.isInline)return;let O=B.marks;if(!q.isInSet(O)&&M.type.allowsMarkType(q.type)){let V=Math.max(F,Q),A=Math.min(F+B.nodeSize,J),N=q.addToSet(O);for(let T=0;T<O.length;T++)if(!O[T].isInSet(N))if(K&&K.to==V&&K.mark.eq(O[T]))K.to=A;else G.push(K=new Mq(V,A,O[T]));if(H&&H.to==V)H.to=A;else U.push(H=new N9(V,A,q))}}),G.forEach((B)=>Z.step(B)),U.forEach((B)=>Z.step(B))}function QZZ(Z,Q,J,q){let G=[],U=0;Z.doc.nodesBetween(Q,J,(K,H)=>{if(!K.isInline)return;U++;let B=null;if(q instanceof wH){let F=K.marks,M;while(M=q.isInSet(F))(B||(B=[])).push(M),F=M.removeFromSet(F)}else if(q){if(q.isInSet(K.marks))B=[q]}else B=K.marks;if(B&&B.length){let F=Math.min(H+K.nodeSize,J);for(let M=0;M<B.length;M++){let O=B[M],V;for(let A=0;A<G.length;A++){let N=G[A];if(N.step==U-1&&O.eq(G[A].style))V=N}if(V)V.to=F,V.step=U;else G.push({style:O,from:Math.max(H,Q),to:F,step:U})}}}),G.forEach((K)=>Z.step(new Mq(K.from,K.to,K.style)))}function eI(Z,Q,J,q=J.contentMatch,G=!0){let U=Z.doc.nodeAt(Q),K=[],H=Q+1;for(let B=0;B<U.childCount;B++){let F=U.child(B),M=H+F.nodeSize,O=q.matchType(F.type);if(!O)K.push(new FX(H,M,AZ.empty));else{q=O;for(let V=0;V<F.marks.length;V++)if(!J.allowsMarkType(F.marks[V].type))Z.step(new Mq(H,M,F.marks[V]));if(G&&F.isText&&J.whitespace!="pre"){let V,A=/\r?\n|\r/g,N;while(V=A.exec(F.text)){if(!N)N=new AZ(UZ.from(J.schema.text(" ",J.allowedMarks(F.marks))),0,0);K.push(new FX(H+V.index,H+V.index+V[0].length,N))}}}H=M}if(!q.validEnd){let B=q.fillBefore(UZ.empty,!0);Z.replace(H,H,new AZ(B,0,0))}for(let B=K.length-1;B>=0;B--)Z.step(K[B])}function XZZ(Z,Q,J){return(Q==0||Z.canReplace(Q,Z.childCount))&&(J==Z.childCount||Z.canReplace(0,J))}function iz(Z){let J=Z.parent.content.cutByIndex(Z.startIndex,Z.endIndex);for(let q=Z.depth,G=0,U=0;;--q){let K=Z.$from.node(q),H=Z.$from.index(q)+G,B=Z.$to.indexAfter(q)-U;if(q<Z.depth&&K.canReplace(H,B,J))return q;if(q==0||K.type.spec.isolating||!XZZ(K,H,B))break;if(H)G=1;if(B<K.childCount)U=1}return null}function JZZ(Z,Q,J){let{$from:q,$to:G,depth:U}=Q,K=q.before(U+1),H=G.after(U+1),B=K,F=H,M=UZ.empty,O=0;for(let N=U,T=!1;N>J;N--)if(T||q.index(N)>0)T=!0,M=UZ.from(q.node(N).copy(M)),O++;else B--;let V=UZ.empty,A=0;for(let N=U,T=!1;N>J;N--)if(T||G.after(N+1)<G.end(N))T=!0,V=UZ.from(G.node(N).copy(V)),A++;else F++;Z.step(new NX(B,F,K,H,new AZ(M.append(V),O,A),M.size-O,!0))}function xK(Z,Q,J=null,q=Z){let G=YZZ(Z,Q),U=G&&qZZ(q,Q);if(!U)return null;return G.map(Uh).concat({type:Q,attrs:J}).concat(U.map(Uh))}function Uh(Z){return{type:Z,attrs:null}}function YZZ(Z,Q){let{parent:J,startIndex:q,endIndex:G}=Z,U=J.contentMatchAt(q).findWrapping(Q);if(!U)return null;let K=U.length?U[0]:Q;return J.canReplaceWith(q,G,K)?U:null}function qZZ(Z,Q){let{parent:J,startIndex:q,endIndex:G}=Z,U=J.child(q),K=Q.contentMatch.findWrapping(U.type);if(!K)return null;let B=(K.length?K[K.length-1]:Q).contentMatch;for(let F=q;B&&F<G;F++)B=B.matchType(J.child(F).type);if(!B||!B.validEnd)return null;return K}function GZZ(Z,Q,J){let q=UZ.empty;for(let K=J.length-1;K>=0;K--){if(q.size){let H=J[K].type.contentMatch.matchFragment(q);if(!H||!H.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}q=UZ.from(J[K].type.create(J[K].attrs,q))}let{start:G,end:U}=Q;Z.step(new NX(G,U,G,U,new AZ(q,0,0),J.length,!0))}function zZZ(Z,Q,J,q,G){if(!q.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let U=Z.steps.length;Z.doc.nodesBetween(Q,J,(K,H)=>{let B=typeof G=="function"?G(K):G;if(K.isTextblock&&!K.hasMarkup(q,B)&&UZZ(Z.doc,Z.mapping.slice(U).map(H),q)){let F=null;if(q.schema.linebreakReplacement){let A=q.whitespace=="pre",N=!!q.contentMatch.matchType(q.schema.linebreakReplacement);if(A&&!N)F=!1;else if(!A&&N)F=!0}if(F===!1)Lh(Z,K,H,U);eI(Z,Z.mapping.slice(U).map(H,1),q,void 0,F===null);let M=Z.mapping.slice(U),O=M.map(H,1),V=M.map(H+K.nodeSize,1);if(Z.step(new NX(O,V,O+1,V-1,new AZ(UZ.from(q.create(B,null,K.marks)),0,0),1,!0)),F===!0)Fh(Z,K,H,U);return!1}})}function Fh(Z,Q,J,q){Q.forEach((G,U)=>{if(G.isText){let K,H=/\r?\n|\r/g;while(K=H.exec(G.text)){let B=Z.mapping.slice(q).map(J+1+U+K.index);Z.replaceWith(B,B+1,Q.type.schema.linebreakReplacement.create())}}})}function Lh(Z,Q,J,q){Q.forEach((G,U)=>{if(G.type==G.type.schema.linebreakReplacement){let K=Z.mapping.slice(q).map(J+1+U);Z.replaceWith(K,K+1,Q.type.schema.text(`
|
|
255
|
+
`))}})}function UZZ(Z,Q,J){let q=Z.resolve(Q),G=q.index();return q.parent.canReplaceWith(G,G+1,J)}function KZZ(Z,Q,J,q,G){let U=Z.doc.nodeAt(Q);if(!U)throw RangeError("No node at given position");if(!J)J=U.type;let K=J.create(q,null,G||U.marks);if(U.isLeaf)return Z.replaceWith(Q,Q+U.nodeSize,K);if(!J.validContent(U.content))throw RangeError("Invalid content for node type "+J.name);Z.step(new NX(Q,Q+U.nodeSize,Q+1,Q+U.nodeSize-1,new AZ(UZ.from(K),0,0),1,!0))}function cY(Z,Q,J=1,q){let G=Z.resolve(Q),U=G.depth-J,K=q&&q[q.length-1]||G.parent;if(U<0||G.parent.type.spec.isolating||!G.parent.canReplace(G.index(),G.parent.childCount)||!K.type.validContent(G.parent.content.cutByIndex(G.index(),G.parent.childCount)))return!1;for(let F=G.depth-1,M=J-2;F>U;F--,M--){let O=G.node(F),V=G.index(F);if(O.type.spec.isolating)return!1;let A=O.content.cutByIndex(V,O.childCount),N=q&&q[M+1];if(N)A=A.replaceChild(0,N.type.create(N.attrs));let T=q&&q[M]||O;if(!O.canReplace(V+1,O.childCount)||!T.type.validContent(A))return!1}let H=G.indexAfter(U),B=q&&q[0];return G.node(U).canReplaceWith(H,H,B?B.type:G.node(U+1).type)}function HZZ(Z,Q,J=1,q){let G=Z.doc.resolve(Q),U=UZ.empty,K=UZ.empty;for(let H=G.depth,B=G.depth-J,F=J-1;H>B;H--,F--){U=UZ.from(G.node(H).copy(U));let M=q&&q[F];K=UZ.from(M?M.type.create(M.attrs,K):G.node(H).copy(K))}Z.step(new FX(Q,Q,new AZ(U.append(K),J,J),!0))}function Oq(Z,Q){let J=Z.resolve(Q),q=J.index();return Mh(J.nodeBefore,J.nodeAfter)&&J.parent.canReplace(q,q+1)}function WZZ(Z,Q){if(!Q.content.size)Z.type.compatibleContent(Q.type);let J=Z.contentMatchAt(Z.childCount),{linebreakReplacement:q}=Z.type.schema;for(let G=0;G<Q.childCount;G++){let U=Q.child(G),K=U.type==q?Z.type.schema.nodes.text:U.type;if(J=J.matchType(K),!J)return!1;if(!Z.type.allowsMarks(U.marks))return!1}return J.validEnd}function Mh(Z,Q){return!!(Z&&Q&&!Z.isLeaf&&WZZ(Z,Q))}function V6(Z,Q,J=-1){let q=Z.resolve(Q);for(let G=q.depth;;G--){let U,K,H=q.index(G);if(G==q.depth)U=q.nodeBefore,K=q.nodeAfter;else if(J>0)U=q.node(G+1),H++,K=q.node(G).maybeChild(H);else U=q.node(G).maybeChild(H-1),K=q.node(G+1);if(U&&!U.isTextblock&&Mh(U,K)&&q.node(G).canReplace(H,H+1))return Q;if(G==0)break;Q=J<0?q.before(G):q.after(G)}}function BZZ(Z,Q,J){let q=null,{linebreakReplacement:G}=Z.doc.type.schema,U=Z.doc.resolve(Q-J),K=U.node().type;if(G&&K.inlineContent){let M=K.whitespace=="pre",O=!!K.contentMatch.matchType(G);if(M&&!O)q=!1;else if(!M&&O)q=!0}let H=Z.steps.length;if(q===!1){let M=Z.doc.resolve(Q+J);Lh(Z,M.node(),M.before(),H)}if(K.inlineContent)eI(Z,Q+J-1,K,U.node().contentMatchAt(U.index()),q==null);let B=Z.mapping.slice(H),F=B.map(Q-J);if(Z.step(new FX(F,B.map(Q+J,-1),AZ.empty,!0)),q===!0){let M=Z.doc.resolve(F);Fh(Z,M.node(),M.before(),Z.steps.length)}return Z}function _ZZ(Z,Q,J){let q=Z.resolve(Q);if(q.parent.canReplaceWith(q.index(),q.index(),J))return Q;if(q.parentOffset==0)for(let G=q.depth-1;G>=0;G--){let U=q.index(G);if(q.node(G).canReplaceWith(U,U,J))return q.before(G+1);if(U>0)return null}if(q.parentOffset==q.parent.content.size)for(let G=q.depth-1;G>=0;G--){let U=q.indexAfter(G);if(q.node(G).canReplaceWith(U,U,J))return q.after(G+1);if(U<q.node(G).childCount)return null}return null}function n2(Z,Q,J){let q=Z.resolve(Q);if(!J.content.size)return Q;let G=J.content;for(let U=0;U<J.openStart;U++)G=G.firstChild.content;for(let U=1;U<=(J.openStart==0&&J.size?2:1);U++)for(let K=q.depth;K>=0;K--){let H=K==q.depth?0:q.pos<=(q.start(K+1)+q.end(K+1))/2?-1:1,B=q.index(K)+(H>0?1:0),F=q.node(K),M=!1;if(U==1)M=F.canReplace(B,B,G);else{let O=F.contentMatchAt(B).findWrapping(G.firstChild.type);M=O&&F.canReplaceWith(B,B,O[0])}if(M)return H==0?q.pos:H<0?q.before(K+1):q.after(K+1)}return null}function hH(Z,Q,J=Q,q=AZ.empty){if(Q==J&&!q.size)return null;let G=Z.resolve(Q),U=Z.resolve(J);if(Oh(G,U,q))return new FX(Q,J,q);return new Vh(G,U,q).fit()}function Oh(Z,Q,J){return!J.openStart&&!J.openEnd&&Z.start()==Q.start()&&Z.parent.canReplace(Z.index(),Q.index(),J.content)}class Vh{constructor(Z,Q,J){this.$from=Z,this.$to=Q,this.unplaced=J,this.frontier=[],this.placed=UZ.empty;for(let q=0;q<=Z.depth;q++){let G=Z.node(q);this.frontier.push({type:G.type,match:G.contentMatchAt(Z.indexAfter(q))})}for(let q=Z.depth;q>0;q--)this.placed=UZ.from(Z.node(q).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){while(this.unplaced.size){let B=this.findFittable();if(B)this.placeNodes(B);else this.openMore()||this.dropNode()}let Z=this.mustMoveInline(),Q=this.placed.size-this.depth-this.$from.depth,J=this.$from,q=this.close(Z<0?this.$to:J.doc.resolve(Z));if(!q)return null;let G=this.placed,U=J.depth,K=q.depth;while(U&&K&&G.childCount==1)G=G.firstChild.content,U--,K--;let H=new AZ(G,U,K);if(Z>-1)return new NX(J.pos,Z,this.$to.pos,this.$to.end(),H,Q);if(H.size||J.pos!=this.$to.pos)return new FX(J.pos,q.pos,H);return null}findFittable(){let Z=this.unplaced.openStart;for(let Q=this.unplaced.content,J=0,q=this.unplaced.openEnd;J<Z;J++){let G=Q.firstChild;if(Q.childCount>1)q=0;if(G.type.spec.isolating&&q<=J){Z=J;break}Q=G.content}for(let Q=1;Q<=2;Q++)for(let J=Q==1?Z:this.unplaced.openStart;J>=0;J--){let q,G=null;if(J)G=aI(this.unplaced.content,J-1).firstChild,q=G.content;else q=this.unplaced.content;let U=q.firstChild;for(let K=this.depth;K>=0;K--){let{type:H,match:B}=this.frontier[K],F,M=null;if(Q==1&&(U?B.matchType(U.type)||(M=B.fillBefore(UZ.from(U),!1)):G&&H.compatibleContent(G.type)))return{sliceDepth:J,frontierDepth:K,parent:G,inject:M};else if(Q==2&&U&&(F=B.findWrapping(U.type)))return{sliceDepth:J,frontierDepth:K,parent:G,wrap:F};if(G&&B.matchType(G.type))break}}}openMore(){let{content:Z,openStart:Q,openEnd:J}=this.unplaced,q=aI(Z,Q);if(!q.childCount||q.firstChild.isLeaf)return!1;return this.unplaced=new AZ(Z,Q+1,Math.max(J,q.size+Q>=Z.size-J?Q+1:0)),!0}dropNode(){let{content:Z,openStart:Q,openEnd:J}=this.unplaced,q=aI(Z,Q);if(q.childCount<=1&&Q>0){let G=Z.size-Q<=Q+q.size;this.unplaced=new AZ(bH(Z,Q-1,1),Q-1,G?Q-1:J)}else this.unplaced=new AZ(bH(Z,Q,1),Q,J)}placeNodes({sliceDepth:Z,frontierDepth:Q,parent:J,inject:q,wrap:G}){while(this.depth>Q)this.closeFrontierNode();if(G)for(let N=0;N<G.length;N++)this.openFrontierNode(G[N]);let U=this.unplaced,K=J?J.content:U.content,H=U.openStart-Z,B=0,F=[],{match:M,type:O}=this.frontier[Q];if(q){for(let N=0;N<q.childCount;N++)F.push(q.child(N));M=M.matchFragment(q)}let V=K.size+Z-(U.content.size-U.openEnd);while(B<K.childCount){let N=K.child(B),T=M.matchType(N.type);if(!T)break;if(B++,B>1||H==0||N.content.size)M=T,F.push(Ah(N.mark(O.allowedMarks(N.marks)),B==1?H:0,B==K.childCount?V:-1))}let A=B==K.childCount;if(!A)V=-1;if(this.placed=vH(this.placed,Q,UZ.from(F)),this.frontier[Q].match=M,A&&V<0&&J&&J.type==this.frontier[this.depth].type&&this.frontier.length>1)this.closeFrontierNode();for(let N=0,T=K;N<V;N++){let P=T.lastChild;this.frontier.push({type:P.type,match:P.contentMatchAt(P.childCount)}),T=P.content}this.unplaced=!A?new AZ(bH(U.content,Z,B),U.openStart,U.openEnd):Z==0?AZ.empty:new AZ(bH(U.content,Z-1,1),Z-1,V<0?U.openEnd:Z-1)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let Z=this.frontier[this.depth],Q;if(!Z.type.isTextblock||!rI(this.$to,this.$to.depth,Z.type,Z.match,!1)||this.$to.depth==this.depth&&(Q=this.findCloseLevel(this.$to))&&Q.depth==this.depth)return-1;let{depth:J}=this.$to,q=this.$to.after(J);while(J>1&&q==this.$to.end(--J))++q;return q}findCloseLevel(Z){Z:for(let Q=Math.min(this.depth,Z.depth);Q>=0;Q--){let{match:J,type:q}=this.frontier[Q],G=Q<Z.depth&&Z.end(Q+1)==Z.pos+(Z.depth-(Q+1)),U=rI(Z,Q,q,J,G);if(!U)continue;for(let K=Q-1;K>=0;K--){let{match:H,type:B}=this.frontier[K],F=rI(Z,K,B,H,!0);if(!F||F.childCount)continue Z}return{depth:Q,fit:U,move:G?Z.doc.resolve(Z.after(Q+1)):Z}}}close(Z){let Q=this.findCloseLevel(Z);if(!Q)return null;while(this.depth>Q.depth)this.closeFrontierNode();if(Q.fit.childCount)this.placed=vH(this.placed,Q.depth,Q.fit);Z=Q.move;for(let J=Q.depth+1;J<=Z.depth;J++){let q=Z.node(J),G=q.type.contentMatch.fillBefore(q.content,!0,Z.index(J));this.openFrontierNode(q.type,q.attrs,G)}return Z}openFrontierNode(Z,Q=null,J){let q=this.frontier[this.depth];q.match=q.match.matchType(Z),this.placed=vH(this.placed,this.depth,UZ.from(Z.create(Q,J))),this.frontier.push({type:Z,match:Z.contentMatch})}closeFrontierNode(){let Q=this.frontier.pop().match.fillBefore(UZ.empty,!0);if(Q.childCount)this.placed=vH(this.placed,this.frontier.length,Q)}}function bH(Z,Q,J){if(Q==0)return Z.cutByIndex(J,Z.childCount);return Z.replaceChild(0,Z.firstChild.copy(bH(Z.firstChild.content,Q-1,J)))}function vH(Z,Q,J){if(Q==0)return Z.append(J);return Z.replaceChild(Z.childCount-1,Z.lastChild.copy(vH(Z.lastChild.content,Q-1,J)))}function aI(Z,Q){for(let J=0;J<Q;J++)Z=Z.firstChild.content;return Z}function Ah(Z,Q,J){if(Q<=0)return Z;let q=Z.content;if(Q>1)q=q.replaceChild(0,Ah(q.firstChild,Q-1,q.childCount==1?J-1:0));if(Q>0){if(q=Z.type.contentMatch.fillBefore(q).append(q),J<=0)q=q.append(Z.type.contentMatch.matchFragment(q).fillBefore(UZ.empty,!0))}return Z.copy(q)}function rI(Z,Q,J,q,G){let U=Z.node(Q),K=G?Z.indexAfter(Q):Z.index(Q);if(K==U.childCount&&!J.compatibleContent(U.type))return null;let H=q.fillBefore(U.content,!0,K);return H&&!FZZ(J,U.content,K)?H:null}function FZZ(Z,Q,J){for(let q=J;q<Q.childCount;q++)if(!Z.allowsMarks(Q.child(q).marks))return!0;return!1}function LZZ(Z){return Z.spec.defining||Z.spec.definingForContent}function MZZ(Z,Q,J,q){if(!q.size)return Z.deleteRange(Q,J);let G=Z.doc.resolve(Q),U=Z.doc.resolve(J);if(Oh(G,U,q))return Z.step(new FX(Q,J,q));let K=Nh(G,U);if(K[K.length-1]==0)K.pop();let H=-(G.depth+1);K.unshift(H);for(let V=G.depth,A=G.pos-1;V>0;V--,A--){let N=G.node(V).type.spec;if(N.defining||N.definingAsContext||N.isolating)break;if(K.indexOf(V)>-1)H=V;else if(G.before(V)==A)K.splice(1,0,-V)}let B=K.indexOf(H),F=[],M=q.openStart;for(let V=q.content,A=0;;A++){let N=V.firstChild;if(F.push(N),A==q.openStart)break;V=N.content}for(let V=M-1;V>=0;V--){let A=F[V],N=LZZ(A.type);if(N&&!A.sameMarkup(G.node(Math.abs(H)-1)))M=V;else if(N||!A.type.isTextblock)break}for(let V=q.openStart;V>=0;V--){let A=(V+M+1)%(q.openStart+1),N=F[A];if(!N)continue;for(let T=0;T<K.length;T++){let P=K[(T+B)%K.length],C=!0;if(P<0)C=!1,P=-P;let y=G.node(P-1),f=G.index(P-1);if(y.canReplaceWith(f,f,N.type,N.marks))return Z.replace(G.before(P),C?U.after(P):J,new AZ(Ih(q.content,0,q.openStart,A),A,q.openEnd))}}let O=Z.steps.length;for(let V=K.length-1;V>=0;V--){if(Z.replace(Q,J,q),Z.steps.length>O)break;let A=K[V];if(A<0)continue;Q=G.before(A),J=U.after(A)}}function Ih(Z,Q,J,q,G){if(Q<J){let U=Z.firstChild;Z=Z.replaceChild(0,U.copy(Ih(U.content,Q+1,J,q,U)))}if(Q>q){let U=G.contentMatchAt(0),K=U.fillBefore(Z).append(Z);Z=K.append(U.matchFragment(K).fillBefore(UZ.empty,!0))}return Z}function OZZ(Z,Q,J,q){if(!q.isInline&&Q==J&&Z.doc.resolve(Q).parent.content.size){let G=_ZZ(Z.doc,Q,q.type);if(G!=null)Q=J=G}Z.replaceRange(Q,J,new AZ(UZ.from(q),0,0))}function VZZ(Z,Q,J){let q=Z.doc.resolve(Q),G=Z.doc.resolve(J);if(q.parent.isTextblock&&G.parent.isTextblock&&q.start()!=G.start()&&q.parentOffset==0&&G.parentOffset==0){let K=q.sharedDepth(J),H=!1;for(let B=q.depth;B>K;B--)if(q.node(B).type.spec.isolating)H=!0;for(let B=G.depth;B>K;B--)if(G.node(B).type.spec.isolating)H=!0;if(!H){for(let B=q.depth;B>0&&Q==q.start(B);B--)Q=q.before(B);for(let B=G.depth;B>0&&J==G.start(B);B--)J=G.before(B);q=Z.doc.resolve(Q),G=Z.doc.resolve(J)}}let U=Nh(q,G);for(let K=0;K<U.length;K++){let H=U[K],B=K==U.length-1;if(B&&H==0||q.node(H).type.contentMatch.validEnd)return Z.delete(q.start(H),G.end(H));if(H>0&&(B||q.node(H-1).canReplace(q.index(H-1),G.indexAfter(H-1))))return Z.delete(q.before(H),G.after(H))}for(let K=1;K<=q.depth&&K<=G.depth;K++)if(Q-q.start(K)==q.depth-K&&J>q.end(K)&&G.end(K)-J!=G.depth-K&&q.start(K-1)==G.start(K-1)&&q.node(K-1).canReplace(q.index(K-1),G.index(K-1)))return Z.delete(q.before(K),J);Z.delete(Q,J)}function Nh(Z,Q){let J=[],q=Math.min(Z.depth,Q.depth);for(let G=q;G>=0;G--){let U=Z.start(G);if(U<Z.pos-(Z.depth-G)||Q.end(G)>Q.pos+(Q.depth-G)||Z.node(G).type.spec.isolating||Q.node(G).type.spec.isolating)break;if(U==Q.start(G)||G==Z.depth&&G==Q.depth&&Z.parent.inlineContent&&Q.parent.inlineContent&&G&&Q.start(G-1)==U-1)J.push(G)}return J}class uH{constructor(Z){this.doc=Z,this.steps=[],this.docs=[],this.mapping=new yK}get before(){return this.docs.length?this.docs[0]:this.doc}step(Z){let Q=this.maybeStep(Z);if(Q.failed)throw new wK(Q.failed);return this}maybeStep(Z){let Q=Z.apply(this.doc);if(!Q.failed)this.addStep(Z,Q.doc);return Q}get docChanged(){return this.steps.length>0}changedRange(){let Z=1e9,Q=-1e9;for(let J=0;J<this.mapping.maps.length;J++){let q=this.mapping.maps[J];if(J)Z=q.map(Z,1),Q=q.map(Q,-1);q.forEach((G,U,K,H)=>{Z=Math.min(Z,K),Q=Math.max(Q,H)})}return Z==1e9?null:{from:Z,to:Q}}addStep(Z,Q){this.docs.push(this.doc),this.steps.push(Z),this.mapping.appendMap(Z.getMap()),this.doc=Q}replace(Z,Q=Z,J=AZ.empty){let q=hH(this.doc,Z,Q,J);if(q)this.step(q);return this}replaceWith(Z,Q,J){return this.replace(Z,Q,new AZ(UZ.from(J),0,0))}delete(Z,Q){return this.replace(Z,Q,AZ.empty)}insert(Z,Q){return this.replaceWith(Z,Z,Q)}replaceRange(Z,Q,J){return MZZ(this,Z,Q,J),this}replaceRangeWith(Z,Q,J){return OZZ(this,Z,Q,J),this}deleteRange(Z,Q){return VZZ(this,Z,Q),this}lift(Z,Q){return JZZ(this,Z,Q),this}join(Z,Q=1){return BZZ(this,Z,Q),this}wrap(Z,Q){return GZZ(this,Z,Q),this}setBlockType(Z,Q=Z,J,q=null){return zZZ(this,Z,Q,J,q),this}setNodeMarkup(Z,Q,J=null,q){return KZZ(this,Z,Q,J,q),this}setNodeAttribute(Z,Q,J){return this.step(new SK(Z,Q,J)),this}setDocAttribute(Z,Q){return this.step(new gH(Z,Q)),this}addNodeMark(Z,Q){return this.step(new j9(Z,Q)),this}removeNodeMark(Z,Q){let J=this.doc.nodeAt(Z);if(!J)throw RangeError("No node at position "+Z);if(Q instanceof wQ){if(Q.isInSet(J.marks))this.step(new O6(Z,Q))}else{let q=J.marks,G,U=[];while(G=Q.isInSet(q))U.push(new O6(Z,G)),q=G.removeFromSet(q);for(let K=U.length-1;K>=0;K--)this.step(U[K])}return this}split(Z,Q=1,J){return HZZ(this,Z,Q,J),this}addMark(Z,Q,J){return ZZZ(this,Z,Q,J),this}removeMark(Z,Q,J){return QZZ(this,Z,Q,J),this}clearIncompatible(Z,Q,J){return eI(this,Z,Q,J),this}}var Kh=65535,Hh,Wh=1,Bh=2,l2=4,_h=8,sI,N9,Mq,j9,O6,FX,NX,SK,gH,wK;var T9=k(()=>{lz();Hh=Math.pow(2,16);mY.empty=new mY([]);sI=Object.create(null);N9=class N9 extends FJ{constructor(Z,Q,J){super();this.from=Z,this.to=Q,this.mark=J}apply(Z){let Q=Z.slice(this.from,this.to),J=Z.resolve(this.from),q=J.node(J.sharedDepth(this.to)),G=new AZ(tI(Q.content,(U,K)=>{if(!U.isAtom||!K.type.allowsMarkType(this.mark.type))return U;return U.mark(this.mark.addToSet(U.marks))},q),Q.openStart,Q.openEnd);return mX.fromReplace(Z,this.from,this.to,G)}invert(){return new Mq(this.from,this.to,this.mark)}map(Z){let Q=Z.mapResult(this.from,1),J=Z.mapResult(this.to,-1);if(Q.deleted&&J.deleted||Q.pos>=J.pos)return null;return new N9(Q.pos,J.pos,this.mark)}merge(Z){if(Z instanceof N9&&Z.mark.eq(this.mark)&&this.from<=Z.to&&this.to>=Z.from)return new N9(Math.min(this.from,Z.from),Math.max(this.to,Z.to),this.mark);return null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(Z,Q){if(typeof Q.from!="number"||typeof Q.to!="number")throw RangeError("Invalid input for AddMarkStep.fromJSON");return new N9(Q.from,Q.to,Z.markFromJSON(Q.mark))}};FJ.jsonID("addMark",N9);Mq=class Mq extends FJ{constructor(Z,Q,J){super();this.from=Z,this.to=Q,this.mark=J}apply(Z){let Q=Z.slice(this.from,this.to),J=new AZ(tI(Q.content,(q)=>{return q.mark(this.mark.removeFromSet(q.marks))},Z),Q.openStart,Q.openEnd);return mX.fromReplace(Z,this.from,this.to,J)}invert(){return new N9(this.from,this.to,this.mark)}map(Z){let Q=Z.mapResult(this.from,1),J=Z.mapResult(this.to,-1);if(Q.deleted&&J.deleted||Q.pos>=J.pos)return null;return new Mq(Q.pos,J.pos,this.mark)}merge(Z){if(Z instanceof Mq&&Z.mark.eq(this.mark)&&this.from<=Z.to&&this.to>=Z.from)return new Mq(Math.min(this.from,Z.from),Math.max(this.to,Z.to),this.mark);return null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(Z,Q){if(typeof Q.from!="number"||typeof Q.to!="number")throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Mq(Q.from,Q.to,Z.markFromJSON(Q.mark))}};FJ.jsonID("removeMark",Mq);j9=class j9 extends FJ{constructor(Z,Q){super();this.pos=Z,this.mark=Q}apply(Z){let Q=Z.nodeAt(this.pos);if(!Q)return mX.fail("No node at mark step's position");let J=Q.type.create(Q.attrs,null,this.mark.addToSet(Q.marks));return mX.fromReplace(Z,this.pos,this.pos+1,new AZ(UZ.from(J),0,Q.isLeaf?0:1))}invert(Z){let Q=Z.nodeAt(this.pos);if(Q){let J=this.mark.addToSet(Q.marks);if(J.length==Q.marks.length){for(let q=0;q<Q.marks.length;q++)if(!Q.marks[q].isInSet(J))return new j9(this.pos,Q.marks[q]);return new j9(this.pos,this.mark)}}return new O6(this.pos,this.mark)}map(Z){let Q=Z.mapResult(this.pos,1);return Q.deletedAfter?null:new j9(Q.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(Z,Q){if(typeof Q.pos!="number")throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new j9(Q.pos,Z.markFromJSON(Q.mark))}};FJ.jsonID("addNodeMark",j9);O6=class O6 extends FJ{constructor(Z,Q){super();this.pos=Z,this.mark=Q}apply(Z){let Q=Z.nodeAt(this.pos);if(!Q)return mX.fail("No node at mark step's position");let J=Q.type.create(Q.attrs,null,this.mark.removeFromSet(Q.marks));return mX.fromReplace(Z,this.pos,this.pos+1,new AZ(UZ.from(J),0,Q.isLeaf?0:1))}invert(Z){let Q=Z.nodeAt(this.pos);if(!Q||!this.mark.isInSet(Q.marks))return this;return new j9(this.pos,this.mark)}map(Z){let Q=Z.mapResult(this.pos,1);return Q.deletedAfter?null:new O6(Q.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(Z,Q){if(typeof Q.pos!="number")throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new O6(Q.pos,Z.markFromJSON(Q.mark))}};FJ.jsonID("removeNodeMark",O6);FX=class FX extends FJ{constructor(Z,Q,J,q=!1){super();this.from=Z,this.to=Q,this.slice=J,this.structure=q}apply(Z){if(this.structure&&oI(Z,this.from,this.to))return mX.fail("Structure replace would overwrite content");return mX.fromReplace(Z,this.from,this.to,this.slice)}getMap(){return new mY([this.from,this.to-this.from,this.slice.size])}invert(Z){return new FX(this.from,this.from+this.slice.size,Z.slice(this.from,this.to))}map(Z){let Q=Z.mapResult(this.to,-1),J=this.from==this.to&&FX.MAP_BIAS<0?Q:Z.mapResult(this.from,1);if(J.deletedAcross&&Q.deletedAcross)return null;return new FX(J.pos,Math.max(J.pos,Q.pos),this.slice,this.structure)}merge(Z){if(!(Z instanceof FX)||Z.structure||this.structure)return null;if(this.from+this.slice.size==Z.from&&!this.slice.openEnd&&!Z.slice.openStart){let Q=this.slice.size+Z.slice.size==0?AZ.empty:new AZ(this.slice.content.append(Z.slice.content),this.slice.openStart,Z.slice.openEnd);return new FX(this.from,this.to+(Z.to-Z.from),Q,this.structure)}else if(Z.to==this.from&&!this.slice.openStart&&!Z.slice.openEnd){let Q=this.slice.size+Z.slice.size==0?AZ.empty:new AZ(Z.slice.content.append(this.slice.content),Z.slice.openStart,this.slice.openEnd);return new FX(Z.from,this.to,Q,this.structure)}else return null}toJSON(){let Z={stepType:"replace",from:this.from,to:this.to};if(this.slice.size)Z.slice=this.slice.toJSON();if(this.structure)Z.structure=!0;return Z}static fromJSON(Z,Q){if(typeof Q.from!="number"||typeof Q.to!="number")throw RangeError("Invalid input for ReplaceStep.fromJSON");return new FX(Q.from,Q.to,AZ.fromJSON(Z,Q.slice),!!Q.structure)}};FX.MAP_BIAS=1;FJ.jsonID("replace",FX);NX=class NX extends FJ{constructor(Z,Q,J,q,G,U,K=!1){super();this.from=Z,this.to=Q,this.gapFrom=J,this.gapTo=q,this.slice=G,this.insert=U,this.structure=K}apply(Z){if(this.structure&&(oI(Z,this.from,this.gapFrom)||oI(Z,this.gapTo,this.to)))return mX.fail("Structure gap-replace would overwrite content");let Q=Z.slice(this.gapFrom,this.gapTo);if(Q.openStart||Q.openEnd)return mX.fail("Gap is not a flat range");let J=this.slice.insertAt(this.insert,Q.content);if(!J)return mX.fail("Content does not fit in gap");return mX.fromReplace(Z,this.from,this.to,J)}getMap(){return new mY([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(Z){let Q=this.gapTo-this.gapFrom;return new NX(this.from,this.from+this.slice.size+Q,this.from+this.insert,this.from+this.insert+Q,Z.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(Z){let Q=Z.mapResult(this.from,1),J=Z.mapResult(this.to,-1),q=this.from==this.gapFrom?Q.pos:Z.map(this.gapFrom,-1),G=this.to==this.gapTo?J.pos:Z.map(this.gapTo,1);if(Q.deletedAcross&&J.deletedAcross||q<Q.pos||G>J.pos)return null;return new NX(Q.pos,J.pos,q,G,this.slice,this.insert,this.structure)}toJSON(){let Z={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};if(this.slice.size)Z.slice=this.slice.toJSON();if(this.structure)Z.structure=!0;return Z}static fromJSON(Z,Q){if(typeof Q.from!="number"||typeof Q.to!="number"||typeof Q.gapFrom!="number"||typeof Q.gapTo!="number"||typeof Q.insert!="number")throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new NX(Q.from,Q.to,Q.gapFrom,Q.gapTo,AZ.fromJSON(Z,Q.slice),Q.insert,!!Q.structure)}};FJ.jsonID("replaceAround",NX);SK=class SK extends FJ{constructor(Z,Q,J){super();this.pos=Z,this.attr=Q,this.value=J}apply(Z){let Q=Z.nodeAt(this.pos);if(!Q)return mX.fail("No node at attribute step's position");let J=Object.create(null);for(let G in Q.attrs)J[G]=Q.attrs[G];J[this.attr]=this.value;let q=Q.type.create(J,null,Q.marks);return mX.fromReplace(Z,this.pos,this.pos+1,new AZ(UZ.from(q),0,Q.isLeaf?0:1))}getMap(){return mY.empty}invert(Z){return new SK(this.pos,this.attr,Z.nodeAt(this.pos).attrs[this.attr])}map(Z){let Q=Z.mapResult(this.pos,1);return Q.deletedAfter?null:new SK(Q.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(Z,Q){if(typeof Q.pos!="number"||typeof Q.attr!="string")throw RangeError("Invalid input for AttrStep.fromJSON");return new SK(Q.pos,Q.attr,Q.value)}};FJ.jsonID("attr",SK);gH=class gH extends FJ{constructor(Z,Q){super();this.attr=Z,this.value=Q}apply(Z){let Q=Object.create(null);for(let q in Z.attrs)Q[q]=Z.attrs[q];Q[this.attr]=this.value;let J=Z.type.create(Q,Z.content,Z.marks);return mX.ok(J)}getMap(){return mY.empty}invert(Z){return new gH(this.attr,Z.attrs[this.attr])}map(Z){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(Z,Q){if(typeof Q.attr!="string")throw RangeError("Invalid input for DocAttrStep.fromJSON");return new gH(Q.attr,Q.value)}};FJ.jsonID("docAttr",gH);wK=class extends Error{};wK=function Z(Q){let J=Error.call(this,Q);return J.__proto__=Z.prototype,J};wK.prototype=Object.create(Error.prototype);wK.prototype.constructor=wK;wK.prototype.name="TransformError"});var oq=k(()=>{T9()});class mZ{constructor(Z,Q,J){this.$anchor=Z,this.$head=Q,this.ranges=J||[new fH(Z.min(Q),Z.max(Q))]}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 Z=this.ranges;for(let Q=0;Q<Z.length;Q++)if(Z[Q].$from.pos!=Z[Q].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(Z,Q=AZ.empty){let J=Q.content.lastChild,q=null;for(let K=0;K<Q.openEnd;K++)q=J,J=J.lastChild;let G=Z.steps.length,U=this.ranges;for(let K=0;K<U.length;K++){let{$from:H,$to:B}=U[K],F=Z.mapping.slice(G);if(Z.replaceRange(F.map(H.pos),F.map(B.pos),K?AZ.empty:Q),K==0)Ph(Z,G,(J?J.isInline:q&&q.isTextblock)?-1:1)}}replaceWith(Z,Q){let J=Z.steps.length,q=this.ranges;for(let G=0;G<q.length;G++){let{$from:U,$to:K}=q[G],H=Z.mapping.slice(J),B=H.map(U.pos),F=H.map(K.pos);if(G)Z.deleteRange(B,F);else Z.replaceRangeWith(B,F,Q),Ph(Z,J,Q.isInline?-1:1)}}static findFrom(Z,Q,J=!1){let q=Z.parent.inlineContent?new DZ(Z):bK(Z.node(0),Z.parent,Z.pos,Z.index(),Q,J);if(q)return q;for(let G=Z.depth-1;G>=0;G--){let U=Q<0?bK(Z.node(0),Z.node(G),Z.before(G+1),Z.index(G),Q,J):bK(Z.node(0),Z.node(G),Z.after(G+1),Z.index(G)+1,Q,J);if(U)return U}return null}static near(Z,Q=1){return this.findFrom(Z,Q)||this.findFrom(Z,-Q)||new LJ(Z.node(0))}static atStart(Z){return bK(Z,Z,0,0,1)||new LJ(Z)}static atEnd(Z){return bK(Z,Z,Z.content.size,Z.childCount,-1)||new LJ(Z)}static fromJSON(Z,Q){if(!Q||!Q.type)throw RangeError("Invalid input for Selection.fromJSON");let J=ZN[Q.type];if(!J)throw RangeError(`No selection type ${Q.type} defined`);return J.fromJSON(Z,Q)}static jsonID(Z,Q){if(Z in ZN)throw RangeError("Duplicate use of selection JSON ID "+Z);return ZN[Z]=Q,Q.prototype.jsonID=Z,Q}getBookmark(){return DZ.between(this.$anchor,this.$head).getBookmark()}}class fH{constructor(Z,Q){this.$from=Z,this.$to=Q}}function Th(Z){if(!jh&&!Z.parent.inlineContent)jh=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+Z.parent.type.name+")")}class r2{constructor(Z,Q){this.anchor=Z,this.head=Q}map(Z){return new r2(Z.map(this.anchor),Z.map(this.head))}resolve(Z){return DZ.between(Z.resolve(this.anchor),Z.resolve(this.head))}}class XN{constructor(Z){this.anchor=Z}map(Z){let{deleted:Q,pos:J}=Z.mapResult(this.anchor);return Q?new r2(J,J):new XN(J)}resolve(Z){let Q=Z.resolve(this.anchor),J=Q.nodeAfter;if(J&&SZ.isSelectable(J))return new SZ(Q);return mZ.near(Q)}}function bK(Z,Q,J,q,G,U=!1){if(Q.inlineContent)return DZ.create(Z,J);for(let K=q-(G>0?0:1);G>0?K<Q.childCount:K>=0;K+=G){let H=Q.child(K);if(!H.isAtom){let B=bK(Z,H,J+G,G<0?H.childCount:0,G,U);if(B)return B}else if(!U&&SZ.isSelectable(H))return SZ.create(Z,J-(G<0?H.nodeSize:0));J+=H.nodeSize*G}return null}function Ph(Z,Q,J){let q=Z.steps.length-1;if(q<Q)return;let G=Z.steps[q];if(!(G instanceof FX||G instanceof NX))return;let U=Z.mapping.maps[q],K;U.forEach((H,B,F,M)=>{if(K==null)K=M}),Z.setSelection(mZ.near(Z.doc.resolve(K),J))}function Dh(Z,Q){return!Q||!Z?Z:Z.bind(Q)}class vK{constructor(Z,Q,J){this.name=Z,this.init=Dh(Q.init,J),this.apply=Dh(Q.apply,J)}}class a2{constructor(Z,Q){if(this.schema=Z,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=IZZ.slice(),Q)Q.forEach((J)=>{if(this.pluginsByKey[J.key])throw RangeError("Adding different instances of a keyed plugin ("+J.key+")");if(this.plugins.push(J),this.pluginsByKey[J.key]=J,J.spec.state)this.fields.push(new vK(J.key,J.spec.state,J))})}}class P9{constructor(Z){this.config=Z}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(Z){return this.applyTransaction(Z).state}filterTransaction(Z,Q=-1){for(let J=0;J<this.config.plugins.length;J++)if(J!=Q){let q=this.config.plugins[J];if(q.spec.filterTransaction&&!q.spec.filterTransaction.call(q,Z,this))return!1}return!0}applyTransaction(Z){if(!this.filterTransaction(Z))return{state:this,transactions:[]};let Q=[Z],J=this.applyInner(Z),q=null;for(;;){let G=!1;for(let U=0;U<this.config.plugins.length;U++){let K=this.config.plugins[U];if(K.spec.appendTransaction){let H=q?q[U].n:0,B=q?q[U].state:this,F=H<Q.length&&K.spec.appendTransaction.call(K,H?Q.slice(H):Q,B,J);if(F&&J.filterTransaction(F,U)){if(F.setMeta("appendedTransaction",Z),!q){q=[];for(let M=0;M<this.config.plugins.length;M++)q.push(M<U?{state:J,n:Q.length}:{state:this,n:0})}Q.push(F),J=J.applyInner(F),G=!0}if(q)q[U]={state:J,n:Q.length}}}if(!G)return{state:J,transactions:Q}}}applyInner(Z){if(!Z.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let Q=new P9(this.config),J=this.config.fields;for(let q=0;q<J.length;q++){let G=J[q];Q[G.name]=G.apply(Z,this[G.name],this,Q)}return Q}get tr(){return new $h(this)}static create(Z){let Q=new a2(Z.doc?Z.doc.type.schema:Z.schema,Z.plugins),J=new P9(Q);for(let q=0;q<Q.fields.length;q++)J[Q.fields[q].name]=Q.fields[q].init(Z,J);return J}reconfigure(Z){let Q=new a2(this.schema,Z.plugins),J=Q.fields,q=new P9(Q);for(let G=0;G<J.length;G++){let U=J[G].name;q[U]=this.hasOwnProperty(U)?this[U]:J[G].init(Z,q)}return q}toJSON(Z){let Q={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks)Q.storedMarks=this.storedMarks.map((J)=>J.toJSON());if(Z&&typeof Z=="object")for(let J in Z){if(J=="doc"||J=="selection")throw RangeError("The JSON fields `doc` and `selection` are reserved");let q=Z[J],G=q.spec.state;if(G&&G.toJSON)Q[J]=G.toJSON.call(q,this[q.key])}return Q}static fromJSON(Z,Q,J){if(!Q)throw RangeError("Invalid input for EditorState.fromJSON");if(!Z.schema)throw RangeError("Required config field 'schema' missing");let q=new a2(Z.schema,Z.plugins),G=new P9(q);return q.fields.forEach((U)=>{if(U.name=="doc")G.doc=lJ.fromJSON(Z.schema,Q.doc);else if(U.name=="selection")G.selection=mZ.fromJSON(G.doc,Q.selection);else if(U.name=="storedMarks"){if(Q.storedMarks)G.storedMarks=Q.storedMarks.map(Z.schema.markFromJSON)}else{if(J)for(let K in J){let H=J[K],B=H.spec.state;if(H.key==U.name&&B&&B.fromJSON&&Object.prototype.hasOwnProperty.call(Q,K)){G[U.name]=B.fromJSON.call(H,Z,Q[K],G);return}}G[U.name]=U.init(Z,G)}}),G}}function Eh(Z,Q,J){for(let q in Z){let G=Z[q];if(G instanceof Function)G=G.bind(Q);else if(q=="handleDOMEvents")G=Eh(G,Q,{});J[q]=G}return J}class lZ{constructor(Z){if(this.spec=Z,this.props={},Z.props)Eh(Z.props,this,this.props);this.key=Z.key?Z.key.key:kh("plugin")}getState(Z){return Z[this.key]}}function kh(Z){if(Z in QN)return Z+"$"+ ++QN[Z];return QN[Z]=0,Z+"$"}class tZ{constructor(Z="key"){this.key=kh(Z)}get(Z){return Z.config.pluginsByKey[this.key]}getState(Z){return Z[this.key]}}var ZN,jh=!1,DZ,SZ,LJ,AZZ,Rh=1,s2=2,Ch=4,$h,IZZ,QN;var nz=k(()=>{lz();T9();ZN=Object.create(null);mZ.prototype.visible=!0;DZ=class DZ extends mZ{constructor(Z,Q=Z){Th(Z),Th(Q);super(Z,Q)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(Z,Q){let J=Z.resolve(Q.map(this.head));if(!J.parent.inlineContent)return mZ.near(J);let q=Z.resolve(Q.map(this.anchor));return new DZ(q.parent.inlineContent?q:J,J)}replace(Z,Q=AZ.empty){if(super.replace(Z,Q),Q==AZ.empty){let J=this.$from.marksAcross(this.$to);if(J)Z.ensureMarks(J)}}eq(Z){return Z instanceof DZ&&Z.anchor==this.anchor&&Z.head==this.head}getBookmark(){return new r2(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(Z,Q){if(typeof Q.anchor!="number"||typeof Q.head!="number")throw RangeError("Invalid input for TextSelection.fromJSON");return new DZ(Z.resolve(Q.anchor),Z.resolve(Q.head))}static create(Z,Q,J=Q){let q=Z.resolve(Q);return new this(q,J==Q?q:Z.resolve(J))}static between(Z,Q,J){let q=Z.pos-Q.pos;if(!J||q)J=q>=0?1:-1;if(!Q.parent.inlineContent){let G=mZ.findFrom(Q,J,!0)||mZ.findFrom(Q,-J,!0);if(G)Q=G.$head;else return mZ.near(Q,J)}if(!Z.parent.inlineContent){if(q==0)Z=Q;else if(Z=(mZ.findFrom(Z,-J,!0)||mZ.findFrom(Z,J,!0)).$anchor,Z.pos<Q.pos!=q<0)Z=Q}return new DZ(Z,Q)}};mZ.jsonID("text",DZ);SZ=class SZ extends mZ{constructor(Z){let Q=Z.nodeAfter,J=Z.node(0).resolve(Z.pos+Q.nodeSize);super(Z,J);this.node=Q}map(Z,Q){let{deleted:J,pos:q}=Q.mapResult(this.anchor),G=Z.resolve(q);if(J)return mZ.near(G);return new SZ(G)}content(){return new AZ(UZ.from(this.node),0,0)}eq(Z){return Z instanceof SZ&&Z.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new XN(this.anchor)}static fromJSON(Z,Q){if(typeof Q.anchor!="number")throw RangeError("Invalid input for NodeSelection.fromJSON");return new SZ(Z.resolve(Q.anchor))}static create(Z,Q){return new SZ(Z.resolve(Q))}static isSelectable(Z){return!Z.isText&&Z.type.spec.selectable!==!1}};SZ.prototype.visible=!1;mZ.jsonID("node",SZ);LJ=class LJ extends mZ{constructor(Z){super(Z.resolve(0),Z.resolve(Z.content.size))}replace(Z,Q=AZ.empty){if(Q==AZ.empty){Z.delete(0,Z.doc.content.size);let J=mZ.atStart(Z.doc);if(!J.eq(Z.selection))Z.setSelection(J)}else super.replace(Z,Q)}toJSON(){return{type:"all"}}static fromJSON(Z){return new LJ(Z)}map(Z){return new LJ(Z)}eq(Z){return Z instanceof LJ}getBookmark(){return AZZ}};mZ.jsonID("all",LJ);AZZ={map(){return this},resolve(Z){return new LJ(Z)}};$h=class $h extends uH{constructor(Z){super(Z.doc);this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=Z.selection,this.storedMarks=Z.storedMarks}get selection(){if(this.curSelectionFor<this.steps.length)this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length;return this.curSelection}setSelection(Z){if(Z.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=Z,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Rh)&~s2,this.storedMarks=null,this}get selectionSet(){return(this.updated&Rh)>0}setStoredMarks(Z){return this.storedMarks=Z,this.updated|=s2,this}ensureMarks(Z){if(!wQ.sameSet(this.storedMarks||this.selection.$from.marks(),Z))this.setStoredMarks(Z);return this}addStoredMark(Z){return this.ensureMarks(Z.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(Z){return this.ensureMarks(Z.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&s2)>0}addStep(Z,Q){super.addStep(Z,Q),this.updated=this.updated&~s2,this.storedMarks=null}setTime(Z){return this.time=Z,this}replaceSelection(Z){return this.selection.replace(this,Z),this}replaceSelectionWith(Z,Q=!0){let J=this.selection;if(Q)Z=Z.mark(this.storedMarks||(J.empty?J.$from.marks():J.$from.marksAcross(J.$to)||wQ.none));return J.replaceWith(this,Z),this}deleteSelection(){return this.selection.replace(this),this}insertText(Z,Q,J){let q=this.doc.type.schema;if(Q==null){if(!Z)return this.deleteSelection();return this.replaceSelectionWith(q.text(Z),!0)}else{if(J==null)J=Q;if(!Z)return this.deleteRange(Q,J);let G=this.storedMarks;if(!G){let U=this.doc.resolve(Q);G=J==Q?U.marks():U.marksAcross(this.doc.resolve(J))}if(this.replaceRangeWith(Q,J,q.text(Z,G)),!this.selection.empty&&this.selection.to==Q+Z.length)this.setSelection(mZ.near(this.selection.$to));return this}}setMeta(Z,Q){return this.meta[typeof Z=="string"?Z:Z.key]=Q,this}getMeta(Z){return this.meta[typeof Z=="string"?Z:Z.key]}get isGeneric(){for(let Z in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Ch,this}get scrolledIntoView(){return(this.updated&Ch)>0}};IZZ=[new vK("doc",{init(Z){return Z.doc||Z.schema.topNodeType.createAndFill()},apply(Z){return Z.doc}}),new vK("selection",{init(Z,Q){return Z.selection||mZ.atStart(Q.doc)},apply(Z){return Z.selection}}),new vK("storedMarks",{init(Z){return Z.storedMarks||null},apply(Z,Q,J,q){return q.selection.$cursor?Z.storedMarks:null}}),new vK("scrollToSelection",{init(){return 0},apply(Z,Q){return Z.scrolledIntoView?Q+1:Q}})];QN=Object.create(null)});function wh(Z,Q){let{$cursor:J}=Z.selection;if(!J||(Q?!Q.endOfTextblock("backward",Z):J.parentOffset>0))return null;return J}function vh(Z,Q,J){let q=Q.nodeBefore,G=q,U=Q.pos-1;for(;!G.isTextblock;U--){if(G.type.spec.isolating)return!1;let M=G.lastChild;if(!M)return!1;G=M}let K=Q.nodeAfter,H=K,B=Q.pos+1;for(;!H.isTextblock;B++){if(H.type.spec.isolating)return!1;let M=H.firstChild;if(!M)return!1;H=M}let F=hH(Z.doc,U,B,AZ.empty);if(!F||F.from!=U||F instanceof FX&&F.slice.size>=B-U)return!1;if(J){let M=Z.tr.step(F);M.setSelection(DZ.create(M.doc,U)),J(M.scrollIntoView())}return!0}function gK(Z,Q,J=!1){for(let q=Z;q;q=Q=="start"?q.firstChild:q.lastChild){if(q.isTextblock)return!0;if(J&&q.childCount!=1)return!1}return!1}function GN(Z){if(!Z.parent.type.spec.isolating)for(let Q=Z.depth-1;Q>=0;Q--){if(Z.index(Q)>0)return Z.doc.resolve(Z.before(Q+1));if(Z.node(Q).type.spec.isolating)break}return null}function gh(Z,Q){let{$cursor:J}=Z.selection;if(!J||(Q?!Q.endOfTextblock("forward",Z):J.parentOffset<J.parent.content.size))return null;return J}function KN(Z){if(!Z.parent.type.spec.isolating)for(let Q=Z.depth-1;Q>=0;Q--){let J=Z.node(Q);if(Z.index(Q)+1<J.childCount)return Z.doc.resolve(Z.after(Q+1));if(J.type.spec.isolating)break}return null}function WN(Z){for(let Q=0;Q<Z.edgeCount;Q++){let{type:J}=Z.edge(Q);if(J.isTextblock&&!J.hasRequiredAttrs())return J}return null}function NZZ(Z){return(Q,J)=>{let{$from:q,$to:G}=Q.selection;if(Q.selection instanceof SZ&&Q.selection.node.isBlock){if(!q.parentOffset||!cY(Q.doc,q.pos))return!1;if(J)J(Q.tr.split(q.pos).scrollIntoView());return!0}if(!q.depth)return!1;let U=[],K,H,B=!1,F=!1;for(let A=q.depth;;A--)if(q.node(A).isBlock){B=q.end(A)==q.pos+(q.depth-A),F=q.start(A)==q.pos-(q.depth-A),H=WN(q.node(A-1).contentMatchAt(q.indexAfter(A-1)));let T=Z&&Z(G.parent,B,q);U.unshift(T||(B&&H?{type:H}:null)),K=A;break}else{if(A==1)return!1;U.unshift(null)}let M=Q.tr;if(Q.selection instanceof DZ||Q.selection instanceof LJ)M.deleteSelection();let O=M.mapping.map(q.pos),V=cY(M.doc,O,U.length,U);if(!V)U[0]=H?{type:H}:null,V=cY(M.doc,O,U.length,U);if(!V)return!1;if(M.split(O,U.length,U),!B&&F&&q.node(K).type!=H){let A=M.mapping.map(q.before(K)),N=M.doc.resolve(A);if(H&&q.node(K-1).canReplaceWith(N.index(),N.index()+1,H))M.setNodeMarkup(M.mapping.map(q.before(K)),H)}if(J)J(M.scrollIntoView());return!0}}function PZZ(Z,Q,J){let{nodeBefore:q,nodeAfter:G}=Q,U=Q.index();if(!q||!G||!q.type.compatibleContent(G.type))return!1;if(!q.content.size&&Q.parent.canReplace(U-1,U)){if(J)J(Z.tr.delete(Q.pos-q.nodeSize,Q.pos).scrollIntoView());return!0}if(!Q.parent.canReplace(U,U+1)||!(G.isTextblock||Oq(Z.doc,Q.pos)))return!1;if(J)J(Z.tr.join(Q.pos).scrollIntoView());return!0}function ch(Z,Q,J,q){let{nodeBefore:G,nodeAfter:U}=Q,K,H,B=G.type.spec.isolating||U.type.spec.isolating;if(!B&&PZZ(Z,Q,J))return!0;let F=!B&&Q.parent.canReplace(Q.index(),Q.index()+1);if(F&&(K=(H=G.contentMatchAt(G.childCount)).findWrapping(U.type))&&H.matchType(K[0]||U.type).validEnd){if(J){let A=Q.pos+U.nodeSize,N=UZ.empty;for(let C=K.length-1;C>=0;C--)N=UZ.from(K[C].create(null,N));N=UZ.from(G.copy(N));let T=Z.tr.step(new NX(Q.pos-1,A,Q.pos,A,new AZ(N,1,0),K.length,!0)),P=T.doc.resolve(A+2*K.length);if(P.nodeAfter&&P.nodeAfter.type==G.type&&Oq(T.doc,P.pos))T.join(P.pos);J(T.scrollIntoView())}return!0}let M=U.type.spec.isolating||q>0&&B?null:mZ.findFrom(Q,1),O=M&&M.$from.blockRange(M.$to),V=O&&iz(O);if(V!=null&&V>=Q.depth){if(J)J(Z.tr.lift(O,V).scrollIntoView());return!0}if(F&&gK(U,"start",!0)&&gK(G,"end")){let A=G,N=[];for(;;){if(N.push(A),A.isTextblock)break;A=A.lastChild}let T=U,P=1;for(;!T.isTextblock;T=T.firstChild)P++;if(A.canReplace(A.childCount,A.childCount,T.content)){if(J){let C=UZ.empty;for(let f=N.length-1;f>=0;f--)C=UZ.from(N[f].copy(C));let y=Z.tr.step(new NX(Q.pos-N.length,Q.pos+U.nodeSize,Q.pos+P,Q.pos+U.nodeSize-P,new AZ(C,N.length,0),0,!0));J(y.scrollIntoView())}return!0}}return!1}function ph(Z){return function(Q,J){let q=Q.selection,G=Z<0?q.$from:q.$to,U=G.depth;while(G.node(U).isInline){if(!U)return!1;U--}if(!G.node(U).isTextblock)return!1;if(J)J(Q.tr.setSelection(DZ.create(Q.doc,Z<0?G.start(U):G.end(U))));return!0}}function dh(Z,Q=null){return function(J,q){let{$from:G,$to:U}=J.selection,K=G.blockRange(U),H=K&&xK(K,Z,Q);if(!H)return!1;if(q)q(J.tr.wrap(K,H).scrollIntoView());return!0}}function ON(Z,Q=null){return function(J,q){let G=!1;for(let U=0;U<J.selection.ranges.length&&!G;U++){let{$from:{pos:K},$to:{pos:H}}=J.selection.ranges[U];J.doc.nodesBetween(K,H,(B,F)=>{if(G)return!1;if(!B.isTextblock||B.hasMarkup(Z,Q))return;if(B.type==Z)G=!0;else{let M=J.doc.resolve(F),O=M.index();G=M.parent.canReplaceWith(O,O+1,Z)}})}if(!G)return!1;if(q){let U=J.tr;for(let K=0;K<J.selection.ranges.length;K++){let{$from:{pos:H},$to:{pos:B}}=J.selection.ranges[K];U.setBlockType(H,B,Z,Q)}q(U.scrollIntoView())}return!0}}function VN(...Z){return function(Q,J,q){for(let G=0;G<Z.length;G++)if(Z[G](Q,J,q))return!0;return!1}}var yh=(Z,Q)=>{if(Z.selection.empty)return!1;if(Q)Q(Z.tr.deleteSelection().scrollIntoView());return!0},YN=(Z,Q,J)=>{let q=wh(Z,J);if(!q)return!1;let G=GN(q);if(!G){let K=q.blockRange(),H=K&&iz(K);if(H==null)return!1;if(Q)Q(Z.tr.lift(K,H).scrollIntoView());return!0}let U=G.nodeBefore;if(ch(Z,G,Q,-1))return!0;if(q.parent.content.size==0&&(gK(U,"end")||SZ.isSelectable(U)))for(let K=q.depth;;K--){let H=hH(Z.doc,q.before(K),q.after(K),AZ.empty);if(H&&H.slice.size<H.to-H.from){if(Q){let B=Z.tr.step(H);B.setSelection(gK(U,"end")?mZ.findFrom(B.doc.resolve(B.mapping.map(G.pos,-1)),-1):SZ.create(B.doc,G.pos-U.nodeSize)),Q(B.scrollIntoView())}return!0}if(K==1||q.node(K-1).childCount>1)break}if(U.isAtom&&G.depth==q.depth-1){if(Q)Q(Z.tr.delete(G.pos-U.nodeSize,G.pos).scrollIntoView());return!0}return!1},xh=(Z,Q,J)=>{let q=wh(Z,J);if(!q)return!1;let G=GN(q);return G?vh(Z,G,Q):!1},bh=(Z,Q,J)=>{let q=gh(Z,J);if(!q)return!1;let G=KN(q);return G?vh(Z,G,Q):!1},qN=(Z,Q,J)=>{let{$head:q,empty:G}=Z.selection,U=q;if(!G)return!1;if(q.parent.isTextblock){if(J?!J.endOfTextblock("backward",Z):q.parentOffset>0)return!1;U=GN(q)}let K=U&&U.nodeBefore;if(!K||!SZ.isSelectable(K))return!1;if(Q)Q(Z.tr.setSelection(SZ.create(Z.doc,U.pos-K.nodeSize)).scrollIntoView());return!0},zN=(Z,Q,J)=>{let q=gh(Z,J);if(!q)return!1;let G=KN(q);if(!G)return!1;let U=G.nodeAfter;if(ch(Z,G,Q,1))return!0;if(q.parent.content.size==0&&(gK(U,"start")||SZ.isSelectable(U))){let K=hH(Z.doc,q.before(),q.after(),AZ.empty);if(K&&K.slice.size<K.to-K.from){if(Q){let H=Z.tr.step(K);H.setSelection(gK(U,"start")?mZ.findFrom(H.doc.resolve(H.mapping.map(G.pos)),1):SZ.create(H.doc,H.mapping.map(G.pos))),Q(H.scrollIntoView())}return!0}}if(U.isAtom&&G.depth==q.depth-1){if(Q)Q(Z.tr.delete(G.pos,G.pos+U.nodeSize).scrollIntoView());return!0}return!1},UN=(Z,Q,J)=>{let{$head:q,empty:G}=Z.selection,U=q;if(!G)return!1;if(q.parent.isTextblock){if(J?!J.endOfTextblock("forward",Z):q.parentOffset<q.parent.content.size)return!1;U=KN(q)}let K=U&&U.nodeAfter;if(!K||!SZ.isSelectable(K))return!1;if(Q)Q(Z.tr.setSelection(SZ.create(Z.doc,U.pos)).scrollIntoView());return!0},hh=(Z,Q)=>{let J=Z.selection,q=J instanceof SZ,G;if(q){if(J.node.isTextblock||!Oq(Z.doc,J.from))return!1;G=J.from}else if(G=V6(Z.doc,J.from,-1),G==null)return!1;if(Q){let U=Z.tr.join(G);if(q)U.setSelection(SZ.create(U.doc,G-Z.doc.resolve(G).nodeBefore.nodeSize));Q(U.scrollIntoView())}return!0},uh=(Z,Q)=>{let J=Z.selection,q;if(J instanceof SZ){if(J.node.isTextblock||!Oq(Z.doc,J.to))return!1;q=J.to}else if(q=V6(Z.doc,J.to,1),q==null)return!1;if(Q)Q(Z.tr.join(q).scrollIntoView());return!0},fh=(Z,Q)=>{let{$from:J,$to:q}=Z.selection,G=J.blockRange(q),U=G&&iz(G);if(U==null)return!1;if(Q)Q(Z.tr.lift(G,U).scrollIntoView());return!0},HN=(Z,Q)=>{let{$head:J,$anchor:q}=Z.selection;if(!J.parent.type.spec.code||!J.sameParent(q))return!1;if(Q)Q(Z.tr.insertText(`
|
|
256
|
+
`).scrollIntoView());return!0},BN=(Z,Q)=>{let{$head:J,$anchor:q}=Z.selection;if(!J.parent.type.spec.code||!J.sameParent(q))return!1;let G=J.node(-1),U=J.indexAfter(-1),K=WN(G.contentMatchAt(U));if(!K||!G.canReplaceWith(U,U,K))return!1;if(Q){let H=J.after(),B=Z.tr.replaceWith(H,H,K.createAndFill());B.setSelection(mZ.near(B.doc.resolve(H),1)),Q(B.scrollIntoView())}return!0},_N=(Z,Q)=>{let J=Z.selection,{$from:q,$to:G}=J;if(J instanceof LJ||q.parent.inlineContent||G.parent.inlineContent)return!1;let U=WN(G.parent.contentMatchAt(G.indexAfter()));if(!U||!U.isTextblock)return!1;if(Q){let K=(!q.parentOffset&&G.index()<G.parent.childCount?q:G).pos,H=Z.tr.insert(K,U.createAndFill());H.setSelection(DZ.create(H.doc,K+1)),Q(H.scrollIntoView())}return!0},FN=(Z,Q)=>{let{$cursor:J}=Z.selection;if(!J||J.parent.content.size)return!1;if(J.depth>1&&J.after()!=J.end(-1)){let U=J.before();if(cY(Z.doc,U)){if(Q)Q(Z.tr.split(U).scrollIntoView());return!0}}let q=J.blockRange(),G=q&&iz(q);if(G==null)return!1;if(Q)Q(Z.tr.lift(q,G).scrollIntoView());return!0},jZZ,mh=(Z,Q)=>{let{$from:J,to:q}=Z.selection,G,U=J.sharedDepth(q);if(U==0)return!1;if(G=J.before(U),Q)Q(Z.tr.setSelection(SZ.create(Z.doc,G)));return!0},TZZ=(Z,Q)=>{if(Q)Q(Z.tr.setSelection(new LJ(Z.doc)));return!0},LN,MN,JN,Sh,R9,RZZ,AjZ;var lh=k(()=>{T9();lz();nz();jZZ=NZZ();LN=ph(-1),MN=ph(1);JN=VN(yh,YN,qN),Sh=VN(yh,zN,UN),R9={Enter:VN(HN,_N,FN,jZZ),"Mod-Enter":BN,Backspace:JN,"Mod-Backspace":JN,"Shift-Backspace":JN,Delete:Sh,"Mod-Delete":Sh,"Mod-a":TZZ},RZZ={"Ctrl-h":R9.Backspace,"Alt-Backspace":R9["Mod-Backspace"],"Ctrl-d":R9.Delete,"Ctrl-Alt-Backspace":R9["Mod-Delete"],"Alt-Delete":R9["Mod-Delete"],"Alt-d":R9["Mod-Delete"],"Ctrl-a":LN,"Ctrl-e":MN};for(let Z in R9)RZZ[Z]=R9[Z];AjZ=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1});var CJ=k(()=>{lh()});var YQ=k(()=>{nz()});var Vq=k(()=>{lz()});function ih(Z,Q=null){return function(J,q){let{$from:G,$to:U}=J.selection,K=G.blockRange(U);if(!K)return!1;let H=q?J.tr:null;if(!CZZ(H,K,Z,Q))return!1;if(q)q(H.scrollIntoView());return!0}}function CZZ(Z,Q,J,q=null){let G=!1,U=Q,K=Q.$from.doc;if(Q.depth>=2&&Q.$from.node(Q.depth-1).type.compatibleContent(J)&&Q.startIndex==0){if(Q.$from.index(Q.depth-1)==0)return!1;let B=K.resolve(Q.start-2);if(U=new kK(B,B,Q.depth),Q.endIndex<Q.parent.childCount)Q=new kK(Q.$from,K.resolve(Q.$to.end(Q.depth)),Q.depth);G=!0}let H=xK(U,J,q,Q);if(!H)return!1;if(Z)DZZ(Z,Q,H,G,J);return!0}function DZZ(Z,Q,J,q,G){let U=UZ.empty;for(let M=J.length-1;M>=0;M--)U=UZ.from(J[M].type.create(J[M].attrs,U));Z.step(new NX(Q.start-(q?2:0),Q.end,Q.start,Q.end,new AZ(U,0,0),J.length,!0));let K=0;for(let M=0;M<J.length;M++)if(J[M].type==G)K=M+1;let H=J.length-K,B=Q.start+J.length-(q?2:0),F=Q.parent;for(let{startIndex:M,endIndex:O}=Q,V=!0;M<O;M++,V=!1){if(!V&&cY(Z.doc,B,H))Z.split(B,H),B+=2*H;B+=F.child(M).nodeSize}return Z}function nh(Z){return function(Q,J){let{$from:q,$to:G}=Q.selection,U=q.blockRange(G,(K)=>K.childCount>0&&K.firstChild.type==Z);if(!U)return!1;if(!J)return!0;if(q.node(U.depth-1).type==Z)return $ZZ(Q,J,Z,U);else return EZZ(Q,J,U)}}function $ZZ(Z,Q,J,q){let G=Z.tr,U=q.end,K=q.$to.end(q.depth);if(U<K)G.step(new NX(U-1,K,U,K,new AZ(UZ.from(J.create(null,q.parent.copy())),1,0),1,!0)),q=new kK(G.doc.resolve(q.$from.pos),G.doc.resolve(K),q.depth);let H=iz(q);if(H==null)return!1;G.lift(q,H);let B=G.doc.resolve(G.mapping.map(U,-1)-1);if(Oq(G.doc,B.pos)&&B.nodeBefore.type==B.nodeAfter.type)G.join(B.pos);return Q(G.scrollIntoView()),!0}function EZZ(Z,Q,J){let q=Z.tr,G=J.parent;for(let A=J.end,N=J.endIndex-1,T=J.startIndex;N>T;N--)A-=G.child(N).nodeSize,q.delete(A-1,A+1);let U=q.doc.resolve(J.start),K=U.nodeAfter;if(q.mapping.map(J.end)!=J.start+U.nodeAfter.nodeSize)return!1;let H=J.startIndex==0,B=J.endIndex==G.childCount,F=U.node(-1),M=U.index(-1);if(!F.canReplace(M+(H?0:1),M+1,K.content.append(B?UZ.empty:UZ.from(G))))return!1;let O=U.pos,V=O+K.nodeSize;return q.step(new NX(O-(H?1:0),V+(B?1:0),O+1,V-1,new AZ((H?UZ.empty:UZ.from(G.copy(UZ.empty))).append(B?UZ.empty:UZ.from(G.copy(UZ.empty))),H?0:1,B?0:1),H?0:1)),Q(q.scrollIntoView()),!0}function sh(Z){return function(Q,J){let{$from:q,$to:G}=Q.selection,U=q.blockRange(G,(F)=>F.childCount>0&&F.firstChild.type==Z);if(!U)return!1;let K=U.startIndex;if(K==0)return!1;let H=U.parent,B=H.child(K-1);if(B.type!=Z)return!1;if(J){let F=B.lastChild&&B.lastChild.type==H.type,M=UZ.from(F?Z.create():null),O=new AZ(UZ.from(Z.create(null,UZ.from(H.type.create(null,M)))),F?3:1,0),V=U.start,A=U.end;J(Q.tr.step(new NX(V-(F?3:1),A,V,A,O,1,!0)).scrollIntoView())}return!0}}var ah=k(()=>{T9();lz()});var o2=k(()=>{ah()});function rh(Z,Q,J,q,G){var U;for(;;){if(Z==J&&Q==q)return!0;if(Q==(G<0?0:Iq(Z))){let K=Z.parentNode;if(!K||K.nodeType!=1||nH(Z)||SZZ.test(Z.nodeName)||Z.contentEditable=="false")return!1;Q=MJ(Z)+(G<0?0:1),Z=K}else if(Z.nodeType==1){let K=Z.childNodes[Q+(G<0?-1:0)];if(K.nodeType==1&&K.contentEditable=="false")if((U=K.pmViewDesc)===null||U===void 0?void 0:U.ignoreForSelection)Q+=G;else return!1;else Z=K,Q=G<0?Iq(Z):0}else return!1}}function Iq(Z){return Z.nodeType==3?Z.nodeValue.length:Z.childNodes.length}function yZZ(Z,Q){for(;;){if(Z.nodeType==3&&Q)return Z;if(Z.nodeType==1&&Q>0){if(Z.contentEditable=="false")return null;Z=Z.childNodes[Q-1],Q=Iq(Z)}else if(Z.parentNode&&!nH(Z))Q=MJ(Z),Z=Z.parentNode;else return null}}function wZZ(Z,Q){for(;;){if(Z.nodeType==3&&Q<Z.nodeValue.length)return Z;if(Z.nodeType==1&&Q<Z.childNodes.length){if(Z.contentEditable=="false")return null;Z=Z.childNodes[Q],Q=0}else if(Z.parentNode&&!nH(Z))Q=MJ(Z)+1,Z=Z.parentNode;else return null}}function xZZ(Z,Q,J){for(let q=Q==0,G=Q==Iq(Z);q||G;){if(Z==J)return!0;let U=MJ(Z);if(Z=Z.parentNode,!Z)return!1;q=q&&U==0,G=G&&U==Iq(Z)}}function nH(Z){let Q;for(let J=Z;J;J=J.parentNode)if(Q=J.pmViewDesc)break;return Q&&Q.node&&Q.node.isBlock&&(Q.dom==Z||Q.contentDOM==Z)}function A6(Z,Q){let J=document.createEvent("Event");return J.initEvent("keydown",!0,!0),J.keyCode=Z,J.key=J.code=Q,J}function bZZ(Z){let Q=Z.activeElement;while(Q&&Q.shadowRoot)Q=Q.shadowRoot.activeElement;return Q}function vZZ(Z,Q,J){if(Z.caretPositionFromPoint)try{let q=Z.caretPositionFromPoint(Q,J);if(q)return{node:q.offsetNode,offset:Math.min(Iq(q.offsetNode),q.offset)}}catch(q){}if(Z.caretRangeFromPoint){let q=Z.caretRangeFromPoint(Q,J);if(q)return{node:q.startContainer,offset:Math.min(Iq(q.startContainer),q.startOffset)}}}function hZZ(Z){let Q=Z.defaultView&&Z.defaultView.visualViewport;if(Q)return{left:0,right:Q.width,top:0,bottom:Q.height};return{left:0,right:Z.documentElement.clientWidth,top:0,bottom:Z.documentElement.clientHeight}}function sz(Z,Q){return typeof Z=="number"?Z:Z[Q]}function uZZ(Z){let Q=Z.getBoundingClientRect(),J=Q.width/Z.offsetWidth||1,q=Q.height/Z.offsetHeight||1;return{left:Q.left,right:Q.left+Z.clientWidth*J,top:Q.top,bottom:Q.top+Z.clientHeight*q}}function th(Z,Q,J){if(!$N(Q)&&Q.left==0)return;let q=Z.someProp("scrollThreshold")||0,G=Z.someProp("scrollMargin")||5,U=Z.dom.ownerDocument;for(let K=J||Z.dom;;){if(!K)break;if(K.nodeType!=1){K=mK(K);continue}let H=K,B=H==U.body,F=B?hZZ(U):uZZ(H),M=0,O=0;if(Q.top<F.top+sz(q,"top"))O=-(F.top-Q.top+sz(G,"top"));else if(Q.bottom>F.bottom-sz(q,"bottom"))O=Q.bottom-Q.top>F.bottom-F.top?Q.top+sz(G,"top")-F.top:Q.bottom-F.bottom+sz(G,"bottom");if(Q.left<F.left+sz(q,"left"))M=-(F.left-Q.left+sz(G,"left"));else if(Q.right>F.right-sz(q,"right"))M=Q.right-F.right+sz(G,"right");if(M||O)if(B)U.defaultView.scrollBy(M,O);else{let{scrollLeft:A,scrollTop:N}=H;if(O)H.scrollTop+=O;if(M)H.scrollLeft+=M;let T=H.scrollLeft-A,P=H.scrollTop-N;Q={left:Q.left-T,top:Q.top-P,right:Q.right-T,bottom:Q.bottom-P}}let V=B?"fixed":getComputedStyle(K).position;if(/^(fixed|sticky)$/.test(V))break;K=V=="absolute"?K.offsetParent:mK(K)}}function fZZ(Z){let Q=Z.dom.getBoundingClientRect(),J=Math.max(0,Q.top),q,G;for(let U=(Q.left+Q.right)/2,K=J+1;K<Math.min(innerHeight,Q.bottom);K+=5){let H=Z.root.elementFromPoint(U,K);if(!H||H==Z.dom||!Z.dom.contains(H))continue;let B=H.getBoundingClientRect();if(B.top>=J-20){q=H,G=B.top;break}}return{refDOM:q,refTop:G,stack:Eu(Z.dom)}}function Eu(Z){let Q=[],J=Z.ownerDocument;for(let q=Z;q;q=mK(q))if(Q.push({dom:q,top:q.scrollTop,left:q.scrollLeft}),Z==J)break;return Q}function mZZ({refDOM:Z,refTop:Q,stack:J}){let q=Z?Z.getBoundingClientRect().top:0;ku(J,q==0?0:q-Q)}function ku(Z,Q){for(let J=0;J<Z.length;J++){let{dom:q,top:G,left:U}=Z[J];if(q.scrollTop!=G+Q)q.scrollTop=G+Q;if(q.scrollLeft!=U)q.scrollLeft=U}}function cZZ(Z){if(Z.setActive)return Z.setActive();if(hK)return Z.focus(hK);let Q=Eu(Z);if(Z.focus(hK==null?{get preventScroll(){return hK={preventScroll:!0},!0}}:void 0),!hK)hK=!1,ku(Q,0)}function Su(Z,Q){let J,q=200000000,G,U=0,K=Q.top,H=Q.top,B,F;for(let M=Z.firstChild,O=0;M;M=M.nextSibling,O++){let V;if(M.nodeType==1)V=M.getClientRects();else if(M.nodeType==3)V=az(M).getClientRects();else continue;for(let A=0;A<V.length;A++){let N=V[A];if(N.top<=K&&N.bottom>=H){K=Math.max(N.bottom,K),H=Math.min(N.top,H);let T=N.left>Q.left?N.left-Q.left:N.right<Q.left?Q.left-N.right:0;if(T<q){if(J=M,q=T,G=T&&J.nodeType==3?{left:N.right<Q.left?N.right:N.left,top:Q.top}:Q,M.nodeType==1&&T)U=O+(Q.left>=(N.left+N.right)/2?1:0);continue}}else if(N.top>Q.top&&!B&&N.left<=Q.left&&N.right>=Q.left)B=M,F={left:Math.max(N.left,Math.min(N.right,Q.left)),top:N.top};if(!J&&(Q.left>=N.right&&Q.top>=N.top||Q.left>=N.left&&Q.top>=N.bottom))U=O+1}}if(!J&&B)J=B,G=F,q=0;if(J&&J.nodeType==3)return pZZ(J,G);if(!J||q&&J.nodeType==1)return{node:Z,offset:U};return Su(J,G)}function pZZ(Z,Q){let J=Z.nodeValue.length,q=document.createRange(),G;for(let U=0;U<J;U++){q.setEnd(Z,U+1),q.setStart(Z,U);let K=C9(q,1);if(K.top==K.bottom)continue;if(bN(Q,K)){G={node:Z,offset:U+(Q.left>=(K.left+K.right)/2?1:0)};break}}return q.detach(),G||{node:Z,offset:0}}function bN(Z,Q){return Z.left>=Q.left-1&&Z.left<=Q.right+1&&Z.top>=Q.top-1&&Z.top<=Q.bottom+1}function dZZ(Z,Q){let J=Z.parentNode;if(J&&/^li$/i.test(J.nodeName)&&Q.left<Z.getBoundingClientRect().left)return J;return Z}function lZZ(Z,Q,J){let{node:q,offset:G}=Su(Q,J),U=-1;if(q.nodeType==1&&!q.firstChild){let K=q.getBoundingClientRect();U=K.left!=K.right&&J.left>(K.left+K.right)/2?1:-1}return Z.docView.posFromDOM(q,G,U)}function iZZ(Z,Q,J,q){let G=-1;for(let U=Q,K=!1;;){if(U==Z.dom)break;let H=Z.docView.nearestDesc(U,!0),B;if(!H)return null;if(H.dom.nodeType==1&&(H.node.isBlock&&H.parent||!H.contentDOM)&&((B=H.dom.getBoundingClientRect()).width||B.height)){if(H.node.isBlock&&H.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(H.dom.nodeName)){if(!K&&B.left>q.left||B.top>q.top)G=H.posBefore;else if(!K&&B.right<q.left||B.bottom<q.top)G=H.posAfter;K=!0}if(!H.contentDOM&&G<0&&!H.node.isText)return(H.node.isBlock?q.top<(B.top+B.bottom)/2:q.left<(B.left+B.right)/2)?H.posBefore:H.posAfter}U=H.dom.parentNode}return G>-1?G:Z.docView.posFromDOM(Q,J,-1)}function yu(Z,Q,J){let q=Z.childNodes.length;if(q&&J.top<J.bottom)for(let G=Math.max(0,Math.min(q-1,Math.floor(q*(Q.top-J.top)/(J.bottom-J.top))-2)),U=G;;){let K=Z.childNodes[U];if(K.nodeType==1){let H=K.getClientRects();for(let B=0;B<H.length;B++){let F=H[B];if(bN(Q,F))return yu(K,Q,F)}}if((U=(U+1)%q)==G)break}return Z}function nZZ(Z,Q){let J=Z.dom.ownerDocument,q,G=0,U=vZZ(J,Q.left,Q.top);if(U)({node:q,offset:G}=U);let K=(Z.root.elementFromPoint?Z.root:J).elementFromPoint(Q.left,Q.top),H;if(!K||!Z.dom.contains(K.nodeType!=1?K.parentNode:K)){let F=Z.dom.getBoundingClientRect();if(!bN(Q,F))return null;if(K=yu(Z.dom,Q,F),!K)return null}if($J){for(let F=K;q&&F;F=mK(F))if(F.draggable)q=void 0}if(K=dZZ(K,Q),q){if(Nq&&q.nodeType==1){if(G=Math.min(G,q.childNodes.length),G<q.childNodes.length){let M=q.childNodes[G],O;if(M.nodeName=="IMG"&&(O=M.getBoundingClientRect()).right<=Q.left&&O.bottom>Q.top)G++}}let F;if(sH&&G&&q.nodeType==1&&(F=q.childNodes[G-1]).nodeType==1&&F.contentEditable=="false"&&F.getBoundingClientRect().top>=Q.top)G--;if(q==Z.dom&&G==q.childNodes.length-1&&q.lastChild.nodeType==1&&Q.top>q.lastChild.getBoundingClientRect().bottom)H=Z.state.doc.content.size;else if(G==0||q.nodeType!=1||q.childNodes[G-1].nodeName!="BR")H=iZZ(Z,q,G,Q)}if(H==null)H=lZZ(Z,K,Q);let B=Z.docView.nearestDesc(K,!0);return{pos:H,inside:B?B.posAtStart-B.border:-1}}function $N(Z){return Z.top<Z.bottom||Z.left<Z.right}function C9(Z,Q){let J=Z.getClientRects();if(J.length){let q=J[Q<0?0:J.length-1];if($N(q))return q}return Array.prototype.find.call(J,$N)||Z.getBoundingClientRect()}function wu(Z,Q,J){let{node:q,offset:G,atom:U}=Z.docView.domFromPos(Q,J<0?-1:1),K=sH||Nq;if(q.nodeType==3)if(K&&(sZZ.test(q.nodeValue)||(J<0?!G:G==q.nodeValue.length))){let B=C9(az(q,G,G),J);if(Nq&&G&&/\s/.test(q.nodeValue[G-1])&&G<q.nodeValue.length){let F=C9(az(q,G-1,G-1),-1);if(F.top==B.top){let M=C9(az(q,G,G+1),-1);if(M.top!=B.top)return mH(M,M.left<F.left)}}return B}else{let B=G,F=G,M=J<0?1:-1;if(J<0&&!G)F++,M=-1;else if(J>=0&&G==q.nodeValue.length)B--,M=1;else if(J<0)B--;else F++;return mH(C9(az(q,B,F),M),M<0)}if(!Z.state.doc.resolve(Q-(U||0)).parent.inlineContent){if(U==null&&G&&(J<0||G==Iq(q))){let B=q.childNodes[G-1];if(B.nodeType==1)return AN(B.getBoundingClientRect(),!1)}if(U==null&&G<Iq(q)){let B=q.childNodes[G];if(B.nodeType==1)return AN(B.getBoundingClientRect(),!0)}return AN(q.getBoundingClientRect(),J>=0)}if(U==null&&G&&(J<0||G==Iq(q))){let B=q.childNodes[G-1],F=B.nodeType==3?az(B,Iq(B)-(K?0:1)):B.nodeType==1&&(B.nodeName!="BR"||!B.nextSibling)?B:null;if(F)return mH(C9(F,1),!1)}if(U==null&&G<Iq(q)){let B=q.childNodes[G];while(B.pmViewDesc&&B.pmViewDesc.ignoreForCoords)B=B.nextSibling;let F=!B?null:B.nodeType==3?az(B,0,K?0:1):B.nodeType==1?B:null;if(F)return mH(C9(F,-1),!0)}return mH(C9(q.nodeType==3?az(q):q,-J),J>=0)}function mH(Z,Q){if(Z.width==0)return Z;let J=Q?Z.left:Z.right;return{top:Z.top,bottom:Z.bottom,left:J,right:J}}function AN(Z,Q){if(Z.height==0)return Z;let J=Q?Z.top:Z.bottom;return{top:J,bottom:J,left:Z.left,right:Z.right}}function xu(Z,Q,J){let q=Z.state,G=Z.root.activeElement;if(q!=Q)Z.updateState(Q);if(G!=Z.dom)Z.focus();try{return J()}finally{if(q!=Q)Z.updateState(q);if(G!=Z.dom&&G)G.focus()}}function aZZ(Z,Q,J){let q=Q.selection,G=J=="up"?q.$from:q.$to;return xu(Z,Q,()=>{let{node:U}=Z.docView.domFromPos(G.pos,J=="up"?-1:1);for(;;){let H=Z.docView.nearestDesc(U,!0);if(!H)break;if(H.node.isBlock){U=H.contentDOM||H.dom;break}U=H.dom.parentNode}let K=wu(Z,G.pos,1);for(let H=U.firstChild;H;H=H.nextSibling){let B;if(H.nodeType==1)B=H.getClientRects();else if(H.nodeType==3)B=az(H,0,H.nodeValue.length).getClientRects();else continue;for(let F=0;F<B.length;F++){let M=B[F];if(M.bottom>M.top+1&&(J=="up"?K.top-M.top>(M.bottom-K.top)*2:M.bottom-K.bottom>(K.bottom-M.top)*2))return!1}}return!0})}function oZZ(Z,Q,J){let{$head:q}=Q.selection;if(!q.parent.isTextblock)return!1;let G=q.parentOffset,U=!G,K=G==q.parent.content.size,H=Z.domSelection();if(!H)return q.pos==q.start()||q.pos==q.end();if(!rZZ.test(q.parent.textContent)||!H.modify)return J=="left"||J=="backward"?U:K;return xu(Z,Q,()=>{let{focusNode:B,focusOffset:F,anchorNode:M,anchorOffset:O}=Z.domSelectionRange(),V=H.caretBidiLevel;H.modify("move",J,"character");let A=q.depth?Z.docView.domAfterPos(q.before()):Z.dom,{focusNode:N,focusOffset:T}=Z.domSelectionRange(),P=N&&!A.contains(N.nodeType==1?N:N.parentNode)||B==N&&F==T;try{if(H.collapse(M,O),B&&(B!=M||F!=O)&&H.extend)H.extend(B,F)}catch(C){}if(V!=null)H.caretBidiLevel=V;return P})}function tZZ(Z,Q,J){if(eh==Q&&Zu==J)return Qu;return eh=Q,Zu=J,Qu=J=="up"||J=="down"?aZZ(Z,Q,J):oZZ(Z,Q,J)}class pK{constructor(Z,Q,J,q){this.parent=Z,this.children=Q,this.dom=J,this.contentDOM=q,this.dirty=jq,J.pmViewDesc=this}matchesWidget(Z){return!1}matchesMark(Z){return!1}matchesNode(Z,Q,J){return!1}matchesHack(Z){return!1}parseRule(Z){return null}stopEvent(Z){return!1}get size(){let Z=0;for(let Q=0;Q<this.children.length;Q++)Z+=this.children[Q].size;return Z}get border(){return 0}destroy(){if(this.parent=void 0,this.dom.pmViewDesc==this)this.dom.pmViewDesc=void 0;for(let Z=0;Z<this.children.length;Z++)this.children[Z].destroy()}posBeforeChild(Z){for(let Q=0,J=this.posAtStart;;Q++){let q=this.children[Q];if(q==Z)return J;J+=q.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(Z,Q,J){if(this.contentDOM&&this.contentDOM.contains(Z.nodeType==1?Z:Z.parentNode))if(J<0){let G,U;if(Z==this.contentDOM)G=Z.childNodes[Q-1];else{while(Z.parentNode!=this.contentDOM)Z=Z.parentNode;G=Z.previousSibling}while(G&&!((U=G.pmViewDesc)&&U.parent==this))G=G.previousSibling;return G?this.posBeforeChild(U)+U.size:this.posAtStart}else{let G,U;if(Z==this.contentDOM)G=Z.childNodes[Q];else{while(Z.parentNode!=this.contentDOM)Z=Z.parentNode;G=Z.nextSibling}while(G&&!((U=G.pmViewDesc)&&U.parent==this))G=G.nextSibling;return G?this.posBeforeChild(U):this.posAtEnd}let q;if(Z==this.dom&&this.contentDOM)q=Q>MJ(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))q=Z.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(Q==0)for(let G=Z;;G=G.parentNode){if(G==this.dom){q=!1;break}if(G.previousSibling)break}if(q==null&&Q==Z.childNodes.length)for(let G=Z;;G=G.parentNode){if(G==this.dom){q=!0;break}if(G.nextSibling)break}}return(q==null?J>0:q)?this.posAtEnd:this.posAtStart}nearestDesc(Z,Q=!1){for(let J=!0,q=Z;q;q=q.parentNode){let G=this.getDesc(q),U;if(G&&(!Q||G.node))if(J&&(U=G.nodeDOM)&&!(U.nodeType==1?U.contains(Z.nodeType==1?Z:Z.parentNode):U==Z))J=!1;else return G}}getDesc(Z){let Q=Z.pmViewDesc;for(let J=Q;J;J=J.parent)if(J==this)return Q}posFromDOM(Z,Q,J){for(let q=Z;q;q=q.parentNode){let G=this.getDesc(q);if(G)return G.localPosFromDOM(Z,Q,J)}return-1}descAt(Z){for(let Q=0,J=0;Q<this.children.length;Q++){let q=this.children[Q],G=J+q.size;if(J==Z&&G!=J){while(!q.border&&q.children.length)for(let U=0;U<q.children.length;U++){let K=q.children[U];if(K.size){q=K;break}}return q}if(Z<G)return q.descAt(Z-J-q.border);J=G}}domFromPos(Z,Q){if(!this.contentDOM)return{node:this.dom,offset:0,atom:Z+1};let J=0,q=0;for(let G=0;J<this.children.length;J++){let U=this.children[J],K=G+U.size;if(K>Z||U instanceof gN){q=Z-G;break}G=K}if(q)return this.children[J].domFromPos(q-this.children[J].border,Q);for(let G;J&&!(G=this.children[J-1]).size&&G instanceof vN&&G.side>=0;J--);if(Q<=0){let G,U=!0;for(;;J--,U=!1)if(G=J?this.children[J-1]:null,!G||G.dom.parentNode==this.contentDOM)break;if(G&&Q&&U&&!G.border&&!G.domAtom)return G.domFromPos(G.size,Q);return{node:this.contentDOM,offset:G?MJ(G.dom)+1:0}}else{let G,U=!0;for(;;J++,U=!1)if(G=J<this.children.length?this.children[J]:null,!G||G.dom.parentNode==this.contentDOM)break;if(G&&U&&!G.border&&!G.domAtom)return G.domFromPos(0,Q);return{node:this.contentDOM,offset:G?MJ(G.dom):this.contentDOM.childNodes.length}}}parseRange(Z,Q,J=0){if(this.children.length==0)return{node:this.contentDOM,from:Z,to:Q,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let q=-1,G=-1;for(let U=J,K=0;;K++){let H=this.children[K],B=U+H.size;if(q==-1&&Z<=B){let F=U+H.border;if(Z>=F&&Q<=B-H.border&&H.node&&H.contentDOM&&this.contentDOM.contains(H.contentDOM))return H.parseRange(Z,Q,F);Z=U;for(let M=K;M>0;M--){let O=this.children[M-1];if(O.size&&O.dom.parentNode==this.contentDOM&&!O.emptyChildAt(1)){q=MJ(O.dom)+1;break}Z-=O.size}if(q==-1)q=0}if(q>-1&&(B>Q||K==this.children.length-1)){Q=B;for(let F=K+1;F<this.children.length;F++){let M=this.children[F];if(M.size&&M.dom.parentNode==this.contentDOM&&!M.emptyChildAt(-1)){G=MJ(M.dom);break}Q+=M.size}if(G==-1)G=this.contentDOM.childNodes.length;break}U=B}return{node:this.contentDOM,from:Z,to:Q,fromOffset:q,toOffset:G}}emptyChildAt(Z){if(this.border||!this.contentDOM||!this.children.length)return!1;let Q=this.children[Z<0?0:this.children.length-1];return Q.size==0||Q.emptyChildAt(Z)}domAfterPos(Z){let{node:Q,offset:J}=this.domFromPos(Z,0);if(Q.nodeType!=1||J==Q.childNodes.length)throw RangeError("No node after pos "+Z);return Q.childNodes[J]}setSelection(Z,Q,J,q=!1){let G=Math.min(Z,Q),U=Math.max(Z,Q);for(let V=0,A=0;V<this.children.length;V++){let N=this.children[V],T=A+N.size;if(G>A&&U<T)return N.setSelection(Z-A-N.border,Q-A-N.border,J,q);A=T}let K=this.domFromPos(Z,Z?-1:1),H=Q==Z?K:this.domFromPos(Q,Q?-1:1),B=J.root.getSelection(),F=J.domSelectionRange(),M=!1;if((Nq||$J)&&Z==Q){let{node:V,offset:A}=K;if(V.nodeType==3){if(M=!!(A&&V.nodeValue[A-1]==`
|
|
257
|
+
`),M&&A==V.nodeValue.length)for(let N=V,T;N;N=N.parentNode){if(T=N.nextSibling){if(T.nodeName=="BR")K=H={node:T.parentNode,offset:MJ(T)+1};break}let P=N.pmViewDesc;if(P&&P.node&&P.node.isBlock)break}}else{let N=V.childNodes[A-1];M=N&&(N.nodeName=="BR"||N.contentEditable=="false")}}if(Nq&&F.focusNode&&F.focusNode!=H.node&&F.focusNode.nodeType==1){let V=F.focusNode.childNodes[F.focusOffset];if(V&&V.contentEditable=="false")q=!0}if(!(q||M&&$J)&&P6(K.node,K.offset,F.anchorNode,F.anchorOffset)&&P6(H.node,H.offset,F.focusNode,F.focusOffset))return;let O=!1;if((B.extend||Z==Q)&&!(M&&Nq)){B.collapse(K.node,K.offset);try{if(Z!=Q)B.extend(H.node,H.offset);O=!0}catch(V){}}if(!O){if(Z>Q){let A=K;K=H,H=A}let V=document.createRange();V.setEnd(H.node,H.offset),V.setStart(K.node,K.offset),B.removeAllRanges(),B.addRange(V)}}ignoreMutation(Z){return!this.contentDOM&&Z.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(Z,Q){for(let J=0,q=0;q<this.children.length;q++){let G=this.children[q],U=J+G.size;if(J==U?Z<=U&&Q>=J:Z<U&&Q>J){let K=J+G.border,H=U-G.border;if(Z>=K&&Q<=H){if(this.dirty=Z==J||Q==U?I6:Xu,Z==K&&Q==H&&(G.contentLost||G.dom.parentNode!=this.contentDOM))G.dirty=tq;else G.markDirty(Z-K,Q-K);return}else G.dirty=G.dom==G.contentDOM&&G.dom.parentNode==this.contentDOM&&!G.children.length?I6:tq}J=U}this.dirty=I6}markParentsDirty(){let Z=1;for(let Q=this.parent;Q;Q=Q.parent,Z++){let J=Z==1?I6:Xu;if(Q.dirty<J)Q.dirty=J}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(Z){return!1}}function Ju(Z,Q,J,q,G){uu(q,Q,Z);let U=new S9(void 0,Z,Q,J,q,q,q);if(U.contentDOM)U.updateChildren(G,0);return U}function gu(Z,Q,J){let q=Z.firstChild,G=!1;for(let U=0;U<Q.length;U++){let K=Q[U],H=K.dom;if(H.parentNode==Z){while(H!=q)q=Yu(q),G=!0;q=q.nextSibling}else G=!0,Z.insertBefore(H,q);if(K instanceof k9){let B=q?q.previousSibling:Z.lastChild;gu(K.contentDOM,K.children,J),q=B?B.nextSibling:Z.firstChild}}while(q)q=Yu(q),G=!0;if(G&&J.trackWrites==Z)J.trackWrites=null}function EN(Z,Q,J){if(Z.length==0)return N6;let q=J?N6[0]:new cH,G=[q];for(let U=0;U<Z.length;U++){let K=Z[U].type.attrs;if(!K)continue;if(K.nodeName)G.push(q=new cH(K.nodeName));for(let H in K){let B=K[H];if(B==null)continue;if(J&&G.length==1)G.push(q=new cH(Q.isInline?"span":"div"));if(H=="class")q.class=(q.class?q.class+" ":"")+B;else if(H=="style")q.style=(q.style?q.style+";":"")+B;else if(H!="nodeName")q[H]=B}}return G}function hu(Z,Q,J,q){if(J==N6&&q==N6)return Q;let G=Q;for(let U=0;U<q.length;U++){let K=q[U],H=J[U];if(U){let B;if(H&&H.nodeName==K.nodeName&&G!=Z&&(B=G.parentNode)&&B.nodeName.toLowerCase()==K.nodeName)G=B;else B=document.createElement(K.nodeName),B.pmIsDeco=!0,B.appendChild(G),H=N6[0],G=B}eZZ(G,H||N6[0],K)}return G}function eZZ(Z,Q,J){for(let q in Q)if(q!="class"&&q!="style"&&q!="nodeName"&&!(q in J))Z.removeAttribute(q);for(let q in J)if(q!="class"&&q!="style"&&q!="nodeName"&&J[q]!=Q[q])Z.setAttribute(q,J[q]);if(Q.class!=J.class){let q=Q.class?Q.class.split(" ").filter(Boolean):[],G=J.class?J.class.split(" ").filter(Boolean):[];for(let U=0;U<q.length;U++)if(G.indexOf(q[U])==-1)Z.classList.remove(q[U]);for(let U=0;U<G.length;U++)if(q.indexOf(G[U])==-1)Z.classList.add(G[U]);if(Z.classList.length==0)Z.removeAttribute("class")}if(Q.style!=J.style){if(Q.style){let q=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,G;while(G=q.exec(Q.style))Z.style.removeProperty(G[1])}if(J.style)Z.style.cssText+=J.style}}function uu(Z,Q,J){return hu(Z,Z,N6,EN(Q,J,Z.nodeType!=1))}function t2(Z,Q){if(Z.length!=Q.length)return!1;for(let J=0;J<Z.length;J++)if(!Z[J].type.eq(Q[J].type))return!1;return!0}function Yu(Z){let Q=Z.nextSibling;return Z.parentNode.removeChild(Z),Q}class fu{constructor(Z,Q,J){this.lock=Q,this.view=J,this.index=0,this.stack=[],this.changed=!1,this.top=Z,this.preMatch=ZQZ(Z.node.content,Z)}destroyBetween(Z,Q){if(Z==Q)return;for(let J=Z;J<Q;J++)this.top.children[J].destroy();this.top.children.splice(Z,Q-Z),this.changed=!0}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(Z,Q,J,q){let G=0,U=this.stack.length>>1,K=Math.min(U,Z.length);while(G<K&&(G==U-1?this.top:this.stack[G+1<<1]).matchesMark(Z[G])&&Z[G].type.spec.spanning!==!1)G++;while(G<U)this.destroyRest(),this.top.dirty=jq,this.index=this.stack.pop(),this.top=this.stack.pop(),U--;while(U<Z.length){this.stack.push(this.top,this.index+1);let H=-1,B=this.top.children.length;if(q<this.preMatch.index)B=Math.min(this.index+3,B);for(let F=this.index;F<B;F++){let M=this.top.children[F];if(M.matchesMark(Z[U])&&!this.isLocked(M.dom)){H=F;break}}if(H<0&&this.index<this.top.children.length){let F=this.top.children[this.index];if(F instanceof k9&&F.dirty!=tq&&F.mark.type==Z[U].type&&F.spec.update&&!this.isLocked(F.dom)&&F.spec.update(Z[U]))F.mark=Z[U],H=this.index,this.changed=!0}if(H>-1){if(H>this.index)this.changed=!0,this.destroyBetween(this.index,H);this.top=this.top.children[this.index]}else{let F=k9.create(this.top,Z[U],Q,J);this.top.children.splice(this.index,0,F),this.top=F,this.changed=!0}this.index=0,U++}}findNodeMatch(Z,Q,J,q){let G=-1,U;if(q>=this.preMatch.index&&(U=this.preMatch.matches[q-this.preMatch.index]).parent==this.top&&U.matchesNode(Z,Q,J))G=this.top.children.indexOf(U,this.index);else for(let K=this.index,H=Math.min(this.top.children.length,K+5);K<H;K++){let B=this.top.children[K];if(B.matchesNode(Z,Q,J)&&!this.preMatch.matched.has(B)){G=K;break}}if(G<0)return!1;return this.destroyBetween(this.index,G),this.index++,!0}updateNodeAt(Z,Q,J,q,G){let U=this.top.children[q];if(U.dirty==tq&&U.dom==U.contentDOM)U.dirty=I6;if(!U.update(Z,Q,J,G))return!1;return this.destroyBetween(this.index,q),this.index++,!0}findIndexWithChild(Z){for(;;){let Q=Z.parentNode;if(!Q)return-1;if(Q==this.top.contentDOM){let J=Z.pmViewDesc;if(J){for(let q=this.index;q<this.top.children.length;q++)if(this.top.children[q]==J)return q}return-1}Z=Q}}updateNextNode(Z,Q,J,q,G,U){for(let K=this.index;K<this.top.children.length;K++){let H=this.top.children[K];if(H instanceof S9){let B=this.preMatch.matched.get(H);if(B!=null&&B!=G)return!1;let F=H.dom,M,O=this.isLocked(F)&&!(Z.isText&&H.node&&H.node.isText&&H.nodeDOM.nodeValue==Z.text&&H.dirty!=tq&&t2(Q,H.outerDeco));if(!O&&H.update(Z,Q,J,q)){if(this.destroyBetween(this.index,K),H.dom!=F)this.changed=!0;return this.index++,!0}else if(!O&&(M=this.recreateWrapper(H,Z,Q,J,q,U))){if(this.destroyBetween(this.index,K),this.top.children[this.index]=M,M.contentDOM)M.dirty=I6,M.updateChildren(q,U+1),M.dirty=jq;return this.changed=!0,this.index++,!0}break}}return!1}recreateWrapper(Z,Q,J,q,G,U){if(Z.dirty||Q.isAtom||!Z.children.length||!Z.node.content.eq(Q.content)||!t2(J,Z.outerDeco)||!q.eq(Z.innerDeco))return null;let K=S9.create(this.top,Q,J,q,G,U);if(K.contentDOM){K.children=Z.children,Z.children=[];for(let H of K.children)H.parent=K}return Z.destroy(),K}addNode(Z,Q,J,q,G){let U=S9.create(this.top,Z,Q,J,q,G);if(U.contentDOM)U.updateChildren(q,G+1);this.top.children.splice(this.index++,0,U),this.changed=!0}placeWidget(Z,Q,J){let q=this.index<this.top.children.length?this.top.children[this.index]:null;if(q&&q.matchesWidget(Z)&&(Z==q.widget||!q.widget.type.toDOM.parentNode))this.index++;else{let G=new vN(this.top,Z,Q,J);this.top.children.splice(this.index++,0,G),this.changed=!0}}addTextblockHacks(){let Z=this.top.children[this.index-1],Q=this.top;while(Z instanceof k9)Q=Z,Z=Q.children[Q.children.length-1];if(!Z||!(Z instanceof YB)||/\n$/.test(Z.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(Z.node.text)){if(($J||OJ)&&Z&&Z.dom.contentEditable=="false")this.addHackNode("IMG",Q);this.addHackNode("BR",this.top)}}addHackNode(Z,Q){if(Q==this.top&&this.index<Q.children.length&&Q.children[this.index].matchesHack(Z))this.index++;else{let J=document.createElement(Z);if(Z=="IMG")J.className="ProseMirror-separator",J.alt="";if(Z=="BR")J.className="ProseMirror-trailingBreak";let q=new gN(this.top,[],J,null);if(Q!=this.top)Q.children.push(q);else Q.children.splice(this.index++,0,q);this.changed=!0}}isLocked(Z){return this.lock&&(Z==this.lock||Z.nodeType==1&&Z.contains(this.lock.parentNode))}}function ZQZ(Z,Q){let J=Q,q=J.children.length,G=Z.childCount,U=new Map,K=[];Z:while(G>0){let H;for(;;)if(q){let F=J.children[q-1];if(F instanceof k9)J=F,q=F.children.length;else{H=F,q--;break}}else if(J==Q)break Z;else q=J.parent.children.indexOf(J),J=J.parent;let B=H.node;if(!B)continue;if(B!=Z.child(G-1))break;--G,U.set(H,G),K.push(H)}return{index:G,matched:U,matches:K.reverse()}}function QQZ(Z,Q){return Z.type.side-Q.type.side}function XQZ(Z,Q,J,q){let G=Q.locals(Z),U=0;if(G.length==0){for(let F=0;F<Z.childCount;F++){let M=Z.child(F);q(M,G,Q.forChild(U,M),F),U+=M.nodeSize}return}let K=0,H=[],B=null;for(let F=0;;){let M,O;while(K<G.length&&G[K].to==U){let P=G[K++];if(P.widget)if(!M)M=P;else(O||(O=[M])).push(P)}if(M)if(O){O.sort(QQZ);for(let P=0;P<O.length;P++)J(O[P],F,!!B)}else J(M,F,!!B);let V,A;if(B)A=-1,V=B,B=null;else if(F<Z.childCount)A=F,V=Z.child(F++);else break;for(let P=0;P<H.length;P++)if(H[P].to<=U)H.splice(P--,1);while(K<G.length&&G[K].from<=U&&G[K].to>U)H.push(G[K++]);let N=U+V.nodeSize;if(V.isText){let P=N;if(K<G.length&&G[K].from<P)P=G[K].from;for(let C=0;C<H.length;C++)if(H[C].to<P)P=H[C].to;if(P<N)B=V.cut(P-U),V=V.cut(0,P-U),N=P,A=-1}else while(K<G.length&&G[K].to<N)K++;let T=V.isInline&&!V.isLeaf?H.filter((P)=>!P.inline):H.slice();q(V,T,Q.forChild(U,V),A),U=N}}function JQZ(Z){if(Z.nodeName=="UL"||Z.nodeName=="OL"){let Q=Z.style.cssText;Z.style.cssText=Q+"; list-style: square !important",window.getComputedStyle(Z).listStyle,Z.style.cssText=Q}}function YQZ(Z,Q,J,q){for(let G=0,U=0;G<Z.childCount&&U<=q;){let K=Z.child(G++),H=U;if(U+=K.nodeSize,!K.isText)continue;let B=K.text;while(G<Z.childCount){let F=Z.child(G++);if(U+=F.nodeSize,!F.isText)break;B+=F.text}if(U>=J){if(U>=q&&B.slice(q-Q.length-H,q-H)==Q)return q-Q.length;let F=H<q?B.lastIndexOf(Q,q-H-1):-1;if(F>=0&&F+Q.length+H>=J)return H+F;if(J==q&&B.length>=q+Q.length-H&&B.slice(q-H,q-H+Q.length)==Q)return q}}return-1}function kN(Z,Q,J,q,G){let U=[];for(let K=0,H=0;K<Z.length;K++){let B=Z[K],F=H,M=H+=B.size;if(F>=J||M<=Q)U.push(B);else{if(F<Q)U.push(B.slice(0,Q-F,q));if(G)U.push(G),G=void 0;if(M>J)U.push(B.slice(J-F,B.size,q))}}return U}function hN(Z,Q=null){let J=Z.domSelectionRange(),q=Z.state.doc;if(!J.focusNode)return null;let G=Z.docView.nearestDesc(J.focusNode),U=G&&G.size==0,K=Z.docView.posFromDOM(J.focusNode,J.focusOffset,1);if(K<0)return null;let H=q.resolve(K),B,F;if(JB(J)){B=K;while(G&&!G.node)G=G.parent;let O=G.node;if(G&&O.isAtom&&SZ.isSelectable(O)&&G.parent&&!(O.isInline&&xZZ(J.focusNode,J.focusOffset,G.dom))){let V=G.posBefore;F=new SZ(K==V?H:q.resolve(V))}}else{if(J instanceof Z.dom.ownerDocument.defaultView.Selection&&J.rangeCount>1){let O=K,V=K;for(let A=0;A<J.rangeCount;A++){let N=J.getRangeAt(A);O=Math.min(O,Z.docView.posFromDOM(N.startContainer,N.startOffset,1)),V=Math.max(V,Z.docView.posFromDOM(N.endContainer,N.endOffset,-1))}if(O<0)return null;[B,K]=V==Z.state.selection.anchor?[V,O]:[O,V],H=q.resolve(K)}else B=Z.docView.posFromDOM(J.anchorNode,J.anchorOffset,1);if(B<0)return null}let M=q.resolve(B);if(!F){let O=Q=="pointer"||Z.state.selection.head<H.pos&&!U?1:-1;F=uN(Z,M,H,O)}return F}function mu(Z){return Z.editable?Z.hasFocus():pu(Z)&&document.activeElement&&document.activeElement.contains(Z.dom)}function tz(Z,Q=!1){let J=Z.state.selection;if(cu(Z,J),!mu(Z))return;let q=Z.input.mouseDown;if(!Q&&OJ&&q){let G=Z.domSelectionRange(),U=Z.domObserver.currentSelection;if(G.anchorNode&&U.anchorNode&&P6(G.anchorNode,G.anchorOffset,U.anchorNode,U.anchorOffset)&&q.delaySelUpdate()){Z.domObserver.setCurSelection();return}}if(Z.domObserver.disconnectSelection(),Z.cursorWrapper)GQZ(Z);else{let{anchor:G,head:U}=J,K,H;if(qu&&!(J instanceof DZ)){if(!J.$from.parent.inlineContent)K=Gu(Z,J.from);if(!J.empty&&!J.$from.parent.inlineContent)H=Gu(Z,J.to)}if(Z.docView.setSelection(G,U,Z,Q),qu){if(K)zu(K);if(H)zu(H)}if(J.visible)Z.dom.classList.remove("ProseMirror-hideselection");else if(Z.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document)qQZ(Z)}Z.domObserver.setCurSelection(),Z.domObserver.connectSelection()}function Gu(Z,Q){let{node:J,offset:q}=Z.docView.domFromPos(Q,0),G=q<J.childNodes.length?J.childNodes[q]:null,U=q?J.childNodes[q-1]:null;if($J&&G&&G.contentEditable=="false")return IN(G);if((!G||G.contentEditable=="false")&&(!U||U.contentEditable=="false")){if(G)return IN(G);else if(U)return IN(U)}}function IN(Z){if(Z.contentEditable="true",$J&&Z.draggable)Z.draggable=!1,Z.wasDraggable=!0;return Z}function zu(Z){if(Z.contentEditable="false",Z.wasDraggable)Z.draggable=!0,Z.wasDraggable=null}function qQZ(Z){let Q=Z.dom.ownerDocument;Q.removeEventListener("selectionchange",Z.input.hideSelectionGuard);let J=Z.domSelectionRange(),q=J.anchorNode,G=J.anchorOffset;Q.addEventListener("selectionchange",Z.input.hideSelectionGuard=()=>{if(J.anchorNode!=q||J.anchorOffset!=G)Q.removeEventListener("selectionchange",Z.input.hideSelectionGuard),setTimeout(()=>{if(!mu(Z)||Z.state.selection.visible)Z.dom.classList.remove("ProseMirror-hideselection")},20)})}function GQZ(Z){let Q=Z.domSelection();if(!Q)return;let J=Z.cursorWrapper.dom,q=J.nodeName=="IMG";if(q)Q.collapse(J.parentNode,MJ(J)+1);else Q.collapse(J,0);if(!q&&!Z.state.selection.visible&&BY&&E9<=11)J.disabled=!0,J.disabled=!1}function cu(Z,Q){if(Q instanceof SZ){let J=Z.docView.descAt(Q.from);if(J!=Z.lastSelectedViewDesc){if(Uu(Z),J)J.selectNode();Z.lastSelectedViewDesc=J}}else Uu(Z)}function Uu(Z){if(Z.lastSelectedViewDesc){if(Z.lastSelectedViewDesc.parent)Z.lastSelectedViewDesc.deselectNode();Z.lastSelectedViewDesc=void 0}}function uN(Z,Q,J,q){return Z.someProp("createSelectionBetween",(G)=>G(Z,Q,J))||DZ.between(Q,J,q)}function Ku(Z){if(Z.editable&&!Z.hasFocus())return!1;return pu(Z)}function pu(Z){let Q=Z.domSelectionRange();if(!Q.anchorNode)return!1;try{return Z.dom.contains(Q.anchorNode.nodeType==3?Q.anchorNode.parentNode:Q.anchorNode)&&(Z.editable||Z.dom.contains(Q.focusNode.nodeType==3?Q.focusNode.parentNode:Q.focusNode))}catch(J){return!1}}function zQZ(Z){let Q=Z.docView.domFromPos(Z.state.selection.anchor,0),J=Z.domSelectionRange();return P6(Q.node,Q.offset,J.anchorNode,J.anchorOffset)}function SN(Z,Q){let{$anchor:J,$head:q}=Z.selection,G=Q>0?J.max(q):J.min(q),U=!G.parent.inlineContent?G:G.depth?Z.doc.resolve(Q>0?G.after():G.before()):null;return U&&mZ.findFrom(U,Q)}function D9(Z,Q){return Z.dispatch(Z.state.tr.setSelection(Q).scrollIntoView()),!0}function Hu(Z,Q,J){let q=Z.state.selection;if(q instanceof DZ){if(J.indexOf("s")>-1){let{$head:G}=q,U=G.textOffset?null:Q<0?G.nodeBefore:G.nodeAfter;if(!U||U.isText||!U.isLeaf)return!1;let K=Z.state.doc.resolve(G.pos+U.nodeSize*(Q<0?-1:1));return D9(Z,new DZ(q.$anchor,K))}else if(!q.empty)return!1;else if(Z.endOfTextblock(Q>0?"forward":"backward")){let G=SN(Z.state,Q);if(G&&G instanceof SZ)return D9(Z,G);return!1}else if(!(Aq&&J.indexOf("m")>-1)){let G=q.$head,U=G.textOffset?null:Q<0?G.nodeBefore:G.nodeAfter,K;if(!U||U.isText)return!1;let H=Q<0?G.pos-U.nodeSize:G.pos;if(!(U.isAtom||(K=Z.docView.descAt(H))&&!K.contentDOM))return!1;if(SZ.isSelectable(U))return D9(Z,new SZ(Q<0?Z.state.doc.resolve(G.pos-U.nodeSize):G));else if(sH)return D9(Z,new DZ(Z.state.doc.resolve(Q<0?H:H+U.nodeSize)));else return!1}}else if(q instanceof SZ&&q.node.isInline)return D9(Z,new DZ(Q>0?q.$to:q.$from));else{let G=SN(Z.state,Q);if(G)return D9(Z,G);return!1}}function e2(Z){return Z.nodeType==3?Z.nodeValue.length:Z.childNodes.length}function pH(Z,Q){let J=Z.pmViewDesc;return J&&J.size==0&&(Q<0||Z.nextSibling||Z.nodeName!="BR")}function uK(Z,Q){return Q<0?UQZ(Z):KQZ(Z)}function UQZ(Z){let Q=Z.domSelectionRange(),J=Q.focusNode,q=Q.focusOffset;if(!J)return;let G,U,K=!1;if(Nq&&J.nodeType==1&&q<e2(J)&&pH(J.childNodes[q],-1))K=!0;for(;;)if(q>0)if(J.nodeType!=1)break;else{let H=J.childNodes[q-1];if(pH(H,-1))G=J,U=--q;else if(H.nodeType==3)J=H,q=J.nodeValue.length;else break}else if(du(J))break;else{let H=J.previousSibling;while(H&&pH(H,-1))G=J.parentNode,U=MJ(H),H=H.previousSibling;if(!H){if(J=J.parentNode,J==Z.dom)break;q=0}else J=H,q=e2(J)}if(K)yN(Z,J,q);else if(G)yN(Z,G,U)}function KQZ(Z){let Q=Z.domSelectionRange(),J=Q.focusNode,q=Q.focusOffset;if(!J)return;let G=e2(J),U,K;for(;;)if(q<G){if(J.nodeType!=1)break;let H=J.childNodes[q];if(pH(H,1))U=J,K=++q;else break}else if(du(J))break;else{let H=J.nextSibling;while(H&&pH(H,1))U=H.parentNode,K=MJ(H)+1,H=H.nextSibling;if(!H){if(J=J.parentNode,J==Z.dom)break;q=G=0}else J=H,q=0,G=e2(J)}if(U)yN(Z,U,K)}function du(Z){let Q=Z.pmViewDesc;return Q&&Q.node&&Q.node.isBlock}function HQZ(Z,Q){while(Z&&Q==Z.childNodes.length&&!nH(Z))Q=MJ(Z)+1,Z=Z.parentNode;while(Z&&Q<Z.childNodes.length){let J=Z.childNodes[Q];if(J.nodeType==3)return J;if(J.nodeType==1&&J.contentEditable=="false")break;Z=J,Q=0}}function WQZ(Z,Q){while(Z&&!Q&&!nH(Z))Q=MJ(Z),Z=Z.parentNode;while(Z&&Q){let J=Z.childNodes[Q-1];if(J.nodeType==3)return J;if(J.nodeType==1&&J.contentEditable=="false")break;Z=J,Q=Z.childNodes.length}}function yN(Z,Q,J){if(Q.nodeType!=3){let U,K;if(K=HQZ(Q,J))Q=K,J=0;else if(U=WQZ(Q,J))Q=U,J=U.nodeValue.length}let q=Z.domSelection();if(!q)return;if(JB(q)){let U=document.createRange();U.setEnd(Q,J),U.setStart(Q,J),q.removeAllRanges(),q.addRange(U)}else if(q.extend)q.extend(Q,J);Z.domObserver.setCurSelection();let{state:G}=Z;setTimeout(()=>{if(Z.state==G)tz(Z)},50)}function Wu(Z,Q){let J=Z.state.doc.resolve(Q);if(!(OJ||$u)&&J.parent.inlineContent){let G=Z.coordsAtPos(Q);if(Q>J.start()){let U=Z.coordsAtPos(Q-1),K=(U.top+U.bottom)/2;if(K>G.top&&K<G.bottom&&Math.abs(U.left-G.left)>1)return U.left<G.left?"ltr":"rtl"}if(Q<J.end()){let U=Z.coordsAtPos(Q+1),K=(U.top+U.bottom)/2;if(K>G.top&&K<G.bottom&&Math.abs(U.left-G.left)>1)return U.left>G.left?"ltr":"rtl"}}return getComputedStyle(Z.dom).direction=="rtl"?"rtl":"ltr"}function Bu(Z,Q,J){let q=Z.state.selection;if(q instanceof DZ&&!q.empty||J.indexOf("s")>-1)return!1;if(Aq&&J.indexOf("m")>-1)return!1;let{$from:G,$to:U}=q;if(!G.parent.inlineContent||Z.endOfTextblock(Q<0?"up":"down")){let K=SN(Z.state,Q);if(K&&K instanceof SZ)return D9(Z,K)}if(!G.parent.inlineContent){let K=Q<0?G:U,H=q instanceof LJ?mZ.near(K,Q):mZ.findFrom(K,Q);return H?D9(Z,H):!1}return!1}function _u(Z,Q){if(!(Z.state.selection instanceof DZ))return!0;let{$head:J,$anchor:q,empty:G}=Z.state.selection;if(!J.sameParent(q))return!0;if(!G)return!1;if(Z.endOfTextblock(Q>0?"forward":"backward"))return!0;let U=!J.textOffset&&(Q<0?J.nodeBefore:J.nodeAfter);if(U&&!U.isText){let K=Z.state.tr;if(Q<0)K.delete(J.pos-U.nodeSize,J.pos);else K.delete(J.pos,J.pos+U.nodeSize);return Z.dispatch(K),!0}return!1}function Fu(Z,Q,J){Z.domObserver.stop(),Q.contentEditable=J,Z.domObserver.start()}function BQZ(Z){if(!$J||Z.state.selection.$head.parentOffset>0)return!1;let{focusNode:Q,focusOffset:J}=Z.domSelectionRange();if(Q&&Q.nodeType==1&&J==0&&Q.firstChild&&Q.firstChild.contentEditable=="false"){let q=Q.firstChild;Fu(Z,q,"true"),setTimeout(()=>Fu(Z,q,"false"),20)}return!1}function _QZ(Z){let Q="";if(Z.ctrlKey)Q+="c";if(Z.metaKey)Q+="m";if(Z.altKey)Q+="a";if(Z.shiftKey)Q+="s";return Q}function FQZ(Z,Q){let J=Q.keyCode,q=_QZ(Q);if(J==8||Aq&&J==72&&q=="c")return _u(Z,-1)||uK(Z,-1);else if(J==46&&!Q.shiftKey||Aq&&J==68&&q=="c")return _u(Z,1)||uK(Z,1);else if(J==13||J==27)return!0;else if(J==37||Aq&&J==66&&q=="c"){let G=J==37?Wu(Z,Z.state.selection.from)=="ltr"?-1:1:-1;return Hu(Z,G,q)||uK(Z,G)}else if(J==39||Aq&&J==70&&q=="c"){let G=J==39?Wu(Z,Z.state.selection.from)=="ltr"?1:-1:1;return Hu(Z,G,q)||uK(Z,G)}else if(J==38||Aq&&J==80&&q=="c")return Bu(Z,-1,q)||uK(Z,-1);else if(J==40||Aq&&J==78&&q=="c")return BQZ(Z)||Bu(Z,1,q)||uK(Z,1);else if(q==(Aq?"m":"c")&&(J==66||J==73||J==89||J==90))return!0;return!1}function fN(Z,Q){Z.someProp("transformCopied",(A)=>{Q=A(Q,Z)});let J=[],{content:q,openStart:G,openEnd:U}=Q;while(G>1&&U>1&&q.childCount==1&&q.firstChild.childCount==1){G--,U--;let A=q.firstChild;J.push(A.type.name,A.attrs!=A.type.defaultAttrs?A.attrs:null),q=A.content}let K=Z.someProp("clipboardSerializer")||sG.fromSchema(Z.state.schema),H=ru(),B=H.createElement("div");B.appendChild(K.serializeFragment(q,{document:H}));let F=B.firstChild,M,O=0;while(F&&F.nodeType==1&&(M=au[F.nodeName.toLowerCase()])){for(let A=M.length-1;A>=0;A--){let N=H.createElement(M[A]);while(B.firstChild)N.appendChild(B.firstChild);B.appendChild(N),O++}F=B.firstChild}if(F&&F.nodeType==1)F.setAttribute("data-pm-slice",`${G} ${U}${O?` -${O}`:""} ${JSON.stringify(J)}`);let V=Z.someProp("clipboardTextSerializer",(A)=>A(Q,Z))||Q.content.textBetween(0,Q.content.size,`
|
|
258
|
+
|
|
259
|
+
`);return{dom:B,text:V,slice:Q}}function lu(Z,Q,J,q,G){let U=G.parent.type.spec.code,K,H;if(!J&&!Q)return null;let B=!!Q&&(q||U||!J);if(B){if(Z.someProp("transformPastedText",(V)=>{Q=V(Q,U||q,Z)}),U)return H=new AZ(UZ.from(Z.state.schema.text(Q.replace(/\r\n?/g,`
|
|
260
|
+
`))),0,0),Z.someProp("transformPasted",(V)=>{H=V(H,Z,!0)}),H;let O=Z.someProp("clipboardTextParser",(V)=>V(Q,G,q,Z));if(O)H=O;else{let V=G.marks(),{schema:A}=Z.state,N=sG.fromSchema(A);K=document.createElement("div"),Q.split(/(?:\r\n?|\n)+/).forEach((T)=>{let P=K.appendChild(document.createElement("p"));if(T)P.appendChild(N.serializeNode(A.text(T,V)))})}}else if(Z.someProp("transformPastedHTML",(O)=>{J=O(J,Z)}),K=VQZ(J),sH)AQZ(K);let F=K&&K.querySelector("[data-pm-slice]"),M=F&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(F.getAttribute("data-pm-slice")||"");if(M&&M[3])for(let O=+M[3];O>0;O--){let V=K.firstChild;while(V&&V.nodeType!=1)V=V.nextSibling;if(!V)break;K=V}if(!H)H=(Z.someProp("clipboardParser")||Z.someProp("domParser")||Lq.fromSchema(Z.state.schema)).parseSlice(K,{preserveWhitespace:!!(B||M),context:G,ruleFromNode(V){if(V.nodeName=="BR"&&!V.nextSibling&&V.parentNode&&!LQZ.test(V.parentNode.nodeName))return{ignore:!0};return null}});if(M)H=IQZ(Lu(H,+M[1],+M[2]),M[4]);else if(H=AZ.maxOpen(MQZ(H.content,G),!0),H.openStart||H.openEnd){let O=0,V=0;for(let A=H.content.firstChild;O<H.openStart&&!A.type.spec.isolating;O++,A=A.firstChild);for(let A=H.content.lastChild;V<H.openEnd&&!A.type.spec.isolating;V++,A=A.lastChild);H=Lu(H,O,V)}return Z.someProp("transformPasted",(O)=>{H=O(H,Z,B)}),H}function MQZ(Z,Q){if(Z.childCount<2)return Z;for(let J=Q.depth;J>=0;J--){let G=Q.node(J).contentMatchAt(Q.index(J)),U,K=[];if(Z.forEach((H)=>{if(!K)return;let B=G.findWrapping(H.type),F;if(!B)return K=null;if(F=K.length&&U.length&&nu(B,U,H,K[K.length-1],0))K[K.length-1]=F;else{if(K.length)K[K.length-1]=su(K[K.length-1],U.length);let M=iu(H,B);K.push(M),G=G.matchType(M.type),U=B}}),K)return UZ.from(K)}return Z}function iu(Z,Q,J=0){for(let q=Q.length-1;q>=J;q--)Z=Q[q].create(null,UZ.from(Z));return Z}function nu(Z,Q,J,q,G){if(G<Z.length&&G<Q.length&&Z[G]==Q[G]){let U=nu(Z,Q,J,q.lastChild,G+1);if(U)return q.copy(q.content.replaceChild(q.childCount-1,U));if(q.contentMatchAt(q.childCount).matchType(G==Z.length-1?J.type:Z[G+1]))return q.copy(q.content.append(UZ.from(iu(J,Z,G+1))))}}function su(Z,Q){if(Q==0)return Z;let J=Z.content.replaceChild(Z.childCount-1,su(Z.lastChild,Q-1)),q=Z.contentMatchAt(Z.childCount).fillBefore(UZ.empty,!0);return Z.copy(J.append(q))}function wN(Z,Q,J,q,G,U){let K=Q<0?Z.firstChild:Z.lastChild,H=K.content;if(Z.childCount>1)U=0;if(G<q-1)H=wN(H,Q,J,q,G+1,U);if(G>=J)H=Q<0?K.contentMatchAt(0).fillBefore(H,U<=G).append(H):H.append(K.contentMatchAt(K.childCount).fillBefore(UZ.empty,!0));return Z.replaceChild(Q<0?0:Z.childCount-1,K.copy(H))}function Lu(Z,Q,J){if(Q<Z.openStart)Z=new AZ(wN(Z.content,-1,Q,Z.openStart,0,Z.openEnd),Q,Z.openEnd);if(J<Z.openEnd)Z=new AZ(wN(Z.content,1,J,Z.openEnd,0,0),Z.openStart,J);return Z}function ru(){return document.implementation.createHTMLDocument("title")}function OQZ(Z){let Q=window.trustedTypes;if(!Q)return Z;if(!NN)NN=Q.defaultPolicy||Q.createPolicy("ProseMirrorClipboard",{createHTML:(J)=>J});return NN.createHTML(Z)}function VQZ(Z){let Q=/^(\s*<meta [^>]*>)*/.exec(Z);if(Q)Z=Z.slice(Q[0].length);let J=ru(),q=J.body,G=/<([a-z][^>\s]+)/i.exec(Z),U;if(U=G&&au[G[1].toLowerCase()])Z=U.map((K)=>"<"+K+">").join("")+Z+U.map((K)=>"</"+K+">").reverse().join("");if(q.innerHTML=OQZ(Z),U)for(let K=0;K<U.length;K++)q=q.querySelector(U[K])||q;for(let K=0;K<J.styleSheets.length;K++){let H=J.styleSheets[K];for(let B=0;B<H.rules.length;B++){let F=H.rules[B];if(F instanceof CSSStyleRule){let M=q.querySelectorAll(F.selectorText);for(let O=0;O<M.length;O++)M[O].style.cssText+=F.style.cssText}}}return q}function AQZ(Z){let Q=Z.querySelectorAll(OJ?"span:not([class]):not([style])":"span.Apple-converted-space");for(let J=0;J<Q.length;J++){let q=Q[J];if(q.childNodes.length==1&&q.textContent==" "&&q.parentNode)q.parentNode.replaceChild(Z.ownerDocument.createTextNode(" "),q)}}function IQZ(Z,Q){if(!Z.size)return Z;let J=Z.content.firstChild.type.schema,q;try{q=JSON.parse(Q)}catch(H){return Z}let{content:G,openStart:U,openEnd:K}=Z;for(let H=q.length-2;H>=0;H-=2){let B=J.nodes[q[H]];if(!B||B.hasRequiredAttrs())break;G=UZ.from(B.create(q[H+1],G)),U++,K++}return new AZ(G,U,K)}class ou{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=-200000000,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function jQZ(Z){for(let Q in iJ){let J=iJ[Q];Z.dom.addEventListener(Q,Z.input.eventHandlers[Q]=(q)=>{if(PQZ(Z,q)&&!mN(Z,q)&&(Z.editable||!(q.type in nJ)))J(Z,q)},NQZ[Q]?{passive:!0}:void 0)}if($J)Z.dom.addEventListener("input",()=>null);xN(Z)}function oz(Z,Q){Z.input.lastSelectionOrigin=Q,Z.input.lastSelectionTime=Date.now()}function TQZ(Z){if(Z.input.mouseDown)Z.input.mouseDown.done();Z.domObserver.stop();for(let Q in Z.input.eventHandlers)Z.dom.removeEventListener(Q,Z.input.eventHandlers[Q]);clearTimeout(Z.input.composingTimeout),clearTimeout(Z.input.lastIOSEnterFallbackTimeout)}function xN(Z){Z.someProp("handleDOMEvents",(Q)=>{for(let J in Q)if(!Z.input.eventHandlers[J])Z.dom.addEventListener(J,Z.input.eventHandlers[J]=(q)=>mN(Z,q))})}function mN(Z,Q){return Z.someProp("handleDOMEvents",(J)=>{let q=J[Q.type];return q?q(Z,Q)||Q.defaultPrevented:!1})}function PQZ(Z,Q){if(!Q.bubbles)return!0;if(Q.defaultPrevented)return!1;for(let J=Q.target;J!=Z.dom;J=J.parentNode)if(!J||J.nodeType==11||J.pmViewDesc&&J.pmViewDesc.stopEvent(Q))return!1;return!0}function RQZ(Z,Q){if(!mN(Z,Q)&&iJ[Q.type]&&(Z.editable||!(Q.type in nJ)))iJ[Q.type](Z,Q)}function aH(Z){return{left:Z.clientX,top:Z.clientY}}function CQZ(Z,Q){let J=Q.x-Z.clientX,q=Q.y-Z.clientY;return J*J+q*q<100}function cN(Z,Q,J,q,G){if(q==-1)return!1;let U=Z.state.doc.resolve(q);for(let K=U.depth+1;K>0;K--)if(Z.someProp(Q,(H)=>K>U.depth?H(Z,J,U.nodeAfter,U.before(K),G,!0):H(Z,J,U.node(K),U.before(K),G,!1)))return!0;return!1}function rH(Z,Q,J){if(!Z.focused)Z.focus();if(Z.state.selection.eq(Q))return;let q=Z.state.tr.setSelection(Q);if(J=="pointer")q.setMeta("pointer",!0);Z.dispatch(q)}function DQZ(Z,Q){if(Q==-1)return!1;let J=Z.state.doc.resolve(Q),q=J.nodeAfter;if(q&&q.isAtom&&SZ.isSelectable(q))return rH(Z,new SZ(J),"pointer"),!0;return!1}function $QZ(Z,Q){if(Q==-1)return!1;let J=Z.state.selection,q,G;if(J instanceof SZ)q=J.node;let U=Z.state.doc.resolve(Q);for(let K=U.depth+1;K>0;K--){let H=K>U.depth?U.nodeAfter:U.node(K);if(SZ.isSelectable(H)){if(q&&J.$from.depth>0&&K>=J.$from.depth&&U.before(J.$from.depth+1)==J.$from.pos)G=U.before(J.$from.depth);else G=U.before(K);break}}if(G!=null)return rH(Z,SZ.create(Z.state.doc,G),"pointer"),!0;else return!1}function EQZ(Z,Q,J,q,G){return cN(Z,"handleClickOn",Q,J,q)||Z.someProp("handleClick",(U)=>U(Z,Q,q))||(G?$QZ(Z,J):DQZ(Z,J))}function kQZ(Z,Q,J,q){return cN(Z,"handleDoubleClickOn",Q,J,q)||Z.someProp("handleDoubleClick",(G)=>G(Z,Q,q))}function SQZ(Z,Q,J,q){return cN(Z,"handleTripleClickOn",Q,J,q)||Z.someProp("handleTripleClick",(G)=>G(Z,Q,q))||yQZ(Z,J,q)}function yQZ(Z,Q,J){if(J.button!=0)return!1;let q=tu(Z,Q,!0),G=Z.state.doc;if(!q)return!1;if(rH(Z,q,"pointer"),q instanceof DZ&&G.eq(Z.state.doc))Z.input.mouseDown=new Qf(Z,q);return!0}function tu(Z,Q,J){let q=Z.state.doc;if(Q==-1)return q.inlineContent?DZ.create(q,0,q.content.size):null;let G=q.resolve(Q);for(let U=G.depth+1;U>0;U--){let K=U>G.depth?G.nodeAfter:G.node(U),H=G.before(U);if(K.inlineContent)return DZ.create(q,H+1,H+1+K.content.size);else if(J&&SZ.isSelectable(K))return SZ.create(q,H)}return null}function pN(Z){return ZB(Z)}class dN{constructor(Z){this.view=Z,this.mightDrag=null,Z.root.addEventListener("mouseup",this.up=this.up.bind(this)),Z.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(Z){this.done()}move(Z){if(Z.buttons==0)this.done()}done(){if(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}}function Xf(Z,Q){if(Z.composing)return!0;if($J&&Math.abs(Date.now()-Z.input.compositionEndedAt)<500)return Z.input.compositionEndedAt=-200000000,!0;return!1}function xQZ(Z){let{focusNode:Q,focusOffset:J}=Z.domSelectionRange();if(!Q||Q.nodeType!=1||J>=Q.childNodes.length)return!1;let q=Q.childNodes[J];return q.nodeType==1&&q.contentEditable=="false"}function Jf(Z,Q){if(clearTimeout(Z.input.composingTimeout),Q>-1)Z.input.composingTimeout=setTimeout(()=>ZB(Z),Q)}function Yf(Z){if(Z.composing)Z.input.composing=!1,Z.input.compositionEndedAt=Date.now();while(Z.input.compositionNodes.length>0)Z.input.compositionNodes.pop().markParentsDirty()}function bQZ(Z){let Q=Z.domSelectionRange();if(!Q.focusNode)return null;let J=yZZ(Q.focusNode,Q.focusOffset),q=wZZ(Q.focusNode,Q.focusOffset);if(J&&q&&J!=q){let G=q.pmViewDesc,U=Z.domObserver.lastChangedTextNode;if(J==U||q==U)return U;if(!G||!G.isText(q.nodeValue))return q;else if(Z.input.compositionNode==q){let K=J.pmViewDesc;if(!(!K||!K.isText(J.nodeValue)))return q}}return J||q}function ZB(Z,Q=!1){if(rz&&Z.domObserver.flushingSoon>=0)return;if(Z.domObserver.forceFlush(),Yf(Z),Q||Z.docView&&Z.docView.dirty){let J=hN(Z),q=Z.state.selection;if(J&&!J.eq(q))Z.dispatch(Z.state.tr.setSelection(J));else if((Z.markCursor||Q)&&!q.$from.node(q.$from.sharedDepth(q.to)).inlineContent)Z.dispatch(Z.state.tr.deleteSelection());else Z.updateState(Z.state);return!0}return!1}function vQZ(Z,Q){if(!Z.dom.parentNode)return;let J=Z.dom.parentNode.appendChild(document.createElement("div"));J.appendChild(Q),J.style.cssText="position: fixed; left: -10000px; top: 10px";let q=getSelection(),G=document.createRange();G.selectNodeContents(Q),Z.dom.blur(),q.removeAllRanges(),q.addRange(G),setTimeout(()=>{if(J.parentNode)J.parentNode.removeChild(J);Z.focus()},50)}function gQZ(Z){return Z.openStart==0&&Z.openEnd==0&&Z.content.childCount==1?Z.content.firstChild:null}function hQZ(Z,Q){if(!Z.dom.parentNode)return;let J=Z.input.shiftKey||Z.state.selection.$from.parent.type.spec.code,q=Z.dom.parentNode.appendChild(document.createElement(J?"textarea":"div"));if(!J)q.contentEditable="true";q.style.cssText="position: fixed; left: -10000px; top: 10px",q.focus();let G=Z.input.shiftKey&&Z.input.lastKeyCode!=45;setTimeout(()=>{if(Z.focus(),q.parentNode)q.parentNode.removeChild(q);if(J)lH(Z,q.value,null,G,Q);else lH(Z,q.textContent,q.innerHTML,G,Q)},50)}function lH(Z,Q,J,q,G){let U=lu(Z,Q,J,q,Z.state.selection.$from);if(Z.someProp("handlePaste",(B)=>B(Z,G,U||AZ.empty)))return!0;if(!U)return!1;let K=gQZ(U),H=K?Z.state.tr.replaceSelectionWith(K,q):Z.state.tr.replaceSelection(U);return Z.dispatch(H.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function qf(Z){let Q=Z.getData("text/plain")||Z.getData("Text");if(Q)return Q;let J=Z.getData("text/uri-list");return J?J.replace(/\r?\n/g," "):""}class lN{constructor(Z,Q,J){this.slice=Z,this.move=Q,this.node=J}}function Gf(Z,Q){let J;return Z.someProp("dragCopies",(q)=>{J=J||q(Q)}),J!=null?!J:!Q[uQZ]}function fQZ(Z,Q,J){if(!Q.dataTransfer)return;let q=Z.posAtCoords(aH(Q));if(!q)return;let G=Z.state.doc.resolve(q.pos),U=J&&J.slice;if(U)Z.someProp("transformPasted",(A)=>{U=A(U,Z,!1)});else U=lu(Z,qf(Q.dataTransfer),dH?null:Q.dataTransfer.getData("text/html"),!1,G);let K=!!(J&&Gf(Z,Q));if(Z.someProp("handleDrop",(A)=>A(Z,Q,U||AZ.empty,K))){Q.preventDefault();return}if(!U)return;Q.preventDefault();let H=U?n2(Z.state.doc,G.pos,U):G.pos;if(H==null)H=G.pos;let B=Z.state.tr;if(K){let{node:A}=J;if(A)A.replace(B);else B.deleteSelection()}let F=B.mapping.map(H),M=U.openStart==0&&U.openEnd==0&&U.content.childCount==1,O=B.doc;if(M)B.replaceRangeWith(F,F,U.content.firstChild);else B.replaceRange(F,F,U);if(B.doc.eq(O))return;let V=B.doc.resolve(F);if(M&&SZ.isSelectable(U.content.firstChild)&&V.nodeAfter&&V.nodeAfter.sameMarkup(U.content.firstChild))B.setSelection(new SZ(V));else{let A=B.mapping.map(H);B.mapping.maps[B.mapping.maps.length-1].forEach((N,T,P,C)=>A=C),B.setSelection(uN(Z,V,B.doc.resolve(A)))}Z.focus(),Z.dispatch(B.setMeta("uiEvent","drop"))}function iH(Z,Q){if(Z==Q)return!0;for(let J in Z)if(Z[J]!==Q[J])return!1;for(let J in Q)if(!(J in Z))return!1;return!0}class QB{constructor(Z,Q){this.toDOM=Z,this.spec=Q||j6,this.side=this.spec.side||0}map(Z,Q,J,q){let{pos:G,deleted:U}=Z.mapResult(Q.from+q,this.side<0?-1:1);return U?null:new iX(G-J,G-J,this)}valid(){return!0}eq(Z){return this==Z||Z instanceof QB&&(this.spec.key&&this.spec.key==Z.spec.key||this.toDOM==Z.toDOM&&iH(this.spec,Z.spec))}destroy(Z){if(this.spec.destroy)this.spec.destroy(Z)}}class y9{constructor(Z,Q){this.attrs=Z,this.spec=Q||j6}map(Z,Q,J,q){let G=Z.map(Q.from+q,this.spec.inclusiveStart?-1:1)-J,U=Z.map(Q.to+q,this.spec.inclusiveEnd?1:-1)-J;return G>=U?null:new iX(G,U,this)}valid(Z,Q){return Q.from<Q.to}eq(Z){return this==Z||Z instanceof y9&&iH(this.attrs,Z.attrs)&&iH(this.spec,Z.spec)}static is(Z){return Z.type instanceof y9}destroy(){}}class iN{constructor(Z,Q){this.attrs=Z,this.spec=Q||j6}map(Z,Q,J,q){let G=Z.mapResult(Q.from+q,1);if(G.deleted)return null;let U=Z.mapResult(Q.to+q,-1);if(U.deleted||U.pos<=G.pos)return null;return new iX(G.pos-J,U.pos-J,this)}valid(Z,Q){let{index:J,offset:q}=Z.content.findIndex(Q.from),G;return q==Q.from&&!(G=Z.child(J)).isText&&q+G.nodeSize==Q.to}eq(Z){return this==Z||Z instanceof iN&&iH(this.attrs,Z.attrs)&&iH(this.spec,Z.spec)}destroy(){}}class iX{constructor(Z,Q,J){this.from=Z,this.to=Q,this.type=J}copy(Z,Q){return new iX(Z,Q,this.type)}eq(Z,Q=0){return this.type.eq(Z.type)&&this.from+Q==Z.from&&this.to+Q==Z.to}map(Z,Q,J){return this.type.map(Z,this,Q,J)}static widget(Z,Q,J){return new iX(Z,Z,new QB(Q,J))}static inline(Z,Q,J,q){return new iX(Z,Q,new y9(J,q))}static node(Z,Q,J,q){return new iX(Z,Q,new iN(J,q))}get spec(){return this.type.spec}get inline(){return this.type instanceof y9}get widget(){return this.type instanceof QB}}class xQ{constructor(Z,Q){this.local=Z.length?Z:fK,this.children=Q.length?Q:fK}static create(Z,Q){return Q.length?XB(Q,Z,0,j6):DJ}find(Z,Q,J){let q=[];return this.findInner(Z==null?0:Z,Q==null?1e9:Q,q,0,J),q}findInner(Z,Q,J,q,G){for(let U=0;U<this.local.length;U++){let K=this.local[U];if(K.from<=Q&&K.to>=Z&&(!G||G(K.spec)))J.push(K.copy(K.from+q,K.to+q))}for(let U=0;U<this.children.length;U+=3)if(this.children[U]<Q&&this.children[U+1]>Z){let K=this.children[U]+1;this.children[U+2].findInner(Z-K,Q-K,J,q+K,G)}}map(Z,Q,J){if(this==DJ||Z.maps.length==0)return this;return this.mapInner(Z,Q,0,0,J||j6)}mapInner(Z,Q,J,q,G){let U;for(let K=0;K<this.local.length;K++){let H=this.local[K].map(Z,J,q);if(H&&H.type.valid(Q,H))(U||(U=[])).push(H);else if(G.onRemove)G.onRemove(this.local[K].spec)}if(this.children.length)return mQZ(this.children,U||[],Z,Q,J,q,G);else return U?new xQ(U.sort(T6),fK):DJ}add(Z,Q){if(!Q.length)return this;if(this==DJ)return xQ.create(Z,Q);return this.addInner(Z,Q,0)}addInner(Z,Q,J){let q,G=0;Z.forEach((K,H)=>{let B=H+J,F;if(!(F=Uf(Q,K,B)))return;if(!q)q=this.children.slice();while(G<q.length&&q[G]<H)G+=3;if(q[G]==H)q[G+2]=q[G+2].addInner(K,F,B+1);else q.splice(G,0,H,H+K.nodeSize,XB(F,K,B+1,j6));G+=3});let U=zf(G?Kf(Q):Q,-J);for(let K=0;K<U.length;K++)if(!U[K].type.valid(Z,U[K]))U.splice(K--,1);return new xQ(U.length?this.local.concat(U).sort(T6):this.local,q||this.children)}remove(Z){if(Z.length==0||this==DJ)return this;return this.removeInner(Z,0)}removeInner(Z,Q){let J=this.children,q=this.local;for(let G=0;G<J.length;G+=3){let U,K=J[G]+Q,H=J[G+1]+Q;for(let F=0,M;F<Z.length;F++)if(M=Z[F]){if(M.from>K&&M.to<H)Z[F]=null,(U||(U=[])).push(M)}if(!U)continue;if(J==this.children)J=this.children.slice();let B=J[G+2].removeInner(U,K+1);if(B!=DJ)J[G+2]=B;else J.splice(G,3),G-=3}if(q.length){for(let G=0,U;G<Z.length;G++)if(U=Z[G]){for(let K=0;K<q.length;K++)if(q[K].eq(U,Q)){if(q==this.local)q=this.local.slice();q.splice(K--,1)}}}if(J==this.children&&q==this.local)return this;return q.length||J.length?new xQ(q,J):DJ}forChild(Z,Q){if(this==DJ)return this;if(Q.isLeaf)return xQ.empty;let J,q;for(let K=0;K<this.children.length;K+=3)if(this.children[K]>=Z){if(this.children[K]==Z)J=this.children[K+2];break}let G=Z+1,U=G+Q.content.size;for(let K=0;K<this.local.length;K++){let H=this.local[K];if(H.from<U&&H.to>G&&H.type instanceof y9){let B=Math.max(G,H.from)-G,F=Math.min(U,H.to)-G;if(B<F)(q||(q=[])).push(H.copy(B,F))}}if(q){let K=new xQ(q.sort(T6),fK);return J?new $9([K,J]):K}return J||DJ}eq(Z){if(this==Z)return!0;if(!(Z instanceof xQ)||this.local.length!=Z.local.length||this.children.length!=Z.children.length)return!1;for(let Q=0;Q<this.local.length;Q++)if(!this.local[Q].eq(Z.local[Q]))return!1;for(let Q=0;Q<this.children.length;Q+=3)if(this.children[Q]!=Z.children[Q]||this.children[Q+1]!=Z.children[Q+1]||!this.children[Q+2].eq(Z.children[Q+2]))return!1;return!0}locals(Z){return nN(this.localsInner(Z))}localsInner(Z){if(this==DJ)return fK;if(Z.inlineContent||!this.local.some(y9.is))return this.local;let Q=[];for(let J=0;J<this.local.length;J++)if(!(this.local[J].type instanceof y9))Q.push(this.local[J]);return Q}forEachSet(Z){Z(this)}}class $9{constructor(Z){this.members=Z}map(Z,Q){let J=this.members.map((q)=>q.map(Z,Q,j6));return $9.from(J)}forChild(Z,Q){if(Q.isLeaf)return xQ.empty;let J=[];for(let q=0;q<this.members.length;q++){let G=this.members[q].forChild(Z,Q);if(G==DJ)continue;if(G instanceof $9)J=J.concat(G.members);else J.push(G)}return $9.from(J)}eq(Z){if(!(Z instanceof $9)||Z.members.length!=this.members.length)return!1;for(let Q=0;Q<this.members.length;Q++)if(!this.members[Q].eq(Z.members[Q]))return!1;return!0}locals(Z){let Q,J=!0;for(let q=0;q<this.members.length;q++){let G=this.members[q].localsInner(Z);if(!G.length)continue;if(!Q)Q=G;else{if(J)Q=Q.slice(),J=!1;for(let U=0;U<G.length;U++)Q.push(G[U])}}return Q?nN(J?Q:Q.sort(T6)):fK}static from(Z){switch(Z.length){case 0:return DJ;case 1:return Z[0];default:return new $9(Z.every((Q)=>Q instanceof xQ)?Z:Z.reduce((Q,J)=>Q.concat(J instanceof xQ?J:J.members),[]))}}forEachSet(Z){for(let Q=0;Q<this.members.length;Q++)this.members[Q].forEachSet(Z)}}function mQZ(Z,Q,J,q,G,U,K){let H=Z.slice();for(let F=0,M=U;F<J.maps.length;F++){let O=0;J.maps[F].forEach((V,A,N,T)=>{let P=T-N-(A-V);for(let C=0;C<H.length;C+=3){let y=H[C+1];if(y<0||V>y+M-O)continue;let f=H[C]+M-O;if(A>=f)H[C+1]=V<=f?-2:-1;else if(V>=M&&P)H[C]+=P,H[C+1]+=P}O+=P}),M=J.maps[F].map(M,-1)}let B=!1;for(let F=0;F<H.length;F+=3)if(H[F+1]<0){if(H[F+1]==-2){B=!0,H[F+1]=-1;continue}let M=J.map(Z[F]+U),O=M-G;if(O<0||O>=q.content.size){B=!0;continue}let V=J.map(Z[F+1]+U,-1),A=V-G,{index:N,offset:T}=q.content.findIndex(O),P=q.maybeChild(N);if(P&&T==O&&T+P.nodeSize==A){let C=H[F+2].mapInner(J,P,M+1,Z[F]+U+1,K);if(C!=DJ)H[F]=O,H[F+1]=A,H[F+2]=C;else H[F+1]=-2,B=!0}else B=!0}if(B){let F=cQZ(H,Z,Q,J,G,U,K),M=XB(F,q,0,K);Q=M.local;for(let O=0;O<H.length;O+=3)if(H[O+1]<0)H.splice(O,3),O-=3;for(let O=0,V=0;O<M.children.length;O+=3){let A=M.children[O];while(V<H.length&&H[V]<A)V+=3;H.splice(V,0,M.children[O],M.children[O+1],M.children[O+2])}}return new xQ(Q.sort(T6),H)}function zf(Z,Q){if(!Q||!Z.length)return Z;let J=[];for(let q=0;q<Z.length;q++){let G=Z[q];J.push(new iX(G.from+Q,G.to+Q,G.type))}return J}function cQZ(Z,Q,J,q,G,U,K){function H(B,F){for(let M=0;M<B.local.length;M++){let O=B.local[M].map(q,G,F);if(O)J.push(O);else if(K.onRemove)K.onRemove(B.local[M].spec)}for(let M=0;M<B.children.length;M+=3)H(B.children[M+2],B.children[M]+F+1)}for(let B=0;B<Z.length;B+=3)if(Z[B+1]==-1)H(Z[B+2],Q[B]+U+1);return J}function Uf(Z,Q,J){if(Q.isLeaf)return null;let q=J+Q.nodeSize,G=null;for(let U=0,K;U<Z.length;U++)if((K=Z[U])&&K.from>J&&K.to<q)(G||(G=[])).push(K),Z[U]=null;return G}function Kf(Z){let Q=[];for(let J=0;J<Z.length;J++)if(Z[J]!=null)Q.push(Z[J]);return Q}function XB(Z,Q,J,q){let G=[],U=!1;Q.forEach((H,B)=>{let F=Uf(Z,H,B+J);if(F){U=!0;let M=XB(F,H,J+B+1,q);if(M!=DJ)G.push(B,B+H.nodeSize,M)}});let K=zf(U?Kf(Z):Z,-J).sort(T6);for(let H=0;H<K.length;H++)if(!K[H].type.valid(Q,K[H])){if(q.onRemove)q.onRemove(K[H].spec);K.splice(H--,1)}return K.length||G.length?new xQ(K,G):DJ}function T6(Z,Q){return Z.from-Q.from||Z.to-Q.to}function nN(Z){let Q=Z;for(let J=0;J<Q.length-1;J++){let q=Q[J];if(q.from!=q.to)for(let G=J+1;G<Q.length;G++){let U=Q[G];if(U.from==q.from){if(U.to!=q.to){if(Q==Z)Q=Z.slice();Q[G]=U.copy(U.from,q.to),Mu(Q,G+1,U.copy(q.to,U.to))}continue}else{if(U.from<q.to){if(Q==Z)Q=Z.slice();Q[J]=q.copy(q.from,U.from),Mu(Q,G,q.copy(U.from,q.to))}break}}}return Q}function Mu(Z,Q,J){while(Q<Z.length&&T6(J,Z[Q])>0)Q++;Z.splice(Q,0,J)}function jN(Z){let Q=[];if(Z.someProp("decorations",(J)=>{let q=J(Z.state);if(q&&q!=DJ)Q.push(q)}),Z.cursorWrapper)Q.push(xQ.create(Z.state.doc,[Z.cursorWrapper.deco]));return $9.from(Q)}class Hf{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(Z){this.anchorNode=Z.anchorNode,this.anchorOffset=Z.anchorOffset,this.focusNode=Z.focusNode,this.focusOffset=Z.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(Z){return Z.anchorNode==this.anchorNode&&Z.anchorOffset==this.anchorOffset&&Z.focusNode==this.focusNode&&Z.focusOffset==this.focusOffset}}class Wf{constructor(Z,Q){if(this.view=Z,this.handleDOMChange=Q,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Hf,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((J)=>{for(let q=0;q<J.length;q++)this.queue.push(J[q]);if(BY&&E9<=11&&J.some((q)=>q.type=="childList"&&q.removedNodes.length||q.type=="characterData"&&q.oldValue.length>q.target.nodeValue.length))this.flushSoon();else if($J&&Z.composing&&J.some((q)=>q.type=="childList"&&q.target.nodeName=="TR"))Z.input.badSafariComposition=!0,this.flushSoon();else this.flush()}),dQZ)this.onCharData=(J)=>{this.queue.push({target:J.target,type:"characterData",oldValue:J.prevValue}),this.flushSoon()};this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){if(this.flushingSoon<0)this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20)}forceFlush(){if(this.flushingSoon>-1)window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush()}start(){if(this.observer)this.observer.takeRecords(),this.observer.observe(this.view.dom,pQZ);if(this.onCharData)this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData);this.connectSelection()}stop(){if(this.observer){let Z=this.observer.takeRecords();if(Z.length){for(let Q=0;Q<Z.length;Q++)this.queue.push(Z[Q]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}if(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(!Ku(this.view))return;if(this.suppressingSelectionUpdates)return tz(this.view);if(BY&&E9<=11&&!this.view.state.selection.empty){let Z=this.view.domSelectionRange();if(Z.focusNode&&P6(Z.focusNode,Z.focusOffset,Z.anchorNode,Z.anchorOffset))return this.flushSoon()}this.flush()}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(Z){if(!Z.focusNode)return!0;let Q=new Set,J;for(let G=Z.focusNode;G;G=mK(G))Q.add(G);for(let G=Z.anchorNode;G;G=mK(G))if(Q.has(G)){J=G;break}let q=J&&this.view.docView.nearestDesc(J);if(q&&q.ignoreMutation({type:"selection",target:J.nodeType==3?J.parentNode:J}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let Z of this.observer.takeRecords())this.queue.push(Z);return this.queue}flush(){let{view:Z}=this;if(!Z.docView||this.flushingSoon>-1)return;let Q=this.pendingRecords();if(Q.length)this.queue=[];let J=Z.domSelectionRange(),q=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(J)&&Ku(Z)&&!this.ignoreSelectionChange(J),G=-1,U=-1,K=!1,H=[];if(Z.editable)for(let F=0;F<Q.length;F++){let M=this.registerMutation(Q[F],H);if(M){if(G=G<0?M.from:Math.min(M.from,G),U=U<0?M.to:Math.max(M.to,U),M.typeOver)K=!0}}if(H.some((F)=>F.nodeName=="BR")&&(Z.input.lastKeyCode==8||Z.input.lastKeyCode==46||OJ&&(Z.composing||Z.input.compositionEndedAt>Date.now()-50)&&Q.some((F)=>F.type=="childList"&&F.removedNodes.length))){for(let F of H)if(F.nodeName=="BR"&&F.parentNode){let M=F.nextSibling;while(M&&M.nodeType==1){if(M.contentEditable=="false"){F.parentNode.removeChild(F);break}M=M.firstChild}}}else if(Nq&&H.length){let F=H.filter((M)=>M.nodeName=="BR");if(F.length==2){let[M,O]=F;if(M.parentNode&&M.parentNode.parentNode==O.parentNode)O.remove();else M.remove()}else{let{focusNode:M}=this.currentSelection;for(let O of F){let V=O.parentNode;if(V&&V.nodeName=="LI"&&(!M||nQZ(Z,M)!=V))O.remove()}}}let B=null;if(G<0&&q&&Z.input.lastFocus>Date.now()-200&&Math.max(Z.input.lastTouch,Z.input.lastClick.time)<Date.now()-300&&JB(J)&&(B=hN(Z))&&B.eq(mZ.near(Z.state.doc.resolve(0),1)))Z.input.lastFocus=0,tz(Z),this.currentSelection.set(J),Z.scrollToSelection();else if(G>-1||q){if(G>-1)Z.docView.markDirty(G,U),lQZ(Z);if(Z.input.badSafariComposition)Z.input.badSafariComposition=!1,sQZ(Z,H);if(this.handleDOMChange(G,U,K,H),Z.docView&&Z.docView.dirty)Z.updateState(Z.state);else if(!this.currentSelection.eq(J))tz(Z);this.currentSelection.set(J)}}registerMutation(Z,Q){if(Q.indexOf(Z.target)>-1)return null;let J=this.view.docView.nearestDesc(Z.target);if(Z.type=="attributes"&&(J==this.view.docView||Z.attributeName=="contenteditable"||Z.attributeName=="style"&&!Z.oldValue&&!Z.target.getAttribute("style")))return null;if(!J||J.ignoreMutation(Z))return null;if(Z.type=="childList"){for(let F=0;F<Z.addedNodes.length;F++){let M=Z.addedNodes[F];if(Q.push(M),M.nodeType==3)this.lastChangedTextNode=M}if(J.contentDOM&&J.contentDOM!=J.dom&&!J.contentDOM.contains(Z.target))return{from:J.posBefore,to:J.posAfter};let{previousSibling:q,nextSibling:G}=Z;if(BY&&E9<=11&&Z.addedNodes.length)for(let F=0;F<Z.addedNodes.length;F++){let{previousSibling:M,nextSibling:O}=Z.addedNodes[F];if(!M||Array.prototype.indexOf.call(Z.addedNodes,M)<0)q=M;if(!O||Array.prototype.indexOf.call(Z.addedNodes,O)<0)G=O}let U=q&&q.parentNode==Z.target?MJ(q)+1:0,K=J.localPosFromDOM(Z.target,U,-1),H=G&&G.parentNode==Z.target?MJ(G):Z.target.childNodes.length,B=J.localPosFromDOM(Z.target,H,1);return{from:K,to:B}}else if(Z.type=="attributes")return{from:J.posAtStart-J.border,to:J.posAtEnd+J.border};else return this.lastChangedTextNode=Z.target,{from:J.posAtStart,to:J.posAtEnd,typeOver:Z.target.nodeValue==Z.oldValue}}}function lQZ(Z){if(Ou.has(Z))return;if(Ou.set(Z,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(Z.dom).whiteSpace)!==-1){if(Z.requiresGeckoHackNode=Nq,Vu)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."),Vu=!0}}function Au(Z,Q){let{startContainer:J,startOffset:q,endContainer:G,endOffset:U}=Q,K=Z.domAtPos(Z.state.selection.anchor);if(P6(K.node,K.offset,G,U))[J,q,G,U]=[G,U,J,q];return{anchorNode:J,anchorOffset:q,focusNode:G,focusOffset:U}}function iQZ(Z,Q){if(Q.getComposedRanges){let G=Q.getComposedRanges(Z.root)[0];if(G)return Au(Z,G)}let J;function q(G){G.preventDefault(),G.stopImmediatePropagation(),J=G.getTargetRanges()[0]}return Z.dom.addEventListener("beforeinput",q,!0),document.execCommand("indent"),Z.dom.removeEventListener("beforeinput",q,!0),J?Au(Z,J):null}function nQZ(Z,Q){for(let J=Q.parentNode;J&&J!=Z.dom;J=J.parentNode){let q=Z.docView.nearestDesc(J,!0);if(q&&q.node.isBlock)return J}return null}function sQZ(Z,Q){var J;let{focusNode:q,focusOffset:G}=Z.domSelectionRange();for(let U of Q)if(((J=U.parentNode)===null||J===void 0?void 0:J.nodeName)=="TR"){let K=U.nextSibling;while(K&&(K.nodeName!="TD"&&K.nodeName!="TH"))K=K.nextSibling;if(K){let H=K;for(;;){let B=H.firstChild;if(!B||B.nodeType!=1||B.contentEditable=="false"||/^(BR|IMG)$/.test(B.nodeName))break;H=B}if(H.insertBefore(U,H.firstChild),q==U)Z.domSelection().collapse(U,G)}else U.parentNode.removeChild(U)}}function aQZ(Z,Q,J,q){let{node:G,fromOffset:U,toOffset:K,from:H,to:B}=Z.docView.parseRange(Q,J),F=Z.domSelectionRange(),M,O=F.anchorNode;if(O&&Z.dom.contains(O.nodeType==1?O:O.parentNode)){if(M=[{node:O,offset:F.anchorOffset}],!JB(F))M.push({node:F.focusNode,offset:F.focusOffset})}if(OJ&&Z.input.lastKeyCode===8)for(let C=K;C>U;C--){let y=G.childNodes[C-1],f=y.pmViewDesc;if(y.nodeName=="BR"&&!f){K=C;break}if(!f||f.size)break}let V=Z.state.doc,A=Z.someProp("domParser")||Lq.fromSchema(Z.state.schema),N=V.resolve(H),T=null,P=A.parse(G,{topNode:N.parent,topMatch:N.parent.contentMatchAt(N.index()),topOpen:!0,from:U,to:K,preserveWhitespace:N.parent.type.whitespace=="pre"?"full":!0,findPositions:M,ruleFromNode:rQZ(q),context:N});if(M&&M[0].pos!=null){let C=M[0].pos,y=M[1]&&M[1].pos;if(y==null)y=C;T={anchor:C+H,head:y+H}}return{doc:P,sel:T,from:H,to:B}}function tQZ(Z,Q,J,q,G){let U=Z.input.compositionPendingChanges||(Z.composing?Z.input.compositionID:0);if(Z.input.compositionPendingChanges=0,Q<0){let a=Z.input.lastSelectionTime>Date.now()-50?Z.input.lastSelectionOrigin:null,c=hN(Z,a);if(c&&!Z.state.selection.eq(c)){if(OJ&&rz&&Z.input.lastKeyCode===13&&Date.now()-100<Z.input.lastKeyCodeTime&&Z.someProp("handleKeyDown",(s)=>s(Z,A6(13,"Enter"))))return;let GZ=Z.state.tr.setSelection(c);if(a=="pointer")GZ.setMeta("pointer",!0);else if(a=="key")GZ.scrollIntoView();if(U)GZ.setMeta("composition",U);Z.dispatch(GZ)}return}let K=Z.state.doc.resolve(Q),H=K.sharedDepth(J);Q=K.before(H+1),J=Z.state.doc.resolve(J).after(H+1);let B=Z.state.selection,F=aQZ(Z,Q,J,G),M=Z.state.doc,O=M.slice(F.from,F.to),V,A;if(Z.input.lastKeyCode===8&&Date.now()-100<Z.input.lastKeyCodeTime)V=Z.state.selection.to,A="end";else V=Z.state.selection.from,A="start";Z.input.lastKeyCode=null;let N=QXZ(O.content,F.doc.content,F.from,V,A);if(N)Z.input.domChangeCount++;if((cK&&Z.input.lastIOSEnter>Date.now()-225||rz)&&G.some((a)=>a.nodeType==1&&!oQZ.test(a.nodeName))&&(!N||N.endA>=N.endB)&&Z.someProp("handleKeyDown",(a)=>a(Z,A6(13,"Enter")))){Z.input.lastIOSEnter=0;return}if(!N)if(q&&B instanceof DZ&&!B.empty&&B.$head.sameParent(B.$anchor)&&!Z.composing&&!(F.sel&&F.sel.anchor!=F.sel.head))N={start:B.from,endA:B.to,endB:B.to};else{if(F.sel){let a=Iu(Z,Z.state.doc,F.sel);if(a&&!a.eq(Z.state.selection)){let c=Z.state.tr.setSelection(a);if(U)c.setMeta("composition",U);Z.dispatch(c)}}return}if(Z.state.selection.from<Z.state.selection.to&&N.start==N.endB&&Z.state.selection instanceof DZ){if(N.start>Z.state.selection.from&&N.start<=Z.state.selection.from+2&&Z.state.selection.from>=F.from)N.start=Z.state.selection.from;else if(N.endA<Z.state.selection.to&&N.endA>=Z.state.selection.to-2&&Z.state.selection.to<=F.to)N.endB+=Z.state.selection.to-N.endA,N.endA=Z.state.selection.to}if(BY&&E9<=11&&N.endB==N.start+1&&N.endA==N.start&&N.start>F.from&&F.doc.textBetween(N.start-F.from-1,N.start-F.from+1)==" ")N.start--,N.endA--,N.endB--;let T=F.doc.resolveNoCache(N.start-F.from),P=F.doc.resolveNoCache(N.endB-F.from),C=M.resolve(N.start),y=T.sameParent(P)&&T.parent.inlineContent&&C.end()>=N.endA;if((cK&&Z.input.lastIOSEnter>Date.now()-225&&(!y||G.some((a)=>a.nodeName=="DIV"||a.nodeName=="P"))||!y&&T.pos<F.doc.content.size&&(!T.sameParent(P)||!T.parent.inlineContent)&&T.pos<P.pos&&!/\S/.test(F.doc.textBetween(T.pos,P.pos,"","")))&&Z.someProp("handleKeyDown",(a)=>a(Z,A6(13,"Enter")))){Z.input.lastIOSEnter=0;return}if(Z.state.selection.anchor>N.start&&ZXZ(M,N.start,N.endA,T,P)&&Z.someProp("handleKeyDown",(a)=>a(Z,A6(8,"Backspace")))){if(rz&&OJ)Z.domObserver.suppressSelectionUpdates();return}if(OJ&&N.endB==N.start)Z.input.lastChromeDelete=Date.now();if(rz&&!y&&T.start()!=P.start()&&P.parentOffset==0&&T.depth==P.depth&&F.sel&&F.sel.anchor==F.sel.head&&F.sel.head==N.endA)N.endB-=2,P=F.doc.resolveNoCache(N.endB-F.from),setTimeout(()=>{Z.someProp("handleKeyDown",function(a){return a(Z,A6(13,"Enter"))})},20);let{start:f,endA:u}=N,n=(a)=>{let c=a||Z.state.tr.replace(f,u,F.doc.slice(N.start-F.from,N.endB-F.from));if(F.sel){let GZ=Iu(Z,c.doc,F.sel);if(GZ&&!(OJ&&Z.composing&&GZ.empty&&(N.start!=N.endB||Z.input.lastChromeDelete<Date.now()-100)&&(GZ.head==f||GZ.head==c.mapping.map(u)-1)||BY&&GZ.empty&&GZ.head==f))c.setSelection(GZ)}if(U)c.setMeta("composition",U);return c.scrollIntoView()},e;if(y)if(T.pos==P.pos){if(BY&&E9<=11&&T.parentOffset==0)Z.domObserver.suppressSelectionUpdates(),setTimeout(()=>tz(Z),20);let a=n(Z.state.tr.delete(f,u)),c=M.resolve(N.start).marksAcross(M.resolve(N.endA));if(c)a.ensureMarks(c);Z.dispatch(a)}else if(N.endA==N.endB&&(e=eQZ(T.parent.content.cut(T.parentOffset,P.parentOffset),C.parent.content.cut(C.parentOffset,N.endA-C.start())))){let a=n(Z.state.tr);if(e.type=="add")a.addMark(f,u,e.mark);else a.removeMark(f,u,e.mark);Z.dispatch(a)}else if(T.parent.child(T.index()).isText&&T.index()==P.index()-(P.textOffset?0:1)){let a=T.parent.textBetween(T.parentOffset,P.parentOffset),c=()=>n(Z.state.tr.insertText(a,f,u));if(!Z.someProp("handleTextInput",(GZ)=>GZ(Z,f,u,a,c)))Z.dispatch(c())}else Z.dispatch(n());else Z.dispatch(n())}function Iu(Z,Q,J){if(Math.max(J.anchor,J.head)>Q.content.size)return null;return uN(Z,Q.resolve(J.anchor),Q.resolve(J.head))}function eQZ(Z,Q){let J=Z.firstChild.marks,q=Q.firstChild.marks,G=J,U=q,K,H,B;for(let M=0;M<q.length;M++)G=q[M].removeFromSet(G);for(let M=0;M<J.length;M++)U=J[M].removeFromSet(U);if(G.length==1&&U.length==0)H=G[0],K="add",B=(M)=>M.mark(H.addToSet(M.marks));else if(G.length==0&&U.length==1)H=U[0],K="remove",B=(M)=>M.mark(H.removeFromSet(M.marks));else return null;let F=[];for(let M=0;M<Q.childCount;M++)F.push(B(Q.child(M)));if(UZ.from(F).eq(Z))return{mark:H,type:K}}function ZXZ(Z,Q,J,q,G){if(J-Q<=G.pos-q.pos||TN(q,!0,!1)<G.pos)return!1;let U=Z.resolve(Q);if(!q.parent.isTextblock){let H=U.nodeAfter;return H!=null&&J==Q+H.nodeSize}if(U.parentOffset<U.parent.content.size||!U.parent.isTextblock)return!1;let K=Z.resolve(TN(U,!0,!0));if(!K.parent.isTextblock||K.pos>J||TN(K,!0,!1)<J)return!1;return q.parent.content.cut(q.parentOffset).eq(K.parent.content)}function TN(Z,Q,J){let q=Z.depth,G=Q?Z.end():Z.pos;while(q>0&&(Q||Z.indexAfter(q)==Z.node(q).childCount))q--,G++,Q=!1;if(J){let U=Z.node(q).maybeChild(Z.indexAfter(q));while(U&&!U.isLeaf)U=U.firstChild,G++}return G}function QXZ(Z,Q,J,q,G){let U=Z.findDiffStart(Q,J),K=J+Z.size,H=J+Q.size;if(U==null)return null;let{a:B,b:F}=Z.findDiffEnd(Q,K,H);if(G=="end"){let M=Math.max(0,U-Math.min(B,F));q-=B+M-U}if(B<U&&K<H){let M=q<=U&&q>=B?U-q:0;U-=M,F=U+(F-B),B=U}else if(F<U){let M=q<=U&&q>=F?U-q:0;U-=M,B=U+(B-F),F=U}return{start:U,endA:B,endB:F}}class qB{constructor(Z,Q){if(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 ou,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=Q,this.state=Q.state,this.directPlugins=Q.plugins||[],this.directPlugins.forEach(Ru),this.dispatch=this.dispatch.bind(this),this.dom=Z&&Z.mount||document.createElement("div"),Z){if(Z.appendChild)Z.appendChild(this.dom);else if(typeof Z=="function")Z(this.dom);else if(Z.mount)this.mounted=!0}this.editable=Tu(this),ju(this),this.nodeViews=Pu(this),this.docView=Ju(this.state.doc,Nu(this),jN(this),this.dom,this),this.domObserver=new Wf(this,(J,q,G,U)=>tQZ(this,J,q,G,U)),this.domObserver.start(),jQZ(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let Z=this._props;this._props={};for(let Q in Z)this._props[Q]=Z[Q];this._props.state=this.state}return this._props}update(Z){if(Z.handleDOMEvents!=this._props.handleDOMEvents)xN(this);let Q=this._props;if(this._props=Z,Z.plugins)Z.plugins.forEach(Ru),this.directPlugins=Z.plugins;this.updateStateInner(Z.state,Q)}setProps(Z){let Q={};for(let J in this._props)Q[J]=this._props[J];Q.state=this.state;for(let J in Z)Q[J]=Z[J];this.update(Q)}updateState(Z){this.updateStateInner(Z,this._props)}updateStateInner(Z,Q){var J;let q=this.state,G=!1,U=!1;if(Z.storedMarks&&this.composing)Yf(this),U=!0;this.state=Z;let K=q.plugins!=Z.plugins||this._props.plugins!=Q.plugins;if(K||this._props.plugins!=Q.plugins||this._props.nodeViews!=Q.nodeViews){let V=Pu(this);if(JXZ(V,this.nodeViews))this.nodeViews=V,G=!0}if(K||Q.handleDOMEvents!=this._props.handleDOMEvents)xN(this);this.editable=Tu(this),ju(this);let H=jN(this),B=Nu(this),F=q.plugins!=Z.plugins&&!q.doc.eq(Z.doc)?"reset":Z.scrollToSelection>q.scrollToSelection?"to selection":"preserve",M=G||!this.docView.matchesNode(Z.doc,B,H);if(M||!Z.selection.eq(q.selection))U=!0;let O=F=="preserve"&&U&&this.dom.style.overflowAnchor==null&&fZZ(this);if(U){this.domObserver.stop();let V=M&&(BY||OJ)&&!this.composing&&!q.selection.empty&&!Z.selection.empty&&XXZ(q.selection,Z.selection);if(M){let N=OJ?this.trackWrites=this.domSelectionRange().focusNode:null;if(this.composing)this.input.compositionNode=bQZ(this);if(G||!this.docView.update(Z.doc,B,H,this))this.docView.updateOuterDeco(B),this.docView.destroy(),this.docView=Ju(Z.doc,B,H,this.dom,this);if(N&&(!this.trackWrites||!this.dom.contains(this.trackWrites)))V=!0}let A=this.input.mouseDown;if(V||!(A&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&zQZ(this)&&A.delaySelUpdate()))tz(this,V);else cu(this,Z.selection),this.domObserver.setCurSelection();this.domObserver.start()}if(this.updatePluginViews(q),((J=this.dragging)===null||J===void 0?void 0:J.node)&&!q.doc.eq(Z.doc))this.updateDraggedNode(this.dragging,q);if(F=="reset")this.dom.scrollTop=0;else if(F=="to selection")this.scrollToSelection();else if(O)mZZ(O)}scrollToSelection(){let Z=this.domSelectionRange().focusNode;if(!Z||!this.dom.contains(Z.nodeType==1?Z:Z.parentNode));else if(this.someProp("handleScrollToSelection",(Q)=>Q(this)));else if(this.state.selection instanceof SZ){let Q=this.docView.domAfterPos(this.state.selection.from);if(Q.nodeType==1)th(this,Q.getBoundingClientRect(),Z)}else th(this,this.coordsAtPos(this.state.selection.head,1),Z)}destroyPluginViews(){let Z;while(Z=this.pluginViews.pop())if(Z.destroy)Z.destroy()}updatePluginViews(Z){if(!Z||Z.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let Q=0;Q<this.directPlugins.length;Q++){let J=this.directPlugins[Q];if(J.spec.view)this.pluginViews.push(J.spec.view(this))}for(let Q=0;Q<this.state.plugins.length;Q++){let J=this.state.plugins[Q];if(J.spec.view)this.pluginViews.push(J.spec.view(this))}}else for(let Q=0;Q<this.pluginViews.length;Q++){let J=this.pluginViews[Q];if(J.update)J.update(this,Z)}}updateDraggedNode(Z,Q){let J=Z.node,q=-1;if(J.from<this.state.doc.content.size&&this.state.doc.nodeAt(J.from)==J.node)q=J.from;else{let G=J.from+(this.state.doc.content.size-Q.doc.content.size);if((G>0&&G<this.state.doc.content.size&&this.state.doc.nodeAt(G))==J.node)q=G}this.dragging=new lN(Z.slice,Z.move,q<0?void 0:SZ.create(this.state.doc,q))}someProp(Z,Q){let J=this._props&&this._props[Z],q;if(J!=null&&(q=Q?Q(J):J))return q;for(let U=0;U<this.directPlugins.length;U++){let K=this.directPlugins[U].props[Z];if(K!=null&&(q=Q?Q(K):K))return q}let G=this.state.plugins;if(G)for(let U=0;U<G.length;U++){let K=G[U].props[Z];if(K!=null&&(q=Q?Q(K):K))return q}}hasFocus(){if(BY){let Z=this.root.activeElement;if(Z==this.dom)return!0;if(!Z||!this.dom.contains(Z))return!1;while(Z&&this.dom!=Z&&this.dom.contains(Z)){if(Z.contentEditable=="false")return!1;Z=Z.parentElement}return!0}return this.root.activeElement==this.dom}focus(){if(this.domObserver.stop(),this.editable)cZZ(this.dom);tz(this),this.domObserver.start()}get root(){let Z=this._root;if(Z==null){for(let Q=this.dom.parentNode;Q;Q=Q.parentNode)if(Q.nodeType==9||Q.nodeType==11&&Q.host){if(!Q.getSelection)Object.getPrototypeOf(Q).getSelection=()=>Q.ownerDocument.getSelection();return this._root=Q}}return Z||document}updateRoot(){this._root=null}posAtCoords(Z){return nZZ(this,Z)}coordsAtPos(Z,Q=1){return wu(this,Z,Q)}domAtPos(Z,Q=0){return this.docView.domFromPos(Z,Q)}nodeDOM(Z){let Q=this.docView.descAt(Z);return Q?Q.nodeDOM:null}posAtDOM(Z,Q,J=-1){let q=this.docView.posFromDOM(Z,Q,J);if(q==null)throw RangeError("DOM position not inside the editor");return q}endOfTextblock(Z,Q){return tZZ(this,Q||this.state,Z)}pasteHTML(Z,Q){return lH(this,"",Z,!1,Q||new ClipboardEvent("paste"))}pasteText(Z,Q){return lH(this,Z,null,!0,Q||new ClipboardEvent("paste"))}serializeForClipboard(Z){return fN(this,Z)}destroy(){if(!this.docView)return;if(TQZ(this),this.destroyPluginViews(),this.mounted)this.docView.update(this.state.doc,[],jN(this),this),this.dom.textContent="";else if(this.dom.parentNode)this.dom.parentNode.removeChild(this.dom);this.docView.destroy(),this.docView=null,kZZ()}get isDestroyed(){return this.docView==null}dispatchEvent(Z){return RQZ(this,Z)}domSelectionRange(){let Z=this.domSelection();if(!Z)return{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0};return $J&&this.root.nodeType===11&&bZZ(this.dom.ownerDocument)==this.dom&&iQZ(this,Z)||Z}domSelection(){return this.root.getSelection()}}function Nu(Z){let Q=Object.create(null);if(Q.class="ProseMirror",Q.contenteditable=String(Z.editable),Z.someProp("attributes",(J)=>{if(typeof J=="function")J=J(Z.state);if(J){for(let q in J)if(q=="class")Q.class+=" "+J[q];else if(q=="style")Q.style=(Q.style?Q.style+";":"")+J[q];else if(!Q[q]&&q!="contenteditable"&&q!="nodeName")Q[q]=String(J[q])}}),!Q.translate)Q.translate="no";return[iX.node(0,Z.state.doc.content.size,Q)]}function ju(Z){if(Z.markCursor){let Q=document.createElement("img");Q.className="ProseMirror-separator",Q.setAttribute("mark-placeholder","true"),Q.setAttribute("alt",""),Z.cursorWrapper={dom:Q,deco:iX.widget(Z.state.selection.from,Q,{raw:!0,marks:Z.markCursor})}}else Z.cursorWrapper=null}function Tu(Z){return!Z.someProp("editable",(Q)=>Q(Z.state)===!1)}function XXZ(Z,Q){let J=Math.min(Z.$anchor.sharedDepth(Z.head),Q.$anchor.sharedDepth(Q.head));return Z.$anchor.start(J)!=Q.$anchor.start(J)}function Pu(Z){let Q=Object.create(null);function J(q){for(let G in q)if(!Object.prototype.hasOwnProperty.call(Q,G))Q[G]=q[G]}return Z.someProp("nodeViews",J),Z.someProp("markViews",J),Q}function JXZ(Z,Q){let J=0,q=0;for(let G in Z){if(Z[G]!=Q[G])return!0;J++}for(let G in Q)q++;return J!=q}function Ru(Z){if(Z.spec.state||Z.spec.filterTransaction||Z.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}var MJ=function(Z){for(var Q=0;;Q++)if(Z=Z.previousSibling,!Z)return Q},mK=function(Z){let Q=Z.assignedSlot||Z.parentNode;return Q&&Q.nodeType==11?Q.host:Q},PN=null,az=function(Z,Q,J){let q=PN||(PN=document.createRange());return q.setEnd(Z,J==null?Z.nodeValue.length:J),q.setStart(Z,Q||0),q},kZZ=function(){PN=null},P6=function(Z,Q,J,q){return J&&(rh(Z,Q,J,q,-1)||rh(Z,Q,J,q,1))},SZZ,JB=function(Z){return Z.focusNode&&P6(Z.focusNode,Z.focusOffset,Z.anchorNode,Z.anchorOffset)},aG,oh,w9,RN,Cu,CN,BY,E9,Nq,DN,OJ,Du,$J,cK,Aq,$u,rz,sH,gZZ,hK=null,sZZ,rZZ,eh=null,Zu=null,Qu=!1,jq=0,Xu=1,I6=2,tq=3,vN,bu,k9,S9,YB,gN,vu,cH=function(Z){if(Z)this.nodeName=Z},N6,qu,LQZ,au,NN=null,iJ,nJ,NQZ,eu,Zf,Qf,wQZ,dH,uQZ,fK,j6,DJ,pQZ,dQZ,Ou,Vu=!1,rQZ=(Z)=>(Q)=>{let J=Q.pmViewDesc;if(J)return J.parseRule(Z);else if(Q.nodeName=="BR"&&Q.parentNode){if($J&&/^(ul|ol)$/i.test(Q.parentNode.nodeName)){let q=document.createElement("div");return q.appendChild(document.createElement("li")),{skip:q}}else if(Q.parentNode.lastChild==Q||$J&&/^(tr|table)$/i.test(Q.parentNode.nodeName))return{ignore:!0}}else if(Q.nodeName=="IMG"&&Q.getAttribute("mark-placeholder"))return{ignore:!0};return null},oQZ;var sN=k(()=>{nz();lz();T9();SZZ=/^(img|br|input|textarea|hr)$/i;aG=typeof navigator<"u"?navigator:null,oh=typeof document<"u"?document:null,w9=aG&&aG.userAgent||"",RN=/Edge\/(\d+)/.exec(w9),Cu=/MSIE \d/.exec(w9),CN=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(w9),BY=!!(Cu||CN||RN),E9=Cu?document.documentMode:CN?+CN[1]:RN?+RN[1]:0,Nq=!BY&&/gecko\/(\d+)/i.test(w9);Nq&&+(/Firefox\/(\d+)/.exec(w9)||[0,0])[1];DN=!BY&&/Chrome\/(\d+)/.exec(w9),OJ=!!DN,Du=DN?+DN[1]:0,$J=!BY&&!!aG&&/Apple Computer/.test(aG.vendor),cK=$J&&(/Mobile\/\w+/.test(w9)||!!aG&&aG.maxTouchPoints>2),Aq=cK||(aG?/Mac/.test(aG.platform):!1),$u=aG?/Win/.test(aG.platform):!1,rz=/Android \d/.test(w9),sH=!!oh&&"webkitFontSmoothing"in oh.documentElement.style,gZZ=sH?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;sZZ=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;rZZ=/[\u0590-\u08ac]/;vN=class vN extends pK{constructor(Z,Q,J,q){let G,U=Q.type.toDOM;if(typeof U=="function")U=U(J,()=>{if(!G)return q;if(G.parent)return G.parent.posBeforeChild(G)});if(!Q.type.spec.raw){if(U.nodeType!=1){let K=document.createElement("span");K.appendChild(U),U=K}U.contentEditable="false",U.classList.add("ProseMirror-widget")}super(Z,[],U,null);this.widget=Q,this.widget=Q,G=this}matchesWidget(Z){return this.dirty==jq&&Z.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(Z){let Q=this.widget.spec.stopEvent;return Q?Q(Z):!1}ignoreMutation(Z){return Z.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}};bu=class bu extends pK{constructor(Z,Q,J,q){super(Z,[],Q,null);this.textDOM=J,this.text=q}get size(){return this.text.length}localPosFromDOM(Z,Q){if(Z!=this.textDOM)return this.posAtStart+(Q?this.size:0);return this.posAtStart+Q}domFromPos(Z){return{node:this.textDOM,offset:Z}}ignoreMutation(Z){return Z.type==="characterData"&&Z.target.nodeValue==Z.oldValue}};k9=class k9 extends pK{constructor(Z,Q,J,q,G){super(Z,[],J,q);this.mark=Q,this.spec=G}static create(Z,Q,J,q){let G=q.nodeViews[Q.type.name],U=G&&G(Q,q,J);if(!U||!U.dom)U=sG.renderSpec(document,Q.type.spec.toDOM(Q,J),null,Q.attrs);return new k9(Z,Q,U.dom,U.contentDOM||U.dom,U)}parseRule(){if(this.dirty&tq||this.mark.type.spec.reparseInView)return null;return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(Z){return this.dirty!=tq&&this.mark.eq(Z)}markDirty(Z,Q){if(super.markDirty(Z,Q),this.dirty!=jq){let J=this.parent;while(!J.node)J=J.parent;if(J.dirty<this.dirty)J.dirty=this.dirty;this.dirty=jq}}slice(Z,Q,J){let q=k9.create(this.parent,this.mark,!0,J),G=this.children,U=this.size;if(Q<U)G=kN(G,Q,U,J);if(Z>0)G=kN(G,0,Z,J);for(let K=0;K<G.length;K++)G[K].parent=q;return q.children=G,q}ignoreMutation(Z){return this.spec.ignoreMutation?this.spec.ignoreMutation(Z):super.ignoreMutation(Z)}destroy(){if(this.spec.destroy)this.spec.destroy();super.destroy()}};S9=class S9 extends pK{constructor(Z,Q,J,q,G,U,K){super(Z,[],G,U);this.node=Q,this.outerDeco=J,this.innerDeco=q,this.nodeDOM=K}static create(Z,Q,J,q,G,U){let K=G.nodeViews[Q.type.name],H,B=K&&K(Q,G,()=>{if(!H)return U;if(H.parent)return H.parent.posBeforeChild(H)},J,q),F=B&&B.dom,M=B&&B.contentDOM;if(Q.isText){if(!F)F=document.createTextNode(Q.text);else if(F.nodeType!=3)throw RangeError("Text must be rendered as a DOM text node")}else if(!F)({dom:F,contentDOM:M}=sG.renderSpec(document,Q.type.spec.toDOM(Q),null,Q.attrs));if(!M&&!Q.isText&&F.nodeName!="BR"){if(!F.hasAttribute("contenteditable"))F.contentEditable="false";if(Q.type.spec.draggable)F.draggable=!0}let O=F;if(F=uu(F,J,Q),B)return H=new vu(Z,Q,J,q,F,M||null,O,B);else if(Q.isText)return new YB(Z,Q,J,q,F,O);else return new S9(Z,Q,J,q,F,M||null,O)}parseRule(Z){if(this.node.type.spec.reparseInView)return null;let Q={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre")Q.preserveWhitespace="full";if(!this.contentDOM)Q.getContent=()=>this.node.content;else if(!this.contentLost)Q.contentElement=this.contentDOM;else{for(let J=this.children.length-1;J>=0;J--){let q=this.children[J];if(this.dom.contains(q.dom.parentNode)){Q.contentElement=q.dom.parentNode;break}}if(!Q.contentElement){let J=Z&&Z.find((q)=>q.nodeType==1&&Z.indexOf(q.parentNode)<0&&this.dom.contains(q));if(J)Q.contentElement=J;else Q.getContent=()=>UZ.empty}}return Q}matchesNode(Z,Q,J){return this.dirty==jq&&Z.eq(this.node)&&t2(Q,this.outerDeco)&&J.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(Z,Q){let J=this.node.inlineContent,q=Q,G=Z.composing?this.localCompositionInfo(Z,Q):null,U=G&&G.pos>-1?G:null,K=G&&G.pos<0,H=new fu(this,U&&U.node,Z);if(XQZ(this.node,this.innerDeco,(B,F,M)=>{if(B.spec.marks)H.syncToMarks(B.spec.marks,J,Z,F);else if(B.type.side>=0&&!M)H.syncToMarks(F==this.node.childCount?wQ.none:this.node.child(F).marks,J,Z,F);H.placeWidget(B,Z,q)},(B,F,M,O)=>{H.syncToMarks(B.marks,J,Z,O);let V;if(H.findNodeMatch(B,F,M,O));else if(K&&Z.state.selection.from>q&&Z.state.selection.to<q+B.nodeSize&&(V=H.findIndexWithChild(G.node))>-1&&H.updateNodeAt(B,F,M,V,Z));else if(H.updateNextNode(B,F,M,Z,O,q));else H.addNode(B,F,M,Z,q);q+=B.nodeSize}),H.syncToMarks([],J,Z,0),this.node.isTextblock)H.addTextblockHacks();if(H.destroyRest(),H.changed||this.dirty==I6){if(U)this.protectLocalComposition(Z,U);if(gu(this.contentDOM,this.children,Z),cK)JQZ(this.dom)}}localCompositionInfo(Z,Q){let{from:J,to:q}=Z.state.selection;if(!(Z.state.selection instanceof DZ)||J<Q||q>Q+this.node.content.size)return null;let G=Z.input.compositionNode;if(!G||!this.dom.contains(G.parentNode))return null;if(this.node.inlineContent){let U=G.nodeValue,K=YQZ(this.node.content,U,J-Q,q-Q);return K<0?null:{node:G,pos:K,text:U}}else return{node:G,pos:-1,text:""}}protectLocalComposition(Z,{node:Q,pos:J,text:q}){if(this.getDesc(Q))return;let G=Q;for(;;G=G.parentNode){if(G.parentNode==this.contentDOM)break;while(G.previousSibling)G.parentNode.removeChild(G.previousSibling);while(G.nextSibling)G.parentNode.removeChild(G.nextSibling);if(G.pmViewDesc)G.pmViewDesc=void 0}let U=new bu(this,G,Q,q);Z.input.compositionNodes.push(U),this.children=kN(this.children,J,J+q.length,Z,U)}update(Z,Q,J,q){if(this.dirty==tq||!Z.sameMarkup(this.node))return!1;return this.updateInner(Z,Q,J,q),!0}updateInner(Z,Q,J,q){if(this.updateOuterDeco(Q),this.node=Z,this.innerDeco=J,this.contentDOM)this.updateChildren(q,this.posAtStart);this.dirty=jq}updateOuterDeco(Z){if(t2(Z,this.outerDeco))return;let Q=this.nodeDOM.nodeType!=1,J=this.dom;if(this.dom=hu(this.dom,this.nodeDOM,EN(this.outerDeco,this.node,Q),EN(Z,this.node,Q)),this.dom!=J)J.pmViewDesc=void 0,this.dom.pmViewDesc=this;this.outerDeco=Z}selectNode(){if(this.nodeDOM.nodeType==1){if(this.nodeDOM.classList.add("ProseMirror-selectednode"),this.contentDOM||!this.node.type.spec.draggable)this.nodeDOM.draggable=!0}}deselectNode(){if(this.nodeDOM.nodeType==1){if(this.nodeDOM.classList.remove("ProseMirror-selectednode"),this.contentDOM||!this.node.type.spec.draggable)this.nodeDOM.removeAttribute("draggable")}}get domAtom(){return this.node.isAtom}};YB=class YB extends S9{constructor(Z,Q,J,q,G,U){super(Z,Q,J,q,G,null,U)}parseRule(){let Z=this.nodeDOM.parentNode;while(Z&&Z!=this.dom&&!Z.pmIsDeco)Z=Z.parentNode;return{skip:Z||!0}}update(Z,Q,J,q){if(this.dirty==tq||this.dirty!=jq&&!this.inParent()||!Z.sameMarkup(this.node))return!1;if(this.updateOuterDeco(Q),(this.dirty!=jq||Z.text!=this.node.text)&&Z.text!=this.nodeDOM.nodeValue){if(this.nodeDOM.nodeValue=Z.text,q.trackWrites==this.nodeDOM)q.trackWrites=null}return this.node=Z,this.dirty=jq,!0}inParent(){let Z=this.parent.contentDOM;for(let Q=this.nodeDOM;Q;Q=Q.parentNode)if(Q==Z)return!0;return!1}domFromPos(Z){return{node:this.nodeDOM,offset:Z}}localPosFromDOM(Z,Q,J){if(Z==this.nodeDOM)return this.posAtStart+Math.min(Q,this.node.text.length);return super.localPosFromDOM(Z,Q,J)}ignoreMutation(Z){return Z.type!="characterData"&&Z.type!="selection"}slice(Z,Q,J){let q=this.node.cut(Z,Q),G=document.createTextNode(q.text);return new YB(this.parent,q,this.outerDeco,this.innerDeco,G,G)}markDirty(Z,Q){if(super.markDirty(Z,Q),this.dom!=this.nodeDOM&&(Z==0||Q==this.nodeDOM.nodeValue.length))this.dirty=tq}get domAtom(){return!1}isText(Z){return this.node.text==Z}};gN=class gN extends pK{parseRule(){return{ignore:!0}}matchesHack(Z){return this.dirty==jq&&this.dom.nodeName==Z}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}};vu=class vu extends S9{constructor(Z,Q,J,q,G,U,K,H){super(Z,Q,J,q,G,U,K);this.spec=H}update(Z,Q,J,q){if(this.dirty==tq)return!1;if(this.spec.update&&(this.node.type==Z.type||this.spec.multiType)){let G=this.spec.update(Z,Q,J);if(G)this.updateInner(Z,Q,J,q);return G}else if(!this.contentDOM&&!Z.isLeaf)return!1;else return super.update(Z,Q,J,q)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(Z,Q,J,q){this.spec.setSelection?this.spec.setSelection(Z,Q,J.root):super.setSelection(Z,Q,J,q)}destroy(){if(this.spec.destroy)this.spec.destroy();super.destroy()}stopEvent(Z){return this.spec.stopEvent?this.spec.stopEvent(Z):!1}ignoreMutation(Z){return this.spec.ignoreMutation?this.spec.ignoreMutation(Z):super.ignoreMutation(Z)}};cH.prototype=Object.create(null);N6=[new cH];qu=$J||OJ&&Du<63;LQZ=/^(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;au={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};iJ={},nJ={},NQZ={touchstart:!0,touchmove:!0};nJ.keydown=(Z,Q)=>{let J=Q;if(Z.input.shiftKey=J.keyCode==16||J.shiftKey,Xf(Z))return;if(Z.input.lastKeyCode=J.keyCode,Z.input.lastKeyCodeTime=Date.now(),rz&&OJ&&J.keyCode==13)return;if(J.keyCode!=229)Z.domObserver.forceFlush();if(cK&&J.keyCode==13&&!J.ctrlKey&&!J.altKey&&!J.metaKey){let q=Date.now();Z.input.lastIOSEnter=q,Z.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{if(Z.input.lastIOSEnter==q)Z.someProp("handleKeyDown",(G)=>G(Z,A6(13,"Enter"))),Z.input.lastIOSEnter=0},200)}else if(Z.someProp("handleKeyDown",(q)=>q(Z,J))||FQZ(Z,J))J.preventDefault();else oz(Z,"key")};nJ.keyup=(Z,Q)=>{if(Q.keyCode==16)Z.input.shiftKey=!1};nJ.keypress=(Z,Q)=>{let J=Q;if(Xf(Z)||!J.charCode||J.ctrlKey&&!J.altKey||Aq&&J.metaKey)return;if(Z.someProp("handleKeyPress",(G)=>G(Z,J))){J.preventDefault();return}let q=Z.state.selection;if(!(q instanceof DZ)||!q.$from.sameParent(q.$to)){let G=String.fromCharCode(J.charCode),U=()=>Z.state.tr.insertText(G).scrollIntoView();if(!/[\r\n]/.test(G)&&!Z.someProp("handleTextInput",(K)=>K(Z,q.$from.pos,q.$to.pos,G,U)))Z.dispatch(U());J.preventDefault()}};eu=Aq?"metaKey":"ctrlKey";iJ.mousedown=(Z,Q)=>{let J=Q;Z.input.shiftKey=J.shiftKey;let q=pN(Z),G=Date.now(),U="singleClick";if(G-Z.input.lastClick.time<500&&CQZ(J,Z.input.lastClick)&&!J[eu]&&Z.input.lastClick.button==J.button){if(Z.input.lastClick.type=="singleClick")U="doubleClick";else if(Z.input.lastClick.type=="doubleClick")U="tripleClick"}if(Z.input.lastClick={time:G,x:J.clientX,y:J.clientY,type:U,button:J.button},Z.input.mouseDown)Z.input.mouseDown.done();let K=Z.posAtCoords(aH(J));if(!K)return;if(U=="singleClick")Z.input.mouseDown=new Zf(Z,K,J,!!q);else if((U=="doubleClick"?kQZ:SQZ)(Z,K.pos,K.inside,J))J.preventDefault();else oz(Z,"pointer")};Zf=class Zf extends dN{constructor(Z,Q,J,q){super(Z);this.pos=Q,this.event=J,this.flushed=q,this.delayedSelectionSync=!1,this.startDoc=Z.state.doc,this.selectNode=!!J[eu],this.allowDefault=J.shiftKey;let G,U;if(Q.inside>-1)G=Z.state.doc.nodeAt(Q.inside),U=Q.inside;else{let F=Z.state.doc.resolve(Q.pos);G=F.parent,U=F.depth?F.before():0}let K=q?null:J.target,H=K?Z.docView.nearestDesc(K,!0):null;this.target=H&&H.nodeDOM.nodeType==1?H.nodeDOM:null;let{selection:B}=Z.state;if(J.button==0&&(G.type.spec.draggable&&G.type.spec.selectable!==!1||B instanceof SZ&&B.from<=U&&B.to>U))this.mightDrag={node:G,pos:U,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Nq&&!this.target.hasAttribute("contentEditable"))};if(this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)){if(this.view.domObserver.stop(),this.mightDrag.addAttr)this.target.draggable=!0;if(this.mightDrag.setUneditable)setTimeout(()=>{if(this.view.input.mouseDown==this)this.target.setAttribute("contentEditable","false")},20);this.view.domObserver.start()}oz(Z,"pointer")}done(){if(super.done(),this.mightDrag&&this.target){if(this.view.domObserver.stop(),this.mightDrag.addAttr)this.target.removeAttribute("draggable");if(this.mightDrag.setUneditable)this.target.removeAttribute("contentEditable");this.view.domObserver.start()}if(this.delayedSelectionSync)setTimeout(()=>{if(!this.view.isDestroyed)tz(this.view)})}up(Z){if(this.done(),!this.view.dom.contains(Z.target))return;let Q=this.pos;if(this.view.state.doc!=this.startDoc)Q=this.view.posAtCoords(aH(Z));if(this.updateAllowDefault(Z),this.allowDefault||!Q)oz(this.view,"pointer");else if(EQZ(this.view,Q.pos,Q.inside,Z,this.selectNode))Z.preventDefault();else if(Z.button==0&&(this.flushed||$J&&this.mightDrag&&!this.mightDrag.node.isAtom||OJ&&!this.view.state.selection.visible&&Math.min(Math.abs(Q.pos-this.view.state.selection.from),Math.abs(Q.pos-this.view.state.selection.to))<=2))rH(this.view,mZ.near(this.view.state.doc.resolve(Q.pos)),"pointer"),Z.preventDefault();else oz(this.view,"pointer")}move(Z){this.updateAllowDefault(Z),oz(this.view,"pointer"),super.move(Z)}updateAllowDefault(Z){if(!this.allowDefault&&(Math.abs(this.event.x-Z.clientX)>4||Math.abs(this.event.y-Z.clientY)>4))this.allowDefault=!0}delaySelUpdate(){if(!this.allowDefault)return!1;return this.delayedSelectionSync=!0,!0}};Qf=class Qf extends dN{constructor(Z,Q){super(Z);this.startSelection=Q,this.startDoc=Z.state.doc}move(Z){if(Z.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}Z.preventDefault(),oz(this.view,"pointer");let Q=this.view.posAtCoords(aH(Z)),J=Q&&tu(this.view,Q.inside,!1);if(!J)return;let{doc:q}=this.view.state,G=this.startSelection,[U,K]=J.from<G.from?[G.to,J.from]:[G.from,J.to];rH(this.view,DZ.create(q,U,K),"pointer")}};iJ.touchstart=(Z)=>{Z.input.lastTouch=Date.now(),pN(Z),oz(Z,"pointer")};iJ.touchmove=(Z)=>{Z.input.lastTouch=Date.now(),oz(Z,"pointer")};iJ.contextmenu=(Z)=>pN(Z);wQZ=rz?5000:-1;nJ.compositionstart=nJ.compositionupdate=(Z)=>{if(!Z.composing){Z.domObserver.flush();let{state:Q}=Z,J=Q.selection.$to;if(Q.selection instanceof DZ&&(Q.storedMarks||!J.textOffset&&J.parentOffset&&J.nodeBefore.marks.some((q)=>q.type.spec.inclusive===!1)||OJ&&$u&&xQZ(Z)))Z.markCursor=Z.state.storedMarks||J.marks(),ZB(Z,!0),Z.markCursor=null;else if(ZB(Z,!Q.selection.empty),Nq&&Q.selection.empty&&J.parentOffset&&!J.textOffset&&J.nodeBefore.marks.length){let q=Z.domSelectionRange();for(let{focusNode:G,focusOffset:U}=q;G&&G.nodeType==1&&U!=0;){let K=U<0?G.lastChild:G.childNodes[U-1];if(!K)break;if(K.nodeType==3){let H=Z.domSelection();if(H)H.collapse(K,K.nodeValue.length);break}else G=K,U=-1}}Z.input.composing=!0}Jf(Z,wQZ)};nJ.compositionend=(Z,Q)=>{if(Z.composing){if(Z.input.composing=!1,Z.input.compositionEndedAt=Date.now(),Z.input.compositionPendingChanges=Z.domObserver.pendingRecords().length?Z.input.compositionID:0,Z.input.compositionNode=null,Z.input.badSafariComposition)Z.domObserver.forceFlush();else if(Z.input.compositionPendingChanges)Promise.resolve().then(()=>Z.domObserver.flush());Z.input.compositionID++,Jf(Z,20)}};dH=BY&&E9<15||cK&&gZZ<604;iJ.copy=nJ.cut=(Z,Q)=>{let J=Q,q=Z.state.selection,G=J.type=="cut";if(q.empty)return;let U=dH?null:J.clipboardData,K=q.content(),{dom:H,text:B}=fN(Z,K);if(U)J.preventDefault(),U.clearData(),U.setData("text/html",H.innerHTML),U.setData("text/plain",B);else vQZ(Z,H);if(G)Z.dispatch(Z.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};nJ.paste=(Z,Q)=>{let J=Q;if(Z.composing&&!rz)return;let q=dH?null:J.clipboardData,G=Z.input.shiftKey&&Z.input.lastKeyCode!=45;if(q&&lH(Z,qf(q),q.getData("text/html"),G,J))J.preventDefault();else hQZ(Z,J)};uQZ=Aq?"altKey":"ctrlKey";iJ.dragstart=(Z,Q)=>{let J=Q,q=Z.input.mouseDown;if(q)q.done();if(!J.dataTransfer)return;let G=Z.state.selection,U=G.empty?null:Z.posAtCoords(aH(J)),K;if(U&&U.pos>=G.from&&U.pos<=(G instanceof SZ?G.to-1:G.to));else if(q&&q.mightDrag)K=SZ.create(Z.state.doc,q.mightDrag.pos);else if(J.target&&J.target.nodeType==1){let O=Z.docView.nearestDesc(J.target,!0);if(O&&O.node.type.spec.draggable&&O!=Z.docView)K=SZ.create(Z.state.doc,O.posBefore)}let H=(K||Z.state.selection).content(),{dom:B,text:F,slice:M}=fN(Z,H);if(!J.dataTransfer.files.length||!OJ||Du>120)J.dataTransfer.clearData();if(J.dataTransfer.setData(dH?"Text":"text/html",B.innerHTML),J.dataTransfer.effectAllowed="copyMove",!dH)J.dataTransfer.setData("text/plain",F);Z.dragging=new lN(M,Gf(Z,J),K)};iJ.dragend=(Z)=>{let Q=Z.dragging;window.setTimeout(()=>{if(Z.dragging==Q)Z.dragging=null},50)};nJ.dragover=nJ.dragenter=(Z,Q)=>Q.preventDefault();nJ.drop=(Z,Q)=>{try{fQZ(Z,Q,Z.dragging)}finally{Z.dragging=null}};iJ.focus=(Z)=>{if(Z.input.lastFocus=Date.now(),!Z.focused)Z.domObserver.stop(),Z.dom.classList.add("ProseMirror-focused"),Z.domObserver.start(),Z.focused=!0,setTimeout(()=>{if(Z.docView&&Z.hasFocus()&&!Z.domObserver.currentSelection.eq(Z.domSelectionRange()))tz(Z)},20)};iJ.blur=(Z,Q)=>{let J=Q;if(Z.focused){if(Z.domObserver.stop(),Z.dom.classList.remove("ProseMirror-focused"),Z.domObserver.start(),J.relatedTarget&&Z.dom.contains(J.relatedTarget))Z.domObserver.currentSelection.clear();Z.focused=!1}};iJ.beforeinput=(Z,Q)=>{if(rz&&Q.inputType=="deleteContentBackward"){Z.domObserver.flushSoon();let{domChangeCount:q}=Z.input;setTimeout(()=>{if(Z.input.domChangeCount!=q)return;if(Z.dom.blur(),Z.focus(),Z.someProp("handleKeyDown",(U)=>U(Z,A6(8,"Backspace"))))return;let{$cursor:G}=Z.state.selection;if(G&&G.pos>0)Z.dispatch(Z.state.tr.delete(G.pos-1,G.pos).scrollIntoView())},50)}};for(let Z in nJ)iJ[Z]=nJ[Z];fK=[],j6={};xQ.empty=new xQ([],[]);xQ.removeOverlap=nN;DJ=xQ.empty;pQZ={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},dQZ=BY&&E9<=11;Ou=new WeakMap;oQZ=/^(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;qB.prototype.dispatch=function(Z){let Q=this._props.dispatchTransaction;if(Q)Q.call(this,Z);else this.updateState(this.state.apply(Z))}});var x9=k(()=>{sN()});function Bf(Z){var Q=YXZ&&Z.metaKey&&Z.shiftKey&&!Z.ctrlKey&&!Z.altKey||qXZ&&Z.shiftKey&&Z.key&&Z.key.length==1||Z.key=="Unidentified",J=!Q&&Z.key||(Z.shiftKey?GB:ez)[Z.keyCode]||Z.key||"Unidentified";if(J=="Esc")J="Escape";if(J=="Del")J="Delete";if(J=="Left")J="ArrowLeft";if(J=="Up")J="ArrowUp";if(J=="Right")J="ArrowRight";if(J=="Down")J="ArrowDown";return J}var ez,GB,YXZ,qXZ,LX,LX,LX,oH;var _f=k(()=>{ez={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:"'"},GB={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},YXZ=typeof navigator<"u"&&/Mac/.test(navigator.platform),qXZ=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(LX=0;LX<10;LX++)ez[48+LX]=ez[96+LX]=String(LX);for(LX=1;LX<=24;LX++)ez[LX+111]="F"+LX;for(LX=65;LX<=90;LX++)ez[LX]=String.fromCharCode(LX+32),GB[LX]=String.fromCharCode(LX);for(oH in ez)if(!GB.hasOwnProperty(oH))GB[oH]=ez[oH]});function UXZ(Z){let Q=Z.split(/-(?!$)/),J=Q[Q.length-1];if(J=="Space")J=" ";let q,G,U,K;for(let H=0;H<Q.length-1;H++){let B=Q[H];if(/^(cmd|meta|m)$/i.test(B))K=!0;else if(/^a(lt)?$/i.test(B))q=!0;else if(/^(c|ctrl|control)$/i.test(B))G=!0;else if(/^s(hift)?$/i.test(B))U=!0;else if(/^mod$/i.test(B))if(GXZ)K=!0;else G=!0;else throw Error("Unrecognized modifier name: "+B)}if(q)J="Alt-"+J;if(G)J="Ctrl-"+J;if(K)J="Meta-"+J;if(U)J="Shift-"+J;return J}function KXZ(Z){let Q=Object.create(null);for(let J in Z)Q[UXZ(J)]=Z[J];return Q}function aN(Z,Q,J=!0){if(Q.altKey)Z="Alt-"+Z;if(Q.ctrlKey)Z="Ctrl-"+Z;if(Q.metaKey)Z="Meta-"+Z;if(J&&Q.shiftKey)Z="Shift-"+Z;return Z}function Ff(Z){return new lZ({props:{handleKeyDown:tH(Z)}})}function tH(Z){let Q=KXZ(Z);return function(J,q){let G=Bf(q),U,K=Q[aN(G,q)];if(K&&K(J.state,J.dispatch,J))return!0;if(G.length==1&&G!=" "){if(q.shiftKey){let H=Q[aN(G,q,!1)];if(H&&H(J.state,J.dispatch,J))return!0}if((q.altKey||q.metaKey||q.ctrlKey)&&!(zXZ&&q.ctrlKey&&q.altKey)&&(U=ez[q.keyCode])&&U!=G){let H=Q[aN(U,q)];if(H&&H(J.state,J.dispatch,J))return!0}}return!1}}var GXZ,zXZ;var zB=k(()=>{_f();nz();GXZ=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),zXZ=typeof navigator<"u"&&/Win/.test(navigator.platform)});var Lf=k(()=>{zB()});function LB(Z){let{state:Q,transaction:J}=Z,{selection:q}=J,{doc:G}=J,{storedMarks:U}=J;return{...Q,apply:Q.apply.bind(Q),applyTransaction:Q.applyTransaction.bind(Q),plugins:Q.plugins,schema:Q.schema,reconfigure:Q.reconfigure.bind(Q),toJSON:Q.toJSON.bind(Q),get storedMarks(){return U},get selection(){return q},get doc(){return G},get tr(){return q=J.selection,G=J.doc,U=J.storedMarks,J}}}function jX(Z,Q){if(typeof Z==="string"){if(!Q.nodes[Z])throw Error(`There is no node type named '${Z}'. Maybe you forgot to add the extension?`);return Q.nodes[Z]}return Z}function Jj(Z){return Object.prototype.toString.call(Z)==="[object RegExp]"}function _B(Z,Q,J={strict:!0}){let q=Object.keys(Q);if(!q.length)return!0;return q.every((G)=>{if(J.strict)return Q[G]===Z[G];if(Jj(Q[G]))return Q[G].test(Z[G]);return Q[G]===Z[G]})}function $f(Z,Q,J={}){return Z.find((q)=>{return q.type===Q&&_B(Object.fromEntries(Object.keys(J).map((G)=>[G,q.attrs[G]])),J)})}function Of(Z,Q,J={}){return!!$f(Z,Q,J)}function Yj(Z,Q,J){if(!Z||!Q)return;let q=Z.parent.childAfter(Z.parentOffset);if(!q.node||!q.node.marks.some((F)=>F.type===Q))q=Z.parent.childBefore(Z.parentOffset);if(!q.node||!q.node.marks.some((F)=>F.type===Q))return;if(!J){let F=q.node.marks.find((M)=>M.type===Q);if(F)J=F.attrs}if(!$f([...q.node.marks],Q,J))return;let U=q.index,K=Z.start()+q.offset,H=U+1,B=K+q.node.nodeSize;while(U>0&&Of([...Z.parent.child(U-1).marks],Q,J))U-=1,K-=Z.parent.child(U).nodeSize;while(H<Z.parent.childCount&&Of([...Z.parent.child(H).marks],Q,J))B+=Z.parent.child(H).nodeSize,H+=1;return{from:K,to:B}}function Q0(Z,Q){if(typeof Z==="string"){if(!Q.marks[Z])throw Error(`There is no mark type named '${Z}'. Maybe you forgot to add the extension?`);return Q.marks[Z]}return Z}function OB(Z){return Z instanceof DZ}function Z0(Z=0,Q=0,J=0){return Math.min(Math.max(Z,Q),J)}function eN(Z,Q=null){if(!Q)return null;let J=mZ.atStart(Z),q=mZ.atEnd(Z);if(Q==="start"||Q===!0)return J;if(Q==="end")return q;let G=J.from,U=q.to;if(Q==="all")return DZ.create(Z,Z0(0,G,U),Z0(Z.content.size,G,U));return DZ.create(Z,Z0(Q,G,U),Z0(Q,G,U))}function Vf(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function FB(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function DXZ(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}function UB(Z){if(typeof window>"u")throw Error("[tiptap error]: there is no window object available, so this function cannot be used");let Q=`<body>${Z}</body>`,J=new window.DOMParser().parseFromString(Q,"text/html").body;return Ef(J)}function dK(Z,Q,J){if(Z instanceof lJ||Z instanceof UZ)return Z;J={slice:!0,parseOptions:{},...J};let q=typeof Z==="object"&&Z!==null,G=typeof Z==="string";if(q)try{if(Array.isArray(Z)&&Z.length>0)return UZ.fromArray(Z.map((H)=>Q.nodeFromJSON(H)));let K=Q.nodeFromJSON(Z);if(J.errorOnInvalidContent)K.check();return K}catch(U){if(J.errorOnInvalidContent)throw Error("[tiptap error]: Invalid JSON content",{cause:U});return console.warn("[tiptap warn]: Invalid content.","Passed value:",Z,"Error:",U),dK("",Q,J)}if(G){if(J.errorOnInvalidContent){let K=!1,H="",B=new xH({topNode:Q.spec.topNode,marks:Q.spec.marks,nodes:Q.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:(F)=>{return K=!0,H=typeof F==="string"?F:F.outerHTML,null}}]}})});if(J.slice)Lq.fromSchema(B).parseSlice(UB(Z),J.parseOptions);else Lq.fromSchema(B).parse(UB(Z),J.parseOptions);if(J.errorOnInvalidContent&&K)throw Error("[tiptap error]: Invalid HTML content",{cause:Error(`Invalid element found: ${H}`)})}let U=Lq.fromSchema(Q);if(J.slice)return U.parseSlice(UB(Z),J.parseOptions).content;return U.parse(UB(Z),J.parseOptions)}return dK("",Q,J)}function kf(Z,Q,J){let q=Z.steps.length-1;if(q<Q)return;let G=Z.steps[q];if(!(G instanceof FX||G instanceof NX))return;let U=Z.mapping.maps[q],K=0;U.forEach((H,B,F,M)=>{if(K===0)K=M}),Z.setSelection(mZ.near(Z.doc.resolve(K),J))}function Sf(Z){for(let Q=0;Q<Z.edgeCount;Q+=1){let{type:J}=Z.edge(Q);if(J.isTextblock&&!J.hasRequiredAttrs())return J}return null}function yf(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function cXZ(Z){let Q=Z.split(/-(?!$)/),J=Q[Q.length-1];if(J==="Space")J=" ";let q,G,U,K;for(let H=0;H<Q.length-1;H+=1){let B=Q[H];if(/^(cmd|meta|m)$/i.test(B))K=!0;else if(/^a(lt)?$/i.test(B))q=!0;else if(/^(c|ctrl|control)$/i.test(B))G=!0;else if(/^s(hift)?$/i.test(B))U=!0;else if(/^mod$/i.test(B))if(FB()||yf())K=!0;else G=!0;else throw Error(`Unrecognized modifier name: ${B}`)}if(q)J=`Alt-${J}`;if(G)J=`Ctrl-${J}`;if(K)J=`Meta-${J}`;if(U)J=`Shift-${J}`;return J}function rG(Z,Q,J={}){let{from:q,to:G,empty:U}=Z.selection,K=Q?jX(Q,Z.schema):null,H=[];Z.doc.nodesBetween(q,G,(O,V)=>{if(O.isText)return;let A=Math.max(q,V),N=Math.min(G,V+O.nodeSize);H.push({node:O,from:A,to:N})});let B=G-q,F=H.filter((O)=>{if(!K)return!0;return K.name===O.node.type.name}).filter((O)=>_B(O.node.attrs,J,{strict:!1}));if(U)return!!F.length;return F.reduce((O,V)=>O+V.to-V.from,0)>=B}function VB(Z,Q){if(Q.nodes[Z])return"node";if(Q.marks[Z])return"mark";return null}function Af(Z,Q){let J=typeof Q==="string"?[Q]:Q;return Object.keys(Z).reduce((q,G)=>{if(!J.includes(G))q[G]=Z[G];return q},{})}function Zj(Z,Q,J={},q={}){return dK(Z,Q,{slice:!1,parseOptions:J,errorOnInvalidContent:q.errorOnInvalidContent})}function wf(Z,Q){let J=Q0(Q,Z.schema),{from:q,to:G,empty:U}=Z.selection,K=[];if(U){if(Z.storedMarks)K.push(...Z.storedMarks);K.push(...Z.selection.$head.marks())}else Z.doc.nodesBetween(q,G,(B)=>{K.push(...B.marks)});let H=K.find((B)=>B.type.name===J.name);if(!H)return{};return{...H.attrs}}function qj(Z,Q){let J=new uH(Z);return Q.forEach((q)=>{q.steps.forEach((G)=>{J.step(G)})}),J}function xf(Z,Q,J){let q=[];return Z.nodesBetween(Q.from,Q.to,(G,U)=>{if(J(G))q.push({node:G,pos:U})}),q}function JJZ(Z,Q){for(let J=Z.depth;J>0;J-=1){let q=Z.node(J);if(Q(q))return{pos:J>0?Z.before(J):0,start:Z.start(J),depth:J,node:q}}}function AB(Z){return(Q)=>JJZ(Q.$from,Z)}function uZ(Z,Q,J){if(Z.config[Q]===void 0&&Z.parent)return uZ(Z.parent,Q,J);if(typeof Z.config[Q]==="function")return Z.config[Q].bind({...J,parent:Z.parent?uZ(Z.parent,Q,J):null});return Z.config[Q]}function Gj(Z){return Z.map((Q)=>{let J={name:Q.name,options:Q.options,storage:Q.storage},q=uZ(Q,"addExtensions",J);if(q)return[Q,...Gj(q())];return Q}).flat(10)}function zj(Z,Q){let J=sG.fromSchema(Q).serializeFragment(Z),G=document.implementation.createHTMLDocument().createElement("div");return G.appendChild(J),G.innerHTML}function bf(Z){return typeof Z==="function"}function gQ(Z,Q=void 0,...J){if(bf(Z)){if(Q)return Z.bind(Q)(...J);return Z(...J)}return Z}function YJZ(Z={}){return Object.keys(Z).length===0&&Z.constructor===Object}function lK(Z){let Q=Z.filter((G)=>G.type==="extension"),J=Z.filter((G)=>G.type==="node"),q=Z.filter((G)=>G.type==="mark");return{baseExtensions:Q,nodeExtensions:J,markExtensions:q}}function vf(Z){let Q=[],{nodeExtensions:J,markExtensions:q}=lK(Z),G=[...J,...q],U={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},K=J.filter((F)=>F.name!=="text").map((F)=>F.name),H=q.map((F)=>F.name),B=[...K,...H];return Z.forEach((F)=>{let M={name:F.name,options:F.options,storage:F.storage,extensions:G},O=uZ(F,"addGlobalAttributes",M);if(!O)return;O().forEach((A)=>{let N;if(Array.isArray(A.types))N=A.types;else if(A.types==="*")N=B;else if(A.types==="nodes")N=K;else if(A.types==="marks")N=H;else N=[];N.forEach((T)=>{Object.entries(A.attributes).forEach(([P,C])=>{Q.push({type:T,name:P,attribute:{...U,...C}})})})})}),G.forEach((F)=>{let M={name:F.name,options:F.options,storage:F.storage},O=uZ(F,"addAttributes",M);if(!O)return;let V=O();Object.entries(V).forEach(([A,N])=>{let T={...U,...N};if(typeof(T==null?void 0:T.default)==="function")T.default=T.default();if((T==null?void 0:T.isRequired)&&(T==null?void 0:T.default)===void 0)delete T.default;Q.push({type:F.name,name:A,attribute:T})})}),Q}function qJZ(Z){let Q=[],J="",q=!1,G=!1,U=0,K=Z.length;for(let H=0;H<K;H+=1){let B=Z[H];if(B==="'"&&!G){q=!q,J+=B;continue}if(B==='"'&&!q){G=!G,J+=B;continue}if(!q&&!G){if(B==="("){U+=1,J+=B;continue}if(B===")"&&U>0){U-=1,J+=B;continue}if(B===";"&&U===0){Q.push(J),J="";continue}}J+=B}if(J)Q.push(J);return Q}function If(Z){let Q=[],J=qJZ(Z||""),q=J.length;for(let G=0;G<q;G+=1){let U=J[G],K=U.indexOf(":");if(K===-1)continue;let H=U.slice(0,K).trim(),B=U.slice(K+1).trim();if(H&&B)Q.push([H,B])}return Q}function IQ(...Z){return Z.filter((Q)=>!!Q).reduce((Q,J)=>{let q={...Q};return Object.entries(J).forEach(([G,U])=>{if(!q[G]){q[G]=U;return}if(G==="class"){let H=U?String(U).split(" "):[],B=q[G]?q[G].split(" "):[],F=H.filter((M)=>!B.includes(M));q[G]=[...B,...F].join(" ")}else if(G==="style"){let H=new Map([...If(q[G]),...If(U)]);q[G]=Array.from(H.entries()).map(([B,F])=>`${B}: ${F}`).join("; ")}else q[G]=U}),q},{})}function iK(Z,Q){return Q.filter((J)=>J.type===Z.type.name).filter((J)=>J.attribute.rendered).map((J)=>{if(!J.attribute.renderHTML)return{[J.name]:Z.attrs[J.name]};return J.attribute.renderHTML(Z.attrs)||{}}).reduce((J,q)=>IQ(J,q),{})}function GJZ(Z){if(typeof Z!=="string")return Z;if(Z.match(/^[+-]?(?:\d*\.)?\d+$/))return Number(Z);if(Z==="true")return!0;if(Z==="false")return!1;return Z}function Nf(Z,Q){if("style"in Z)return Z;return{...Z,getAttrs:(J)=>{let q=Z.getAttrs?Z.getAttrs(J):Z.attrs;if(q===!1)return!1;let G=Q.reduce((U,K)=>{let H=K.attribute.parseHTML?K.attribute.parseHTML(J):GJZ(J.getAttribute(K.name));if(H===null||H===void 0)return U;return{...U,[K.name]:H}},{});return{...q,...G}}}}function jf(Z){return Object.fromEntries(Object.entries(Z).filter(([Q,J])=>{if(Q==="attrs"&&YJZ(J))return!1;return J!==null&&J!==void 0}))}function Tf(Z){var Q,J;let q={};if(!((Q=Z==null?void 0:Z.attribute)==null?void 0:Q.isRequired)&&"default"in((Z==null?void 0:Z.attribute)||{}))q.default=Z.attribute.default;if(((J=Z==null?void 0:Z.attribute)==null?void 0:J.validate)!==void 0)q.validate=Z.attribute.validate;return[Z.name,q]}function zJZ(Z,Q){var J;let q=vf(Z),{nodeExtensions:G,markExtensions:U}=lK(Z),K=(J=G.find((F)=>uZ(F,"topNode")))==null?void 0:J.name,H=Object.fromEntries(G.map((F)=>{let M=q.filter((C)=>C.type===F.name),O={name:F.name,options:F.options,storage:F.storage,editor:Q},V=Z.reduce((C,y)=>{let f=uZ(y,"extendNodeSchema",O);return{...C,...f?f(F):{}}},{}),A=jf({...V,content:gQ(uZ(F,"content",O)),marks:gQ(uZ(F,"marks",O)),group:gQ(uZ(F,"group",O)),inline:gQ(uZ(F,"inline",O)),atom:gQ(uZ(F,"atom",O)),selectable:gQ(uZ(F,"selectable",O)),draggable:gQ(uZ(F,"draggable",O)),code:gQ(uZ(F,"code",O)),whitespace:gQ(uZ(F,"whitespace",O)),linebreakReplacement:gQ(uZ(F,"linebreakReplacement",O)),defining:gQ(uZ(F,"defining",O)),isolating:gQ(uZ(F,"isolating",O)),attrs:Object.fromEntries(M.map(Tf))}),N=gQ(uZ(F,"parseHTML",O));if(N)A.parseDOM=N.map((C)=>Nf(C,M));let T=uZ(F,"renderHTML",O);if(T)A.toDOM=(C)=>T({node:C,HTMLAttributes:iK(C,M)});let P=uZ(F,"renderText",O);if(P)A.toText=P;return[F.name,A]})),B=Object.fromEntries(U.map((F)=>{let M=q.filter((P)=>P.type===F.name),O={name:F.name,options:F.options,storage:F.storage,editor:Q},V=Z.reduce((P,C)=>{let y=uZ(C,"extendMarkSchema",O);return{...P,...y?y(F):{}}},{}),A=jf({...V,inclusive:gQ(uZ(F,"inclusive",O)),excludes:gQ(uZ(F,"excludes",O)),group:gQ(uZ(F,"group",O)),spanning:gQ(uZ(F,"spanning",O)),code:gQ(uZ(F,"code",O)),attrs:Object.fromEntries(M.map(Tf))}),N=gQ(uZ(F,"parseHTML",O));if(N)A.parseDOM=N.map((P)=>Nf(P,M));let T=uZ(F,"renderHTML",O);if(T)A.toDOM=(P)=>T({mark:P,HTMLAttributes:iK(P,M)});return[F.name,A]}));return new xH({topNode:K,nodes:H,marks:B})}function UJZ(Z){let Q=Z.filter((J,q)=>Z.indexOf(J)!==q);return Array.from(new Set(Q))}function Z7(Z){return Z.sort((J,q)=>{let G=uZ(J,"priority")||100,U=uZ(q,"priority")||100;if(G>U)return-1;if(G<U)return 1;return 0})}function gf(Z){let Q=Z7(Gj(Z)),J=UJZ(Q.map((q)=>q.name));if(J.length)console.warn(`[tiptap warn]: Duplicate extension names found: [${J.map((q)=>`'${q}'`).join(", ")}]. This can lead to issues.`);return Q}function hf(Z,Q,J){let{from:q,to:G}=Q,{blockSeparator:U=`
|
|
261
|
+
|
|
262
|
+
`,textSerializers:K={}}=J||{},H="";return Z.nodesBetween(q,G,(B,F,M,O)=>{var V;if(B.isBlock&&F>q)H+=U;let A=K==null?void 0:K[B.type.name];if(A){if(M)H+=A({node:B,pos:F,parent:M,index:O,range:Q});return!1}if(B.isText)H+=(V=B==null?void 0:B.text)==null?void 0:V.slice(Math.max(q,F)-F,G-F)}),H}function Uj(Z,Q){let J={from:0,to:Z.content.size};return hf(Z,J,Q)}function IB(Z){return Object.fromEntries(Object.entries(Z.nodes).filter(([,Q])=>Q.spec.toText).map(([Q,J])=>[Q,J.spec.toText]))}function KJZ(Z,Q){let J=jX(Q,Z.schema),{from:q,to:G}=Z.selection,U=[];Z.doc.nodesBetween(q,G,(H)=>{U.push(H)});let K=U.reverse().find((H)=>H.type.name===J.name);if(!K)return{};return{...K.attrs}}function Kj(Z,Q){let J=VB(typeof Q==="string"?Q:Q.name,Z.schema);if(J==="node")return KJZ(Z,Q);if(J==="mark")return wf(Z,Q);return{}}function HJZ(Z,Q=JSON.stringify){let J={};return Z.filter((q)=>{let G=Q(q);return Object.prototype.hasOwnProperty.call(J,G)?!1:J[G]=!0})}function WJZ(Z){let Q=HJZ(Z);return Q.length===1?Q:Q.filter((J,q)=>{return!Q.filter((U,K)=>K!==q).some((U)=>{return J.oldRange.from>=U.oldRange.from&&J.oldRange.to<=U.oldRange.to&&J.newRange.from>=U.newRange.from&&J.newRange.to<=U.newRange.to})})}function Q7(Z){let{mapping:Q,steps:J}=Z,q=[];return Q.maps.forEach((G,U)=>{let K=[];if(!G.ranges.length){let{from:H,to:B}=J[U];if(H===void 0||B===void 0)return;K.push({from:H,to:B})}else G.forEach((H,B)=>{K.push({from:H,to:B})});K.forEach(({from:H,to:B})=>{let F=Q.slice(U).map(H,-1),M=Q.slice(U).map(B),O=Q.invert().map(F,-1),V=Q.invert().map(M);q.push({oldRange:{from:O,to:V},newRange:{from:F,to:M}})})}),WJZ(q)}function NB(Z,Q,J){let q=[];if(Z===Q)J.resolve(Z).marks().forEach((G)=>{let U=J.resolve(Z),K=Yj(U,G.type);if(!K)return;q.push({mark:G,...K})});else J.nodesBetween(Z,Q,(G,U)=>{if(!G||(G==null?void 0:G.nodeSize)===void 0)return;q.push(...G.marks.map((K)=>({from:U,to:U+G.nodeSize,mark:K})))});return q}function eH(Z,Q){return Q.nodes[Z]||Q.marks[Z]||null}function BB(Z,Q,J){return Object.fromEntries(Object.entries(J).filter(([q])=>{let G=Z.find((U)=>{return U.type===Q&&U.name===q});if(!G)return!1;return G.attribute.keepOnSplit}))}function Qj(Z,Q,J={}){let{empty:q,ranges:G}=Z.selection,U=Q?Q0(Q,Z.schema):null;if(q)return!!(Z.storedMarks||Z.selection.$from.marks()).filter((O)=>{if(!U)return!0;return U.name===O.type.name}).find((O)=>_B(O.attrs,J,{strict:!1}));let K=0,H=[];if(G.forEach(({$from:O,$to:V})=>{let A=O.pos,N=V.pos;Z.doc.nodesBetween(A,N,(T,P)=>{if(U&&T.inlineContent&&!T.type.allowsMarkType(U))return!1;if(!T.isText&&!T.marks.length)return;let C=Math.max(A,P),y=Math.min(N,P+T.nodeSize),f=y-C;K+=f,H.push(...T.marks.map((u)=>({mark:u,from:C,to:y})))})}),K===0)return!1;let B=H.filter((O)=>{if(!U)return!0;return U.name===O.mark.type.name}).filter((O)=>_B(O.mark.attrs,J,{strict:!1})).reduce((O,V)=>O+V.to-V.from,0),F=H.filter((O)=>{if(!U)return!0;return O.mark.type!==U&&O.mark.type.excludes(U)}).reduce((O,V)=>O+V.to-V.from,0);return(B>0?B+F:B)>=K}function _JZ(Z,Q,J={}){if(!Q)return rG(Z,null,J)||Qj(Z,null,J);let q=VB(Q,Z.schema);if(q==="node")return rG(Z,Q,J);if(q==="mark")return Qj(Z,Q,J);return!1}function Pf(Z,Q){if(Array.isArray(Q))return Q.some((J)=>{return(typeof J==="string"?J:J.name)===Z.name});return Q}function rN(Z,Q){let{nodeExtensions:J}=lK(Q),q=J.find((K)=>K.name===Z);if(!q)return!1;let G={name:q.name,options:q.options,storage:q.storage},U=gQ(uZ(q,"group",G));if(typeof U!=="string")return!1;return U.split(" ").includes("list")}function nK(Z,{checkChildren:Q=!0,ignoreWhitespace:J=!1}={}){var q;if(J){if(Z.type.name==="hardBreak")return!0;if(Z.isText)return!/\S/.test((q=Z.text)!=null?q:"")}if(Z.isText)return!Z.text;if(Z.isAtom||Z.isLeaf)return!1;if(Z.content.childCount===0)return!0;if(Q){let G=!0;return Z.content.forEach((U)=>{if(G===!1)return;if(!nK(U,{ignoreWhitespace:J,checkChildren:Q}))G=!1}),G}return!1}function jB(Z){return Z instanceof SZ}function FJZ(Z,Q){let J=Q.mapping.mapResult(Z.position);return{position:new cf(J.pos),mapResult:J}}function LJZ(Z){return new cf(Z)}function TB(Z,Q,J){let G=Z.state.doc.content.size,U=Z0(Q,0,G),K=Z0(J,0,G),H=Z.coordsAtPos(U),B=Z.coordsAtPos(K,-1),F=Math.min(H.top,B.top),M=Math.max(H.bottom,B.bottom),O=Math.min(H.left,B.left),V=Math.max(H.right,B.right),A=V-O,N=M-F,C={top:F,bottom:M,left:O,right:V,width:A,height:N,x:O,y:F};return{...C,toJSON:()=>C}}function MJZ(Z,Q,J){var q;let{selection:G}=Q,U=null;if(OB(G))U=G.$cursor;if(U){let H=(q=Z.storedMarks)!=null?q:U.marks();return U.parent.type.allowsMarkType(J)&&(!!J.isInSet(H)||!H.some((F)=>F.type.excludes(J)))}let{ranges:K}=G;return K.some(({$from:H,$to:B})=>{let F=H.depth===0?Z.doc.inlineContent&&Z.doc.type.allowsMarkType(J):!1;return Z.doc.nodesBetween(H.pos,B.pos,(M,O,V)=>{if(F)return!1;if(M.isInline){let A=!V||V.type.allowsMarkType(J),N=!!J.isInSet(M.marks)||!M.marks.some((T)=>T.type.excludes(J));F=A&&N}return!F}),F})}function Rf(Z,Q){let J=Z.storedMarks||Z.selection.$to.parentOffset&&Z.selection.$from.marks();if(J){let q=J.filter((G)=>Q==null?void 0:Q.includes(G.type.name));Z.tr.ensureMarks(q)}}function Cf(Z){return!Z||Z==="1"?null:Z}function pf(Z,Q){return Cf(Z)===Cf(Q)}function CJZ(Z){let Q=Z.doc,J=Q.firstChild;if(!J)return null;let q=Q.resolve(1),G=Q.resolve(J.nodeSize-1);return DZ.between(q,G)}function df(Z,Q){let{selection:J}=Z,{$from:q}=J;if(J instanceof SZ){let U=q.index();return q.parent.canReplaceWith(U,U+1,Q)}let G=q.depth;while(G>=0){let U=q.index(G);if(q.node(G).contentMatchAt(U).matchType(Q))return!0;G-=1}return!1}function uJZ(Z,Q,J){let q=document.querySelector(`style[data-tiptap-style${J?`-${J}`:""}]`);if(q!==null)return q;let G=document.createElement("style");if(Q)G.setAttribute("nonce",Q);return G.setAttribute(`data-tiptap-style${J?`-${J}`:""}`,""),G.innerHTML=Z,document.getElementsByTagName("head")[0].appendChild(G),G}function lf(Z,Q){let J=Z.getAttribute("style");if(!J)return null;let q=J.split(";").map((U)=>U.trim()).filter(Boolean),G=Q.toLowerCase();for(let U=q.length-1;U>=0;U-=1){let K=q[U],H=K.indexOf(":");if(H===-1)continue;if(K.slice(0,H).trim().toLowerCase()===G)return K.slice(H+1).trim()}return null}function fJZ(Z){return typeof Z==="number"}function mJZ(Z){return Object.prototype.toString.call(Z).slice(8,-1)}function KB(Z){if(mJZ(Z)!=="Object")return!1;return Z.constructor===Object&&Object.getPrototypeOf(Z)===Object.prototype}function Hj(Z){if(!(Z==null?void 0:Z.trim()))return{};let Q={},J=[],q=Z.replace(/["']([^"']*)["']/g,(F)=>{return J.push(F),`__QUOTED_${J.length-1}__`}),G=q.match(/(?:^|\s)\.([\w-]+)/g);if(G){let F=G.map((M)=>M.trim().slice(1));Q.class=F.join(" ")}let U=q.match(/(?:^|\s)#([\w-]+)/);if(U)Q.id=U[1];let K=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(q.matchAll(K)).forEach(([,F,M])=>{var O;let V=parseInt(((O=M.match(/__QUOTED_(\d+)__/))==null?void 0:O[1])||"0",10),A=J[V];if(A)Q[F]=A.slice(1,-1)});let B=q.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();if(B)B.split(/\s+/).filter(Boolean).forEach((M)=>{if(M.match(/^[a-zA-Z][\w-]*$/))Q[M]=!0});return Q}function Wj(Z){if(!Z||Object.keys(Z).length===0)return"";let Q=[];if(Z.class)String(Z.class).split(/\s+/).filter(Boolean).forEach((q)=>Q.push(`.${q}`));if(Z.id)Q.push(`#${Z.id}`);return Object.entries(Z).forEach(([J,q])=>{if(J==="class"||J==="id")return;if(q===!0)Q.push(J);else if(q!==!1&&q!=null)Q.push(`${J}="${String(q)}"`)}),Q.join(" ")}function pJZ(Z){let{nodeName:Q,name:J,parseAttributes:q=Hj,serializeAttributes:G=Wj,defaultAttributes:U={},requiredAttributes:K=[],allowedAttributes:H}=Z,B=J||Q,F=(M)=>{if(!H)return M;let O={};return H.forEach((V)=>{if(V in M)O[V]=M[V]}),O};return{parseMarkdown:(M,O)=>{let V={...U,...M.attributes};return O.createNode(Q,V,[])},markdownTokenizer:{name:Q,level:"block",start(M){var O;let V=new RegExp(`^:::${B}(?:\\s|$)`,"m"),A=(O=M.match(V))==null?void 0:O.index;return A!==void 0?A:-1},tokenize(M,O,V){let A=new RegExp(`^:::${B}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),N=M.match(A);if(!N)return;let T=N[1]||"",P=q(T);if(K.find((y)=>!(y in P)))return;return{type:Q,raw:N[0],attributes:P}}},renderMarkdown:(M)=>{let O=F(M.attrs||{}),V=G(O),A=V?` {${V}}`:"";return`:::${B}${A} :::`}}}function dJZ(Z){let{nodeName:Q,name:J,getContent:q,parseAttributes:G=Hj,serializeAttributes:U=Wj,defaultAttributes:K={},content:H="block",allowedAttributes:B}=Z,F=J||Q,M=(O)=>{if(!B)return O;let V={};return B.forEach((A)=>{if(A in O)V[A]=O[A]}),V};return{parseMarkdown:(O,V)=>{let A;if(q){let T=q(O);A=typeof T==="string"?[{type:"text",text:T}]:T}else if(H==="block")A=V.parseChildren(O.tokens||[]);else A=V.parseInline(O.tokens||[]);let N={...K,...O.attributes};return V.createNode(Q,N,A)},markdownTokenizer:{name:Q,level:"block",start(O){var V;let A=new RegExp(`^:::${F}`,"m"),N=(V=O.match(A))==null?void 0:V.index;return N!==void 0?N:-1},tokenize(O,V,A){var N;let T=new RegExp(`^:::${F}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),P=O.match(T);if(!P)return;let[C,y=""]=P,f=G(y),u=1,n=C.length,e="",a=/^:::([\w-]*)(\s.*)?/gm,c=O.slice(n);a.lastIndex=0;for(;;){let GZ=a.exec(c);if(GZ===null)break;let s=GZ.index,LZ=GZ[1];if((N=GZ[2])==null?void 0:N.endsWith(":::"))continue;if(LZ)u+=1;else if(u-=1,u===0){let HZ=c.slice(0,s);e=HZ.trim();let KZ=O.slice(0,n+s+GZ[0].length),v=[];if(e)if(H==="block"){v=A.blockTokens(HZ),v.forEach((i)=>{if(i.text&&(!i.tokens||i.tokens.length===0))i.tokens=A.inlineTokens(i.text)});while(v.length>0){let i=v[v.length-1];if(i.type==="paragraph"&&(!i.text||i.text.trim()===""))v.pop();else break}}else v=A.inlineTokens(e);return{type:Q,raw:KZ,attributes:f,content:e,tokens:v}}}return}},renderMarkdown:(O,V)=>{let A=M(O.attrs||{}),N=U(A),T=N?` {${N}}`:"",P=V.renderChildren(O.content||[],`
|
|
263
|
+
|
|
264
|
+
`);return`:::${F}${T}
|
|
265
|
+
|
|
266
|
+
${P}
|
|
267
|
+
|
|
268
|
+
:::`}}}function lJZ(Z){if(!Z.trim())return{};let Q={},J=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,q=J.exec(Z);while(q!==null){let[,G,U,K]=q;Q[G]=U||K,q=J.exec(Z)}return Q}function iJZ(Z){return Object.entries(Z).filter(([,Q])=>Q!==void 0&&Q!==null).map(([Q,J])=>`${Q}="${J}"`).join(" ")}function nJZ(Z){let{nodeName:Q,name:J,getContent:q,parseAttributes:G=lJZ,serializeAttributes:U=iJZ,defaultAttributes:K={},selfClosing:H=!1,allowedAttributes:B}=Z,F=J||Q,M=(V)=>{if(!B)return V;let A={};return B.forEach((N)=>{let T=typeof N==="string"?N:N.name,P=typeof N==="string"?void 0:N.skipIfDefault;if(T in V){let C=V[T];if(P!==void 0&&C===P)return;A[T]=C}}),A},O=F.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(V,A)=>{let N={...K,...V.attributes};if(H)return A.createNode(Q,N);let T=q?q(V):V.content||"";if(T)return A.createNode(Q,N,[A.createTextNode(T)]);return A.createNode(Q,N,[])},markdownTokenizer:{name:Q,level:"inline",start(V){let A=H?new RegExp(`\\[${O}\\s*[^\\]]*\\]`):new RegExp(`\\[${O}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${O}\\]`),N=V.match(A),T=N==null?void 0:N.index;return T!==void 0?T:-1},tokenize(V,A,N){let T=H?new RegExp(`^\\[${O}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${O}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${O}\\]`),P=V.match(T);if(!P)return;let C="",y="";if(H){let[,u]=P;y=u}else{let[,u,n]=P;y=u,C=n||""}let f=G(y.trim());return{type:Q,raw:P[0],content:C.trim(),attributes:f}}},renderMarkdown:(V)=>{let A="";if(q)A=q(V);else if(V.content&&V.content.length>0)A=V.content.filter((C)=>C.type==="text").map((C)=>C.text).join("");let N=M(V.attrs||{}),T=U(N),P=T?` ${T}`:"";if(H)return`[${F}${P}]`;return`[${F}${P}]${A}[/${F}]`}}}function PB(Z,Q,J){var q,G,U,K;let H=Z.split(`
|
|
269
|
+
`),B=[],F="",M=0,O=Q.baseIndentSize||2;while(M<H.length){let V=H[M],A=V.match(Q.itemPattern);if(!A)if(B.length>0)break;else if(V.trim()===""){M+=1,F=`${F}${V}
|
|
270
|
+
`;continue}else return;let N=Q.extractItemData(A),{indentLevel:T,mainContent:P}=N;F=`${F}${V}
|
|
271
|
+
`;let C=[P];M+=1;while(M<H.length){let n=H[M];if(n.trim()===""){let a=H.slice(M+1).findIndex((s)=>s.trim()!=="");if(a===-1)break;if((((G=(q=H[M+1+a].match(/^(\s*)/))==null?void 0:q[1])==null?void 0:G.length)||0)>T){C.push(n),F=`${F}${n}
|
|
272
|
+
`,M+=1;continue}else break}if((((K=(U=n.match(/^(\s*)/))==null?void 0:U[1])==null?void 0:K.length)||0)>T)C.push(n),F=`${F}${n}
|
|
273
|
+
`,M+=1;else break}let y,f=C.slice(1);if(f.length>0){let n=f.map((e)=>e.slice(T+O)).join(`
|
|
274
|
+
`);if(n.trim())if(Q.customNestedParser)y=Q.customNestedParser(n);else y=J.blockTokens(n)}let u=Q.createToken(N,y);B.push(u)}if(B.length===0)return;return{items:B,raw:F}}function X7(Z,Q,J,q){if(!Z||!Array.isArray(Z.content))return"";let G=typeof J==="function"?J(q):J,[U,...K]=Z.content,H=Q.renderChildren([U]),B=`${G}${H}`;if(K&&K.length>0)K.forEach((F,M)=>{var O,V;let A=(V=(O=Q.renderChild)==null?void 0:O.call(Q,F,M+1))!=null?V:Q.renderChildren([F]);if(A!==void 0&&A!==null){let N=A.split(`
|
|
275
|
+
`).map((T)=>T?Q.indent(T):Q.indent("")).join(`
|
|
276
|
+
`);B+=F.type==="paragraph"?`
|
|
277
|
+
|
|
278
|
+
${N}`:`
|
|
279
|
+
${N}`}});return B}function nf(Z,Q){let J={...Z};if(KB(Z)&&KB(Q))Object.keys(Q).forEach((q)=>{if(KB(Q[q])&&KB(Z[q]))J[q]=nf(Z[q],Q[q]);else J[q]=Q[q]});return J}function sJZ(Z,Q,J={}){let{state:q}=Q,{doc:G,tr:U}=q,K=Z;if(G.descendants((H,B)=>{let F=U.mapping.map(B),M=U.mapping.map(B)+H.nodeSize,O=null;if(H.marks.forEach((A)=>{if(A!==K)return!1;O=A}),!O)return;let V=!1;if(Object.keys(J).forEach((A)=>{if(J[A]!==O.attrs[A])V=!0}),V){let A=Z.type.create({...Z.attrs,...J});U.removeMark(F,M,Z.type),U.addMark(F,M,A)}}),U.docChanged)Q.view.dispatch(U)}function HB(Z){var Q;let{editor:J,from:q,to:G,text:U,rules:K,plugin:H}=Z,{view:B}=J;if(B.composing)return!1;let F=B.state.doc.resolve(q);if(F.parent.type.spec.code||!!((Q=F.nodeBefore||F.nodeAfter)==null?void 0:Q.marks.find((V)=>V.type.spec.code)))return!1;let M=!1,O=BJZ(F)+U;return K.forEach((V)=>{if(M)return;let A=aJZ(O,V.find);if(!A)return;let N=A[0].length-U.length;if(N>0){let e=F.parentOffset-N;if(e<0||F.parent.textBetween(e,F.parentOffset)!==A[0].slice(0,N))return}let T=B.state.tr,P=LB({state:B.state,transaction:T}),C={from:q-(A[0].length-U.length),to:G},{commands:y,chain:f,can:u}=new MB({editor:J,state:P});if(V.handler({state:P,range:C,match:A,commands:y,chain:f,can:u})===null||!T.steps.length)return;if(V.undoable)T.setMeta(H,{transform:T,from:q,to:G,text:U});B.dispatch(T),M=!0}),M}function rJZ(Z){let{editor:Q,rules:J}=Z,q=new lZ({state:{init(){return null},apply(G,U,K){let H=G.getMeta(q);if(H)return H;let B=G.getMeta("applyInputRules");if(!!B)setTimeout(()=>{let{text:M}=B;if(typeof M==="string")M=M;else M=zj(UZ.from(M),K.schema);let{from:O}=B,V=O+M.length;HB({editor:Q,from:O,to:V,text:M,rules:J,plugin:q})});return G.selectionSet||G.docChanged?null:U}},props:{handleTextInput(G,U,K,H){return HB({editor:Q,from:U,to:K,text:H,rules:J,plugin:q})},handleDOMEvents:{compositionend:(G)=>{return setTimeout(()=>{let{$cursor:U}=G.state.selection;if(U)HB({editor:Q,from:U.pos,to:U.pos,text:"",rules:J,plugin:q})}),!1}},handleKeyDown(G,U){if(U.key!=="Enter")return!1;let{$cursor:K}=G.state.selection;if(K)return HB({editor:Q,from:K.pos,to:K.pos,text:`
|
|
280
|
+
`,rules:J,plugin:q});return!1}},isInputRules:!0});return q}function tJZ(Z){let{editor:Q,state:J,from:q,to:G,rule:U,pasteEvent:K,dropEvent:H}=Z,{commands:B,chain:F,can:M}=new MB({editor:Q,state:J}),O=[];return J.doc.nodesBetween(q,G,(A,N)=>{var T,P,C,y,f;if(((P=(T=A.type)==null?void 0:T.spec)==null?void 0:P.code)||!(A.isText||A.isTextblock||A.isInline))return;let u=(f=(y=(C=A.content)==null?void 0:C.size)!=null?y:A.nodeSize)!=null?f:0,n=Math.max(q,N),e=Math.min(G,N+u);if(n>=e)return;let a=A.isText?A.text||"":A.textBetween(n-N,e-N,void 0,"");oJZ(a,U.find,K).forEach((GZ)=>{if(GZ.index===void 0)return;let s=n+GZ.index+1,LZ=s+GZ[0].length,HZ={from:J.tr.mapping.map(s),to:J.tr.mapping.map(LZ)},KZ=U.handler({state:J,range:HZ,match:GZ,commands:B,chain:F,can:M,pasteEvent:K,dropEvent:H});O.push(KZ)})}),O.every((A)=>A!==null)}function ZYZ(Z){let{editor:Q,rules:J}=Z,q=null,G=!1,U=!1,K=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,H;try{H=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{H=null}let B=({state:M,from:O,to:V,rule:A,pasteEvt:N})=>{let T=M.tr,P=LB({state:M,transaction:T});if(!tJZ({editor:Q,state:P,from:Math.max(O-1,0),to:V.b-1,rule:A,pasteEvent:N,dropEvent:H})||!T.steps.length)return;try{H=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{H=null}return K=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,T};return J.map((M)=>{return new lZ({view(O){let V=(N)=>{var T;if(q=((T=O.dom.parentElement)==null?void 0:T.contains(N.target))?O.dom.parentElement:null,q)WB=Q},A=()=>{if(WB)WB=null};return window.addEventListener("dragstart",V),window.addEventListener("dragend",A),{destroy(){window.removeEventListener("dragstart",V),window.removeEventListener("dragend",A)}}},props:{handleDOMEvents:{drop:(O,V)=>{if(U=q===O.dom.parentElement,H=V,!U){let A=WB;if(A==null?void 0:A.isEditable)setTimeout(()=>{let N=A.state.selection;if(N)A.commands.deleteRange({from:N.from,to:N.to})},10)}return!1},paste:(O,V)=>{var A;let N=(A=V.clipboardData)==null?void 0:A.getData("text/html");return K=V,G=!!(N==null?void 0:N.includes("data-pm-slice")),!1}}},appendTransaction:(O,V,A)=>{let N=O[0],T=N.getMeta("uiEvent")==="paste"&&!G,P=N.getMeta("uiEvent")==="drop"&&!U,C=N.getMeta("applyPasteRules"),y=!!C;if(!T&&!P&&!y)return;if(y){let{text:n}=C;if(typeof n==="string")n=n;else n=zj(UZ.from(n),A.schema);let{from:e}=C,a=e+n.length,c=eJZ(n);return B({rule:M,state:A,from:e,to:{b:a},pasteEvt:c})}let f=V.doc.content.findDiffStart(A.doc.content),u=V.doc.content.findDiffEnd(A.doc.content);if(!fJZ(f)||!u||f===u.b)return;return B({rule:M,state:A,from:f,to:u,pasteEvt:K})}})})}function _Y(Z){return new sK({find:Z.find,handler:({state:Q,range:J,match:q})=>{let G=gQ(Z.getAttributes,void 0,q);if(G===!1||G===null)return null;let{tr:U}=Q,K=q[q.length-1],H=q[0];if(K){let B=H.search(/\S/),F=J.from+H.indexOf(K),M=F+K.length;if(NB(J.from,J.to,Q.doc).filter((A)=>{return A.mark.type.excluded.find((T)=>T===Z.type&&T!==A.mark.type)}).filter((A)=>A.to>F).length)return null;if(M<J.to)U.delete(M,J.to);if(F>J.from)U.delete(J.from+B,F);let V=J.from+B+K.length;U.addMark(J.from+B,V,Z.type.create(G||{})),U.removeStoredMark(Z.type)}},undoable:Z.undoable})}function Gm(Z){return new sK({find:Z.find,handler:({state:Q,range:J,match:q})=>{let G=gQ(Z.getAttributes,void 0,q)||{},{tr:U}=Q,K=J.from,H=J.to,B=Z.type.create(G);if(q[1]){let F=q[0].lastIndexOf(q[1]),M=K+F;if(M>H)M=H;else H=M+q[1].length;let O=q[0][q[0].length-1];U.insertText(O,K+q[0].length-1),U.replaceWith(M,H,B)}else if(q[0]){let F=Z.type.isInline?K:K-1;U.insert(F,Z.type.create(G)).delete(U.mapping.map(K),U.mapping.map(H))}U.scrollIntoView()},undoable:Z.undoable})}function J7(Z){return new sK({find:Z.find,handler:({state:Q,range:J,match:q})=>{let G=Q.doc.resolve(J.from),U=gQ(Z.getAttributes,void 0,q)||{};if(!G.node(-1).canReplaceWith(G.index(-1),G.indexAfter(-1),Z.type))return null;Q.tr.delete(J.from,J.to).setBlockType(J.from,J.from,Z.type,U)},undoable:Z.undoable})}function oG(Z){return new sK({find:Z.find,handler:({state:Q,range:J,match:q,chain:G})=>{let U=gQ(Z.getAttributes,void 0,q)||{},K=Q.tr.delete(J.from,J.to),B=K.doc.resolve(J.from).blockRange(),F=B&&xK(B,Z.type,U);if(!F)return null;if(K.wrap(B,F),Z.keepMarks&&Z.editor){let{selection:O,storedMarks:V}=Q,{splittableMarks:A}=Z.editor.extensionManager,N=V||O.$to.parentOffset&&O.$from.marks();if(N){let T=N.filter((P)=>A.includes(P.type.name));K.ensureMarks(T)}}if(Z.keepAttributes){let O=Z.type.name==="bulletList"||Z.type.name==="orderedList"?"listItem":"taskList";G().updateAttributes(O,U).run()}let M=K.doc.resolve(J.from-1).nodeBefore;if(M&&M.type===Z.type&&Oq(K.doc,J.from-1)&&(!Z.joinPredicate||Z.joinPredicate(q,M)))K.join(J.from-1)},undoable:Z.undoable})}function EJ(Z){return new _j({find:Z.find,handler:({state:Q,range:J,match:q,pasteEvent:G})=>{let U=gQ(Z.getAttributes,void 0,q,G);if(U===!1||U===null)return null;let{tr:K}=Q,H=q[q.length-1],B=q[0],F=J.to;if(H){let M=B.search(/\S/),O=J.from+B.indexOf(H),V=O+H.length;if(NB(J.from,J.to,Q.doc).filter((T)=>{return T.mark.type.excluded.find((C)=>C===Z.type&&C!==T.mark.type)}).filter((T)=>T.to>O).length)return null;if(V<J.to)K.delete(V,J.to);if(O>J.from)K.delete(J.from+M,O);if(F=J.from+M+H.length,K.addMark(J.from+M,F,Z.type.create(U||{})),!(q.index!==void 0&&q.input!==void 0&&q.index+q[0].length>=q.input.length))K.removeStoredMark(Z.type)}}})}var HXZ,Xj=(Z,Q)=>{for(var J in Q)HXZ(Z,J,{get:Q[J],enumerable:!0})},MB=class{constructor(Z){this.editor=Z.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=Z.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:Z,editor:Q,state:J}=this,{view:q}=Q,{tr:G}=J,U=this.buildProps(G);return Object.fromEntries(Object.entries(Z).map(([K,H])=>{return[K,(...F)=>{let M=H(...F)(U);if(!G.getMeta("preventDispatch")&&!this.hasCustomState)q.dispatch(G);return M}]}))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(Z,Q=!0){let{rawCommands:J,editor:q,state:G}=this,{view:U}=q,K=[],H=!!Z,B=Z||G.tr,F=()=>{if(!H&&Q&&!B.getMeta("preventDispatch")&&!this.hasCustomState)U.dispatch(B);return K.every((O)=>O===!0)},M={...Object.fromEntries(Object.entries(J).map(([O,V])=>{return[O,(...N)=>{let T=this.buildProps(B,Q),P=V(...N)(T);return K.push(P),M}]})),run:F};return M}createCan(Z){let{rawCommands:Q,state:J}=this,q=!1,G=Z||J.tr,U=this.buildProps(G,!1);return{...Object.fromEntries(Object.entries(Q).map(([H,B])=>{return[H,(...F)=>B(...F)({...U,dispatch:void 0})]})),chain:()=>this.createChain(G,!1)}}buildProps(Z,Q=!0){let{rawCommands:J,editor:q,state:G}=this,{view:U}=q,K={tr:Z,editor:q,view:U,state:LB({state:G,transaction:Z}),dispatch:Q?()=>{return}:void 0,chain:()=>this.createChain(Z,Q),can:()=>this.createCan(Z),get commands(){return Object.fromEntries(Object.entries(J).map(([H,B])=>{return[H,(...F)=>B(...F)(K)]}))}};return K}},Df,WXZ=()=>({editor:Z,view:Q})=>{return requestAnimationFrame(()=>{var J;if(!Z.isDestroyed)Q.dom.blur(),(J=window==null?void 0:window.getSelection())==null||J.removeAllRanges()}),!0},BXZ=(Z=!0)=>({commands:Q})=>{return Q.setContent("",{emitUpdate:Z})},_XZ=()=>({state:Z,tr:Q,dispatch:J})=>{let{selection:q}=Q,{ranges:G}=q;if(!J)return!0;return G.forEach(({$from:U,$to:K})=>{Z.doc.nodesBetween(U.pos,K.pos,(H,B)=>{if(H.type.isText)return;let{doc:F,mapping:M}=Q,O=F.resolve(M.map(B)),V=F.resolve(M.map(B+H.nodeSize)),A=O.blockRange(V);if(!A)return;let N=iz(A);if(H.type.isTextblock){let{defaultType:T}=O.parent.contentMatchAt(O.index());Q.setNodeMarkup(A.start,T)}if(N||N===0)Q.lift(A,N)})}),!0},FXZ=(Z)=>(Q)=>{return Z(Q)},LXZ=()=>({state:Z,dispatch:Q})=>{return _N(Z,Q)},MXZ=(Z,Q)=>({editor:J,tr:q})=>{let{state:G}=J,U=G.doc.slice(Z.from,Z.to);q.deleteRange(Z.from,Z.to);let K=q.mapping.map(Q);return q.insert(K,U.content),q.setSelection(new DZ(q.doc.resolve(Math.max(K-1,0)))),!0},OXZ=()=>({tr:Z,dispatch:Q})=>{let{selection:J}=Z,q=J.$anchor.node();if(q.content.size>0)return!1;let G=Z.selection.$anchor;for(let U=G.depth;U>0;U-=1)if(G.node(U).type===q.type){if(Q){let H=G.before(U),B=G.after(U);Z.delete(H,B).scrollIntoView()}return!0}return!1},VXZ=(Z)=>({tr:Q,state:J,dispatch:q})=>{let G=jX(Z,J.schema),U=Q.selection.$anchor;for(let K=U.depth;K>0;K-=1)if(U.node(K).type===G){if(q){let B=U.before(K),F=U.after(K);Q.delete(B,F).scrollIntoView()}return!0}return!1},AXZ=(Z)=>({tr:Q,dispatch:J})=>{let{from:q,to:G}=Z;if(J)Q.delete(q,G);return!0},IXZ=(Z)=>{if(!Z.content)return!1;return/^text(\*|\+)/.test(Z.content)},Mf=(Z,Q,J)=>{if(!Z.parent.isInline)return Z.pos;if(J==="left"&&Z.pos>Z.start()||J==="right"&&Z.pos<Z.end())return Z.pos;let q=Q.nodes[Z.parent.type.name].spec;if(!IXZ(q))return Z.pos;return J==="left"?Z.start()-1:Z.end()+1},NXZ=(Z,Q,J)=>{let q=Mf(Z,J,"left"),G=Mf(Q,J,"right");return{from:q,to:G}},jXZ=()=>({state:Z,dispatch:Q})=>{if(Z.selection.empty)return!1;if(Q){let J=Z.tr,{ranges:q}=Z.selection,G=J.steps.length;if(q.forEach((U)=>{let K=J.mapping.slice(G),H=J.doc.resolve(K.map(U.$from.pos)),B=J.doc.resolve(K.map(U.$to.pos)),{from:F,to:M}=NXZ(H,B,Z.schema);J.deleteRange(F,M)}),!J.selection.empty)J.setSelection(DZ.near(J.doc.resolve(J.selection.from)));J.scrollIntoView(),Q(J)}return!0},TXZ=()=>({commands:Z})=>{return Z.keyboardShortcut("Enter")},PXZ=()=>({state:Z,dispatch:Q})=>{return BN(Z,Q)},RXZ=(Z,Q)=>({tr:J,state:q,dispatch:G})=>{let U=Q0(Z,q.schema),{doc:K,selection:H}=J,{$from:B,from:F,to:M}=H;if(G){let O=Yj(B,U,Q);if(O&&O.from<=F&&O.to>=M){let V=DZ.create(K,O.from,O.to);J.setSelection(V)}}return!0},CXZ=(Z)=>(Q)=>{let J=typeof Z==="function"?Z(Q):Z;for(let q=0;q<J.length;q+=1)if(J[q](Q))return!0;return!1},$XZ=(Z=null,Q={})=>({editor:J,view:q,tr:G,dispatch:U})=>{Q={scrollIntoView:!0,...Q};let K=()=>{if(FB()||Vf())q.dom.focus();if(DXZ()&&!FB()&&!Vf())q.dom.focus({preventScroll:!0});requestAnimationFrame(()=>{if(!J.isDestroyed){if(q.focus(),Q==null?void 0:Q.scrollIntoView)J.commands.scrollIntoView()}})};try{if(q.hasFocus()&&Z===null||Z===!1)return!0}catch{return!1}if(U&&Z===null&&!OB(J.state.selection))return K(),!0;let H=eN(G.doc,Z)||J.state.selection,B=J.state.selection.eq(H);if(U){if(!B)G.setSelection(H);if(B&&G.storedMarks)G.setStoredMarks(G.storedMarks);K()}return!0},EXZ=(Z,Q)=>(J)=>{return Z.every((q,G)=>Q(q,{...J,index:G}))},kXZ=(Z,Q)=>({tr:J,commands:q})=>{return q.insertContentAt({from:J.selection.from,to:J.selection.to},Z,Q)},Ef=(Z)=>{let Q=Z.childNodes;for(let J=Q.length-1;J>=0;J-=1){let q=Q[J];if(q.nodeType===3&&q.nodeValue&&/^(\n\s\s|\n)$/.test(q.nodeValue))Z.removeChild(q);else if(q.nodeType===1)Ef(q)}return Z},SXZ=(Z)=>{return!("type"in Z)},yXZ=(Z,Q,J)=>({tr:q,dispatch:G,editor:U})=>{var K;if(G){J={parseOptions:U.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...J};let H,B=(P)=>{U.emit("contentError",{editor:U,error:P,disableCollaboration:()=>{if("collaboration"in U.storage&&typeof U.storage.collaboration==="object"&&U.storage.collaboration)U.storage.collaboration.isDisabled=!0}})},F={preserveWhitespace:"full",...J.parseOptions};if(!J.errorOnInvalidContent&&!U.options.enableContentCheck&&U.options.emitContentError)try{dK(Q,U.schema,{parseOptions:F,errorOnInvalidContent:!0})}catch(P){B(P)}try{H=dK(Q,U.schema,{parseOptions:F,errorOnInvalidContent:(K=J.errorOnInvalidContent)!=null?K:U.options.enableContentCheck})}catch(P){return B(P),!1}let{from:M,to:O}=typeof Z==="number"?{from:Z,to:Z}:{from:Z.from,to:Z.to},V=!0,A=!0;if((SXZ(H)?H:[H]).forEach((P)=>{P.check(),V=V?P.isText&&P.marks.length===0:!1,A=A?P.isBlock:!1}),M===O&&A){let{parent:P}=q.doc.resolve(M);if(P.isTextblock&&!P.type.spec.code&&!P.childCount)M-=1,O+=1}let T;if(V){if(Array.isArray(Q))T=Q.map((P)=>P.text||"").join("");else if(Q instanceof UZ){let P="";Q.forEach((C)=>{if(C.text)P+=C.text}),T=P}else if(typeof Q==="object"&&!!Q&&!!Q.text)T=Q.text;else T=Q;q.insertText(T,M,O)}else{T=H;let P=q.doc.resolve(M),C=P.node(),y=P.parentOffset===0,f=C.isText||C.isTextblock,u=C.content.size>0;if(y&&f&&u&&A)M=Math.max(0,M-1);q.replaceWith(M,O,T)}if(J.updateSelection)kf(q,q.steps.length-1,-1);if(J.applyInputRules)q.setMeta("applyInputRules",{from:M,text:T});if(J.applyPasteRules)q.setMeta("applyPasteRules",{from:M,text:T})}return!0},wXZ=(Z={})=>({tr:Q,dispatch:J,editor:q})=>{let{pos:G,attrs:U,content:K,updateSelection:H=!0}=Z,B;if(typeof G==="number")B=Q.doc.resolve(G);else if(G)B=G;else B=Q.selection.$from;let F=Sf(B.parent.contentMatchAt(B.index()));if(!F)return!1;let M=Object.keys(F.spec.attrs||{}),O=U?Object.fromEntries(Object.entries(U).filter(([A])=>M.includes(A))):{},V;if(K){let A=dK(K,q.schema);V=F.createAndFill(O,A)}else V=F.createAndFill(O);if(!V)return!1;if(J){if(Q.insert(B.pos,V),H)kf(Q,Q.steps.length-1,-1)}return!0},xXZ=()=>({state:Z,dispatch:Q})=>{return hh(Z,Q)},bXZ=()=>({state:Z,dispatch:Q})=>{return uh(Z,Q)},vXZ=()=>({state:Z,dispatch:Q})=>{return YN(Z,Q)},gXZ=()=>({state:Z,dispatch:Q})=>{return zN(Z,Q)},hXZ=()=>({state:Z,dispatch:Q,tr:J})=>{try{let q=V6(Z.doc,Z.selection.$from.pos,-1);if(q===null||q===void 0)return!1;if(J.join(q,2),Q)Q(J);return!0}catch{return!1}},uXZ=()=>({state:Z,dispatch:Q,tr:J})=>{try{let q=V6(Z.doc,Z.selection.$from.pos,1);if(q===null||q===void 0)return!1;if(J.join(q,2),Q)Q(J);return!0}catch{return!1}},fXZ=()=>({state:Z,dispatch:Q})=>{return xh(Z,Q)},mXZ=()=>({state:Z,dispatch:Q})=>{return bh(Z,Q)},pXZ=(Z)=>({editor:Q,view:J,tr:q,dispatch:G})=>{let U=cXZ(Z).split(/-(?!$)/),K=U.find((F)=>!["Alt","Ctrl","Meta","Shift"].includes(F)),H=new KeyboardEvent("keydown",{key:K==="Space"?" ":K,altKey:U.includes("Alt"),ctrlKey:U.includes("Ctrl"),metaKey:U.includes("Meta"),shiftKey:U.includes("Shift"),bubbles:!0,cancelable:!0}),B=Q.captureTransaction(()=>{J.someProp("handleKeyDown",(F)=>F(J,H))});return B==null||B.steps.forEach((F)=>{let M=F.map(q.mapping);if(M&&G)q.maybeStep(M)}),!0},dXZ=(Z,Q={})=>({state:J,dispatch:q})=>{let G=jX(Z,J.schema);if(!rG(J,G,Q))return!1;return fh(J,q)},lXZ=()=>({state:Z,dispatch:Q})=>{return FN(Z,Q)},iXZ=(Z)=>({state:Q,dispatch:J})=>{let q=jX(Z,Q.schema);return nh(q)(Q,J)},nXZ=()=>({state:Z,dispatch:Q})=>{return HN(Z,Q)},sXZ=(Z,Q)=>({tr:J,state:q,dispatch:G})=>{let U=null,K=null,H=VB(typeof Z==="string"?Z:Z.name,q.schema);if(!H)return!1;if(H==="node")U=jX(Z,q.schema);if(H==="mark")K=Q0(Z,q.schema);let B=!1;return J.selection.ranges.forEach((F)=>{q.doc.nodesBetween(F.$from.pos,F.$to.pos,(M,O)=>{if(U&&U===M.type){if(B=!0,G)J.setNodeMarkup(O,void 0,Af(M.attrs,Q))}if(K&&M.marks.length)M.marks.forEach((V)=>{if(K===V.type){if(B=!0,G)J.addMark(O,O+M.nodeSize,K.create(Af(V.attrs,Q)))}})})}),B},aXZ=()=>({tr:Z,dispatch:Q})=>{if(Q)Z.scrollIntoView();return!0},rXZ=()=>({tr:Z,dispatch:Q})=>{if(Q){let J=new LJ(Z.doc);Z.setSelection(J)}return!0},oXZ=()=>({state:Z,dispatch:Q})=>{return qN(Z,Q)},tXZ=()=>({state:Z,dispatch:Q})=>{return UN(Z,Q)},eXZ=()=>({state:Z,dispatch:Q})=>{return mh(Z,Q)},ZJZ=()=>({state:Z,dispatch:Q})=>{return MN(Z,Q)},QJZ=()=>({state:Z,dispatch:Q})=>{return LN(Z,Q)},XJZ=(Z,{errorOnInvalidContent:Q,emitUpdate:J=!0,parseOptions:q={}}={})=>({editor:G,tr:U,dispatch:K,commands:H})=>{let{doc:B}=U;if(q.preserveWhitespace!=="full"){let F=Zj(Z,G.schema,q,{errorOnInvalidContent:Q!=null?Q:G.options.enableContentCheck});if(K)U.replaceWith(0,B.content.size,F).setMeta("preventUpdate",!J);return!0}if(K)U.setMeta("preventUpdate",!J);return H.insertContentAt({from:0,to:B.content.size},Z,{parseOptions:q,errorOnInvalidContent:Q!=null?Q:G.options.enableContentCheck})},uf=(Z,Q,J,q=20)=>{let G=Z.doc.resolve(J),U=q,K=null;while(U>0&&K===null){let H=G.node(U);if((H==null?void 0:H.type.name)===Q)K=H;else U-=1}return[K,U]},BJZ=(Z,Q=500)=>{let J="",q=Z.parentOffset;return Z.parent.nodesBetween(Math.max(0,q-Q),q,(G,U,K,H)=>{var B,F;let M=((F=(B=G.type.spec).toText)==null?void 0:F.call(B,{node:G,pos:U,parent:K,index:H}))||G.textContent||"%leaf%";J+=G.isAtom&&!G.isText?M:M.slice(0,Math.max(0,q-U))}),J},ff=(Z,Q)=>{let{$from:J,$to:q,$anchor:G}=Z.selection;if(Q){let U=AB((H)=>H.type.name===Q)(Z.selection);if(!U)return!1;let K=Z.doc.resolve(U.pos+1);if(G.pos+1===K.end())return!0;return!1}if(q.parentOffset<q.parent.nodeSize-2||J.pos!==q.pos)return!1;return!0},mf=(Z)=>{let{$from:Q,$to:J}=Z.selection;if(Q.parentOffset>0||Q.pos!==J.pos)return!1;return!0},cf=class Z{constructor(Q){this.position=Q}static fromJSON(Q){return new Z(Q.position)}toJSON(){return{position:this.position}}},OJZ=(Z,Q={})=>({tr:J,state:q,dispatch:G})=>{let{selection:U}=J,{empty:K,ranges:H}=U,B=Q0(Z,q.schema);if(G)if(K){let F=wf(q,B);J.addStoredMark(B.create({...F,...Q}))}else H.forEach((F)=>{let M=F.$from.pos,O=F.$to.pos;q.doc.nodesBetween(M,O,(V,A)=>{let N=Math.max(A,M),T=Math.min(A+V.nodeSize,O);if(V.marks.find((C)=>C.type===B))V.marks.forEach((C)=>{if(B===C.type)J.addMark(N,T,B.create({...C.attrs,...Q}))});else J.addMark(N,T,B.create(Q))})});return MJZ(q,J,B)},VJZ=(Z,Q)=>({tr:J})=>{return J.setMeta(Z,Q),!0},AJZ=(Z,Q={})=>({state:J,dispatch:q,chain:G})=>{let U=jX(Z,J.schema),K;if(J.selection.$anchor.sameParent(J.selection.$head))K=J.selection.$anchor.parent.attrs;if(!U.isTextblock)return console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1;return G().command(({commands:H})=>{if(ON(U,{...K,...Q})(J))return!0;return H.clearNodes()}).command(({state:H})=>{return ON(U,{...K,...Q})(H,q)}).run()},IJZ=(Z)=>({tr:Q,dispatch:J})=>{if(J){let{doc:q}=Q,G=Z0(Z,0,q.content.size),U=SZ.create(q,G);Q.setSelection(U)}return!0},NJZ=(Z,Q)=>({tr:J,state:q,dispatch:G})=>{let{selection:U}=q,K,H;if(typeof Q==="number")K=Q,H=Q;else if(Q&&"from"in Q&&"to"in Q)K=Q.from,H=Q.to;else K=U.from,H=U.to;if(G)J.doc.nodesBetween(K,H,(B,F)=>{if(B.isText)return;J.setNodeMarkup(F,void 0,{...B.attrs,dir:Z})});return!0},jJZ=(Z)=>({tr:Q,dispatch:J})=>{if(J){let{doc:q}=Q,{from:G,to:U}=typeof Z==="number"?{from:Z,to:Z}:Z,K=DZ.atStart(q).from,H=DZ.atEnd(q).to,B=Z0(G,K,H),F=Z0(U,K,H),M=DZ.create(q,B,F);Q.setSelection(M)}return!0},TJZ=(Z)=>({state:Q,dispatch:J})=>{let q=jX(Z,Q.schema);return sh(q)(Q,J)},PJZ=({keepMarks:Z=!0}={})=>({tr:Q,state:J,dispatch:q,editor:G})=>{let{selection:U,doc:K}=Q,{$from:H,$to:B}=U,F=G.extensionManager.attributes,M=BB(F,H.node().type.name,H.node().attrs);if(U instanceof SZ&&U.node.isBlock){if(!H.parentOffset||!cY(K,H.pos))return!1;if(q){if(Z)Rf(J,G.extensionManager.splittableMarks);Q.split(H.pos).scrollIntoView()}return!0}if(!H.parent.isBlock)return!1;let O=B.parentOffset===B.parent.content.size,V=H.depth===0?void 0:Sf(H.node(-1).contentMatchAt(H.indexAfter(-1))),A=O&&V?[{type:V,attrs:M}]:void 0,N=cY(Q.doc,Q.mapping.map(H.pos),1,A);if(!A&&!N&&cY(Q.doc,Q.mapping.map(H.pos),1,V?[{type:V}]:void 0))N=!0,A=V?[{type:V,attrs:M}]:void 0;if(q){if(N){if(U instanceof DZ)Q.deleteSelection();if(Q.split(Q.mapping.map(H.pos),1,A),V&&!O&&!H.parentOffset&&H.parent.type!==V){let T=Q.mapping.map(H.before()),P=Q.doc.resolve(T);if(H.node(-1).canReplaceWith(P.index(),P.index()+1,V))Q.setNodeMarkup(Q.mapping.map(H.before()),V)}}if(Z)Rf(J,G.extensionManager.splittableMarks);Q.scrollIntoView()}return N},RJZ=(Z,Q={})=>({tr:J,state:q,dispatch:G,editor:U})=>{var K;let H=jX(Z,q.schema),{$from:B,$to:F}=q.selection,M=q.selection.node;if(M&&M.isBlock||B.depth<2||!B.sameParent(F))return!1;let O=B.node(-1);if(O.type!==H)return!1;let V=U.extensionManager.attributes;if(B.parent.content.size===0&&B.node(-1).childCount===B.indexAfter(-1)){if(B.depth===2||B.node(-3).type!==H||B.index(-2)!==B.node(-2).childCount-1)return!1;if(G){let C=UZ.empty,y=B.index(-1)?1:B.index(-2)?2:3;for(let c=B.depth-y;c>=B.depth-3;c-=1)C=UZ.from(B.node(c).copy(C));let f=B.indexAfter(-1)<B.node(-2).childCount?1:B.indexAfter(-2)<B.node(-3).childCount?2:3,u={...BB(V,B.node().type.name,B.node().attrs),...Q},n=((K=H.contentMatch.defaultType)==null?void 0:K.createAndFill(u))||void 0;C=C.append(UZ.from(H.createAndFill(null,n)||void 0));let e=B.before(B.depth-(y-1));J.replace(e,B.after(-f),new AZ(C,4-y,0));let a=-1;if(J.doc.nodesBetween(e,J.doc.content.size,(c,GZ)=>{if(a>-1)return!1;if(c.isTextblock&&c.content.size===0)a=GZ+1}),a>-1)J.setSelection(DZ.near(J.doc.resolve(a)));J.scrollIntoView()}return!0}let A=F.pos===B.end()?O.contentMatchAt(0).defaultType:null,N={...BB(V,O.type.name,O.attrs),...Q},T={...BB(V,B.node().type.name,B.node().attrs),...Q};J.delete(B.pos,F.pos);let P=A?[{type:H,attrs:N},{type:A,attrs:T}]:[{type:H,attrs:N}];if(!cY(J.doc,B.pos,2))return!1;if(G){let{selection:C,storedMarks:y}=q,{splittableMarks:f}=U.extensionManager,u=y||C.$to.parentOffset&&C.$from.marks();if(J.split(B.pos,2,P).scrollIntoView(),!u||!G)return!0;let n=u.filter((e)=>f.includes(e.type.name));J.ensureMarks(n)}return!0},oN=(Z,Q)=>{let J=AB((K)=>K.type===Q)(Z.selection);if(!J)return!0;let q=Z.doc.resolve(Math.max(0,J.pos-1)).before(J.depth);if(q===void 0)return!0;let G=Z.doc.nodeAt(q);if(!(J.node.type===(G==null?void 0:G.type)&&Oq(Z.doc,J.pos)))return!0;if(!pf(J.node.attrs.type,G==null?void 0:G.attrs.type))return!0;return Z.join(J.pos),!0},tN=(Z,Q)=>{let J=AB((K)=>K.type===Q)(Z.selection);if(!J)return!0;let q=Z.doc.resolve(J.start).after(J.depth);if(q===void 0)return!0;let G=Z.doc.nodeAt(q);if(!(J.node.type===(G==null?void 0:G.type)&&Oq(Z.doc,q)))return!0;if(!pf(J.node.attrs.type,G==null?void 0:G.attrs.type))return!0;return Z.join(q),!0},DJZ=(Z,Q,J,q={})=>({editor:G,tr:U,state:K,dispatch:H,chain:B,commands:F,can:M})=>{let{extensions:O,splittableMarks:V}=G.extensionManager,A=jX(Z,K.schema),N=jX(Q,K.schema),{selection:T,storedMarks:P}=K,{$from:C,$to:y}=T,f=C.blockRange(y),u=P||T.$to.parentOffset&&T.$from.marks();if(!f)return!1;let n=AB((KZ)=>rN(KZ.type.name,O))(T),e=T.from===0&&T.to===K.doc.content.size,a=K.doc.content.content,c=a.length===1?a[0]:null,GZ=e&&c&&rN(c.type.name,O)?{node:c,pos:0,depth:0}:null,s=n!=null?n:GZ,LZ=!!n&&f.depth>=1&&f.depth-n.depth<=1,HZ=!!GZ;if((LZ||HZ)&&s){if(s.node.type===A){if(e&&HZ)return B().command(({tr:KZ,dispatch:v})=>{let i=CJZ(KZ);if(!i)return!1;if(KZ.setSelection(i),v)v(KZ);return!0}).liftListItem(N).run();return F.liftListItem(N)}if(rN(s.node.type.name,O)&&A.validContent(s.node.content))return B().command(()=>{return U.setNodeMarkup(s.pos,A),!0}).command(()=>oN(U,A)).command(()=>tN(U,A)).run()}if(!J||!u||!H)return B().command(()=>{if(M().wrapInList(A,q))return!0;return F.clearNodes()}).wrapInList(A,q).command(()=>oN(U,A)).command(()=>tN(U,A)).run();return B().command(()=>{let KZ=M().wrapInList(A,q),v=u.filter((i)=>V.includes(i.type.name));if(U.ensureMarks(v),KZ)return!0;return F.clearNodes()}).wrapInList(A,q).command(()=>oN(U,A)).command(()=>tN(U,A)).run()},$JZ=(Z,Q={},J={})=>({state:q,commands:G})=>{let{extendEmptyMarkRange:U=!1}=J,K=Q0(Z,q.schema);if(Qj(q,K,Q))return G.unsetMark(K,{extendEmptyMarkRange:U});return G.setMark(K,Q)},EJZ=(Z,Q,J={})=>({state:q,commands:G})=>{let U=jX(Z,q.schema),K=jX(Q,q.schema),H=rG(q,U,J),B;if(q.selection.$anchor.sameParent(q.selection.$head))B=q.selection.$anchor.parent.attrs;if(H)return G.setNode(K,B);return G.setNode(U,{...B,...J})},kJZ=(Z,Q={})=>({state:J,commands:q})=>{let G=jX(Z,J.schema);if(rG(J,G,Q))return q.lift(G);return q.wrapIn(G,Q)},SJZ=()=>({state:Z,dispatch:Q})=>{let J=Z.plugins;for(let q=0;q<J.length;q+=1){let G=J[q],U;if(G.spec.isInputRules&&(U=G.getState(Z))){if(Q){let K=Z.tr,H=U.transform;for(let B=H.steps.length-1;B>=0;B-=1)K.step(H.steps[B].invert(H.docs[B]));if(U.text){let B=K.doc.resolve(U.from).marks();K.replaceWith(U.from,U.to,Z.schema.text(U.text,B))}else K.delete(U.from,U.to)}return!0}}return!1},yJZ=(Z={})=>({tr:Q,dispatch:J,editor:q})=>{let{ignoreClearable:G=!1}=Z,{selection:U}=Q,{empty:K,ranges:H}=U;if(K)return!0;let{nonClearableMarks:B}=q.extensionManager;if(J){let F=Object.values(q.schema.marks).filter((M)=>G||!B.includes(M.name));H.forEach((M)=>{for(let O of F)Q.removeMark(M.$from.pos,M.$to.pos,O)})}return!0},wJZ=(Z,Q={})=>({tr:J,state:q,dispatch:G})=>{var U;let{extendEmptyMarkRange:K=!1}=Q,{selection:H}=J,B=Q0(Z,q.schema),{$from:F,empty:M,ranges:O}=H;if(!G)return!0;if(M&&K){let{from:V,to:A}=H,N=(U=F.marks().find((P)=>P.type===B))==null?void 0:U.attrs,T=Yj(F,B,N);if(T)V=T.from,A=T.to;J.removeMark(V,A,B)}else O.forEach((V)=>{J.removeMark(V.$from.pos,V.$to.pos,B)});return J.removeStoredMark(B),!0},xJZ=(Z)=>({tr:Q,state:J,dispatch:q})=>{let{selection:G}=J,U,K;if(typeof Z==="number")U=Z,K=Z;else if(Z&&"from"in Z&&"to"in Z)U=Z.from,K=Z.to;else U=G.from,K=G.to;if(q)Q.doc.nodesBetween(U,K,(H,B)=>{if(H.isText)return;let F={...H.attrs};delete F.dir,Q.setNodeMarkup(B,void 0,F)});return!0},bJZ=(Z,Q={})=>({tr:J,state:q,dispatch:G})=>{let U=null,K=null,H=VB(typeof Z==="string"?Z:Z.name,q.schema);if(!H)return!1;if(H==="node")U=jX(Z,q.schema);if(H==="mark")K=Q0(Z,q.schema);let B=!1;return J.selection.ranges.forEach((F)=>{let M=F.$from.pos,O=F.$to.pos,V,A,N,T;if(J.selection.empty)q.doc.nodesBetween(M,O,(P,C)=>{if(U&&U===P.type)B=!0,N=Math.max(C,M),T=Math.min(C+P.nodeSize,O),V=C,A=P});else q.doc.nodesBetween(M,O,(P,C)=>{if(C<M&&U&&U===P.type)B=!0,N=Math.max(C,M),T=Math.min(C+P.nodeSize,O),V=C,A=P;if(C>=M&&C<=O){if(U&&U===P.type){if(B=!0,G)J.setNodeMarkup(C,void 0,{...P.attrs,...Q})}if(K&&P.marks.length)P.marks.forEach((y)=>{if(K===y.type){if(B=!0,G){let f=Math.max(C,M),u=Math.min(C+P.nodeSize,O);J.addMark(f,u,K.create({...y.attrs,...Q}))}}})}});if(A){if(V!==void 0&&G)J.setNodeMarkup(V,void 0,{...A.attrs,...Q});if(K&&A.marks.length)A.marks.forEach((P)=>{if(K===P.type&&G)J.addMark(N,T,K.create({...P.attrs,...Q}))})}}),B},vJZ=(Z,Q={})=>({state:J,dispatch:q})=>{let G=jX(Z,J.schema);return dh(G,Q)(J,q)},gJZ=(Z,Q={})=>({state:J,dispatch:q})=>{let G=jX(Z,J.schema);return ih(G,Q)(J,q)},hJZ=class{constructor(){this.callbacks={}}on(Z,Q){if(!this.callbacks[Z])this.callbacks[Z]=[];return this.callbacks[Z].push(Q),this}emit(Z,...Q){let J=this.callbacks[Z];if(J)J.forEach((q)=>q.apply(this,Q));return this}off(Z,Q){let J=this.callbacks[Z];if(J)if(Q)this.callbacks[Z]=J.filter((q)=>q!==Q);else delete this.callbacks[Z];return this}once(Z,Q){let J=(...q)=>{this.off(Z,J),Q.apply(this,q)};return this.on(Z,J)}removeAllListeners(){this.callbacks={}}},cJZ,sK=class{constructor(Z){var Q;this.find=Z.find,this.handler=Z.handler,this.undoable=(Q=Z.undoable)!=null?Q:!0}},aJZ=(Z,Q)=>{if(Jj(Q))return Q.exec(Z);let J=Q(Z);if(!J)return null;let q=[J.text];if(q.index=J.index,q.input=Z,q.data=J.data,J.replaceWith){if(!J.text.includes(J.replaceWith))console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".');q.push(J.replaceWith)}return q},Bj=class{constructor(Z={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...Z},this.name=this.config.name}get options(){return{...gQ(uZ(this,"addOptions",{name:this.name}))}}get storage(){return{...gQ(uZ(this,"addStorage",{name:this.name,options:this.options}))}}configure(Z={}){let Q=this.extend({...this.config,addOptions:()=>{return nf(this.options,Z)}});return Q.name=this.name,Q.parent=this.parent,this.child=null,Q}extend(Z={}){let Q=new this.constructor({...this.config,...Z});return Q.parent=this,this.child=Q,Q.name="name"in Z?Z.name:Q.parent.name,Q}},sJ,_j=class{constructor(Z){this.find=Z.find,this.handler=Z.handler}},oJZ=(Z,Q,J)=>{if(Jj(Q))return[...Z.matchAll(Q)];let q=Q(Z,J);if(!q)return[];return q.map((G)=>{let U=[G.text];if(U.index=G.index,U.input=Z,U.data=G.data,G.replaceWith){if(!G.text.includes(G.replaceWith))console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".');U.push(G.replaceWith)}return U})},WB=null,eJZ=(Z)=>{var Q;let J=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(Q=J.clipboardData)==null||Q.setData("text/html",Z),J},RB=class{constructor(Z,Q){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=Q,this.baseExtensions=Z,this.extensions=gf(Z),this.schema=zJZ(this.extensions,Q),this.setupExtensions()}get commands(){return this.extensions.reduce((Z,Q)=>{let J={name:Q.name,options:Q.options,storage:this.editor.extensionStorage[Q.name],editor:this.editor,type:eH(Q.name,this.schema)},q=uZ(Q,"addCommands",J);if(!q)return Z;return{...Z,...q()}},{})}get plugins(){let{editor:Z}=this;return Z7([...this.extensions].reverse()).flatMap((q)=>{let G={name:q.name,options:q.options,storage:this.editor.extensionStorage[q.name],editor:Z,type:eH(q.name,this.schema)},U=[],K=uZ(q,"addKeyboardShortcuts",G),H={};if(q.type==="mark"&&uZ(q,"exitable",G))H.ArrowRight=()=>sJ.handleExit({editor:Z,mark:q});if(K){let V=Object.fromEntries(Object.entries(K()).map(([A,N])=>{return[A,()=>N({editor:Z})]}));H={...H,...V}}let B=Ff(H);U.push(B);let F=uZ(q,"addInputRules",G);if(Pf(q,Z.options.enableInputRules)&&F){let V=F();if(V&&V.length){let A=rJZ({editor:Z,rules:V}),N=Array.isArray(A)?A:[A];U.push(...N)}}let M=uZ(q,"addPasteRules",G);if(Pf(q,Z.options.enablePasteRules)&&M){let V=M();if(V&&V.length){let A=ZYZ({editor:Z,rules:V});U.push(...A)}}let O=uZ(q,"addProseMirrorPlugins",G);if(O){let V=O();U.push(...V)}return U})}get attributes(){return vf(this.extensions)}get nodeViews(){let{editor:Z}=this,{nodeExtensions:Q}=lK(this.extensions);return Object.fromEntries(Q.filter((J)=>!!uZ(J,"addNodeView")).map((J)=>{let q=this.attributes.filter((B)=>B.type===J.name),G={name:J.name,options:J.options,storage:this.editor.extensionStorage[J.name],editor:Z,type:jX(J.name,this.schema)},U=uZ(J,"addNodeView",G);if(!U)return[];let K=U();if(!K)return[];let H=(B,F,M,O,V)=>{let A=iK(B,q);return K({node:B,view:F,getPos:M,decorations:O,innerDecorations:V,editor:Z,extension:J,HTMLAttributes:A})};return[J.name,H]}))}dispatchTransaction(Z){let{editor:Q}=this;return Z7([...this.extensions].reverse()).reduceRight((q,G)=>{let U={name:G.name,options:G.options,storage:this.editor.extensionStorage[G.name],editor:Q,type:eH(G.name,this.schema)},K=uZ(G,"dispatchTransaction",U);if(!K)return q;return(H)=>{K.call(U,{transaction:H,next:q})}},Z)}transformPastedHTML(Z){let{editor:Q}=this;return Z7([...this.extensions]).reduce((q,G)=>{let U={name:G.name,options:G.options,storage:this.editor.extensionStorage[G.name],editor:Q,type:eH(G.name,this.schema)},K=uZ(G,"transformPastedHTML",U);if(!K)return q;return(H,B)=>{let F=q(H,B);return K.call(U,F)}},Z||((q)=>q))}get markViews(){let{editor:Z}=this,{markExtensions:Q}=lK(this.extensions);return Object.fromEntries(Q.filter((J)=>!!uZ(J,"addMarkView")).map((J)=>{let q=this.attributes.filter((H)=>H.type===J.name),G={name:J.name,options:J.options,storage:this.editor.extensionStorage[J.name],editor:Z,type:Q0(J.name,this.schema)},U=uZ(J,"addMarkView",G);if(!U)return[];let K=(H,B,F)=>{let M=iK(H,q);return U()({mark:H,view:B,inline:F,editor:Z,extension:J,HTMLAttributes:M,updateAttributes:(O)=>{sJZ(H,Z,O)}})};return[J.name,K]}))}destroy(){this.extensions.forEach((Z)=>{let Q=Z;while(Q.parent){let J=Q.parent;if(J.child===Q)J.child=null;Q=J}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){let Z=this.extensions;this.editor.extensionStorage=Object.fromEntries(Z.map((Q)=>[Q.name,Q.storage])),Z.forEach((Q)=>{var J,q;let G={name:Q.name,options:Q.options,storage:this.editor.extensionStorage[Q.name],editor:this.editor,type:eH(Q.name,this.schema)};if(Q.type==="mark"){if((J=gQ(uZ(Q,"keepOnSplit",G)))!=null?J:!0)this.splittableMarks.push(Q.name);if(!((q=gQ(uZ(Q,"clearable",G)))!=null?q:!0))this.nonClearableMarks.push(Q.name)}let U=uZ(Q,"onBeforeCreate",G),K=uZ(Q,"onCreate",G),H=uZ(Q,"onUpdate",G),B=uZ(Q,"onSelectionUpdate",G),F=uZ(Q,"onTransaction",G),M=uZ(Q,"onFocus",G),O=uZ(Q,"onBlur",G),V=uZ(Q,"onDestroy",G);if(U)this.editor.on("beforeCreate",U);if(K)this.editor.on("create",K);if(H)this.editor.on("update",H);if(B)this.editor.on("selectionUpdate",B);if(F)this.editor.on("transaction",F);if(M)this.editor.on("focus",M);if(O)this.editor.on("blur",O);if(V)this.editor.on("destroy",V)})}},QYZ,NQ,sf,af,rf,of,tf,ef,Zm,Qm,Xm,Jm,Ym,XYZ=class Z{constructor(Q,J,q=!1,G=null){this.currentNode=null,this.actualDepth=null,this.isBlock=q,this.resolvedPos=Q,this.editor=J,this.currentNode=G}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 Q;return(Q=this.actualDepth)!=null?Q:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(Q){let J=this.from,q=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}J=this.from+1,q=this.to-1}this.editor.commands.insertContentAt({from:J,to:q},Q)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){if(this.isBlock)return this.pos;return this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){if(this.isBlock)return this.pos+this.size;return this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let Q=this.resolvedPos.start(this.resolvedPos.depth-1),J=this.resolvedPos.doc.resolve(Q);return new Z(J,this.editor)}get before(){let Q=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));if(Q.depth!==this.depth)Q=this.resolvedPos.doc.resolve(this.from-3);return new Z(Q,this.editor)}get after(){let Q=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));if(Q.depth!==this.depth)Q=this.resolvedPos.doc.resolve(this.to+3);return new Z(Q,this.editor)}get children(){let Q=[];return this.node.content.forEach((J,q)=>{let G=J.isBlock&&!J.isTextblock,U=J.isAtom&&!J.isText,K=J.isInline,H=this.pos+q+(U?0:1);if(H<0||H>this.resolvedPos.doc.nodeSize-2)return;let B=this.resolvedPos.doc.resolve(H);if(!G&&!K&&B.depth<=this.depth)return;let F=new Z(B,this.editor,G,G||K?J:null);if(G)F.actualDepth=this.depth+1;Q.push(F)}),Q}get firstChild(){return this.children[0]||null}get lastChild(){let Q=this.children;return Q[Q.length-1]||null}closest(Q,J={}){let q=null,G=this.parent;while(G&&!q){if(G.node.type.name===Q)if(Object.keys(J).length>0){let U=G.node.attrs,K=Object.keys(J);for(let H=0;H<K.length;H+=1){let B=K[H];if(U[B]!==J[B])break}}else q=G;G=G.parent}return q}querySelector(Q,J={}){return this.querySelectorAll(Q,J,!0)[0]||null}querySelectorAll(Q,J={},q=!1){let G=[];if(!this.children||this.children.length===0)return G;let U=Object.keys(J);return this.children.forEach((K)=>{if(q&&G.length>0)return;if(K.node.type.name===Q){if(U.every((B)=>J[B]===K.node.attrs[B]))G.push(K)}if(q&&G.length>0)return;G=G.concat(K.querySelectorAll(Q,J,q))}),G}setAttribute(Q){let{tr:J}=this.editor.state;J.setNodeMarkup(this.from,void 0,{...this.node.attrs,...Q}),this.editor.view.dispatch(J)}},JYZ=`.ProseMirror {
|
|
281
|
+
position: relative;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.ProseMirror {
|
|
285
|
+
word-wrap: break-word;
|
|
286
|
+
white-space: pre-wrap;
|
|
287
|
+
white-space: break-spaces;
|
|
288
|
+
-webkit-font-variant-ligatures: none;
|
|
289
|
+
font-variant-ligatures: none;
|
|
290
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.ProseMirror [contenteditable="false"] {
|
|
294
|
+
white-space: normal;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
298
|
+
white-space: pre-wrap;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.ProseMirror pre {
|
|
302
|
+
white-space: pre-wrap;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
img.ProseMirror-separator {
|
|
306
|
+
display: inline !important;
|
|
307
|
+
border: none !important;
|
|
308
|
+
margin: 0 !important;
|
|
309
|
+
width: 0 !important;
|
|
310
|
+
height: 0 !important;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.ProseMirror-gapcursor {
|
|
314
|
+
display: none;
|
|
315
|
+
pointer-events: none;
|
|
316
|
+
position: absolute;
|
|
317
|
+
margin: 0;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.ProseMirror-gapcursor:after {
|
|
321
|
+
content: "";
|
|
322
|
+
display: block;
|
|
323
|
+
position: absolute;
|
|
324
|
+
top: -2px;
|
|
325
|
+
width: 20px;
|
|
326
|
+
border-top: 1px solid black;
|
|
327
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
@keyframes ProseMirror-cursor-blink {
|
|
331
|
+
to {
|
|
332
|
+
visibility: hidden;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.ProseMirror-hideselection *::selection {
|
|
337
|
+
background: transparent;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
341
|
+
background: transparent;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.ProseMirror-hideselection * {
|
|
345
|
+
caret-color: transparent;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
349
|
+
display: block;
|
|
350
|
+
}`,qm,eQ;var aZ=k(()=>{oq();CJ();YQ();YQ();CJ();YQ();YQ();YQ();Vq();Vq();YQ();oq();CJ();oq();oq();CJ();CJ();CJ();CJ();o2();CJ();YQ();CJ();CJ();CJ();CJ();CJ();oq();Vq();Vq();Vq();Vq();Vq();YQ();CJ();YQ();YQ();o2();YQ();oq();Vq();YQ();oq();YQ();oq();CJ();o2();YQ();x9();Lf();YQ();Vq();YQ();Vq();YQ();YQ();oq();YQ();YQ();YQ();YQ();YQ();YQ();YQ();oq();YQ();HXZ=Object.defineProperty;Df={};Xj(Df,{blur:()=>WXZ,clearContent:()=>BXZ,clearNodes:()=>_XZ,command:()=>FXZ,createParagraphNear:()=>LXZ,cut:()=>MXZ,deleteCurrentNode:()=>OXZ,deleteNode:()=>VXZ,deleteRange:()=>AXZ,deleteSelection:()=>jXZ,enter:()=>TXZ,exitCode:()=>PXZ,extendMarkRange:()=>RXZ,first:()=>CXZ,focus:()=>$XZ,forEach:()=>EXZ,insertContent:()=>kXZ,insertContentAt:()=>yXZ,insertDefaultBlock:()=>wXZ,joinBackward:()=>vXZ,joinDown:()=>bXZ,joinForward:()=>gXZ,joinItemBackward:()=>hXZ,joinItemForward:()=>uXZ,joinTextblockBackward:()=>fXZ,joinTextblockForward:()=>mXZ,joinUp:()=>xXZ,keyboardShortcut:()=>pXZ,lift:()=>dXZ,liftEmptyBlock:()=>lXZ,liftListItem:()=>iXZ,newlineInCode:()=>nXZ,resetAttributes:()=>sXZ,scrollIntoView:()=>aXZ,selectAll:()=>rXZ,selectNodeBackward:()=>oXZ,selectNodeForward:()=>tXZ,selectParentNode:()=>eXZ,selectTextblockEnd:()=>ZJZ,selectTextblockStart:()=>QJZ,setContent:()=>XJZ,setMark:()=>OJZ,setMeta:()=>VJZ,setNode:()=>AJZ,setNodeSelection:()=>IJZ,setTextDirection:()=>NJZ,setTextSelection:()=>jJZ,sinkListItem:()=>TJZ,splitBlock:()=>PJZ,splitListItem:()=>RJZ,toggleList:()=>DJZ,toggleMark:()=>$JZ,toggleNode:()=>EJZ,toggleWrap:()=>kJZ,undoInputRule:()=>SJZ,unsetAllMarks:()=>yJZ,unsetMark:()=>wJZ,unsetTextDirection:()=>xJZ,updateAttributes:()=>bJZ,wrapIn:()=>vJZ,wrapInList:()=>gJZ});cJZ={};Xj(cJZ,{createAtomBlockMarkdownSpec:()=>pJZ,createBlockMarkdownSpec:()=>dJZ,createInlineMarkdownSpec:()=>nJZ,parseAttributes:()=>Hj,parseIndentedBlocks:()=>PB,renderNestedMarkdownContent:()=>X7,serializeAttributes:()=>Wj});sJ=class Z extends Bj{constructor(){super(...arguments);this.type="mark"}static create(Q={}){let J=typeof Q==="function"?Q():Q;return new Z(J)}static handleExit({editor:Q,mark:J}){let{tr:q}=Q.state,G=Q.state.selection.$from;if(G.pos===G.end()){let K=G.marks();if(!K.find((F)=>(F==null?void 0:F.type.name)===J.name))return!1;let B=K.find((F)=>(F==null?void 0:F.type.name)===J.name);if(B)q.removeStoredMark(B);return q.insertText(" ",G.pos),Q.view.dispatch(q),!0}return!1}configure(Q){return super.configure(Q)}extend(Q){let J=typeof Q==="function"?Q():Q;return super.extend(J)}};RB.resolve=gf;RB.sort=Z7;RB.flatten=Gj;QYZ={};Xj(QYZ,{ClipboardTextSerializer:()=>sf,Commands:()=>af,Delete:()=>rf,Drop:()=>of,Editable:()=>tf,FocusEvents:()=>Zm,Keymap:()=>Qm,Paste:()=>Xm,Tabindex:()=>Jm,TextDirection:()=>Ym,focusEventsPluginKey:()=>ef});NQ=class Z extends Bj{constructor(){super(...arguments);this.type="extension"}static create(Q={}){let J=typeof Q==="function"?Q():Q;return new Z(J)}configure(Q){return super.configure(Q)}extend(Q){let J=typeof Q==="function"?Q():Q;return super.extend(J)}},sf=NQ.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new lZ({key:new tZ("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:Z}=this,{state:Q,schema:J}=Z,{doc:q,selection:G}=Q,U=IB(J),{blockSeparator:K}=this.options,H={...K!==void 0?{blockSeparator:K}:{},textSerializers:U};return[...G.ranges].sort((F,M)=>F.$from.pos-M.$from.pos).map(({$from:F,$to:M})=>hf(q,{from:F.pos,to:M.pos},H)).join(K!=null?K:`
|
|
351
|
+
|
|
352
|
+
`)}}})]}}),af=NQ.create({name:"commands",addCommands(){return{...Df}}}),rf=NQ.create({name:"delete",onUpdate({transaction:Z,appendedTransactions:Q}){var J,q,G;let U=()=>{var K,H,B,F;if((F=(B=(H=(K=this.editor.options.coreExtensionOptions)==null?void 0:K.delete)==null?void 0:H.filterTransaction)==null?void 0:B.call(H,Z))!=null?F:Z.getMeta("y-sync$"))return;let M=qj(Z.before,[Z,...Q]);Q7(M).forEach((A)=>{if(M.mapping.mapResult(A.oldRange.from).deletedAfter&&M.mapping.mapResult(A.oldRange.to).deletedBefore)M.before.nodesBetween(A.oldRange.from,A.oldRange.to,(N,T)=>{let P=T+N.nodeSize-2,C=A.oldRange.from<=T&&P<=A.oldRange.to;this.editor.emit("delete",{type:"node",node:N,from:T,to:P,newFrom:M.mapping.map(T),newTo:M.mapping.map(P),deletedRange:A.oldRange,newRange:A.newRange,partial:!C,editor:this.editor,transaction:Z,combinedTransform:M})})});let V=M.mapping;M.steps.forEach((A,N)=>{var T,P;if(A instanceof Mq){let C=V.slice(N).map(A.from,-1),y=V.slice(N).map(A.to),f=V.invert().map(C,-1),u=V.invert().map(y),n=C>0?(T=M.doc.nodeAt(C-1))==null?void 0:T.marks.some((a)=>a.eq(A.mark)):!1,e=(P=M.doc.nodeAt(y))==null?void 0:P.marks.some((a)=>a.eq(A.mark));this.editor.emit("delete",{type:"mark",mark:A.mark,from:A.from,to:A.to,deletedRange:{from:f,to:u},newRange:{from:C,to:y},partial:Boolean(e||n),editor:this.editor,transaction:Z,combinedTransform:M})}})};if((G=(q=(J=this.editor.options.coreExtensionOptions)==null?void 0:J.delete)==null?void 0:q.async)!=null?G:!0)setTimeout(U,0);else U()}}),of=NQ.create({name:"drop",addProseMirrorPlugins(){return[new lZ({key:new tZ("tiptapDrop"),props:{handleDrop:(Z,Q,J,q)=>{this.editor.emit("drop",{editor:this.editor,event:Q,slice:J,moved:q})}}})]}}),tf=NQ.create({name:"editable",addProseMirrorPlugins(){return[new lZ({key:new tZ("editable"),props:{editable:()=>this.editor.options.editable}})]}}),ef=new tZ("focusEvents"),Zm=NQ.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:Z}=this;return[new lZ({key:ef,props:{handleDOMEvents:{focus:(Q,J)=>{Z.isFocused=!0;let q=Z.state.tr.setMeta("focus",{event:J}).setMeta("addToHistory",!1);return Q.dispatch(q),!1},blur:(Q,J)=>{Z.isFocused=!1;let q=Z.state.tr.setMeta("blur",{event:J}).setMeta("addToHistory",!1);return Q.dispatch(q),!1}}}})]}}),Qm=NQ.create({name:"keymap",addKeyboardShortcuts(){let Z=()=>this.editor.commands.first(({commands:K})=>[()=>K.undoInputRule(),()=>K.command(({tr:H})=>{let{selection:B,doc:F}=H,{empty:M,$anchor:O}=B,{pos:V,parent:A}=O,N=O.parent.isTextblock&&V>0?H.doc.resolve(V-1):O,T=N.parent.type.spec.isolating,P=O.pos-O.parentOffset,C=T&&N.parent.childCount===1?P===O.pos:mZ.atStart(F).from===V;if(!M||!A.type.isTextblock||A.textContent.length||!C||C&&O.parent.type.name==="paragraph")return!1;return K.clearNodes()}),()=>K.deleteSelection(),()=>K.joinBackward(),()=>K.selectNodeBackward()]),Q=()=>this.editor.commands.first(({commands:K})=>[()=>K.deleteSelection(),()=>K.deleteCurrentNode(),()=>K.joinForward(),()=>K.selectNodeForward()]),q={Enter:()=>this.editor.commands.first(({commands:K})=>[()=>K.newlineInCode(),()=>K.createParagraphNear(),()=>K.liftEmptyBlock(),()=>K.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:Z,"Mod-Backspace":Z,"Shift-Backspace":Z,Delete:Q,"Mod-Delete":Q,"Mod-a":()=>this.editor.commands.selectAll()},G={...q},U={...q,"Ctrl-h":Z,"Alt-Backspace":Z,"Ctrl-d":Q,"Ctrl-Alt-Backspace":Q,"Alt-Delete":Q,"Alt-d":Q,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};if(FB()||yf())return U;return G},addProseMirrorPlugins(){return[new lZ({key:new tZ("clearDocument"),appendTransaction:(Z,Q,J)=>{if(Z.some((T)=>T.getMeta("composition")))return;let q=Z.some((T)=>T.docChanged)&&!Q.doc.eq(J.doc),G=Z.some((T)=>T.getMeta("preventClearDocument"));if(!q||G)return;let{empty:U,from:K,to:H}=Q.selection,B=mZ.atStart(Q.doc).from,F=mZ.atEnd(Q.doc).to;if(U||!(K===B&&H===F))return;if(!nK(J.doc))return;let V=J.tr,A=LB({state:J,transaction:V}),{commands:N}=new MB({editor:this.editor,state:A});if(N.clearNodes(),!V.steps.length)return;return V}})]}}),Xm=NQ.create({name:"paste",addProseMirrorPlugins(){return[new lZ({key:new tZ("tiptapPaste"),props:{handlePaste:(Z,Q,J)=>{this.editor.emit("paste",{editor:this.editor,event:Q,slice:J})}}})]}}),Jm=NQ.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new lZ({key:new tZ("tabindex"),props:{attributes:()=>{var Z;if(!this.editor.isEditable&&this.options.value===void 0)return{};return{tabindex:(Z=this.options.value)!=null?Z:"0"}}}})]}}),Ym=NQ.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:Z}=lK(this.extensions);return[{types:Z.filter((Q)=>Q.name!=="text").map((Q)=>Q.name),attributes:{dir:{default:this.options.direction,parseHTML:(Q)=>{let J=Q.getAttribute("dir");if(J&&(J==="ltr"||J==="rtl"||J==="auto"))return J;return this.options.direction},renderHTML:(Q)=>{if(!Q.dir)return{};return{dir:Q.dir}}}}}]},addProseMirrorPlugins(){return[new lZ({key:new tZ("textDirection"),props:{attributes:()=>{let Z=this.options.direction;if(!Z)return{};return{dir:Z}}}})]}}),qm=class extends hJZ{constructor(Z={}){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:J})=>{throw J},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:FJZ,createMappablePosition:LJZ},this.setOptions(Z),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:J,slice:q,moved:G})=>this.options.onDrop(J,q,G)),this.on("paste",({event:J,slice:q})=>this.options.onPaste(J,q)),this.on("delete",this.options.onDelete);let Q=this.createDoc();if(!this.editorState){let J=eN(Q,this.options.autofocus);this.editorState=P9.create({doc:Q,schema:this.schema,selection:J||void 0})}if(this.options.element)this.mount(this.options.element)}mount(Z){if(typeof document>"u")throw Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");if(this.createView(Z),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css))document.head.appendChild(this.css);window.setTimeout(()=>{if(this.isDestroyed)return;if(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){let Z=this.editorView.dom;if(Z==null?void 0:Z.editor)delete Z.editor;this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{if(typeof this.css.remove==="function")this.css.remove();else if(this.css.parentNode)this.css.parentNode.removeChild(this.css)}catch(Z){console.warn("Failed to remove CSS element:",Z)}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(){if(this.options.injectCSS&&typeof document<"u")this.css=uJZ(JYZ,this.options.injectNonce)}setOptions(Z={}){if(this.options={...this.options,...Z},!this.editorView||!this.state||this.isDestroyed)return;if(this.options.editorProps)this.view.setProps(this.options.editorProps);this.view.updateState(this.state)}setEditable(Z,Q=!0){if(this.setOptions({editable:Z}),Q)this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){if(this.editorView)return this.editorView;return new Proxy({state:this.editorState,updateState:(Z)=>{this.editorState=Z},dispatch:(Z)=>{this.dispatchTransaction(Z)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(Z,Q)=>{if(this.editorView)return this.editorView[Q];if(Q==="state")return this.editorState;if(Q in Z)return Reflect.get(Z,Q);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${Q}']. The editor may not be mounted yet.`)}})}get state(){if(this.editorView)this.editorState=this.view.state;return this.editorState}registerPlugin(Z,Q){let J=bf(Q)?Q(Z,[...this.state.plugins]):[...this.state.plugins,Z],q=this.state.reconfigure({plugins:J});return this.view.updateState(q),q}unregisterPlugin(Z){if(this.isDestroyed)return;let Q=this.state.plugins,J=Q;if([].concat(Z).forEach((G)=>{let U=typeof G==="string"?`${G}$`:G.key;J=J.filter((K)=>!K.key.startsWith(U))}),Q.length===J.length)return;let q=this.state.reconfigure({plugins:J});return this.view.updateState(q),q}createExtensionManager(){var Z,Q,J,q;let U=[...this.options.enableCoreExtensions?[tf,sf.configure({blockSeparator:(Q=(Z=this.options.coreExtensionOptions)==null?void 0:Z.clipboardTextSerializer)==null?void 0:Q.blockSeparator}),af,Zm,Qm,Jm.configure({value:(q=(J=this.options.coreExtensionOptions)==null?void 0:J.tabindex)==null?void 0:q.value}),of,Xm,rf,Ym.configure({direction:this.options.textDirection})].filter((K)=>{if(typeof this.options.enableCoreExtensions==="object")return this.options.enableCoreExtensions[K.name]!==!1;return!0}):[],...this.options.extensions].filter((K)=>{return["extension","node","mark"].includes(K==null?void 0:K.type)});this.extensionManager=new RB(U,this)}createCommandManager(){this.commandManager=new MB({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let Z;try{Z=Zj(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(Q){if(!(Q instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(Q.message))throw Q;let J=Zj(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=P9.create({doc:J,schema:this.schema,selection:eN(J,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:Q,disableCollaboration:()=>{if("collaboration"in this.storage&&typeof this.storage.collaboration==="object"&&this.storage.collaboration)this.storage.collaboration.isDisabled=!0;this.options.extensions=this.options.extensions.filter((q)=>q.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return Z}createView(Z){let{editorProps:Q,enableExtensionDispatchTransaction:J}=this.options,q=Q.dispatchTransaction||this.dispatchTransaction.bind(this),G=J?this.extensionManager.dispatchTransaction(q):q,U=Q.transformPastedHTML,K=this.extensionManager.transformPastedHTML(U);this.editorView=new qB(Z,{...Q,attributes:{role:"textbox",...Q==null?void 0:Q.attributes},dispatchTransaction:G,transformPastedHTML:K,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let H=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(H),this.prependClass(),this.injectCSS();let B=this.view.dom;B.editor=this}createNodeViews(){if(this.view.isDestroyed)return;this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(Z){this.isCapturingTransaction=!0,Z(),this.isCapturingTransaction=!1;let Q=this.capturedTransaction;return this.capturedTransaction=null,Q}dispatchTransaction(Z){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=Z;return}Z.steps.forEach((F)=>{var M;return(M=this.capturedTransaction)==null?void 0:M.step(F)});return}let{state:Q,transactions:J}=this.state.applyTransaction(Z),q=!this.state.selection.eq(Q.selection),G=J.includes(Z),U=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:Z,nextState:Q}),!G)return;if(this.view.updateState(Q),this.emit("transaction",{editor:this,transaction:Z,appendedTransactions:J.slice(1)}),q)this.emit("selectionUpdate",{editor:this,transaction:Z});let K=J.findLast((F)=>F.getMeta("focus")||F.getMeta("blur")),H=K==null?void 0:K.getMeta("focus"),B=K==null?void 0:K.getMeta("blur");if(H)this.emit("focus",{editor:this,event:H.event,transaction:K});if(B)this.emit("blur",{editor:this,event:B.event,transaction:K});if(Z.getMeta("preventUpdate")||!J.some((F)=>F.docChanged)||U.doc.eq(Q.doc))return;this.emit("update",{editor:this,transaction:Z,appendedTransactions:J.slice(1)})}getAttributes(Z){return Kj(this.state,Z)}isActive(Z,Q){let J=typeof Z==="string"?Z:null,q=typeof Z==="string"?Q:Z;return _JZ(this.state,J,q)}getJSON(){return this.state.doc.toJSON()}getHTML(){return zj(this.state.doc.content,this.schema)}getText(Z){let{blockSeparator:Q=`
|
|
353
|
+
|
|
354
|
+
`,textSerializers:J={}}=Z||{};return Uj(this.state.doc,{blockSeparator:Q,textSerializers:{...IB(this.schema),...J}})}get isEmpty(){return nK(this.state.doc)}destroy(){if(this.destroyed)return;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 Z,Q;return(Q=(Z=this.editorView)==null?void 0:Z.isDestroyed)!=null?Q:!0}$node(Z,Q){var J;return((J=this.$doc)==null?void 0:J.querySelector(Z,Q))||null}$nodes(Z,Q){var J;return((J=this.$doc)==null?void 0:J.querySelectorAll(Z,Q))||null}$pos(Z){let Q=this.state.doc.resolve(Z),J=Z>0&&Q.nodeAfter&&!Q.nodeAfter.isText&&Q.nodeAfter.isAtom?Q.nodeAfter:null;return new XYZ(Q,this,!1,J)}get $doc(){return this.$pos(0)}};eQ=class Z extends Bj{constructor(){super(...arguments);this.type="node"}static create(Q={}){let J=typeof Q==="function"?Q():Q;return new Z(J)}configure(Q){return super.configure(Q)}extend(Q){let J=typeof Q==="function"?Q():Q;return super.extend(J)}}});function Fj(Z,Q){return function(q,G,U){return Z(q,G,U)&&Q(q,G,U)}}function CB(Z){return function(J,q,G){if(!J||!q||typeof J!=="object"||typeof q!=="object")return Z(J,q,G);let{cache:U}=G,K=U.get(J),H=U.get(q);if(K&&H)return K===q&&H===J;U.set(J,q),U.set(q,J);let B=Z(J,q,G);return U.delete(J),U.delete(q),B}}function zYZ(Z){return Z!=null?Z[Symbol.toStringTag]:void 0}function zm(Z){return YYZ(Z).concat(qYZ(Z))}function R6(Z,Q){return Z===Q||!Z&&!Q&&Z!==Z&&Q!==Q}function BYZ(Z,Q){return Z.byteLength===Q.byteLength&&DB(new Uint8Array(Z),new Uint8Array(Q))}function _YZ(Z,Q,J){let q=Z.length;if(Q.length!==q)return!1;while(q-- >0)if(!J.equals(Z[q],Q[q],q,q,Z,Q,J))return!1;return!0}function FYZ(Z,Q){return Z.byteLength===Q.byteLength&&DB(new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),new Uint8Array(Q.buffer,Q.byteOffset,Q.byteLength))}function LYZ(Z,Q){return R6(Z.getTime(),Q.getTime())}function MYZ(Z,Q){return Z.name===Q.name&&Z.message===Q.message&&Z.cause===Q.cause&&Z.stack===Q.stack}function OYZ(Z,Q){return Z===Q}function Hm(Z,Q,J){let q=Z.size;if(q!==Q.size)return!1;if(!q)return!0;let G=Array(q),U=Z.entries(),K,H,B=0;while(K=U.next()){if(K.done)break;let F=Q.entries(),M=!1,O=0;while(H=F.next()){if(H.done)break;if(G[O]){O++;continue}let V=K.value,A=H.value;if(J.equals(V[0],A[0],B,O,Z,Q,J)&&J.equals(V[1],A[1],V[0],A[0],Z,Q,J)){M=G[O]=!0;break}O++}if(!M)return!1;B++}return!0}function AYZ(Z,Q,J){let q=Km(Z),G=q.length;if(Km(Q).length!==G)return!1;while(G-- >0)if(!Bm(Z,Q,J,q[G]))return!1;return!0}function Y7(Z,Q,J){let q=zm(Z),G=q.length;if(zm(Q).length!==G)return!1;let U,K,H;while(G-- >0){if(U=q[G],!Bm(Z,Q,J,U))return!1;if(K=Um(Z,U),H=Um(Q,U),(K||H)&&(!K||!H||K.configurable!==H.configurable||K.enumerable!==H.enumerable||K.writable!==H.writable))return!1}return!0}function IYZ(Z,Q){return R6(Z.valueOf(),Q.valueOf())}function NYZ(Z,Q){return Z.source===Q.source&&Z.flags===Q.flags}function Wm(Z,Q,J){let q=Z.size;if(q!==Q.size)return!1;if(!q)return!0;let G=Array(q),U=Z.values(),K,H;while(K=U.next()){if(K.done)break;let B=Q.values(),F=!1,M=0;while(H=B.next()){if(H.done)break;if(!G[M]&&J.equals(K.value,H.value,K.value,H.value,Z,Q,J)){F=G[M]=!0;break}M++}if(!F)return!1}return!0}function DB(Z,Q){let J=Z.byteLength;if(Q.byteLength!==J||Z.byteOffset!==Q.byteOffset)return!1;while(J-- >0)if(Z[J]!==Q[J])return!1;return!0}function jYZ(Z,Q){return Z.hostname===Q.hostname&&Z.pathname===Q.pathname&&Z.protocol===Q.protocol&&Z.port===Q.port&&Z.hash===Q.hash&&Z.username===Q.username&&Z.password===Q.password}function Bm(Z,Q,J,q){if((q===WYZ||q===HYZ||q===KYZ)&&(Z.$$typeof||Q.$$typeof))return!0;return UYZ(Q,q)&&J.equals(Z[q],Q[q],q,q,Z,Q,J)}function hYZ({areArrayBuffersEqual:Z,areArraysEqual:Q,areDataViewsEqual:J,areDatesEqual:q,areErrorsEqual:G,areFunctionsEqual:U,areMapsEqual:K,areNumbersEqual:H,areObjectsEqual:B,arePrimitiveWrappersEqual:F,areRegExpsEqual:M,areSetsEqual:O,areTypedArraysEqual:V,areUrlsEqual:A,unknownTagComparators:N}){return function(P,C,y){if(P===C)return!0;if(P==null||C==null)return!1;let f=typeof P;if(f!==typeof C)return!1;if(f!=="object"){if(f==="number")return H(P,C,y);if(f==="function")return U(P,C,y);return!1}let u=P.constructor;if(u!==C.constructor)return!1;if(u===Object)return B(P,C,y);if(Array.isArray(P))return Q(P,C,y);if(u===Date)return q(P,C,y);if(u===RegExp)return M(P,C,y);if(u===Map)return K(P,C,y);if(u===Set)return O(P,C,y);let n=gYZ.call(P);if(n===DYZ)return q(P,C,y);if(n===yYZ)return M(P,C,y);if(n===EYZ)return K(P,C,y);if(n===wYZ)return O(P,C,y);if(n===SYZ)return typeof P.then!=="function"&&typeof C.then!=="function"&&B(P,C,y);if(n===vYZ)return A(P,C,y);if(n===$YZ)return G(P,C,y);if(n===PYZ)return B(P,C,y);if(bYZ[n])return V(P,C,y);if(n===TYZ)return Z(P,C,y);if(n===CYZ)return J(P,C,y);if(n===RYZ||n===kYZ||n===xYZ)return F(P,C,y);if(N){let e=N[n];if(!e){let a=zYZ(P);if(a)e=N[a]}if(e)return e(P,C,y)}return!1}}function uYZ({circular:Z,createCustomConfig:Q,strict:J}){let q={areArrayBuffersEqual:BYZ,areArraysEqual:J?Y7:_YZ,areDataViewsEqual:FYZ,areDatesEqual:LYZ,areErrorsEqual:MYZ,areFunctionsEqual:OYZ,areMapsEqual:J?Fj(Hm,Y7):Hm,areNumbersEqual:VYZ,areObjectsEqual:J?Y7:AYZ,arePrimitiveWrappersEqual:IYZ,areRegExpsEqual:NYZ,areSetsEqual:J?Fj(Wm,Y7):Wm,areTypedArraysEqual:J?Fj(DB,Y7):DB,areUrlsEqual:jYZ,unknownTagComparators:void 0};if(Q)q=Object.assign({},q,Q(q));if(Z){let G=CB(q.areArraysEqual),U=CB(q.areMapsEqual),K=CB(q.areObjectsEqual),H=CB(q.areSetsEqual);q=Object.assign({},q,{areArraysEqual:G,areMapsEqual:U,areObjectsEqual:K,areSetsEqual:H})}return q}function fYZ(Z){return function(Q,J,q,G,U,K,H){return Z(Q,J,H)}}function mYZ({circular:Z,comparator:Q,createState:J,equals:q,strict:G}){if(J)return function(H,B){let{cache:F=Z?new WeakMap:void 0,meta:M}=J();return Q(H,B,{cache:F,equals:q,meta:M,strict:G})};if(Z)return function(H,B){return Q(H,B,{cache:new WeakMap,equals:q,meta:void 0,strict:G})};let U={cache:void 0,equals:q,meta:void 0,strict:G};return function(H,B){return Q(H,B,U)}}function b9(Z={}){let{circular:Q=!1,createInternalComparator:J,createState:q,strict:G=!1}=Z,U=uYZ(Z),K=hYZ(U),H=J?J(K):fYZ(K);return mYZ({circular:Q,comparator:K,createState:q,equals:H,strict:G})}var YYZ,qYZ,GYZ,UYZ,KYZ="__v",HYZ="__o",WYZ="_owner",Um,Km,VYZ,TYZ="[object ArrayBuffer]",PYZ="[object Arguments]",RYZ="[object Boolean]",CYZ="[object DataView]",DYZ="[object Date]",$YZ="[object Error]",EYZ="[object Map]",kYZ="[object Number]",SYZ="[object Object]",yYZ="[object RegExp]",wYZ="[object Set]",xYZ="[object String]",bYZ,vYZ="[object URL]",gYZ,_m,HPZ,WPZ,BPZ,_PZ,FPZ,LPZ,MPZ;var Fm=k(()=>{({getOwnPropertyNames:YYZ,getOwnPropertySymbols:qYZ}=Object),{hasOwnProperty:GYZ}=Object.prototype;UYZ=Object.hasOwn||((Z,Q)=>GYZ.call(Z,Q));({getOwnPropertyDescriptor:Um,keys:Km}=Object);VYZ=R6;bYZ={"[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},gYZ=Object.prototype.toString;_m=b9(),HPZ=b9({strict:!0}),WPZ=b9({circular:!0}),BPZ=b9({circular:!0,strict:!0}),_PZ=b9({createInternalComparator:()=>R6}),FPZ=b9({strict:!0,createInternalComparator:()=>R6}),LPZ=b9({circular:!0,createInternalComparator:()=>R6}),MPZ=b9({circular:!0,createInternalComparator:()=>R6,strict:!0})});var Lm=bG((cYZ)=>{var X0=S(JZ());(function(){function Z(B,F){return B===F&&(B!==0||1/B===1/F)||B!==B&&F!==F}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Q=LK(),J=typeof Object.is==="function"?Object.is:Z,q=Q.useSyncExternalStore,G=X0.useRef,U=X0.useEffect,K=X0.useMemo,H=X0.useDebugValue;cYZ.useSyncExternalStoreWithSelector=function(B,F,M,O,V){var A=G(null);if(A.current===null){var N={hasValue:!1,value:null};A.current=N}else N=A.current;A=K(function(){function P(n){if(!C){if(C=!0,y=n,n=O(n),V!==void 0&&N.hasValue){var e=N.value;if(V(e,n))return f=e}return f=n}if(e=f,J(y,n))return e;var a=O(n);if(V!==void 0&&V(e,a))return y=n,e;return y=n,f=a}var C=!1,y,f,u=M===void 0?null:M;return[function(){return P(F())},u===null?void 0:function(){return P(u())}]},[F,M,O,V]);var T=q(B,A[0],A[1]);return U(function(){N.hasValue=!0,N.value=T},[T]),H(T),T},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});function lYZ(){let Z=new Set,Q={},J=!1,q=()=>{if(J||!Z.size)return;J=!0,queueMicrotask(()=>{J=!1,Z.forEach((G)=>G())})};return{subscribe(G){return Z.add(G),()=>{Z.delete(G)}},getSnapshot(){return Q},getServerSnapshot(){return Q},setRenderer(G,U){Q={...Q,[G]:Om.default.createPortal(U.reactElement,U.element,G)},q()},removeRenderer(G){let U={...Q};delete U[G],Q=U,q()}}}function Mj(Z){var Q;let[J]=h9.useState(()=>new aYZ(Z.editor)),q=Im.useSyncExternalStoreWithSelector(J.subscribe,J.getSnapshot,J.getServerSnapshot,Z.selector,(Q=Z.equalityFn)!=null?Q:_m);return sYZ(()=>{return J.watch(Z.editor)},[Z.editor,J]),h9.useDebugValue(q),q}function jm(Z={},Q=[]){let J=g9.useRef(Z);J.current=Z;let[q]=g9.useState(()=>new oYZ(J)),G=Am.useSyncExternalStore(q.subscribe,q.getEditor,q.getServerSnapshot);return g9.useDebugValue(G),g9.useEffect(q.onRender(Q)),Mj({editor:G,selector:({transactionNumber:U})=>{if(Z.shouldRerenderOnTransaction===!1||Z.shouldRerenderOnTransaction===void 0)return null;if(Z.immediatelyRender&&U===0)return 0;return U+1}}),G}function Dm({children:Z,...Q}){let J="editor"in Q?Q.editor:Q.instance;if(!J)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let q=C6.useMemo(()=>({editor:J}),[J]),G=C6.useMemo(()=>({editor:J}),[J]);return $B.jsx(Oj.Provider,{value:G,children:$B.jsx(Aj.Provider,{value:q,children:Z})})}function $m({...Z}){let{editor:Q}=GqZ();return $B.jsx(Lj,{editor:Q,...Z})}var q7,v9,Om,Vm,J0,g9,Am,h9,Im,Tm,G7,ZqZ,Pm,Rm,Cm,QqZ,XqZ,JqZ,YqZ,Vj,qqZ,C6,$B,pYZ=(...Z)=>{return(Q)=>{Z.forEach((J)=>{if(typeof J==="function")J(Q);else if(J)J.current=Q})}},dYZ=({contentComponent:Z})=>{let Q=Vm.useSyncExternalStore(Z.subscribe,Z.getSnapshot,Z.getServerSnapshot);return J0.jsx(J0.Fragment,{children:Object.values(Q)})},iYZ,nYZ,Lj,sYZ,aYZ=class{constructor(Z){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=Z,this.lastSnapshot={editor:Z,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(){if(this.transactionNumber===this.lastTransactionNumber)return this.lastSnapshot;return this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(Z){return this.subscribers.add(Z),()=>{this.subscribers.delete(Z)}}watch(Z){if(this.editor=Z,this.editor){let Q,J=(G)=>{if((G==null?void 0:G.transaction)!==void 0&&G.transaction===Q)return;Q=G==null?void 0:G.transaction,this.transactionNumber+=1,this.subscribers.forEach((U)=>U())},q=this.editor;return q.on("transaction",J),q.on("update",J),()=>{q.off("transaction",J),q.off("update",J)}}return}},Mm=!0,Nm,rYZ,oYZ=class Z{constructor(Q){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=Q,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(Q){this.editor=Q,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach((J)=>J())}getInitialEditor(){let Q=this.options.current.immediatelyRender,J=Q!=null?Q:!0;if(Nm){if(J&&Mm)console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches");J=!1}else if(rYZ&&Q===void 0){if(J=!1,Mm)console.warn("Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.")}return J?this.createEditor():null}createEditor(){let Q={...this.options.current,onBeforeCreate:(...q)=>{var G,U;return(U=(G=this.options.current).onBeforeCreate)==null?void 0:U.call(G,...q)},onBlur:(...q)=>{var G,U;return(U=(G=this.options.current).onBlur)==null?void 0:U.call(G,...q)},onCreate:(...q)=>{var G,U;return(U=(G=this.options.current).onCreate)==null?void 0:U.call(G,...q)},onDestroy:(...q)=>{var G,U;return(U=(G=this.options.current).onDestroy)==null?void 0:U.call(G,...q)},onFocus:(...q)=>{var G,U;return(U=(G=this.options.current).onFocus)==null?void 0:U.call(G,...q)},onSelectionUpdate:(...q)=>{var G,U;return(U=(G=this.options.current).onSelectionUpdate)==null?void 0:U.call(G,...q)},onTransaction:(...q)=>{var G,U;return(U=(G=this.options.current).onTransaction)==null?void 0:U.call(G,...q)},onUpdate:(...q)=>{var G,U;return(U=(G=this.options.current).onUpdate)==null?void 0:U.call(G,...q)},onContentError:(...q)=>{var G,U;return(U=(G=this.options.current).onContentError)==null?void 0:U.call(G,...q)},onDrop:(...q)=>{var G,U;return(U=(G=this.options.current).onDrop)==null?void 0:U.call(G,...q)},onPaste:(...q)=>{var G,U;return(U=(G=this.options.current).onPaste)==null?void 0:U.call(G,...q)},onDelete:(...q)=>{var G,U;return(U=(G=this.options.current).onDelete)==null?void 0:U.call(G,...q)},onMount:(...q)=>{var G,U;return(U=(G=this.options.current).onMount)==null?void 0:U.call(G,...q)},onUnmount:(...q)=>{var G,U;return(U=(G=this.options.current).onUnmount)==null?void 0:U.call(G,...q)}};return new qm(Q)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(Q){return this.subscriptions.add(Q),()=>{this.subscriptions.delete(Q)}}static compareOptions(Q,J){return Object.keys(Q).every((q)=>{if(["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(q))return!0;if(q==="extensions"&&Q.extensions&&J.extensions){if(Q.extensions.length!==J.extensions.length)return!1;return Q.extensions.every((G,U)=>{var K;if(G!==((K=J.extensions)==null?void 0:K[U]))return!1;return!0})}if(Q[q]!==J[q])return!1;return!0})}onRender(Q){return()=>{if(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&Q.length===0){if(!Z.compareOptions(this.options.current,this.editor.options))this.editor.setOptions({...this.options.current,editable:this.editor.isEditable})}else this.refreshEditorInstance(Q);return()=>{this.isComponentMounted=!1,this.scheduleDestroy()}}}refreshEditorInstance(Q){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=Q;return}if(this.previousDeps.length===Q.length&&this.previousDeps.every((q,G)=>q===Q[G]))return}if(this.editor&&!this.editor.isDestroyed)this.editor.destroy();this.setEditor(this.createEditor()),this.previousDeps=Q}scheduleDestroy(){let Q=this.instanceId,J=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===Q){if(J)J.setOptions(this.options.current);return}if(J&&!J.isDestroyed){if(J.destroy(),this.instanceId===Q)this.setEditor(null)}},1)}},Oj,TPZ,EB=()=>q7.useContext(Oj),tYZ,eYZ=()=>G7.useContext(tYZ),PPZ,RPZ,Aj,GqZ=()=>C6.useContext(Aj),CPZ;var kB=k(()=>{aZ();Fm();q7=S(JZ(),1),v9=S(JZ(),1),Om=S(uJ(),1),Vm=S(LK(),1),J0=S(JY(),1),g9=S(JZ(),1),Am=S(LK(),1),h9=S(JZ(),1),Im=S(Lm(),1),Tm=S(JY(),1),G7=S(JZ(),1),ZqZ=S(JY(),1),Pm=S(JZ(),1),Rm=S(JY(),1),Cm=S(JZ(),1),QqZ=S(JZ(),1),XqZ=S(uJ(),1),JqZ=S(JY(),1),YqZ=S(JY(),1),Vj=S(JZ(),1),qqZ=S(JY(),1),C6=S(JZ(),1),$B=S(JY(),1);aZ();iYZ=class extends v9.default.Component{constructor(Z){super(Z);this.editorContentRef=v9.default.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var Z;let Q=this.props.editor;if(Q&&!Q.isDestroyed&&((Z=Q.view.dom)==null?void 0:Z.parentNode)){if(Q.contentComponent)return;let J=this.editorContentRef.current;J.append(...Q.view.dom.parentNode.childNodes),Q.setOptions({element:J}),Q.contentComponent=lYZ(),Q.createNodeViews(),Q.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var Z;let Q=this.props.editor;if(!Q)return;if(Q.isEditorContentInitialized=!1,!Q.isDestroyed)Q.view.setProps({nodeViews:{}});Q.contentComponent=null;try{if(!((Z=Q.view.dom)==null?void 0:Z.parentNode))return;let J=document.createElement("div");J.append(...Q.view.dom.parentNode.childNodes),Q.setOptions({element:J})}catch{}}render(){let{editor:Z,innerRef:Q,...J}=this.props;return J0.jsxs(J0.Fragment,{children:[J0.jsx("div",{ref:pYZ(Q,this.editorContentRef),...J}),(Z==null?void 0:Z.contentComponent)&&J0.jsx(dYZ,{contentComponent:Z.contentComponent})]})}},nYZ=v9.forwardRef((Z,Q)=>{let J=v9.default.useMemo(()=>{return Math.floor(Math.random()*4294967295).toString()},[Z.editor]);return v9.default.createElement(iYZ,{key:J,innerRef:Q,...Z})}),Lj=v9.default.memo(nYZ),sYZ=typeof window<"u"?h9.useLayoutEffect:h9.useEffect;Nm=typeof window>"u",rYZ=Nm||Boolean(typeof window<"u"&&window.next);Oj=q7.createContext({editor:null}),TPZ=Oj.Consumer,tYZ=G7.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),PPZ=Pm.default.forwardRef((Z,Q)=>{let{onDragStart:J}=eYZ(),q=Z.as||"div";return Rm.jsx(q,{...Z,ref:Q,"data-node-view-wrapper":"",onDragStart:J,style:{whiteSpace:"normal",...Z.style}})}),RPZ=Cm.default.createContext({markViewContentRef:()=>{}}),Aj=C6.createContext({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});Aj.displayName="TiptapContext";Dm.displayName="Tiptap";$m.displayName="Tiptap.Content";CPZ=Object.assign(Dm,{Content:$m})});function jj(Z,Q,J){return pY(Z,Tq(Q,J))}function eG(Z,Q){return typeof Z==="function"?Z(Q):Z}function Pq(Z){return Z.split("-")[0]}function Rq(Z){return Z.split("-")[1]}function Tj(Z){return Z==="x"?"y":"x"}function SB(Z){return Z==="y"?"height":"width"}function eq(Z){let Q=Z[0];return Q==="t"||Q==="b"?"y":"x"}function yB(Z){return Tj(eq(Z))}function Pj(Z,Q,J){if(J===void 0)J=!1;let q=Rq(Z),G=yB(Z),U=SB(G),K=G==="x"?q===(J?"end":"start")?"right":"left":q==="start"?"bottom":"top";if(Q.reference[U]>Q.floating[U])K=U7(K);return[K,U7(K)]}function ym(Z){let Q=U7(Z);return[z7(Z),Q,z7(Q)]}function z7(Z){return Z.includes("start")?Z.replace("start","end"):Z.replace("end","start")}function HqZ(Z,Q,J){switch(Z){case"top":case"bottom":if(J)return Q?Sm:km;return Q?km:Sm;case"left":case"right":return Q?UqZ:KqZ;default:return[]}}function wm(Z,Q,J,q){let G=Rq(Z),U=HqZ(Pq(Z),J==="start",q);if(G){if(U=U.map((K)=>K+"-"+G),Q)U=U.concat(U.map(z7))}return U}function U7(Z){let Q=Pq(Z);return zqZ[Q]+Z.slice(Q.length)}function WqZ(Z){var Q,J,q,G;return{top:(Q=Z.top)!=null?Q:0,right:(J=Z.right)!=null?J:0,bottom:(q=Z.bottom)!=null?q:0,left:(G=Z.left)!=null?G:0}}function wB(Z){return typeof Z!=="number"?WqZ(Z):{top:Z,right:Z,bottom:Z,left:Z}}function ZG(Z){let{x:Q,y:J,width:q,height:G}=Z;return{width:q,height:G,top:J,left:Q,right:Q+q,bottom:J+G,x:Q,y:J}}var Ij,Em,Nj,Tq,pY,K7,tG=(Z)=>({x:Z,y:Z}),zqZ,km,Sm,UqZ,KqZ;var xB=k(()=>{Ij=["top","right","bottom","left"],Em=["start","end"],Nj=Ij.reduce((Z,Q)=>Z.concat(Q,Q+"-"+Em[0],Q+"-"+Em[1]),[]),Tq=Math.min,pY=Math.max,K7=Math.round,zqZ={left:"right",right:"left",bottom:"top",top:"bottom"};km=["left","right"],Sm=["right","left"],UqZ=["top","bottom"],KqZ=["bottom","top"]});function xm(Z,Q,J){let{reference:q,floating:G}=Z,U=eq(Q),K=yB(Q),H=SB(K),B=Pq(Q),F=U==="y",M=q.x+q.width/2-G.width/2,O=q.y+q.height/2-G.height/2,V=q[H]/2-G[H]/2,A;switch(B){case"top":A={x:M,y:q.y-G.height};break;case"bottom":A={x:M,y:q.y+q.height};break;case"right":A={x:q.x+q.width,y:O};break;case"left":A={x:q.x-G.width,y:O};break;default:A={x:q.x,y:q.y}}let N=Rq(Q);if(N)A[K]+=V*(N==="end"?1:-1)*(J&&F?-1:1);return A}async function gm(Z,Q){var J;if(Q===void 0)Q={};let{x:q,y:G,platform:U,rects:K,elements:H,strategy:B}=Z,{boundary:F="clippingAncestors",rootBoundary:M="viewport",elementContext:O="floating",altBoundary:V=!1,padding:A=0}=eG(Q,Z),N=wB(A),P=H[V?O==="floating"?"reference":"floating":O],C=ZG(await U.getClippingRect({element:((J=await(U.isElement==null?void 0:U.isElement(P)))!=null?J:!0)?P:P.contextElement||await(U.getDocumentElement==null?void 0:U.getDocumentElement(H.floating)),boundary:F,rootBoundary:M,strategy:B})),y=O==="floating"?{x:q,y:G,width:K.floating.width,height:K.floating.height}:K.reference,f=await(U.getOffsetParent==null?void 0:U.getOffsetParent(H.floating)),u=await(U.isElement==null?void 0:U.isElement(f))&&await(U.getScale==null?void 0:U.getScale(f))||{x:1,y:1},n=ZG(U.convertOffsetParentRelativeRectToViewportRelativeRect?await U.convertOffsetParentRelativeRectToViewportRelativeRect({elements:H,rect:y,offsetParent:f,strategy:B}):y);return{top:(C.top-n.top+N.top)/u.y,bottom:(n.bottom-C.bottom+N.bottom)/u.y,left:(C.left-n.left+N.left)/u.x,right:(n.right-C.right+N.right)/u.x}}function _qZ(Z,Q,J){return(Z?[...J.filter((G)=>Rq(G)===Z),...J.filter((G)=>Rq(G)!==Z)]:J.filter((G)=>Pq(G)===G)).filter((G)=>{if(Z)return Rq(G)===Z||(Q?z7(G)!==G:!1);return!0})}function bm(Z,Q){return{top:Z.top-Q.height,right:Z.right-Q.width,bottom:Z.bottom-Q.height,left:Z.left-Q.width}}function vm(Z){return Ij.some((Q)=>Z[Q]>=0)}function pm(Z){let Q=Tq(...Z.map((U)=>U.left)),J=Tq(...Z.map((U)=>U.top)),q=pY(...Z.map((U)=>U.right)),G=pY(...Z.map((U)=>U.bottom));return{x:Q,y:J,width:q-Q,height:G-J}}function FqZ(Z){let Q=Z.slice().sort((G,U)=>G.y-U.y),J=[],q=null;for(let G=0;G<Q.length;G++){let U=Q[G];if(!q||U.y-q.y>q.height/2)J.push([U]);else J[J.length-1].push(U);q=U}return J.map((G)=>ZG(pm(G)))}async function MqZ(Z,Q){let{placement:J,platform:q,elements:G}=Z,U=await(q.isRTL==null?void 0:q.isRTL(G.floating)),K=Pq(J),H=Rq(J),B=eq(J)==="y",F=LqZ.has(K)?-1:1,M=U&&B?-1:1,O=eG(Q,Z),{mainAxis:V,crossAxis:A,alignmentAxis:N}=typeof O==="number"?{mainAxis:O,crossAxis:0,alignmentAxis:null}:{mainAxis:O.mainAxis||0,crossAxis:O.crossAxis||0,alignmentAxis:O.alignmentAxis};if(H&&typeof N==="number")A=H==="end"?N*-1:N;return B?{x:A*M,y:V*F}:{x:V*F,y:A*M}}var BqZ=50,hm=async(Z,Q,J)=>{let{placement:q="bottom",strategy:G="absolute",middleware:U=[],platform:K}=J,H=K.detectOverflow?K:{...K,detectOverflow:gm},B=await(K.isRTL==null?void 0:K.isRTL(Q)),F=await K.getElementRects({reference:Z,floating:Q,strategy:G}),{x:M,y:O}=xm(F,q,B),V=q,A=0,N={};for(let T=0;T<U.length;T++){let P=U[T];if(!P)continue;let{name:C,fn:y}=P,{x:f,y:u,data:n,reset:e}=await y({x:M,y:O,initialPlacement:q,placement:V,strategy:G,middlewareData:N,rects:F,platform:H,elements:{reference:Z,floating:Q}});if(M=f!=null?f:M,O=u!=null?u:O,N[C]={...N[C],...n},e&&A<BqZ){if(A++,typeof e==="object"){if(e.placement)V=e.placement;if(e.rects)F=e.rects===!0?await K.getElementRects({reference:Z,floating:Q,strategy:G}):e.rects;({x:M,y:O}=xm(F,V,B))}T=-1}}return{x:M,y:O,placement:V,strategy:G,middlewareData:N}},um=(Z)=>({name:"arrow",options:Z,async fn(Q){let{x:J,y:q,placement:G,rects:U,platform:K,elements:H,middlewareData:B}=Q,{element:F,padding:M=0}=eG(Z,Q)||{};if(F==null)return{};let O=wB(M),V={x:J,y:q},A=yB(G),N=SB(A),T=await K.getDimensions(F),P=A==="y",C=P?"top":"left",y=P?"bottom":"right",f=P?"clientHeight":"clientWidth",u=U.reference[N]+U.reference[A]-V[A]-U.floating[N],n=V[A]-U.reference[A],e=await(K.getOffsetParent==null?void 0:K.getOffsetParent(F)),a=e?e[f]:0;if(!a||!await(K.isElement==null?void 0:K.isElement(e)))a=H.floating[f]||U.floating[N];let c=u/2-n/2,GZ=a/2-T[N]/2-1,s=Tq(O[C],GZ),LZ=Tq(O[y],GZ),HZ=a-T[N]-LZ,KZ=a/2-T[N]/2+c,v=jj(s,KZ,HZ),i=!B.arrow&&Rq(G)!=null&&KZ!==v&&U.reference[N]/2-(KZ<s?s:LZ)-T[N]/2<0,x=i?KZ<s?KZ-s:KZ-HZ:0;return{[A]:V[A]+x,data:{[A]:v,centerOffset:KZ-v-x,...i&&{alignmentOffset:x}},reset:i}}}),fm=function(Z){if(Z===void 0)Z={};return{name:"autoPlacement",options:Z,async fn(Q){var J,q,G;let{rects:U,middlewareData:K,placement:H,platform:B,elements:F}=Q,{crossAxis:M=!1,alignment:O,allowedPlacements:V=Nj,autoAlignment:A=!0,...N}=eG(Z,Q),T=O!==void 0||V===Nj?_qZ(O||null,A,V):V,P=((J=K.autoPlacement)==null?void 0:J.index)||0,C=T[P];if(C==null)return{};if(H!==C)return{reset:{placement:T[0]}};let y=await B.detectOverflow(Q,N),f=Pj(C,U,await(B.isRTL==null?void 0:B.isRTL(F.floating))),u=[y[Pq(C)],y[f[0]],y[f[1]]],n=[...((q=K.autoPlacement)==null?void 0:q.overflows)||[],{placement:C,overflows:u}],e=T[P+1];if(e)return{data:{index:P+1,overflows:n},reset:{placement:e}};let a=n.map((s)=>{let LZ=Rq(s.placement);return[s.placement,LZ&&M?s.overflows.slice(0,2).reduce((HZ,KZ)=>HZ+KZ,0):s.overflows[0],s.overflows]}).sort((s,LZ)=>s[1]-LZ[1]),GZ=((G=a.filter((s)=>s[2].slice(0,Rq(s[0])?2:3).every((LZ)=>LZ<=0))[0])==null?void 0:G[0])||a[0][0];if(GZ!==H)return{data:{index:P+1,overflows:n},reset:{placement:GZ}};return{}}}},mm=function(Z){if(Z===void 0)Z={};return{name:"flip",options:Z,async fn(Q){var J,q;let{placement:G,middlewareData:U,rects:K,initialPlacement:H,platform:B,elements:F}=Q,{mainAxis:M=!0,crossAxis:O=!0,fallbackPlacements:V,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:T=!0,...P}=eG(Z,Q);if((J=U.arrow)!=null&&J.alignmentOffset)return{};let C=Pq(G),y=eq(H),f=Pq(H)===H,u=await(B.isRTL==null?void 0:B.isRTL(F.floating)),n=V||(f||!T?[U7(H)]:ym(H)),e=N!=="none";if(!V&&e)n.push(...wm(H,T,N,u));let a=[H,...n],c=await B.detectOverflow(Q,P),GZ=[],s=((q=U.flip)==null?void 0:q.overflows)||[];if(M)GZ.push(c[C]);if(O){let v=Pj(G,K,u);GZ.push(c[v[0]],c[v[1]])}if(s=[...s,{placement:G,overflows:GZ}],!GZ.every((v)=>v<=0)){var LZ,HZ;let v=(((LZ=U.flip)==null?void 0:LZ.index)||0)+1,i=a[v];if(i){if(!(O==="alignment"?y!==eq(i):!1)||s.every((YZ)=>eq(YZ.placement)===y?YZ.overflows[0]>0:!0))return{data:{index:v,overflows:s},reset:{placement:i}}}let x=(HZ=s.filter((d)=>d.overflows[0]<=0).sort((d,YZ)=>d.overflows[1]-YZ.overflows[1])[0])==null?void 0:HZ.placement;if(!x)switch(A){case"bestFit":{var KZ;let d=(KZ=s.filter((YZ)=>{if(e){let t=eq(YZ.placement);return t===y||t==="y"}return!0}).map((YZ)=>[YZ.placement,YZ.overflows.filter((t)=>t>0).reduce((t,$)=>t+$,0)]).sort((YZ,t)=>YZ[1]-t[1])[0])==null?void 0:KZ[0];if(d)x=d;break}case"initialPlacement":x=H;break}if(G!==x)return{reset:{placement:x}}}return{}}}},cm=function(Z){if(Z===void 0)Z={};return{name:"hide",options:Z,async fn(Q){let{rects:J,platform:q}=Q,{strategy:G="referenceHidden",...U}=eG(Z,Q);switch(G){case"referenceHidden":{let K=await q.detectOverflow(Q,{...U,elementContext:"reference"}),H=bm(K,J.reference);return{data:{referenceHiddenOffsets:H,referenceHidden:vm(H)}}}case"escaped":{let K=await q.detectOverflow(Q,{...U,altBoundary:!0}),H=bm(K,J.floating);return{data:{escapedOffsets:H,escaped:vm(H)}}}default:return{}}}}},dm=function(Z){if(Z===void 0)Z={};return{name:"inline",options:Z,async fn(Q){let{placement:J,elements:q,rects:G,platform:U,strategy:K}=Q,{padding:H=2,x:B,y:F}=eG(Z,Q),M=Array.from(await(U.getClientRects==null?void 0:U.getClientRects(q.reference))||[]);if(!M.length)return{};let O=FqZ(M),V=ZG(pm(M)),A=wB(H);function N(){if(O.length===2&&(O[0].left>O[1].right||O[1].left>O[0].right)&&B!=null&&F!=null)return O.find((P)=>B>P.left-A.left&&B<P.right+A.right&&F>P.top-A.top&&F<P.bottom+A.bottom)||V;if(O.length>=2){if(eq(J)==="y"){let e=O[0],a=O[O.length-1],c=Pq(J)==="top",GZ=e.top,s=a.bottom,LZ=c?e.left:a.left,HZ=c?e.right:a.right;return ZG({x:LZ,y:GZ,width:HZ-LZ,height:s-GZ})}let P=Pq(J)==="left",C=pY(...O.map((e)=>e.right)),y=Tq(...O.map((e)=>e.left)),f=O.filter((e)=>P?e.left===y:e.right===C),u=f[0].top,n=f[f.length-1].bottom;return ZG({x:y,y:u,width:C-y,height:n-u})}return V}let T=await U.getElementRects({reference:{getBoundingClientRect:N},floating:q.floating,strategy:K});if(G.reference.x!==T.reference.x||G.reference.y!==T.reference.y||G.reference.width!==T.reference.width||G.reference.height!==T.reference.height)return{reset:{rects:T}};return{}}}},LqZ,lm=function(Z){if(Z===void 0)Z=0;return{name:"offset",options:Z,async fn(Q){var J,q;let{x:G,y:U,placement:K,middlewareData:H}=Q,B=await MqZ(Q,Z);if(K===((J=H.offset)==null?void 0:J.placement)&&(q=H.arrow)!=null&&q.alignmentOffset)return{};return{x:G+B.x,y:U+B.y,data:{...B,placement:K}}}}},im=function(Z){if(Z===void 0)Z={};return{name:"shift",options:Z,async fn(Q){let{x:J,y:q,placement:G,platform:U}=Q,{mainAxis:K=!0,crossAxis:H=!1,limiter:B={fn:(y)=>{let{x:f,y:u}=y;return{x:f,y:u}}},...F}=eG(Z,Q),M={x:J,y:q},O=await U.detectOverflow(Q,F),V=eq(G),A=Tj(V),N=M[A],T=M[V],P=(y,f)=>jj(f+O[y==="y"?"top":"left"],f,f-O[y==="y"?"bottom":"right"]);if(K)N=P(A,N);if(H)T=P(V,T);let C=B.fn({...Q,[A]:N,[V]:T});return{...C,data:{x:C.x-J,y:C.y-q,enabled:{[A]:K,[V]:H}}}}}},nm=function(Z){if(Z===void 0)Z={};return{name:"size",options:Z,async fn(Q){let{placement:J,rects:q,platform:G,elements:U}=Q,{apply:K=()=>{},...H}=eG(Z,Q),B=await G.detectOverflow(Q,H),F=Pq(J),M=Rq(J),O=eq(J)==="y",{width:V,height:A}=q.floating,N,T;if(F==="top"||F==="bottom")N=F,T=M===(await(G.isRTL==null?void 0:G.isRTL(U.floating))?"start":"end")?"left":"right";else T=F,N=M==="end"?"top":"bottom";let P=A-B.top-B.bottom,C=V-B.left-B.right,y=Tq(A-B[N],P),f=Tq(V-B[T],C),u=Q.middlewareData.shift,n=!u,e=y,a=f;if(u!=null&&u.enabled.x)a=C;if(u!=null&&u.enabled.y)e=P;if(n&&!M)if(O)a=V-2*pY(B.left,B.right);else e=A-2*pY(B.top,B.bottom);await K({...Q,availableWidth:a,availableHeight:e});let c=await G.getDimensions(U.floating);if(V!==c.width||A!==c.height)return{reset:{rects:!0}};return{}}}};var sm=k(()=>{xB();xB();LqZ=new Set(["left","top"])});function vB(){return typeof window<"u"}function $6(Z){if(rm(Z))return(Z.nodeName||"").toLowerCase();return"#document"}function FY(Z){var Q;return(Z==null||(Q=Z.ownerDocument)==null?void 0:Q.defaultView)||window}function Y0(Z){var Q;return(Q=(rm(Z)?Z.ownerDocument:Z.document)||window.document)==null?void 0:Q.documentElement}function rm(Z){if(!vB())return!1;return Z instanceof Node||Z instanceof FY(Z).Node}function QG(Z){if(!vB())return!1;return Z instanceof Element||Z instanceof FY(Z).Element}function q0(Z){if(!vB())return!1;return Z instanceof HTMLElement||Z instanceof FY(Z).HTMLElement}function am(Z){if(!vB()||typeof ShadowRoot>"u")return!1;return Z instanceof ShadowRoot||Z instanceof FY(Z).ShadowRoot}function H7(Z){let{overflow:Q,overflowX:J,overflowY:q,display:G}=XG(Z);return/auto|scroll|overlay|hidden|clip/.test(Q+q+J)&&G!=="inline"&&G!=="contents"}function om(Z){return/^(table|td|th)$/.test($6(Z))}function W7(Z){try{if(Z.matches(":popover-open"))return!0}catch(Q){}try{return Z.matches(":modal")}catch(Q){return!1}}function gB(Z){let Q=QG(Z)?XG(Z):Z;return D6(Q.transform)||D6(Q.translate)||D6(Q.scale)||D6(Q.rotate)||D6(Q.perspective)||!hB()&&(D6(Q.backdropFilter)||D6(Q.filter))||OqZ.test(Q.willChange||"")||VqZ.test(Q.contain||"")}function tm(Z){let Q=u9(Z);while(q0(Q)&&!aK(Q)){if(gB(Q))return Q;else if(W7(Q))return null;Q=u9(Q)}return null}function hB(){if(Rj==null)Rj=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return Rj}function aK(Z){return/^(html|body|#document)$/.test($6(Z))}function XG(Z){return FY(Z).getComputedStyle(Z)}function B7(Z){if(QG(Z))return{scrollLeft:Z.scrollLeft,scrollTop:Z.scrollTop};return{scrollLeft:Z.scrollX,scrollTop:Z.scrollY}}function u9(Z){if($6(Z)==="html")return Z;let Q=Z.assignedSlot||Z.parentNode||am(Z)&&Z.host||Y0(Z);return am(Q)?Q.host:Q}function em(Z){let Q=u9(Z);if(aK(Q))return(Z.ownerDocument||Z).body;if(q0(Q)&&H7(Q))return Q;return em(Q)}function bB(Z,Q,J){var q;if(Q===void 0)Q=[];if(J===void 0)J=!0;let G=em(Z),U=G===((q=Z.ownerDocument)==null?void 0:q.body),K=FY(G);if(U){let H=uB(K);return Q.concat(K,K.visualViewport||[],H7(G)?G:[],H&&J?bB(H):[])}else return Q.concat(G,bB(G,[],J))}function uB(Z){return Z.parent&&Object.getPrototypeOf(Z.parent)?Z.frameElement:null}var OqZ,VqZ,D6=(Z)=>!!Z&&Z!=="none",Rj;var Zc=k(()=>{OqZ=/transform|translate|scale|rotate|perspective|filter/,VqZ=/paint|layout|strict|content/});function Jc(Z){let Q=XG(Z),J=parseFloat(Q.width)||0,q=parseFloat(Q.height)||0,G=q0(Z),U=G?Z.offsetWidth:J,K=G?Z.offsetHeight:q,H=K7(J)!==U||K7(q)!==K;if(H)J=U,q=K;return{width:J,height:q,$:H}}function Yc(Z){return!QG(Z)?Z.contextElement:Z}function rK(Z){let Q=Yc(Z);if(!q0(Q))return tG(1);let J=Q.getBoundingClientRect(),{width:q,height:G,$:U}=Jc(Q),K=(U?K7(J.width):J.width)/q,H=(U?K7(J.height):J.height)/G;if(!K||!Number.isFinite(K))K=1;if(!H||!Number.isFinite(H))H=1;return{x:K,y:H}}function qc(Z){let Q=FY(Z);if(!hB()||!Q.visualViewport)return AqZ;return{x:Q.visualViewport.offsetLeft,y:Q.visualViewport.offsetTop}}function IqZ(Z,Q,J){if(Q===void 0)Q=!1;return!!J&&Q&&J===FY(Z)}function _7(Z,Q,J,q){if(Q===void 0)Q=!1;if(J===void 0)J=!1;let G=Z.getBoundingClientRect(),U=Yc(Z),K=tG(1);if(Q)if(q){if(QG(q))K=rK(q)}else K=rK(Z);let H=IqZ(U,J,q)?qc(U):tG(0),B=(G.left+H.x)/K.x,F=(G.top+H.y)/K.y,M=G.width/K.x,O=G.height/K.y;if(U&&q){let V=FY(U),A=QG(q)?FY(q):q,N=V,T=uB(N);while(T&&A!==N){let P=rK(T),C=T.getBoundingClientRect(),y=XG(T),f=C.left+(T.clientLeft+parseFloat(y.paddingLeft))*P.x,u=C.top+(T.clientTop+parseFloat(y.paddingTop))*P.y;B*=P.x,F*=P.y,M*=P.x,O*=P.y,B+=f,F+=u,N=FY(T),T=uB(N)}}return ZG({width:M,height:O,x:B,y:F})}function fB(Z,Q){let J=B7(Z).scrollLeft;if(!Q)return _7(Y0(Z)).left+J;return Q.left+J}function Gc(Z,Q){let J=Z.getBoundingClientRect(),q=J.left+Q.scrollLeft-fB(Z,J),G=J.top+Q.scrollTop;return{x:q,y:G}}function NqZ(Z){let{elements:Q,rect:J,offsetParent:q,strategy:G}=Z,U=G==="fixed",K=Y0(q),H=Q?W7(Q.floating):!1;if(q===K||H&&U)return J;let B={scrollLeft:0,scrollTop:0},F=tG(1),M=tG(0),O=q0(q);if(O||!U){if($6(q)!=="body"||H7(K))B=B7(q);if(O){let A=_7(q);F=rK(q),M.x=A.x+q.clientLeft,M.y=A.y+q.clientTop}}let V=K&&!O&&!U?Gc(K,B):tG(0);return{width:J.width*F.x,height:J.height*F.y,x:J.x*F.x-B.scrollLeft*F.x+M.x+V.x,y:J.y*F.y-B.scrollTop*F.y+M.y+V.y}}function jqZ(Z){return Z.getClientRects?Array.from(Z.getClientRects()):[]}function TqZ(Z){let Q=B7(Z),J=Z.ownerDocument.body,q=pY(Z.scrollWidth,Z.clientWidth,J.scrollWidth,J.clientWidth),G=pY(Z.scrollHeight,Z.clientHeight,J.scrollHeight,J.clientHeight),U=-Q.scrollLeft+fB(Z),K=-Q.scrollTop;if(XG(J).direction==="rtl")U+=pY(Z.clientWidth,J.clientWidth)-q;return{width:q,height:G,x:U,y:K}}function RqZ(Z,Q,J){if(J===void 0)J="viewport";let q=J==="layoutViewport",G=FY(Z),U=Y0(Z),K=G.visualViewport,H=U.clientWidth,B=U.clientHeight,F=0,M=0;if(K){let V=!hB()||Q==="fixed";if(q){if(!V)F=-K.offsetLeft,M=-K.offsetTop}else if(H=K.width,B=K.height,V)F=K.offsetLeft,M=K.offsetTop}if(fB(U)<=0){let V=U.ownerDocument,A=V.body,N=getComputedStyle(A),T=V.compatMode==="CSS1Compat"?parseFloat(N.marginLeft)+parseFloat(N.marginRight)||0:0,P=Math.abs(U.clientWidth-A.clientWidth-T),C=getComputedStyle(U).scrollbarGutter==="stable both-edges"?P/2:P;if(C<=PqZ)H-=C}return{width:H,height:B,x:F,y:M}}function CqZ(Z,Q){let J=_7(Z,!0,Q==="fixed"),q=J.top+Z.clientTop,G=J.left+Z.clientLeft,U=rK(Z),K=Z.clientWidth*U.x,H=Z.clientHeight*U.y,B=G*U.x,F=q*U.y;return{width:K,height:H,x:B,y:F}}function Qc(Z,Q,J){let q;if(Q==="viewport"||Q==="layoutViewport")q=RqZ(Z,J,Q);else if(Q==="document")q=TqZ(Y0(Z));else if(QG(Q))q=CqZ(Q,J);else{let G=qc(Z);q={x:Q.x-G.x,y:Q.y-G.y,width:Q.width,height:Q.height}}return ZG(q)}function DqZ(Z,Q){let J=Q.get(Z);if(J)return J;let q=bB(Z,[],!1).filter((H)=>QG(H)&&$6(H)!=="body"),G=null,U=XG(Z).position==="fixed",K=U?u9(Z):Z;while(QG(K)&&!aK(K)){let H=XG(K),B=gB(K),F=G?G.position:U?"fixed":"";if(!B&&(F==="fixed"||F==="absolute"&&H.position==="static"))q=q.filter((O)=>O!==K);else G=H;K=u9(K)}return Q.set(Z,q),q}function $qZ(Z){let{element:Q,boundary:J,rootBoundary:q,strategy:G}=Z,K=[...J==="clippingAncestors"?W7(Q)?[]:DqZ(Q,this._c):[].concat(J),q],H=Qc(Q,K[0],G),B=H.top,F=H.right,M=H.bottom,O=H.left;for(let V=1;V<K.length;V++){let A=Qc(Q,K[V],G);B=pY(A.top,B),F=Tq(A.right,F),M=Tq(A.bottom,M),O=pY(A.left,O)}return{width:F-O,height:M-B,x:O,y:B}}function EqZ(Z){let{width:Q,height:J}=Jc(Z);return{width:Q,height:J}}function kqZ(Z,Q,J){let q=q0(Q),G=Y0(Q),U=J==="fixed",K=_7(Z,!0,U,Q),H={scrollLeft:0,scrollTop:0},B=tG(0);if(q||!U){if($6(Q)!=="body"||H7(G))H=B7(Q);if(q){let V=_7(Q,!0,U,Q);B.x=V.x+Q.clientLeft,B.y=V.y+Q.clientTop}}if(!q&&G)B.x=fB(G);let F=G&&!q&&!U?Gc(G,H):tG(0),M=K.left+H.scrollLeft-B.x-F.x,O=K.top+H.scrollTop-B.y-F.y;return{x:M,y:O,width:K.width,height:K.height}}function Cj(Z){return XG(Z).position==="static"}function Xc(Z,Q){if(!q0(Z)||XG(Z).position==="fixed")return null;if(Q)return Q(Z);let J=Z.offsetParent;if(Y0(Z)===J)J=J.ownerDocument.body;return J}function zc(Z,Q){let J=FY(Z);if(W7(Z))return J;if(!q0(Z)){let G=u9(Z);while(G&&!aK(G)){if(QG(G)&&!Cj(G))return G;G=u9(G)}return J}let q=Xc(Z,Q);while(q&&om(q)&&Cj(q))q=Xc(q,Q);if(q&&aK(q)&&Cj(q)&&!gB(q))return J;return q||tm(Z)||J}function yqZ(Z){return XG(Z).direction==="rtl"}var AqZ,PqZ=25,SqZ=async function(Z){let Q=this.getOffsetParent||zc,J=this.getDimensions,q=await J(Z.floating);return{reference:kqZ(Z.reference,await Q(Z.floating),Z.strategy),floating:{x:0,y:0,width:q.width,height:q.height}}},wqZ,mB,cB,pB,dB,lB,iB,nB,sB,aB=(Z,Q,J)=>{let q=new Map,G=J!=null?J:{},U={...wqZ,...G.platform,_c:q};return hm(Z,Q,{...G,platform:U})};var Dj=k(()=>{sm();xB();Zc();AqZ=tG(0);wqZ={convertOffsetParentRelativeRectToViewportRelativeRect:NqZ,getDocumentElement:Y0,getClippingRect:$qZ,getOffsetParent:zc,getElementRects:SqZ,getClientRects:jqZ,getDimensions:EqZ,getScale:rK,isElement:QG,isRTL:yqZ},mB=lm,cB=fm,pB=im,dB=mm,lB=nm,iB=cm,nB=um,sB=dm});function xqZ(Z){if(Z.type.spec.tableRole!="table")throw RangeError("Not a table node: "+Z.type.name);let Q=bqZ(Z),J=Z.childCount,q=[],G=0,U=null,K=[];for(let F=0,M=Q*J;F<M;F++)q[F]=0;for(let F=0,M=0;F<J;F++){let O=Z.child(F);M++;for(let N=0;;N++){while(G<q.length&&q[G]!=0)G++;if(N==O.childCount)break;let T=O.child(N),{colspan:P,rowspan:C,colwidth:y}=T.attrs;for(let f=0;f<C;f++){if(f+F>=J){(U||(U=[])).push({type:"overlong_rowspan",pos:M,n:C-f});break}let u=G+f*Q;for(let n=0;n<P;n++){if(q[u+n]==0)q[u+n]=M;else(U||(U=[])).push({type:"collision",row:F,pos:M,n:P-n});let e=y&&y[n];if(e){let a=(u+n)%Q*2,c=K[a];if(c==null||c!=e&&K[a+1]==1)K[a]=e,K[a+1]=1;else if(c==e)K[a+1]++}}}G+=P,M+=T.nodeSize}let V=(F+1)*Q,A=0;while(G<V)if(q[G++]==0)A++;if(A)(U||(U=[])).push({type:"missing",row:F,n:A});M++}if(Q===0||J===0)(U||(U=[])).push({type:"zero_sized"});let H=new G0(Q,J,q,U),B=!1;for(let F=0;!B&&F<K.length;F+=2)if(K[F]!=null&&K[F+1]<J)B=!0;if(B)vqZ(H,K,Z);return H}function bqZ(Z){let Q=-1,J=!1;for(let q=0;q<Z.childCount;q++){let G=Z.child(q),U=0;if(J)for(let K=0;K<q;K++){let H=Z.child(K);for(let B=0;B<H.childCount;B++){let F=H.child(B);if(K+F.attrs.rowspan>q)U+=F.attrs.colspan}}for(let K=0;K<G.childCount;K++){let H=G.child(K);if(U+=H.attrs.colspan,H.attrs.rowspan>1)J=!0}if(Q==-1)Q=U;else if(Q!=U)Q=Math.max(Q,U)}return Q}function vqZ(Z,Q,J){if(!Z.problems)Z.problems=[];let q={};for(let G=0;G<Z.map.length;G++){let U=Z.map[G];if(q[U])continue;q[U]=!0;let K=J.nodeAt(U);if(!K)throw RangeError(`No cell with offset ${U} found`);let H=null,B=K.attrs;for(let F=0;F<B.colspan;F++){let M=Q[(G+F)%Z.width*2];if(M!=null&&(!B.colwidth||B.colwidth[F]!=M))(H||(H=gqZ(B)))[F]=M}if(H)Z.problems.unshift({type:"colwidth mismatch",pos:U,colwidth:H})}}function gqZ(Z){if(Z.colwidth)return Z.colwidth.slice();let Q=[];for(let J=0;J<Z.colspan;J++)Q.push(0);return Q}function kj(Z){let Q=Z.cached.tableNodeTypes;if(!Q){Q=Z.cached.tableNodeTypes={};for(let J in Z.nodes){let q=Z.nodes[J],G=q.spec.tableRole;if(G)Q[G]=q}}return Q}function hqZ(Z){for(let Q=Z.depth-1;Q>0;Q--)if(Z.node(Q).type.spec.tableRole=="row")return Z.node(0).resolve(Z.before(Q+1));return null}function Wc(Z){let Q=Z.selection.$head;for(let J=Q.depth;J>0;J--)if(Q.node(J).type.spec.tableRole=="row")return!0;return!1}function uqZ(Z){let Q=Z.selection;if("$anchorCell"in Q&&Q.$anchorCell)return Q.$anchorCell.pos>Q.$headCell.pos?Q.$anchorCell:Q.$headCell;else if("node"in Q&&Q.node&&Q.node.type.spec.tableRole=="cell")return Q.$anchor;let J=hqZ(Q.$head)||fqZ(Q.$head);if(J)return J;throw RangeError(`No cell found around position ${Q.head}`)}function fqZ(Z){for(let{nodeAfter:Q,pos:J}=Z;Q;Q=Q.firstChild,J++){let q=Q.type.spec.tableRole;if(q=="cell"||q=="header_cell")return Z.doc.resolve(J)}for(let{nodeBefore:Q,pos:J}=Z;Q;Q=Q.lastChild,J--){let q=Q.type.spec.tableRole;if(q=="cell"||q=="header_cell")return Z.doc.resolve(J-Q.nodeSize)}}function Uc(Z){return Z.parent.type.spec.tableRole=="row"&&!!Z.nodeAfter}function Bc(Z,Q){return Z.depth==Q.depth&&Z.pos>=Q.start(-1)&&Z.pos<=Q.end(-1)}function _c(Z,Q,J){let q=Z.node(-1),G=G0.get(q),U=Z.start(-1),K=G.nextCell(Z.pos-U,Q,J);return K==null?null:Z.node(0).resolve(U+K)}function Kc(Z,Q,J=1){let q={...Z,colspan:Z.colspan-J};if(q.colwidth){if(q.colwidth=q.colwidth.slice(),q.colwidth.splice(Q,J),!q.colwidth.some((G)=>G>0))q.colwidth=null}return q}function Fc(Z){let Q=Z.selection,J=uqZ(Z),q=J.node(-1),G=J.start(-1),U=G0.get(q);return{...Q instanceof JG?U.rectBetween(Q.$anchorCell.pos-G,Q.$headCell.pos-G):U.findCell(J.pos-G),tableStart:G,map:U,table:q}}function cqZ(Z){return function(Q,J){if(!Wc(Q))return!1;if(J){let q=kj(Q.schema),G=Fc(Q),U=Q.tr,K=G.map.cellsInRect(Z=="column"?{left:G.left,top:0,right:G.right,bottom:G.map.height}:Z=="row"?{left:0,top:G.top,right:G.map.width,bottom:G.bottom}:G),H=K.map((B)=>G.table.nodeAt(B));for(let B=0;B<K.length;B++)if(H[B].type==q.header_cell)U.setNodeMarkup(G.tableStart+K[B],q.cell,H[B].attrs);if(U.steps.length===0)for(let B=0;B<K.length;B++)U.setNodeMarkup(G.tableStart+K[B],q.header_cell,H[B].attrs);J(U)}return!0}}function Hc(Z,Q,J){let q=Q.map.cellsInRect({left:0,top:0,right:Z=="row"?Q.map.width:1,bottom:Z=="column"?Q.map.height:1});for(let G=0;G<q.length;G++){let U=Q.table.nodeAt(q[G]);if(U&&U.type!==J.header_cell)return!1}return!0}function Sj(Z,Q){if(Q=Q||{useDeprecatedLogic:!1},Q.useDeprecatedLogic)return cqZ(Z);return function(J,q){if(!Wc(J))return!1;if(q){let G=kj(J.schema),U=Fc(J),K=J.tr,H=Hc("row",U,G),B=Hc("column",U,G),F=(Z==="column"?H:Z==="row"?B:!1)?1:0,M=Z=="column"?{left:0,top:F,right:1,bottom:U.map.height}:Z=="row"?{left:F,top:0,right:U.map.width,bottom:1}:U,O=Z=="column"?B?G.cell:G.header_cell:Z=="row"?H?G.cell:G.header_cell:G.cell;U.map.cellsInRect(M).forEach((V)=>{let A=V+U.tableStart,N=K.doc.nodeAt(A);if(N)K.setNodeMarkup(A,O,N.attrs)}),q(K)}return!0}}function rB(Z,Q){let J=Z.selection;if(!(J instanceof JG))return!1;if(Q){let q=Z.tr,G=kj(Z.schema).cell.createAndFill().content;if(J.forEachCell((U,K)=>{if(!U.content.eq(G))q.replace(q.mapping.map(K+1),q.mapping.map(K+U.nodeSize-1),new AZ(G,0,0))}),q.docChanged)Q(q)}return!0}function eB(Z,Q,J){if(J.eq(Z.selection))return!1;if(Q)Q(Z.tr.setSelection(J).scrollIntoView());return!0}function oB(Z,Q){return(J,q,G)=>{if(!G)return!1;let U=J.selection;if(U instanceof JG)return eB(J,q,mZ.near(U.$headCell,Q));if(Z!="horiz"&&!U.empty)return!1;let K=Lc(G,Z,Q);if(K==null)return!1;if(Z=="horiz")return eB(J,q,mZ.near(J.doc.resolve(U.head+Q),Q));else{let H=J.doc.resolve(K),B=_c(H,Z,Q),F;if(B)F=mZ.near(B,1);else if(Q<0)F=mZ.near(J.doc.resolve(H.before(-1)),-1);else F=mZ.near(J.doc.resolve(H.after(-1)),1);return eB(J,q,F)}}}function tB(Z,Q){return(J,q,G)=>{if(!G)return!1;let U=J.selection,K;if(U instanceof JG)K=U;else{let B=Lc(G,Z,Q);if(B==null)return!1;K=new JG(J.doc.resolve(B))}let H=_c(K.$headCell,Z,Q);if(!H)return!1;return eB(J,q,new JG(K.$anchorCell,H))}}function Lc(Z,Q,J){if(!(Z.state.selection instanceof DZ))return null;let{$head:q}=Z.state.selection;for(let G=q.depth-1;G>=0;G--){let U=q.node(G);if((J<0?q.index(G):q.indexAfter(G))!=(J<0?0:U.childCount))return null;if(U.type.spec.tableRole=="cell"||U.type.spec.tableRole=="header_cell"){let K=q.before(G),H=Q=="vert"?J>0?"down":"up":J>0?"right":"left";return Z.endOfTextblock(H)?K:null}}return null}var $j,Ej,G0=class{constructor(Z,Q,J,q){this.width=Z,this.height=Q,this.map=J,this.problems=q}findCell(Z){for(let Q=0;Q<this.map.length;Q++){let J=this.map[Q];if(J!=Z)continue;let q=Q%this.width,G=Q/this.width|0,U=q+1,K=G+1;for(let H=1;U<this.width&&this.map[Q+H]==J;H++)U++;for(let H=1;K<this.height&&this.map[Q+this.width*H]==J;H++)K++;return{left:q,top:G,right:U,bottom:K}}throw RangeError(`No cell with offset ${Z} found`)}colCount(Z){for(let Q=0;Q<this.map.length;Q++)if(this.map[Q]==Z)return Q%this.width;throw RangeError(`No cell with offset ${Z} found`)}nextCell(Z,Q,J){let{left:q,right:G,top:U,bottom:K}=this.findCell(Z);if(Q=="horiz"){if(J<0?q==0:G==this.width)return null;return this.map[U*this.width+(J<0?q-1:G)]}else{if(J<0?U==0:K==this.height)return null;return this.map[q+this.width*(J<0?U-1:K)]}}rectBetween(Z,Q){let{left:J,right:q,top:G,bottom:U}=this.findCell(Z),{left:K,right:H,top:B,bottom:F}=this.findCell(Q);return{left:Math.min(J,K),top:Math.min(G,B),right:Math.max(q,H),bottom:Math.max(U,F)}}cellsInRect(Z){let Q=[],J={};for(let q=Z.top;q<Z.bottom;q++)for(let G=Z.left;G<Z.right;G++){let U=q*this.width+G,K=this.map[U];if(J[K])continue;if(J[K]=!0,G==Z.left&&G&&this.map[U-1]==K||q==Z.top&&q&&this.map[U-this.width]==K)continue;Q.push(K)}return Q}positionAt(Z,Q,J){for(let q=0,G=0;;q++){let U=G+J.child(q).nodeSize;if(q==Z){let K=Q+Z*this.width,H=(Z+1)*this.width;while(K<H&&this.map[K]<G)K++;return K==H?U-1:this.map[K]}G=U}}static get(Z){return $j(Z)||Ej(Z,xqZ(Z))}},lPZ,JG,mqZ=class Z{constructor(Q,J){this.anchor=Q,this.head=J}map(Q){return new Z(Q.map(this.anchor),Q.map(this.head))}resolve(Q){let J=Q.resolve(this.anchor),q=Q.resolve(this.head);if(J.parent.type.spec.tableRole=="row"&&q.parent.type.spec.tableRole=="row"&&J.index()<J.parent.childCount&&q.index()<q.parent.childCount&&Bc(J,q))return new JG(J,q);else return mZ.near(q,1)}},iPZ,nPZ,sPZ,aPZ,rPZ,oPZ;var Mc=k(()=>{nz();lz();zB();if(typeof WeakMap<"u"){let Z=new WeakMap;$j=(Q)=>Z.get(Q),Ej=(Q,J)=>{return Z.set(Q,J),J}}else{let Z=[],Q=10,J=0;$j=(q)=>{for(let G=0;G<Z.length;G+=2)if(Z[G]==q)return Z[G+1]},Ej=(q,G)=>{if(J==10)J=0;return Z[J++]=q,Z[J++]=G}}lPZ=new tZ("selectingCells");JG=class Z extends mZ{constructor(Q,J=Q){let q=Q.node(-1),G=G0.get(q),U=Q.start(-1),K=G.rectBetween(Q.pos-U,J.pos-U),H=Q.node(0),B=G.cellsInRect(K).filter((M)=>M!=J.pos-U);B.unshift(J.pos-U);let F=B.map((M)=>{let O=q.nodeAt(M);if(!O)throw RangeError(`No cell with offset ${M} found`);let V=U+M+1;return new fH(H.resolve(V),H.resolve(V+O.content.size))});super(F[0].$from,F[0].$to,F);this.$anchorCell=Q,this.$headCell=J}map(Q,J){let q=Q.resolve(J.map(this.$anchorCell.pos)),G=Q.resolve(J.map(this.$headCell.pos));if(Uc(q)&&Uc(G)&&Bc(q,G)){let U=this.$anchorCell.node(-1)!=q.node(-1);if(U&&this.isRowSelection())return Z.rowSelection(q,G);else if(U&&this.isColSelection())return Z.colSelection(q,G);else return new Z(q,G)}return DZ.between(q,G)}content(){let Q=this.$anchorCell.node(-1),J=G0.get(Q),q=this.$anchorCell.start(-1),G=J.rectBetween(this.$anchorCell.pos-q,this.$headCell.pos-q),U={},K=[];for(let B=G.top;B<G.bottom;B++){let F=[];for(let M=B*J.width+G.left,O=G.left;O<G.right;O++,M++){let V=J.map[M];if(U[V])continue;U[V]=!0;let A=J.findCell(V),N=Q.nodeAt(V);if(!N)throw RangeError(`No cell with offset ${V} found`);let T=G.left-A.left,P=A.right-G.right;if(T>0||P>0){let C=N.attrs;if(T>0)C=Kc(C,0,T);if(P>0)C=Kc(C,C.colspan-P,P);if(A.left<G.left){if(N=N.type.createAndFill(C),!N)throw RangeError(`Could not create cell with attrs ${JSON.stringify(C)}`)}else N=N.type.create(C,N.content)}if(A.top<G.top||A.bottom>G.bottom){let C={...N.attrs,rowspan:Math.min(A.bottom,G.bottom)-Math.max(A.top,G.top)};if(A.top<G.top)N=N.type.createAndFill(C);else N=N.type.create(C,N.content)}F.push(N)}K.push(Q.child(B).copy(UZ.from(F)))}let H=this.isColSelection()&&this.isRowSelection()?Q:K;return new AZ(UZ.from(H),1,1)}replace(Q,J=AZ.empty){let q=Q.steps.length,G=this.ranges;for(let K=0;K<G.length;K++){let{$from:H,$to:B}=G[K],F=Q.mapping.slice(q);Q.replace(F.map(H.pos),F.map(B.pos),K?AZ.empty:J)}let U=mZ.findFrom(Q.doc.resolve(Q.mapping.slice(q).map(this.to)),-1);if(U)Q.setSelection(U)}replaceWith(Q,J){this.replace(Q,new AZ(UZ.from(J),0,0))}forEachCell(Q){let J=this.$anchorCell.node(-1),q=G0.get(J),G=this.$anchorCell.start(-1),U=q.cellsInRect(q.rectBetween(this.$anchorCell.pos-G,this.$headCell.pos-G));for(let K=0;K<U.length;K++)Q(J.nodeAt(U[K]),G+U[K])}isColSelection(){let Q=this.$anchorCell.index(-1),J=this.$headCell.index(-1);if(Math.min(Q,J)>0)return!1;let q=Q+this.$anchorCell.nodeAfter.attrs.rowspan,G=J+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(q,G)==this.$headCell.node(-1).childCount}static colSelection(Q,J=Q){let q=Q.node(-1),G=G0.get(q),U=Q.start(-1),K=G.findCell(Q.pos-U),H=G.findCell(J.pos-U),B=Q.node(0);if(K.top<=H.top){if(K.top>0)Q=B.resolve(U+G.map[K.left]);if(H.bottom<G.height)J=B.resolve(U+G.map[G.width*(G.height-1)+H.right-1])}else{if(H.top>0)J=B.resolve(U+G.map[H.left]);if(K.bottom<G.height)Q=B.resolve(U+G.map[G.width*(G.height-1)+K.right-1])}return new Z(Q,J)}isRowSelection(){let Q=this.$anchorCell.node(-1),J=G0.get(Q),q=this.$anchorCell.start(-1),G=J.colCount(this.$anchorCell.pos-q),U=J.colCount(this.$headCell.pos-q);if(Math.min(G,U)>0)return!1;let K=G+this.$anchorCell.nodeAfter.attrs.colspan,H=U+this.$headCell.nodeAfter.attrs.colspan;return Math.max(K,H)==J.width}eq(Q){return Q instanceof Z&&Q.$anchorCell.pos==this.$anchorCell.pos&&Q.$headCell.pos==this.$headCell.pos}static rowSelection(Q,J=Q){let q=Q.node(-1),G=G0.get(q),U=Q.start(-1),K=G.findCell(Q.pos-U),H=G.findCell(J.pos-U),B=Q.node(0);if(K.left<=H.left){if(K.left>0)Q=B.resolve(U+G.map[K.top*G.width]);if(H.right<G.width)J=B.resolve(U+G.map[G.width*(H.top+1)-1])}else{if(H.left>0)J=B.resolve(U+G.map[H.top*G.width]);if(K.right<G.width)Q=B.resolve(U+G.map[G.width*(K.top+1)-1])}return new Z(Q,J)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(Q,J){return new Z(Q.resolve(J.anchor),Q.resolve(J.head))}static create(Q,J,q=J){return new Z(Q.resolve(J),Q.resolve(q))}getBookmark(){return new mqZ(this.$anchorCell.pos,this.$headCell.pos)}};JG.prototype.visible=!1;mZ.jsonID("cell",JG);iPZ=new tZ("fix-tables");nPZ=Sj("row",{useDeprecatedLogic:!0}),sPZ=Sj("column",{useDeprecatedLogic:!0}),aPZ=Sj("cell",{useDeprecatedLogic:!0});rPZ=tH({ArrowLeft:oB("horiz",-1),ArrowRight:oB("horiz",1),ArrowUp:oB("vert",-1),ArrowDown:oB("vert",1),"Shift-ArrowLeft":tB("horiz",-1),"Shift-ArrowRight":tB("horiz",1),"Shift-ArrowUp":tB("vert",-1),"Shift-ArrowDown":tB("vert",1),Backspace:rB,"Mod-Backspace":rB,Delete:rB,"Mod-Delete":rB});oPZ=new tZ("tableColumnResizing")});var Oc=k(()=>{Mc()});function pqZ(Z,Q){let J=Math.min(Z.top,Q.top),q=Math.max(Z.bottom,Q.bottom),G=Math.min(Z.left,Q.left),K=Math.max(Z.right,Q.right)-G,H=q-J;return new DOMRect(G,J,K,H)}var dqZ=class{constructor({editor:Z,element:Q,view:J,pluginKey:q="bubbleMenu",updateDelay:G=250,resizeDelay:U=60,shouldShow:K,appendTo:H,getReferencedVirtualElement:B,options:F}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:O,state:V,from:A,to:N})=>{let{doc:T,selection:P}=V,{empty:C}=P,y=!T.textBetween(A,N).length&&OB(V.selection),f=this.element.contains(document.activeElement);if(!(O.hasFocus()||f)||C||y||!this.editor.isEditable)return!1;return!0},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{if(this.resizeDebounceTimer)clearTimeout(this.resizeDebounceTimer);this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:O})=>{var V;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}if((O==null?void 0:O.relatedTarget)&&((V=this.element.parentNode)==null?void 0:V.contains(O.relatedTarget)))return;if((O==null?void 0:O.relatedTarget)===this.editor.view.dom)return;this.hide()},this.handleDebouncedUpdate=(O,V)=>{let A=!(V==null?void 0:V.selection.eq(O.state.selection)),N=!(V==null?void 0:V.doc.eq(O.state.doc));if(!A&&!N)return;if(this.updateDebounceTimer)clearTimeout(this.updateDebounceTimer);this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(O,A,N,V)},this.updateDelay)},this.updateHandler=(O,V,A,N)=>{let{composing:T}=O;if(T||!V&&!A)return;if(!this.getShouldShow(N)){this.hide();return}this.show(),this.updatePosition()},this.transactionHandler=({transaction:O})=>{let V=O.getMeta(this.pluginKey);if(V==="updatePosition")this.updatePosition();else if(V&&typeof V==="object"&&V.type==="updateOptions")this.updateOptions(V.options);else if(V==="hide")this.hide();else if(V==="show")this.updatePosition(),this.show()};var M;if(this.editor=Z,this.element=Q,this.view=J,this.pluginKey=q,this.updateDelay=G,this.resizeDelay=U,this.appendTo=H,this.scrollTarget=(M=F==null?void 0:F.scrollTarget)!=null?M:window,this.getReferencedVirtualElement=B,this.floatingUIOptions={...this.floatingUIOptions,...F},this.element.tabIndex=0,K)this.shouldShow=K;if(this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(J,J.state),this.getShouldShow())this.show(),this.updatePosition()}get middlewares(){let Z=[];if(this.floatingUIOptions.flip)Z.push(dB(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)Z.push(pB(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)Z.push(mB(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)Z.push(nB(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)Z.push(lB(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)Z.push(cB(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)Z.push(iB(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)Z.push(sB(typeof this.floatingUIOptions.inline!=="boolean"?this.floatingUIOptions.inline:void 0));return Z}get virtualElement(){var Z,Q,J;let{selection:q}=this.editor.state,G=(Z=this.getReferencedVirtualElement)==null?void 0:Z.call(this);if(G)return G;if(!((J=(Q=this.view)==null?void 0:Q.dom)==null?void 0:J.parentNode))return;let U=TB(this.view,q.from,q.to),K={getBoundingClientRect:()=>U,getClientRects:()=>[U]};if(q instanceof SZ){let H=this.view.nodeDOM(q.from),B=H.dataset.nodeViewWrapper?H:H.querySelector("[data-node-view-wrapper]");if(B)H=B;if(H)K={getBoundingClientRect:()=>H.getBoundingClientRect(),getClientRects:()=>[H.getBoundingClientRect()]}}if(q instanceof JG){let{$anchorCell:H,$headCell:B}=q,F=H?H.pos:B.pos,M=B?B.pos:H.pos,O=this.view.nodeDOM(F),V=this.view.nodeDOM(M);if(!O||!V)return;let A=O===V?O.getBoundingClientRect():pqZ(O.getBoundingClientRect(),V.getBoundingClientRect());K={getBoundingClientRect:()=>A,getClientRects:()=>[A]}}return K}updatePosition(){if(!this.isVisible)return;let Z=this.virtualElement;if(!Z)return;aB(Z,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:Q,y:J,strategy:q,middlewareData:G})=>{var U,K;if(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)return;if(((U=G.hide)==null?void 0:U.referenceHidden)||((K=G.hide)==null?void 0:K.escaped)){this.element.style.visibility="hidden";return}if(this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=q,this.element.style.left=`${Q}px`,this.element.style.top=`${J}px`,this.isVisible&&this.floatingUIOptions.onUpdate)this.floatingUIOptions.onUpdate()})}update(Z,Q){let{state:J}=Z,q=J.selection.from!==J.selection.to;if(this.updateDelay>0&&q){this.handleDebouncedUpdate(Z,Q);return}let G=!(Q==null?void 0:Q.selection.eq(Z.state.selection)),U=!(Q==null?void 0:Q.doc.eq(Z.state.doc));this.updateHandler(Z,G,U,Q)}getShouldShow(Z){var Q;let{state:J}=this.view,{selection:q}=J,{ranges:G}=q,U=Math.min(...G.map((B)=>B.$from.pos)),K=Math.max(...G.map((B)=>B.$to.pos));return((Q=this.shouldShow)==null?void 0:Q.call(this,{editor:this.editor,element:this.element,view:this.view,state:J,oldState:Z,from:U,to:K}))||!1}show(){var Z;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let Q=typeof this.appendTo==="function"?this.appendTo():this.appendTo;if((Z=Q!=null?Q:this.view.dom.parentElement)==null||Z.appendChild(this.element),this.floatingUIOptions.onShow)this.floatingUIOptions.onShow();this.isVisible=!0}hide(){if(!this.isVisible)return;if(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide)this.floatingUIOptions.onHide();this.isVisible=!1}updateOptions(Z){var Q;if(Z.updateDelay!==void 0)this.updateDelay=Z.updateDelay;if(Z.resizeDelay!==void 0)this.resizeDelay=Z.resizeDelay;if(Z.appendTo!==void 0)this.appendTo=Z.appendTo;if(Z.getReferencedVirtualElement!==void 0)this.getReferencedVirtualElement=Z.getReferencedVirtualElement;if(Z.shouldShow!==void 0){if(Z.shouldShow)this.shouldShow=Z.shouldShow}if(Z.options!==void 0){let J=(Q=Z.options.scrollTarget)!=null?Q:window;if(J!==this.scrollTarget)this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=J,this.scrollTarget.addEventListener("scroll",this.resizeHandler);this.floatingUIOptions={...this.floatingUIOptions,...Z.options}}}destroy(){if(this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy)this.floatingUIOptions.onDestroy()}},yj=(Z)=>{return new lZ({key:typeof Z.pluginKey==="string"?new tZ(Z.pluginKey):Z.pluginKey,view:(Q)=>new dqZ({view:Q,...Z})})},zRZ;var Vc=k(()=>{aZ();Dj();aZ();YQ();Oc();zRZ=NQ.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){if(!this.options.element)return[];return[yj({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]}})});var lqZ=class{constructor({editor:Z,element:Q,view:J,pluginKey:q="floatingMenu",updateDelay:G=250,resizeDelay:U=60,options:K,appendTo:H,shouldShow:B}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:M,state:O})=>{let{selection:V}=O,{$anchor:A,empty:N}=V,T=A.depth===1,P=A.parent.isTextblock&&!A.parent.type.spec.code&&!A.parent.textContent&&A.parent.childCount===0&&!this.getTextContent(A.parent);if(!M.hasFocus()||!N||!T||!P||!this.editor.isEditable)return!1;return!0},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(M,O,V,A)=>{let{composing:N}=M;if(N||!O&&!V)return;if(!this.getShouldShow(A)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:M})=>{var O;if(this.preventHide){this.preventHide=!1;return}if((M==null?void 0:M.relatedTarget)&&((O=this.element.parentNode)==null?void 0:O.contains(M.relatedTarget)))return;if((M==null?void 0:M.relatedTarget)===this.editor.view.dom)return;this.hide()},this.transactionHandler=({transaction:M})=>{let O=M.getMeta(this.pluginKey);if(O==="updatePosition")this.updatePosition();else if(O&&typeof O==="object"&&O.type==="updateOptions")this.updateOptions(O.options);else if(O==="hide")this.hide();else if(O==="show")this.updatePosition(),this.show()},this.resizeHandler=()=>{if(this.resizeDebounceTimer)clearTimeout(this.resizeDebounceTimer);this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)};var F;if(this.editor=Z,this.element=Q,this.view=J,this.pluginKey=q,this.updateDelay=G,this.resizeDelay=U,this.appendTo=H,this.scrollTarget=(F=K==null?void 0:K.scrollTarget)!=null?F:window,this.floatingUIOptions={...this.floatingUIOptions,...K},this.element.tabIndex=0,B)this.shouldShow=B;if(this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(J,J.state),this.getShouldShow())this.show(),this.updatePosition()}getTextContent(Z){return Uj(Z,{textSerializers:IB(this.editor.schema)})}get middlewares(){let Z=[];if(this.floatingUIOptions.flip)Z.push(dB(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)Z.push(pB(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)Z.push(mB(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)Z.push(nB(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)Z.push(lB(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)Z.push(cB(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)Z.push(iB(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)Z.push(sB(typeof this.floatingUIOptions.inline!=="boolean"?this.floatingUIOptions.inline:void 0));return Z}getShouldShow(Z){var Q;let{state:J}=this.view,{selection:q}=J,{ranges:G}=q,U=Math.min(...G.map((B)=>B.$from.pos)),K=Math.max(...G.map((B)=>B.$to.pos));return(Q=this.shouldShow)==null?void 0:Q.call(this,{editor:this.editor,view:this.view,state:J,oldState:Z,from:U,to:K})}updateOptions(Z){var Q;if(Z.updateDelay!==void 0)this.updateDelay=Z.updateDelay;if(Z.resizeDelay!==void 0)this.resizeDelay=Z.resizeDelay;if(Z.appendTo!==void 0)this.appendTo=Z.appendTo;if(Z.shouldShow!==void 0){if(Z.shouldShow)this.shouldShow=Z.shouldShow}if(Z.options!==void 0){let J=(Q=Z.options.scrollTarget)!=null?Q:window;if(J!==this.scrollTarget)this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=J,this.scrollTarget.addEventListener("scroll",this.resizeHandler);this.floatingUIOptions={...this.floatingUIOptions,...Z.options}}}updatePosition(){var Z,Q;if(!((Q=(Z=this.view)==null?void 0:Z.dom)==null?void 0:Q.parentNode))return;let{selection:J}=this.editor.state,q=TB(this.view,J.from,J.to);aB({getBoundingClientRect:()=>q,getClientRects:()=>[q]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:U,y:K,strategy:H,middlewareData:B})=>{var F,M;if(((F=B.hide)==null?void 0:F.referenceHidden)||((M=B.hide)==null?void 0:M.escaped)){this.element.style.visibility="hidden";return}if(this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=H,this.element.style.left=`${U}px`,this.element.style.top=`${K}px`,this.isVisible&&this.floatingUIOptions.onUpdate)this.floatingUIOptions.onUpdate()})}update(Z,Q){let J=!(Q==null?void 0:Q.selection.eq(Z.state.selection)),q=!(Q==null?void 0:Q.doc.eq(Z.state.doc));this.updateHandler(Z,J,q,Q)}show(){var Z;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let Q=typeof this.appendTo==="function"?this.appendTo():this.appendTo;if((Z=Q!=null?Q:this.view.dom.parentElement)==null||Z.appendChild(this.element),this.floatingUIOptions.onShow)this.floatingUIOptions.onShow();this.isVisible=!0}hide(){if(!this.isVisible)return;if(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide)this.floatingUIOptions.onHide();this.isVisible=!1}destroy(){if(this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy)this.floatingUIOptions.onDestroy()}},wj=(Z)=>{return new lZ({key:typeof Z.pluginKey==="string"?new tZ(Z.pluginKey):Z.pluginKey,view:(Q)=>new lqZ({view:Q,...Z})})},FRZ;var Ac=k(()=>{aZ();Dj();aZ();YQ();FRZ=NQ.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:Z,dispatch:Q})=>{if(Q)Z.setMeta(this.options.pluginKey,"updatePosition");return!0}}},addProseMirrorPlugins(){if(!this.options.element)return[];return[wj({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]}})});function jc(Z,Q){return Z!=null?Z:new tZ(Q)}function bj(Z,Q){return/^on[A-Z]/.test(Z)&&typeof Q==="function"}function tqZ(Z){if(Z.startsWith("aria-")||Z.startsWith("data-"))return Z;return Z}function eqZ(Z){return Z.startsWith("aria-")||Z.startsWith("data-")||rqZ.has(Z)}function Pc(Z){if(Z.startsWith("--"))return Z;return Z.replace(/[A-Z]/g,(Q)=>`-${Q.toLowerCase()}`)}function ZGZ(Z){var Q;let J=Z.endsWith("Capture"),G=(J?Z.slice(0,-7):Z).slice(2);return{eventName:(Q=oqZ[G])!=null?Q:G.toLowerCase(),options:J?{capture:!0}:void 0}}function QGZ(Z,Q){let J=Q.defaultPrevented,q=!1,G=Object.create(Q);return Object.defineProperties(G,{nativeEvent:{value:Q},currentTarget:{value:Z},target:{value:Q.target},persist:{value:()=>{return}},isDefaultPrevented:{value:()=>J},isPropagationStopped:{value:()=>q},preventDefault:{value:()=>{J=!0,Q.preventDefault()}},stopPropagation:{value:()=>{q=!0,Q.stopPropagation()}}}),G}function xj(Z){return aqZ.has(Z)}function Ic(Z,Q,J){if(Q==="tabIndex"){Z.tabIndex=Number(J);return}Z[Q]=J}function XGZ(Z,Q){if(Q==="tabIndex"){Z.removeAttribute("tabindex");return}let J=Z[Q];if(typeof J==="boolean"){Z[Q]=!1;return}if(typeof J==="number"){Z[Q]=0;return}Z[Q]=""}function JGZ(Z,Q){if(typeof Q!=="number"||Q===0||Z.startsWith("--")||nqZ.has(Z))return String(Q);return`${Q}px`}function YGZ(Z,Q){if(Tc.has(Q))return;Z.style.removeProperty(Pc(Q))}function qGZ(Z,Q,J){if(Tc.has(Q))return;Z.style.setProperty(Pc(Q),JGZ(Q,J))}function GGZ(Z,Q,J){new Set([...Object.keys(Q),...Object.keys(J)]).forEach((G)=>{if(sqZ.has(G)||!eqZ(G)||bj(G,Q[G])||bj(G,J[G]))return;let U=Q[G],K=J[G];if(U===K)return;let H=tqZ(G);if(K==null||K===!1){if(xj(G))XGZ(Z,G);Z.removeAttribute(H);return}if(K===!0){if(xj(G))Ic(Z,G,!0);Z.setAttribute(H,"");return}if(xj(G)){Ic(Z,G,K);return}Z.setAttribute(H,String(K))})}function zGZ(Z,Q,J){if(Q===J)return;if(J){Z.className=J;return}Z.removeAttribute("class")}function UGZ(Z,Q,J){let q=Q!=null?Q:{},G=J!=null?J:{};new Set([...Object.keys(q),...Object.keys(G)]).forEach((K)=>{let H=q[K],B=G[K];if(H===B)return;if(B==null){YGZ(Z,K);return}qGZ(Z,K,B)})}function KGZ(Z,Q,J){Q.forEach(({eventName:G,listener:U,options:K})=>{Z.removeEventListener(G,U,K)});let q=[];return Object.entries(J).forEach(([G,U])=>{if(!bj(G,U))return;let{eventName:K,options:H}=ZGZ(G),B=(F)=>{U(QGZ(Z,F))};Z.addEventListener(K,B,H),q.push({eventName:K,listener:B,options:H})}),q}function Rc(Z,Q){let J=E6.useRef({}),q=E6.useRef([]);iqZ(()=>{let G=J.current;return zGZ(Z,G.className,Q.className),UGZ(Z,G.style,Q.style),GGZ(Z,G,Q),q.current=KGZ(Z,q.current,Q),J.current=Q,()=>{q.current.forEach(({eventName:U,listener:K,options:H})=>{Z.removeEventListener(U,K,H)}),q.current=[]}},[Z,Q])}var Cq,Nc,E6,Dq,Dc,iqZ,Tc,nqZ,sqZ,aqZ,rqZ,oqZ,Cc,jRZ;var $c=k(()=>{Vc();kB();YQ();Ac();kB();Cq=S(JZ(),1),Nc=S(uJ(),1),E6=S(JZ(),1),Dq=S(JZ(),1),Dc=S(uJ(),1);iqZ=typeof window<"u"?E6.useLayoutEffect:E6.useEffect,Tc=new Set(["left","opacity","position","top","visibility","width"]),nqZ=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),sqZ=new Set(["children","className","style"]),aqZ=new Set(["tabIndex"]),rqZ=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),oqZ={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};Cc=Cq.default.forwardRef(({pluginKey:Z,editor:Q,updateDelay:J,resizeDelay:q,appendTo:G,shouldShow:U=null,getReferencedVirtualElement:K,options:H,children:B,...F},M)=>{let O=Cq.useRef(document.createElement("div")),V=Cq.useRef(jc(Z,"bubbleMenu")).current;if(Rc(O.current,F),typeof M==="function")M(O.current);else if(M)M.current=O.current;let{editor:A}=EB(),N=Q||A,T={updateDelay:J,resizeDelay:q,appendTo:G,pluginKey:V,shouldShow:U,getReferencedVirtualElement:K,options:H},P=Cq.useRef(T);P.current=T;let[C,y]=Cq.useState(!1),f=Cq.useRef(!0);return Cq.useEffect(()=>{if(N==null?void 0:N.isDestroyed)return;if(!N){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}let u=O.current;u.style.visibility="hidden",u.style.position="absolute";let n=yj({...P.current,editor:N,element:u});N.registerPlugin(n);let e=P.current.pluginKey;return f.current=!0,y(!0),()=>{y(!1),N.unregisterPlugin(e),window.requestAnimationFrame(()=>{if(u.parentNode)u.parentNode.removeChild(u)})}},[N]),Cq.useEffect(()=>{if(!C||!N||N.isDestroyed)return;if(f.current){f.current=!1;return}N.view.dispatch(N.state.tr.setMeta(V,{type:"updateOptions",options:P.current}))},[C,N,J,q,U,H,G,K,V]),Nc.createPortal(B,O.current)}),jRZ=Dq.default.forwardRef(({pluginKey:Z,editor:Q,updateDelay:J,resizeDelay:q,appendTo:G,shouldShow:U=null,options:K,children:H,...B},F)=>{let M=Dq.useRef(document.createElement("div")),O=Dq.useRef(jc(Z,"floatingMenu")).current;if(Rc(M.current,B),typeof F==="function")F(M.current);else if(F)F.current=M.current;let{editor:V}=EB(),A=Q||V,N={updateDelay:J,resizeDelay:q,appendTo:G,pluginKey:O,shouldShow:U,options:K},T=Dq.useRef(N);T.current=N;let[P,C]=Dq.useState(!1),y=Dq.useRef(!0);return Dq.useEffect(()=>{if(A==null?void 0:A.isDestroyed)return;if(!A){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}let f=M.current;f.style.visibility="hidden",f.style.position="absolute";let u=wj({...T.current,editor:A,element:f});A.registerPlugin(u);let n=T.current.pluginKey;return y.current=!0,C(!0),()=>{C(!1),A.unregisterPlugin(n),window.requestAnimationFrame(()=>{if(f.parentNode)f.parentNode.removeChild(f)})}},[A]),Dq.useEffect(()=>{if(!P||!A||A.isDestroyed)return;if(y.current){y.current=!1;return}A.view.dispatch(A.state.tr.setMeta(O,{type:"updateOptions",options:T.current}))},[P,A,J,q,U,K,G,O]),Dc.createPortal(H,M.current)})});var oK=(Z,Q)=>{if(Z==="slot")return 0;if(Z instanceof Function)return Z(Q);let{children:J,...q}=Q!=null?Q:{};if(Z==="svg")throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[Z,q,J]};var Ec=()=>{};var vj=k(()=>{Ec()});var HGZ=(Z,Q)=>{var J;let{state:q,view:G}=Z,{selection:U}=q;if(!U.empty)return!1;let{$from:K}=U;if(K.parentOffset!==0)return!1;let H=K.depth-1;if(H<0)return!1;let B=K.node(H),F=K.index(H);if(F===0)return!1;if(B.type===Q)return Z.commands.lift(Q.name);let M=B.child(F-1);if(M.type!==Q||!((J=M.lastChild)==null?void 0:J.isTextblock))return!1;let O=K.before(),A=O-1-1,{tr:N}=q;return N.delete(O,K.after()).insert(A,K.parent.content),N.setSelection(DZ.create(N.doc,A)),G.dispatch(N.scrollIntoView()),!0},WGZ,kc;var Sc=k(()=>{aZ();YQ();vj();WGZ=/^\s*>\s$/,kc=eQ.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:Z}){return oK("blockquote",{...IQ(this.options.HTMLAttributes,Z),children:oK("slot",{})})},parseMarkdown:(Z,Q)=>{var J;let q=(J=Q.parseBlockChildren)!=null?J:Q.parseChildren;return Q.createNode("blockquote",void 0,q(Z.tokens||[]))},renderMarkdown:(Z,Q)=>{if(!Z.content)return"";let J=">",q=[];return Z.content.forEach((G,U)=>{var K,H;let M=((H=(K=Q.renderChild)==null?void 0:K.call(Q,G,U))!=null?H:Q.renderChildren([G])).split(`
|
|
355
|
+
`).map((O)=>{if(O.trim()==="")return J;return`${J} ${O}`});q.push(M.join(`
|
|
356
|
+
`))}),q.join(`
|
|
357
|
+
${J}
|
|
358
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:Z})=>{return Z.wrapIn(this.name)},toggleBlockquote:()=>({commands:Z})=>{return Z.toggleWrap(this.name)},unsetBlockquote:()=>({commands:Z})=>{return Z.lift(this.name)}}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>HGZ(this.editor,this.type)}},addInputRules(){return[oG({find:WGZ,type:this.type})]}})});var BGZ,_GZ,FGZ,LGZ,yc;var wc=k(()=>{aZ();vj();BGZ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,_GZ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,FGZ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,LGZ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,yc=sJ.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:(Z)=>Z.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:(Z)=>Z.type.name===this.name},{style:"font-weight",getAttrs:(Z)=>/^(bold(er)?|[5-9]\d{2,})$/.test(Z)&&null}]},renderHTML({HTMLAttributes:Z}){return oK("strong",{...IQ(this.options.HTMLAttributes,Z),children:oK("slot",{})})},markdownTokenName:"strong",parseMarkdown:(Z,Q)=>{return Q.applyMark("bold",Q.parseInline(Z.tokens||[]))},markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(Z,Q)=>{return`**${Q.renderChildren(Z)}**`},addCommands(){return{setBold:()=>({commands:Z})=>{return Z.setMark(this.name)},toggleBold:()=>({commands:Z})=>{return Z.toggleMark(this.name)},unsetBold:()=>({commands:Z})=>{return Z.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[_Y({find:BGZ,type:this.type}),_Y({find:FGZ,type:this.type})]},addPasteRules(){return[EJ({find:_GZ,type:this.type}),EJ({find:LGZ,type:this.type})]}})});var MGZ=(Z)=>{let Q=/`([^`]+)`(?!`)$/.exec(Z);if(!Q)return null;if(Q.index>0&&Z[Q.index-1]==="`")return null;return{index:Q.index,text:Q[0],replaceWith:Q[1]}},OGZ=(Z)=>{let Q=/`([^`]+)`(?!`)/g,J=[],q;while((q=Q.exec(Z))!==null){if(q.index>0&&Z[q.index-1]==="`")continue;J.push({index:q.index,text:q[0],replaceWith:q[1]})}return J},xc;var bc=k(()=>{aZ();xc=sJ.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:Z}){return["code",IQ(this.options.HTMLAttributes,Z),0]},markdownTokenName:"codespan",parseMarkdown:(Z,Q)=>{return Q.applyMark("code",[{type:"text",text:Z.text||""}])},renderMarkdown:(Z,Q)=>{if(!Z.content)return"";return`\`${Q.renderChildren(Z.content)}\``},addCommands(){return{setCode:()=>({commands:Z})=>{return Z.setMark(this.name)},toggleCode:()=>({commands:Z})=>{return Z.toggleMark(this.name)},unsetCode:()=>({commands:Z})=>{return Z.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[_Y({find:MGZ,type:this.type})]},addPasteRules(){return[EJ({find:OGZ,type:this.type})]}})});var gj=4,VGZ,AGZ,vc;var gc=k(()=>{aZ();YQ();VGZ=/^```([a-z]+)?[\s\n]$/,AGZ=/^~~~([a-z]+)?[\s\n]$/,vc=eQ.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:gj,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:(Z)=>{var Q;let{languageClassPrefix:J}=this.options;if(!J)return null;let U=[...((Q=Z.firstElementChild)==null?void 0:Q.classList)||[]].filter((K)=>K.startsWith(J)).map((K)=>K.replace(J,""))[0];if(!U)return null;return U},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:Z,HTMLAttributes:Q}){return["pre",IQ(this.options.HTMLAttributes,Q),["code",{class:Z.attrs.language?this.options.languageClassPrefix+Z.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(Z,Q)=>{var J,q;if(((J=Z.raw)==null?void 0:J.startsWith("```"))===!1&&((q=Z.raw)==null?void 0:q.startsWith("~~~"))===!1&&Z.codeBlockStyle!=="indented")return[];return Q.createNode("codeBlock",{language:Z.lang||null},Z.text?[Q.createTextNode(Z.text)]:[])},renderMarkdown:(Z,Q)=>{var J;let q="",G=((J=Z.attrs)==null?void 0:J.language)||"";if(!Z.content)q=`\`\`\`${G}
|
|
359
|
+
|
|
360
|
+
\`\`\``;else q=[`\`\`\`${G}`,Q.renderChildren(Z.content),"```"].join(`
|
|
361
|
+
`);return q},addCommands(){return{setCodeBlock:(Z)=>({commands:Q})=>{return Q.setNode(this.name,Z)},toggleCodeBlock:(Z)=>({commands:Q})=>{return Q.toggleNode(this.name,"paragraph",Z)}}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:Z,$anchor:Q}=this.editor.state.selection,J=Q.pos===1;if(!Z||Q.parent.type.name!==this.name)return!1;if(J||!Q.parent.textContent.length)return this.editor.commands.clearNodes();return!1},Tab:({editor:Z})=>{var Q;if(!this.options.enableTabIndentation)return!1;let J=(Q=this.options.tabSize)!=null?Q:gj,{state:q}=Z,{selection:G}=q,{$from:U,empty:K}=G;if(U.parent.type!==this.type)return!1;let H=" ".repeat(J);if(K)return Z.commands.insertContent(H);return Z.commands.command(({tr:B})=>{let{from:F,to:M}=G,A=q.doc.textBetween(F,M,`
|
|
362
|
+
`,`
|
|
363
|
+
`).split(`
|
|
364
|
+
`).map((N)=>H+N).join(`
|
|
365
|
+
`);return B.replaceWith(F,M,q.schema.text(A)),!0})},"Shift-Tab":({editor:Z})=>{var Q;if(!this.options.enableTabIndentation)return!1;let J=(Q=this.options.tabSize)!=null?Q:gj,{state:q}=Z,{selection:G}=q,{$from:U,empty:K}=G;if(U.parent.type!==this.type)return!1;if(K)return Z.commands.command(({tr:H})=>{var B;let{pos:F}=U,M=U.start(),O=U.end(),A=q.doc.textBetween(M,O,`
|
|
366
|
+
`,`
|
|
367
|
+
`).split(`
|
|
368
|
+
`),N=0,T=0,P=F-M;for(let e=0;e<A.length;e+=1){if(T+A[e].length>=P){N=e;break}T+=A[e].length+1}let y=((B=A[N].match(/^ */))==null?void 0:B[0])||"",f=Math.min(y.length,J);if(f===0)return!0;let u=M;for(let e=0;e<N;e+=1)u+=A[e].length+1;if(H.delete(u,u+f),F-u<=f)H.setSelection(DZ.create(H.doc,u));return!0});return Z.commands.command(({tr:H})=>{let{from:B,to:F}=G,V=q.doc.textBetween(B,F,`
|
|
369
|
+
`,`
|
|
370
|
+
`).split(`
|
|
371
|
+
`).map((A)=>{var N;let T=((N=A.match(/^ */))==null?void 0:N[0])||"",P=Math.min(T.length,J);return A.slice(P)}).join(`
|
|
372
|
+
`);return H.replaceWith(B,F,q.schema.text(V)),!0})},Enter:({editor:Z})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:Q}=Z,{selection:J}=Q,{$from:q,empty:G}=J;if(!G||q.parent.type!==this.type)return!1;let U=q.parentOffset===q.parent.nodeSize-2,K=q.parent.textContent.endsWith(`
|
|
373
|
+
|
|
374
|
+
`);if(!U||!K)return!1;return Z.chain().command(({tr:H})=>{return H.delete(q.pos-2,q.pos),!0}).exitCode().run()},ArrowUp:({editor:Z})=>{if(!this.options.exitOnArrowUp)return!1;let{state:Q}=Z,{selection:J}=Q,{$from:q,empty:G}=J;if(!G||q.parent.type!==this.type)return!1;if(q.parentOffset!==0)return!1;let U=q.before();if(U>0)return!1;return Z.commands.insertDefaultBlock({pos:U})},ArrowDown:({editor:Z})=>{if(!this.options.exitOnArrowDown)return!1;let{state:Q}=Z,{selection:J,doc:q}=Q,{$from:G,empty:U}=J;if(!U||G.parent.type!==this.type)return!1;if(G.parentOffset!==G.parent.nodeSize-2)return!1;let H=G.after();if(H===void 0)return!1;if(q.nodeAt(H))return Z.commands.command(({tr:F})=>{return F.setSelection(mZ.near(q.resolve(H))),!0});return Z.commands.exitCode()}}},addInputRules(){return[J7({find:VGZ,type:this.type,getAttributes:(Z)=>({language:Z[1]})}),J7({find:AGZ,type:this.type,getAttributes:(Z)=>({language:Z[1]})})]},addProseMirrorPlugins(){return[new lZ({key:new tZ("codeBlockVSCodeHandler"),props:{handlePaste:(Z,Q)=>{if(!Q.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;let J=Q.clipboardData.getData("text/plain"),q=Q.clipboardData.getData("vscode-editor-data"),G=q?JSON.parse(q):void 0,U=G==null?void 0:G.mode;if(!J||!U)return!1;let{tr:K,schema:H}=Z.state,B=H.text(J.replace(/\r\n?/g,`
|
|
375
|
+
`));if(K.replaceSelectionWith(this.type.create({language:U},B)),K.selection.$from.parent.type!==this.type)K.setSelection(DZ.near(K.doc.resolve(Math.max(0,K.selection.from-2))));return K.setMeta("paste",!0),Z.dispatch(K),!0}}})]}})});var hc;var uc=k(()=>{aZ();hc=eQ.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(Z,Q)=>{if(!Z.content)return"";return Q.renderChildren(Z.content,`
|
|
376
|
+
|
|
377
|
+
`)}})});var fc;var mc=k(()=>{aZ();fc=eQ.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:Z}){return["br",IQ(this.options.HTMLAttributes,Z)]},renderText(){return`
|
|
378
|
+
`},renderMarkdown:()=>`
|
|
379
|
+
`,parseMarkdown:()=>{return{type:"hardBreak"}},addCommands(){return{setHardBreak:()=>({commands:Z,chain:Q,state:J,editor:q})=>{return Z.first([()=>Z.exitCode(),()=>Z.command(()=>{let{selection:G,storedMarks:U}=J;if(G.$from.parent.type.spec.isolating)return!1;let{keepMarks:K}=this.options,{splittableMarks:H}=q.extensionManager,B=U||G.$to.parentOffset&&G.$from.marks();return Q().insertContent({type:this.name}).command(({tr:F,dispatch:M})=>{if(M&&B&&K){let O=B.filter((V)=>H.includes(V.type.name));F.ensureMarks(O)}return!0}).scrollIntoView().run()})])}}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})});var cc;var pc=k(()=>{aZ();cc=eQ.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((Z)=>({tag:`h${Z}`,attrs:{level:Z}}))},renderHTML({node:Z,HTMLAttributes:Q}){return[`h${this.options.levels.includes(Z.attrs.level)?Z.attrs.level:this.options.levels[0]}`,IQ(this.options.HTMLAttributes,Q),0]},parseMarkdown:(Z,Q)=>{return Q.createNode("heading",{level:Z.depth||1},Q.parseInline(Z.tokens||[]))},renderMarkdown:(Z,Q)=>{var J;let q=((J=Z.attrs)==null?void 0:J.level)?parseInt(Z.attrs.level,10):1,G="#".repeat(q);if(!Z.content)return"";return`${G} ${Q.renderChildren(Z.content)}`},addCommands(){return{setHeading:(Z)=>({commands:Q})=>{if(!this.options.levels.includes(Z.level))return!1;return Q.setNode(this.name,Z)},toggleHeading:(Z)=>({commands:Q})=>{if(!this.options.levels.includes(Z.level))return!1;return Q.toggleNode(this.name,"paragraph",Z)}}},addKeyboardShortcuts(){return this.options.levels.reduce((Z,Q)=>({...Z,[`Mod-Alt-${Q}`]:()=>this.editor.commands.toggleHeading({level:Q})}),{})},addInputRules(){return this.options.levels.map((Z)=>{return J7({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${Z}})\\s$`),type:this.type,getAttributes:{level:Z}})})}})});var dc;var lc=k(()=>{aZ();YQ();dc=eQ.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:Z}){return["hr",IQ(this.options.HTMLAttributes,Z)]},markdownTokenName:"hr",parseMarkdown:(Z,Q)=>{return Q.createNode("horizontalRule")},renderMarkdown:()=>{return"---"},addCommands(){return{setHorizontalRule:()=>({chain:Z,state:Q})=>{if(!df(Q,Q.schema.nodes[this.name]))return!1;let{selection:J}=Q,{$to:q}=J,G=Z();if(jB(J))G.insertContentAt(q.pos,{type:this.name});else G.insertContent({type:this.name});return G.command(({state:U,tr:K,dispatch:H})=>{if(H){let{$to:B}=K.selection,F=B.end();if(B.nodeAfter)if(B.nodeAfter.isTextblock)K.setSelection(DZ.create(K.doc,B.pos+1));else if(B.nodeAfter.isBlock)K.setSelection(SZ.create(K.doc,B.pos));else K.setSelection(DZ.create(K.doc,B.pos));else{let M=U.schema.nodes[this.options.nextNodeType]||B.parent.type.contentMatch.defaultType,O=M==null?void 0:M.create();if(O)K.insert(F,O),K.setSelection(DZ.create(K.doc,F+1))}K.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Gm({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}})});var IGZ,NGZ,jGZ,TGZ,ic;var nc=k(()=>{aZ();IGZ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,NGZ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,jGZ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,TGZ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,ic=sJ.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:(Z)=>Z.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:(Z)=>Z.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:Z}){return["em",IQ(this.options.HTMLAttributes,Z),0]},addCommands(){return{setItalic:()=>({commands:Z})=>{return Z.setMark(this.name)},toggleItalic:()=>({commands:Z})=>{return Z.toggleMark(this.name)},unsetItalic:()=>({commands:Z})=>{return Z.unsetMark(this.name)}}},markdownTokenName:"em",parseMarkdown:(Z,Q)=>{return Q.applyMark("italic",Q.parseInline(Z.tokens||[]))},markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(Z,Q)=>{return`*${Q.renderChildren(Z)}*`},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[_Y({find:IGZ,type:this.type}),_Y({find:jGZ,type:this.type})]},addPasteRules(){return[EJ({find:NGZ,type:this.type}),EJ({find:TGZ,type:this.type})]}})});function PGZ(Z,Q){if(!(Z in Q))Q[Z]=[];return Q[Z]}function k6(Z,Q,J){if(Q.numeric)Q.asciinumeric=!0,Q.alphanumeric=!0;if(Q.ascii)Q.asciinumeric=!0,Q.alpha=!0;if(Q.asciinumeric)Q.alphanumeric=!0;if(Q.alpha)Q.alphanumeric=!0;if(Q.alphanumeric)Q.domain=!0;if(Q.emoji)Q.domain=!0;for(let q in Q){let G=PGZ(q,J);if(G.indexOf(Z)<0)G.push(Z)}}function RGZ(Z,Q){let J={};for(let q in Q)if(Q[q].indexOf(Z)>=0)J[q]=!0;return J}function LY(Z=null){this.j={},this.jr=[],this.jd=null,this.t=Z}function $GZ(Z=[]){let Q={};LY.groups=Q;let J=new LY;if(Z_==null)Z_=rc("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2");if(Q_==null)Q_=rc("ελ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");OZ(J,"'",A_),OZ(J,"{",L7),OZ(J,"}",M7),OZ(J,"[",Y_),OZ(J,"]",q_),OZ(J,"(",G_),OZ(J,")",z_),OZ(J,"<",U_),OZ(J,">",K_),OZ(J,"(",H_),OZ(J,")",W_),OZ(J,"「",B_),OZ(J,"」",__),OZ(J,"『",F_),OZ(J,"』",L_),OZ(J,"<",M_),OZ(J,">",O_),OZ(J,"&",V_),OZ(J,"*",I_),OZ(J,"@",m9),OZ(J,"`",j_),OZ(J,"^",T_),OZ(J,":",S6),OZ(J,",",aj),OZ(J,"$",P_),OZ(J,".",Zz),OZ(J,"=",R_),OZ(J,"!",rj),OZ(J,"-",Eq),OZ(J,"%",O7),OZ(J,"|",C_),OZ(J,"+",D_),OZ(J,"#",$_),OZ(J,"?",V7),OZ(J,'"',oj),OZ(J,"/",Qz),OZ(J,";",tj),OZ(J,"~",A7),OZ(J,"_",E_),OZ(J,"\\",N_),OZ(J,"・",Qp);let q=TX(J,U0,nj,{["numeric"]:!0});TX(q,U0,q);let G=TX(q,z0,ec,{["asciinumeric"]:!0}),U=TX(q,F7,Zp,{["alphanumeric"]:!0}),K=TX(J,z0,K0,{["ascii"]:!0});TX(K,U0,G),TX(K,z0,K),TX(G,U0,G),TX(G,z0,G);let H=TX(J,F7,pj,{["alpha"]:!0});TX(H,z0),TX(H,U0,U),TX(H,F7,H),TX(U,U0,U),TX(U,z0),TX(U,F7,U);let B=OZ(J,fj,sj,{["whitespace"]:!0}),F=OZ(J,ac,ij,{["whitespace"]:!0}),M=TX(J,uj,ij,{["whitespace"]:!0});OZ(J,mj,M),OZ(F,fj,B),OZ(F,mj,M),TX(F,uj,M),OZ(M,ac),OZ(M,fj),TX(M,uj,M),OZ(M,mj,M);let O=TX(J,hj,Xp,{["emoji"]:!0});OZ(O,"#"),TX(O,hj,O),OZ(O,CGZ,O);let V=OZ(O,DGZ);OZ(V,"#"),TX(V,hj,O);let A=[[z0,K],[U0,G]],N=[[z0,null],[F7,H],[U0,U]];for(let T=0;T<Z_.length;T++)f9(J,Z_[T],dj,K0,A);for(let T=0;T<Q_.length;T++)f9(J,Q_[T],lj,pj,N);k6(dj,{tld:!0,ascii:!0},Q),k6(lj,{utld:!0,alpha:!0},Q),f9(J,"file",J_,K0,A),f9(J,"mailto",J_,K0,A),f9(J,"http",tK,K0,A),f9(J,"https",tK,K0,A),f9(J,"ftp",tK,K0,A),f9(J,"ftps",tK,K0,A),k6(J_,{scheme:!0,ascii:!0},Q),k6(tK,{slashscheme:!0,ascii:!0},Q),Z=Z.sort((T,P)=>T[0]>P[0]?1:-1);for(let T=0;T<Z.length;T++){let P=Z[T][0],y=Z[T][1]?{["scheme"]:!0}:{["slashscheme"]:!0};if(P.indexOf("-")>=0)y.domain=!0;else if(!z0.test(P))y.numeric=!0;else if(U0.test(P))y.asciinumeric=!0;else y.ascii=!0;sc(J,P,P,y)}return sc(J,"localhost",I7,{ascii:!0}),J.jd=new LY(k_),{start:J,tokens:Object.assign({groups:Q},Jp)}}function Yp(Z,Q){let J=EGZ(Q.replace(/[A-Z]/g,(H)=>H.toLowerCase())),q=J.length,G=[],U=0,K=0;while(K<q){let H=Z,B=null,F=0,M=null,O=-1,V=-1;while(K<q&&(B=H.go(J[K]))){if(H=B,H.accepts())O=0,V=0,M=H;else if(O>=0)O+=J[K].length,V++;F+=J[K].length,U+=J[K].length,K++}U-=O,K-=V,F-=O,G.push({t:M.t,v:Q.slice(U-F,U),s:U-F,e:U})}return G}function EGZ(Z){let Q=[],J=Z.length,q=0;while(q<J){let G=Z.charCodeAt(q),U,K=G<55296||G>56319||q+1===J||(U=Z.charCodeAt(q+1))<56320||U>57343?Z[q]:Z.slice(q,q+2);Q.push(K),q+=K.length}return Q}function f9(Z,Q,J,q,G){let U,K=Q.length;for(let H=0;H<K-1;H++){let B=Q[H];if(Z.j[B])U=Z.j[B];else U=new LY(q),U.jr=G.slice(),Z.j[B]=U;Z=U}return U=new LY(J),U.jr=G.slice(),Z.j[Q[K-1]]=U,U}function rc(Z){let Q=[],J=[],q=0,G="0123456789";while(q<Z.length){let U=0;while(G.indexOf(Z[q+U])>=0)U++;if(U>0){Q.push(J.join(""));for(let K=parseInt(Z.substring(q,q+U),10);K>0;K--)J.pop();q+=U}else J.push(Z[q]),q++}return Q}function ej(Z,Q=null){let J=Object.assign({},N7);if(Z)J=Object.assign(J,Z instanceof ej?Z.o:Z);let q=J.ignoreTags,G=[];for(let U=0;U<q.length;U++)G.push(q[U].toUpperCase());if(this.o=J,Q)this.defaultRender=Q;this.ignoreTags=G}function oc(Z){return Z}function qp(Z,Q){this.t="token",this.v=Z,this.tk=Q}function S_(Z,Q){class J extends qp{constructor(q,G){super(q,G);this.t=Z}}for(let q in Q)J.prototype[q]=Q[q];return J.t=Z,J}function yGZ({groups:Z}){let Q=Z.domain.concat([V_,I_,m9,N_,j_,T_,P_,R_,Eq,nj,O7,C_,D_,$_,Qz,k_,A7,E_]),J=[A_,S6,aj,Zz,rj,O7,V7,oj,tj,U_,K_,L7,M7,q_,Y_,G_,z_,H_,W_,B_,__,F_,L_,M_,O_],q=[V_,A_,I_,N_,j_,T_,P_,R_,Eq,L7,M7,O7,C_,D_,$_,V7,Qz,k_,A7,E_],G=$q(),U=OZ(G,A7);VQ(U,q,U),VQ(U,Z.domain,U);let K=$q(),H=$q(),B=$q();VQ(G,Z.domain,K),VQ(G,Z.scheme,H),VQ(G,Z.slashscheme,B),VQ(K,q,U),VQ(K,Z.domain,K);let F=OZ(K,m9);OZ(U,m9,F),OZ(H,m9,F),OZ(B,m9,F);let M=OZ(U,Zz);VQ(M,q,U),VQ(M,Z.domain,U);let O=$q();VQ(F,Z.domain,O),VQ(O,Z.domain,O);let V=OZ(O,Zz);VQ(V,Z.domain,O);let A=$q(kGZ);VQ(V,Z.tld,A),VQ(V,Z.utld,A),OZ(F,I7,A);let N=OZ(O,Eq);OZ(N,Eq,N),VQ(N,Z.domain,O),VQ(A,Z.domain,O),OZ(A,Zz,V),OZ(A,Eq,N);let T=OZ(K,Eq),P=OZ(K,Zz);OZ(T,Eq,T),VQ(T,Z.domain,K),VQ(P,q,U),VQ(P,Z.domain,K);let C=$q(X_);VQ(P,Z.tld,C),VQ(P,Z.utld,C),VQ(C,Z.domain,K),VQ(C,q,U),OZ(C,Zz,P),OZ(C,Eq,T),OZ(C,m9,F);let y=OZ(C,S6),f=$q(X_);VQ(y,Z.numeric,f);let u=$q(X_),n=$q();VQ(u,Q,u),VQ(u,J,n),VQ(n,Q,u),VQ(n,J,n),OZ(C,Qz,u),OZ(f,Qz,u);let e=OZ(H,S6),a=OZ(B,S6),c=OZ(a,Qz),GZ=OZ(c,Qz);VQ(H,Z.domain,K),OZ(H,Zz,P),OZ(H,Eq,T),VQ(B,Z.domain,K),OZ(B,Zz,P),OZ(B,Eq,T),VQ(e,Z.domain,u),OZ(e,Qz,u),OZ(e,V7,u),VQ(GZ,Z.domain,u),VQ(GZ,Q,u),OZ(GZ,Qz,u);let s=[[L7,M7],[Y_,q_],[G_,z_],[U_,K_],[H_,W_],[B_,__],[F_,L_],[M_,O_]];for(let LZ=0;LZ<s.length;LZ++){let[HZ,KZ]=s[LZ],v=OZ(u,HZ);OZ(n,HZ,v);let i=$q(X_);VQ(v,Q,i);let x=$q();VQ(v,J,x),OZ(v,KZ,u),VQ(i,Q,i),VQ(i,J,x),VQ(x,Q,i),VQ(x,J,x),OZ(i,KZ,u),OZ(x,KZ,u)}return OZ(G,I7,C),OZ(G,sj,SGZ),{start:G,tokens:Jp}}function wGZ(Z,Q,J){let q=J.length,G=0,U=[],K=[];while(G<q){let H=Z,B=null,F=null,M=0,O=null,V=-1;while(G<q&&!(B=H.go(J[G].t)))K.push(J[G++]);while(G<q&&(F=B||H.go(J[G].t))){if(B=null,H=F,H.accepts())V=0,O=H;else if(V>=0)V++;G++,M++}if(V<0){if(G-=M,G<q)K.push(J[G]),G++}else{if(K.length>0)U.push(cj(tc,Q,K)),K=[];G-=V,M-=V;let A=O.t,N=J.slice(G-M,G);U.push(cj(A,Q,N))}}if(K.length>0)U.push(cj(tc,Q,K));return U}function cj(Z,Q,J){let q=J[0].s,G=J[J.length-1].e,U=Q.slice(q,G);return new Z(U,J)}function Gp(){return LY.groups={},qX.scanner=null,qX.parser=null,qX.tokenQueue=[],qX.pluginQueue=[],qX.customSchemes=[],qX.initialized=!1,qX}function ZT(Z,Q=!1){if(qX.initialized)xGZ(`linkifyjs: already initialized - will not register custom scheme "${Z}" ${bGZ}`);if(!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(Z))throw Error(`linkifyjs: incorrect scheme format.
|
|
380
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
381
|
+
2. Cannot start or end with "-"
|
|
382
|
+
3. "-" cannot repeat`);qX.customSchemes.push([Z,Q])}function vGZ(){qX.scanner=$GZ(qX.customSchemes);for(let Z=0;Z<qX.tokenQueue.length;Z++)qX.tokenQueue[Z][1]({scanner:qX.scanner});qX.parser=yGZ(qX.scanner.tokens);for(let Z=0;Z<qX.pluginQueue.length;Z++)qX.pluginQueue[Z][1]({scanner:qX.scanner,parser:qX.parser});return qX.initialized=!0,qX}function y_(Z){if(!qX.initialized)vGZ();return wGZ(qX.parser.start,Z,Yp(qX.scanner.start,Z))}function w_(Z,Q=null,J=null){if(Q&&typeof Q==="object"){if(J)throw Error(`linkifyjs: Invalid link type ${Q}; must be a string`);J=Q,Q=null}let q=new ej(J),G=y_(Z),U=[];for(let K=0;K<G.length;K++){let H=G[K];if(H.isLink&&(!Q||H.t===Q)&&q.check(H))U.push(H.toFormattedObject(q))}return U}var VQ=(Z,Q,J,q,G)=>Z.ta(Q,J,q,G),TX=(Z,Q,J,q,G)=>Z.tr(Q,J,q,G),sc=(Z,Q,J,q,G)=>Z.ts(Q,J,q,G),OZ=(Z,Q,J,q,G)=>Z.tt(Q,J,q,G),K0="WORD",pj="UWORD",ec="ASCIINUMERICAL",Zp="ALPHANUMERICAL",I7="LOCALHOST",dj="TLD",lj="UTLD",J_="SCHEME",tK="SLASH_SCHEME",nj="NUM",ij="WS",sj="NL",L7="OPENBRACE",M7="CLOSEBRACE",Y_="OPENBRACKET",q_="CLOSEBRACKET",G_="OPENPAREN",z_="CLOSEPAREN",U_="OPENANGLEBRACKET",K_="CLOSEANGLEBRACKET",H_="FULLWIDTHLEFTPAREN",W_="FULLWIDTHRIGHTPAREN",B_="LEFTCORNERBRACKET",__="RIGHTCORNERBRACKET",F_="LEFTWHITECORNERBRACKET",L_="RIGHTWHITECORNERBRACKET",M_="FULLWIDTHLESSTHAN",O_="FULLWIDTHGREATERTHAN",V_="AMPERSAND",A_="APOSTROPHE",I_="ASTERISK",m9="AT",N_="BACKSLASH",j_="BACKTICK",T_="CARET",S6="COLON",aj="COMMA",P_="DOLLAR",Zz="DOT",R_="EQUALS",rj="EXCLAMATION",Eq="HYPHEN",O7="PERCENT",C_="PIPE",D_="PLUS",$_="POUND",V7="QUERY",oj="QUOTE",Qp="FULLWIDTHMIDDLEDOT",tj="SEMI",Qz="SLASH",A7="TILDE",E_="UNDERSCORE",Xp="EMOJI",k_="SYM",Jp,z0,F7,hj,U0,uj,ac="\r",fj=`
|
|
383
|
+
`,CGZ="️",DGZ="",mj="",Z_=null,Q_=null,N7,kGZ,tc,SGZ,X_,$q=(Z)=>new LY(Z),xGZ,bGZ="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",qX;var x_=k(()=>{LY.groups={};LY.prototype={accepts(){return!!this.t},go(Z){let Q=this,J=Q.j[Z];if(J)return J;for(let q=0;q<Q.jr.length;q++){let G=Q.jr[q][0],U=Q.jr[q][1];if(U&&G.test(Z))return U}return Q.jd},has(Z,Q=!1){return Q?Z in this.j:!!this.go(Z)},ta(Z,Q,J,q){for(let G=0;G<Z.length;G++)this.tt(Z[G],Q,J,q)},tr(Z,Q,J,q){q=q||LY.groups;let G;if(Q&&Q.j)G=Q;else if(G=new LY(Q),J&&q)k6(Q,J,q);return this.jr.push([Z,G]),G},ts(Z,Q,J,q){let G=this,U=Z.length;if(!U)return G;for(let K=0;K<U-1;K++)G=G.tt(Z[K]);return G.tt(Z[U-1],Q,J,q)},tt(Z,Q,J,q){q=q||LY.groups;let G=this;if(Q&&Q.j)return G.j[Z]=Q,Q;let U=Q,K,H=G.go(Z);if(H)K=new LY,Object.assign(K.j,H.j),K.jr.push.apply(K.jr,H.jr),K.jd=H.jd,K.t=H.t;else K=new LY;if(U){if(q){if(K.t&&typeof K.t==="string"){let B=Object.assign(RGZ(K.t,q),J);k6(U,B,q)}else if(J)k6(U,J,q)}K.t=U}return G.j[Z]=K,K}};Jp=Object.freeze({__proto__:null,ALPHANUMERICAL:Zp,AMPERSAND:V_,APOSTROPHE:A_,ASCIINUMERICAL:ec,ASTERISK:I_,AT:m9,BACKSLASH:N_,BACKTICK:j_,CARET:T_,CLOSEANGLEBRACKET:K_,CLOSEBRACE:M7,CLOSEBRACKET:q_,CLOSEPAREN:z_,COLON:S6,COMMA:aj,DOLLAR:P_,DOT:Zz,EMOJI:Xp,EQUALS:R_,EXCLAMATION:rj,FULLWIDTHGREATERTHAN:O_,FULLWIDTHLEFTPAREN:H_,FULLWIDTHLESSTHAN:M_,FULLWIDTHMIDDLEDOT:Qp,FULLWIDTHRIGHTPAREN:W_,HYPHEN:Eq,LEFTCORNERBRACKET:B_,LEFTWHITECORNERBRACKET:F_,LOCALHOST:I7,NL:sj,NUM:nj,OPENANGLEBRACKET:U_,OPENBRACE:L7,OPENBRACKET:Y_,OPENPAREN:G_,PERCENT:O7,PIPE:C_,PLUS:D_,POUND:$_,QUERY:V7,QUOTE:oj,RIGHTCORNERBRACKET:__,RIGHTWHITECORNERBRACKET:L_,SCHEME:J_,SEMI:tj,SLASH:Qz,SLASH_SCHEME:tK,SYM:k_,TILDE:A7,TLD:dj,UNDERSCORE:E_,UTLD:lj,UWORD:pj,WORD:K0,WS:ij}),z0=/[a-z]/,F7=/\p{L}/u,hj=/\p{Emoji}/u,U0=/\d/,uj=/\s/;N7={defaultProtocol:"http",events:null,format:oc,formatHref:oc,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};ej.prototype={o:N7,ignoreTags:[],defaultRender(Z){return Z},check(Z){return this.get("validate",Z.toString(),Z)},get(Z,Q,J){let q=Q!=null,G=this.o[Z];if(!G)return G;if(typeof G==="object"){if(G=J.t in G?G[J.t]:N7[Z],typeof G==="function"&&q)G=G(Q,J)}else if(typeof G==="function"&&q)G=G(Q,J.t,J);return G},getObj(Z,Q,J){let q=this.o[Z];if(typeof q==="function"&&Q!=null)q=q(Q,J.t,J);return q},render(Z){let Q=Z.render(this);return(this.get("render",null,Z)||this.defaultRender)(Q,Z.t,Z)}};qp.prototype={isLink:!1,toString(){return this.v},toHref(Z){return this.toString()},toFormattedString(Z){let Q=this.toString(),J=Z.get("truncate",Q,this),q=Z.get("format",Q,this);return J&&q.length>J?q.substring(0,J)+"…":q},toFormattedHref(Z){return Z.get("formatHref",this.toHref(Z.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(Z=N7.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(Z),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(Z){return{type:this.t,value:this.toFormattedString(Z),isLink:this.isLink,href:this.toFormattedHref(Z),start:this.startIndex(),end:this.endIndex()}},validate(Z){return Z.get("validate",this.toString(),this)},render(Z){let Q=this,J=this.toHref(Z.get("defaultProtocol")),q=Z.get("formatHref",J,this),G=Z.get("tagName",J,Q),U=this.toFormattedString(Z),K={},H=Z.get("className",J,Q),B=Z.get("target",J,Q),F=Z.get("rel",J,Q),M=Z.getObj("attributes",J,Q),O=Z.getObj("events",J,Q);if(K.href=q,H)K.class=H;if(B)K.target=B;if(F)K.rel=F;if(M)Object.assign(K,M);return{tagName:G,attributes:K,content:U,eventListeners:O}}};kGZ=S_("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),tc=S_("text"),SGZ=S_("nl"),X_=S_("url",{isLink:!0,toHref(Z=N7.defaultProtocol){return this.hasProtocol()?this.v:`${Z}://${this.v}`},hasProtocol(){let Z=this.tk;return Z.length>=2&&Z[0].t!==I7&&Z[1].t===S6}});xGZ=typeof console<"u"&&console&&console.warn||(()=>{}),qX={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};y_.scan=Yp});function fGZ(Z){if(Z.length===1)return Z[0].isLink;if(Z.length===3&&Z[1].isLink)return["()","[]"].includes(Z[0].value+Z[2].value);return!1}function mGZ(Z){return new lZ({key:new tZ("autolink"),appendTransaction:(Q,J,q)=>{let G=Q.some((F)=>F.docChanged)&&!J.doc.eq(q.doc),U=Q.some((F)=>F.getMeta("preventAutolink"));if(!G||U)return;let{tr:K}=q,H=qj(J.doc,[...Q]);if(Q7(H).forEach(({newRange:F})=>{let M=xf(q.doc,F,(A)=>A.isTextblock),O,V;if(M.length>1)O=M[0],V=q.doc.textBetween(O.pos,O.pos+O.node.nodeSize,void 0," ");else if(M.length){let A=q.doc.textBetween(F.from,F.to," "," ");if(!hGZ.test(A))return;O=M[0],V=q.doc.textBetween(O.pos,F.to,void 0," ")}if(O&&V){let A=V.split(gGZ).filter(Boolean);if(A.length<=0)return!1;let N=A[A.length-1],T=O.pos+V.lastIndexOf(N);if(!N)return!1;let P=y_(N).map((C)=>C.toObject(Z.defaultProtocol));if(!fGZ(P))return!1;P.filter((C)=>C.isLink).map((C)=>({...C,from:T+C.start+1,to:T+C.end+1})).filter((C)=>{if(!q.schema.marks.code)return!0;return!q.doc.rangeHasMark(C.from,C.to,q.schema.marks.code)}).filter((C)=>Z.validate(C.value)).filter((C)=>Z.shouldAutoLink(C.value)).forEach((C)=>{if(NB(C.from,C.to,q.doc).some((y)=>y.mark.type===Z.type))return;K.addMark(C.from,C.to,Z.type.create({href:C.href}))})}}),!K.steps.length)return;return K}})}function cGZ(Z){return new lZ({key:new tZ("handleClickLink"),props:{handleClick:(Q,J,q)=>{var G,U;if(q.button!==0)return!1;if(!Q.editable)return!1;let K=null;if(q.target instanceof HTMLAnchorElement)K=q.target;else{let B=q.target;if(!B)return!1;let F=Z.editor.view.dom;if(K=B.closest("a"),K&&!F.contains(K))K=null}if(!K)return!1;let H=!1;if(Z.enableClickSelection)H=Z.editor.commands.extendMarkRange(Z.type.name);if(Z.openOnClick){let B=Kj(Q.state,Z.type.name),F=(G=K.href)!=null?G:B.href,M=(U=K.target)!=null?U:B.target;if(F)window.open(F,M),H=!0}return H}}})}function zp(Z,Q){let J=0;for(let q=Q-1;q>=0&&Z[q]==="\\";q-=1)J+=1;return J%2===1}function lGZ(Z,Q){let J=0,q=0;while(q<Q){if(Z[q]!=="`"){q+=1;continue}if(J===0&&zp(Z,q)){q+=1;continue}let G=0;while(q<Q&&Z[q]==="`")G+=1,q+=1;if(J===0)J=G;else if(G===J)J=0}return J>0}function Up(Z,Q,J){var q,G;let[,U,K]=Q;if((Q.index?Z[Q.index-1]:void 0)==="!"||zp(Z,(q=Q.index)!=null?q:0))return!1;if(lGZ(Z,(G=Q.index)!=null?G:0))return!1;return!!U.trim()&&J(K)}function Kp(Z){var Q,J;let[q,G,U,,K,H,B]=Z,F=(Q=K!=null?K:H)!=null?Q:B;return{index:(J=Z.index)!=null?J:0,text:q,replaceWith:G,data:{href:U,title:F||null,markdown:!0}}}function iGZ(Z,Q){return Z.index<Q.index+Q.text.length&&Q.index<Z.index+Z.text.length}function Hp(Z){var Q,J,q;return{href:(Q=Z.data)==null?void 0:Q.href,title:(q=(J=Z.data)==null?void 0:J.title)!=null?q:null}}function nGZ(Z){let Q=_Y({find:(J)=>{let q=pGZ.exec(J);if(!q||!Up(J,q,Z.isAllowedHref))return null;return Kp(q)},type:Z.type,getAttributes:Hp});return new sK({find:Q.find,handler:(J)=>{let q=Q.handler(J);if(q!==null&&J.state.tr.steps.length)J.state.tr.setMeta("preventAutolink",!0);return q}})}function sGZ(Z){let Q=EJ({find:(J)=>{var q,G;let U=[];for(let H of J.matchAll(dGZ))if(Up(J,H,Z.isAllowedHref))U.push(Kp(H));let K=((G=(q=Z.findPlainUrls)==null?void 0:q.call(Z,J))!=null?G:[]).filter((H)=>!U.some((B)=>iGZ(B,H)));return[...U,...K]},type:Z.type,getAttributes:Hp});return new _j({find:Q.find,handler:(J)=>{var q;let G=Q.handler(J);if(G!==null&&J.state.tr.steps.length&&((q=J.match.data)==null?void 0:q.markdown))J.state.tr.setMeta("preventAutolink",!0);return G}})}function aGZ(Z){return new lZ({key:new tZ("handlePasteLink"),props:{handlePaste:(Q,J,q)=>{let{shouldAutoLink:G}=Z,{state:U}=Q,{selection:K}=U,{empty:H}=K;if(H)return!1;let B="";q.content.forEach((M)=>{B+=M.textContent});let F=w_(B,{defaultProtocol:Z.defaultProtocol}).find((M)=>M.isLink&&M.value===B);if(!B||!F||G!==void 0&&!G(F.value))return!1;return Z.editor.commands.setMark(Z.type,{href:F.href})}}})}function H0(Z,Q){let J=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];if(Q)Q.forEach((q)=>{let G=typeof q==="string"?q:q.scheme;if(G)J.push(G)});return!Z||Z.replace(uGZ,"").match(new RegExp(`^(?:(?:${J.map((q)=>q.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var QT="[\x00- -\u2029 ]",gGZ,hGZ,uGZ,pGZ,dGZ,Wp;var Bp=k(()=>{aZ();x_();aZ();YQ();x_();aZ();YQ();aZ();YQ();x_();gGZ=new RegExp(QT),hGZ=new RegExp(`${QT}$`),uGZ=new RegExp(QT,"g");pGZ=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,dGZ=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;Wp=sJ.create({name:"link",priority:1000,keepOnSplit:!1,exitable:!0,onCreate(){if(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((Z)=>{if(typeof Z==="string"){ZT(Z);return}ZT(Z.scheme,Z.optionalSlashes)})},onDestroy(){Gp()},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:(Z,Q)=>!!H0(Z,Q.protocols),validate:(Z)=>!!Z,shouldAutoLink:(Z)=>{let Q=/^[a-z][a-z0-9+.-]*:\/\//i.test(Z),J=/^[a-z][a-z0-9+.-]*:/i.test(Z);if(Q||J&&!Z.includes("@"))return!0;let G=(Z.includes("@")?Z.split("@").pop():Z).split(/[/?#:]/)[0];if(/^\d{1,3}(\.\d{1,3}){3}$/.test(G))return!1;if(!/\./.test(G))return!1;return!0}}},addAttributes(){var Z,Q,J;return{href:{default:null,parseHTML(q){return q.getAttribute("href")}},target:{default:(Z=this.options.HTMLAttributes.target)!=null?Z:null},rel:{default:(Q=this.options.HTMLAttributes.rel)!=null?Q:null},class:{default:(J=this.options.HTMLAttributes.class)!=null?J:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:(Z)=>{let Q=Z.getAttribute("href");if(!Q||!this.options.isAllowedUri(Q,{defaultValidate:(J)=>!!H0(J,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return null}}]},renderHTML({HTMLAttributes:Z}){if(!this.options.isAllowedUri(Z.href,{defaultValidate:(Q)=>!!H0(Q,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return["a",IQ(this.options.HTMLAttributes,{...Z,href:""}),0];return["a",IQ(this.options.HTMLAttributes,Z),0]},markdownTokenName:"link",parseMarkdown:(Z,Q)=>{return Q.applyMark("link",Q.parseInline(Z.tokens||[]),{href:Z.href,title:Z.title||null})},renderMarkdown:(Z,Q)=>{var J,q,G,U;let K=(q=(J=Z.attrs)==null?void 0:J.href)!=null?q:"",H=(U=(G=Z.attrs)==null?void 0:G.title)!=null?U:"",B=Q.renderChildren(Z);return H?`[${B}](${K} "${H}")`:`[${B}](${K})`},addCommands(){return{setLink:(Z)=>({chain:Q})=>{let{href:J}=Z;if(!this.options.isAllowedUri(J,{defaultValidate:(q)=>!!H0(q,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return Q().setMark(this.name,Z).setMeta("preventAutolink",!0).run()},toggleLink:(Z)=>({chain:Q})=>{let{href:J}=Z||{};if(J&&!this.options.isAllowedUri(J,{defaultValidate:(q)=>!!H0(q,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return Q().toggleMark(this.name,Z,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:Z})=>{return Z().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}},addInputRules(){if(!this.options.markdownLinks)return[];return[nGZ({type:this.type,isAllowedHref:(Z)=>this.options.isAllowedUri(Z,{defaultValidate:(Q)=>!!H0(Q,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]},addPasteRules(){let Z=(Q)=>{let J=[];if(Q){let{protocols:q,defaultProtocol:G}=this.options;w_(Q).filter((K)=>K.isLink&&this.options.isAllowedUri(K.value,{defaultValidate:(H)=>!!H0(H,q),protocols:q,defaultProtocol:G})).forEach((K)=>{if(!this.options.shouldAutoLink(K.value))return;J.push({text:K.value,data:{href:K.href},index:K.start})})}return J};if(this.options.markdownLinks)return[sGZ({type:this.type,isAllowedHref:(Q)=>this.options.isAllowedUri(Q,{defaultValidate:(J)=>!!H0(J,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:Z})];return[EJ({find:Z,type:this.type,getAttributes:(Q)=>{var J;return{href:(J=Q.data)==null?void 0:J.href}}})]},addProseMirrorPlugins(){let Z=[],{protocols:Q,defaultProtocol:J}=this.options;if(this.options.autolink)Z.push(mGZ({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:(q)=>this.options.isAllowedUri(q,{defaultValidate:(G)=>!!H0(G,Q),protocols:Q,defaultProtocol:J}),shouldAutoLink:this.options.shouldAutoLink}));if(Z.push(cGZ({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste)Z.push(aGZ({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink}));return Z}})});function g_(Z){let Q=Z,J="";for(let[q,G]of Ap)while(Q>=q)J+=G,Q-=q;return J}function GT(Z){return g_(Z).toUpperCase()}function Np(Z){let Q=Z.toLowerCase(),J=0,q=0;while(J<Q.length){let G=!1;for(let[U,K]of Ap)if(Q.startsWith(K,J)){q+=U,J+=K.length,G=!0;break}if(!G)return 0}return q}function JzZ(Z){if(!/^[ivxlcdmIVXLCDM]+$/.test(Z))return!1;let Q=Np(Z);if(Q<=0)return!1;return(Z===Z.toLowerCase()?g_(Q):GT(Q))===Z}function YzZ(Z){let Q=Z.toLowerCase();if(Q.length===1)return Q.charCodeAt(0)-97+1;if(Q.length===2){let J=Q.charCodeAt(0)-97,q=Q.charCodeAt(1)-97;return(J+1)*26+q+1}return 0}function v_(Z){if(Z<=26)return b_[Z-1];let Q=Math.floor((Z-1)/26)-1,J=(Z-1)%26;if(Q<0)return b_[J];return b_[Q]+b_[J]}function h_(Z){if(!Z||/^\d+$/.test(Z))return;if(JzZ(Z))return Z===Z.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(Z))return"a";if(/^[A-Z]{1,2}$/.test(Z))return"A";return}function zT(Z){if(/^\d+$/.test(Z))return parseInt(Z,10);let Q=h_(Z);if(Q==="i"||Q==="I")return Np(Z);if(Q==="a"||Q==="A"){let q=YzZ(Z);return q>0?q:1}let J=parseInt(Z,10);return Number.isNaN(J)?1:J}function qzZ(Z,Q){if(Z==="numeric")return String(Q);switch(Z){case"a":return v_(Q);case"A":return v_(Q).toUpperCase();case"i":return g_(Q);case"I":return GT(Q);default:return String(Q)}}function GzZ(Z){var Q;if(Z.length===0)return!1;let J=(Q=h_(Z[0]))!=null?Q:"numeric",q=zT(Z[0]);if(q<1)return!1;for(let G=0;G<Z.length;G++){let U=qzZ(J,q+G);if(Z[G]!==U)return!1}return!0}function zzZ(Z){return{type:h_(Z),start:zT(Z)}}function UzZ(Z){let{type:Q,start:J}=zzZ(Z),q={};if(Q)q.type=Q;if(J!==1)q.start=J;return q}function KzZ(Z,Q,J=". "){let q=Q+1;if(!Z||Z==="1")return`${q}${J}`;switch(Z){case"a":return`${v_(q)}${J}`;case"A":return`${v_(q).toUpperCase()}${J}`;case"i":return`${g_(q)}${J}`;case"I":return`${GT(q)}${J}`;default:return`${q}${J}`}}function HzZ(Z){var Q,J;let q=(Q=Z.tokens)==null?void 0:Q[0];return Boolean(Z.text&&((J=Z.tokens)==null?void 0:J.length)===1&&(q==null?void 0:q.type)==="list"&&q.ordered&&q.raw===Z.text)}function WzZ(Z,Q){if(Q.tokenizeInline)return Q.parseInline(Q.tokenizeInline(Z));return Q.parseInline([{type:"text",raw:Z,text:Z}])}function OzZ(Z){return YT.test(Z.trimStart())}function VzZ(Z){let Q=Z.trimStart();return j7.bulletItem.test(Q)||OzZ(Q)||j7.heading.test(Q)||j7.thematicBreak.test(Q)&&!Q.startsWith("-")||/^>\s?/.test(Q)||j7.codeFence.test(Q)}function AzZ(Z){return Object.values(j7).some((Q)=>Q.test(Z))}function IzZ(Z){let Q=[],J=[],q=!1;return Z.forEach((G)=>{if(q){J.push(G);return}if(G.trim()===""){q=!0,J.push(G);return}if(Q.length>0&&VzZ(G)){q=!0,J.push(G);return}Q.push(G)}),{paragraphLines:Q,blockLines:J}}function NzZ(Z){let Q=[],J=0,q=0;while(J<Z.length){let G=Z[J],U=G.match(YT);if(!U)break;let[,K,H,B,F]=U,M=K.length,O=parseInt(H,10),V=isNaN(O)?h_(H):void 0,A=isNaN(O)?zT(H):O,N=[F],T=J+1,P=[G],C=!1;while(T<Z.length){let y=Z[T];if(y.match(YT))break;if(y.trim()==="")P.push(y),N.push(""),C=!0,T+=1;else if(y.match(MzZ)){let u=y.length-y.trimStart().length,n=M+H.length+1;P.push(y),N.push(y.slice(Math.min(u,n))),T+=1}else{if(C||AzZ(y))break;P.push(y),N.push(y),T+=1}}Q.push({indent:M,number:A,type:V,content:N.join(`
|
|
384
|
+
`).trim(),contentLines:N,raw:P.join(`
|
|
385
|
+
`)}),q=T,J=T}return[Q,q]}function TzZ(Z){let Q=Z.split(`
|
|
386
|
+
`).filter((U)=>U.trim().length>0);if(Q.length===0)return null;let J=[];for(let U of Q){let K=U.trim().match(jzZ);if(!K)return null;J.push({marker:K[1],content:K[3]})}let q=J.map((U)=>U.marker);if(!GzZ(q))return null;return{type:"orderedList",attrs:UzZ(J[0].marker),content:J.map((U)=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:U.content}]}]}))}}function Rp(Z,Q,J){let q=[],G=0;while(G<Z.length){let U=Z[G];if(U.indent===Q){let{paragraphLines:K,blockLines:H}=IzZ(U.contentLines),B=K.join(`
|
|
387
|
+
`).trim(),F=[];if(B)F.push({type:"paragraph",raw:B,tokens:J.inlineTokens(B)});let M=H.join(`
|
|
388
|
+
`).trim();if(M){let A=J.blockTokens(M);F.push(...A)}let O=G+1,V=[];while(O<Z.length&&Z[O].indent>Q)V.push(Z[O]),O+=1;if(V.length>0){let A=Math.min(...V.map((T)=>T.indent)),N=Rp(V,A,J);F.push({type:"list",ordered:!0,start:V[0].number,typeMarker:V[0].type,items:N,raw:V.map((T)=>T.raw).join(`
|
|
389
|
+
`)})}q.push({type:"list_item",raw:U.raw,tokens:F}),G=O}else G+=1}return q}function PzZ(Z,Q){return Z.map((J)=>{if(J.type!=="list_item")return Q.parseChildren([J])[0];let q=[];if(J.tokens&&J.tokens.length>0)J.tokens.forEach((G)=>{if(G.type==="paragraph"||G.type==="list"||G.type==="blockquote"||G.type==="code")q.push(...Q.parseChildren([G]));else if(G.type==="text"&&G.tokens){let U=Q.parseChildren([G]);q.push({type:"paragraph",content:U})}else{let U=Q.parseChildren([G]);if(U.length>0)q.push(...U)}});return{type:"listItem",content:q}})}function Op(Z){let Q=Z.match(/list-style-type\s*:\s*([^;]+)/i);if(!Q)return null;switch(Q[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 rGZ,oGZ=(Z,Q)=>{for(var J in Q)rGZ(Z,J,{get:Q[J],enumerable:!0})},tGZ="listItem",_p="textStyle",Fp,qT,eGZ=(Z,Q,J)=>{let{selection:q}=Z;if(!q.empty)return null;let{$from:G}=q;if(!G.parent.isTextblock)return null;if(G.parentOffset!==G.parent.content.size)return null;let U=-1;for(let A=G.depth;A>0;A-=1)if(G.node(A).type.name===Q){U=A;break}if(U<0)return null;let K=G.node(U),H=G.index(U);if(H+1>=K.childCount)return null;let B=K.child(H+1);if(!J.includes(B.type.name))return null;let F=Z.schema.nodes[Q],M=!1;if(B.forEach((A)=>{if(A.type===F&&A.childCount>1)M=!0}),!M)return null;let O=Z.doc.resolve(G.after()).nodeAfter;if(!O||!J.includes(O.type.name))return null;let V=[];if(O.forEach((A)=>{V.push(A)}),V.length===0)return null;return{listItemDepth:U,nestedList:O,nestedListPos:G.after(),insertPos:G.after(U),items:V}},ZzZ=(Z,Q,J,q)=>{let G=eGZ(Z,J,q);if(!G)return!1;let{selection:U}=Z,{nestedList:K,nestedListPos:H,insertPos:B,items:F}=G,M=Z.tr;M.delete(H,H+K.nodeSize);let O=M.mapping.map(B);if(M.insert(O,UZ.from(F)),M.setSelection(U.map(M.doc,M.mapping)),Q)Q(M);return!0},QzZ=(Z,Q,J)=>{return ZzZ(Z.state,Z.view.dispatch,Q,J)},Vp=(Z,Q)=>{return NQ.create({name:`${Z}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let J=()=>QzZ(this.editor,Z,Q);return{Delete:J,"Mod-Delete":J}}})},Ap,b_="abcdefghijklmnopqrstuvwxyz",XzZ="[a-zA-Z]{1,2}",Ip,UT,BzZ,u_=(Z,Q)=>{let{$from:J}=Q.selection,q=jX(Z,Q.schema),G=null,U=J.depth,K=J.pos,H=null;while(U>0&&H===null)if(G=J.node(U),G.type===q)H=U;else U-=1,K-=1;if(H===null)return null;return{$pos:Q.doc.resolve(K),depth:H}},KT=(Z,Q)=>{let J=u_(Z,Q);if(!J)return!1;let[,q]=uf(Q,Z,J.$pos.pos+4);return q},jp=(Z,Q,J)=>{let{$anchor:q}=Z.selection,G=Math.max(0,q.pos-2),U=Z.doc.resolve(G).node();if(!U||!J.includes(U.type.name))return!1;return!0},XT=(Z,Q,J)=>{if(Z.commands.undoInputRule())return!0;if(Z.state.selection.from!==Z.state.selection.to)return!1;if(!rG(Z.state,Q)&&jp(Z.state,Q,J)){let{$anchor:q}=Z.state.selection,G=Z.state.doc.resolve(q.before()-1),U=[];G.node().descendants((B,F)=>{if(B.type.name===Q)U.push({node:B,pos:F})});let K=U.at(-1);if(!K)return!1;let H=Z.state.doc.resolve(G.start()+K.pos+1);return Z.chain().cut({from:q.start()-1,to:q.end()+1},H.end()).joinForward().run()}if(!rG(Z.state,Q))return!1;if(!mf(Z.state))return!1;return Z.chain().liftListItem(Q).run()},Tp=(Z,Q)=>{let J=KT(Z,Q),q=u_(Z,Q);if(!q||!J)return!1;if(J>q.depth)return!0;return!1},Pp=(Z,Q)=>{let J=KT(Z,Q),q=u_(Z,Q);if(!q||!J)return!1;if(J<q.depth)return!0;return!1},JT=(Z,Q)=>{if(!rG(Z.state,Q))return!1;if(!ff(Z.state,Q))return!1;let{selection:J}=Z.state,{$from:q,$to:G}=J;if(!J.empty&&q.sameParent(G))return!1;if(Tp(Q,Z.state))return Z.chain().focus(Z.state.selection.from+4).lift(Q).joinBackward().run();if(Pp(Q,Z.state))return Z.chain().joinForward().joinBackward().run();return Z.commands.joinItemForward()},_zZ=(Z,Q)=>{var J;let{$anchor:q}=Q.selection,G=Q.doc.resolve(q.pos-q.parentOffset-2);if(G.index()===G.parent.childCount-1)return!1;if(((J=G.nodeAfter)==null?void 0:J.type.name)!==Z)return!1;return!0},FzZ=(Z,Q)=>{var J;let{$anchor:q}=Q.selection,G=Q.doc.resolve(q.pos-2);if(G.index()===0)return!1;if(((J=G.nodeBefore)==null?void 0:J.type.name)!==Z)return!1;return!0},LzZ=(Z,Q,J)=>{if(!J)return!1;let q=jX(Z,Q.schema),G=!1;return J.descendants((U)=>{if(U.type===q)G=!0}),G},HT,YT,MzZ,j7,jzZ,RzZ="listItem",Lp="textStyle",Mp,WT,CzZ,f_,m_,TCZ;var eK=k(()=>{aZ();aZ();aZ();Vq();aZ();aZ();aZ();aZ();aZ();aZ();aZ();YQ();aZ();aZ();aZ();rGZ=Object.defineProperty,Fp=/^\s*([-+*])\s$/,qT=eQ.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:Z}){return["ul",IQ(this.options.HTMLAttributes,Z),0]},markdownTokenName:"list",parseMarkdown:(Z,Q)=>{if(Z.type!=="list"||Z.ordered)return[];return{type:"bulletList",content:Z.items?Q.parseChildren(Z.items):[]}},renderMarkdown:(Z,Q)=>{if(!Z.content)return"";return Q.renderChildren(Z.content,`
|
|
390
|
+
`)},markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:Z,chain:Q})=>{if(this.options.keepAttributes)return Q().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(tGZ,this.editor.getAttributes(_p)).run();return Z.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let Z=oG({find:Fp,type:this.type});if(this.options.keepMarks||this.options.keepAttributes)Z=oG({find:Fp,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>{return this.editor.getAttributes(_p)},editor:this.editor});return[Z]}}),Ap=[[1000,"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"]],Ip=String.raw`\d+|[ivxlcdmIVXLCDM]+|${XzZ}`;UT=eQ.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:Z}){return["li",IQ(this.options.HTMLAttributes,Z),0]},markdownTokenName:"list_item",parseMarkdown:(Z,Q)=>{var J;if(Z.type!=="list_item")return[];let q=(J=Q.parseBlockChildren)!=null?J:Q.parseChildren,G=[];if(Z.tokens&&Z.tokens.length>0){if(HzZ(Z))return{type:"listItem",content:[{type:"paragraph",content:WzZ(Z.text||"",Q)}]};if(Z.tokens.some((K)=>K.type==="paragraph"))G=q(Z.tokens);else{let K=Z.tokens[0];if(K&&K.type==="text"&&K.tokens&&K.tokens.length>0){if(G=[{type:"paragraph",content:Q.parseInline(K.tokens)}],Z.tokens.length>1){let B=Z.tokens.slice(1),F=q(B);G.push(...F)}}else G=q(Z.tokens)}}if(G.length===0)G=[{type:"paragraph",content:[]}];return{type:"listItem",content:G}},renderMarkdown:(Z,Q,J)=>{return X7(Z,Q,(q)=>{var G,U,K,H;if(q.parentType==="bulletList")return"- ";if(q.parentType==="orderedList"){let B=((U=(G=q.meta)==null?void 0:G.parentAttrs)==null?void 0:U.start)||1,F=(H=(K=q.meta)==null?void 0:K.parentAttrs)==null?void 0:H.type,M=B-1+(q.index||0);return KzZ(F,M,". ")}return"- "},J)},addExtensions(){return[Vp(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)}}}),BzZ={};oGZ(BzZ,{findListItemPos:()=>u_,getNextListDepth:()=>KT,handleBackspace:()=>XT,handleDelete:()=>JT,hasListBefore:()=>jp,hasListItemAfter:()=>_zZ,hasListItemBefore:()=>FzZ,listItemHasSubList:()=>LzZ,nextListIsDeeper:()=>Tp,nextListIsHigher:()=>Pp});HT=NQ.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:Z})=>{let Q=!1;return this.options.listTypes.forEach(({itemName:J})=>{if(Z.state.schema.nodes[J]===void 0)return;if(JT(Z,J))Q=!0}),Q},"Mod-Delete":({editor:Z})=>{let Q=!1;return this.options.listTypes.forEach(({itemName:J})=>{if(Z.state.schema.nodes[J]===void 0)return;if(JT(Z,J))Q=!0}),Q},Backspace:({editor:Z})=>{let Q=!1;return this.options.listTypes.forEach(({itemName:J,wrapperNames:q})=>{if(Z.state.schema.nodes[J]===void 0)return;if(XT(Z,J,q))Q=!0}),Q},"Mod-Backspace":({editor:Z})=>{let Q=!1;return this.options.listTypes.forEach(({itemName:J,wrapperNames:q})=>{if(Z.state.schema.nodes[J]===void 0)return;if(XT(Z,J,q))Q=!0}),Q}}}}),YT=new RegExp(`^(\\s*)(${Ip})([.)])\\s+(.*)$`),MzZ=/^\s/,j7={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};jzZ=new RegExp(`^(${Ip})([.)])\\s+(.+)$`);Mp=/^(\d+)\.\s$/;WT=eQ.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:(Z)=>{return Z.hasAttribute("start")?parseInt(Z.getAttribute("start")||"",10):1}},type:{default:null,parseHTML:(Z)=>{let Q=Z.getAttribute("type");if(Q)return Q;let J=Z.getAttribute("style");if(J){let G=Op(J);if(G)return G}let q=Z.querySelector("li");if(q){let G=q.getAttribute("style");if(G){let U=Op(G);if(U)return U}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:Z}){let{start:Q,type:J,...q}=Z,G=IQ(this.options.HTMLAttributes,q);if(Q!==1)G.start=Q;if(J&&J!=="1")G.type=J;return["ol",G,0]},markdownTokenName:"list",parseMarkdown:(Z,Q)=>{if(Z.type!=="list"||!Z.ordered)return[];let J=Z.start||1,q=Z.typeMarker,G=Z.items?PzZ(Z.items,Q):[],U={};if(J!==1)U.start=J;if(q)U.type=q;if(Object.keys(U).length>0)return{type:"orderedList",attrs:U,content:G};return{type:"orderedList",content:G}},renderMarkdown:(Z,Q)=>{if(!Z.content)return"";return Q.renderChildren(Z.content,`
|
|
391
|
+
`)},markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(Z,Q,J)=>{var q,G;let U=Z.split(`
|
|
392
|
+
`),[K,H]=NzZ(U);if(K.length===0)return;let B=Rp(K,K[0].indent,J);if(B.length===0)return;let F=((q=K[0])==null?void 0:q.number)||1,M=(G=K[0])==null?void 0:G.type;return{type:"list",ordered:!0,start:F,typeMarker:M,items:B,raw:U.slice(0,H).join(`
|
|
393
|
+
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:Z,chain:Q})=>{if(this.options.keepAttributes)return Q().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(RzZ,this.editor.getAttributes(Lp)).run();return Z.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new lZ({props:{handlePaste:(Z,Q)=>{var J,q;let G=(J=Q.clipboardData)==null?void 0:J.getData("text/html");if(G==null?void 0:G.trim())return!1;let U=(q=Q.clipboardData)==null?void 0:q.getData("text/plain");if(!U)return!1;let K=TzZ(U);if(!K)return!1;try{let H=Z.state.schema.nodeFromJSON(K),B=Z.state.tr.replaceSelectionWith(H);return Z.dispatch(B),!0}catch{return!1}}}})]},addInputRules(){let Z=(J,q)=>{return(!q.attrs.type||q.attrs.type==="1")&&q.childCount+q.attrs.start===+J[1]},Q=oG({find:Mp,type:this.type,getAttributes:(J)=>({start:+J[1]}),joinPredicate:Z});if(this.options.keepMarks||this.options.keepAttributes)Q=oG({find:Mp,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:(J)=>({start:+J[1],...this.editor.getAttributes(Lp)}),joinPredicate:Z,editor:this.editor});return[Q]}}),CzZ=/^\s*(\[([( |x])?\])\s$/,f_=eQ.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:(Z)=>{let Q=Z.getAttribute("data-checked");return Q===""||Q==="true"},renderHTML:(Z)=>({"data-checked":Z.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:Z,HTMLAttributes:Q}){return["li",IQ(this.options.HTMLAttributes,Q,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:Z.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(Z,Q)=>{let J=[];if(Z.tokens&&Z.tokens.length>0)J.push(Q.createNode("paragraph",{},Q.parseInline(Z.tokens)));else if(Z.text)J.push(Q.createNode("paragraph",{},[Q.createNode("text",{text:Z.text})]));else J.push(Q.createNode("paragraph",{},[]));if(Z.nestedTokens&&Z.nestedTokens.length>0){let q=Q.parseChildren(Z.nestedTokens);J.push(...q)}return Q.createNode("taskItem",{checked:Z.checked||!1},J)},renderMarkdown:(Z,Q)=>{var J;let G=`- [${((J=Z.attrs)==null?void 0:J.checked)?"x":" "}] `;return X7(Z,Q,G)},addExtensions(){if(!this.options.nested)return[];return[Vp(this.name,[this.options.taskListTypeName])]},addKeyboardShortcuts(){let Z={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};if(!this.options.nested)return Z;return{...Z,Tab:()=>this.editor.commands.sinkListItem(this.name)}},addNodeView(){return({node:Z,HTMLAttributes:Q,getPos:J,editor:q})=>{let G=document.createElement("li"),U=document.createElement("label"),K=document.createElement("span"),H=document.createElement("input"),B=document.createElement("div"),F=(O)=>{var V,A;H.ariaLabel=((A=(V=this.options.a11y)==null?void 0:V.checkboxLabel)==null?void 0:A.call(V,O,H.checked))||`Task item checkbox for ${O.textContent||"empty task item"}`};F(Z),U.contentEditable="false",H.type="checkbox",H.addEventListener("mousedown",(O)=>O.preventDefault()),H.addEventListener("change",(O)=>{if(!q.isEditable&&!this.options.onReadOnlyChecked){H.checked=!H.checked;return}let{checked:V}=O.target;if(q.isEditable&&typeof J==="function")q.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:A})=>{let N=J();if(typeof N!=="number")return!1;let T=A.doc.nodeAt(N);return A.setNodeMarkup(N,void 0,{...T==null?void 0:T.attrs,checked:V}),!0}).run();if(!q.isEditable&&this.options.onReadOnlyChecked){if(!this.options.onReadOnlyChecked(Z,V))H.checked=!H.checked}}),Object.entries(this.options.HTMLAttributes).forEach(([O,V])=>{G.setAttribute(O,V)}),G.dataset.checked=Z.attrs.checked,H.checked=Z.attrs.checked,U.append(H,K),G.append(U,B),Object.entries(Q).forEach(([O,V])=>{G.setAttribute(O,V)});let M=new Set(Object.keys(Q));return{dom:G,contentDOM:B,update:(O)=>{if(O.type!==this.type)return!1;G.dataset.checked=O.attrs.checked,H.checked=O.attrs.checked,F(O);let V=q.extensionManager.attributes,A=iK(O,V),N=new Set(Object.keys(A)),T=this.options.HTMLAttributes;return M.forEach((P)=>{if(!N.has(P))if(P in T)G.setAttribute(P,T[P]);else G.removeAttribute(P)}),Object.entries(A).forEach(([P,C])=>{if(C===null||C===void 0)if(P in T)G.setAttribute(P,T[P]);else G.removeAttribute(P);else G.setAttribute(P,C)}),M=N,!0}}}},addInputRules(){return[oG({find:CzZ,type:this.type,getAttributes:(Z)=>({checked:Z[Z.length-1]==="x"})})]}}),m_=eQ.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:Z}){return["ul",IQ(this.options.HTMLAttributes,Z,{"data-type":this.name}),0]},parseMarkdown:(Z,Q)=>{return Q.createNode("taskList",{},Q.parseChildren(Z.items||[]))},renderMarkdown:(Z,Q)=>{if(!Z.content)return"";return Q.renderChildren(Z.content,`
|
|
394
|
+
`)},markdownTokenizer:{name:"taskList",level:"block",start(Z){var Q;let J=(Q=Z.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:Q.index;return J!==void 0?J:-1},tokenize(Z,Q,J){let q=(U)=>{let K=PB(U,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:(H)=>({indentLevel:H[1].length,mainContent:H[4],checked:H[3].toLowerCase()==="x"}),createToken:(H,B)=>({type:"taskItem",raw:"",mainContent:H.mainContent,indentLevel:H.indentLevel,checked:H.checked,text:H.mainContent,tokens:J.inlineTokens(H.mainContent),nestedTokens:B}),customNestedParser:q},J);if(K){let H={type:"taskList",raw:K.raw,items:K.items},B=U.slice(K.raw.length);if(B.trim())return[H,...J.blockTokens(B)];return[H]}return J.blockTokens(U)},G=PB(Z,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:(U)=>({indentLevel:U[1].length,mainContent:U[4],checked:U[3].toLowerCase()==="x"}),createToken:(U,K)=>({type:"taskItem",raw:"",mainContent:U.mainContent,indentLevel:U.indentLevel,checked:U.checked,text:U.mainContent,tokens:J.inlineTokens(U.mainContent),nestedTokens:K}),customNestedParser:q},J);if(!G)return;return{type:"taskList",raw:G.raw,items:G.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:Z})=>{return Z.toggleList(this.name,this.options.itemTypeName)}}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),TCZ=NQ.create({name:"listKit",addExtensions(){let Z=[];if(this.options.bulletList!==!1)Z.push(qT.configure(this.options.bulletList));if(this.options.listItem!==!1)Z.push(UT.configure(this.options.listItem));if(this.options.listKeymap!==!1)Z.push(HT.configure(this.options.listKeymap));if(this.options.orderedList!==!1)Z.push(WT.configure(this.options.orderedList));if(this.options.taskItem!==!1)Z.push(f_.configure(this.options.taskItem));if(this.options.taskList!==!1)Z.push(m_.configure(this.options.taskList));return Z}})});var c_=" ",BT=" ",Cp;var Dp=k(()=>{aZ();Cp=eQ.create({name:"paragraph",priority:1000,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:Z}){return["p",IQ(this.options.HTMLAttributes,Z),0]},parseMarkdown:(Z,Q)=>{let J=Z.tokens||[];if(J.length===1&&J[0].type==="image")return Q.parseChildren([J[0]]);let q=Q.parseInline(J);if(J.length===1&&J[0].type==="text"&&(J[0].raw===c_||J[0].text===c_||J[0].raw===BT||J[0].text===BT)&&q.length===1&&q[0].type==="text"&&(q[0].text===c_||q[0].text===BT))return Q.createNode("paragraph",void 0,[]);return Q.createNode("paragraph",void 0,q)},renderMarkdown:(Z,Q,J)=>{var q,G;if(!Z)return"";let U=Array.isArray(Z.content)?Z.content:[];if(U.length===0){let K=Array.isArray((q=J==null?void 0:J.previousNode)==null?void 0:q.content)?J.previousNode.content:[];return((G=J==null?void 0:J.previousNode)==null?void 0:G.type)==="paragraph"&&K.length===0?c_:""}return Q.renderChildren(U)},addCommands(){return{setParagraph:()=>({commands:Z})=>{return Z.setNode(this.name)}}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})});var DzZ,$zZ,$p;var Ep=k(()=>{aZ();DzZ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,$zZ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,$p=sJ.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:(Z)=>Z.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:Z}){return["s",IQ(this.options.HTMLAttributes,Z),0]},markdownTokenName:"del",parseMarkdown:(Z,Q)=>{return Q.applyMark("strike",Q.parseInline(Z.tokens||[]))},renderMarkdown:(Z,Q)=>{return`~~${Q.renderChildren(Z)}~~`},addCommands(){return{setStrike:()=>({commands:Z})=>{return Z.setMark(this.name)},toggleStrike:()=>({commands:Z})=>{return Z.toggleMark(this.name)},unsetStrike:()=>({commands:Z})=>{return Z.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[_Y({find:DzZ,type:this.type})]},addPasteRules(){return[EJ({find:$zZ,type:this.type})]}})});var kp;var Sp=k(()=>{aZ();kp=eQ.create({name:"text",group:"inline",parseMarkdown:(Z)=>{return{type:"text",text:Z.text||""}},renderMarkdown:(Z)=>Z.text||""})});var yp;var wp=k(()=>{aZ();yp=sJ.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:(Z)=>Z.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:Z}){return["u",IQ(this.options.HTMLAttributes,Z),0]},parseMarkdown(Z,Q){return Q.applyMark(this.name||"underline",Q.parseInline(Z.tokens||[]))},renderMarkdown(Z,Q){return`++${Q.renderChildren(Z)}++`},markdownTokenizer:{name:"underline",level:"inline",start(Z){return Z.indexOf("++")},tokenize(Z,Q,J){let G=/^(\+\+)([\s\S]+?)(\+\+)/.exec(Z);if(!G)return;let U=G[2].trim();return{type:"underline",raw:G[0],text:U,tokens:J.inlineTokens(U)}}},addCommands(){return{setUnderline:()=>({commands:Z})=>{return Z.setMark(this.name)},toggleUnderline:()=>({commands:Z})=>{return Z.toggleMark(this.name)},unsetUnderline:()=>({commands:Z})=>{return Z.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})});function xp(Z={}){return new lZ({view(Q){return new bp(Q,Z)}})}class bp{constructor(Z,Q){var J;this.editorView=Z,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(J=Q.width)!==null&&J!==void 0?J:1,this.color=Q.color===!1?void 0:Q.color||"black",this.class=Q.class,this.handlers=["dragover","dragend","drop","dragleave"].map((q)=>{let G=(U)=>{this[q](U)};return Z.dom.addEventListener(q,G),{name:q,handler:G}})}destroy(){this.handlers.forEach(({name:Z,handler:Q})=>this.editorView.dom.removeEventListener(Z,Q))}update(Z,Q){if(this.cursorPos!=null&&Q.doc!=Z.state.doc)if(this.lastDragEvent){let J=this.computeTarget(this.lastDragEvent);if(J==this.cursorPos)this.updateOverlay();else this.setCursor(J)}else this.updateOverlay()}setCursor(Z){if(Z==this.cursorPos)return;if(this.cursorPos=Z,Z==null)this.element.parentNode.removeChild(this.element),this.element=null;else this.updateOverlay()}updateOverlay(){let Z=this.editorView.state.doc.resolve(this.cursorPos),Q=!Z.parent.inlineContent,J,q=this.editorView.dom,G=q.getBoundingClientRect(),U=G.width/q.offsetWidth,K=G.height/q.offsetHeight;if(Q){let{nodeBefore:M,nodeAfter:O}=Z;if(M||O){let V=this.editorView.nodeDOM(this.cursorPos-(M?M.nodeSize:0));if(V){let A=V.getBoundingClientRect(),N=M?A.bottom:A.top;if(M&&O)N=(N+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2;let T=this.width/2*K;J={left:A.left,right:A.right,top:N-T,bottom:N+T}}}}if(!J){let M=this.editorView.coordsAtPos(this.cursorPos),O=this.width/2*U;J={left:M.left-O,right:M.left+O,top:M.top,bottom:M.bottom}}let H=this.editorView.dom.offsetParent;if(!this.element){if(this.element=H.appendChild(document.createElement("div")),this.class)this.element.className=this.class;if(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",Q),this.element.classList.toggle("prosemirror-dropcursor-inline",!Q);let B,F;if(!H||H==document.body&&getComputedStyle(H).position=="static")B=-pageXOffset,F=-pageYOffset;else{let M=H.getBoundingClientRect(),O=M.width/H.offsetWidth,V=M.height/H.offsetHeight;B=M.left-H.scrollLeft*O,F=M.top-H.scrollTop*V}this.element.style.left=(J.left-B)/U+"px",this.element.style.top=(J.top-F)/K+"px",this.element.style.width=(J.right-J.left)/U+"px",this.element.style.height=(J.bottom-J.top)/K+"px"}scheduleRemoval(Z){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),Z)}computeTarget(Z){let Q=this.editorView.posAtCoords({left:Z.clientX,top:Z.clientY}),J=Q&&Q.inside>=0&&this.editorView.state.doc.nodeAt(Q.inside),q=J&&J.type.spec.disableDropCursor,G=typeof q=="function"?q(this.editorView,Q,Z):q;if(!Q||G)return null;let U=Q.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let K=n2(this.editorView.state.doc,U,this.editorView.dragging.slice);if(K!=null)U=K}return U}dragover(Z){if(!this.editorView.editable)return;this.lastDragEvent=Z;let Q=this.computeTarget(Z);if(Q!=null)this.setCursor(Q),this.scheduleRemoval(5000)}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(Z){if(!this.editorView.dom.contains(Z.relatedTarget))this.setCursor(null)}}var vp=k(()=>{nz();T9()});var gp=k(()=>{vp()});class _T{constructor(Z){this.pos=Z}map(Z){return new _T(Z.map(this.pos))}resolve(Z){let Q=Z.resolve(this.pos);return PX.valid(Q)?new PX(Q):mZ.near(Q)}}function hp(Z){return Z.isAtom||Z.spec.isolating||Z.spec.createGapCursor}function EzZ(Z){for(let Q=Z.depth;Q>=0;Q--){let J=Z.index(Q),q=Z.node(Q);if(J==0){if(q.type.spec.isolating)return!0;continue}for(let G=q.child(J-1);;G=G.lastChild){if(G.childCount==0&&!G.inlineContent||hp(G.type))return!0;if(G.inlineContent)return!1}}return!0}function kzZ(Z){for(let Q=Z.depth;Q>=0;Q--){let J=Z.indexAfter(Q),q=Z.node(Q);if(J==q.childCount){if(q.type.spec.isolating)return!0;continue}for(let G=q.child(J);;G=G.firstChild){if(G.childCount==0&&!G.inlineContent||hp(G.type))return!0;if(G.inlineContent)return!1}}return!0}function up(){return new lZ({props:{decorations:xzZ,createSelectionBetween(Z,Q,J){return Q.pos==J.pos&&PX.valid(J)?new PX(J):null},handleClick:yzZ,handleKeyDown:SzZ,handleDOMEvents:{beforeinput:wzZ}}})}function p_(Z,Q){let J=Z=="vert"?Q>0?"down":"up":Q>0?"right":"left";return function(q,G,U){let K=q.selection,H=Q>0?K.$to:K.$from,B=K.empty;if(K instanceof DZ){if(!U.endOfTextblock(J)||H.depth==0)return!1;B=!1,H=q.doc.resolve(Q>0?H.after():H.before())}let F=PX.findGapCursorFrom(H,Q,B);if(!F)return!1;if(G)G(q.tr.setSelection(new PX(F)));return!0}}function yzZ(Z,Q,J){if(!Z||!Z.editable)return!1;let q=Z.state.doc.resolve(Q);if(!PX.valid(q))return!1;let G=Z.posAtCoords({left:J.clientX,top:J.clientY});if(G&&G.inside>-1&&SZ.isSelectable(Z.state.doc.nodeAt(G.inside)))return!1;return Z.dispatch(Z.state.tr.setSelection(new PX(q))),!0}function wzZ(Z,Q){if(Q.inputType!="insertCompositionText"||!(Z.state.selection instanceof PX))return!1;let{$from:J}=Z.state.selection,q=J.parent.contentMatchAt(J.index()).findWrapping(Z.state.schema.nodes.text);if(!q)return!1;let G=UZ.empty;for(let K=q.length-1;K>=0;K--)G=UZ.from(q[K].createAndFill(null,G));let U=Z.state.tr.replace(J.pos,J.pos,new AZ(G,0,0));return U.setSelection(DZ.near(U.doc.resolve(J.pos+1))),Z.dispatch(U),!1}function xzZ(Z){if(!(Z.selection instanceof PX))return null;let Q=document.createElement("div");return Q.className="ProseMirror-gapcursor",xQ.create(Z.doc,[iX.widget(Z.selection.head,Q,{key:"gapcursor"})])}var PX,SzZ;var fp=k(()=>{zB();nz();lz();sN();PX=class PX extends mZ{constructor(Z){super(Z,Z)}map(Z,Q){let J=Z.resolve(Q.map(this.head));return PX.valid(J)?new PX(J):mZ.near(J)}content(){return AZ.empty}eq(Z){return Z instanceof PX&&Z.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(Z,Q){if(typeof Q.pos!="number")throw RangeError("Invalid input for GapCursor.fromJSON");return new PX(Z.resolve(Q.pos))}getBookmark(){return new _T(this.anchor)}static valid(Z){let Q=Z.parent;if(Q.inlineContent||!EzZ(Z)||!kzZ(Z))return!1;let J=Q.type.spec.allowGapCursor;if(J!=null)return J;let q=Q.contentMatchAt(Z.index()).defaultType;return q&&q.isTextblock}static findGapCursorFrom(Z,Q,J=!1){Z:for(;;){if(!J&&PX.valid(Z))return Z;let q=Z.pos,G=null;for(let U=Z.depth;;U--){let K=Z.node(U);if(Q>0?Z.indexAfter(U)<K.childCount:Z.index(U)>0){G=K.child(Q>0?Z.indexAfter(U):Z.index(U)-1);break}else if(U==0)return null;q+=Q;let H=Z.doc.resolve(q);if(PX.valid(H))return H}for(;;){let U=Q>0?G.firstChild:G.lastChild;if(!U){if(G.isAtom&&!G.isText&&!SZ.isSelectable(G)){Z=Z.doc.resolve(q+G.nodeSize*Q),J=!1;continue Z}break}G=U,q+=Q;let K=Z.doc.resolve(q);if(PX.valid(K))return K}return null}}};PX.prototype.visible=!1;PX.findFrom=PX.findGapCursorFrom;mZ.jsonID("gapcursor",PX);SzZ=tH({ArrowLeft:p_("horiz",-1),ArrowRight:p_("horiz",1),ArrowUp:p_("vert",-1),ArrowDown:p_("vert",1)})});var mp=k(()=>{fp()});var d_=200,VJ=function(){},cp,bzZ,FT;var pp=k(()=>{VJ.prototype.append=function(Q){if(!Q.length)return this;return Q=VJ.from(Q),!this.length&&Q||Q.length<d_&&this.leafAppend(Q)||this.length<d_&&Q.leafPrepend(this)||this.appendInner(Q)};VJ.prototype.prepend=function(Q){if(!Q.length)return this;return VJ.from(Q).append(this)};VJ.prototype.appendInner=function(Q){return new bzZ(this,Q)};VJ.prototype.slice=function(Q,J){if(Q===void 0)Q=0;if(J===void 0)J=this.length;if(Q>=J)return VJ.empty;return this.sliceInner(Math.max(0,Q),Math.min(this.length,J))};VJ.prototype.get=function(Q){if(Q<0||Q>=this.length)return;return this.getInner(Q)};VJ.prototype.forEach=function(Q,J,q){if(J===void 0)J=0;if(q===void 0)q=this.length;if(J<=q)this.forEachInner(Q,J,q,0);else this.forEachInvertedInner(Q,J,q,0)};VJ.prototype.map=function(Q,J,q){if(J===void 0)J=0;if(q===void 0)q=this.length;var G=[];return this.forEach(function(U,K){return G.push(Q(U,K))},J,q),G};VJ.from=function(Q){if(Q instanceof VJ)return Q;return Q&&Q.length?new cp(Q):VJ.empty};cp=function(Z){function Q(q){Z.call(this),this.values=q}if(Z)Q.__proto__=Z;Q.prototype=Object.create(Z&&Z.prototype),Q.prototype.constructor=Q;var J={length:{configurable:!0},depth:{configurable:!0}};return Q.prototype.flatten=function(){return this.values},Q.prototype.sliceInner=function(G,U){if(G==0&&U==this.length)return this;return new Q(this.values.slice(G,U))},Q.prototype.getInner=function(G){return this.values[G]},Q.prototype.forEachInner=function(G,U,K,H){for(var B=U;B<K;B++)if(G(this.values[B],H+B)===!1)return!1},Q.prototype.forEachInvertedInner=function(G,U,K,H){for(var B=U-1;B>=K;B--)if(G(this.values[B],H+B)===!1)return!1},Q.prototype.leafAppend=function(G){if(this.length+G.length<=d_)return new Q(this.values.concat(G.flatten()))},Q.prototype.leafPrepend=function(G){if(this.length+G.length<=d_)return new Q(G.flatten().concat(this.values))},J.length.get=function(){return this.values.length},J.depth.get=function(){return 0},Object.defineProperties(Q.prototype,J),Q}(VJ);VJ.empty=new cp([]);bzZ=function(Z){function Q(J,q){Z.call(this),this.left=J,this.right=q,this.length=J.length+q.length,this.depth=Math.max(J.depth,q.depth)+1}if(Z)Q.__proto__=Z;return Q.prototype=Object.create(Z&&Z.prototype),Q.prototype.constructor=Q,Q.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},Q.prototype.getInner=function(q){return q<this.left.length?this.left.get(q):this.right.get(q-this.left.length)},Q.prototype.forEachInner=function(q,G,U,K){var H=this.left.length;if(G<H&&this.left.forEachInner(q,G,Math.min(U,H),K)===!1)return!1;if(U>H&&this.right.forEachInner(q,Math.max(G-H,0),Math.min(this.length,U)-H,K+H)===!1)return!1},Q.prototype.forEachInvertedInner=function(q,G,U,K){var H=this.left.length;if(G>H&&this.right.forEachInvertedInner(q,G-H,Math.max(U,H)-H,K+H)===!1)return!1;if(U<H&&this.left.forEachInvertedInner(q,Math.min(G,H),U,K)===!1)return!1},Q.prototype.sliceInner=function(q,G){if(q==0&&G==this.length)return this;var U=this.left.length;if(G<=U)return this.left.slice(q,G);if(q>=U)return this.right.slice(q-U,G-U);return this.left.slice(q,U).append(this.right.slice(0,G-U))},Q.prototype.leafAppend=function(q){var G=this.right.leafAppend(q);if(G)return new Q(this.left,G)},Q.prototype.leafPrepend=function(q){var G=this.left.leafPrepend(q);if(G)return new Q(G,this.right)},Q.prototype.appendInner=function(q){if(this.left.depth>=Math.max(this.right.depth,q.depth)+1)return new Q(this.left,new Q(this.right,q));return new Q(this,q)},Q}(VJ),FT=VJ});class YG{constructor(Z,Q){this.items=Z,this.eventCount=Q}popEvent(Z,Q){if(this.eventCount==0)return null;let J=this.items.length;for(;;J--)if(this.items.get(J-1).selection){--J;break}let q,G;if(Q)q=this.remapping(J,this.items.length),G=q.maps.length;let U=Z.tr,K,H,B=[],F=[];return this.items.forEach((M,O)=>{if(!M.step){if(!q)q=this.remapping(J,O+1),G=q.maps.length;G--,F.push(M);return}if(q){F.push(new Xz(M.map));let V=M.step.map(q.slice(G)),A;if(V&&U.maybeStep(V).doc)A=U.mapping.maps[U.mapping.maps.length-1],B.push(new Xz(A,void 0,void 0,B.length+F.length));if(G--,A)q.appendMap(A,G)}else U.maybeStep(M.step);if(M.selection)return K=q?M.selection.map(q.slice(G)):M.selection,H=new YG(this.items.slice(0,J).append(F.reverse().concat(B)),this.eventCount-1),!1},this.items.length,0),{remaining:H,transform:U,selection:K}}addTransform(Z,Q,J,q){let G=[],U=this.eventCount,K=this.items,H=!q&&K.length?K.get(K.length-1):null;for(let F=0;F<Z.steps.length;F++){let M=Z.steps[F].invert(Z.docs[F]),O=new Xz(Z.mapping.maps[F],M,Q),V;if(V=H&&H.merge(O))if(O=V,F)G.pop();else K=K.slice(0,K.length-1);if(G.push(O),Q)U++,Q=void 0;if(!q)H=O}let B=U-J.depth;if(B>hzZ)K=gzZ(K,B),U-=B;return new YG(K.append(G),U)}remapping(Z,Q){let J=new yK;return this.items.forEach((q,G)=>{let U=q.mirrorOffset!=null&&G-q.mirrorOffset>=Z?J.maps.length-q.mirrorOffset:void 0;J.appendMap(q.map,U)},Z,Q),J}addMaps(Z){if(this.eventCount==0)return this;return new YG(this.items.append(Z.map((Q)=>new Xz(Q))),this.eventCount)}rebased(Z,Q){if(!this.eventCount)return this;let J=[],q=Math.max(0,this.items.length-Q),G=Z.mapping,U=Z.steps.length,K=this.eventCount;this.items.forEach((O)=>{if(O.selection)K--},q);let H=Q;this.items.forEach((O)=>{let V=G.getMirror(--H);if(V==null)return;U=Math.min(U,V);let A=G.maps[V];if(O.step){let N=Z.steps[V].invert(Z.docs[V]),T=O.selection&&O.selection.map(G.slice(H+1,V));if(T)K++;J.push(new Xz(A,N,T))}else J.push(new Xz(A))},q);let B=[];for(let O=Q;O<U;O++)B.push(new Xz(G.maps[O]));let F=this.items.slice(0,q).append(B).append(J),M=new YG(F,K);if(M.emptyItemCount()>vzZ)M=M.compress(this.items.length-J.length);return M}emptyItemCount(){let Z=0;return this.items.forEach((Q)=>{if(!Q.step)Z++}),Z}compress(Z=this.items.length){let Q=this.remapping(0,Z),J=Q.maps.length,q=[],G=0;return this.items.forEach((U,K)=>{if(K>=Z){if(q.push(U),U.selection)G++}else if(U.step){let H=U.step.map(Q.slice(J)),B=H&&H.getMap();if(J--,B)Q.appendMap(B,J);if(H){let F=U.selection&&U.selection.map(Q.slice(J));if(F)G++;let M=new Xz(B.invert(),H,F),O,V=q.length-1;if(O=q.length&&q[V].merge(M))q[V]=O;else q.push(M)}}else if(U.map)J--},this.items.length,0),new YG(FT.from(q.reverse()),G)}}function gzZ(Z,Q){let J;return Z.forEach((q,G)=>{if(q.selection&&Q--==0)return J=G,!1}),Z.slice(J)}class Xz{constructor(Z,Q,J,q){this.map=Z,this.step=Q,this.selection=J,this.mirrorOffset=q}merge(Z){if(this.step&&Z.step&&!Z.selection){let Q=Z.step.merge(this.step);if(Q)return new Xz(Q.getMap().invert(),Q,this.selection)}}}class W0{constructor(Z,Q,J,q,G){this.done=Z,this.undone=Q,this.prevRanges=J,this.prevTime=q,this.prevComposition=G}}function uzZ(Z,Q,J,q){let G=J.getMeta(y6),U;if(G)return G.historyState;if(J.getMeta(czZ))Z=new W0(Z.done,Z.undone,null,0,-1);let K=J.getMeta("appendedTransaction");if(J.steps.length==0)return Z;else if(K&&K.getMeta(y6))if(K.getMeta(y6).redo)return new W0(Z.done.addTransform(J,void 0,q,l_(Q)),Z.undone,dp(J.mapping.maps),Z.prevTime,Z.prevComposition);else return new W0(Z.done,Z.undone.addTransform(J,void 0,q,l_(Q)),null,Z.prevTime,Z.prevComposition);else if(J.getMeta("addToHistory")!==!1&&!(K&&K.getMeta("addToHistory")===!1)){let H=J.getMeta("composition"),B=Z.prevTime==0||!K&&Z.prevComposition!=H&&(Z.prevTime<(J.time||0)-q.newGroupDelay||!fzZ(J,Z.prevRanges)),F=K?LT(Z.prevRanges,J.mapping):dp(J.mapping.maps);return new W0(Z.done.addTransform(J,B?Q.selection.getBookmark():void 0,q,l_(Q)),YG.empty,F,J.time,H==null?Z.prevComposition:H)}else if(U=J.getMeta("rebased"))return new W0(Z.done.rebased(J,U),Z.undone.rebased(J,U),LT(Z.prevRanges,J.mapping),Z.prevTime,Z.prevComposition);else return new W0(Z.done.addMaps(J.mapping.maps),Z.undone.addMaps(J.mapping.maps),LT(Z.prevRanges,J.mapping),Z.prevTime,Z.prevComposition)}function fzZ(Z,Q){if(!Q)return!1;if(!Z.docChanged)return!0;let J=!1;return Z.mapping.maps[0].forEach((q,G)=>{for(let U=0;U<Q.length;U+=2)if(q<=Q[U+1]&&G>=Q[U])J=!0}),J}function dp(Z){let Q=[];for(let J=Z.length-1;J>=0&&Q.length==0;J--)Z[J].forEach((q,G,U,K)=>Q.push(U,K));return Q}function LT(Z,Q){if(!Z)return null;let J=[];for(let q=0;q<Z.length;q+=2){let G=Q.map(Z[q],1),U=Q.map(Z[q+1],-1);if(G<=U)J.push(G,U)}return J}function mzZ(Z,Q,J){let q=l_(Q),G=y6.get(Q).spec.config,U=(J?Z.undone:Z.done).popEvent(Q,q);if(!U)return null;let K=U.selection.resolve(U.transform.doc),H=(J?Z.done:Z.undone).addTransform(U.transform,Q.selection.getBookmark(),G,q),B=new W0(J?H:U.remaining,J?U.remaining:H,null,0,-1);return U.transform.setSelection(K).setMeta(y6,{redo:J,historyState:B})}function l_(Z){let Q=Z.plugins;if(lp!=Q){MT=!1,lp=Q;for(let J=0;J<Q.length;J++)if(Q[J].spec.historyPreserveItems){MT=!0;break}}return MT}function ip(Z={}){return Z={depth:Z.depth||100,newGroupDelay:Z.newGroupDelay||500},new lZ({key:y6,state:{init(){return new W0(YG.empty,YG.empty,null,0,-1)},apply(Q,J,q){return uzZ(J,q,Q,Z)}},config:Z,props:{handleDOMEvents:{beforeinput(Q,J){let q=J.inputType,G=q=="historyUndo"?OT:q=="historyRedo"?VT:null;if(!G||!Q.editable)return!1;return J.preventDefault(),G(Q.state,Q.dispatch)}}}})}function i_(Z,Q){return(J,q)=>{let G=y6.getState(J);if(!G||(Z?G.undone:G.done).eventCount==0)return!1;if(q){let U=mzZ(G,J,Z);if(U)q(Q?U.scrollIntoView():U)}return!0}}var vzZ=500,hzZ=20,MT=!1,lp=null,y6,czZ,OT,VT,aCZ,rCZ;var np=k(()=>{pp();T9();nz();YG.empty=new YG(FT.empty,0);y6=new tZ("history"),czZ=new tZ("closeHistory");OT=i_(!1,!0),VT=i_(!0,!0),aCZ=i_(!1,!1),rCZ=i_(!0,!1)});var sp=k(()=>{np()});function Zd(Z){let{editor:Q,placeholder:J,dataAttribute:q,pos:G,node:U,isEmptyDoc:K,hasAnchor:H,classes:{emptyNode:B,emptyEditor:F}}=Z,M=[B];if(K)M.push(F);return iX.node(G,G+U.nodeSize,{class:M.join(" "),[q]:typeof J==="function"?J({editor:Q,node:U,pos:G,hasAnchor:H}):J})}function Qd(Z,Q){return typeof Z==="function"?Z(Q):Z}function Xd({editor:Z,options:Q,dataAttribute:J,doc:q,selection:G,from:U,to:K}){let{anchor:H}=G,B=[],F=Z.isEmpty;return q.nodesBetween(U,K,(M,O)=>{let V=H>=O&&H<=O+M.nodeSize,A=!M.isLeaf&&nK(M);if(!M.type.isTextblock)return Q.includeChildren;if((V||!Q.showOnlyCurrent)&&A)B.push(Zd({editor:Z,isEmptyDoc:F,dataAttribute:J,hasAnchor:V,placeholder:Q.placeholder,classes:{emptyEditor:Q.emptyEditorClass,emptyNode:Qd(Q.emptyNodeClass,{editor:Z,node:M,pos:O,hasAnchor:V})},node:M,pos:O}));return Q.includeChildren}),B}function Jd({editor:Z,options:Q,dataAttribute:J,doc:q,selection:G}){if(!(Z.isEditable||!Q.showOnlyWhenEditable))return null;let{anchor:K}=G,H=[],B=Z.isEmpty;if(Q.showOnlyCurrent&&!Q.includeChildren){let M=q.resolve(K),O=M.depth>0?M.node(1):M.nodeAfter,V=M.depth>0?M.before(1):K;if(O&&O.type.isTextblock&&nK(O)){let A=K>=V&&K<=V+O.nodeSize;H.push(Zd({editor:Z,isEmptyDoc:B,dataAttribute:J,hasAnchor:A,placeholder:Q.placeholder,classes:{emptyEditor:Q.emptyEditorClass,emptyNode:Qd(Q.emptyNodeClass,{editor:Z,node:O,pos:V,hasAnchor:A})},node:O,pos:V}))}}else H.push(...Xd({editor:Z,options:Q,dataAttribute:J,doc:q,selection:G,from:0,to:q.content.size}));return xQ.create(q,H)}function T7(Z,Q){var J;let q=Z.resolve(Q);if(q.depth===0){let K=(J=q.nodeAfter)!=null?J:q.nodeBefore;if(!K)return{from:Q,to:Q};let H=q.nodeAfter?Q:Q-K.nodeSize;return{from:H,to:H+K.nodeSize}}let G=q.before(1),U=q.node(1);return{from:G,to:G+U.nodeSize}}function P7(Z,Q){return{from:Math.max(0,Q.from-1),to:Math.min(Z.content.size,Q.to-1)}}function pzZ(Z,Q,J){let q=[];return Z.forEach((G,U)=>{let K=U,H=K+G.nodeSize,B=K+1,F=H+1;if(B<J&&F>Q)q.push({from:K,to:H})}),q}function dzZ(Z){if(Z.length===0)return[];let Q=[...Z].sort((q,G)=>q.from-G.from),J=[{...Q[0]}];for(let q=1;q<Q.length;q+=1){let G=J[J.length-1],U=Q[q];if(U.from<=G.to)G.to=Math.max(G.to,U.to);else J.push({...U})}return J}function lzZ(Z,Q){let J=pzZ(Z,Q.from,Q.to);if(J.push(P7(Z,T7(Z,Q.from))),Q.to>Q.from)J.push(P7(Z,T7(Z,Math.min(Q.to,Z.content.size+1)-1)));else if(Q.from<Z.content.size+1)J.push(P7(Z,T7(Z,Math.min(Q.from+1,Z.content.size))));return J}function izZ(Z,Q,J){let q=[];if(Z.docChanged){let G=Q7(Z);for(let U of G)q.push(...lzZ(J.doc,U.newRange))}if(Z.selectionSet)q.push(P7(J.doc,T7(J.doc,Z.mapping.map(Q.selection.anchor)))),q.push(P7(J.doc,T7(J.doc,J.selection.anchor)));return dzZ(q)}function nzZ(Z,Q,J){let q=Math.max(0,Math.min(Z,J.content.size)),G=Math.max(q,Math.min(Q,J.content.size));return{from:q,to:G}}function szZ({decorations:Z,ranges:Q,editor:J,options:q,dataAttribute:G,doc:U,selection:K}){let H=Z;for(let B of Q){let{from:F,to:M}=nzZ(B.from,B.to,U),O=H.find(F,M).filter((A)=>A.from>=F&&A.to<=M);if(O.length)H=H.remove(O);let V=Xd({editor:J,options:q,dataAttribute:G,doc:U,selection:K,from:F,to:M});if(V.length)H=H.add(U,V)}return H}function azZ({editor:Z,options:Q,dataAttribute:J}){return{init(q,G){let U=Jd({editor:Z,options:Q,dataAttribute:J,doc:G.doc,selection:G.selection});return U!=null?U:xQ.empty},apply(q,G,U,K){if(!q.docChanged&&!q.selectionSet)return G;let H=G.map(q.mapping,q.doc),B=izZ(q,U,K);return szZ({decorations:H,ranges:B,editor:Z,options:Q,dataAttribute:J,doc:K.doc,selection:K.selection})}}}function rzZ(Z){return Z.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function ozZ({editor:Z,options:Q}){let J=Q.dataAttribute?`data-${rzZ(Q.dataAttribute)}`:`data-${ep}`,q=Q.showOnlyCurrent&&!Q.includeChildren;return new lZ({key:ap,...q?{}:{state:azZ({editor:Z,options:Q,dataAttribute:J})},props:{decorations:q?({doc:G,selection:U})=>Jd({editor:Z,options:Q,dataAttribute:J,doc:G,selection:U}):(G)=>{var U;if(Q.showOnlyWhenEditable&&!Z.isEditable)return xQ.empty;return(U=ap.getState(G))!=null?U:xQ.empty}}})}function AT(Z,Q){return!Z.selection.empty&&!jB(Z.selection)&&Q.isEditable}function tzZ(Z,Q){return AT(Z,Q)&&!Q.isFocused&&!Q.view.dragging}function ezZ(){var Z;(Z=window.getSelection())==null||Z.removeAllRanges()}function Z0Z(Z){Z.focus()}function rp({types:Z,node:Q}){return Q&&Array.isArray(Z)&&Z.includes(Q.type)||(Q==null?void 0:Q.type)===Z}var XDZ,op,UDZ,tp,ep="placeholder",ap,IT,TDZ,Q0Z="skipTrailingNode",Yd,qd;var n_=k(()=>{aZ();YQ();aZ();gp();aZ();YQ();x9();aZ();mp();YQ();aZ();YQ();x9();aZ();x9();x9();aZ();x9();aZ();YQ();x9();aZ();YQ();aZ();sp();XDZ=NQ.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:(Z)=>Z.length,wordCounter:(Z)=>Z.split(" ").filter((Q)=>Q!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=(Z)=>{let Q=(Z==null?void 0:Z.node)||this.editor.state.doc;if(((Z==null?void 0:Z.mode)||this.options.mode)==="textSize"){let q=Q.textBetween(0,Q.content.size,void 0," ");return this.options.textCounter(q)}return Q.nodeSize},this.storage.words=(Z)=>{let Q=(Z==null?void 0:Z.node)||this.editor.state.doc,J=Q.textBetween(0,Q.content.size," "," ");return this.options.wordCounter(J)}},addProseMirrorPlugins(){let Z=!1;return[new lZ({key:new tZ("characterCount"),appendTransaction:(Q,J,q)=>{if(Z)return;let G=this.options.limit,U=this.options.autoTrim;if(G===null||G===void 0||G===0||U===!1){Z=!0;return}let K=this.storage.characters({node:q.doc});if(K>G){let H=K-G,B=0,F=H;console.warn(`[CharacterCount] Initial content exceeded limit of ${G} characters. Content was automatically trimmed.`);let M=q.tr.deleteRange(0,F);return Z=!0,M}Z=!0},filterTransaction:(Q,J)=>{let q=this.options.limit;if(!Q.docChanged||q===0||q===null||q===void 0)return!0;let G=this.storage.characters({node:J.doc}),U=this.storage.characters({node:Q.doc});if(U<=q)return!0;if(G>q&&U>q&&U<=G)return!0;if(G>q&&U>q&&U>G)return!1;if(!Q.getMeta("paste"))return!1;let H=Q.selection.$head.pos,B=U-q,F=H-B,M=H;if(Q.deleteRange(F,M),this.storage.characters({node:Q.doc})>q)return!1;return!0}})]}}),op=NQ.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[xp(this.options)]}}),UDZ=NQ.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new lZ({key:new tZ("focus"),props:{decorations:({doc:Z,selection:Q})=>{let{isEditable:J,isFocused:q}=this.editor,{anchor:G}=Q,U=[];if(!J||!q)return xQ.create(Z,[]);let K=0;if(this.options.mode==="deepest")Z.descendants((B,F)=>{if(B.isText)return;if(!(G>=F&&G<=F+B.nodeSize-1))return!1;K+=1});let H=0;return Z.descendants((B,F)=>{if(B.isText)return!1;if(!(G>=F&&G<=F+B.nodeSize-1))return!1;if(H+=1,this.options.mode==="deepest"&&K-H>0||this.options.mode==="shallowest"&&H>1)return this.options.mode==="deepest";U.push(iX.node(F,F+B.nodeSize,{class:this.options.className}))}),xQ.create(Z,U)}}})]}}),tp=NQ.create({name:"gapCursor",addProseMirrorPlugins(){return[up()]},extendNodeSchema(Z){var Q;let J={name:Z.name,options:Z.options,storage:Z.storage};return{allowGapCursor:(Q=gQ(uZ(Z,"allowGapCursor",J)))!=null?Q:null}}}),ap=new tZ("tiptap__placeholder");IT=NQ.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:ep,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[ozZ({editor:this.editor,options:this.options})]}});TDZ=NQ.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:Z,options:Q}=this;return[new lZ({key:new tZ("selection"),props:{decorations(J){if(!tzZ(J,Z))return null;return xQ.create(J.doc,[iX.inline(J.selection.from,J.selection.to,{class:Q.className})])},handleDOMEvents:{blur(J){if(!AT(J.state,Z))return!1;return ezZ(),!1},focus(J){if(!AT(J.state,Z))return!1;return requestAnimationFrame(()=>{if(!Z.isDestroyed&&J.hasFocus())Z0Z(J)}),!1}}}})]}});Yd=NQ.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var Z;let Q=new tZ(this.name),J=this.options.node||((Z=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:Z.name)||"paragraph",q=Object.entries(this.editor.schema.nodes).map(([,G])=>G).filter((G)=>(this.options.notAfter||[]).concat(J).includes(G.name));return[new lZ({key:Q,appendTransaction:(G,U,K)=>{let{doc:H,tr:B,schema:F}=K,M=Q.getState(K),O=H.content.size,V=F.nodes[J];if(G.some((A)=>A.getMeta(Q0Z)))return;if(!M)return;return B.insert(O,V.create())},state:{init:(G,U)=>{let K=U.tr.doc.lastChild;return!rp({node:K,types:q})},apply:(G,U)=>{if(!G.docChanged)return U;if(G.getMeta("__uniqueIDTransaction"))return U;let K=G.doc.lastChild;return!rp({node:K,types:q})}}})]}}),qd=NQ.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:Z,dispatch:Q})=>{return OT(Z,Q)},redo:()=>({state:Z,dispatch:Q})=>{return VT(Z,Q)}}},addProseMirrorPlugins(){return[ip(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()}}})});var X0Z,Gd;var zd=k(()=>{aZ();Sc();wc();bc();gc();uc();mc();pc();lc();nc();Bp();eK();Dp();Ep();Sp();wp();n_();X0Z=NQ.create({name:"starterKit",addExtensions(){var Z,Q,J,q;let G=[];if(this.options.bold!==!1)G.push(yc.configure(this.options.bold));if(this.options.blockquote!==!1)G.push(kc.configure(this.options.blockquote));if(this.options.bulletList!==!1)G.push(qT.configure(this.options.bulletList));if(this.options.code!==!1)G.push(xc.configure(this.options.code));if(this.options.codeBlock!==!1)G.push(vc.configure(this.options.codeBlock));if(this.options.document!==!1)G.push(hc.configure(this.options.document));if(this.options.dropcursor!==!1)G.push(op.configure(this.options.dropcursor));if(this.options.gapcursor!==!1)G.push(tp.configure(this.options.gapcursor));if(this.options.hardBreak!==!1)G.push(fc.configure(this.options.hardBreak));if(this.options.heading!==!1)G.push(cc.configure(this.options.heading));if(this.options.undoRedo!==!1)G.push(qd.configure(this.options.undoRedo));if(this.options.horizontalRule!==!1)G.push(dc.configure(this.options.horizontalRule));if(this.options.italic!==!1)G.push(ic.configure(this.options.italic));if(this.options.listItem!==!1)G.push(UT.configure(this.options.listItem));if(this.options.listKeymap!==!1)G.push(HT.configure((Z=this.options)==null?void 0:Z.listKeymap));if(this.options.link!==!1)G.push(Wp.configure((Q=this.options)==null?void 0:Q.link));if(this.options.orderedList!==!1)G.push(WT.configure(this.options.orderedList));if(this.options.paragraph!==!1)G.push(Cp.configure(this.options.paragraph));if(this.options.strike!==!1)G.push($p.configure(this.options.strike));if(this.options.text!==!1)G.push(kp.configure(this.options.text));if(this.options.underline!==!1)G.push(yp.configure((J=this.options)==null?void 0:J.underline));if(this.options.trailingNode!==!1)G.push(Yd.configure((q=this.options)==null?void 0:q.trailingNode));return G}}),Gd=X0Z});var Ud;var Kd=k(()=>{n_();n_();Ud=IT});var J0Z,Y0Z,q0Z,Hd;var Wd=k(()=>{aZ();J0Z=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Y0Z=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,q0Z=sJ.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){if(!this.options.multicolor)return{};return{color:{default:null,parseHTML:(Z)=>Z.getAttribute("data-color")||lf(Z,"background-color")||Z.style.backgroundColor,renderHTML:(Z)=>{if(!Z.color)return{};return{"data-color":Z.color,style:`background-color: ${Z.color}; color: inherit`}}}}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:Z}){return["mark",IQ(this.options.HTMLAttributes,Z),0]},renderMarkdown:(Z,Q)=>{return`==${Q.renderChildren(Z)}==`},parseMarkdown:(Z,Q)=>{return Q.applyMark("highlight",Q.parseInline(Z.tokens||[]))},markdownTokenizer:{name:"highlight",level:"inline",start:(Z)=>Z.indexOf("=="),tokenize(Z,Q,J){let G=/^(==)([^=]+)(==)/.exec(Z);if(G){let U=G[2].trim(),K=J.inlineTokens(U);return{type:"highlight",raw:G[0],text:U,tokens:K}}}},addCommands(){return{setHighlight:(Z)=>({commands:Q})=>{return Q.setMark(this.name,Z)},toggleHighlight:(Z)=>({commands:Q})=>{return Q.toggleMark(this.name,Z)},unsetHighlight:()=>({commands:Z})=>{return Z.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[_Y({find:J0Z,type:this.type})]},addPasteRules(){return[EJ({find:Y0Z,type:this.type})]}}),Hd=q0Z});var Bd;var _d=k(()=>{eK();eK();Bd=m_});var Fd;var Ld=k(()=>{eK();eK();Fd=f_});function NT(Z){let Q=Z.trim().toLowerCase();if(!Q)return[...Md];return Md.filter((J)=>J.title.toLowerCase().includes(Q)||J.keywords.some((q)=>q.includes(Q)))}function G0Z(Z,Q){if(Q<0||Q>Z.doc.content.size)return!1;let J=Z.doc.resolve(Q);if(J.parent.type.spec.code)return!1;if(J.parentOffset===0)return!0;return/^\s*$/.test(J.parent.textBetween(J.parentOffset-1,J.parentOffset))}function jT({value:Z,onChange:Q,placeholder:J="Write, or press '/' for blocks…",label:q,editable:G=!0,minHeight:U=200,className:K,...H}){let B=yQ.useRef(Q);B.current=Q;let F=yQ.useRef(Z),M=yQ.useRef(J);M.current=J;let O=yQ.useRef(null),[V,A]=yQ.useState(null),N=yQ.useCallback((MZ)=>{O.current=MZ,A(MZ)},[]),[T,P]=yQ.useState(!1),C=yQ.useRef(!1);C.current=T;let[y,f]=yQ.useState(""),[u,n]=yQ.useState(null),e=yQ.useRef(null),a=yQ.useRef(null),[c,GZ]=yQ.useState(null),[s,LZ]=yQ.useState(!1);yQ.useEffect(()=>LZ(!0),[]);let HZ=yQ.useId(),KZ=`${HZ}-label`,v=`${HZ}-slash`,i=(MZ)=>`${v}-option-${MZ}`,x=yQ.useRef(()=>{}),d=H["aria-label"],YZ=yQ.useMemo(()=>NT(V?.query??""),[V?.query]),t=V?Math.min(V.index,Math.max(YZ.length-1,0)):0,$=V!==null&&YZ.length>0,o=jm({editable:G,immediatelyRender:!1,extensions:[Gd.configure({heading:{levels:[1,2,3]},link:{openOnClick:!1,autolink:!0}}),Hd,Bd,Fd.configure({nested:!0}),Ud.configure({placeholder:()=>M.current})],content:Z||"",editorProps:{attributes:{class:bY("prose prose-sm max-w-none px-4 py-3 text-fg outline-none","prose-headings:text-fg prose-p:text-fg prose-strong:text-fg prose-a:text-accent-strong","prose-code:text-fg prose-blockquote:text-fg-muted prose-li:text-fg"),style:`min-height:${typeof U==="number"?`${U}px`:U}`,role:"textbox","aria-multiline":"true",...q?{"aria-labelledby":KZ}:{},...d?{"aria-label":d}:{},"aria-expanded":$?"true":"false",...$?{"aria-controls":v,"aria-activedescendant":i(t)}:{}},handleTextInput(MZ,bZ,RQ,BZ){if(BZ!=="/"||O.current)return!1;if(!G0Z(MZ.state,bZ))return!1;return N({from:bZ,query:"",index:0}),!1},handleKeyDown(MZ,bZ){let RQ=O.current;if(!RQ)return!1;if(bZ.key==="Escape")return N(null),!0;let BZ=NT(RQ.query);if(BZ.length===0)return N(null),!1;if(bZ.key==="ArrowDown")return N({...RQ,index:(RQ.index+1)%BZ.length}),!0;if(bZ.key==="ArrowUp")return N({...RQ,index:(RQ.index-1+BZ.length)%BZ.length}),!0;if(bZ.key==="Enter"||bZ.key==="Tab")return x.current(BZ[Math.min(RQ.index,BZ.length-1)]),!0;return!1}},onUpdate({editor:MZ}){let bZ=MZ.getHTML();F.current=bZ,B.current(bZ);let RQ=O.current;if(!RQ)return;let BZ=MZ.state.selection.from;if(BZ<RQ.from)return N(null);let GX=MZ.state.doc.textBetween(RQ.from,BZ,`
|
|
395
|
+
`,`
|
|
396
|
+
`);if(!GX.startsWith("/"))return N(null);let kX=GX.slice(1);if(/\s/.test(kX)||NT(kX).length===0)return N(null);N({...RQ,query:kX,index:0})},onSelectionUpdate({editor:MZ}){let bZ=O.current;if(!bZ)return;let RQ=MZ.state.selection.from;if(RQ<bZ.from||RQ>bZ.from+bZ.query.length+1)N(null)},onBlur(){N(null)}});yQ.useEffect(()=>{if(!o)return;if(Z!==F.current&&Z!==o.getHTML())o.commands.setContent(Z||"",{emitUpdate:!1}),F.current=Z},[Z,o]),yQ.useEffect(()=>{if(o)o.setEditable(G)},[G,o]);let IZ=yQ.useCallback((MZ)=>{let bZ=O.current;if(!o||!bZ||!MZ)return;let RQ=o.state.doc.content.size,BZ=Math.min(Math.max(bZ.from,0),RQ),GX=Math.min(Math.max(o.state.selection.from,BZ),RQ);o.chain().focus().deleteRange({from:BZ,to:GX}).run(),MZ.run(o),N(null)},[o,N]);x.current=IZ;let PZ=yQ.useCallback(()=>{let MZ=O.current,bZ=a.current;if(!o||!MZ||!bZ)return;let RQ=o.state.doc.content.size;if(MZ.from>RQ)return N(null);let BZ=o.view.coordsAtPos(MZ.from),GX=bZ.getBoundingClientRect(),kX=6,RX=8,ZX=BZ.bottom+kX;if(ZX+GX.height>window.innerHeight-RX)ZX=Math.max(RX,BZ.top-kX-GX.height);let gZ=Math.max(RX,Math.min(BZ.left,window.innerWidth-GX.width-RX));GZ((aJ)=>aJ&&aJ.left===gZ&&aJ.top===ZX?aJ:{left:gZ,top:ZX})},[o,N]);yQ.useLayoutEffect(()=>{if(V)PZ();else GZ(null)},[V,PZ]),yQ.useEffect(()=>{if(!V)return;let MZ=()=>PZ();return window.addEventListener("scroll",MZ,!0),window.addEventListener("resize",MZ),()=>{window.removeEventListener("scroll",MZ,!0),window.removeEventListener("resize",MZ)}},[V,PZ]);let yZ=Mj({editor:o,selector:({editor:MZ})=>MZ?{bold:MZ.isActive("bold"),italic:MZ.isActive("italic"),strike:MZ.isActive("strike"),highlight:MZ.isActive("highlight"),code:MZ.isActive("code"),link:MZ.isActive("link"),hasSelection:!MZ.state.selection.empty}:null}),sZ=yQ.useCallback(()=>{P(!1),n(null),C.current=!1},[]);yQ.useEffect(()=>{if(T&&yZ&&!yZ.hasSelection&&!yZ.link)sZ()},[T,yZ,sZ]),yQ.useEffect(()=>{if(T)e.current?.focus()},[T]);let CZ=()=>{if(!o)return;f(o.getAttributes("link").href??""),n(null),C.current=!0,P(!0)},KQ=()=>{if(!o)return;if(y.trim()===""){o.chain().focus().extendMarkRange("link").unsetLink().run(),sZ();return}let MZ=RI(y);if(!MZ)return n(CI);o.chain().focus().extendMarkRange("link").setLink({href:MZ}).run(),sZ()};return dQ.jsxDEV("div",{className:bY("flex w-full flex-col gap-2",K),children:[q?dQ.jsxDEV("span",{id:KZ,className:"text-small font-medium text-fg",children:q},void 0,!1,void 0,this):null,dQ.jsxDEV("div",{className:"relative rounded-lg border border-border bg-surface focus-within:border-brand-green",children:[o?dQ.jsxDEV(Cc,{editor:o,shouldShow:({editor:MZ,view:bZ,state:RQ,element:BZ})=>{let GX=BZ.contains(document.activeElement);if(!MZ.isEditable||!(bZ.hasFocus()||GX))return!1;return C.current||!RQ.selection.empty},className:"flex flex-col gap-1 rounded-lg border border-border bg-surface-card p-1 shadow-md",children:T?dQ.jsxDEV(dQ.Fragment,{children:[dQ.jsxDEV("div",{className:"flex items-center gap-1",children:[dQ.jsxDEV("input",{ref:e,type:"text",value:y,"aria-label":"Link URL","aria-invalid":u?!0:void 0,placeholder:"https://, mailto:, /path",className:"h-8 w-56 rounded-md border border-border bg-surface px-2 text-small text-fg outline-none placeholder:text-fg-subtle focus:border-brand-green",onChange:(MZ)=>{f(MZ.target.value),n(null)},onKeyDown:(MZ)=>{if(MZ.key==="Enter")MZ.preventDefault(),KQ();if(MZ.key==="Escape")MZ.preventDefault(),sZ(),o.chain().focus().run()}},void 0,!1,void 0,this),dQ.jsxDEV("button",{type:"button",className:s_,onMouseDown:(MZ)=>MZ.preventDefault(),onClick:KQ,title:"Apply link",children:"Apply"},void 0,!1,void 0,this),dQ.jsxDEV("button",{type:"button",className:s_,onMouseDown:(MZ)=>MZ.preventDefault(),onClick:()=>{sZ(),o.chain().focus().run()},title:"Cancel",children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u?dQ.jsxDEV("span",{className:"px-1 pb-0.5 text-caption text-danger",children:u},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):dQ.jsxDEV("div",{className:"flex items-center gap-0.5",children:[z0Z.map((MZ)=>dQ.jsxDEV("button",{type:"button",className:s_,"data-active":yZ?.[MZ.key]??!1,"aria-pressed":yZ?.[MZ.key]??!1,onMouseDown:(bZ)=>bZ.preventDefault(),onClick:()=>MZ.run(o),title:MZ.title,children:MZ.label},MZ.key,!1,void 0,this)),dQ.jsxDEV("button",{type:"button",className:s_,"data-active":yZ?.link??!1,"aria-pressed":yZ?.link??!1,onMouseDown:(MZ)=>MZ.preventDefault(),onClick:CZ,title:"Link",children:dQ.jsxDEV(U0Z,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,dQ.jsxDEV(Lj,{editor:o},void 0,!1,void 0,this),s&&$&&V?Od.createPortal(dQ.jsxDEV("div",{ref:a,id:v,role:"listbox","aria-label":"Insert block",className:"fixed z-50 max-h-72 w-64 overflow-auto rounded-lg border border-border bg-surface-card p-1 shadow-md",style:{left:c?.left??0,top:c?.top??0,visibility:c?"visible":"hidden"},children:YZ.map((MZ,bZ)=>dQ.jsxDEV("div",{id:i(bZ),role:"option","aria-selected":bZ===t,className:bY("flex w-full cursor-pointer flex-col items-start rounded-md px-3 py-1.5 text-left",bZ===t?"bg-surface-muted":"hover:bg-surface-muted"),onMouseDown:(RQ)=>RQ.preventDefault(),onClick:()=>IZ(MZ),children:[dQ.jsxDEV("span",{className:"text-small text-fg",children:MZ.title},void 0,!1,void 0,this),dQ.jsxDEV("span",{className:"text-caption text-fg-subtle",children:MZ.hint},void 0,!1,void 0,this)]},MZ.title,!0,void 0,this))},void 0,!1,void 0,this),document.body):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var yQ,Od,dQ,Md,s_="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-small text-fg-muted transition-colors hover:bg-surface-muted hover:text-fg data-[active=true]:bg-surface-muted data-[active=true]:text-fg",z0Z,U0Z=()=>dQ.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[dQ.jsxDEV("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},void 0,!1,void 0,this),dQ.jsxDEV("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var Vd=k(()=>{kB();$c();zd();Kd();Wd();_d();Ld();kz();yQ=S(JZ(),1),Od=S(uJ(),1),dQ=S(zZ(),1),Md=[{title:"Text",hint:"Plain paragraph",keywords:["text","paragraph","body","p"],run:(Z)=>Z.chain().focus().setParagraph().run()},{title:"Heading 1",hint:"Big section heading",keywords:["h1","heading","title"],run:(Z)=>Z.chain().focus().toggleHeading({level:1}).run()},{title:"Heading 2",hint:"Medium heading",keywords:["h2","subheading"],run:(Z)=>Z.chain().focus().toggleHeading({level:2}).run()},{title:"Heading 3",hint:"Small heading",keywords:["h3"],run:(Z)=>Z.chain().focus().toggleHeading({level:3}).run()},{title:"Bulleted list",hint:"Unordered list",keywords:["bullet","unordered","ul","list"],run:(Z)=>Z.chain().focus().toggleBulletList().run()},{title:"Numbered list",hint:"Ordered list",keywords:["numbered","ordered","ol","list"],run:(Z)=>Z.chain().focus().toggleOrderedList().run()},{title:"To-do list",hint:"Checklist",keywords:["todo","task","checkbox","check"],run:(Z)=>Z.chain().focus().toggleTaskList().run()},{title:"Quote",hint:"Block quote",keywords:["quote","blockquote","citation"],run:(Z)=>Z.chain().focus().toggleBlockquote().run()},{title:"Code",hint:"Code block",keywords:["code","snippet","pre"],run:(Z)=>Z.chain().focus().toggleCodeBlock().run()},{title:"Divider",hint:"Horizontal rule",keywords:["divider","rule","hr","separator"],run:(Z)=>Z.chain().focus().setHorizontalRule().run()}];z0Z=[{key:"bold",title:"Bold",label:dQ.jsxDEV("b",{children:"B"},void 0,!1,void 0,this),run:(Z)=>Z.chain().focus().toggleBold().run()},{key:"italic",title:"Italic",label:dQ.jsxDEV("i",{children:"i"},void 0,!1,void 0,this),run:(Z)=>Z.chain().focus().toggleItalic().run()},{key:"strike",title:"Strikethrough",label:dQ.jsxDEV("s",{children:"S"},void 0,!1,void 0,this),run:(Z)=>Z.chain().focus().toggleStrike().run()},{key:"highlight",title:"Highlight",label:"H",run:(Z)=>Z.chain().focus().toggleHighlight().run()},{key:"code",title:"Inline code",label:"</>",run:(Z)=>Z.chain().focus().toggleCode().run()}]});var Ad=k(()=>{Vd()});function Z5({label:Z,children:Q}){return wZ.jsxDEV("label",{className:"flex w-full flex-col gap-2",children:[wZ.jsxDEV("span",{className:"text-sm font-medium text-fg",children:Z},void 0,!1,void 0,this),Q]},void 0,!0,void 0,this)}function Q5({schema:Z,value:Q,onChange:J,api:q}){let G=(U,K)=>J({...Q,[U]:K});return wZ.jsxDEV("div",{className:"flex flex-col gap-4",children:Z.map((U)=>wZ.jsxDEV(K0Z,{def:U,value:Q[U.name],onChange:(K)=>G(U.name,K),api:q},U.name,!1,void 0,this))},void 0,!1,void 0,this)}function K0Z({def:Z,value:Q,onChange:J,api:q}){let G=wZ.jsxDEV(wZ.Fragment,{children:[Z.label??Z.name," ",Z.required?wZ.jsxDEV("span",{className:"text-danger",children:"*"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);switch(Z.type){case"text":case"url":return wZ.jsxDEV(AX,{label:G,value:Q??"",onChange:J,placeholder:Z.type==="url"?"https://…":""},void 0,!1,void 0,this);case"textarea":return wZ.jsxDEV(D2,{label:G,value:typeof Q==="string"?Q:Q==null?"":JSON.stringify(Q),onChange:J},void 0,!1,void 0,this);case"richtext":return wZ.jsxDEV(Z5,{label:G,children:wZ.jsxDEV(H0Z,{value:typeof Q==="string"?Q:"",onChange:J},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"number":return wZ.jsxDEV(Z5,{label:G,children:wZ.jsxDEV("input",{className:TT,type:"number",value:Q==null?"":String(Q),onChange:(U)=>J(U.target.value===""?null:Number(U.target.value))},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"date":case"datetime":return wZ.jsxDEV(Z5,{label:G,children:wZ.jsxDEV("input",{className:TT,type:Z.type==="date"?"date":"datetime-local",value:Q??"",onChange:(U)=>J(U.target.value||null)},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"boolean":return wZ.jsxDEV("label",{className:"flex items-center gap-2",children:[wZ.jsxDEV("input",{type:"checkbox",checked:Boolean(Q),onChange:(U)=>J(U.target.checked)},void 0,!1,void 0,this),wZ.jsxDEV("span",{className:"text-sm text-fg",children:Z.label??Z.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"select":return wZ.jsxDEV(Z5,{label:G,children:wZ.jsxDEV(B0Z,{def:Z,value:Q,onChange:J,api:q},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"media":return wZ.jsxDEV(Z5,{label:G,children:wZ.jsxDEV(_0Z,{value:Q,onChange:J,api:q},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"group":return wZ.jsxDEV(Z5,{label:G,children:wZ.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-muted p-3.5",children:wZ.jsxDEV(Q5,{schema:Z.fields??[],value:Q??{},onChange:J,api:q},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"repeater":return wZ.jsxDEV(W0Z,{def:Z,value:Q??[],onChange:J,api:q,label:G},void 0,!1,void 0,this);default:return null}}function H0Z({value:Z,onChange:Q}){return wZ.jsxDEV(jT,{value:Z,onChange:Q,minHeight:180,placeholder:"Write, or press '/' for blocks…"},void 0,!1,void 0,this)}function W0Z({def:Z,value:Q,onChange:J,api:q,label:G}){let U=Array.isArray(Q)?Q:[],K=(M,O)=>J(U.map((V,A)=>A===M?O:V)),H=()=>J([...U,{}]),B=(M)=>J(U.filter((O,V)=>V!==M)),F=(M,O)=>{let V=M+O;if(V<0||V>=U.length)return;let A=U.slice();[A[M],A[V]]=[A[V],A[M]],J(A)};return wZ.jsxDEV("div",{className:"flex flex-col gap-2",children:[wZ.jsxDEV("span",{className:"text-sm font-medium text-fg",children:G},void 0,!1,void 0,this),U.map((M,O)=>wZ.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-muted p-3.5",children:[wZ.jsxDEV("div",{className:"mb-2 flex justify-end gap-1",children:[wZ.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:()=>F(O,-1),children:"↑"},void 0,!1,void 0,this),wZ.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:()=>F(O,1),children:"↓"},void 0,!1,void 0,this),wZ.jsxDEV($Z,{variant:"ghost",size:"sm",className:"text-danger",onPress:()=>B(O),children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),wZ.jsxDEV(Q5,{schema:Z.fields??[],value:M,onChange:(V)=>K(O,V),api:q},void 0,!1,void 0,this)]},O,!0,void 0,this)),wZ.jsxDEV($Z,{variant:"secondary",size:"sm",className:"self-start",onPress:H,isDisabled:Z.max!=null&&U.length>=Z.max,children:["+ add ",Z.label??Z.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function B0Z({def:Z,value:Q,onChange:J,api:q}){let[G,U]=qG.useState(null),K=Z.optionsFrom;qG.useEffect(()=>{if(!K)return;let F=!0;return q.call(K).then((M)=>{if(F)U(Array.isArray(M)?M:[])}).catch(()=>{if(F)U([])}),()=>{F=!1}},[K,q]);let H=Boolean(K)&&G===null,B=K?G??[]:(Z.options??[]).map((F)=>({value:F,label:F}));return wZ.jsxDEV("select",{className:TT,value:Q??"",onChange:(F)=>J(F.target.value||null),children:[wZ.jsxDEV("option",{value:"",children:H?"Načítám…":"—"},void 0,!1,void 0,this),B.map((F)=>wZ.jsxDEV("option",{value:F.value,children:F.label},F.value,!1,void 0,this))]},void 0,!0,void 0,this)}function _0Z({value:Z,onChange:Q,api:J}){let[q,G]=qG.useState(!1),[U,K]=qG.useState(null);return qG.useEffect(()=>{if(Z)J.call("getMedia",{id:Z}).then(K).catch(()=>K(null));else K(null)},[Z,J]),wZ.jsxDEV("div",{children:[wZ.jsxDEV("div",{className:"flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",children:[U?wZ.jsxDEV("img",{className:"h-10 w-10 rounded object-cover",src:J.resolve(`/media/${U.file.key}`),alt:""},void 0,!1,void 0,this):wZ.jsxDEV("span",{className:"text-fg-subtle",children:"no media"},void 0,!1,void 0,this),wZ.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:U?.file.filename??Z??""},void 0,!1,void 0,this),wZ.jsxDEV($Z,{variant:"secondary",size:"sm",onPress:()=>G(!0),children:"pick"},void 0,!1,void 0,this),Z?wZ.jsxDEV($Z,{variant:"ghost",size:"sm",className:"text-danger",onPress:()=>Q(null),children:"clear"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),q?wZ.jsxDEV(F0Z,{api:J,onClose:()=>G(!1),onPick:(H)=>{Q(H),G(!1)}},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function F0Z({api:Z,onClose:Q,onPick:J}){let[q,G]=qG.useState([]),[U,K]=qG.useState(!1),[H,B]=qG.useState(""),F=()=>Z.listMedia().then(G).catch((O)=>B(String(O.message??O)));qG.useEffect(()=>{F()},[]);let M=async(O)=>{K(!0),B("");try{let V=await Z.uploadMedia(O);J(V.id)}catch(V){B(String(V.message??V))}finally{K(!1)}};return wZ.jsxDEV($2,{isOpen:!0,isDismissable:!0,onOpenChange:(O)=>!O&&Q(),children:wZ.jsxDEV(E2,{className:"w-full max-w-[680px] px-9 py-8",children:wZ.jsxDEV(k2,{className:"max-h-[86vh] overflow-auto outline-none",children:[wZ.jsxDEV(w2,{level:"1",className:"mb-5 font-normal",children:["Choose ",wZ.jsxDEV("span",{className:"text-fg-subtle",children:"a file"},void 0,!1,void 0,this)," from the library"]},void 0,!0,void 0,this),H?wZ.jsxDEV("div",{className:"my-2 rounded-lg border border-danger bg-surface-card px-3.5 py-2.5 text-small text-danger",children:H},void 0,!1,void 0,this):null,wZ.jsxDEV("label",{className:"mb-4 flex w-full flex-col gap-2",children:[wZ.jsxDEV(y2,{size:"small",weight:"medium",children:"Upload a new file"},void 0,!1,void 0,this),wZ.jsxDEV("input",{type:"file",className:"text-small text-fg-muted",disabled:U,onChange:(O)=>O.target.files?.[0]&&M(O.target.files[0])},void 0,!1,void 0,this)]},void 0,!0,void 0,this),wZ.jsxDEV("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5",children:q.map((O)=>wZ.jsxDEV("div",{className:"cursor-pointer overflow-hidden rounded-lg border border-border bg-surface-card",onClick:()=>J(O.id),children:[(O.file.contentType??"").startsWith("image/")?wZ.jsxDEV("img",{className:"block h-[130px] w-full object-cover",src:Z.resolve(`/media/${O.file.key}`),alt:""},void 0,!1,void 0,this):wZ.jsxDEV("div",{className:"h-[130px] bg-surface-muted"},void 0,!1,void 0,this),wZ.jsxDEV("div",{className:"truncate px-2 py-1.5 text-caption text-fg-muted",children:O.file.filename??O.id},void 0,!1,void 0,this)]},O.id,!0,void 0,this))},void 0,!1,void 0,this),wZ.jsxDEV("div",{className:"mt-3 text-right",children:wZ.jsxDEV($Z,{variant:"ghost",onPress:Q,children:"close"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var qG,wZ,TT="h-10 w-full rounded-lg border border-border bg-surface-card px-4 text-sm text-fg outline-none transition-colors placeholder:text-fg-muted focus:border-brand-green";var Id=k(()=>{iG();Ad();qG=S(JZ(),1),wZ=S(zZ(),1)});function C7({lead:Z,em:Q,children:J}){return w.jsxDEV("div",{className:"mx-auto grid max-w-[1200px] grid-cols-[1fr_auto] items-center gap-6 px-7 pb-6 pt-8 max-[820px]:grid-cols-1",children:[w.jsxDEV("h1",{className:"m-0 text-[56px] font-normal leading-[1.05] tracking-[-0.01em] max-[820px]:text-[40px]",children:[w.jsxDEV("span",{className:"block text-fg-subtle",children:Z},void 0,!1,void 0,this),w.jsxDEV("span",{className:"block text-fg",children:Q},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J]},void 0,!0,void 0,this)}function a_({text:Z,em:Q,children:J}){return w.jsxDEV("div",{className:"flex min-w-[360px] items-center gap-4 rounded-full bg-brand-green py-3 pl-7 pr-3 max-[820px]:min-w-0",children:[w.jsxDEV("span",{className:"text-callout text-fg-on-brand",children:[Z," ",w.jsxDEV("span",{className:"font-semibold",children:Q},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J]},void 0,!0,void 0,this)}function Jz({children:Z}){return w.jsxDEV("div",{className:"mb-2 mt-[18px] text-sm text-fg-subtle first:mt-0",children:Z},void 0,!1,void 0,this)}function x6({status:Z,children:Q}){return w.jsxDEV("span",{className:`inline-block whitespace-nowrap rounded-full border px-2.5 py-0.5 text-caption font-medium ${Z==="published"||Z==="active"?"bg-brand-green text-fg-on-brand border-transparent":Z==="in_review"||Z==="review"?"bg-accent-yellow text-fg-on-brand border-transparent":Z==="rejected"||Z==="archived"||Z==="inactive"?"border-danger text-danger bg-surface-card":"border-border text-fg-muted bg-surface-card"}`,children:Q},void 0,!1,void 0,this)}function RT({onClose:Z,wide:Q,children:J}){return w.jsxDEV($2,{isOpen:!0,isDismissable:!0,onOpenChange:(q)=>!q&&Z(),children:w.jsxDEV(E2,{className:`w-full px-9 py-8 ${Q?"max-w-[680px]":"max-w-[520px]"}`,children:w.jsxDEV(k2,{className:"max-h-[86vh] overflow-auto outline-none",children:J},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function CT({children:Z}){return w.jsxDEV(w2,{level:"1",className:"mb-5 font-normal",children:Z},void 0,!1,void 0,this)}function r_({children:Z,className:Q}){return w.jsxDEV("div",{className:`grid grid-cols-[auto_1fr] gap-x-3.5 gap-y-2 text-[13px] text-fg-muted [&>span:nth-child(odd)]:text-fg-subtle ${Q??""}`,children:Z},void 0,!1,void 0,this)}function Cd({children:Z}){return w.jsxDEV("div",{className:"overflow-auto rounded-lg border border-border bg-surface-card p-6",children:Z},void 0,!1,void 0,this)}function D7({ok:Z,children:Q}){return w.jsxDEV("div",{className:`my-2 rounded-lg border px-3.5 py-2.5 text-small ${Z?"border-brand-green bg-brand-green/20 text-fg":"border-danger bg-surface-card text-danger"}`,children:Q},void 0,!1,void 0,this)}function Dd({api:Z,pages:Q,blockTypes:J,onOpen:q,onCreated:G,onError:U}){let[K,H]=FZ.useState(!1);return w.jsxDEV(w.Fragment,{children:[w.jsxDEV(C7,{lead:"Pages",em:Q.length===0?"None yet":Q.length===1?"1 page total":`${Q.length} pages total`,children:w.jsxDEV(a_,{text:"Let's",em:"create something",children:w.jsxDEV($Z,{className:"shrink-0",onPress:()=>H(!0),children:"+ New page"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.jsxDEV("div",{className:X5,children:w.jsxDEV("div",{className:"flex flex-col gap-2",children:[Q.map((B)=>w.jsxDEV("div",{className:`${w6} cursor-pointer hover:bg-surface-muted`,onClick:()=>q(B),children:[w.jsxDEV("span",{className:"flex-1 truncate font-medium",children:B.title},void 0,!1,void 0,this),w.jsxDEV("span",{className:"text-fg-subtle",children:["/",B.slug]},void 0,!0,void 0,this),w.jsxDEV("span",{className:"text-fg-subtle",children:B.locale},void 0,!1,void 0,this),w.jsxDEV(x6,{status:B.status,children:B.status},void 0,!1,void 0,this)]},B.id,!0,void 0,this)),Q.length===0?w.jsxDEV("p",{className:"text-fg-subtle",children:["No pages yet. ",J.length===0?"Define block types + a content type first (via the API/admin).":"Create one."]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),K?w.jsxDEV(L0Z,{api:Z,onClose:()=>H(!1),onCreated:()=>{H(!1),G()},onError:U},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function L0Z({api:Z,onClose:Q,onCreated:J,onError:q}){let[G,U]=FZ.useState([]),[K,H]=FZ.useState(""),[B,F]=FZ.useState(""),[M,O]=FZ.useState("");FZ.useEffect(()=>{Z.listContentTypes().then((A)=>{if(U(A),A[0])H(A[0].id)}).catch((A)=>q($Q(A)))},[Z,q]);let V=async()=>{try{await Z.call("createPage",{typeId:K,title:B,slug:M||Rd(B)}),J()}catch(A){q($Q(A))}};return w.jsxDEV(RT,{onClose:Q,children:[w.jsxDEV(CT,{children:["Create a ",w.jsxDEV(R7,{children:"new page"},void 0,!1,void 0,this)," and define the essentials",w.jsxDEV(R7,{children:"."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.jsxDEV("div",{className:"flex flex-col gap-4",children:[w.jsxDEV("div",{className:"flex w-full flex-col gap-2",children:[w.jsxDEV("span",{className:"text-sm font-medium text-fg",children:"Content type"},void 0,!1,void 0,this),w.jsxDEV("div",{className:"flex flex-wrap gap-2",children:G.map((A)=>w.jsxDEV("button",{type:"button",onClick:()=>H(A.id),className:`rounded-lg border px-4 py-2.5 text-sm font-medium transition-colors ${K===A.id?"border-brand-green bg-surface-muted text-fg":"border-border bg-surface-card text-fg-muted hover:border-fg-subtle hover:text-fg"}`,children:A.name},A.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.jsxDEV(AX,{label:"Title",value:B,onChange:F},void 0,!1,void 0,this),w.jsxDEV(AX,{label:"Slug",value:M,onChange:O,placeholder:Rd(B)},void 0,!1,void 0,this),w.jsxDEV("div",{className:"mt-2 flex justify-end gap-2",children:[w.jsxDEV($Z,{variant:"ghost",onPress:Q,children:"cancel"},void 0,!1,void 0,this),w.jsxDEV($Z,{onPress:V,isDisabled:!K||!B,children:"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Nd(Z){if(Z==null)return"";if(typeof Z==="boolean")return Z?"yes":"no";if(Array.isArray(Z))return Z.length===1?"1 item":`${Z.length} items`;if(typeof Z==="object")return"—";return String(Z)}function $d({api:Z,def:Q,onOpen:J,onNew:q,onError:G}){let[U,K]=FZ.useState([]),[H,B]=FZ.useState(0),[F,M]=FZ.useState(!1),[O,V]=FZ.useState(!0),A=FZ.useCallback((T)=>{return V(!0),Z.call("collectionList",{collection:Q.slug,limit:jd,offset:T}).then((P)=>{K((C)=>T===0?P:[...C,...P]),M(P.length===jd),B(T+P.length)}).catch((P)=>G($Q(P))).finally(()=>V(!1))},[Z,Q.slug,G]);FZ.useEffect(()=>{K([]),B(0),M(!1),A(0)},[A]);let N=(T)=>Q.fields.find((P)=>P.name===T)?.label??T;return w.jsxDEV(w.Fragment,{children:[w.jsxDEV(C7,{lead:Q.pluralLabel,em:U.length===0?"None yet":U.length===1?`1 ${Q.label.toLowerCase()}`:`${U.length}${F?"+":""} ${Q.pluralLabel.toLowerCase()}`,children:w.jsxDEV(a_,{text:"Let's",em:`add a ${Q.label.toLowerCase()}`,children:w.jsxDEV($Z,{className:"shrink-0",onPress:q,children:["+ New ",Q.label.toLowerCase()]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.jsxDEV("div",{className:X5,children:[w.jsxDEV("div",{className:"flex flex-col gap-2",children:[U.map((T)=>{let P=String(T[Q.idField]??""),[C,...y]=Q.list;return w.jsxDEV("div",{className:`${w6} cursor-pointer hover:bg-surface-muted`,onClick:()=>J(P),children:[w.jsxDEV("span",{className:"flex-1 truncate font-medium",children:Nd(T[C??Q.titleField])||w.jsxDEV(R7,{children:"untitled"},void 0,!1,void 0,this)},void 0,!1,void 0,this),y.map((f)=>w.jsxDEV("span",{className:"truncate text-fg-subtle",title:N(f),children:Nd(T[f])},f,!1,void 0,this))]},P,!0,void 0,this)}),!O&&U.length===0?w.jsxDEV("p",{className:"text-fg-subtle",children:["No ",Q.pluralLabel.toLowerCase()," yet. Create one."]},void 0,!0,void 0,this):null,O?w.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),F&&!O?w.jsxDEV("div",{className:"mt-3.5 text-center",children:w.jsxDEV($Z,{variant:"secondary",size:"sm",onPress:()=>void A(H),children:"Load more"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Ed({api:Z,def:Q,id:J,onSaved:q,onDeleted:G,onBack:U,onError:K}){let H=J===null,[B,F]=FZ.useState({}),[M,O]=FZ.useState(!H),[V,A]=FZ.useState(!1),[N,T]=FZ.useState(!1),[P,C]=FZ.useState(!1);FZ.useEffect(()=>{if(H){F({});return}let u=!0;return O(!0),A(!1),Z.call("collectionGet",{collection:Q.slug,id:J}).then((n)=>{if(!u)return;if(n)F(n);else A(!0)}).catch((n)=>K($Q(n))).finally(()=>{if(u)O(!1)}),()=>{u=!1}},[Z,Q.slug,J,H,K]);let y=async()=>{T(!0);try{if(H)await Z.call("collectionCreate",{collection:Q.slug,values:B}),q();else{let u=await Z.call("collectionUpdate",{collection:Q.slug,id:J,values:B});if(u)F(u);C(!0),setTimeout(()=>C(!1),1200)}}catch(u){K($Q(u))}finally{T(!1)}},f=async()=>{if(H||!confirm(`Delete this ${Q.label.toLowerCase()}? This cannot be undone.`))return;T(!0);try{await Z.call("collectionDelete",{collection:Q.slug,id:J}),G()}catch(u){K($Q(u))}finally{T(!1)}};return w.jsxDEV("div",{className:X5,children:[w.jsxDEV("div",{className:"mb-4 mt-2 flex items-center gap-3",children:[w.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:U,children:["← ",Q.pluralLabel]},void 0,!0,void 0,this),w.jsxDEV("h1",{className:"text-[22px] font-normal text-fg",children:H?`New ${Q.label.toLowerCase()}`:`Edit ${Q.label.toLowerCase()}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V?w.jsxDEV("p",{className:"text-fg-subtle",children:"Not found."},void 0,!1,void 0,this):M?w.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this):w.jsxDEV("div",{className:"flex max-w-[720px] flex-col gap-4",children:[P?w.jsxDEV(D7,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,w.jsxDEV(Q5,{schema:Q.fields,value:B,onChange:F,api:Z},void 0,!1,void 0,this),w.jsxDEV("div",{className:"mt-2 flex items-center gap-2",children:[w.jsxDEV($Z,{onPress:y,isDisabled:N,children:N?"Saving…":H?"Create":"Save"},void 0,!1,void 0,this),!H?w.jsxDEV($Z,{variant:"ghost",className:"text-danger",onPress:f,isDisabled:N,children:"Delete"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function kd({api:Z,page:Q,blockTypes:J,tab:q,onTab:G,onBack:U,onChange:K}){let[H,B]=FZ.useState(null),[F,M]=FZ.useState(null),[O,V]=FZ.useState(""),A=FZ.useRef(new Set),[N,T]=FZ.useState(0),P=FZ.useCallback((x,d)=>{let YZ=A.current;if(d?YZ.has(x):!YZ.has(x))return;if(d)YZ.add(x);else YZ.delete(x);T(YZ.size)},[]),C=()=>A.current.size===0||window.confirm(`You have unsaved changes in ${A.current.size} block${A.current.size===1?"":"s"}. Leave without saving?`),y=FZ.useMemo(()=>new Map(J.map((x)=>[x.slug,x])),[J]),f=FZ.useCallback(async()=>{try{let[x,d]=await Promise.all([Z.getContentType(Q.typeId),Z.getPagePreview(Q.slug,Q.locale)]);B(x??null),M(d)}catch(x){V($Q(x))}},[Z,Q.typeId,Q.slug,Q.locale]);FZ.useEffect(()=>{f()},[f]),FZ.useEffect(()=>{if(N===0)return;let x=(d)=>{d.preventDefault(),d.returnValue=""};return window.addEventListener("beforeunload",x),()=>window.removeEventListener("beforeunload",x)},[N]);let u=H?.regions??[],n=(x,d)=>M((YZ)=>YZ?{...YZ,regions:{...YZ.regions,[x]:d(YZ.regions[x]??[])}}:YZ),e=async(x,d,YZ)=>{let t=`tmp:${crypto.randomUUID()}`,$=(F?.regions[x]??[]).map((IZ)=>IZ.id),o=YZ!=null&&YZ>=0&&YZ<$.length?YZ:$.length;n(x,(IZ)=>{let PZ=[...IZ];return PZ.splice(o,0,{id:t,block_id:t,block_type:d,title:null,fields:{},is_shared:!1,pending:!0}),PZ});try{let{block:IZ,placement:PZ}=await Z.call("addBlock",{pageId:Q.id,blockTypeSlug:d,region:x,fields:{}}),yZ={id:String(PZ.id),block_id:String(IZ.id),block_type:d,title:IZ.title??null,fields:IZ.fields??{},is_shared:Boolean(PZ.isShared)};if(n(x,(sZ)=>sZ.map((CZ)=>CZ.id===t?yZ:CZ)),o<$.length){let sZ=[...$];sZ.splice(o,0,yZ.id),await c(x,sZ)}}catch(IZ){n(x,(PZ)=>PZ.filter((yZ)=>yZ.id!==t)),V($Q(IZ))}},a=async(x)=>{try{await Z.call("removeBlock",{pageBlockId:x.id}),await f()}catch(d){V($Q(d))}},c=async(x,d)=>{try{await Z.call("reorderRegion",{pageId:Q.id,region:x,order:d}),await f()}catch(YZ){V($Q(YZ))}},GZ=FZ.useCallback((x,d)=>{M((YZ)=>{if(!YZ)return YZ;let t={};for(let[$,o]of Object.entries(YZ.regions))t[$]=o.map((IZ)=>IZ.id===x?{...IZ,fields:d}:IZ);return{...YZ,regions:t}})},[]),[s,LZ]=FZ.useState(null),HZ=(x,d)=>LZ({region:x,from:d,over:d}),KZ=(x,d)=>LZ((YZ)=>YZ&&YZ.region===x&&YZ.over!==d?{...YZ,over:d}:YZ),v=()=>LZ(null),i=(x)=>{if(LZ(null),!s||s.region!==x||s.from===s.over)return;let d=(F?.regions[x]??[]).map((t)=>t.id),[YZ]=d.splice(s.from,1);d.splice(s.over,0,YZ),c(x,d)};return w.jsxDEV("div",{className:"grid min-h-[calc(100vh-68px)] grid-cols-[260px_1fr_400px] gap-5 px-7 pb-7 pt-2 max-[820px]:grid-cols-1",children:[w.jsxDEV("div",{className:"overflow-auto rounded-panel bg-surface-muted p-[18px]",children:[w.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:()=>{if(C())U()},children:"← all pages"},void 0,!1,void 0,this),N>0?w.jsxDEV("p",{className:"mt-2 text-[11px] text-accent-strong",children:["● ",N," unsaved block",N===1?"":"s"]},void 0,!0,void 0,this):null,w.jsxDEV(Jz,{children:"Regions"},void 0,!1,void 0,this),u.map((x)=>w.jsxDEV("div",{className:`${w6} mb-2`,children:[w.jsxDEV("span",{className:"flex-1 truncate font-medium",children:x.label??x.name},void 0,!1,void 0,this),w.jsxDEV("span",{className:"text-fg-subtle",children:(F?.regions[x.name]??[]).length},void 0,!1,void 0,this)]},x.name,!0,void 0,this)),w.jsxDEV(Jz,{children:"Status"},void 0,!1,void 0,this),w.jsxDEV("div",{className:w6,children:[w.jsxDEV("span",{className:"flex-1 truncate font-medium",children:Q.title},void 0,!1,void 0,this),w.jsxDEV(x6,{status:Q.status,children:Q.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),w.jsxDEV("div",{className:"overflow-auto py-1.5 pl-8 pr-2",children:[O?w.jsxDEV(D7,{children:O},void 0,!1,void 0,this):null,u.map((x)=>{let d=F?.regions[x.name]??[],YZ=x.allowedTypes&&x.allowedTypes.length?x.allowedTypes:J.map((t)=>t.slug);return w.jsxDEV("div",{className:"mb-10",children:[w.jsxDEV("div",{className:"mb-1 text-caption font-medium uppercase tracking-wide text-fg-subtle",children:x.label??x.name},void 0,!1,void 0,this),d.map((t,$)=>w.jsxDEV("div",{children:[w.jsxDEV(Td,{compact:!0,allowed:YZ,btBySlug:y,onAdd:(o)=>e(x.name,o,$)},void 0,!1,void 0,this),w.jsxDEV(M0Z,{api:Z,block:t,blockType:y.get(t.block_type),isFirst:$===0,isLast:$===d.length-1,onMove:(o)=>S0Z(d,x.name,$,o,c),onRemove:()=>a(t),onPatch:GZ,onDirtyChange:P,onError:V,dragging:s?.region===x.name&&s.from===$,isOver:!!s&&s.region===x.name&&s.over===$&&s.from!==$,onDragStartBlock:()=>HZ(x.name,$),onDragOverBlock:()=>KZ(x.name,$),onDropBlock:()=>i(x.name),onDragEndBlock:v},void 0,!1,void 0,this)]},t.id,!0,void 0,this)),w.jsxDEV("div",{className:"mt-1",children:w.jsxDEV(Td,{allowed:YZ,btBySlug:y,onAdd:(t)=>e(x.name,t)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},x.name,!0,void 0,this)}),u.length===0?w.jsxDEV("p",{className:"text-fg-subtle",children:"This page's content type has no regions."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),w.jsxDEV("div",{className:"overflow-auto rounded-panel border border-border bg-surface-card p-5",children:[w.jsxDEV("div",{className:"mb-3 flex gap-1",children:PT.map((x)=>w.jsxDEV($Z,{variant:"ghost",size:"sm",className:q===x?"bg-surface-muted text-fg":"text-fg-muted",onPress:()=>G(x),children:x},x,!1,void 0,this))},void 0,!1,void 0,this),q==="settings"?w.jsxDEV(O0Z,{api:Z,page:Q,ct:H,initialFields:F?.page.fields??{},onSaved:K,onError:V},void 0,!1,void 0,this):null,q==="seo"?w.jsxDEV(V0Z,{api:Z,page:Q,onError:V},void 0,!1,void 0,this):null,q==="workflow"?w.jsxDEV(A0Z,{api:Z,page:Q,onChanged:(x)=>{K(x)},onError:V},void 0,!1,void 0,this):null,q==="i18n"?w.jsxDEV(I0Z,{api:Z,page:Q,onError:V},void 0,!1,void 0,this):null,q==="audit"?w.jsxDEV(N0Z,{api:Z,pageId:Q.id,onError:V},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function M0Z({api:Z,block:Q,blockType:J,isFirst:q,isLast:G,onMove:U,onRemove:K,onPatch:H,onDirtyChange:B,onError:F,dragging:M,isOver:O,onDragStartBlock:V,onDragOverBlock:A,onDropBlock:N,onDragEndBlock:T}){let[P,C]=FZ.useState(null),[y,f]=FZ.useState(!1),[u,n]=FZ.useState("idle"),e=FZ.useRef(""),a=FZ.useRef(null),c=Q.block_id,GZ=Q.id;FZ.useEffect(()=>{if(Q.pending){C({}),e.current="{}";return}let x=!0;return Z.call("getBlock",{blockId:c}).then((d)=>{if(!x)return;let YZ=d?.fields??{};C(YZ),e.current=JSON.stringify(YZ)}).catch((d)=>F($Q(d))),()=>{x=!1}},[Z,c,F,Q.pending]);let s=P!=null&&JSON.stringify(P)!==e.current,LZ=FZ.useCallback(async()=>{if(Q.pending||P==null)return;let x=JSON.stringify(P);if(x===e.current)return;n("saving");try{await Z.call("updateBlock",{blockId:c,fields:P}),e.current=x,H(GZ,P),n("saved"),setTimeout(()=>n((d)=>d==="saved"?"idle":d),1500)}catch(d){F($Q(d)),n("idle")}},[Z,c,GZ,P,H,F,Q.pending]),HZ=FZ.useRef(LZ);HZ.current=LZ,FZ.useEffect(()=>{if(P==null||Q.pending)return;if(JSON.stringify(P)===e.current)return;let x=setTimeout(()=>void HZ.current(),800);return()=>clearTimeout(x)},[P,Q.pending]);let KZ=(x)=>C(x);FZ.useEffect(()=>{B(GZ,s)},[s,GZ,B]),FZ.useEffect(()=>()=>{B(GZ,!1)},[GZ,B]);let v=J?.fieldsSchema??[],i=J?.name??Q.block_type;return w.jsxDEV("div",{ref:a,className:`group relative rounded-lg px-2 py-1 transition-colors ${O?"ring-2 ring-brand-green":""} ${M?"opacity-40":""} ${Q.pending?"pointer-events-none opacity-60":""}`,onDragOver:(x)=>{x.preventDefault(),A()},onDrop:(x)=>{x.preventDefault(),N()},children:[w.jsxDEV("span",{draggable:!0,onDragStart:(x)=>{if(a.current)x.dataTransfer.setDragImage(a.current,12,12);x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",""),V()},onDragEnd:T,className:"absolute -left-6 top-1.5 cursor-grab select-none px-1 text-fg-subtle opacity-0 transition-opacity hover:text-fg group-hover:opacity-100 active:cursor-grabbing",title:"Drag to reorder",children:"⠿"},void 0,!1,void 0,this),w.jsxDEV("div",{className:"flex items-center gap-2 opacity-60 transition-opacity group-hover:opacity-100",children:[w.jsxDEV("button",{type:"button",className:"w-4 shrink-0 text-fg-subtle hover:text-fg",title:y?"Expand":"Collapse",onClick:()=>f((x)=>!x),children:y?"▸":"▾"},void 0,!1,void 0,this),w.jsxDEV("span",{className:"text-caption font-medium uppercase tracking-wide text-fg-subtle",children:i},void 0,!1,void 0,this),Q.is_shared?w.jsxDEV("span",{className:"text-caption text-accent-strong",children:"shared"},void 0,!1,void 0,this):null,w.jsxDEV("span",{className:`text-caption ${s&&u!=="saving"?"text-accent-strong":"text-fg-subtle"}`,children:u==="saving"?"saving…":u==="saved"?"saved ✓":s?"● unsaved":""},void 0,!1,void 0,this),w.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"ghost",size:"sm",isDisabled:q,onPress:()=>U(-1),children:"↑"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"ghost",size:"sm",isDisabled:G,onPress:()=>U(1),children:"↓"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"ghost",size:"sm",className:"text-danger",onPress:K,children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y?w.jsxDEV("div",{className:"cursor-pointer truncate pb-1 pl-6 text-small text-fg-subtle",onClick:()=>f(!1),children:P==null?"…":k0Z(P)||w.jsxDEV("span",{className:"italic",children:"empty"},void 0,!1,void 0,this)},void 0,!1,void 0,this):w.jsxDEV("div",{className:"pb-1 pl-6",children:P==null?w.jsxDEV("p",{className:"text-small text-fg-subtle",children:"loading…"},void 0,!1,void 0,this):v.length===0?w.jsxDEV("p",{className:"text-small text-fg-subtle",children:"This block has no editable fields."},void 0,!1,void 0,this):w.jsxDEV(w.Fragment,{children:[w.jsxDEV(Q5,{schema:v,value:P,onChange:KZ,api:Z},void 0,!1,void 0,this),s||u==="saving"?w.jsxDEV("div",{className:"mt-2 flex items-center gap-2",children:[w.jsxDEV($Z,{variant:"secondary",size:"sm",onPress:()=>void LZ(),isDisabled:!s||u==="saving"||Q.pending,children:u==="saving"?"Saving…":"Save now"},void 0,!1,void 0,this),w.jsxDEV("span",{className:"text-caption text-fg-subtle",children:u==="saving"?"":"Autosaving…"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Td({allowed:Z,btBySlug:Q,onAdd:J,compact:q}){let[G,U]=FZ.useState(!1),[K,H]=FZ.useState(""),[B,F]=FZ.useState(0),M=FZ.useRef(null),O=FZ.useMemo(()=>{let N=Z.map((P)=>({slug:P,name:Q.get(P)?.name??P})),T=K.trim().toLowerCase();return T?N.filter((P)=>P.name.toLowerCase().includes(T)||P.slug.toLowerCase().includes(T)):N},[Z,Q,K]);FZ.useEffect(()=>{if(G)M.current?.focus()},[G]),FZ.useEffect(()=>{F(0)},[K]);let V=()=>{U(!1),H("")},A=(N)=>{if(N)J(N);V()};if(!G){if(q)return w.jsxDEV("button",{type:"button",onClick:()=>U(!0),"aria-label":"Insert block here",className:"group/ins flex h-3 w-full items-center justify-center opacity-0 transition-opacity hover:opacity-100",children:w.jsxDEV("span",{className:"flex h-full w-full items-center",children:[w.jsxDEV("span",{className:"h-px flex-1 bg-brand-green/40"},void 0,!1,void 0,this),w.jsxDEV("span",{className:"mx-1 rounded bg-brand-green/15 px-1 text-caption leading-none text-brand-green",children:"+"},void 0,!1,void 0,this),w.jsxDEV("span",{className:"h-px flex-1 bg-brand-green/40"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return w.jsxDEV("button",{type:"button",onClick:()=>U(!0),className:"flex w-full items-center gap-2 rounded-lg px-1 py-1.5 text-left text-small text-fg-subtle opacity-70 transition-colors hover:bg-surface-muted hover:text-fg-muted hover:opacity-100",children:[w.jsxDEV("span",{className:"text-base leading-none",children:"+"},void 0,!1,void 0,this),w.jsxDEV("span",{children:"Add block"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}return w.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-card p-1 shadow-md",children:[w.jsxDEV("input",{ref:M,value:K,placeholder:"Filter blocks…",spellCheck:!1,className:"mb-1 w-full rounded-md bg-surface px-2.5 py-1.5 text-small text-fg outline-none placeholder:text-fg-subtle",onChange:(N)=>H(N.target.value),onBlur:()=>setTimeout(V,120),onKeyDown:(N)=>{if(N.key==="Escape")V();else if(N.key==="ArrowDown")N.preventDefault(),F((T)=>(T+1)%Math.max(O.length,1));else if(N.key==="ArrowUp")N.preventDefault(),F((T)=>(T-1+Math.max(O.length,1))%Math.max(O.length,1));else if(N.key==="Enter")N.preventDefault(),A(O[B]?.slug)}},void 0,!1,void 0,this),w.jsxDEV("div",{className:"max-h-64 overflow-auto",children:O.length===0?w.jsxDEV("div",{className:"px-2.5 py-2 text-small text-fg-subtle",children:"No matching block types"},void 0,!1,void 0,this):O.map((N,T)=>w.jsxDEV("button",{type:"button",onMouseEnter:()=>F(T),onMouseDown:(P)=>P.preventDefault(),onClick:()=>A(N.slug),className:`flex w-full items-center rounded-md px-2.5 py-1.5 text-left text-small ${T===B?"bg-surface-muted text-fg":"text-fg-muted hover:bg-surface-muted"}`,children:N.name},N.slug,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function O0Z({api:Z,page:Q,ct:J,initialFields:q,onSaved:G,onError:U}){let[K,H]=FZ.useState(Q.title),[B,F]=FZ.useState(Q.slug),[M,O]=FZ.useState(Q.locale),[V,A]=FZ.useState(q),[N,T]=FZ.useState(!1),[P,C]=FZ.useState(!1),y=J?.fieldsSchema??[];FZ.useEffect(()=>{H(Q.title),F(Q.slug),O(Q.locale)},[Q.id,Q.title,Q.slug,Q.locale]),FZ.useEffect(()=>{A(q)},[q]);let f=async()=>{C(!0);try{let u=await Z.call("updatePage",{pageId:Q.id,title:K,slug:B,locale:M,...y.length?{fields:V}:{}});if(u?.page)G(u.page);T(!0),setTimeout(()=>T(!1),1500)}catch(u){U($Q(u))}finally{C(!1)}};return w.jsxDEV("div",{className:"flex flex-col gap-4",children:[w.jsxDEV(Jz,{children:"Page"},void 0,!1,void 0,this),N?w.jsxDEV(D7,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,w.jsxDEV(AX,{label:"Title",value:K,onChange:H},void 0,!1,void 0,this),w.jsxDEV(AX,{label:"Slug",value:B,onChange:F},void 0,!1,void 0,this),w.jsxDEV(AX,{label:"Locale",value:M,onChange:O},void 0,!1,void 0,this),y.length?w.jsxDEV(w.Fragment,{children:[w.jsxDEV(Jz,{children:"Fields"},void 0,!1,void 0,this),w.jsxDEV(Q5,{schema:y,value:V,onChange:A,api:Z},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,w.jsxDEV($Z,{onPress:f,isDisabled:P||!K.trim()||!B.trim(),children:P?"Saving…":"Save"},void 0,!1,void 0,this),w.jsxDEV(r_,{children:[w.jsxDEV("span",{children:"Status"},void 0,!1,void 0,this),w.jsxDEV("span",{children:Q.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function V0Z({api:Z,page:Q,onError:J}){let[q,G]=FZ.useState({metaTitle:Q.metaTitle??"",metaDescription:Q.metaDescription??"",canonicalUrl:Q.canonicalUrl??"",robots:Q.robots??"",ogTitle:Q.ogTitle??"",ogDescription:Q.ogDescription??""}),[U,K]=FZ.useState(!1),H=async()=>{try{await Z.call("updatePageSeo",{pageId:Q.id,...q}),K(!0),setTimeout(()=>K(!1),1500)}catch(F){J($Q(F))}},B=(F,M,O=!1)=>O?w.jsxDEV(D2,{label:M,value:q[F],onChange:(V)=>G({...q,[F]:V})},void 0,!1,void 0,this):w.jsxDEV(AX,{label:M,value:q[F],onChange:(V)=>G({...q,[F]:V})},void 0,!1,void 0,this);return w.jsxDEV("div",{className:"flex flex-col gap-4",children:[w.jsxDEV(Jz,{children:"SEO"},void 0,!1,void 0,this),U?w.jsxDEV(D7,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,B("metaTitle","Meta title"),B("metaDescription","Meta description",!0),B("canonicalUrl","Canonical URL"),B("robots","Robots (e.g. noindex)"),B("ogTitle","OG title"),B("ogDescription","OG description",!0),w.jsxDEV($Z,{className:"w-full",onPress:H,children:"Save SEO"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function A0Z({api:Z,page:Q,onChanged:J,onError:q}){let G=async(H,B)=>{try{let F=await Z.call(H,{pageId:Q.id,...B});if(F?.page)J(F.page)}catch(F){q($Q(F))}},U=String(Q.status),K=U==="review"?[{label:"Approve (publish)",action:"approve"},{label:"Reject",action:"reject",variant:"secondary"},{label:"Publish directly",action:"publishPage",variant:"secondary"}]:U==="published"?[{label:"Unpublish",action:"unpublishPage",variant:"secondary"}]:[{label:"Publish",action:"publishPage"},{label:"Submit for review",action:"submitForReview",variant:"secondary"}];return w.jsxDEV("div",{children:[w.jsxDEV(Jz,{children:"Workflow"},void 0,!1,void 0,this),w.jsxDEV("div",{className:"mb-3 flex items-center gap-2 text-[13px] text-fg-muted",children:[w.jsxDEV("span",{className:"text-fg-subtle",children:"Status"},void 0,!1,void 0,this),w.jsxDEV(x6,{status:Q.status,children:Q.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.jsxDEV("div",{className:"flex flex-col gap-2",children:K.map((H)=>w.jsxDEV($Z,{variant:H.variant,onPress:()=>G(H.action),children:H.label},H.action,!1,void 0,this))},void 0,!1,void 0,this),w.jsxDEV("p",{className:"mt-2.5 text-fg-subtle",children:"Publish needs a reviewer/admin role; submit-for-review is editor-gated."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function I0Z({api:Z,page:Q,onError:J}){let[q,G]=FZ.useState([]),[U,K]=FZ.useState(""),H=FZ.useCallback(()=>Z.call("listTranslations",{pageId:Q.id}).then(G).catch((F)=>J($Q(F))),[Z,Q.id,J]);FZ.useEffect(()=>{H()},[H]);let B=async()=>{try{await Z.call("createTranslation",{pageId:Q.id,locale:U}),K(""),H()}catch(F){J($Q(F))}};return w.jsxDEV("div",{children:[w.jsxDEV(Jz,{children:"Translations"},void 0,!1,void 0,this),w.jsxDEV("div",{className:"flex flex-col gap-2",children:q.map((F)=>w.jsxDEV("div",{className:w6,children:[w.jsxDEV("span",{className:"flex-1 truncate font-medium",children:F.locale},void 0,!1,void 0,this),w.jsxDEV("span",{className:"text-fg-subtle",children:["/",F.slug]},void 0,!0,void 0,this),w.jsxDEV(x6,{status:F.status,children:F.status},void 0,!1,void 0,this)]},F.id,!0,void 0,this))},void 0,!1,void 0,this),w.jsxDEV("div",{className:"mt-2 flex items-end gap-1.5",children:[w.jsxDEV(AX,{label:"",value:U,onChange:K,placeholder:"locale (e.g. cs)"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"secondary",onPress:B,isDisabled:!U,children:"add"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function N0Z({api:Z,pageId:Q,onError:J}){let[q,G]=FZ.useState([]);return FZ.useEffect(()=>{Z.listPageAudit(Q).then(G).catch((U)=>J($Q(U)))},[Z,Q,J]),w.jsxDEV("div",{children:[w.jsxDEV(Jz,{children:"Audit trail"},void 0,!1,void 0,this),w.jsxDEV("div",{className:"flex flex-col gap-2",children:[q.map((U)=>w.jsxDEV("div",{className:`${w6} text-xs`,children:[w.jsxDEV("span",{className:"rounded-full bg-surface-muted px-2 py-0.5 font-mono text-xs text-fg-muted",children:U.action},void 0,!1,void 0,this),w.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:[U.fromStatus," → ",U.toStatus]},void 0,!0,void 0,this),w.jsxDEV("span",{className:"text-fg-subtle",children:U.actor??"system"},void 0,!1,void 0,this)]},U.id,!0,void 0,this)),q.length===0?w.jsxDEV("p",{className:"text-fg-subtle",children:"No history yet."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Sd({api:Z,onError:Q}){let[J,q]=FZ.useState([]),[G,U]=FZ.useState(0),[K,H]=FZ.useState(!1),[B,F]=FZ.useState(null),[M,O]=FZ.useState(!1),V=FZ.useCallback((N)=>{Z.listMedia(Pd,N).then((T)=>{q((P)=>N===0?T:[...P,...T]),H(T.length===Pd),U(N+T.length)}).catch((T)=>Q($Q(T)))},[Z,Q]);FZ.useEffect(()=>{V(0)},[V]);let A=async(N)=>{if(!N?.length)return;O(!0),Q("");try{for(let T of Array.from(N))await Z.uploadMedia(T);V(0)}catch(T){Q($Q(T))}finally{O(!1)}};return w.jsxDEV(w.Fragment,{children:[w.jsxDEV(C7,{lead:"Media",em:J.length===0?"None yet":J.length===1?"1 file":`${J.length}${K?"+":""} files`,children:w.jsxDEV(a_,{text:"Let's",em:"upload something",children:w.jsxDEV("label",{className:`inline-flex shrink-0 cursor-pointer items-center rounded-full bg-surface-inverted px-6 py-3 text-compact text-fg-inverted ${M?"pointer-events-none opacity-50":""}`,children:[M?"Uploading…":"+ Upload",w.jsxDEV("input",{type:"file",multiple:!0,hidden:!0,disabled:M,onChange:(N)=>{A(N.target.files),N.target.value=""}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.jsxDEV("div",{className:X5,children:[J.length===0?w.jsxDEV("p",{className:"text-fg-subtle",children:"No media yet. Upload images to use them in blocks and SEO."},void 0,!1,void 0,this):w.jsxDEV("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5",children:J.map((N)=>w.jsxDEV("div",{className:`cursor-pointer overflow-hidden rounded-lg border bg-surface-card ${B?.id===N.id?"border-fg":"border-border"}`,onClick:()=>F(N),children:[xd(N)?w.jsxDEV("img",{className:"block h-[130px] w-full object-cover",src:Z.resolve(`/media/${N.file.key}`),alt:N.alt??""},void 0,!1,void 0,this):w.jsxDEV("div",{className:"flex h-[130px] items-center justify-center bg-surface-muted font-mono text-xs text-fg-subtle",children:bd(N)},void 0,!1,void 0,this),w.jsxDEV("div",{className:"truncate px-2 py-1.5 text-[11px] text-fg-muted",children:N.file.filename??N.id},void 0,!1,void 0,this)]},N.id,!0,void 0,this))},void 0,!1,void 0,this),K?w.jsxDEV("div",{className:"mt-3.5 text-center",children:w.jsxDEV($Z,{variant:"secondary",size:"sm",onPress:()=>V(G),children:"Load more"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,B?w.jsxDEV(j0Z,{api:Z,media:B,onClose:()=>F(null),onSaved:(N)=>{F(N),q((T)=>T.map((P)=>P.id===N.id?N:P))},onDeleted:(N)=>{F(null),q((T)=>T.filter((P)=>P.id!==N))},onError:Q},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function j0Z({api:Z,media:Q,onClose:J,onSaved:q,onDeleted:G,onError:U}){let[K,H]=FZ.useState(Q.alt??""),[B,F]=FZ.useState(!1);FZ.useEffect(()=>H(Q.alt??""),[Q]);let M=Z.resolve(`/media/${Q.file.key}`),O=async()=>{F(!0);try{q(await Z.updateMedia(Q.id,K||null))}catch(A){U($Q(A))}finally{F(!1)}},V=async()=>{if(!confirm("Delete this file permanently? If a block or page still references it, that image will break — this cannot be undone."))return;F(!0);try{await Z.deleteMedia(Q.id),G(Q.id)}catch(A){U($Q(A))}finally{F(!1)}};return w.jsxDEV(RT,{onClose:J,wide:!0,children:[w.jsxDEV(CT,{children:[w.jsxDEV(R7,{children:"Media"},void 0,!1,void 0,this)," ",Q.file.filename??""]},void 0,!0,void 0,this),xd(Q)?w.jsxDEV("img",{className:"mx-auto mb-3.5 block max-h-[340px] max-w-full rounded-lg bg-surface-muted object-contain",src:M,alt:Q.alt??""},void 0,!1,void 0,this):w.jsxDEV("div",{className:"mb-3.5 flex h-[200px] items-center justify-center rounded-lg bg-surface-muted font-mono text-fg-subtle",children:bd(Q)},void 0,!1,void 0,this),w.jsxDEV("div",{className:"mb-4",children:w.jsxDEV(AX,{label:"Alt text (for accessibility & SEO)",value:K,onChange:H,placeholder:"Describe the image…"},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.jsxDEV(r_,{children:[w.jsxDEV("span",{children:"Type"},void 0,!1,void 0,this),w.jsxDEV("span",{children:Q.file.contentType??"—"},void 0,!1,void 0,this),w.jsxDEV("span",{children:"Size"},void 0,!1,void 0,this),w.jsxDEV("span",{children:$0Z(Q.file.size)},void 0,!1,void 0,this),w.jsxDEV("span",{children:"Uploaded"},void 0,!1,void 0,this),w.jsxDEV("span",{children:Q.file.uploadedAt?new Date(Q.file.uploadedAt).toLocaleString():Q.createdAt??"—"},void 0,!1,void 0,this),w.jsxDEV("span",{children:"URL"},void 0,!1,void 0,this),w.jsxDEV("span",{className:"break-all",children:w.jsxDEV("a",{className:"underline underline-offset-2",href:M,target:"_blank",rel:"noreferrer",children:["/media/",Q.file.key]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.jsxDEV("div",{className:"mt-3.5 flex items-center gap-2",children:[w.jsxDEV($Z,{onPress:O,isDisabled:B||K===(Q.alt??""),children:"Save"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"secondary",size:"sm",onPress:()=>navigator.clipboard?.writeText(M),children:"Copy URL"},void 0,!1,void 0,this),w.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"ghost",className:"text-danger",onPress:V,isDisabled:B,children:"Delete"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"ghost",onPress:J,children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function T0Z(Z){let Q=Z.roles;if(Array.isArray(Q))return Q.filter((J)=>typeof J==="string");if(typeof Q==="string")try{let J=JSON.parse(Q);return Array.isArray(J)?J:[]}catch{return[]}return[]}function yd({api:Z,me:Q,onError:J}){let[q,G]=FZ.useState([]),[U,K]=FZ.useState(!1),[H,B]=FZ.useState(""),F=FZ.useCallback(()=>{Z.call("listUsers",{limit:200}).then(G).catch((A)=>J($Q(A)))},[Z,J]);FZ.useEffect(()=>{F()},[F]);let M=async(A,N)=>{B(A.username);try{await Z.call("setUserRoles",{username:A.username,roles:N}),F()}catch(T){J($Q(T))}finally{B("")}},O=async(A,N)=>{B(A.username);try{await Z.call("setUserActive",{username:A.username,active:N}),F()}catch(T){J($Q(T))}finally{B("")}},V=async(A)=>{if(!confirm(`Delete user ${A.username}? This cannot be undone.`))return;B(A.username);try{await Z.call("deleteUser",{username:A.username}),F()}catch(N){J($Q(N))}finally{B("")}};return w.jsxDEV(w.Fragment,{children:[w.jsxDEV(C7,{lead:"Users",em:q.length===0?"None yet":q.length===1?"1 account":`${q.length} accounts`,children:w.jsxDEV(a_,{text:"Let's",em:"invite someone",children:w.jsxDEV($Z,{className:"shrink-0",onPress:()=>K(!0),children:"+ Invite"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.jsxDEV("div",{className:X5,children:w.jsxDEV("div",{className:"flex flex-col gap-2",children:[q.map((A)=>{let N=T0Z(A),T=Q?.userId===A.username,P=A.active===void 0||A.active===null?!0:Boolean(Number(A.active));return w.jsxDEV("div",{className:`${w6} flex-wrap items-start`,children:[w.jsxDEV("div",{className:"flex min-w-[200px] flex-1 flex-col gap-0.5",children:[w.jsxDEV("span",{className:"font-semibold",children:[A.username,T?w.jsxDEV("span",{className:"ml-1.5 font-normal text-fg-subtle",children:"(you)"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),A.email&&A.email!==A.username?w.jsxDEV("span",{className:"text-xs text-fg-subtle",children:A.email},void 0,!1,void 0,this):null,A.createdAt?w.jsxDEV("span",{className:"text-[11px] text-fg-subtle",children:["joined ",new Date(Number(A.createdAt)).toLocaleDateString()]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),w.jsxDEV(P0Z,{value:N,disabled:H===A.username,onSave:(C)=>M(A,C)},void 0,!1,void 0,this),w.jsxDEV(x6,{status:P?"active":"inactive",children:P?"active":"inactive"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"ghost",size:"sm",isDisabled:H===A.username||T,onPress:()=>O(A,!P),children:P?"Deactivate":"Activate"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"ghost",size:"sm",className:"text-danger",isDisabled:H===A.username||T,onPress:()=>V(A),children:"Delete"},void 0,!1,void 0,this)]},A.username,!0,void 0,this)}),q.length===0?w.jsxDEV("p",{className:"text-fg-subtle",children:"No users yet. Invite someone to get started."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),U?w.jsxDEV(R0Z,{api:Z,onClose:()=>K(!1),onInvited:()=>{K(!1),F()},onError:J},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function P0Z({value:Z,disabled:Q,onSave:J}){let[q,G]=FZ.useState(Z.join(", ")),[U,K]=FZ.useState(!1);FZ.useEffect(()=>{G(Z.join(", "))},[Z]);let H=()=>{K(!1);let B=q.split(",").map((F)=>F.trim()).filter(Boolean);if(B.length===0){G(Z.join(", "));return}if(B.length===Z.length&&B.every((F,M)=>F===Z[M]))return;J(B)};if(U)return w.jsxDEV("input",{autoFocus:!0,className:"h-10 w-[220px] rounded-lg border border-border bg-surface-card px-4 text-sm text-fg outline-none focus:border-brand-green",value:q,disabled:Q,onChange:(B)=>G(B.target.value),onBlur:H,onKeyDown:(B)=>{if(B.key==="Enter")H();if(B.key==="Escape")G(Z.join(", ")),K(!1)}},void 0,!1,void 0,this);return w.jsxDEV("span",{className:"flex cursor-pointer flex-wrap gap-1",onClick:()=>K(!0),title:"Click to edit",children:Z.length===0?w.jsxDEV(x6,{children:"no roles"},void 0,!1,void 0,this):Z.map((B)=>w.jsxDEV(x6,{status:B==="admin"?"published":void 0,children:B},B,!1,void 0,this))},void 0,!1,void 0,this)}function R0Z({api:Z,onClose:Q,onInvited:J,onError:q}){let[G,U]=FZ.useState(""),[K,H]=FZ.useState("editor"),[B,F]=FZ.useState(!1);return w.jsxDEV(RT,{onClose:Q,children:[w.jsxDEV(CT,{children:["Invite an ",w.jsxDEV(R7,{children:"editor"},void 0,!1,void 0,this)," or teammate"]},void 0,!0,void 0,this),w.jsxDEV("p",{className:"-mt-2 mb-4 text-fg-subtle",children:"They'll get a one-time magic link that logs them in and creates their account."},void 0,!1,void 0,this),w.jsxDEV("div",{className:"flex flex-col gap-4",children:[w.jsxDEV(AX,{label:"Email",type:"email",autoFocus:!0,value:G,onChange:U,placeholder:"them@example.com"},void 0,!1,void 0,this),w.jsxDEV(AX,{label:"Roles (comma-separated — e.g. editor, reviewer, admin)",value:K,onChange:H,placeholder:"editor"},void 0,!1,void 0,this),w.jsxDEV("div",{className:"mt-2 flex justify-end gap-2",children:[w.jsxDEV($Z,{variant:"ghost",onPress:Q,children:"Cancel"},void 0,!1,void 0,this),w.jsxDEV($Z,{onPress:async()=>{F(!0);try{let O=K.split(",").map((V)=>V.trim()).filter(Boolean);await Z.call("inviteUser",{email:G,roles:O}),J()}catch(O){q($Q(O))}finally{F(!1)}},isDisabled:B||!G,children:B?"Sending…":"Send invite"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function wd({api:Z,cfg:Q,me:J,onSignOut:q,onError:G}){return w.jsxDEV(w.Fragment,{children:[w.jsxDEV(C7,{lead:"Settings",em:J?.userId??"your account"},void 0,!1,void 0,this),w.jsxDEV("div",{className:`${X5} grid grid-cols-2 gap-5 max-[820px]:grid-cols-1`,children:[w.jsxDEV(C0Z,{api:Z,me:J,onError:G,onSignOut:q},void 0,!1,void 0,this),w.jsxDEV(D0Z,{cfg:Q,me:J},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function C0Z({api:Z,me:Q,onError:J,onSignOut:q}){let[G,U]=FZ.useState(""),[K,H]=FZ.useState(""),[B,F]=FZ.useState(""),[M,O]=FZ.useState(""),[V,A]=FZ.useState(!1),N=(C)=>{O(C),setTimeout(()=>O(""),1800)},T=async()=>{A(!0);try{await Z.call("changeEmail",{email:G}),U(""),N("Contact email updated")}catch(C){J($Q(C))}finally{A(!1)}},P=async()=>{A(!0);try{await Z.call("changePassword",{currentPassword:K,newPassword:B}),H(""),F(""),N("Password updated")}catch(C){J($Q(C))}finally{A(!1)}};return w.jsxDEV(Cd,{children:[w.jsxDEV(Jz,{children:"My account"},void 0,!1,void 0,this),M?w.jsxDEV(D7,{ok:!0,children:M},void 0,!1,void 0,this):null,w.jsxDEV(r_,{className:"mb-4",children:[w.jsxDEV("span",{children:"Username"},void 0,!1,void 0,this),w.jsxDEV("span",{children:Q?.userId??"—"},void 0,!1,void 0,this),w.jsxDEV("span",{children:"Roles"},void 0,!1,void 0,this),w.jsxDEV("span",{children:(Q?.roles??[]).join(", ")||"—"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.jsxDEV("div",{className:"flex flex-col gap-4",children:[w.jsxDEV(AX,{label:"Change contact email",type:"email",value:G,onChange:U,placeholder:"you@example.com"},void 0,!1,void 0,this),w.jsxDEV($Z,{className:"w-full",onPress:T,isDisabled:V||!G,children:"Save email"},void 0,!1,void 0,this),w.jsxDEV(AX,{label:"Current password",type:"password",value:K,onChange:H,autoComplete:"current-password"},void 0,!1,void 0,this),w.jsxDEV(AX,{label:"New password (at least 8 characters)",type:"password",value:B,onChange:F,autoComplete:"new-password"},void 0,!1,void 0,this),w.jsxDEV($Z,{className:"w-full",onPress:P,isDisabled:V||B.length<8||K.length===0,children:"Change password"},void 0,!1,void 0,this),w.jsxDEV($Z,{variant:"ghost",className:"mt-2 w-full text-danger",onPress:q,children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function D0Z({cfg:Z,me:Q}){return w.jsxDEV(Cd,{children:[w.jsxDEV(Jz,{children:"About"},void 0,!1,void 0,this),w.jsxDEV(r_,{children:[w.jsxDEV("span",{children:"Tenant"},void 0,!1,void 0,this),w.jsxDEV("span",{children:Z.tenant||"main"},void 0,!1,void 0,this),w.jsxDEV("span",{children:"API"},void 0,!1,void 0,this),w.jsxDEV("span",{className:"break-all",children:Z.baseUrl},void 0,!1,void 0,this),w.jsxDEV("span",{children:"Signed in as"},void 0,!1,void 0,this),w.jsxDEV("span",{children:Q?.userId??"—"},void 0,!1,void 0,this),w.jsxDEV("span",{children:"Editor"},void 0,!1,void 0,this),w.jsxDEV("span",{children:"pramen · cms-editor"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function xd(Z){return(Z.file.contentType??"").startsWith("image/")}function bd(Z){let Q=(Z.file.contentType??"").split("/")[1];return(Z.file.filename?.split(".").pop()??Q??"file").slice(0,5).toUpperCase()}function $0Z(Z){if(!Z||Z<=0)return"—";let Q=["B","KB","MB","GB"],J=0,q=Z;while(q>=1024&&J<Q.length-1)q/=1024,J++;return`${q<10&&J>0?q.toFixed(1):Math.round(q)} ${Q[J]}`}function $Q(Z){if(Z instanceof EK)return Z.message;return Z instanceof Error?Z.message:String(Z)}function Rd(Z){return Z.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function E0Z(Z){return Z.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\s+/g," ").trim()}function k0Z(Z){let Q=Object.values(Z).find((q)=>typeof q==="string"&&q.trim());if(typeof Q!=="string")return"";let J=E0Z(Q);return J.length>90?J.slice(0,90)+"…":J}function S0Z(Z,Q,J,q,G){let U=J+q;if(U<0||U>=Z.length)return;let K=Z.map((H)=>H.id);[K[J],K[U]]=[K[U],K[J]],G(Q,K)}var FZ,w,PT,w6="flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",X5="mx-auto max-w-[1200px] px-7 pb-8 pt-2",R7=({children:Z})=>w.jsxDEV("span",{className:"text-fg-subtle",children:Z},void 0,!1,void 0,this),jd=50,Pd=60;var c9=k(()=>{iG();fI();Id();FZ=S(JZ(),1),w=S(zZ(),1),PT=["settings","seo","workflow","i18n","audit"]});var vd={};X9(vd,{default:()=>y0Z});var $7,y0Z;var gd=k(()=>{Gq();iG();nG();c9();$7=S(zZ(),1),y0Z=zJ().params({slug:"string",id:"string"}).route("/collections/:slug/:id").render(function({params:Q}){let{api:J,collections:q,setError:G}=PJ(),U=TJ(),K=q.find((B)=>B.slug===Q.slug),H=()=>U("collection",{params:{slug:Q.slug}});if(!K)return $7.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[$7.jsxDEV("p",{className:"text-fg-subtle",children:q.length===0?"Loading…":`Unknown collection: ${Q.slug}`},void 0,!1,void 0,this),q.length>0?$7.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:()=>U("home"),children:"← Pages"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return $7.jsxDEV(Ed,{api:J,def:K,id:Q.id==="new"?null:Q.id,onSaved:H,onDeleted:H,onBack:H,onError:G},void 0,!1,void 0,this)})});var hd={};X9(hd,{default:()=>w0Z});var E7,w0Z;var ud=k(()=>{Gq();iG();nG();c9();E7=S(zZ(),1),w0Z=zJ().params({slug:"string"}).route("/collections/:slug").render(function({params:Q}){let{api:J,collections:q,setError:G}=PJ(),U=TJ(),K=q.find((H)=>H.slug===Q.slug);if(!K)return E7.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[E7.jsxDEV("p",{className:"text-fg-subtle",children:q.length===0?"Loading…":`Unknown collection: ${Q.slug}`},void 0,!1,void 0,this),q.length>0?E7.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:()=>U("home"),children:"← Pages"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return E7.jsxDEV($d,{api:J,def:K,onOpen:(H)=>U("collection-item",{params:{slug:K.slug,id:H}}),onNew:()=>U("collection-item",{params:{slug:K.slug,id:"new"}}),onError:G},void 0,!1,void 0,this)})});var fd={};X9(fd,{default:()=>x0Z});var J5,md,x0Z;var cd=k(()=>{Gq();nG();c9();J5=S(JZ(),1),md=S(zZ(),1),x0Z=zJ().route("/").render(function(){let{api:Q,setError:J,collections:q}=PJ(),G=TJ(),[U,K]=J5.useState([]),[H,B]=J5.useState([]),F=typeof window<"u"&&window.PRAMEN_CMS_EDITOR?.hidePages===!0,M=q[0]?.slug;J5.useEffect(()=>{if(F&&M)G("collection",{params:{slug:M},replace:!0})},[F,M,G]);let O=()=>Q.listPages().then(K).catch((V)=>J($Q(V)));if(J5.useEffect(()=>{if(F)return;O(),Q.listBlockTypes().then(B).catch((V)=>J($Q(V)))},[Q,F]),F&&M)return null;return md.jsxDEV(Dd,{api:Q,pages:U,blockTypes:H,onOpen:(V)=>G("page",{params:{pageId:V.id}}),onCreated:O,onError:J},void 0,!1,void 0,this)})});var pd={};X9(pd,{default:()=>b0Z});var dd,b0Z;var ld=k(()=>{Gq();nG();c9();dd=S(zZ(),1),b0Z=zJ().route("/media").render(function(){let{api:Q,setError:J}=PJ();return dd.jsxDEV(Sd,{api:Q,onError:J},void 0,!1,void 0,this)})});var id={};X9(id,{default:()=>v0Z});var Y5,b6,v0Z;var nd=k(()=>{Gq();iG();nG();c9();Y5=S(JZ(),1),b6=S(zZ(),1),v0Z=zJ().params({pageId:"string",tab:"?string"}).route("/pages/:pageId").render(function({params:Q}){let{api:J,setError:q}=PJ(),G=TJ(),[U,K]=Y5.useState(null),[H,B]=Y5.useState([]),[F,M]=Y5.useState(!1);Y5.useEffect(()=>{let A=!0;return M(!1),J.listPages().then((N)=>{if(!A)return;let T=N.find((P)=>P.id===Q.pageId)??null;K(T),M(!T)}).catch((N)=>q($Q(N))),J.listBlockTypes().then((N)=>A&&B(N)).catch((N)=>q($Q(N))),()=>{A=!1}},[J,Q.pageId,q]);let O=PT.includes(Q.tab)?Q.tab:"settings",V=(A)=>G("page",{params:{pageId:Q.pageId,tab:A},replace:!0});if(F)return b6.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[b6.jsxDEV("p",{className:"text-fg-subtle",children:"Page not found."},void 0,!1,void 0,this),b6.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:()=>G("home"),children:"← all pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(!U)return b6.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:b6.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);return b6.jsxDEV(kd,{api:J,page:U,blockTypes:H,tab:O,onTab:V,onBack:()=>G("home"),onChange:K},void 0,!1,void 0,this)})});var sd={};X9(sd,{default:()=>g0Z});var ad,g0Z;var rd=k(()=>{Gq();nG();c9();ad=S(zZ(),1),g0Z=zJ().route("/settings").render(function(){let{api:Q,cfg:J,me:q,setError:G,reconfigure:U}=PJ();return ad.jsxDEV(wd,{api:Q,cfg:J,me:q,onSignOut:U,onError:G},void 0,!1,void 0,this)})});var od={};X9(od,{default:()=>h0Z});var v6,h0Z;var td=k(()=>{Gq();iG();nG();c9();v6=S(zZ(),1),h0Z=zJ().route("/users").render(function(){let{api:Q,me:J,isAdmin:q,setError:G}=PJ(),U=TJ();if(J===null)return v6.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:v6.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!q)return v6.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[v6.jsxDEV("p",{className:"text-fg-subtle",children:"Admins only."},void 0,!1,void 0,this),v6.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:()=>U("home"),children:"← back to pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return v6.jsxDEV(yd,{api:Q,me:J,onError:G},void 0,!1,void 0,this)})});var ed={};X9(ed,{default:()=>u0Z});var p9,u0Z;var Zl=k(()=>{Gq();iG();p9=S(zZ(),1),u0Z=zJ().render(function(){let Q=TJ();return p9.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:[p9.jsxDEV("h1",{className:"m-0 text-[56px] font-normal leading-[1.05] tracking-[-0.01em] max-[820px]:text-[40px]",children:[p9.jsxDEV("span",{className:"block text-fg-subtle",children:"Not found"},void 0,!1,void 0,this),p9.jsxDEV("span",{className:"block text-fg",children:"Nothing lives here"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p9.jsxDEV("div",{className:"mt-4 flex items-center gap-2",children:[p9.jsxDEV("p",{className:"text-fg-subtle",children:"That page doesn't exist."},void 0,!1,void 0,this),p9.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:()=>Q("home"),children:"← back to pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)})});Gq();var Hl=S(JZ(),1),Wl=S(kk(),1);Gq();var B0=S(JZ(),1);Gq();iG();nG();var g2=S(JZ(),1),IX=S(zZ(),1),Eg="pramen.cms.theme";function cI(){let{cfg:Z,isAdmin:Q,collections:J,error:q,reconfigure:G}=PJ(),U=TJ(),{pathname:K}=Z3(),[H,B]=g2.useState(()=>typeof localStorage<"u"?localStorage.getItem(Eg)??"light":"light");g2.useEffect(()=>{document.documentElement.dataset.theme=H==="dark"?"dark":"light",localStorage.setItem(Eg,H)},[H]);let F=K.startsWith("/collections/")?K.split("/")[2]:void 0,M=F?`col:${F}`:K.startsWith("/pages")||K==="/"?"pages":K.startsWith("/media")?"media":K.startsWith("/users")?"users":K.startsWith("/settings")?"settings":"",O=(N)=>M===N?"bg-surface-muted text-fg":"text-fg-muted",V=typeof window<"u"?window.PRAMEN_CMS_EDITOR?.extraNav??[]:[],A=typeof window<"u"?window.PRAMEN_CMS_EDITOR?.hidePages===!0:!1;return IX.jsxDEV("div",{className:"min-h-screen bg-surface text-fg",children:[IX.jsxDEV(CH,{className:"sticky top-0 z-10 bg-surface px-7",children:[IX.jsxDEV(CH.Brand,{children:[IX.jsxDEV("span",{className:"text-callout font-bold tracking-[0.01em] text-fg",children:"pramen"},void 0,!1,void 0,this),IX.jsxDEV("span",{className:"text-fg-subtle",children:"· cms"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),IX.jsxDEV(CH.Nav,{"aria-label":"Primary",children:[A?null:IX.jsxDEV($Z,{variant:"ghost",size:"sm",className:O("pages"),onPress:()=>U("home"),children:"Pages"},void 0,!1,void 0,this),J.map((N)=>IX.jsxDEV($Z,{variant:"ghost",size:"sm",className:O(`col:${N.slug}`),onPress:()=>U("collection",{params:{slug:N.slug}}),children:[N.icon?`${N.icon} `:"",N.pluralLabel]},N.slug,!0,void 0,this)),IX.jsxDEV($Z,{variant:"ghost",size:"sm",className:O("media"),onPress:()=>U("media"),children:"Media"},void 0,!1,void 0,this),Q?IX.jsxDEV($Z,{variant:"ghost",size:"sm",className:O("users"),onPress:()=>U("users"),children:"Users"},void 0,!1,void 0,this):null,IX.jsxDEV($Z,{variant:"ghost",size:"sm",className:O("settings"),onPress:()=>U("settings"),children:"Settings"},void 0,!1,void 0,this),V.map((N)=>IX.jsxDEV("a",{href:N.href,target:"_blank",rel:"noopener noreferrer",className:"rounded-md px-2.5 py-1.5 text-small text-fg-muted transition-colors hover:bg-surface-muted hover:text-fg",children:N.label},N.href,!1,void 0,this))]},void 0,!0,void 0,this),IX.jsxDEV(CH.Actions,{children:[IX.jsxDEV(Kg,{color:"grey",label:Z.tenant},void 0,!1,void 0,this),IX.jsxDEV($Z,{variant:"ghost",size:"sm","aria-label":H==="dark"?"Switch to light theme":"Switch to dark theme",onPress:()=>B(H==="dark"?"light":"dark"),children:H==="dark"?IX.jsxDEV(Gg,{className:"h-4 w-4"},void 0,!1,void 0,this):IX.jsxDEV(zg,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this),IX.jsxDEV($Z,{variant:"ghost",size:"sm",onPress:G,children:"sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q?IX.jsxDEV(lv,{variant:"outlined",padding:"none",className:"mx-7 mt-2 border-danger px-4 py-2.5",children:IX.jsxDEV(y2,{size:"small",className:"text-danger",children:q},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,IX.jsxDEV(d8,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Ql=()=>Promise.resolve().then(() => (gd(),vd)).then((Z)=>({default:Z.default.component})),Xl=()=>Promise.resolve().then(() => (ud(),hd)).then((Z)=>({default:Z.default.component})),Jl=()=>Promise.resolve().then(() => (cd(),fd)).then((Z)=>({default:Z.default.component})),Yl=()=>Promise.resolve().then(() => (ld(),pd)).then((Z)=>({default:Z.default.component})),ql=()=>Promise.resolve().then(() => (nd(),id)).then((Z)=>({default:Z.default.component})),Gl=()=>Promise.resolve().then(() => (rd(),sd)).then((Z)=>({default:Z.default.component})),zl=()=>Promise.resolve().then(() => (td(),od)).then((Z)=>({default:Z.default.component})),Ul=()=>Promise.resolve().then(() => (Zl(),ed)).then((Z)=>({default:Z.default.component})),DT={"collection-item":"/collections/:slug/:id",collection:"/collections/:slug",home:"/",media:"/media",page:"/pages/:pageId",settings:"/settings",users:"/users"},f0Z=[{path:"/",component:cI,isLayout:!0,children:[{path:"/collection-item",matchPath:"/collections/:slug/:id",component:B0.lazy(Ql),preload:Ql},{path:"/collection",matchPath:"/collections/:slug",component:B0.lazy(Xl),preload:Xl},{path:"/home",matchPath:"/",component:B0.lazy(Jl),preload:Jl},{path:"/media",component:B0.lazy(Yl),preload:Yl},{path:"/page",matchPath:"/pages/:pageId",component:B0.lazy(ql),preload:ql},{path:"/settings",component:B0.lazy(Gl),preload:Gl},{path:"/users",component:B0.lazy(zl),preload:zl},{path:"/:__notFound+",component:B0.lazy(Ul),preload:Ul}]}],$T=hO(f0Z);nG();var o_=S(zZ(),1),Kl=document.getElementById("app");if(Kl)Wl.createRoot(Kl).render(o_.jsxDEV(Hl.StrictMode,{children:o_.jsxDEV($g,{children:o_.jsxDEV(e4,{routes:$T,pageRegistry:DT},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this));
|