@pramen/cms-editor 0.0.49 → 0.0.51
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/README.md +45 -2
- package/dist/app.css +1 -1
- package/dist/config.js +14 -4
- package/dist/index.html +4 -2
- package/dist/main.a0tgw8hg.js +399 -0
- package/package.json +15 -11
- package/src/api.ts +6 -0
- package/src/app-context.tsx +21 -2
- package/src/brand.ts +96 -0
- package/src/components.tsx +296 -16
- package/src/fields.tsx +102 -15
- package/src/main.tsx +10 -0
- package/src/rich-text.ts +30 -0
- package/src/routes/_layout.tsx +12 -5
- package/src/routes/page.tsx +12 -3
- package/src/types.ts +53 -2
- package/dist/main.ykztb0px.js +0 -396
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
var dY=Object.create;var{getPrototypeOf:fY,defineProperty:eE,getOwnPropertyNames:pY}=Object;var hY=Object.prototype.hasOwnProperty;function mY(e){return this[e]}var gY,bY,K=(e,t,n)=>{var a=e!=null&&typeof e==="object";if(a){var i=t?gY??=new WeakMap:bY??=new WeakMap,l=i.get(e);if(l)return l}n=e!=null?dY(fY(e)):{};let c=t||!e||!e.__esModule?eE(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let u of pY(e))if(!hY.call(c,u))eE(c,u,{get:mY.bind(e,u),enumerable:!0})}if(a)i.set(e,c);return c};var Ui=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var yY=(e)=>e;function vY(e,t){this[e]=yY.bind(null,t)}var cc=(e,t)=>{for(var n in t)eE(e,n,{get:t[n],enumerable:!0,configurable:!0,set:vY.bind(t,n)})};var N=(e,t)=>()=>(e&&(t=e(e=0)),t);class iv{cache=new Map;_maxSize;constructor(e){if(e<0)throw Error(`[buzola] LoaderCache maxSize must be non-negative, got ${e}`);this._maxSize=e}get maxSize(){return this._maxSize}get size(){return this.cache.size}get(e){let t=this.cache.get(e);if(t!==void 0||this.cache.has(e))this.cache.delete(e),this.cache.set(e,t);return t}has(e){return this.cache.has(e)}set(e,t){this.cache.delete(e),this.cache.set(e,t);while(this.cache.size>this._maxSize){let n=this.cache.keys().next().value;this.cache.delete(n)}}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}}function Xf(e,t){let n=t.pathname,a=n.split("/").filter(Boolean);return tE(e.root,a,0,{},n)}function tE(e,t,n,a,i){if(n===t.length){if(e.route)return BD(e.route.chain,a,i);return null}let l=t[n],c=e.staticChildren.get(l);if(c){let u=tE(c,t,n+1,a,i);if(u)return u}if(e.dynamicChild){let u={...a,[e.dynamicChild.paramName]:decodeURIComponent(l)},f=tE(e.dynamicChild.node,t,n+1,u,i);if(f)return f}if(e.catchAllChild){let u=t.slice(n).map((h)=>decodeURIComponent(h)).join("/"),f={...a,[e.catchAllChild.paramName]:u};return BD(e.catchAllChild.chain,f,i)}return null}function BD(e,t,n){return e.map((a)=>({node:a,params:t,pathname:n}))}function nE(e){let t=e.endsWith("+");return{name:t?e.slice(1,-1):e.slice(1),isCatchAll:t}}function Ym(e){let t=[];for(let n of e.split("/"))if(n.startsWith(":"))t.push(nE(n).name);return t}class sv{routes;adapter;viewTransitions;_basePath;persistentParamsFn;pageRegistry;subscribers=new Set;invalidationListeners=new Set;state;navigationId=0;stopFn;blockers=new Set;pendingScrollBehavior="after-transition";_loaderCache;constructor(e){this.routes=e.routes,this.adapter=e.adapter,this.viewTransitions=e.viewTransitions??!1,this._basePath=e.basePath?e.basePath.replace(/\/$/,""):"",this.persistentParamsFn=e.persistentParams,this.pageRegistry=e.pageRegistry??{},this._loaderCache=e.loaderCacheSize?new iv(e.loaderCacheSize):void 0;let t=this.adapter.getCurrentURL(),n=this.createMatchUrl(t),a=Xf(this.routes,n)??[];if(a.length===0)console.warn(`[buzola] No route matched URL "${t.pathname}". Define a catch-all 404 route to handle unmatched URLs.`);this.state={location:t,matches:a,isPending:!1,navigationState:this.adapter.getState()}}get basePath(){return this._basePath}get loaderCache(){return this._loaderCache}getState(){return this.state}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}start(){let e=(n)=>{if(!n.canIntercept)return;let a=new URL(n.destination.url),i=this.createMatchUrl(a),l=Xf(this.routes,i);if(!l){console.warn(`[buzola] No route matched URL "${a.pathname}". The navigation was not intercepted.`);return}let c=++this.navigationId,u=n.viewTransition||this.viewTransitions,f=this.pendingScrollBehavior;this.pendingScrollBehavior="after-transition",n.intercept({scroll:f,handler:async()=>{for(let m of this.blockers){if(this.navigationId!==c)return;if(!await m())throw new rE}if(this.setState({...this.state,isPending:!0,pendingLocation:a}),this.navigationId!==c)return;let h=()=>{this.setState({location:a,matches:l,isPending:!1,pendingLocation:void 0,navigationState:this.adapter.getState()})};if(u&&typeof document<"u"&&"startViewTransition"in document)document.startViewTransition(h);else h()}})};this.adapter.addEventListener("navigate",e);let t=()=>{this.adapter.removeEventListener("navigate",e)};return this.stopFn=t,t}navigate(e,t){if(t?.resetScroll===!1)this.pendingScrollBehavior="manual";this.adapter.navigate(this._basePath+e,t)}navigateToPage(e,t,n){let a=this.buildPagePath(e,t);this.navigate(this.stripBasePath(a),n)}buildPagePath(e,t){let n=this.pageRegistry[e];if(!n)throw Error(`[buzola] Unknown page "${e}". Is it registered in the page registry?`);let a=this.resolveParams(n,t);return this.buildPath(n,a)}preload(e,t){let n=this.buildPagePath(e,t),a=new URL(n,"http://localhost"),i=this.createMatchUrl(a),l=Xf(this.routes,i);if(!l)return;for(let c of l)c.node.preload?.()}back(){this.adapter.back()}forward(){this.adapter.forward()}buildPath(e,t){let n=e.split("/"),a=[],i=[];for(let h of n)if(h.startsWith(":")){let{name:m,isCatchAll:b}=nE(h),y=t?.[m];if(y===void 0)i.push(m);else if(b)a.push(y);else a.push(encodeURIComponent(y))}else a.push(h);if(i.length>0){if(!t)throw Error(`[buzola] Missing params for path "${e}": ${i.join(", ")}`);throw Error(`[buzola] Missing param "${i[0]}" for path "${e}"`)}let l=new Set(Ym(e)),c=new URLSearchParams;if(t){for(let[h,m]of Object.entries(t))if(!l.has(h)&&m!==void 0)c.set(h,m)}let u=this._basePath+a.join("/"),f=c.toString();return f?`${u}?${f}`:u}stripBasePath(e){if(this._basePath&&e.startsWith(this._basePath))return e.slice(this._basePath.length)||"/";return e}resolveParams(e,t){let n=Ym(e),a=this.getCurrentParams(),i=this.persistentParamsFn?.()??{},l={};for(let c of n){let u=t?.[c]??a[c]??i[c];if(u!==void 0)l[c]=u}if(t){let c=new Set(n);for(let[u,f]of Object.entries(t))if(!c.has(u)&&f!==void 0)l[u]=f}return l}getCurrentParams(){let e={};for(let t of this.state.matches)Object.assign(e,t.params);return e}invalidateAll(){for(let e of this.invalidationListeners)e()}onInvalidate(e){return this.invalidationListeners.add(e),()=>{this.invalidationListeners.delete(e)}}addBlocker(e){return this.blockers.add(e),()=>{this.blockers.delete(e)}}dispose(){this.stopFn?.(),this.stopFn=void 0,this.subscribers.clear(),this.invalidationListeners.clear()}updateRoutes(e){this.routes=e;let t=Xf(this.routes,this.createMatchUrl(this.state.location))??[];this.setState({...this.state,matches:t})}createMatchUrl(e){if(!this._basePath)return e;let t=new URL(e);return t.pathname=this.stripBasePath(t.pathname),t}setState(e){this.state=e;for(let t of this.subscribers)t(this.state)}}var rE;var oE=N(()=>{rE=class rE extends Error{constructor(){super("Navigation aborted by blocker");this.name="NavigationAbortedError"}}});function HD(e){let{path:t,fullPath:n,component:a,searchSchema:i,preload:l,isLayout:c=!1,isIndex:u=!1}=e;return{id:`route:${n||"/"}${c?":layout":""}`,path:zD(t),fullPath:zD(n),component:a,searchSchema:i,preload:l,isLayout:c,isIndex:u}}function iE(e,t=""){let n=FD(e,t,[]),a=aE();for(let i of n)xY(a,i.pattern,i.chain);return{root:a}}function FD(e,t,n){let a=[];for(let i of e){let l=i.isPathlessGroup?"":i.path,c=i.children!=null&&i.children.length>0,u=i.isLayout??c,f=i.isIndex??(!u&&(i.path==="/"||i.path==="")),h;if(i.matchPath!=null)h=i.matchPath;else if(f)h=t||"/";else h=SY(t||"/",l);let m=HD({path:l,fullPath:h,component:i.component,searchSchema:i.searchSchema,preload:i.preload,isLayout:u,isIndex:f});if(u){let b=[...n,m];if(i.children){let y=i.isPathlessGroup?t:h;a.push(...FD(i.children,y,b))}}else a.push({pattern:h,chain:[...n,m]})}return a}function aE(){return{staticChildren:new Map}}function xY(e,t,n){let a=$Y(t),i=e;for(let l=0;l<a.length;l++){let c=a[l];if(c.startsWith(":")&&(c.endsWith("+")||c.endsWith("*"))){let u=c.slice(1,-1);i.catchAllChild={paramName:u,chain:n};return}if(c.startsWith(":")){let u=c.slice(1);if(!i.dynamicChild)i.dynamicChild={paramName:u,node:aE()};i=i.dynamicChild.node}else{let u=i.staticChildren.get(c);if(!u)u=aE(),i.staticChildren.set(c,u);i=u}}i.route={chain:n}}function $Y(e){return e.split("/").filter(Boolean)}function zD(e){if(e===""||e==="/")return"/";let t=e.startsWith("/")?e:`/${e}`;return t.endsWith("/")?t.slice(0,-1):t}function SY(e,t){if(t==="/")return e==="/"?"/":e;let n=e==="/"?"":e,a=t.startsWith("/")?t:`/${t}`;return n+a}function sE(){let e=window.navigation;if(!e)throw Error("Navigation API is not available. Buzola requires a browser that supports the Navigation API.");let t=new Set,n=!1,a=(i)=>{let l=n;n=!1;let c={destination:{url:i.destination.url},canIntercept:i.canIntercept,navigationType:i.navigationType,userInitiated:i.userInitiated,viewTransition:l,intercept(u){i.intercept({handler:u.handler,scroll:u.scroll})}};for(let u of t)u(c)};return{getCurrentURL(){return new URL(e.currentEntry.url)},navigate(i,l){if(l?.viewTransition)n=!0;e.navigate(i,{history:l?.replace?"replace":"push",state:l?.state})},back(){e.back()},forward(){e.forward()},addEventListener(i,l){let c=t.size===0;if(t.add(l),c)e.addEventListener("navigate",a)},removeEventListener(i,l){if(t.delete(l),t.size===0)e.removeEventListener("navigate",a)},getState(){return e.currentEntry?.getState?.()}}}function UD(e){return!("issues"in e["~standard"].validate(void 0))}function lE(e,t,n){let a=e["~standard"].validate(t);if("issues"in a)throw Error(`${n}${a.issues.map((i)=>i.message).join(", ")}`);return a.value}function VD(e){let t=e.startsWith("?"),n=t?e.slice(1):e,a=n.endsWith("[]"),i=a?n.slice(0,-2):n,l=wY[i];if(!l)throw Error(`[buzola] Unknown param type: ${i}`);let c;if(a)c=(u)=>{if(t&&(u===void 0||Array.isArray(u)&&u.length===0))return{value:void 0};if(!Array.isArray(u))return{issues:[{message:`expected ${i}[]`}]};let f=[];for(let h of u){let m=l(h);if("issues"in m)return m;f.push(m.value)}return{value:f}};else if(t)c=(u)=>u===void 0||u===""?{value:void 0}:l(u);else c=l;return{schema:{"~standard":{version:1,vendor:"buzola",validate:c}},optional:t,array:a}}var CY,wY;var lv=N(()=>{CY=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,wY={string:(e)=>typeof e==="string"?{value:e}:{issues:[{message:"expected string"}]},number:(e)=>{let t=Number(e);return Number.isNaN(t)?{issues:[{message:"expected number"}]}:{value:t}},uuid:(e)=>typeof e==="string"&&CY.test(e)?{value:e}:{issues:[{message:"expected UUID"}]}}});var ae=Ui(function(EY,cv){(function(){function e(M,Z){Object.defineProperty(a.prototype,M,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Z[0],Z[1])}})}function t(M){if(M===null||typeof M!=="object")return null;return M=xt&&M[xt]||M["@@iterator"],typeof M==="function"?M:null}function n(M,Z){M=(M=M.constructor)&&(M.displayName||M.name)||"ReactClass";var be=M+"."+Z;me[be]||(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.",Z,M),me[be]=!0)}function a(M,Z,be){this.props=M,this.context=Z,this.refs=kn,this.updater=be||cn}function i(){}function l(M,Z,be){this.props=M,this.context=Z,this.refs=kn,this.updater=be||cn}function c(){}function u(M){return""+M}function f(M){try{u(M);var Z=!1}catch(_e){Z=!0}if(Z){Z=console;var be=Z.error,Ee=typeof Symbol==="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return be.call(Z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Ee),u(M)}}function h(M){if(M==null)return null;if(typeof M==="function")return M.$$typeof===Zr?null:M.displayName||M.name||null;if(typeof M==="string")return M;switch(M){case re:return"Fragment";case X:return"Profiler";case k:return"StrictMode";case Ke:return"Suspense";case Ce:return"SuspenseList";case Ne:return"Activity"}if(typeof M==="object")switch(typeof M.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case pe:return"Portal";case xe:return M.displayName||"Context";case de:return(M._context.displayName||"Context")+".Consumer";case Re:var Z=M.render;return M=M.displayName,M||(M=Z.displayName||Z.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case Je:return Z=M.displayName||null,Z!==null?Z:h(M.type)||"Memo";case he:Z=M._payload,M=M._init;try{return h(M(Z))}catch(be){}}return null}function m(M){if(M===re)return"<>";if(typeof M==="object"&&M!==null&&M.$$typeof===he)return"<...>";try{var Z=h(M);return Z?"<"+Z+">":"<...>"}catch(be){return"<...>"}}function b(){var M=it.A;return M===null?null:M.getOwner()}function y(){return Error("react-stack-top-frame")}function v(M){if(qd.call(M,"key")){var Z=Object.getOwnPropertyDescriptor(M,"key").get;if(Z&&Z.isReactWarning)return!1}return M.key!==void 0}function S(M,Z){function be(){jb||(jb=!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)",Z))}be.isReactWarning=!0,Object.defineProperty(M,"key",{get:be,configurable:!0})}function w(){var M=h(this.type);return Qc[M]||(Qc[M]=!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.")),M=this.props.ref,M!==void 0?M:null}function E(M,Z,be,Ee,_e,et){var tt=be.ref;return M={$$typeof:Q,type:M,key:Z,props:be,_owner:Ee},(tt!==void 0?tt:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:w}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_e}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:et}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function T(M,Z){return Z=E(M.type,Z,M.props,M._owner,M._debugStack,M._debugTask),M._store&&(Z._store.validated=M._store.validated),Z}function D(M){H(M)?M._store&&(M._store.validated=1):typeof M==="object"&&M!==null&&M.$$typeof===he&&(M._payload.status==="fulfilled"?H(M._payload.value)&&M._payload.value._store&&(M._payload.value._store.validated=1):M._store&&(M._store.validated=1))}function H(M){return typeof M==="object"&&M!==null&&M.$$typeof===Q}function z(M){var Z={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(be){return Z[be]})}function L(M,Z){return typeof M==="object"&&M!==null&&M.key!=null?(f(M.key),z(""+M.key)):Z.toString(36)}function J(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status==="string"?M.then(c,c):(M.status="pending",M.then(function(Z){M.status==="pending"&&(M.status="fulfilled",M.value=Z)},function(Z){M.status==="pending"&&(M.status="rejected",M.reason=Z)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function V(M,Z,be,Ee,_e){var et=typeof M;if(et==="undefined"||et==="boolean")M=null;var tt=!1;if(M===null)tt=!0;else switch(et){case"bigint":case"string":case"number":tt=!0;break;case"object":switch(M.$$typeof){case Q:case pe:tt=!0;break;case he:return tt=M._init,V(tt(M._payload),Z,be,Ee,_e)}}if(tt){tt=M,_e=_e(tt);var Mt=Ee===""?"."+L(tt,0):Ee;return Ie(_e)?(be="",Mt!=null&&(be=Mt.replace(Wd,"$&/")+"/"),V(_e,Z,be,"",function(wr){return wr})):_e!=null&&(H(_e)&&(_e.key!=null&&(tt&&tt.key===_e.key||f(_e.key)),be=T(_e,be+(_e.key==null||tt&&tt.key===_e.key?"":(""+_e.key).replace(Wd,"$&/")+"/")+Mt),Ee!==""&&tt!=null&&H(tt)&&tt.key==null&&tt._store&&!tt._store.validated&&(be._store.validated=2),_e=be),Z.push(_e)),1}if(tt=0,Mt=Ee===""?".":Ee+":",Ie(M))for(var Ve=0;Ve<M.length;Ve++)Ee=M[Ve],et=Mt+L(Ee,Ve),tt+=V(Ee,Z,be,et,_e);else if(Ve=t(M),typeof Ve==="function")for(Ve===M.entries&&(Gd||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Gd=!0),M=Ve.call(M),Ve=0;!(Ee=M.next()).done;)Ee=Ee.value,et=Mt+L(Ee,Ve++),tt+=V(Ee,Z,be,et,_e);else if(et==="object"){if(typeof M.then==="function")return V(J(M),Z,be,Ee,_e);throw Z=String(M),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return tt}function P(M,Z,be){if(M==null)return M;var Ee=[],_e=0;return V(M,Ee,"","",function(et){return Z.call(be,et,_e++)}),Ee}function te(M){if(M._status===-1){var Z=M._ioInfo;Z!=null&&(Z.start=Z.end=performance.now()),Z=M._result;var be=Z();if(be.then(function(_e){if(M._status===0||M._status===-1){M._status=1,M._result=_e;var et=M._ioInfo;et!=null&&(et.end=performance.now()),be.status===void 0&&(be.status="fulfilled",be.value=_e)}},function(_e){if(M._status===0||M._status===-1){M._status=2,M._result=_e;var et=M._ioInfo;et!=null&&(et.end=performance.now()),be.status===void 0&&(be.status="rejected",be.reason=_e)}}),Z=M._ioInfo,Z!=null){Z.value=be;var Ee=be.displayName;typeof Ee==="string"&&(Z.name=Ee)}M._status===-1&&(M._status=0,M._result=be)}if(M._status===1)return Z=M._result,Z===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?`,Z),"default"in Z||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'))`,Z),Z.default;throw M._result}function Y(){var M=it.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:
|
|
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.`),M}function ge(){it.asyncTransitions--}function ue(M){if(eu===null)try{var Z=("require"+Math.random()).slice(0,7);eu=(cv&&cv[Z]).call(cv,"timers").setImmediate}catch(be){eu=function(Ee){Kb===!1&&(Kb=!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 _e=new MessageChannel;_e.port1.onmessage=Ee,_e.port2.postMessage(void 0)}}return eu(M)}function ie(M){return 1<M.length&&typeof AggregateError==="function"?AggregateError(M):M[0]}function _(M,Z){Z!==tu-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. "),tu=Z}function U(M,Z,be){var Ee=it.actQueue;if(Ee!==null)if(Ee.length!==0)try{W(Ee),ue(function(){return U(M,Z,be)});return}catch(_e){it.thrownErrors.push(_e)}else it.actQueue=null;0<it.thrownErrors.length?(Ee=ie(it.thrownErrors),it.thrownErrors.length=0,be(Ee)):Z(M)}function W(M){if(!ru){ru=!0;var Z=0;try{for(;Z<M.length;Z++){var be=M[Z];do{it.didUsePromise=!1;var Ee=be(!1);if(Ee!==null){if(it.didUsePromise){M[Z]=be,M.splice(0,Z);return}be=Ee}else break}while(1)}M.length=0}catch(_e){M.splice(0,Z+1),it.thrownErrors.push(_e)}finally{ru=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Q=Symbol.for("react.transitional.element"),pe=Symbol.for("react.portal"),re=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),de=Symbol.for("react.consumer"),xe=Symbol.for("react.context"),Re=Symbol.for("react.forward_ref"),Ke=Symbol.for("react.suspense"),Ce=Symbol.for("react.suspense_list"),Je=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),Ne=Symbol.for("react.activity"),xt=Symbol.iterator,me={},cn={isMounted:function(){return!1},enqueueForceUpdate:function(M){n(M,"forceUpdate")},enqueueReplaceState:function(M){n(M,"replaceState")},enqueueSetState:function(M){n(M,"setState")}},Pn=Object.assign,kn={};Object.freeze(kn),a.prototype.isReactComponent={},a.prototype.setState=function(M,Z){if(typeof M!=="object"&&typeof M!=="function"&&M!=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,M,Z,"setState")},a.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};var nn={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($l in nn)nn.hasOwnProperty($l)&&e($l,nn[$l]);i.prototype=a.prototype,nn=l.prototype=new i,nn.constructor=l,Pn(nn,a.prototype),nn.isPureReactComponent=!0;var Ie=Array.isArray,Zr=Symbol.for("react.client.reference"),it={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},qd=Object.prototype.hasOwnProperty,qt=console.createTask?console.createTask:function(){return null};nn={react_stack_bottom_frame:function(M){return M()}};var jb,pi,Qc={},Zc=nn.react_stack_bottom_frame.bind(nn,y)(),xS=qt(m(y)),Gd=!1,Wd=/\/+/g,xl=typeof reportError==="function"?reportError:function(M){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M==="object"&&M!==null&&typeof M.message==="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(Z))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",M);return}console.error(M)},Kb=!1,eu=null,tu=0,nu=!1,ru=!1,bh=typeof queueMicrotask==="function"?function(M){queueMicrotask(function(){return queueMicrotask(M)})}:ue;nn=Object.freeze({__proto__:null,c:function(M){return Y().useMemoCache(M)}});var $l={map:P,forEach:function(M,Z,be){P(M,function(){Z.apply(this,arguments)},be)},count:function(M){var Z=0;return P(M,function(){Z++}),Z},toArray:function(M){return P(M,function(Z){return Z})||[]},only:function(M){if(!H(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};EY.Activity=Ne,EY.Children=$l,EY.Component=a,EY.Fragment=re,EY.Profiler=X,EY.PureComponent=l,EY.StrictMode=k,EY.Suspense=Ke,EY.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=it,EY.__COMPILER_RUNTIME=nn,EY.act=function(M){var Z=it.actQueue,be=tu;tu++;var Ee=it.actQueue=Z!==null?Z:[],_e=!1;try{var et=M()}catch(Ve){it.thrownErrors.push(Ve)}if(0<it.thrownErrors.length)throw _(Z,be),M=ie(it.thrownErrors),it.thrownErrors.length=0,M;if(et!==null&&typeof et==="object"&&typeof et.then==="function"){var tt=et;return bh(function(){_e||nu||(nu=!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(Ve,wr){_e=!0,tt.then(function(xo){if(_(Z,be),be===0){try{W(Ee),ue(function(){return U(xo,Ve,wr)})}catch(yh){it.thrownErrors.push(yh)}if(0<it.thrownErrors.length){var Sl=ie(it.thrownErrors);it.thrownErrors.length=0,wr(Sl)}}else Ve(xo)},function(xo){_(Z,be),0<it.thrownErrors.length?(xo=ie(it.thrownErrors),it.thrownErrors.length=0,wr(xo)):wr(xo)})}}}var Mt=et;if(_(Z,be),be===0&&(W(Ee),Ee.length!==0&&bh(function(){_e||nu||(nu=!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(() => ...)"))}),it.actQueue=null),0<it.thrownErrors.length)throw M=ie(it.thrownErrors),it.thrownErrors.length=0,M;return{then:function(Ve,wr){_e=!0,be===0?(it.actQueue=Ee,ue(function(){return U(Mt,Ve,wr)})):Ve(Mt)}}},EY.cache=function(M){return function(){return M.apply(null,arguments)}},EY.cacheSignal=function(){return null},EY.captureOwnerStack=function(){var M=it.getCurrentStack;return M===null?null:M()},EY.cloneElement=function(M,Z,be){if(M===null||M===void 0)throw Error("The argument must be a React element, but you passed "+M+".");var Ee=Pn({},M.props),_e=M.key,et=M._owner;if(Z!=null){var tt;e:{if(qd.call(Z,"ref")&&(tt=Object.getOwnPropertyDescriptor(Z,"ref").get)&&tt.isReactWarning){tt=!1;break e}tt=Z.ref!==void 0}tt&&(et=b()),v(Z)&&(f(Z.key),_e=""+Z.key);for(Mt in Z)!qd.call(Z,Mt)||Mt==="key"||Mt==="__self"||Mt==="__source"||Mt==="ref"&&Z.ref===void 0||(Ee[Mt]=Z[Mt])}var Mt=arguments.length-2;if(Mt===1)Ee.children=be;else if(1<Mt){tt=Array(Mt);for(var Ve=0;Ve<Mt;Ve++)tt[Ve]=arguments[Ve+2];Ee.children=tt}Ee=E(M.type,_e,Ee,et,M._debugStack,M._debugTask);for(_e=2;_e<arguments.length;_e++)D(arguments[_e]);return Ee},EY.createContext=function(M){return M={$$typeof:xe,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:de,_context:M},M._currentRenderer=null,M._currentRenderer2=null,M},EY.createElement=function(M,Z,be){for(var Ee=2;Ee<arguments.length;Ee++)D(arguments[Ee]);Ee={};var _e=null;if(Z!=null)for(Ve in pi||!("__self"in Z)||"key"in Z||(pi=!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")),v(Z)&&(f(Z.key),_e=""+Z.key),Z)qd.call(Z,Ve)&&Ve!=="key"&&Ve!=="__self"&&Ve!=="__source"&&(Ee[Ve]=Z[Ve]);var et=arguments.length-2;if(et===1)Ee.children=be;else if(1<et){for(var tt=Array(et),Mt=0;Mt<et;Mt++)tt[Mt]=arguments[Mt+2];Object.freeze&&Object.freeze(tt),Ee.children=tt}if(M&&M.defaultProps)for(Ve in et=M.defaultProps,et)Ee[Ve]===void 0&&(Ee[Ve]=et[Ve]);_e&&S(Ee,typeof M==="function"?M.displayName||M.name||"Unknown":M);var Ve=1e4>it.recentlyCreatedOwnerStacks++;return E(M,_e,Ee,b(),Ve?Error("react-stack-top-frame"):Zc,Ve?qt(m(M)):xS)},EY.createRef=function(){var M={current:null};return Object.seal(M),M},EY.forwardRef=function(M){M!=null&&M.$$typeof===Je?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof M!=="function"?console.error("forwardRef requires a render function but was given %s.",M===null?"null":typeof M):M.length!==0&&M.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",M.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),M!=null&&M.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var Z={$$typeof:Re,render:M},be;return Object.defineProperty(Z,"displayName",{enumerable:!1,configurable:!0,get:function(){return be},set:function(Ee){be=Ee,M.name||M.displayName||(Object.defineProperty(M,"name",{value:Ee}),M.displayName=Ee)}}),Z},EY.isValidElement=H,EY.lazy=function(M){M={_status:-1,_result:M};var Z={$$typeof:he,_payload:M,_init:te},be={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return M._ioInfo=be,Z._debugInfo=[{awaited:be}],Z},EY.memo=function(M,Z){M==null&&console.error("memo: The first argument must be a component. Instead received: %s",M===null?"null":typeof M),Z={$$typeof:Je,type:M,compare:Z===void 0?null:Z};var be;return Object.defineProperty(Z,"displayName",{enumerable:!1,configurable:!0,get:function(){return be},set:function(Ee){be=Ee,M.name||M.displayName||(Object.defineProperty(M,"name",{value:Ee}),M.displayName=Ee)}}),Z},EY.startTransition=function(M){var Z=it.T,be={};be._updatedFibers=new Set,it.T=be;try{var Ee=M(),_e=it.S;_e!==null&&_e(be,Ee),typeof Ee==="object"&&Ee!==null&&typeof Ee.then==="function"&&(it.asyncTransitions++,Ee.then(ge,ge),Ee.then(c,xl))}catch(et){xl(et)}finally{Z===null&&be._updatedFibers&&(M=be._updatedFibers.size,be._updatedFibers.clear(),10<M&&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.")),Z!==null&&be.types!==null&&(Z.types!==null&&Z.types!==be.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."),Z.types=be.types),it.T=Z}},EY.unstable_useCacheRefresh=function(){return Y().useCacheRefresh()},EY.use=function(M){return Y().use(M)},EY.useActionState=function(M,Z,be){return Y().useActionState(M,Z,be)},EY.useCallback=function(M,Z){return Y().useCallback(M,Z)},EY.useContext=function(M){var Z=Y();return M.$$typeof===de&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),Z.useContext(M)},EY.useDebugValue=function(M,Z){return Y().useDebugValue(M,Z)},EY.useDeferredValue=function(M,Z){return Y().useDeferredValue(M,Z)},EY.useEffect=function(M,Z){return M==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Y().useEffect(M,Z)},EY.useEffectEvent=function(M){return Y().useEffectEvent(M)},EY.useId=function(){return Y().useId()},EY.useImperativeHandle=function(M,Z,be){return Y().useImperativeHandle(M,Z,be)},EY.useInsertionEffect=function(M,Z){return M==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Y().useInsertionEffect(M,Z)},EY.useLayoutEffect=function(M,Z){return M==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Y().useLayoutEffect(M,Z)},EY.useMemo=function(M,Z){return Y().useMemo(M,Z)},EY.useOptimistic=function(M,Z){return Y().useOptimistic(M,Z)},EY.useReducer=function(M,Z,be){return Y().useReducer(M,Z,be)},EY.useRef=function(M){return Y().useRef(M)},EY.useState=function(M){return Y().useState(M)},EY.useSyncExternalStore=function(M,Z,be){return Y().useSyncExternalStore(M,Z,be)},EY.useTransition=function(){return Y().useTransition()},EY.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var so=Ui(function(TY){var Uu=K(ae());(function(){function e(k){if(k==null)return null;if(typeof k==="function")return k.$$typeof===Y?null:k.displayName||k.name||null;if(typeof k==="string")return k;switch(k){case w:return"Fragment";case T:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case J:return"SuspenseList";case te:return"Activity"}if(typeof k==="object")switch(typeof k.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case S:return"Portal";case H:return k.displayName||"Context";case D:return(k._context.displayName||"Context")+".Consumer";case z:var X=k.render;return k=k.displayName,k||(k=X.displayName||X.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case V:return X=k.displayName||null,X!==null?X:e(k.type)||"Memo";case P:X=k._payload,k=k._init;try{return e(k(X))}catch(de){}}return null}function t(k){return""+k}function n(k){try{t(k);var X=!1}catch(Re){X=!0}if(X){X=console;var de=X.error,xe=typeof Symbol==="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return de.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",xe),t(k)}}function a(k){if(k===w)return"<>";if(typeof k==="object"&&k!==null&&k.$$typeof===P)return"<...>";try{var X=e(k);return X?"<"+X+">":"<...>"}catch(de){return"<...>"}}function i(){var k=ge.A;return k===null?null:k.getOwner()}function l(){return Error("react-stack-top-frame")}function c(k){if(ue.call(k,"key")){var X=Object.getOwnPropertyDescriptor(k,"key").get;if(X&&X.isReactWarning)return!1}return k.key!==void 0}function u(k,X){function de(){U||(U=!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)",X))}de.isReactWarning=!0,Object.defineProperty(k,"key",{get:de,configurable:!0})}function f(){var k=e(this.type);return W[k]||(W[k]=!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.")),k=this.props.ref,k!==void 0?k:null}function h(k,X,de,xe,Re,Ke){var Ce=de.ref;return k={$$typeof:v,type:k,key:X,props:de,_owner:xe},(Ce!==void 0?Ce:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:f}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Re}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ke}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function m(k,X,de,xe,Re,Ke){var Ce=X.children;if(Ce!==void 0)if(xe)if(ie(Ce)){for(xe=0;xe<Ce.length;xe++)b(Ce[xe]);Object.freeze&&Object.freeze(Ce)}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 b(Ce);if(ue.call(X,"key")){Ce=e(k);var Je=Object.keys(X).filter(function(Ne){return Ne!=="key"});xe=0<Je.length?"{key: someKey, "+Je.join(": ..., ")+": ...}":"{key: someKey}",re[Ce+xe]||(Je=0<Je.length?"{"+Je.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} />`,xe,Ce,Je,Ce),re[Ce+xe]=!0)}if(Ce=null,de!==void 0&&(n(de),Ce=""+de),c(X)&&(n(X.key),Ce=""+X.key),"key"in X){de={};for(var he in X)he!=="key"&&(de[he]=X[he])}else de=X;return Ce&&u(de,typeof k==="function"?k.displayName||k.name||"Unknown":k),h(k,Ce,de,i(),Re,Ke)}function b(k){y(k)?k._store&&(k._store.validated=1):typeof k==="object"&&k!==null&&k.$$typeof===P&&(k._payload.status==="fulfilled"?y(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function y(k){return typeof k==="object"&&k!==null&&k.$$typeof===v}var v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),H=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),Y=Symbol.for("react.client.reference"),ge=Uu.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=Object.prototype.hasOwnProperty,ie=Array.isArray,_=console.createTask?console.createTask:function(){return null};Uu={react_stack_bottom_frame:function(k){return k()}};var U,W={},Q=Uu.react_stack_bottom_frame.bind(Uu,l)(),pe=_(a(l)),re={};TY.Fragment=w,TY.jsx=function(k,X,de){var xe=1e4>ge.recentlyCreatedOwnerStacks++;return m(k,X,de,!1,xe?Error("react-stack-top-frame"):Q,xe?_(a(k)):pe)},TY.jsxs=function(k,X,de){var xe=1e4>ge.recentlyCreatedOwnerStacks++;return m(k,X,de,!0,xe?Error("react-stack-top-frame"):Q,xe?_(a(k)):pe)}})()});class cE{activeUrlHref=null;activeCacheKey=null;activePromise=null;activeResolvedData;hasResolved=!1;pendingBackgroundKey=null;id;constructor(){this.id=RY++}resolve(e){let{currentUrlHref:t,cacheKey:n,load:a,loaderCache:i,onBackgroundSettled:l}=e;if(this.handleUrlChange(t,i),this.activeCacheKey===n){if(this.pendingBackgroundKey===n)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 u=a();return this.activeCacheKey=n,this.activePromise=u,this.pendingBackgroundKey=n,u.then((f)=>{if(this.activeCacheKey===n)l({ok:!0,result:f})},()=>{if(this.activeCacheKey===n)l({ok:!1})}),{action:"render",data:this.activeResolvedData,isLoading:!0}}let c=a();return this.activeCacheKey=n,this.activePromise=c,{action:"suspend",promise:c}}commitResult(e){this.activeResolvedData=e,this.hasResolved=!0}commitBackgroundResult(e){this.activeResolvedData=e,this.pendingBackgroundKey=null}commitBackgroundError(){this.hasResolved=!1,this.pendingBackgroundKey=null}dispose(e){if(e&&this.hasResolved&&this.activeResolvedData!==void 0&&this.activeUrlHref)this.saveToStaleCache(e,this.activeUrlHref,this.activeResolvedData);this.activeUrlHref=null,this.activeCacheKey=null,this.activePromise=null,this.activeResolvedData=void 0,this.hasResolved=!1,this.pendingBackgroundKey=null}handleUrlChange(e,t){if(this.activeUrlHref!==null&&this.activeUrlHref!==e){if(t&&this.hasResolved&&this.activeResolvedData!==void 0)this.saveToStaleCache(t,this.activeUrlHref,this.activeResolvedData);let n=t&&this.restoreFromStaleCache(t,e);if(n?.hit)this.activeResolvedData=n.value,this.hasResolved=!0;else this.hasResolved=!1,this.activeResolvedData=void 0;this.pendingBackgroundKey=null}else if(this.activeUrlHref===null&&t){let n=this.restoreFromStaleCache(t,e);if(n.hit)this.activeResolvedData=n.value,this.hasResolved=!0}this.activeUrlHref=e}staleCacheKey(e){return`${this.id}:${e}`}restoreFromStaleCache(e,t){let n=this.staleCacheKey(t);if(!e.has(n))return{hit:!1};let a=e.get(n);return e.delete(n),{hit:!0,value:a}}saveToStaleCache(e,t,n){e.set(this.staleCacheKey(t),n)}}var RY=0;var uE,uc,da;var Qf=N(()=>{uE=K(ae(),1),uc=uE.createContext(null),da=uE.createContext(null)});var uv,Vu;var dv=N(()=>{uv=K(ae(),1);Vu=class Vu extends uv.Component{state={error:null,prevResetKey:void 0};static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){if(t.error&&e.resetKey!==t.prevResetKey)return{error:null,prevResetKey:e.resetKey};if(e.resetKey!==t.prevResetKey)return{prevResetKey:e.resetKey};return null}componentDidCatch(e,t){console.error("Buzola route error:",e,t)}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 uv.default.createElement("div",{style:{color:"red"}},`Route error: ${this.state.error.message}`)}return this.props.children}}});function kY(e){return"~standard"in e}function AY(e){if(kY(e))return{schema:e,paramsMeta:e.__buzolaKeys??[]};let t=e,n=[],a={};for(let[l,c]of Object.entries(t))if(typeof c==="string"){let u=VD(c);a[l]=u.schema,n.push({name:l,optional:u.optional,array:u.array})}else a[l]=c,n.push({name:l,optional:UD(c),array:!1});return{schema:{"~standard":{version:1,vendor:"buzola",validate:(l)=>{let c=l??{},u={};for(let[f,h]of Object.entries(a)){let m=h["~standard"].validate(c[f]);if("issues"in m)return m;u[f]=m.value}return{value:u}}}},paramsMeta:n}}class Zf{pageId;params;__buzolaRedirect=!0;constructor(e,t){this.pageId=e,this.params=t}}function Jm(e){if(e.length===0)return;if(e.length===1)return e[0];return async(t)=>{let n=await Promise.all(e.map((i)=>i(t))),a=n.find((i)=>i instanceof Zf);if(a)return a;return Object.assign({},...n)}}function Xm(e,t,n,a,i,l){let c=new Set(t.filter((b)=>b.array).map((b)=>b.name)),u=n?new cE:void 0;function f(){let b=rr.use(da);if(!b)throw Error("createPage component must be used within a <BuzolaProvider>");let y=rr.use(uc),v=rr.useMemo(()=>{let{state:L,matches:J,params:V}=b,P=J.find((ge)=>ge.node.component===f),te=new Set(P?Ym(P.node.fullPath):[]),Y={};if(c.size>0)for(let ge of c){if(te.has(ge))continue;let ue=[...L.location.searchParams.getAll(ge),...L.location.searchParams.getAll(`${ge}[]`)];if(ue.length>0)Y[ge]=ue}L.location.searchParams.forEach((ge,ue)=>{let ie=ue.endsWith("[]")?ue.slice(0,-2):ue;if(!te.has(ie)&&!(ie in Y))Y[ie]=ge});for(let[ge,ue]of Object.entries(V))if(c.has(ge))Y[ge]=ue.split(",");else Y[ge]=ue;if(e)return lE(e,Y,"Page params validation failed: ");return Y},[b]),[S,w]=rr.useState(0),[,E]=rr.useReducer((L)=>L+1,0),T=rr.useCallback(()=>w((L)=>L+1),[]);rr.useEffect(()=>{if(!y)return;return y.onInvalidate(()=>w((L)=>L+1))},[y]);let D,H=!1,z=!1;if(n&&u){let L=b.state.location.href,J=`${L}:${S}`,V=u.resolve({currentUrlHref:L,cacheKey:J,load:()=>n({params:v,redirect:jD}),loaderCache:y?.loaderCache,onBackgroundSettled:(P)=>{if(P.ok){if(P.result instanceof Zf){y?.navigateToPage(P.result.pageId,P.result.params,{replace:!0});return}u.commitBackgroundResult(P.result)}else u.commitBackgroundError();E()}});if(V.action==="render")D=V.data,H=V.isLoading;else{let P=rr.use(V.promise);if(P instanceof Zf)y?.navigateToPage(P.pageId,P.params,{replace:!0}),z=!0;else D=P,u.commitResult(D)}}if(rr.useEffect(()=>()=>u?.dispose(y?.loaderCache),[]),z)return null;return fv.jsx(i,{params:v,data:D,invalidate:T,isLoading:H})}function h(){let b=rr.use(da),[y,v]=rr.useState(0),S=rr.useCallback(()=>v((T)=>T+1),[]),w=`${b?.state.location.href??""}:${y}`;return fv.jsx(Vu,{fallback:typeof l==="function"?(T)=>l({error:T,params:b?.params??{},retry:S}):l,resetKey:w,children:fv.jsx(f,{},y)})}return{__buzolaPage:!0,component:l?h:f,route:a,paramsSchema:e,paramsMeta:t,loader:n}}function MY(e,t,n,a){return{route(i){return{render(l){return Xm(e,t,Jm(n),i,l,a)}}},render(i){return Xm(e,t,Jm(n),void 0,i,a)}}}function dE(e,t,n){return{loader(a){return dE(e,t,[...n,a])},catch(a){return MY(e,t,n,a)},route(a){return{catch(i){return{render(l){return Xm(e,t,Jm(n),a,l,i)}}},render(i){return Xm(e,t,Jm(n),a,i)}}},render(a){return Xm(e,t,Jm(n),void 0,a)}}}function fr(){return{params(e){let{schema:t,paramsMeta:n}=AY(e);return dE(t,n,[])},...dE(void 0,[],[])}}var fv,rr,jD=(e,t)=>new Zf(e,t);var KD=N(()=>{lv();Qf();dv();fv=K(so(),1),rr=K(ae(),1)});function OY(){return lo.default.createElement("div",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem",maxWidth:"600px",margin:"0 auto"}},NY?[lo.default.createElement("h1",{key:"h"},"404 — Page Not Found"),lo.default.createElement("p",{key:"p1"},`No route matches "${typeof window<"u"?window.location.pathname:""}".`),lo.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 />.")]:[lo.default.createElement("h1",{key:"h"},"404"),lo.default.createElement("p",{key:"p"},"Page not found.")])}function ep({fallback:e,errorFallback:t,notFound:n}){let a=lo.use(da);if(!a)throw Error("<Outlet /> must be used within a <BuzolaProvider>");let{state:i,depth:l,matches:c}=a,u=l,f=c[u];while(f&&!f.node.component)u++,f=c[u];let h=lo.useMemo(()=>{if(!f)return null;let b={...a.params};for(let y=l;y<=u;y++)if(c[y])b={...b,...c[y].params};return{state:i,depth:u+1,matches:c,params:b}},[i,l,u,c,f,a.params]);if(!f){if(l===0&&c.length===0){if(n===null)return null;return n??lo.default.createElement(OY,null)}return null}let m=f.node.component;return Qm.jsx(Vu,{fallback:t,resetKey:f.node.id,children:Qm.jsx(lo.Suspense,{fallback:e??null,children:h&&Qm.jsx(da,{value:h,children:Qm.jsx(m,{})})})})}var Qm,lo,NY;var fE=N(()=>{Qf();dv();Qm=K(so(),1),lo=K(ae(),1),NY=typeof process<"u"&&!0});function pv({routes:e,children:t,middleware:n,...a}){let i=Bo.useRef(a.router);if(!i.current)i.current=new sv({routes:e,adapter:sE(),persistentParams:a.persistentParams,pageRegistry:a.pageRegistry});let l=i.current,c=Bo.useCallback((y)=>l.subscribe(y),[l]),u=Bo.useCallback(()=>l.getState(),[l]),f=Bo.useSyncExternalStore(c,u,u);Bo.useLayoutEffect(()=>l.start(),[l]);let h=Bo.useMemo(()=>({state:f,depth:0,matches:f.matches,params:{}}),[f]),m=Bo.useMemo(()=>{let y={};for(let v of f.matches)y={...y,...v.params};return y},[f.matches]),b=t??Zm.jsx(ep,{});return Zm.jsx(uc,{value:l,children:Zm.jsx(da,{value:h,children:n?Zm.jsx(n,{params:m,matches:f.matches,children:b}):b})})}var Zm,Bo;var qD=N(()=>{oE();Qf();fE();Zm=K(so(),1),Bo=K(ae(),1)});function eg(){let e=Vi.use(uc);if(!e)throw Error("useRouter must be used within a <BuzolaProvider>");return e}function DY(){let e=Vi.use(da);if(!e)throw Error("Route hooks must be used within a <BuzolaProvider>");return e}function kr(){let e=eg();return Vi.useCallback((t,n)=>{e.navigateToPage(t,n?.params,n)},[e])}function hv(){let e=DY(),t=eg(),{state:n,matches:a,params:i,depth:l}=e;return Vi.useMemo(()=>({params:i,matches:a,depth:l,isPending:n.isPending,pendingLocation:n.pendingLocation?t.stripBasePath(n.pendingLocation.pathname):void 0,pathname:t.stripBasePath(n.location.pathname)}),[i,a,l,n.isPending,n.pendingLocation,n.location.pathname,t])}var Vi;var pE=N(()=>{lv();Qf();Vi=K(ae(),1)});var PY,mv;var WD=N(()=>{pE();PY=K(so(),1),mv=K(ae(),1)});var YD=N(()=>{qD();fE();WD();dv();pE();Qf()});var fa=N(()=>{oE();lv();KD();YD()});var JD=Ui(function(FY){(function(){function e(){if(z=!1,P){var U=FY.unstable_now();ge=U;var W=!0;try{e:{D=!1,H&&(H=!1,J(te),te=-1),T=!0;var Q=E;try{t:{l(U);for(w=n(y);w!==null&&!(w.expirationTime>U&&u());){var pe=w.callback;if(typeof pe==="function"){w.callback=null,E=w.priorityLevel;var re=pe(w.expirationTime<=U);if(U=FY.unstable_now(),typeof re==="function"){w.callback=re,l(U),W=!0;break t}w===n(y)&&a(y),l(U)}else a(y);w=n(y)}if(w!==null)W=!0;else{var k=n(v);k!==null&&f(c,k.startTime-U),W=!1}}break e}finally{w=null,E=Q,T=!1}W=void 0}}finally{W?ue():P=!1}}}function t(U,W){var Q=U.length;U.push(W);e:for(;0<Q;){var pe=Q-1>>>1,re=U[pe];if(0<i(re,W))U[pe]=W,U[Q]=re,Q=pe;else break e}}function n(U){return U.length===0?null:U[0]}function a(U){if(U.length===0)return null;var W=U[0],Q=U.pop();if(Q!==W){U[0]=Q;e:for(var pe=0,re=U.length,k=re>>>1;pe<k;){var X=2*(pe+1)-1,de=U[X],xe=X+1,Re=U[xe];if(0>i(de,Q))xe<re&&0>i(Re,de)?(U[pe]=Re,U[xe]=Q,pe=xe):(U[pe]=de,U[X]=Q,pe=X);else if(xe<re&&0>i(Re,Q))U[pe]=Re,U[xe]=Q,pe=xe;else break e}}return W}function i(U,W){var Q=U.sortIndex-W.sortIndex;return Q!==0?Q:U.id-W.id}function l(U){for(var W=n(v);W!==null;){if(W.callback===null)a(v);else if(W.startTime<=U)a(v),W.sortIndex=W.expirationTime,t(y,W);else break;W=n(v)}}function c(U){if(H=!1,l(U),!D)if(n(y)!==null)D=!0,P||(P=!0,ue());else{var W=n(v);W!==null&&f(c,W.startTime-U)}}function u(){return z?!0:FY.unstable_now()-ge<Y?!1:!0}function f(U,W){te=L(function(){U(FY.unstable_now())},W)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),FY.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var h=performance;FY.unstable_now=function(){return h.now()}}else{var m=Date,b=m.now();FY.unstable_now=function(){return m.now()-b}}var y=[],v=[],S=1,w=null,E=3,T=!1,D=!1,H=!1,z=!1,L=typeof setTimeout==="function"?setTimeout:null,J=typeof clearTimeout==="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null,P=!1,te=-1,Y=5,ge=-1;if(typeof V==="function")var ue=function(){V(e)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,_=ie.port2;ie.port1.onmessage=e,ue=function(){_.postMessage(null)}}else ue=function(){L(e,0)};FY.unstable_IdlePriority=5,FY.unstable_ImmediatePriority=1,FY.unstable_LowPriority=4,FY.unstable_NormalPriority=3,FY.unstable_Profiling=null,FY.unstable_UserBlockingPriority=2,FY.unstable_cancelCallback=function(U){U.callback=null},FY.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<U?Math.floor(1000/U):5},FY.unstable_getCurrentPriorityLevel=function(){return E},FY.unstable_next=function(U){switch(E){case 1:case 2:case 3:var W=3;break;default:W=E}var Q=E;E=W;try{return U()}finally{E=Q}},FY.unstable_requestPaint=function(){z=!0},FY.unstable_runWithPriority=function(U,W){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var Q=E;E=U;try{return W()}finally{E=Q}},FY.unstable_scheduleCallback=function(U,W,Q){var pe=FY.unstable_now();switch(typeof Q==="object"&&Q!==null?(Q=Q.delay,Q=typeof Q==="number"&&0<Q?pe+Q:pe):Q=pe,U){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5000}return re=Q+re,U={id:S++,callback:W,priorityLevel:U,startTime:Q,expirationTime:re,sortIndex:-1},Q>pe?(U.sortIndex=Q,t(v,U),n(y)===null&&U===n(v)&&(H?(J(te),te=-1):H=!0,f(c,Q-pe))):(U.sortIndex=re,t(y,U),D||T||(D=!0,P||(P=!0,ue()))),U},FY.unstable_shouldYield=u,FY.unstable_wrapCallback=function(U){var W=E;return function(){var Q=E;E=W;try{return U.apply(this,arguments)}finally{E=Q}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var XD=Ui(function(UY){var hE=K(ae());(function(){function e(){}function t(m){return""+m}function n(m,b,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(v);var S=!1}catch(w){S=!0}return S&&(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&&v[Symbol.toStringTag]||v.constructor.name||"Object"),t(v)),{$$typeof:f,key:v==null?null:""+v,children:m,containerInfo:b,implementation:y}}function a(m,b){if(m==="font")return"";if(typeof b==="string")return b==="use-credentials"?b:""}function i(m){return m===null?"`null`":m===void 0?"`undefined`":m===""?"an empty string":'something with type "'+typeof m+'"'}function l(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 c(){var m=h.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 u={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},f=Symbol.for("react.portal"),h=hE.__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"),UY.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,UY.createPortal=function(m,b){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error("Target container is not a DOM element.");return n(m,b,null,y)},UY.flushSync=function(m){var b=h.T,y=u.p;try{if(h.T=null,u.p=2,m)return m()}finally{h.T=b,u.p=y,u.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.")}},UY.preconnect=function(m,b){typeof m==="string"&&m?b!=null&&typeof b!=="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.",l(b)):b!=null&&typeof b.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.",i(b.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(m)),typeof m==="string"&&(b?(b=b.crossOrigin,b=typeof b==="string"?b==="use-credentials"?b:"":void 0):b=null,u.d.C(m,b))},UY.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.",i(m));else if(1<arguments.length){var b=arguments[1];typeof b==="object"&&b.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`.",l(b)):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`.",l(b))}typeof m==="string"&&u.d.D(m)},UY.preinit=function(m,b){if(typeof m==="string"&&m?b==null||typeof b!=="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.",l(b)):b.as!=="style"&&b.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".',l(b.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(m)),typeof m==="string"&&b&&typeof b.as==="string"){var y=b.as,v=a(y,b.crossOrigin),S=typeof b.integrity==="string"?b.integrity:void 0,w=typeof b.fetchPriority==="string"?b.fetchPriority:void 0;y==="style"?u.d.S(m,typeof b.precedence==="string"?b.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:w}):y==="script"&&u.d.X(m,{crossOrigin:v,integrity:S,fetchPriority:w,nonce:typeof b.nonce==="string"?b.nonce:void 0})}},UY.preinitModule=function(m,b){var y="";if(typeof m==="string"&&m||(y+=" The `href` argument encountered was "+i(m)+"."),b!==void 0&&typeof b!=="object"?y+=" The `options` argument encountered was "+i(b)+".":b&&("as"in b)&&b.as!=="script"&&(y+=" The `as` option encountered was "+l(b.as)+"."),y)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",y);else switch(y=b&&typeof b.as==="string"?b.as:"script",y){case"script":break;default:y=l(y),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)',y,m)}if(typeof m==="string")if(typeof b==="object"&&b!==null){if(b.as==null||b.as==="script")y=a(b.as,b.crossOrigin),u.d.M(m,{crossOrigin:y,integrity:typeof b.integrity==="string"?b.integrity:void 0,nonce:typeof b.nonce==="string"?b.nonce:void 0})}else b==null&&u.d.M(m)},UY.preload=function(m,b){var y="";if(typeof m==="string"&&m||(y+=" The `href` argument encountered was "+i(m)+"."),b==null||typeof b!=="object"?y+=" The `options` argument encountered was "+i(b)+".":typeof b.as==="string"&&b.as||(y+=" The `as` option encountered was "+i(b.as)+"."),y&&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',y),typeof m==="string"&&typeof b==="object"&&b!==null&&typeof b.as==="string"){y=b.as;var v=a(y,b.crossOrigin);u.d.L(m,y,{crossOrigin:v,integrity:typeof b.integrity==="string"?b.integrity:void 0,nonce:typeof b.nonce==="string"?b.nonce:void 0,type:typeof b.type==="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority==="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy==="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet==="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes==="string"?b.imageSizes:void 0,media:typeof b.media==="string"?b.media:void 0})}},UY.preloadModule=function(m,b){var y="";typeof m==="string"&&m||(y+=" The `href` argument encountered was "+i(m)+"."),b!==void 0&&typeof b!=="object"?y+=" The `options` argument encountered was "+i(b)+".":b&&("as"in b)&&typeof b.as!=="string"&&(y+=" The `as` option encountered was "+i(b.as)+"."),y&&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',y),typeof m==="string"&&(b?(y=a(b.as,b.crossOrigin),u.d.m(m,{as:typeof b.as==="string"&&b.as!=="script"?b.as:void 0,crossOrigin:y,integrity:typeof b.integrity==="string"?b.integrity:void 0})):u.d.m(m))},UY.requestFormReset=function(m){u.d.r(m)},UY.unstable_batchedUpdates=function(m,b){return m(b)},UY.useFormState=function(m,b,y){return c().useFormState(m,b,y)},UY.useFormStatus=function(){return c().useHostTransitionStatus()},UY.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var jr=Ui(function(tde,QD){var VY=K(XD());QD.exports=VY});var ZD=Ui(function(jY){var Nt=K(JD()),tp=K(ae()),mE=K(jr());(function(){function e(r,o){for(r=r.memoizedState;r!==null&&0<o;)r=r.next,o--;return r}function t(r,o,s,d){if(s>=o.length)return d;var p=o[s],g=Gn(r)?r.slice():pt({},r);return g[p]=t(r[p],o,s+1,d),g}function n(r,o,s){if(o.length!==s.length)console.warn("copyWithRename() expects paths of the same length");else{for(var d=0;d<s.length-1;d++)if(o[d]!==s[d]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return a(r,o,s,0)}}function a(r,o,s,d){var p=o[d],g=Gn(r)?r.slice():pt({},r);return d+1===o.length?(g[s[d]]=g[p],Gn(g)?g.splice(p,1):delete g[p]):g[p]=a(r[p],o,s,d+1),g}function i(r,o,s){var d=o[s],p=Gn(r)?r.slice():pt({},r);if(s+1===o.length)return Gn(p)?p.splice(d,1):delete p[d],p;return p[d]=i(r[d],o,s+1),p}function l(){return!1}function c(){return null}function u(){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 f(){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 h(){}function m(){}function b(r){var o=[];return r.forEach(function(s){o.push(s)}),o.sort().join(", ")}function y(r,o,s,d){return new eq(r,o,s,d)}function v(r,o){r.context===Ul&&(xC(r.current,2,o,r,null,null),lf())}function S(r,o){if(ta!==null){var s=o.staleFamilies;o=o.updatedFamilies,jh(),jA(r.current,o,s),lf()}}function w(r){ta=r}function E(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function T(r){var o=r,s=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(s=o.return),r=o.return;while(r)}return o.tag===3?s:null}function D(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function H(r){if(r.tag===31){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function z(r){if(T(r)!==r)throw Error("Unable to find node on an unmounted component.")}function L(r){var o=r.alternate;if(!o){if(o=T(r),o===null)throw Error("Unable to find node on an unmounted component.");return o!==r?null:r}for(var s=r,d=o;;){var p=s.return;if(p===null)break;var g=p.alternate;if(g===null){if(d=p.return,d!==null){s=d;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===s)return z(p),r;if(g===d)return z(p),o;g=g.sibling}throw Error("Unable to find node on an unmounted component.")}if(s.return!==d.return)s=p,d=g;else{for(var x=!1,C=p.child;C;){if(C===s){x=!0,s=p,d=g;break}if(C===d){x=!0,d=p,s=g;break}C=C.sibling}if(!x){for(C=g.child;C;){if(C===s){x=!0,s=g,d=p;break}if(C===d){x=!0,d=g,s=p;break}C=C.sibling}if(!x)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(s.alternate!==d)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(s.tag!==3)throw Error("Unable to find node on an unmounted component.");return s.stateNode.current===s?r:o}function J(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r;for(r=r.child;r!==null;){if(o=J(r),o!==null)return o;r=r.sibling}return null}function V(r){if(r===null||typeof r!=="object")return null;return r=XN&&r[XN]||r["@@iterator"],typeof r==="function"?r:null}function P(r){if(r==null)return null;if(typeof r==="function")return r.$$typeof===$G?null:r.displayName||r.name||null;if(typeof r==="string")return r;switch(r){case mf:return"Fragment";case TC:return"Profiler";case ey:return"StrictMode";case kC:return"Suspense";case AC:return"SuspenseList";case MC:return"Activity"}if(typeof r==="object")switch(typeof r.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case hf:return"Portal";case Ni:return r.displayName||"Context";case RC:return(r._context.displayName||"Context")+".Consumer";case em:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ty:return o=r.displayName||null,o!==null?o:P(r.type)||"Memo";case Ao:o=r._payload,r=r._init;try{return P(r(o))}catch(s){}}return null}function te(r){return typeof r.tag==="number"?Y(r):typeof r.name==="string"?r.name:null}function Y(r){var o=r.type;switch(r.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(o._context.displayName||"Context")+".Consumer";case 10:return o.displayName||"Context";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return P(o);case 8:return o===ey?"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 o==="function")return o.displayName||o.name||null;if(typeof o==="string")return o;break;case 29:if(o=r._debugInfo,o!=null){for(var s=o.length-1;0<=s;s--)if(typeof o[s].name==="string")return o[s].name}if(r.return!==null)return Y(r.return)}return null}function ge(r){return{current:r}}function ue(r,o){0>vs?console.error("Unexpected pop."):(o!==OC[vs]&&console.error("Unexpected Fiber popped."),r.current=NC[vs],NC[vs]=null,OC[vs]=null,vs--)}function ie(r,o,s){vs++,NC[vs]=r.current,OC[vs]=s,r.current=o}function _(r){return r===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),r}function U(r,o){ie(_l,o,r),ie(tm,r,r),ie(Ll,null,r);var s=o.nodeType;switch(s){case 9:case 11:s=s===9?"#document":"#fragment",o=(o=o.documentElement)?(o=o.namespaceURI)?$N(o):Ds:Ds;break;default:if(s=o.tagName,o=o.namespaceURI)o=$N(o),o=SN(o,s);else switch(s){case"svg":o=Yf;break;case"math":o=Zy;break;default:o=Ds}}s=s.toLowerCase(),s=mA(null,s),s={context:o,ancestorInfo:s},ue(Ll,r),ie(Ll,s,r)}function W(r){ue(Ll,r),ue(tm,r),ue(_l,r)}function Q(){return _(Ll.current)}function pe(r){r.memoizedState!==null&&ie(ny,r,r);var o=_(Ll.current),s=r.type,d=SN(o.context,s);s=mA(o.ancestorInfo,s),d={context:d,ancestorInfo:s},o!==d&&(ie(tm,r,r),ie(Ll,d,r))}function re(r){tm.current===r&&(ue(Ll,r),ue(tm,r)),ny.current===r&&(ue(ny,r),qm._currentValue=Fu)}function k(){}function X(){if(nm===0){QN=console.log,ZN=console.info,e8=console.warn,t8=console.error,n8=console.group,r8=console.groupCollapsed,o8=console.groupEnd;var r={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}nm++}function de(){if(nm--,nm===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:pt({},r,{value:QN}),info:pt({},r,{value:ZN}),warn:pt({},r,{value:e8}),error:pt({},r,{value:t8}),group:pt({},r,{value:n8}),groupCollapsed:pt({},r,{value:r8}),groupEnd:pt({},r,{value:o8})})}0>nm&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function xe(r){var o=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,r=r.stack,Error.prepareStackTrace=o,r.startsWith(`Error: react-stack-top-frame
|
|
23
|
+
`)&&(r=r.slice(29)),o=r.indexOf(`
|
|
24
|
+
`),o!==-1&&(r=r.slice(o+1)),o=r.indexOf("react_stack_bottom_frame"),o!==-1&&(o=r.lastIndexOf(`
|
|
25
|
+
`,o)),o!==-1)r=r.slice(0,o);else return"";return r}function Re(r){if(DC===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);DC=o&&o[1]||"",a8=-1<s.stack.indexOf(`
|
|
26
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
27
|
+
`+DC+r+a8}function Ke(r,o){if(!r||PC)return"";var s=LC.get(r);if(s!==void 0)return s;PC=!0,s=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var d=null;d=oe.H,oe.H=null,X();try{var p={DetermineComponentFrameRoot:function(){try{if(o){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch($e){var ee=$e}Reflect.construct(r,[],B)}else{try{B.call()}catch($e){ee=$e}r.call(B.prototype)}}else{try{throw Error()}catch($e){ee=$e}(B=r())&&typeof B.catch==="function"&&B.catch(function(){})}}catch($e){if($e&&ee&&typeof $e.stack==="string")return[$e.stack,ee.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=p.DetermineComponentFrameRoot(),C=x[0],R=x[1];if(C&&R){var A=C.split(`
|
|
28
|
+
`),q=R.split(`
|
|
29
|
+
`);for(x=g=0;g<A.length&&!A[g].includes("DetermineComponentFrameRoot");)g++;for(;x<q.length&&!q[x].includes("DetermineComponentFrameRoot");)x++;if(g===A.length||x===q.length)for(g=A.length-1,x=q.length-1;1<=g&&0<=x&&A[g]!==q[x];)x--;for(;1<=g&&0<=x;g--,x--)if(A[g]!==q[x]){if(g!==1||x!==1)do if(g--,x--,0>x||A[g]!==q[x]){var G=`
|
|
30
|
+
`+A[g].replace(" at new "," at ");return r.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",r.displayName)),typeof r==="function"&&LC.set(r,G),G}while(1<=g&&0<=x);break}}}finally{PC=!1,oe.H=d,de(),Error.prepareStackTrace=s}return A=(A=r?r.displayName||r.name:"")?Re(A):"",typeof r==="function"&&LC.set(r,A),A}function Ce(r,o){switch(r.tag){case 26:case 27:case 5:return Re(r.type);case 16:return Re("Lazy");case 13:return r.child!==o&&o!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return Ke(r.type,!1);case 11:return Ke(r.type.render,!1);case 1:return Ke(r.type,!0);case 31:return Re("Activity");default:return""}}function Je(r){try{var o="",s=null;do{o+=Ce(r,s);var d=r._debugInfo;if(d)for(var p=d.length-1;0<=p;p--){var g=d[p];if(typeof g.name==="string"){var x=o;e:{var{name:C,env:R,debugLocation:A}=g;if(A!=null){var q=xe(A),G=q.lastIndexOf(`
|
|
31
|
+
`),B=G===-1?q:q.slice(G+1);if(B.indexOf(C)!==-1){var ee=`
|
|
32
|
+
`+B;break e}}ee=Re(C+(R?" ["+R+"]":""))}o=x+ee}}s=r,r=r.return}while(r);return o}catch($e){return`
|
|
33
|
+
Error generating stack: `+$e.message+`
|
|
34
|
+
`+$e.stack}}function he(r){return(r=r?r.displayName||r.name:"")?Re(r):""}function Ne(){if(Mo===null)return null;var r=Mo._debugOwner;return r!=null?te(r):null}function xt(){if(Mo===null)return"";var r=Mo;try{var o="";switch(r.tag===6&&(r=r.return),r.tag){case 26:case 27:case 5:o+=Re(r.type);break;case 13:o+=Re("Suspense");break;case 19:o+=Re("SuspenseList");break;case 31:o+=Re("Activity");break;case 30:case 0:case 15:case 1:r._debugOwner||o!==""||(o+=he(r.type));break;case 11:r._debugOwner||o!==""||(o+=he(r.type.render))}for(;r;)if(typeof r.tag==="number"){var s=r;r=s._debugOwner;var d=s._debugStack;if(r&&d){var p=xe(d);p!==""&&(o+=`
|
|
35
|
+
`+p)}}else if(r.debugStack!=null){var g=r.debugStack;(r=r.owner)&&g&&(o+=`
|
|
36
|
+
`+xe(g))}else break;var x=o}catch(C){x=`
|
|
37
|
+
Error generating stack: `+C.message+`
|
|
38
|
+
`+C.stack}return x}function me(r,o,s,d,p,g,x){var C=Mo;cn(r);try{return r!==null&&r._debugTask?r._debugTask.run(o.bind(null,s,d,p,g,x)):o(s,d,p,g,x)}finally{cn(C)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function cn(r){oe.getCurrentStack=r===null?null:xt,Oi=!1,Mo=r}function Pn(r){return typeof Symbol==="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object"}function kn(r){try{return nn(r),!1}catch(o){return!0}}function nn(r){return""+r}function Ie(r,o){if(kn(r))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",o,Pn(r)),nn(r)}function Zr(r,o){if(kn(r))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.",o,Pn(r)),nn(r)}function it(r){if(kn(r))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.",Pn(r)),nn(r)}function qd(r){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(o.isDisabled)return!0;if(!o.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{bf=o.inject(r),Tr=o}catch(s){console.error("React instrumentation encountered an error: %o.",s)}return o.checkDCE?!0:!1}function qt(r){if(typeof kG==="function"&&AG(r),Tr&&typeof Tr.setStrictMode==="function")try{Tr.setStrictMode(bf,r)}catch(o){Di||(Di=!0,console.error("React instrumentation encountered an error: %o",o))}}function jb(r){return r>>>=0,r===0?32:31-(MG(r)/NG|0)|0}function pi(r){var o=r&42;if(o!==0)return o;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&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."),r}}function Qc(r,o,s){var d=r.pendingLanes;if(d===0)return 0;var p=0,g=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var C=d&134217727;return C!==0?(d=C&~g,d!==0?p=pi(d):(x&=C,x!==0?p=pi(x):s||(s=C&~r,s!==0&&(p=pi(s))))):(C=d&~g,C!==0?p=pi(C):x!==0?p=pi(x):s||(s=d&~r,s!==0&&(p=pi(s)))),p===0?0:o!==0&&o!==p&&(o&g)===0&&(g=p&-p,s=o&-o,g>=s||g===32&&(s&4194048)!==0)?o:p}function Zc(r,o){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&o)===0}function xS(r,o){switch(r){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Gd(){var r=ay;return ay<<=1,(ay&62914560)===0&&(ay=4194304),r}function Wd(r){for(var o=[],s=0;31>s;s++)o.push(r);return o}function xl(r,o){r.pendingLanes|=o,o!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Kb(r,o,s,d,p,g){var x=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var{entanglements:C,expirationTimes:R,hiddenUpdates:A}=r;for(s=x&~s;0<s;){var q=31-_r(s),G=1<<q;C[q]=0,R[q]=-1;var B=A[q];if(B!==null)for(A[q]=null,q=0;q<B.length;q++){var ee=B[q];ee!==null&&(ee.lane&=-536870913)}s&=~G}d!==0&&eu(r,d,0),g!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=g&~(x&~o))}function eu(r,o,s){r.pendingLanes|=o,r.suspendedLanes&=~o;var d=31-_r(o);r.entangledLanes|=o,r.entanglements[d]=r.entanglements[d]|1073741824|s&261930}function tu(r,o){var s=r.entangledLanes|=o;for(r=r.entanglements;s;){var d=31-_r(s),p=1<<d;p&o|r[d]&o&&(r[d]|=o),s&=~p}}function nu(r,o){var s=o&-o;return s=(s&42)!==0?1:ru(s),(s&(r.suspendedLanes|o))!==0?0:s}function ru(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function bh(r,o,s){if(Pi)for(r=r.pendingUpdatersLaneMap;0<s;){var d=31-_r(s),p=1<<d;r[d].add(o),s&=~p}}function $l(r,o){if(Pi)for(var{pendingUpdatersLaneMap:s,memoizedUpdaters:d}=r;0<o;){var p=31-_r(o);r=1<<p,p=s[p],0<p.size&&(p.forEach(function(g){var x=g.alternate;x!==null&&d.has(x)||d.add(g)}),p.clear()),o&=~r}}function M(r){return r&=-r,No!==0&&No<r?za!==0&&za<r?(r&134217727)!==0?Li:iy:za:No}function Z(){var r=It.p;if(r!==0)return r;return r=window.event,r===void 0?Li:jN(r.type)}function be(r,o){var s=It.p;try{return It.p=r,o()}finally{It.p=s}}function Ee(r){delete r[ur],delete r[Ir],delete r[HC],delete r[OG],delete r[DG]}function _e(r){var o=r[ur];if(o)return o;for(var s=r.parentNode;s;){if(o=s[Bl]||s[ur]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(r=MN(r);r!==null;){if(s=r[ur])return s;r=MN(r)}return o}r=s,s=r.parentNode}return null}function et(r){if(r=r[ur]||r[Bl]){var o=r.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return r}return null}function tt(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function Mt(r){var o=r[i8];return o||(o=r[i8]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Ve(r){r[rm]=!0}function wr(r,o){xo(r,o),xo(r+"Capture",o)}function xo(r,o){vu[r]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",r),vu[r]=o;var s=r.toLowerCase();FC[s]=r,r==="onDoubleClick"&&(FC.ondblclick=r);for(r=0;r<o.length;r++)s8.add(o[r])}function Sl(r,o){PG[o.type]||o.onChange||o.onInput||o.readOnly||o.disabled||o.value==null||(r==="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`.")),o.onChange||o.readOnly||o.disabled||o.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 yh(r){if(Ba.call(c8,r))return!0;if(Ba.call(l8,r))return!1;if(LG.test(r))return c8[r]=!0;return l8[r]=!0,console.error("Invalid attribute name: `%s`",r),!1}function eA(r,o,s){if(yh(o)){if(!r.hasAttribute(o)){switch(typeof s){case"symbol":case"object":return s;case"function":return s;case"boolean":if(s===!1)return s}return s===void 0?void 0:null}if(r=r.getAttribute(o),r===""&&s===!0)return!0;return Ie(s,o),r===""+s?s:r}}function qb(r,o,s){if(yh(o))if(s===null)r.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(o);return;case"boolean":var d=o.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(o);return}}Ie(s,o),r.setAttribute(o,""+s)}}function Gb(r,o,s){if(s===null)r.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}Ie(s,o),r.setAttribute(o,""+s)}}function us(r,o,s,d){if(d===null)r.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}Ie(d,s),r.setAttributeNS(o,s,""+d)}}function Jo(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return it(r),r;default:return""}}function tA(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function NK(r,o,s){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,o);if(!r.hasOwnProperty(o)&&typeof d<"u"&&typeof d.get==="function"&&typeof d.set==="function"){var{get:p,set:g}=d;return Object.defineProperty(r,o,{configurable:!0,get:function(){return p.call(this)},set:function(x){it(x),s=""+x,g.call(this,x)}}),Object.defineProperty(r,o,{enumerable:d.enumerable}),{getValue:function(){return s},setValue:function(x){it(x),s=""+x},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function $S(r){if(!r._valueTracker){var o=tA(r)?"checked":"value";r._valueTracker=NK(r,o,""+r[o])}}function nA(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var s=o.getValue(),d="";return r&&(d=tA(r)?r.checked?"true":"false":r.value),r=d,r!==s?(o.setValue(r),!0):!1}function Wb(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch(o){return r.body}}function Xo(r){return r.replace(_G,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function rA(r,o){o.checked===void 0||o.defaultChecked===void 0||d8||(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",Ne()||"A component",o.type),d8=!0),o.value===void 0||o.defaultValue===void 0||u8||(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",Ne()||"A component",o.type),u8=!0)}function SS(r,o,s,d,p,g,x,C){if(r.name="",x!=null&&typeof x!=="function"&&typeof x!=="symbol"&&typeof x!=="boolean"?(Ie(x,"type"),r.type=x):r.removeAttribute("type"),o!=null)if(x==="number"){if(o===0&&r.value===""||r.value!=o)r.value=""+Jo(o)}else r.value!==""+Jo(o)&&(r.value=""+Jo(o));else x!=="submit"&&x!=="reset"||r.removeAttribute("value");o!=null?CS(r,x,Jo(o)):s!=null?CS(r,x,Jo(s)):d!=null&&r.removeAttribute("value"),p==null&&g!=null&&(r.defaultChecked=!!g),p!=null&&(r.checked=p&&typeof p!=="function"&&typeof p!=="symbol"),C!=null&&typeof C!=="function"&&typeof C!=="symbol"&&typeof C!=="boolean"?(Ie(C,"name"),r.name=""+Jo(C)):r.removeAttribute("name")}function oA(r,o,s,d,p,g,x,C){if(g!=null&&typeof g!=="function"&&typeof g!=="symbol"&&typeof g!=="boolean"&&(Ie(g,"type"),r.type=g),o!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||o!==void 0&&o!==null)){$S(r);return}s=s!=null?""+Jo(s):"",o=o!=null?""+Jo(o):s,C||o===r.value||(r.value=o),r.defaultValue=o}d=d!=null?d:p,d=typeof d!=="function"&&typeof d!=="symbol"&&!!d,r.checked=C?r.checked:!!d,r.defaultChecked=!!d,x!=null&&typeof x!=="function"&&typeof x!=="symbol"&&typeof x!=="boolean"&&(Ie(x,"name"),r.name=x),$S(r)}function CS(r,o,s){o==="number"&&Wb(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function aA(r,o){o.value==null&&(typeof o.children==="object"&&o.children!==null?tp.Children.forEach(o.children,function(s){s==null||typeof s==="string"||typeof s==="number"||typeof s==="bigint"||p8||(p8=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):o.dangerouslySetInnerHTML==null||h8||(h8=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),o.selected==null||f8||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),f8=!0)}function iA(){var r=Ne();return r?`
|
|
39
|
+
|
|
40
|
+
Check the render method of \``+r+"`.":""}function Yd(r,o,s,d){if(r=r.options,o){o={};for(var p=0;p<s.length;p++)o["$"+s[p]]=!0;for(s=0;s<r.length;s++)p=o.hasOwnProperty("$"+r[s].value),r[s].selected!==p&&(r[s].selected=p),p&&d&&(r[s].defaultSelected=!0)}else{s=""+Jo(s),o=null;for(p=0;p<r.length;p++){if(r[p].value===s){r[p].selected=!0,d&&(r[p].defaultSelected=!0);return}o!==null||r[p].disabled||(o=r[p])}o!==null&&(o.selected=!0)}}function sA(r,o){for(r=0;r<g8.length;r++){var s=g8[r];if(o[s]!=null){var d=Gn(o[s]);o.multiple&&!d?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",s,iA()):!o.multiple&&d&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",s,iA())}}o.value===void 0||o.defaultValue===void 0||m8||(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"),m8=!0)}function lA(r,o){o.value===void 0||o.defaultValue===void 0||b8||(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",Ne()||"A component"),b8=!0),o.children!=null&&o.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function cA(r,o,s){if(o!=null&&(o=""+Jo(o),o!==r.value&&(r.value=o),s==null)){r.defaultValue!==o&&(r.defaultValue=o);return}r.defaultValue=s!=null?""+Jo(s):""}function uA(r,o,s,d){if(o==null){if(d!=null){if(s!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Gn(d)){if(1<d.length)throw Error("<textarea> can only have at most one child.");d=d[0]}s=d}s==null&&(s=""),o=s}s=Jo(o),r.defaultValue=s,d=r.textContent,d===s&&d!==""&&d!==null&&(r.value=d),$S(r)}function dA(r,o){return r.serverProps===void 0&&r.serverTail.length===0&&r.children.length===1&&3<r.distanceFromLeaf&&r.distanceFromLeaf>15-o?dA(r.children[0],o):r}function $o(r){return" "+" ".repeat(r)}function Jd(r){return"+ "+" ".repeat(r)}function ou(r){return"- "+" ".repeat(r)}function fA(r){switch(r.tag){case 26:case 27:case 5:return r.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return r=r.type,r.displayName||r.name||null;case 11:return r=r.type.render,r.displayName||r.name||null;case 1:return r=r.type,r.displayName||r.name||null;default:return null}}function vh(r,o){return y8.test(r)?(r=JSON.stringify(r),r.length>o-2?8>o?'{"..."}':"{"+r.slice(0,o-7)+'..."}':"{"+r+"}"):r.length>o?5>o?'{"..."}':r.slice(0,o-3)+"...":r}function Yb(r,o,s){var d=120-2*s;if(o===null)return Jd(s)+vh(r,d)+`
|
|
41
|
+
`;if(typeof o==="string"){for(var p=0;p<o.length&&p<r.length&&o.charCodeAt(p)===r.charCodeAt(p);p++);return p>d-8&&10<p&&(r="..."+r.slice(p-8),o="..."+o.slice(p-8)),Jd(s)+vh(r,d)+`
|
|
42
|
+
`+ou(s)+vh(o,d)+`
|
|
43
|
+
`}return $o(s)+vh(r,d)+`
|
|
44
|
+
`}function wS(r){return Object.prototype.toString.call(r).replace(/^\[object (.*)\]$/,function(o,s){return s})}function xh(r,o){switch(typeof r){case"string":return r=JSON.stringify(r),r.length>o?5>o?'"..."':r.slice(0,o-4)+'..."':r;case"object":if(r===null)return"null";if(Gn(r))return"[...]";if(r.$$typeof===Mi)return(o=P(r.type))?"<"+o+">":"<...>";var s=wS(r);if(s==="Object"){s="",o-=2;for(var d in r)if(r.hasOwnProperty(d)){var p=JSON.stringify(d);if(p!=='"'+d+'"'&&(d=p),o-=d.length-2,p=xh(r[d],15>o?o:15),o-=p.length,0>o){s+=s===""?"...":", ...";break}s+=(s===""?"":",")+d+":"+p}return"{"+s+"}"}return s;case"function":return(o=r.displayName||r.name)?"function "+o:"function";default:return String(r)}}function Xd(r,o){return typeof r!=="string"||y8.test(r)?"{"+xh(r,o-2)+"}":r.length>o-2?5>o?'"..."':'"'+r.slice(0,o-5)+'..."':'"'+r+'"'}function ES(r,o,s){var d=120-s.length-r.length,p=[],g;for(g in o)if(o.hasOwnProperty(g)&&g!=="children"){var x=Xd(o[g],120-s.length-g.length-1);d-=g.length+x.length+2,p.push(g+"="+x)}return p.length===0?s+"<"+r+`>
|
|
45
|
+
`:0<d?s+"<"+r+" "+p.join(" ")+`>
|
|
46
|
+
`:s+"<"+r+`
|
|
47
|
+
`+s+" "+p.join(`
|
|
48
|
+
`+s+" ")+`
|
|
49
|
+
`+s+`>
|
|
50
|
+
`}function OK(r,o,s){var d="",p=pt({},o),g;for(g in r)if(r.hasOwnProperty(g)){delete p[g];var x=120-2*s-g.length-2,C=xh(r[g],x);o.hasOwnProperty(g)?(x=xh(o[g],x),d+=Jd(s)+g+": "+C+`
|
|
51
|
+
`,d+=ou(s)+g+": "+x+`
|
|
52
|
+
`):d+=Jd(s)+g+": "+C+`
|
|
53
|
+
`}for(var R in p)p.hasOwnProperty(R)&&(r=xh(p[R],120-2*s-R.length-2),d+=ou(s)+R+": "+r+`
|
|
54
|
+
`);return d}function DK(r,o,s,d){var p="",g=new Map;for(A in s)s.hasOwnProperty(A)&&g.set(A.toLowerCase(),A);if(g.size===1&&g.has("children"))p+=ES(r,o,$o(d));else{for(var x in o)if(o.hasOwnProperty(x)&&x!=="children"){var C=120-2*(d+1)-x.length-1,R=g.get(x.toLowerCase());if(R!==void 0){g.delete(x.toLowerCase());var A=o[x];R=s[R];var q=Xd(A,C);C=Xd(R,C),typeof A==="object"&&A!==null&&typeof R==="object"&&R!==null&&wS(A)==="Object"&&wS(R)==="Object"&&(2<Object.keys(A).length||2<Object.keys(R).length||-1<q.indexOf("...")||-1<C.indexOf("..."))?p+=$o(d+1)+x+`={{
|
|
55
|
+
`+OK(A,R,d+2)+$o(d+1)+`}}
|
|
56
|
+
`:(p+=Jd(d+1)+x+"="+q+`
|
|
57
|
+
`,p+=ou(d+1)+x+"="+C+`
|
|
58
|
+
`)}else p+=$o(d+1)+x+"="+Xd(o[x],C)+`
|
|
59
|
+
`}g.forEach(function(G){if(G!=="children"){var B=120-2*(d+1)-G.length-1;p+=ou(d+1)+G+"="+Xd(s[G],B)+`
|
|
60
|
+
`}}),p=p===""?$o(d)+"<"+r+`>
|
|
61
|
+
`:$o(d)+"<"+r+`
|
|
62
|
+
`+p+$o(d)+`>
|
|
63
|
+
`}if(r=s.children,o=o.children,typeof r==="string"||typeof r==="number"||typeof r==="bigint"){if(g="",typeof o==="string"||typeof o==="number"||typeof o==="bigint")g=""+o;p+=Yb(g,""+r,d+1)}else if(typeof o==="string"||typeof o==="number"||typeof o==="bigint")p=r==null?p+Yb(""+o,null,d+1):p+Yb(""+o,void 0,d+1);return p}function pA(r,o){var s=fA(r);if(s===null){s="";for(r=r.child;r;)s+=pA(r,o),r=r.sibling;return s}return $o(o)+"<"+s+`>
|
|
64
|
+
`}function TS(r,o){var s=dA(r,o);if(s!==r&&(r.children.length!==1||r.children[0]!==s))return $o(o)+`...
|
|
65
|
+
`+TS(s,o+1);s="";var d=r.fiber._debugInfo;if(d)for(var p=0;p<d.length;p++){var g=d[p].name;typeof g==="string"&&(s+=$o(o)+"<"+g+`>
|
|
66
|
+
`,o++)}if(d="",p=r.fiber.pendingProps,r.fiber.tag===6)d=Yb(p,r.serverProps,o),o++;else if(g=fA(r.fiber),g!==null)if(r.serverProps===void 0){d=o;var x=120-2*d-g.length-2,C="";for(A in p)if(p.hasOwnProperty(A)&&A!=="children"){var R=Xd(p[A],15);if(x-=A.length+R.length+2,0>x){C+=" ...";break}C+=" "+A+"="+R}d=$o(d)+"<"+g+C+`>
|
|
67
|
+
`,o++}else r.serverProps===null?(d=ES(g,p,Jd(o)),o++):typeof r.serverProps==="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(d=DK(g,p,r.serverProps,o),o++);var A="";p=r.fiber.child;for(g=0;p&&g<r.children.length;)x=r.children[g],x.fiber===p?(A+=TS(x,o),g++):A+=pA(p,o),p=p.sibling;p&&0<r.children.length&&(A+=$o(o)+`...
|
|
68
|
+
`),p=r.serverTail,r.serverProps===null&&o--;for(r=0;r<p.length;r++)g=p[r],A=typeof g==="string"?A+(ou(o)+vh(g,120-2*o)+`
|
|
69
|
+
`):A+ES(g.type,g.props,ou(o));return s+d+A}function RS(r){try{return`
|
|
70
|
+
|
|
71
|
+
`+TS(r,0)}catch(o){return""}}function hA(r,o,s){for(var d=o,p=null,g=0;d;)d===r&&(g=0),p={fiber:d,children:p!==null?[p]:[],serverProps:d===o?s:d===r?null:void 0,serverTail:[],distanceFromLeaf:g},g++,d=d.return;return p!==null?RS(p).replaceAll(/^[+-]/gm,">"):""}function mA(r,o){var s=pt({},r||x8),d={tag:o};if(v8.indexOf(o)!==-1&&(s.aTagInScope=null,s.buttonTagInScope=null,s.nobrTagInScope=null),BG.indexOf(o)!==-1&&(s.pTagInButtonScope=null),IG.indexOf(o)!==-1&&o!=="address"&&o!=="div"&&o!=="p"&&(s.listItemTagAutoclosing=null,s.dlItemTagAutoclosing=null),s.current=d,o==="form"&&(s.formTag=d),o==="a"&&(s.aTagInScope=d),o==="button"&&(s.buttonTagInScope=d),o==="nobr"&&(s.nobrTagInScope=d),o==="p"&&(s.pTagInButtonScope=d),o==="li"&&(s.listItemTagAutoclosing=d),o==="dd"||o==="dt")s.dlItemTagAutoclosing=d;return o==="#document"||o==="html"?s.containerTagInScope=null:s.containerTagInScope||(s.containerTagInScope=d),r!==null||o!=="#document"&&o!=="html"&&o!=="body"?s.implicitRootScope===!0&&(s.implicitRootScope=!1):s.implicitRootScope=!0,s}function gA(r,o,s){switch(o){case"select":return r==="hr"||r==="option"||r==="optgroup"||r==="script"||r==="template"||r==="#text";case"optgroup":return r==="option"||r==="#text";case"option":return r==="#text";case"tr":return r==="th"||r==="td"||r==="style"||r==="script"||r==="template";case"tbody":case"thead":case"tfoot":return r==="tr"||r==="style"||r==="script"||r==="template";case"colgroup":return r==="col"||r==="template";case"table":return r==="caption"||r==="colgroup"||r==="tbody"||r==="tfoot"||r==="thead"||r==="style"||r==="script"||r==="template";case"head":return r==="base"||r==="basefont"||r==="bgsound"||r==="link"||r==="meta"||r==="title"||r==="noscript"||r==="noframes"||r==="style"||r==="script"||r==="template";case"html":if(s)break;return r==="head"||r==="body"||r==="frameset";case"frameset":return r==="frame";case"#document":if(!s)return r==="html"}switch(r){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o!=="h1"&&o!=="h2"&&o!=="h3"&&o!=="h4"&&o!=="h5"&&o!=="h6";case"rp":case"rt":return zG.indexOf(o)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return o==null;case"head":return s||o===null;case"html":return s&&o==="#document"||o===null;case"body":return s&&(o==="#document"||o==="html")||o===null}return!0}function PK(r,o){switch(r){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 o.pTagInButtonScope;case"form":return o.formTag||o.pTagInButtonScope;case"li":return o.listItemTagAutoclosing;case"dd":case"dt":return o.dlItemTagAutoclosing;case"button":return o.buttonTagInScope;case"a":return o.aTagInScope;case"nobr":return o.nobrTagInScope}return null}function bA(r,o){for(;r;){switch(r.tag){case 5:case 26:case 27:if(r.type===o)return r}r=r.return}return null}function kS(r,o){o=o||x8;var s=o.current;if(o=(s=gA(r,s&&s.tag,o.implicitRootScope)?null:s)?null:PK(r,o),o=s||o,!o)return!0;var d=o.tag;if(o=String(!!s)+"|"+r+"|"+d,sy[o])return!1;sy[o]=!0;var p=(o=Mo)?bA(o.return,d):null,g=o!==null&&p!==null?hA(p,o,null):"",x="<"+r+">";return s?(s="",d==="table"&&r==="tr"&&(s+=" 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`,x,d,s,g)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
73
|
+
This will cause a hydration error.%s`,x,d,g),o&&(r=o.return,p===null||r===null||p===r&&r._debugOwner===o._debugOwner||me(p,function(){console.error(`<%s> cannot contain a nested %s.
|
|
74
|
+
See this log for the ancestor stack trace.`,d,x)})),!1}function Jb(r,o,s){if(s||gA("#text",o,!1))return!0;if(s="#text|"+o,sy[s])return!1;sy[s]=!0;var d=(s=Mo)?bA(s,o):null;return s=s!==null&&d!==null?hA(d,s,s.tag!==6?{children:null}:null):"",/\S/.test(r)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
75
|
+
This will cause a hydration error.%s`,o,s):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`,o,s),!1}function $h(r,o){if(o){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=o;return}}r.textContent=o}function LK(r){return r.replace(UG,function(o,s){return s.toUpperCase()})}function yA(r,o,s){var d=o.indexOf("--")===0;d||(-1<o.indexOf("-")?yf.hasOwnProperty(o)&&yf[o]||(yf[o]=!0,console.error("Unsupported style property %s. Did you mean %s?",o,LK(o.replace(FG,"ms-")))):HG.test(o)?yf.hasOwnProperty(o)&&yf[o]||(yf[o]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",o,o.charAt(0).toUpperCase()+o.slice(1))):!C8.test(s)||VC.hasOwnProperty(s)&&VC[s]||(VC[s]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,o,s.replace(C8,""))),typeof s==="number"&&(isNaN(s)?w8||(w8=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",o)):isFinite(s)||E8||(E8=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",o)))),s==null||typeof s==="boolean"||s===""?d?r.setProperty(o,""):o==="float"?r.cssFloat="":r[o]="":d?r.setProperty(o,s):typeof s!=="number"||s===0||T8.has(o)?o==="float"?r.cssFloat=s:(Zr(s,o),r[o]=(""+s).trim()):r[o]=s+"px"}function vA(r,o,s){if(o!=null&&typeof o!=="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(o&&Object.freeze(o),r=r.style,s!=null){if(o){var d={};if(s){for(var p in s)if(s.hasOwnProperty(p)&&!o.hasOwnProperty(p))for(var g=UC[p]||[p],x=0;x<g.length;x++)d[g[x]]=p}for(var C in o)if(o.hasOwnProperty(C)&&(!s||s[C]!==o[C]))for(p=UC[C]||[C],g=0;g<p.length;g++)d[p[g]]=C;C={};for(var R in o)for(p=UC[R]||[R],g=0;g<p.length;g++)C[p[g]]=R;R={};for(var A in d)if(p=d[A],(g=C[A])&&p!==g&&(x=p+","+g,!R[x])){R[x]=!0,x=console;var q=o[p];x.error.call(x,"%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.",q==null||typeof q==="boolean"||q===""?"Removing":"Updating",p,g)}}for(var G in s)!s.hasOwnProperty(G)||o!=null&&o.hasOwnProperty(G)||(G.indexOf("--")===0?r.setProperty(G,""):G==="float"?r.cssFloat="":r[G]="");for(var B in o)A=o[B],o.hasOwnProperty(B)&&s[B]!==A&&yA(r,B,A)}else for(d in o)o.hasOwnProperty(d)&&yA(r,d,o[d])}function Sh(r){if(r.indexOf("-")===-1)return!1;switch(r){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 xA(r){return VG.get(r)||r}function _K(r,o){if(Ba.call(xf,o)&&xf[o])return!0;if(KG.test(o)){if(r="aria-"+o.slice(4).toLowerCase(),r=R8.hasOwnProperty(r)?r:null,r==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",o),xf[o]=!0;if(o!==r)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",o,r),xf[o]=!0}if(jG.test(o)){if(r=o.toLowerCase(),r=R8.hasOwnProperty(r)?r:null,r==null)return xf[o]=!0,!1;o!==r&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",o,r),xf[o]=!0)}return!0}function IK(r,o){var s=[],d;for(d in o)_K(r,d)||s.push(d);o=s.map(function(p){return"`"+p+"`"}).join(", "),s.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",o,r):1<s.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",o,r)}function BK(r,o,s,d){if(Ba.call(Br,o)&&Br[o])return!0;var p=o.toLowerCase();if(p==="onfocusin"||p==="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."),Br[o]=!0;if(typeof s==="function"&&(r==="form"&&o==="action"||r==="input"&&o==="formAction"||r==="button"&&o==="formAction"))return!0;if(d!=null){if(r=d.possibleRegistrationNames,d.registrationNameDependencies.hasOwnProperty(o))return!0;if(d=r.hasOwnProperty(p)?r[p]:null,d!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",o,d),Br[o]=!0;if(A8.test(o))return console.error("Unknown event handler property `%s`. It will be ignored.",o),Br[o]=!0}else if(A8.test(o))return qG.test(o)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",o),Br[o]=!0;if(GG.test(o)||WG.test(o))return!0;if(p==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Br[o]=!0;if(p==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Br[o]=!0;if(p==="is"&&s!==null&&s!==void 0&&typeof s!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof s),Br[o]=!0;if(typeof s==="number"&&isNaN(s))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",o),Br[o]=!0;if(cy.hasOwnProperty(p)){if(p=cy[p],p!==o)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",o,p),Br[o]=!0}else if(o!==p)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.",o,p),Br[o]=!0;switch(o){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 s){case"boolean":switch(o){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(p=o.toLowerCase().slice(0,5),p==="data-"||p==="aria-")return!0;return s?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()}.',s,o,o,s,o):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.',s,o,o,s,o,o,o),Br[o]=!0}case"function":case"symbol":return Br[o]=!0,!1;case"string":if(s==="false"||s==="true"){switch(o){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}?",s,o,s==="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".',o,s),Br[o]=!0}}return!0}function zK(r,o,s){var d=[],p;for(p in o)BK(r,p,o[p],s)||d.push(p);o=d.map(function(g){return"`"+g+"`"}).join(", "),d.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 ",o,r):1<d.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 ",o,r)}function Ch(r){return YG.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function ds(){}function AS(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}function $A(r){var o=et(r);if(o&&(r=o.stateNode)){var s=r[Ir]||null;e:switch(r=o.stateNode,o.type){case"input":if(SS(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),o=s.name,s.type==="radio"&&o!=null){for(s=r;s.parentNode;)s=s.parentNode;Ie(o,"name"),s=s.querySelectorAll('input[name="'+Xo(""+o)+'"][type="radio"]');for(o=0;o<s.length;o++){var d=s[o];if(d!==r&&d.form===r.form){var p=d[Ir]||null;if(!p)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");SS(d,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(o=0;o<s.length;o++)d=s[o],d.form===r.form&&nA(d)}break e;case"textarea":cA(r,s.value,s.defaultValue);break e;case"select":o=s.value,o!=null&&Yd(r,!!s.multiple,o,!1)}}}function SA(r,o,s){if(jC)return r(o,s);jC=!0;try{var d=r(o);return d}finally{if(jC=!1,$f!==null||Sf!==null){if(lf(),$f&&(o=$f,r=Sf,Sf=$f=null,$A(o),r))for(o=0;o<r.length;o++)$A(r[o])}}}function wh(r,o){var s=r.stateNode;if(s===null)return null;var d=s[Ir]||null;if(d===null)return null;s=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(s&&typeof s!=="function")throw Error("Expected `"+o+"` listener to be a function, instead got a value of `"+typeof s+"` type.");return s}function CA(){if(uy)return uy;var r,o=qC,s=o.length,d,p="value"in zl?zl.value:zl.textContent,g=p.length;for(r=0;r<s&&o[r]===p[r];r++);var x=s-r;for(d=1;d<=x&&o[s-d]===p[g-d];d++);return uy=p.slice(r,1<d?1-d:void 0)}function Xb(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Qb(){return!0}function wA(){return!1}function eo(r){function o(s,d,p,g,x){this._reactName=s,this._targetInst=p,this.type=d,this.nativeEvent=g,this.target=x,this.currentTarget=null;for(var C in r)r.hasOwnProperty(C)&&(s=r[C],this[C]=s?s(g):g[C]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Qb:wA,this.isPropagationStopped=wA,this}return pt(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!=="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Qb)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!=="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Qb)},persist:function(){},isPersistent:Qb}),o}function HK(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=lW[r])?!!o[r]:!1}function MS(){return HK}function EA(r,o){switch(r){case"keyup":return xW.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==D8;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TA(r){return r=r.detail,typeof r==="object"&&"data"in r?r.data:null}function FK(r,o){switch(r){case"compositionend":return TA(o);case"keypress":if(o.which!==L8)return null;return I8=!0,_8;case"textInput":return r=o.data,r===_8&&I8?null:r;default:return null}}function UK(r,o){if(Cf)return r==="compositionend"||!JC&&EA(r,o)?(r=CA(),uy=qC=zl=null,Cf=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return P8&&o.locale!=="ko"?null:o.data;default:return null}}function RA(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!SW[r.type]:o==="textarea"?!0:!1}function VK(r){if(!_i)return!1;r="on"+r;var o=r in document;return o||(o=document.createElement("div"),o.setAttribute(r,"return;"),o=typeof o[r]==="function"),o}function kA(r,o,s,d){$f?Sf?Sf.push(d):Sf=[d]:$f=d,o=j0(o,"onChange"),0<o.length&&(s=new dy("onChange","change",null,s,d),r.push({event:s,listeners:o}))}function jK(r){uN(r,0)}function Zb(r){var o=tt(r);if(nA(o))return r}function AA(r,o){if(r==="change")return o}function MA(){cm&&(cm.detachEvent("onpropertychange",NA),um=cm=null)}function NA(r){if(r.propertyName==="value"&&Zb(um)){var o=[];kA(o,um,r,AS(r)),SA(jK,o)}}function KK(r,o,s){r==="focusin"?(MA(),cm=o,um=s,cm.attachEvent("onpropertychange",NA)):r==="focusout"&&MA()}function qK(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Zb(um)}function GK(r,o){if(r==="click")return Zb(o)}function WK(r,o){if(r==="input"||r==="change")return Zb(o)}function YK(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}function Eh(r,o){if(zr(r,o))return!0;if(typeof r!=="object"||r===null||typeof o!=="object"||o===null)return!1;var s=Object.keys(r),d=Object.keys(o);if(s.length!==d.length)return!1;for(d=0;d<s.length;d++){var p=s[d];if(!Ba.call(o,p)||!zr(r[p],o[p]))return!1}return!0}function OA(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function DA(r,o){var s=OA(r);r=0;for(var d;s;){if(s.nodeType===3){if(d=r+s.textContent.length,r<=o&&d>=o)return{node:s,offset:o-r};r=d}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=OA(s)}}function PA(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?PA(r,o.parentNode):("contains"in r)?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function LA(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var o=Wb(r.document);o instanceof r.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href==="string"}catch(d){s=!1}if(s)r=o.contentWindow;else break;o=Wb(r.document)}return o}function NS(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function _A(r,o,s){var d=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;QC||wf==null||wf!==Wb(d)||(d=wf,("selectionStart"in d)&&NS(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),dm&&Eh(dm,d)||(dm=d,d=j0(XC,"onSelect"),0<d.length&&(o=new dy("onSelect","select",null,o,s),r.push({event:o,listeners:d}),o.target=wf)))}function au(r,o){var s={};return s[r.toLowerCase()]=o.toLowerCase(),s["Webkit"+r]="webkit"+o,s["Moz"+r]="moz"+o,s}function iu(r){if(ZC[r])return ZC[r];if(!Ef[r])return r;var o=Ef[r],s;for(s in o)if(o.hasOwnProperty(s)&&s in z8)return ZC[r]=o[s];return r}function La(r,o){j8.set(r,o),wr(o,[r])}function JK(r){for(var o=py,s=0;s<r.length;s++){var d=r[s];if(typeof d==="object"&&d!==null)if(Gn(d)&&d.length===2&&typeof d[0]==="string"){if(o!==py&&o!==ow)return nw;o=ow}else return nw;else{if(typeof d==="function"||typeof d==="string"&&50<d.length||o!==py&&o!==rw)return nw;o=rw}}return o}function OS(r,o,s,d){for(var p in r)Ba.call(r,p)&&p[0]!=="_"&&hi(p,r[p],o,s,d)}function hi(r,o,s,d,p){switch(typeof o){case"object":if(o===null){o="null";break}else{if(o.$$typeof===Mi){var g=P(o.type)||"…",x=o.key;o=o.props;var C=Object.keys(o),R=C.length;if(x==null&&R===0){o="<"+g+" />";break}if(3>d||R===1&&C[0]==="children"&&x==null){o="<"+g+" … />";break}s.push([p+" ".repeat(d)+r,"<"+g]),x!==null&&hi("key",x,s,d+1,p),r=!1;for(var A in o)A==="children"?o.children!=null&&(!Gn(o.children)||0<o.children.length)&&(r=!0):Ba.call(o,A)&&A[0]!=="_"&&hi(A,o[A],s,d+1,p);s.push(["",r?">…</"+g+">":"/>"]);return}if(g=Object.prototype.toString.call(o),g=g.slice(8,g.length-1),g==="Array"){if(A=JK(o),A===rw||A===py){o=JSON.stringify(o);break}else if(A===ow){s.push([p+" ".repeat(d)+r,""]);for(r=0;r<o.length;r++)g=o[r],hi(g[0],g[1],s,d+1,p);return}}if(g==="Promise"){if(o.status==="fulfilled"){if(g=s.length,hi(r,o.value,s,d,p),s.length>g){s=s[g],s[1]="Promise<"+(s[1]||"Object")+">";return}}else if(o.status==="rejected"&&(g=s.length,hi(r,o.reason,s,d,p),s.length>g)){s=s[g],s[1]="Rejected Promise<"+s[1]+">";return}s.push([" ".repeat(d)+r,"Promise"]);return}g==="Object"&&(A=Object.getPrototypeOf(o))&&typeof A.constructor==="function"&&(g=A.constructor.name),s.push([p+" ".repeat(d)+r,g==="Object"?3>d?"":"…":g]),3>d&&OS(o,s,d+1,p);return}case"function":o=o.name===""?"() => {}":o.name+"() {}";break;case"string":o=o===AW?"…":JSON.stringify(o);break;case"undefined":o="undefined";break;case"boolean":o=o?"true":"false";break;default:o=String(o)}s.push([p+" ".repeat(d)+r,o])}function IA(r,o,s,d){var p=!0;for(x in r)x in o||(s.push([hy+" ".repeat(d)+x,"…"]),p=!1);for(var g in o)if(g in r){var x=r[g],C=o[g];if(x!==C){if(d===0&&g==="children")p=" ".repeat(d)+g,s.push([hy+p,"…"],[my+p,"…"]);else{if(!(3<=d)){if(typeof x==="object"&&typeof C==="object"&&x!==null&&C!==null&&x.$$typeof===C.$$typeof)if(C.$$typeof===Mi){if(x.type===C.type&&x.key===C.key){x=P(C.type)||"…",p=" ".repeat(d)+g,x="<"+x+" … />",s.push([hy+p,x],[my+p,x]),p=!1;continue}}else{var R=Object.prototype.toString.call(x),A=Object.prototype.toString.call(C);if(R===A&&(A==="[object Object]"||A==="[object Array]")){R=[G8+" ".repeat(d)+g,A==="[object Array]"?"Array":""],s.push(R),A=s.length,IA(x,C,s,d+1)?A===s.length&&(R[1]="Referentially unequal but deeply equal objects. Consider memoization."):p=!1;continue}}else if(typeof x==="function"&&typeof C==="function"&&x.name===C.name&&x.length===C.length&&(R=Function.prototype.toString.call(x),A=Function.prototype.toString.call(C),R===A)){x=C.name===""?"() => {}":C.name+"() {}",s.push([G8+" ".repeat(d)+g,x+" Referentially unequal function closure. Consider memoization."]);continue}}hi(g,x,s,d,hy),hi(g,C,s,d,my)}p=!1}}else s.push([my+" ".repeat(d)+g,"…"]),p=!1;return p}function So(r){gt=r&63?"Blocking":r&64?"Gesture":r&4194176?"Transition":r&62914560?"Suspense":r&2080374784?"Idle":"Other"}function mi(r,o,s,d){Jt&&(Fl.start=o,Fl.end=s,xs.color="warning",xs.tooltipText=d,xs.properties=null,(r=r._debugTask)?r.run(performance.measure.bind(performance,d,Fl)):performance.measure(d,Fl))}function e0(r,o,s){mi(r,o,s,"Reconnect")}function t0(r,o,s,d,p){var g=Y(r);if(g!==null&&Jt){var{alternate:x,actualDuration:C}=r;if(x===null||x.child!==r.child)for(var R=r.child;R!==null;R=R.sibling)C-=R.actualDuration;d=0.5>C?d?"tertiary-light":"primary-light":10>C?d?"tertiary":"primary":100>C?d?"tertiary-dark":"primary-dark":"error";var A=r.memoizedProps;C=r._debugTask,A!==null&&x!==null&&x.memoizedProps!==A?(R=[MW],A=IA(x.memoizedProps,A,R,0),1<R.length&&(A&&!Hl&&(x.lanes&p)===0&&100<r.actualDuration?(Hl=!0,R[0]=NW,xs.color="warning",xs.tooltipText=W8):(xs.color=d,xs.tooltipText=g),xs.properties=R,Fl.start=o,Fl.end=s,C!=null?C.run(performance.measure.bind(performance,""+g,Fl)):performance.measure(""+g,Fl))):C!=null?C.run(console.timeStamp.bind(console,g,o,s,Zo,void 0,d)):console.timeStamp(g,o,s,Zo,void 0,d)}}function DS(r,o,s,d){if(Jt){var p=Y(r);if(p!==null){for(var g=null,x=[],C=0;C<d.length;C++){var R=d[C];g==null&&R.source!==null&&(g=R.source._debugTask),R=R.value,x.push(["Error",typeof R==="object"&&R!==null&&typeof R.message==="string"?String(R.message):String(R)])}r.key!==null&&hi("key",r.key,x,0,""),r.memoizedProps!==null&&OS(r.memoizedProps,x,0,""),g==null&&(g=r._debugTask),r={start:o,end:s,detail:{devtools:{color:"error",track:Zo,tooltipText:r.tag===13?"Hydration failed":"Error boundary caught an error",properties:x}}},g?g.run(performance.measure.bind(performance,""+p,r)):performance.measure(""+p,r)}}}function gi(r,o,s,d,p){if(p!==null){if(Jt){var g=Y(r);if(g!==null){d=[];for(var x=0;x<p.length;x++){var C=p[x].value;d.push(["Error",typeof C==="object"&&C!==null&&typeof C.message==="string"?String(C.message):String(C)])}r.key!==null&&hi("key",r.key,d,0,""),r.memoizedProps!==null&&OS(r.memoizedProps,d,0,""),o={start:o,end:s,detail:{devtools:{color:"error",track:Zo,tooltipText:"A lifecycle or effect errored",properties:d}}},(r=r._debugTask)?r.run(performance.measure.bind(performance,""+g,o)):performance.measure(""+g,o)}}}else g=Y(r),g!==null&&Jt&&(p=1>d?"secondary-light":100>d?"secondary":500>d?"secondary-dark":"error",(r=r._debugTask)?r.run(console.timeStamp.bind(console,g,o,s,Zo,void 0,p)):console.timeStamp(g,o,s,Zo,void 0,p))}function XK(r,o,s,d){if(Jt&&!(o<=r)){var p=(s&738197653)===s?"tertiary-dark":"primary-dark";s=(s&536870912)===s?"Prepared":(s&201326741)===s?"Hydrated":"Render",d?d.run(console.timeStamp.bind(console,s,r,o,gt,ht,p)):console.timeStamp(s,r,o,gt,ht,p)}}function BA(r,o,s,d){!Jt||o<=r||(s=(s&738197653)===s?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Prewarm",r,o,gt,ht,s)):console.timeStamp("Prewarm",r,o,gt,ht,s))}function zA(r,o,s,d){!Jt||o<=r||(s=(s&738197653)===s?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Suspended",r,o,gt,ht,s)):console.timeStamp("Suspended",r,o,gt,ht,s))}function QK(r,o,s,d,p,g){if(Jt&&!(o<=r)){s=[];for(var x=0;x<d.length;x++){var C=d[x].value;s.push(["Recoverable Error",typeof C==="object"&&C!==null&&typeof C.message==="string"?String(C.message):String(C)])}r={start:r,end:o,detail:{devtools:{color:"primary-dark",track:gt,trackGroup:ht,tooltipText:p?"Hydration Failed":"Recovered after Error",properties:s}}},g?g.run(performance.measure.bind(performance,"Recovered",r)):performance.measure("Recovered",r)}}function PS(r,o,s,d){!Jt||o<=r||(d?d.run(console.timeStamp.bind(console,"Errored",r,o,gt,ht,"error")):console.timeStamp("Errored",r,o,gt,ht,"error"))}function ZK(r,o,s,d){!Jt||o<=r||(d?d.run(console.timeStamp.bind(console,s,r,o,gt,ht,"secondary-light")):console.timeStamp(s,r,o,gt,ht,"secondary-light"))}function HA(r,o,s,d,p){if(Jt&&!(o<=r)){for(var g=[],x=0;x<s.length;x++){var C=s[x].value;g.push(["Error",typeof C==="object"&&C!==null&&typeof C.message==="string"?String(C.message):String(C)])}r={start:r,end:o,detail:{devtools:{color:"error",track:gt,trackGroup:ht,tooltipText:d?"Remaining Effects Errored":"Commit Errored",properties:g}}},p?p.run(performance.measure.bind(performance,"Errored",r)):performance.measure("Errored",r)}}function Th(r,o,s){!Jt||o<=r||(s?s.run(console.timeStamp.bind(console,"Animating",r,o,gt,ht,"secondary-dark")):console.timeStamp("Animating",r,o,gt,ht,"secondary-dark"))}function n0(){for(var r=Tf,o=aw=Tf=0;o<r;){var s=ea[o];ea[o++]=null;var d=ea[o];ea[o++]=null;var p=ea[o];ea[o++]=null;var g=ea[o];if(ea[o++]=null,d!==null&&p!==null){var x=d.pending;x===null?p.next=p:(p.next=x.next,x.next=p),d.pending=p}g!==0&&FA(s,p,g)}}function r0(r,o,s,d){ea[Tf++]=r,ea[Tf++]=o,ea[Tf++]=s,ea[Tf++]=d,aw|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function LS(r,o,s,d){return r0(r,o,s,d),o0(r)}function Er(r,o){return r0(r,null,null,o),o0(r)}function FA(r,o,s){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s);for(var p=!1,g=r.return;g!==null;)g.childLanes|=s,d=g.alternate,d!==null&&(d.childLanes|=s),g.tag===22&&(r=g.stateNode,r===null||r._visibility&fm||(p=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,p&&o!==null&&(p=31-_r(s),r=g.hiddenUpdates,d=r[p],d===null?r[p]=[o]:d.push(o),o.lane=s|536870912),g):null}function o0(r){if(zm>qW)throw Lu=zm=0,Hm=Bw=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.");Lu>GW&&(Lu=0,Hm=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.")),r.alternate===null&&(r.flags&4098)!==0&&rN(r);for(var o=r,s=o.return;s!==null;)o.alternate===null&&(o.flags&4098)!==0&&rN(r),o=s,s=o.return;return o.tag===3?o.stateNode:null}function su(r){if(ta===null)return r;var o=ta(r);return o===void 0?r:o.current}function _S(r){if(ta===null)return r;var o=ta(r);return o===void 0?r!==null&&r!==void 0&&typeof r.render==="function"&&(o=su(r.render),r.render!==o)?(o={$$typeof:em,render:o},r.displayName!==void 0&&(o.displayName=r.displayName),o):r:o.current}function UA(r,o){if(ta===null)return!1;var s=r.elementType;o=o.type;var d=!1,p=typeof o==="object"&&o!==null?o.$$typeof:null;switch(r.tag){case 1:typeof o==="function"&&(d=!0);break;case 0:typeof o==="function"?d=!0:p===Ao&&(d=!0);break;case 11:p===em?d=!0:p===Ao&&(d=!0);break;case 14:case 15:p===ty?d=!0:p===Ao&&(d=!0);break;default:return!1}return d&&(r=ta(s),r!==void 0&&r===ta(o))?!0:!1}function VA(r){ta!==null&&typeof WeakSet==="function"&&(Rf===null&&(Rf=new WeakSet),Rf.add(r))}function jA(r,o,s){do{var d=r,p=d.alternate,g=d.child,x=d.sibling,C=d.tag;d=d.type;var R=null;switch(C){case 0:case 15:case 1:R=d;break;case 11:R=d.render}if(ta===null)throw Error("Expected resolveFamily to be set during hot reload.");var A=!1;if(d=!1,R!==null&&(R=ta(R),R!==void 0&&(s.has(R)?d=!0:o.has(R)&&(C===1?d=!0:A=!0))),Rf!==null&&(Rf.has(r)||p!==null&&Rf.has(p))&&(d=!0),d&&(r._debugNeedsRemount=!0),d||A)p=Er(r,2),p!==null&&pn(p,r,2);if(g===null||d||jA(g,o,s),x===null)break;r=x}while(1)}function eq(r,o,s,d){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,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,Y8||typeof Object.preventExtensions!=="function"||Object.preventExtensions(this)}function IS(r){return r=r.prototype,!(!r||!r.isReactComponent)}function fs(r,o){var s=r.alternate;switch(s===null?(s=y(r.tag,o,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s._debugOwner=r._debugOwner,s._debugStack=r._debugStack,s._debugTask=r._debugTask,s._debugHookTypes=r._debugHookTypes,s.alternate=r,r.alternate=s):(s.pendingProps=o,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null,s.actualDuration=-0,s.actualStartTime=-1.1),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,o=r.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext,_debugThenableState:o._debugThenableState},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s.selfBaseDuration=r.selfBaseDuration,s.treeBaseDuration=r.treeBaseDuration,s._debugInfo=r._debugInfo,s._debugNeedsRemount=r._debugNeedsRemount,s.tag){case 0:case 15:s.type=su(r.type);break;case 1:s.type=su(r.type);break;case 11:s.type=_S(r.type)}return s}function KA(r,o){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=o,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null,r.selfBaseDuration=0,r.treeBaseDuration=0):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,o=s.dependencies,r.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext,_debugThenableState:o._debugThenableState},r.selfBaseDuration=s.selfBaseDuration,r.treeBaseDuration=s.treeBaseDuration),r}function BS(r,o,s,d,p,g){var x=0,C=r;if(typeof r==="function")IS(r)&&(x=1),C=su(C);else if(typeof r==="string")x=Q(),x=cG(r,s,x)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case MC:return o=y(31,s,o,p),o.elementType=MC,o.lanes=g,o;case mf:return lu(s.children,p,g,o);case ey:x=8,p|=Rr,p|=Ha;break;case TC:return r=s,d=p,typeof r.id!=="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof r.id),o=y(12,r,o,d|st),o.elementType=TC,o.lanes=g,o.stateNode={effectDuration:0,passiveEffectDuration:0},o;case kC:return o=y(13,s,o,p),o.elementType=kC,o.lanes=g,o;case AC:return o=y(19,s,o,p),o.elementType=AC,o.lanes=g,o;default:if(typeof r==="object"&&r!==null)switch(r.$$typeof){case Ni:x=10;break e;case RC:x=9;break e;case em:x=11,C=_S(C);break e;case ty:x=14;break e;case Ao:x=16,C=null;break e}if(C="",r===void 0||typeof r==="object"&&r!==null&&Object.keys(r).length===0)C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";r===null?s="null":Gn(r)?s="array":r!==void 0&&r.$$typeof===Mi?(s="<"+(P(r.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):s=typeof r,(x=d?te(d):null)&&(C+=`
|
|
77
|
+
|
|
78
|
+
Check the render method of \``+x+"`."),x=29,s=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(s+"."+C)),C=null}return o=y(x,s,o,p),o.elementType=r,o.type=C,o.lanes=g,o._debugOwner=d,o}function a0(r,o,s){return o=BS(r.type,r.key,r.props,r._owner,o,s),o._debugOwner=r._owner,o._debugStack=r._debugStack,o._debugTask=r._debugTask,o}function lu(r,o,s,d){return r=y(7,r,d,o),r.lanes=s,r}function zS(r,o,s){return r=y(6,r,null,o),r.lanes=s,r}function qA(r){var o=y(18,null,null,We);return o.stateNode=r,o}function HS(r,o,s){return o=y(4,r.children!==null?r.children:[],r.key,o),o.lanes=s,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function Co(r,o){if(typeof r==="object"&&r!==null){var s=iw.get(r);if(s!==void 0)return s;return o={value:r,source:o,stack:Je(o)},iw.set(r,o),o}return{value:r,source:o,stack:Je(o)}}function ps(r,o){Cl(),kf[Af++]=pm,kf[Af++]=gy,gy=r,pm=o}function GA(r,o,s){Cl(),na[ra++]=Ss,na[ra++]=Cs,na[ra++]=$u,$u=r;var d=Ss;r=Cs;var p=32-_r(d)-1;d&=~(1<<p),s+=1;var g=32-_r(o)+p;if(30<g){var x=p-p%5;g=(d&(1<<x)-1).toString(32),d>>=x,p-=x,Ss=1<<32-_r(o)+p|s<<p|d,Cs=g+r}else Ss=1<<g|s<<p|d,Cs=r}function FS(r){Cl(),r.return!==null&&(ps(r,1),GA(r,1,0))}function US(r){for(;r===gy;)gy=kf[--Af],kf[Af]=null,pm=kf[--Af],kf[Af]=null;for(;r===$u;)$u=na[--ra],na[ra]=null,Cs=na[--ra],na[ra]=null,Ss=na[--ra],na[ra]=null}function WA(){return Cl(),$u!==null?{id:Ss,overflow:Cs}:null}function YA(r,o){Cl(),na[ra++]=Ss,na[ra++]=Cs,na[ra++]=$u,Ss=o.id,Cs=o.overflow,$u=r}function Cl(){$t||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function cu(r,o){if(r.return===null){if(Oo===null)Oo={fiber:r,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:o};else{if(Oo.fiber!==r)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Oo.distanceFromLeaf>o&&(Oo.distanceFromLeaf=o)}return Oo}var s=cu(r.return,o+1).children;if(0<s.length&&s[s.length-1].fiber===r)return s=s[s.length-1],s.distanceFromLeaf>o&&(s.distanceFromLeaf=o),s;return o={fiber:r,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:o},s.push(o),o}function JA(){$t&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function i0(r,o){Ii||(r=cu(r,0),r.serverProps=null,o!==null&&(o=kN(o),r.serverTail.push(o)))}function wl(r){var o=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,s="",d=Oo;throw d!==null&&(Oo=null,s=RS(d)),Rh(Co(Error("Hydration failed because the server rendered "+(o?"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`+s),r)),sw}function XA(r){var{stateNode:o,type:s,memoizedProps:d}=r;switch(o[ur]=r,o[Ir]=d,lC(s,d),s){case"dialog":wt("cancel",o),wt("close",o);break;case"iframe":case"object":case"embed":wt("load",o);break;case"video":case"audio":for(s=0;s<Fm.length;s++)wt(Fm[s],o);break;case"source":wt("error",o);break;case"img":case"image":case"link":wt("error",o),wt("load",o);break;case"details":wt("toggle",o);break;case"input":Sl("input",d),wt("invalid",o),rA(o,d),oA(o,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"option":aA(o,d);break;case"select":Sl("select",d),wt("invalid",o),sA(o,d);break;case"textarea":Sl("textarea",d),wt("invalid",o),lA(o,d),uA(o,d.value,d.defaultValue,d.children)}s=d.children,typeof s!=="string"&&typeof s!=="number"&&typeof s!=="bigint"||o.textContent===""+s||d.suppressHydrationWarning===!0||hN(o.textContent,s)?(d.popover!=null&&(wt("beforetoggle",o),wt("toggle",o)),d.onScroll!=null&&wt("scroll",o),d.onScrollEnd!=null&&wt("scrollend",o),d.onClick!=null&&(o.onclick=ds),o=!0):o=!1,o||wl(r,!0)}function QA(r){for(dr=r.return;dr;)switch(dr.tag){case 5:case 31:case 13:oa=!1;return;case 27:case 3:oa=!0;return;default:dr=dr.return}}function Qd(r){if(r!==dr)return!1;if(!$t)return QA(r),$t=!0,!1;var o=r.tag,s;if(s=o!==3&&o!==27){if(s=o===5)s=r.type,s=!(s!=="form"&&s!=="button")||pC(r.type,r.memoizedProps);s=!s}if(s&&Xt){for(s=Xt;s;){var d=cu(r,0),p=kN(s);d.serverTail.push(p),s=p.type==="Suspense"?bC(s):ko(s.nextSibling)}wl(r)}if(QA(r),o===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Xt=bC(r)}else if(o===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Xt=bC(r)}else o===27?(o=Xt,Pl(r.type)?(r=Jw,Jw=null,Xt=r):Xt=o):Xt=dr?ko(r.stateNode.nextSibling):null;return!0}function uu(){Xt=dr=null,Ii=$t=!1}function VS(){var r=Vl;return r!==null&&(Vr===null?Vr=r:Vr.push.apply(Vr,r),Vl=null),r}function Rh(r){Vl===null?Vl=[r]:Vl.push(r)}function jS(){var r=Oo;if(r!==null){Oo=null;for(var o=RS(r);0<r.children.length;)r=r.children[0];me(r.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",o)})}}function s0(){Mf=by=null,Nf=!1}function El(r,o,s){ie(lw,o._currentValue,r),o._currentValue=s,ie(cw,o._currentRenderer,r),o._currentRenderer!==void 0&&o._currentRenderer!==null&&o._currentRenderer!==X8&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),o._currentRenderer=X8}function hs(r,o){r._currentValue=lw.current;var s=cw.current;ue(cw,o),r._currentRenderer=s,ue(lw,o)}function KS(r,o,s){for(;r!==null;){var d=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),r===s)break;r=r.return}r!==s&&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 qS(r,o,s,d){var p=r.child;p!==null&&(p.return=r);for(;p!==null;){var g=p.dependencies;if(g!==null){var x=p.child;g=g.firstContext;e:for(;g!==null;){var C=g;g=p;for(var R=0;R<o.length;R++)if(C.context===o[R]){g.lanes|=s,C=g.alternate,C!==null&&(C.lanes|=s),KS(g.return,s,r),d||(x=null);break e}g=C.next}}else if(p.tag===18){if(x=p.return,x===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");x.lanes|=s,g=x.alternate,g!==null&&(g.lanes|=s),KS(x,s,r),x=null}else x=p.child;if(x!==null)x.return=p;else for(x=p;x!==null;){if(x===r){x=null;break}if(p=x.sibling,p!==null){p.return=x.return,x=p;break}x=x.return}p=x}}function Zd(r,o,s,d){r=null;for(var p=o,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var x=p.alternate;if(x===null)throw Error("Should have a current fiber. This is a bug in React.");if(x=x.memoizedProps,x!==null){var C=p.type;zr(p.pendingProps.value,x.value)||(r!==null?r.push(C):r=[C])}}else if(p===ny.current){if(x=p.alternate,x===null)throw Error("Should have a current fiber. This is a bug in React.");x.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(qm):r=[qm])}p=p.return}r!==null&&qS(o,r,s,d),o.flags|=262144}function l0(r){for(r=r.firstContext;r!==null;){if(!zr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function du(r){by=r,Mf=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function rn(r){return Nf&&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()."),ZA(by,r)}function c0(r,o){return by===null&&du(r),ZA(r,o)}function ZA(r,o){var s=o._currentValue;if(o={context:o,memoizedValue:s,next:null},Mf===null){if(r===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().");Mf=o,r.dependencies={lanes:0,firstContext:o,_debugThenableState:null},r.flags|=524288}else Mf=Mf.next=o;return s}function GS(){return{controller:new PW,data:new Map,refCount:0}}function fu(r){r.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),r.refCount++}function kh(r){r.refCount--,0>r.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),r.refCount===0&&LW(_W,function(){r.controller.abort()})}function bi(r,o,s){if((r&127)!==0)0>Bi&&(Bi=_n(),mm=yy(o),uw=o,s!=null&&(dw=Y(s)),(kt&(Yn|Lo))!==nr&&(hn=!0,ql=hm),r=Yh(),o=Wh(),r!==Of||o!==gm?Of=-1.1:o!==null&&(ql=hm),Cu=r,gm=o);else if((r&4194048)!==0&&0>aa&&(aa=_n(),bm=yy(o),Q8=o,s!=null&&(Z8=Y(s)),0>Ts)){if(r=Yh(),o=Wh(),r!==Wl||o!==wu)Wl=-1.1;Gl=r,wu=o}}function tq(r){if(0>Bi){Bi=_n(),mm=r._debugTask!=null?r._debugTask:null,(kt&(Yn|Lo))!==nr&&(ql=hm);var o=Yh(),s=Wh();o!==Of||s!==gm?Of=-1.1:s!==null&&(ql=hm),Cu=o,gm=s}if(0>aa&&(aa=_n(),bm=r._debugTask!=null?r._debugTask:null,0>Ts)){if(r=Yh(),o=Wh(),r!==Wl||o!==wu)Wl=-1.1;Gl=r,wu=o}}function ms(){var r=Su;return Su=0,r}function u0(r){var o=Su;return Su=r,o}function Ah(r){var o=Su;return Su+=r,o}function d0(){Ge=je=-1.1}function wo(){var r=je;return je=-1.1,r}function Eo(r){0<=r&&(je=r)}function yi(){var r=un;return un=-0,r}function vi(r){0<=r&&(un=r)}function xi(){var r=on;return on=null,r}function $i(){var r=hn;return hn=!1,r}function WS(r){Hr=_n(),0>r.actualStartTime&&(r.actualStartTime=Hr)}function YS(r){if(0<=Hr){var o=_n()-Hr;r.actualDuration+=o,r.selfBaseDuration=o,Hr=-1}}function e5(r){if(0<=Hr){var o=_n()-Hr;r.actualDuration+=o,Hr=-1}}function Si(){if(0<=Hr){var r=_n(),o=r-Hr;Hr=-1,Su+=o,un+=o,Ge=r}}function t5(r){on===null&&(on=[]),on.push(r),Es===null&&(Es=[]),Es.push(r)}function Ci(){Hr=_n(),0>je&&(je=Hr)}function Mh(r){for(var o=r.child;o;)r.actualDuration+=o.actualDuration,o=o.sibling}function nq(r,o){if(vm===null){var s=vm=[];pw=0,Eu=oC(),Df={status:"pending",value:void 0,then:function(d){s.push(d)}}}return pw++,o.then(n5,n5),o}function n5(){if(--pw===0&&(-1<aa||(Ts=-1.1),vm!==null)){Df!==null&&(Df.status="fulfilled");var r=vm;vm=null,Eu=0,Df=null;for(var o=0;o<r.length;o++)(0,r[o])()}}function rq(r,o){var s=[],d={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return r.then(function(){d.status="fulfilled",d.value=o;for(var p=0;p<s.length;p++)(0,s[p])(o)},function(p){d.status="rejected",d.reason=p;for(p=0;p<s.length;p++)(0,s[p])(void 0)}),d}function JS(){var r=Tu.current;return r!==null?r:jt.pooledCache}function f0(r,o){o===null?ie(Tu,Tu.current,r):ie(Tu,o.pool,r)}function r5(){var r=JS();return r===null?null:{parent:Ln._currentValue,pool:r}}function o5(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function a5(r){return r=r.status,r==="fulfilled"||r==="rejected"}function i5(r,o,s){oe.actQueue!==null&&(oe.didUsePromise=!0);var d=r.thenables;if(s=d[s],s===void 0?d.push(o):s!==o&&(r.didWarnAboutUncachedPromise||(r.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.")),o.then(ds,ds),o=s),o._debugInfo===void 0){r=performance.now(),d=o.displayName;var p={name:typeof d==="string"?d:"Promise",start:r,end:r,value:o};o._debugInfo=[{awaited:p}],o.status!=="fulfilled"&&o.status!=="rejected"&&(r=function(){p.end=performance.now()},o.then(r,r))}switch(o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,l5(r),r;default:if(typeof o.status==="string")o.then(ds,ds);else{if(r=jt,r!==null&&100<r.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.");r=o,r.status="pending",r.then(function(g){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=g}},function(g){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=g}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,l5(r),r}throw ku=o,Tm=!0,Pf}}function Tl(r){try{return HW(r)}catch(o){if(o!==null&&typeof o==="object"&&typeof o.then==="function")throw ku=o,Tm=!0,Pf;throw o}}function s5(){if(ku===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var r=ku;return ku=null,Tm=!1,r}function l5(r){if(r===Pf||r===Ty)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 sr(r){var o=lt;return r!=null&&(lt=o===null?r:o.concat(r)),o}function XS(){var r=lt;if(r!=null){for(var o=r.length-1;0<=o;o--)if(r[o].name!=null){var s=r[o].debugTask;if(s!=null)return s}}return null}function p0(r,o,s){for(var d=Object.keys(r.props),p=0;p<d.length;p++){var g=d[p];if(g!=="children"&&g!=="key"){o===null&&(o=a0(r,s.mode,0),o._debugInfo=lt,o.return=s),me(o,function(x){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x)},g);break}}}function h0(r){var o=Rm;return Rm+=1,Lf===null&&(Lf=o5()),i5(Lf,r,o)}function Nh(r,o){o=o.props.ref,r.ref=o!==void 0?o:null}function c5(r,o){if(o.$$typeof===vG)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 r=Object.prototype.toString.call(o),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}function m0(r,o){var s=XS();s!==null?s.run(c5.bind(null,r,o)):c5(r,o)}function u5(r,o){var s=Y(r)||"Component";vO[s]||(vO[s]=!0,o=o.displayName||o.name||"Component",r.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)`,o,o,o):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>`,o,o,s,o,s))}function g0(r,o){var s=XS();s!==null?s.run(u5.bind(null,r,o)):u5(r,o)}function d5(r,o){var s=Y(r)||"Component";xO[s]||(xO[s]=!0,o=String(o),r.tag===3?console.error(`Symbols are not valid as a React child.
|
|
104
|
+
root.render(%s)`,o):console.error(`Symbols are not valid as a React child.
|
|
105
|
+
<%s>%s</%s>`,s,o,s))}function b0(r,o){var s=XS();s!==null?s.run(d5.bind(null,r,o)):d5(r,o)}function f5(r){function o(I,F){if(r){var j=I.deletions;j===null?(I.deletions=[F],I.flags|=16):j.push(F)}}function s(I,F){if(!r)return null;for(;F!==null;)o(I,F),F=F.sibling;return null}function d(I){for(var F=new Map;I!==null;)I.key!==null?F.set(I.key,I):F.set(I.index,I),I=I.sibling;return F}function p(I,F){return I=fs(I,F),I.index=0,I.sibling=null,I}function g(I,F,j){if(I.index=j,!r)return I.flags|=1048576,F;if(j=I.alternate,j!==null)return j=j.index,j<F?(I.flags|=67108866,F):j;return I.flags|=67108866,F}function x(I){return r&&I.alternate===null&&(I.flags|=67108866),I}function C(I,F,j,se){if(F===null||F.tag!==6)return F=zS(j,I.mode,se),F.return=I,F._debugOwner=I,F._debugTask=I._debugTask,F._debugInfo=lt,F;return F=p(F,j),F.return=I,F._debugInfo=lt,F}function R(I,F,j,se){var Te=j.type;if(Te===mf)return F=q(I,F,j.props.children,se,j.key),p0(j,F,I),F;if(F!==null&&(F.elementType===Te||UA(F,j)||typeof Te==="object"&&Te!==null&&Te.$$typeof===Ao&&Tl(Te)===F.type))return F=p(F,j.props),Nh(F,j),F.return=I,F._debugOwner=j._owner,F._debugInfo=lt,F;return F=a0(j,I.mode,se),Nh(F,j),F.return=I,F._debugInfo=lt,F}function A(I,F,j,se){if(F===null||F.tag!==4||F.stateNode.containerInfo!==j.containerInfo||F.stateNode.implementation!==j.implementation)return F=HS(j,I.mode,se),F.return=I,F._debugInfo=lt,F;return F=p(F,j.children||[]),F.return=I,F._debugInfo=lt,F}function q(I,F,j,se,Te){if(F===null||F.tag!==7)return F=lu(j,I.mode,se,Te),F.return=I,F._debugOwner=I,F._debugTask=I._debugTask,F._debugInfo=lt,F;return F=p(F,j),F.return=I,F._debugInfo=lt,F}function G(I,F,j){if(typeof F==="string"&&F!==""||typeof F==="number"||typeof F==="bigint")return F=zS(""+F,I.mode,j),F.return=I,F._debugOwner=I,F._debugTask=I._debugTask,F._debugInfo=lt,F;if(typeof F==="object"&&F!==null){switch(F.$$typeof){case Mi:return j=a0(F,I.mode,j),Nh(j,F),j.return=I,I=sr(F._debugInfo),j._debugInfo=lt,lt=I,j;case hf:return F=HS(F,I.mode,j),F.return=I,F._debugInfo=lt,F;case Ao:var se=sr(F._debugInfo);return F=Tl(F),I=G(I,F,j),lt=se,I}if(Gn(F)||V(F))return j=lu(F,I.mode,j,null),j.return=I,j._debugOwner=I,j._debugTask=I._debugTask,I=sr(F._debugInfo),j._debugInfo=lt,lt=I,j;if(typeof F.then==="function")return se=sr(F._debugInfo),I=G(I,h0(F),j),lt=se,I;if(F.$$typeof===Ni)return G(I,c0(I,F),j);m0(I,F)}return typeof F==="function"&&g0(I,F),typeof F==="symbol"&&b0(I,F),null}function B(I,F,j,se){var Te=F!==null?F.key:null;if(typeof j==="string"&&j!==""||typeof j==="number"||typeof j==="bigint")return Te!==null?null:C(I,F,""+j,se);if(typeof j==="object"&&j!==null){switch(j.$$typeof){case Mi:return j.key===Te?(Te=sr(j._debugInfo),I=R(I,F,j,se),lt=Te,I):null;case hf:return j.key===Te?A(I,F,j,se):null;case Ao:return Te=sr(j._debugInfo),j=Tl(j),I=B(I,F,j,se),lt=Te,I}if(Gn(j)||V(j)){if(Te!==null)return null;return Te=sr(j._debugInfo),I=q(I,F,j,se,null),lt=Te,I}if(typeof j.then==="function")return Te=sr(j._debugInfo),I=B(I,F,h0(j),se),lt=Te,I;if(j.$$typeof===Ni)return B(I,F,c0(I,j),se);m0(I,j)}return typeof j==="function"&&g0(I,j),typeof j==="symbol"&&b0(I,j),null}function ee(I,F,j,se,Te){if(typeof se==="string"&&se!==""||typeof se==="number"||typeof se==="bigint")return I=I.get(j)||null,C(F,I,""+se,Te);if(typeof se==="object"&&se!==null){switch(se.$$typeof){case Mi:return j=I.get(se.key===null?j:se.key)||null,I=sr(se._debugInfo),F=R(F,j,se,Te),lt=I,F;case hf:return I=I.get(se.key===null?j:se.key)||null,A(F,I,se,Te);case Ao:var Qe=sr(se._debugInfo);return se=Tl(se),F=ee(I,F,j,se,Te),lt=Qe,F}if(Gn(se)||V(se))return j=I.get(j)||null,I=sr(se._debugInfo),F=q(F,j,se,Te,null),lt=I,F;if(typeof se.then==="function")return Qe=sr(se._debugInfo),F=ee(I,F,j,h0(se),Te),lt=Qe,F;if(se.$$typeof===Ni)return ee(I,F,j,c0(F,se),Te);m0(F,se)}return typeof se==="function"&&g0(F,se),typeof se==="symbol"&&b0(F,se),null}function $e(I,F,j,se){if(typeof j!=="object"||j===null)return se;switch(j.$$typeof){case Mi:case hf:m(I,F,j);var Te=j.key;if(typeof Te!=="string")break;if(se===null){se=new Set,se.add(Te);break}if(!se.has(Te)){se.add(Te);break}me(F,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.",Te)});break;case Ao:j=Tl(j),$e(I,F,j,se)}return se}function Ae(I,F,j,se){for(var Te=null,Qe=null,Ue=null,Be=F,ot=F=0,Qt=null;Be!==null&&ot<j.length;ot++){Be.index>ot?(Qt=Be,Be=null):Qt=Be.sibling;var Mn=B(I,Be,j[ot],se);if(Mn===null){Be===null&&(Be=Qt);break}Te=$e(I,Mn,j[ot],Te),r&&Be&&Mn.alternate===null&&o(I,Be),F=g(Mn,F,ot),Ue===null?Qe=Mn:Ue.sibling=Mn,Ue=Mn,Be=Qt}if(ot===j.length)return s(I,Be),$t&&ps(I,ot),Qe;if(Be===null){for(;ot<j.length;ot++)Be=G(I,j[ot],se),Be!==null&&(Te=$e(I,Be,j[ot],Te),F=g(Be,F,ot),Ue===null?Qe=Be:Ue.sibling=Be,Ue=Be);return $t&&ps(I,ot),Qe}for(Be=d(Be);ot<j.length;ot++)Qt=ee(Be,I,ot,j[ot],se),Qt!==null&&(Te=$e(I,Qt,j[ot],Te),r&&Qt.alternate!==null&&Be.delete(Qt.key===null?ot:Qt.key),F=g(Qt,F,ot),Ue===null?Qe=Qt:Ue.sibling=Qt,Ue=Qt);return r&&Be.forEach(function(Ls){return o(I,Ls)}),$t&&ps(I,ot),Qe}function Wt(I,F,j,se){if(j==null)throw Error("An iterable object provided no iterator.");for(var Te=null,Qe=null,Ue=F,Be=F=0,ot=null,Qt=null,Mn=j.next();Ue!==null&&!Mn.done;Be++,Mn=j.next()){Ue.index>Be?(ot=Ue,Ue=null):ot=Ue.sibling;var Ls=B(I,Ue,Mn.value,se);if(Ls===null){Ue===null&&(Ue=ot);break}Qt=$e(I,Ls,Mn.value,Qt),r&&Ue&&Ls.alternate===null&&o(I,Ue),F=g(Ls,F,Be),Qe===null?Te=Ls:Qe.sibling=Ls,Qe=Ls,Ue=ot}if(Mn.done)return s(I,Ue),$t&&ps(I,Be),Te;if(Ue===null){for(;!Mn.done;Be++,Mn=j.next())Ue=G(I,Mn.value,se),Ue!==null&&(Qt=$e(I,Ue,Mn.value,Qt),F=g(Ue,F,Be),Qe===null?Te=Ue:Qe.sibling=Ue,Qe=Ue);return $t&&ps(I,Be),Te}for(Ue=d(Ue);!Mn.done;Be++,Mn=j.next())ot=ee(Ue,I,Be,Mn.value,se),ot!==null&&(Qt=$e(I,ot,Mn.value,Qt),r&&ot.alternate!==null&&Ue.delete(ot.key===null?Be:ot.key),F=g(ot,F,Be),Qe===null?Te=ot:Qe.sibling=ot,Qe=ot);return r&&Ue.forEach(function(uY){return o(I,uY)}),$t&&ps(I,Be),Te}function Et(I,F,j,se){if(typeof j==="object"&&j!==null&&j.type===mf&&j.key===null&&(p0(j,null,I),j=j.props.children),typeof j==="object"&&j!==null){switch(j.$$typeof){case Mi:var Te=sr(j._debugInfo);e:{for(var Qe=j.key;F!==null;){if(F.key===Qe){if(Qe=j.type,Qe===mf){if(F.tag===7){s(I,F.sibling),se=p(F,j.props.children),se.return=I,se._debugOwner=j._owner,se._debugInfo=lt,p0(j,se,I),I=se;break e}}else if(F.elementType===Qe||UA(F,j)||typeof Qe==="object"&&Qe!==null&&Qe.$$typeof===Ao&&Tl(Qe)===F.type){s(I,F.sibling),se=p(F,j.props),Nh(se,j),se.return=I,se._debugOwner=j._owner,se._debugInfo=lt,I=se;break e}s(I,F);break}else o(I,F);F=F.sibling}j.type===mf?(se=lu(j.props.children,I.mode,se,j.key),se.return=I,se._debugOwner=I,se._debugTask=I._debugTask,se._debugInfo=lt,p0(j,se,I),I=se):(se=a0(j,I.mode,se),Nh(se,j),se.return=I,se._debugInfo=lt,I=se)}return I=x(I),lt=Te,I;case hf:e:{Te=j;for(j=Te.key;F!==null;){if(F.key===j)if(F.tag===4&&F.stateNode.containerInfo===Te.containerInfo&&F.stateNode.implementation===Te.implementation){s(I,F.sibling),se=p(F,Te.children||[]),se.return=I,I=se;break e}else{s(I,F);break}else o(I,F);F=F.sibling}se=HS(Te,I.mode,se),se.return=I,I=se}return x(I);case Ao:return Te=sr(j._debugInfo),j=Tl(j),I=Et(I,F,j,se),lt=Te,I}if(Gn(j))return Te=sr(j._debugInfo),I=Ae(I,F,j,se),lt=Te,I;if(V(j)){if(Te=sr(j._debugInfo),Qe=V(j),typeof Qe!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ue=Qe.call(j);if(Ue===j){if(I.tag!==0||Object.prototype.toString.call(I.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ue)!=="[object Generator]")bO||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."),bO=!0}else j.entries!==Qe||bw||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),bw=!0);return I=Wt(I,F,Ue,se),lt=Te,I}if(typeof j.then==="function")return Te=sr(j._debugInfo),I=Et(I,F,h0(j),se),lt=Te,I;if(j.$$typeof===Ni)return Et(I,F,c0(I,j),se);m0(I,j)}if(typeof j==="string"&&j!==""||typeof j==="number"||typeof j==="bigint")return Te=""+j,F!==null&&F.tag===6?(s(I,F.sibling),se=p(F,Te),se.return=I,I=se):(s(I,F),se=zS(Te,I.mode,se),se.return=I,se._debugOwner=I,se._debugTask=I._debugTask,se._debugInfo=lt,I=se),x(I);return typeof j==="function"&&g0(I,j),typeof j==="symbol"&&b0(I,j),s(I,F)}return function(I,F,j,se){var Te=lt;lt=null;try{Rm=0;var Qe=Et(I,F,j,se);return Lf=null,Qe}catch(Qt){if(Qt===Pf||Qt===Ty)throw Qt;var Ue=y(29,Qt,null,I.mode);Ue.lanes=se,Ue.return=I;var Be=Ue._debugInfo=lt;if(Ue._debugOwner=I._debugOwner,Ue._debugTask=I._debugTask,Be!=null){for(var ot=Be.length-1;0<=ot;ot--)if(typeof Be[ot].stack==="string"){Ue._debugOwner=Be[ot],Ue._debugTask=Be[ot].debugTask;break}}return Ue}finally{lt=Te}}}function p5(r,o){var s=Gn(r);return r=!s&&typeof V(r)==="function",s||r?(s=s?"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>",s,o,s),!1):!0}function QS(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ZS(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Rl(r){return{lane:r,tag:SO,payload:null,callback:null,next:null}}function kl(r,o,s){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,vw===d&&!EO){var p=Y(r);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`,p),EO=!0}if((kt&Yn)!==nr)return p=d.pending,p===null?o.next=o:(o.next=p.next,p.next=o),d.pending=o,o=o0(r),FA(r,null,s),o;return r0(r,d,o,s),o0(r)}function Oh(r,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194048)!==0)){var d=o.lanes;d&=r.pendingLanes,s|=d,o.lanes=s,tu(r,s)}}function y0(r,o){var{updateQueue:s,alternate:d}=r;if(d!==null&&(d=d.updateQueue,s===d)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=x:g=g.next=x,s=s.next}while(s!==null);g===null?p=g=o:g=g.next=o}else p=g=o;s={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:d.shared,callbacks:d.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=o:r.next=o,s.lastBaseUpdate=o}function Dh(){if(xw){var r=Df;if(r!==null)throw r}}function Ph(r,o,s,d){xw=!1;var p=r.updateQueue;Yl=!1,vw=p.shared;var{firstBaseUpdate:g,lastBaseUpdate:x}=p,C=p.shared.pending;if(C!==null){p.shared.pending=null;var R=C,A=R.next;R.next=null,x===null?g=A:x.next=A,x=R;var q=r.alternate;q!==null&&(q=q.updateQueue,C=q.lastBaseUpdate,C!==x&&(C===null?q.firstBaseUpdate=A:C.next=A,q.lastBaseUpdate=R))}if(g!==null){var G=p.baseState;x=0,q=A=R=null,C=g;do{var B=C.lane&-536870913,ee=B!==C.lane;if(ee?(ct&B)===B:(d&B)===B){B!==0&&B===Eu&&(xw=!0),q!==null&&(q=q.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{B=r;var $e=C,Ae=o,Wt=s;switch($e.tag){case CO:if($e=$e.payload,typeof $e==="function"){Nf=!0;var Et=$e.call(Wt,G,Ae);if(B.mode&Rr){qt(!0);try{$e.call(Wt,G,Ae)}finally{qt(!1)}}Nf=!1,G=Et;break e}G=$e;break e;case yw:B.flags=B.flags&-65537|128;case SO:if(Et=$e.payload,typeof Et==="function"){if(Nf=!0,$e=Et.call(Wt,G,Ae),B.mode&Rr){qt(!0);try{Et.call(Wt,G,Ae)}finally{qt(!1)}}Nf=!1}else $e=Et;if($e===null||$e===void 0)break e;G=pt({},G,$e);break e;case wO:Yl=!0}}B=C.callback,B!==null&&(r.flags|=64,ee&&(r.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[B]:ee.push(B))}else ee={lane:B,tag:C.tag,payload:C.payload,callback:C.callback,next:null},q===null?(A=q=ee,R=G):q=q.next=ee,x|=B;if(C=C.next,C===null)if(C=p.shared.pending,C===null)break;else ee=C,C=ee.next,ee.next=null,p.lastBaseUpdate=ee,p.shared.pending=null}while(1);q===null&&(R=G),p.baseState=R,p.firstBaseUpdate=A,p.lastBaseUpdate=q,g===null&&(p.shared.lanes=0),Ql|=x,r.lanes=x,r.memoizedState=G}vw=null}function h5(r,o){if(typeof r!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+r);r.call(o)}function oq(r,o){var s=r.shared.hiddenCallbacks;if(s!==null)for(r.shared.hiddenCallbacks=null,r=0;r<s.length;r++)h5(s[r],o)}function m5(r,o){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)h5(s[r],o)}function g5(r,o){var s=Fi;ie(ky,s,r),ie(_f,o,r),Fi=s|o.baseLanes}function e2(r){ie(ky,Fi,r),ie(_f,_f.current,r)}function t2(r){Fi=ky.current,ue(_f,r),ue(ky,r)}function Al(r){var o=r.alternate;ie(An,An.current&If,r),ie(Do,r,r),ia===null&&(o===null||_f.current!==null?ia=r:o.memoizedState!==null&&(ia=r))}function n2(r){ie(An,An.current,r),ie(Do,r,r),ia===null&&(ia=r)}function b5(r){r.tag===22?(ie(An,An.current,r),ie(Do,r,r),ia===null&&(ia=r)):Ml(r)}function Ml(r){ie(An,An.current,r),ie(Do,Do.current,r)}function To(r){ue(Do,r),ia===r&&(ia=null),ue(An,r)}function v0(r){for(var o=r;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||mC(s)||gC(s)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}function ft(){var r=ne;la===null?la=[r]:la.push(r)}function fe(){var r=ne;if(la!==null&&(Ms++,la[Ms]!==r)){var o=Y(Xe);if(!TO.has(o)&&(TO.add(o),la!==null)){for(var s="",d=0;d<=Ms;d++){var p=la[d],g=d===Ms?r:p;for(p=d+1+". "+p;30>p.length;)p+=" ";p+=g+`
|
|
108
|
+
`,s+=p}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
|
+
`,o,s)}}}function ef(r){r===void 0||r===null||Gn(r)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",ne,typeof r)}function x0(){var r=Y(Xe);kO.has(r)||(kO.add(r),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",r))}function vn(){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 r2(r,o){if(Mm)return!1;if(o===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.",ne),!1;r.length!==o.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`,ne,"["+o.join(", ")+"]","["+r.join(", ")+"]");for(var s=0;s<o.length&&s<r.length;s++)if(!zr(r[s],o[s]))return!1;return!0}function o2(r,o,s,d,p,g){if(ks=g,Xe=o,la=r!==null?r._debugHookTypes:null,Ms=-1,Mm=r!==null&&r.type!==o.type,Object.prototype.toString.call(s)==="[object AsyncFunction]"||Object.prototype.toString.call(s)==="[object AsyncGeneratorFunction]")g=Y(Xe),$w.has(g)||($w.add(g),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.",g===null?"An unknown Component":"<"+g+">"));o.memoizedState=null,o.updateQueue=null,o.lanes=0,oe.H=r!==null&&r.memoizedState!==null?Cw:la!==null?AO:Sw,Mu=g=(o.mode&Rr)!==We;var x=hw(s,d,p);if(Mu=!1,zf&&(x=a2(o,s,d,p)),g){qt(!0);try{x=a2(o,s,d,p)}finally{qt(!1)}}return y5(r,o),x}function y5(r,o){o._debugHookTypes=la,o.dependencies===null?As!==null&&(o.dependencies={lanes:0,firstContext:null,_debugThenableState:As}):o.dependencies._debugThenableState=As,oe.H=Nm;var s=Vt!==null&&Vt.next!==null;if(ks=0,la=ne=In=Vt=Xe=null,Ms=-1,r!==null&&(r.flags&65011712)!==(o.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),My=!1,Am=0,As=null,s)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");r===null||Bn||(r=r.dependencies,r!==null&&l0(r)&&(Bn=!0)),Tm?(Tm=!1,r=!0):r=!1,r&&(o=Y(o)||"Unknown",RO.has(o)||$w.has(o)||(RO.add(o),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 a2(r,o,s,d){Xe=r;var p=0;do{if(zf&&(As=null),Am=0,zf=!1,p>=UW)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(p+=1,Mm=!1,In=Vt=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}Ms=-1,oe.H=MO,g=hw(o,s,d)}while(zf);return g}function aq(){var r=oe.H,o=r.useState()[0];return o=typeof o.then==="function"?Lh(o):o,r=r.useState()[0],(Vt!==null?Vt.memoizedState:null)!==r&&(Xe.flags|=1024),o}function i2(){var r=Ny!==0;return Ny=0,r}function s2(r,o,s){o.updateQueue=r.updateQueue,o.flags=(o.mode&Ha)!==We?o.flags&-402655237:o.flags&-2053,r.lanes&=~s}function l2(r){if(My){for(r=r.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}My=!1}ks=0,la=In=Vt=Xe=null,Ms=-1,ne=null,zf=!1,Am=Ny=0,As=null}function Lr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return In===null?Xe.memoizedState=In=r:In=In.next=r,In}function zt(){if(Vt===null){var r=Xe.alternate;r=r!==null?r.memoizedState:null}else r=Vt.next;var o=In===null?Xe.memoizedState:In.next;if(o!==null)In=o,Vt=r;else{if(r===null){if(Xe.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.")}Vt=r,r={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},In===null?Xe.memoizedState=In=r:In=In.next=r}return In}function $0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lh(r){var o=Am;return Am+=1,As===null&&(As=o5()),r=i5(As,r,o),o=Xe,(In===null?o.memoizedState:In.next)===null&&(o=o.alternate,oe.H=o!==null&&o.memoizedState!==null?Cw:Sw),r}function Nl(r){if(r!==null&&typeof r==="object"){if(typeof r.then==="function")return Lh(r);if(r.$$typeof===Ni)return rn(r)}throw Error("An unsupported type was passed to use(): "+String(r))}function pu(r){var o=null,s=Xe.updateQueue;if(s!==null&&(o=s.memoCache),o==null){var d=Xe.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(o={data:d.data.map(function(p){return p.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),s===null&&(s=$0(),Xe.updateQueue=s),s.memoCache=o,s=o.data[o.index],s===void 0||Mm)for(s=o.data[o.index]=Array(r),d=0;d<r;d++)s[d]=xG;else s.length!==r&&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.",s.length,r);return o.index++,s}function _a(r,o){return typeof o==="function"?o(r):o}function c2(r,o,s){var d=Lr();if(s!==void 0){var p=s(o);if(Mu){qt(!0);try{s(o)}finally{qt(!1)}}}else p=o;return d.memoizedState=d.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},d.queue=r,r=r.dispatch=uq.bind(null,Xe,r),[d.memoizedState,r]}function tf(r){var o=zt();return u2(o,Vt,r)}function u2(r,o,s){var d=r.queue;if(d===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");d.lastRenderedReducer=s;var p=r.baseQueue,g=d.pending;if(g!==null){if(p!==null){var x=p.next;p.next=g.next,g.next=x}o.baseQueue!==p&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),o.baseQueue=p=g,d.pending=null}if(g=r.baseState,p===null)r.memoizedState=g;else{o=p.next;var C=x=null,R=null,A=o,q=!1;do{var G=A.lane&-536870913;if(G!==A.lane?(ct&G)===G:(ks&G)===G){var B=A.revertLane;if(B===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),G===Eu&&(q=!0);else if((ks&B)===B){A=A.next,B===Eu&&(q=!0);continue}else G={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},R===null?(C=R=G,x=g):R=R.next=G,Xe.lanes|=B,Ql|=B;G=A.action,Mu&&s(g,G),g=A.hasEagerState?A.eagerState:s(g,G)}else B={lane:G,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},R===null?(C=R=B,x=g):R=R.next=B,Xe.lanes|=G,Ql|=G;A=A.next}while(A!==null&&A!==o);if(R===null?x=g:R.next=C,!zr(g,r.memoizedState)&&(Bn=!0,q&&(s=Df,s!==null)))throw s;r.memoizedState=g,r.baseState=x,r.baseQueue=R,d.lastRenderedState=g}return p===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function _h(r){var o=zt(),s=o.queue;if(s===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");s.lastRenderedReducer=r;var{dispatch:d,pending:p}=s,g=o.memoizedState;if(p!==null){s.pending=null;var x=p=p.next;do g=r(g,x.action),x=x.next;while(x!==p);zr(g,o.memoizedState)||(Bn=!0),o.memoizedState=g,o.baseQueue===null&&(o.baseState=g),s.lastRenderedState=g}return[g,d]}function d2(r,o,s){var d=Xe,p=Lr();if($t){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var g=s();Bf||g===s()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Bf=!0)}else{if(g=o(),Bf||(s=o(),zr(g,s)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Bf=!0)),jt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ct&127)!==0||v5(d,o,g)}return p.memoizedState=g,s={value:g,getSnapshot:o},p.queue=s,E0($5.bind(null,d,s,r),[r]),d.flags|=2048,rf(sa|Ur,{destroy:void 0},x5.bind(null,d,s,g,o),null),g}function S0(r,o,s){var d=Xe,p=zt(),g=$t;if(g){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");s=s()}else if(s=o(),!Bf){var x=o();zr(s,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Bf=!0)}if(x=!zr((Vt||p).memoizedState,s))p.memoizedState=s,Bn=!0;p=p.queue;var C=$5.bind(null,d,p,r);if(to(2048,Ur,C,[r]),p.getSnapshot!==o||x||In!==null&&In.memoizedState.tag&sa){if(d.flags|=2048,rf(sa|Ur,{destroy:void 0},x5.bind(null,d,p,s,o),null),jt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");g||(ks&127)!==0||v5(d,o,s)}return s}function v5(r,o,s){r.flags|=16384,r={getSnapshot:o,value:s},o=Xe.updateQueue,o===null?(o=$0(),Xe.updateQueue=o,o.stores=[r]):(s=o.stores,s===null?o.stores=[r]:s.push(r))}function x5(r,o,s,d){o.value=s,o.getSnapshot=d,S5(o)&&C5(r)}function $5(r,o,s){return s(function(){S5(o)&&(bi(2,"updateSyncExternalStore()",r),C5(r))})}function S5(r){var o=r.getSnapshot;r=r.value;try{var s=o();return!zr(r,s)}catch(d){return!0}}function C5(r){var o=Er(r,2);o!==null&&pn(o,r,2)}function f2(r){var o=Lr();if(typeof r==="function"){var s=r;if(r=s(),Mu){qt(!0);try{s()}finally{qt(!1)}}}return o.memoizedState=o.baseState=r,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:r},o}function p2(r){r=f2(r);var o=r.queue,s=U5.bind(null,Xe,o);return o.dispatch=s,[r.memoizedState,s]}function h2(r){var o=Lr();o.memoizedState=o.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=s,o=k2.bind(null,Xe,!0,s),s.dispatch=o,[r,o]}function w5(r,o){var s=zt();return E5(s,Vt,r,o)}function E5(r,o,s,d){return r.baseState=s,u2(r,Vt,typeof d==="function"?d:_a)}function T5(r,o){var s=zt();if(Vt!==null)return E5(s,Vt,r,o);return s.baseState=r,[r,s.queue.dispatch]}function iq(r,o,s,d,p){if(N0(r))throw Error("Cannot update form state while rendering.");if(r=o.action,r!==null){var g={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){g.listeners.push(x)}};oe.T!==null?s(!0):g.isTransition=!1,d(g),s=o.pending,s===null?(g.next=o.pending=g,R5(o,g)):(g.next=s.next,o.pending=s.next=g)}}function R5(r,o){var{action:s,payload:d}=o,p=r.state;if(o.isTransition){var g=oe.T,x={};x._updatedFibers=new Set,oe.T=x;try{var C=s(p,d),R=oe.S;R!==null&&R(x,C),k5(r,o,C)}catch(A){m2(r,o,A)}finally{g!==null&&x.types!==null&&(g.types!==null&&g.types!==x.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."),g.types=x.types),oe.T=g,g===null&&x._updatedFibers&&(r=x._updatedFibers.size,x._updatedFibers.clear(),10<r&&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{x=s(p,d),k5(r,o,x)}catch(A){m2(r,o,A)}}function k5(r,o,s){s!==null&&typeof s==="object"&&typeof s.then==="function"?(oe.asyncTransitions++,s.then(M0,M0),s.then(function(d){A5(r,o,d)},function(d){return m2(r,o,d)}),o.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.")):A5(r,o,s)}function A5(r,o,s){o.status="fulfilled",o.value=s,M5(o),r.state=s,o=r.pending,o!==null&&(s=o.next,s===o?r.pending=null:(s=s.next,o.next=s,R5(r,s)))}function m2(r,o,s){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do o.status="rejected",o.reason=s,M5(o),o=o.next;while(o!==d)}r.action=null}function M5(r){r=r.listeners;for(var o=0;o<r.length;o++)(0,r[o])()}function N5(r,o){return o}function nf(r,o){if($t){var s=jt.formState;if(s!==null){e:{var d=Xe;if($t){if(Xt){t:{var p=Xt;for(var g=oa;p.nodeType!==8;){if(!g){p=null;break t}if(p=ko(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g===qw||g===mD?p:null}if(p){Xt=ko(p.nextSibling),d=p.data===qw;break e}}wl(d)}d=!1}d&&(o=s[0])}}return s=Lr(),s.memoizedState=s.baseState=o,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:N5,lastRenderedState:o},s.queue=d,s=U5.bind(null,Xe,d),d.dispatch=s,d=f2(!1),g=k2.bind(null,Xe,!1,d.queue),d=Lr(),p={state:o,dispatch:null,action:r,pending:null},d.queue=p,s=iq.bind(null,Xe,p,g,s),p.dispatch=s,d.memoizedState=r,[o,s,!1]}function C0(r){var o=zt();return O5(o,Vt,r)}function O5(r,o,s){if(o=u2(r,o,N5)[0],r=tf(_a)[0],typeof o==="object"&&o!==null&&typeof o.then==="function")try{var d=Lh(o)}catch(x){if(x===Pf)throw Ty;throw x}else d=o;o=zt();var p=o.queue,g=p.dispatch;return s!==o.memoizedState&&(Xe.flags|=2048,rf(sa|Ur,{destroy:void 0},sq.bind(null,p,s),null)),[d,g,r]}function sq(r,o){r.action=o}function w0(r){var o=zt(),s=Vt;if(s!==null)return O5(o,s,r);zt(),o=o.memoizedState,s=zt();var d=s.queue.dispatch;return s.memoizedState=r,[o,d,!1]}function rf(r,o,s,d){return r={tag:r,create:s,deps:d,inst:o,next:null},o=Xe.updateQueue,o===null&&(o=$0(),Xe.updateQueue=o),s=o.lastEffect,s===null?o.lastEffect=r.next=r:(d=s.next,s.next=r,r.next=d,o.lastEffect=r),r}function g2(r){var o=Lr();return r={current:r},o.memoizedState=r}function hu(r,o,s,d){var p=Lr();Xe.flags|=r,p.memoizedState=rf(sa|o,{destroy:void 0},s,d===void 0?null:d)}function to(r,o,s,d){var p=zt();d=d===void 0?null:d;var g=p.memoizedState.inst;Vt!==null&&d!==null&&r2(d,Vt.memoizedState.deps)?p.memoizedState=rf(o,g,s,d):(Xe.flags|=r,p.memoizedState=rf(sa|o,g,s,d))}function E0(r,o){(Xe.mode&Ha)!==We?hu(276826112,Ur,r,o):hu(8390656,Ur,r,o)}function lq(r){Xe.flags|=4;var o=Xe.updateQueue;if(o===null)o=$0(),Xe.updateQueue=o,o.events=[r];else{var s=o.events;s===null?o.events=[r]:s.push(r)}}function b2(r){var o=Lr(),s={impl:r};return o.memoizedState=s,function(){if((kt&Yn)!==nr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return s.impl.apply(void 0,arguments)}}function T0(r){var o=zt().memoizedState;return lq({ref:o,nextImpl:r}),function(){if((kt&Yn)!==nr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function y2(r,o){var s=4194308;return(Xe.mode&Ha)!==We&&(s|=134217728),hu(s,Po,r,o)}function D5(r,o){if(typeof o==="function"){r=r();var s=o(r);return function(){typeof s==="function"?s():o(null)}}if(o!==null&&o!==void 0)return o.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(o).join(", ")+"}"),r=r(),o.current=r,function(){o.current=null}}function v2(r,o,s){typeof o!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null"),s=s!==null&&s!==void 0?s.concat([r]):null;var d=4194308;(Xe.mode&Ha)!==We&&(d|=134217728),hu(d,Po,D5.bind(null,o,r),s)}function R0(r,o,s){typeof o!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null"),s=s!==null&&s!==void 0?s.concat([r]):null,to(4,Po,D5.bind(null,o,r),s)}function x2(r,o){return Lr().memoizedState=[r,o===void 0?null:o],r}function k0(r,o){var s=zt();o=o===void 0?null:o;var d=s.memoizedState;if(o!==null&&r2(o,d[1]))return d[0];return s.memoizedState=[r,o],r}function $2(r,o){var s=Lr();o=o===void 0?null:o;var d=r();if(Mu){qt(!0);try{r()}finally{qt(!1)}}return s.memoizedState=[d,o],d}function A0(r,o){var s=zt();o=o===void 0?null:o;var d=s.memoizedState;if(o!==null&&r2(o,d[1]))return d[0];if(d=r(),Mu){qt(!0);try{r()}finally{qt(!1)}}return s.memoizedState=[d,o],d}function S2(r,o){var s=Lr();return C2(s,r,o)}function P5(r,o){var s=zt();return _5(s,Vt.memoizedState,r,o)}function L5(r,o){var s=zt();return Vt===null?C2(s,r,o):_5(s,Vt.memoizedState,r,o)}function C2(r,o,s){if(s===void 0||(ks&1073741824)!==0&&(ct&261930)===0)return r.memoizedState=o;return r.memoizedState=s,r=IM(),Xe.lanes|=r,Ql|=r,s}function _5(r,o,s,d){if(zr(s,o))return s;if(_f.current!==null)return r=C2(r,s,d),zr(r,o)||(Bn=!0),r;if((ks&42)===0||(ks&1073741824)!==0&&(ct&261930)===0)return Bn=!0,r.memoizedState=s;return r=IM(),Xe.lanes|=r,Ql|=r,o}function M0(){oe.asyncTransitions--}function I5(r,o,s,d,p){var g=It.p;It.p=g!==0&&g<za?g:za;var x=oe.T,C={};C._updatedFibers=new Set,oe.T=C,k2(r,!1,o,s);try{var R=p(),A=oe.S;if(A!==null&&A(C,R),R!==null&&typeof R==="object"&&typeof R.then==="function"){oe.asyncTransitions++,R.then(M0,M0);var q=rq(R,d);Ih(r,o,q,Ro(r))}else Ih(r,o,d,Ro(r))}catch(G){Ih(r,o,{then:function(){},status:"rejected",reason:G},Ro(r))}finally{It.p=g,x!==null&&C.types!==null&&(x.types!==null&&x.types!==C.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."),x.types=C.types),oe.T=x,x===null&&C._updatedFibers&&(r=C._updatedFibers.size,C._updatedFibers.clear(),10<r&&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 w2(r,o,s,d){if(r.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var p=B5(r).queue;tq(r),I5(r,p,o,Fu,s===null?h:function(){return z5(r),s(d)})}function B5(r){var o=r.memoizedState;if(o!==null)return o;o={memoizedState:Fu,baseState:Fu,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:Fu},next:null};var s={};return o.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:s},next:null},r.memoizedState=o,r=r.alternate,r!==null&&(r.memoizedState=o),o}function z5(r){oe.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var o=B5(r);o.next===null&&(o=r.alternate.memoizedState),Ih(r,o.next.queue,{},Ro(r))}function E2(){var r=f2(!1);return r=I5.bind(null,Xe,r.queue,!0,!1),Lr().memoizedState=r,[!1,r]}function H5(){var r=tf(_a)[0],o=zt().memoizedState;return[typeof r==="boolean"?r:Lh(r),o]}function F5(){var r=_h(_a)[0],o=zt().memoizedState;return[typeof r==="boolean"?r:Lh(r),o]}function mu(){return rn(qm)}function T2(){var r=Lr(),o=jt.identifierPrefix;if($t){var s=Cs,d=Ss;s=(d&~(1<<32-_r(d)-1)).toString(32)+s,o="_"+o+"R_"+s,s=Ny++,0<s&&(o+="H"+s.toString(32)),o+="_"}else s=FW++,o="_"+o+"r_"+s.toString(32)+"_";return r.memoizedState=o}function R2(){return Lr().memoizedState=cq.bind(null,Xe)}function cq(r,o){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var d=Ro(s),p=Rl(d),g=kl(s,p,d);g!==null&&(bi(d,"refresh()",r),pn(g,s,d),Oh(g,s,d)),r=GS(),o!==null&&o!==void 0&&g!==null&&console.error("The seed argument is not enabled outside experimental channels."),p.payload={cache:r};return}s=s.return}}function uq(r,o,s){var d=arguments;typeof d[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()."),d=Ro(r);var p={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};N0(r)?V5(o,p):(p=LS(r,o,p,d),p!==null&&(bi(d,"dispatch()",r),pn(p,r,d),j5(p,o,d)))}function U5(r,o,s){var d=arguments;typeof d[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()."),d=Ro(r),Ih(r,o,s,d)&&bi(d,"setState()",r)}function Ih(r,o,s,d){var p={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(N0(r))V5(o,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=o.lastRenderedReducer,g!==null)){var x=oe.H;oe.H=Ua;try{var C=o.lastRenderedState,R=g(C,s);if(p.hasEagerState=!0,p.eagerState=R,zr(R,C))return r0(r,o,p,0),jt===null&&n0(),!1}catch(A){}finally{oe.H=x}}if(s=LS(r,o,p,d),s!==null)return pn(s,r,d),j5(s,o,d),!0}return!1}function k2(r,o,s,d){if(oe.T===null&&Eu===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."),d={lane:2,revertLane:oC(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},N0(r)){if(o)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else o=LS(r,s,d,2),o!==null&&(bi(2,"setOptimistic()",r),pn(o,r,2))}function N0(r){var o=r.alternate;return r===Xe||o!==null&&o===Xe}function V5(r,o){zf=My=!0;var s=r.pending;s===null?o.next=o:(o.next=s.next,s.next=o),r.pending=o}function j5(r,o,s){if((s&4194048)!==0){var d=o.lanes;d&=r.pendingLanes,s|=d,o.lanes=s,tu(r,s)}}function A2(r){if(r!==null&&typeof r!=="function"){var o=String(r);FO.has(o)||(FO.add(o),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",r))}}function M2(r,o,s,d){var p=r.memoizedState,g=s(d,p);if(r.mode&Rr){qt(!0);try{g=s(d,p)}finally{qt(!1)}}g===void 0&&(o=P(o)||"Component",IO.has(o)||(IO.add(o),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",o))),p=g===null||g===void 0?p:pt({},p,g),r.memoizedState=p,r.lanes===0&&(r.updateQueue.baseState=p)}function K5(r,o,s,d,p,g,x){var C=r.stateNode;if(typeof C.shouldComponentUpdate==="function"){if(s=C.shouldComponentUpdate(d,g,x),r.mode&Rr){qt(!0);try{s=C.shouldComponentUpdate(d,g,x)}finally{qt(!1)}}return s===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",P(o)||"Component"),s}return o.prototype&&o.prototype.isPureReactComponent?!Eh(s,d)||!Eh(p,g):!0}function q5(r,o,s,d){var p=o.state;typeof o.componentWillReceiveProps==="function"&&o.componentWillReceiveProps(s,d),typeof o.UNSAFE_componentWillReceiveProps==="function"&&o.UNSAFE_componentWillReceiveProps(s,d),o.state!==p&&(r=Y(r)||"Component",OO.has(r)||(OO.add(r),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",r)),ww.enqueueReplaceState(o,o.state,null))}function gu(r,o){var s=o;if("ref"in o){s={};for(var d in o)d!=="ref"&&(s[d]=o[d])}if(r=r.defaultProps){s===o&&(s=pt({},s));for(var p in r)s[p]===void 0&&(s[p]=r[p])}return s}function G5(r){tw(r),console.warn(`%s
|
|
121
|
+
|
|
122
|
+
%s
|
|
123
|
+
`,Hf?"An error occurred in the <"+Hf+"> 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 W5(r){var o=Hf?"The above error occurred in the <"+Hf+"> component.":"The above error occurred in one of your React components.",s="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Ew||"Anonymous")+".");if(typeof r==="object"&&r!==null&&typeof r.environmentName==="string"){var d=r.environmentName;r=[`%o
|
|
125
|
+
|
|
126
|
+
%s
|
|
127
|
+
|
|
128
|
+
%s
|
|
129
|
+
`,r,o,s].slice(0),typeof r[0]==="string"?r.splice(0,1,CD+" "+r[0],wD,nv+d+nv,ED):r.splice(0,0,CD,wD,nv+d+nv,ED),r.unshift(console),d=lY.apply(console.error,r),d()}else console.error(`%o
|
|
130
|
+
|
|
131
|
+
%s
|
|
132
|
+
|
|
133
|
+
%s
|
|
134
|
+
`,r,o,s)}function Y5(r){tw(r)}function O0(r,o){try{Hf=o.source?Y(o.source):null,Ew=null;var s=o.value;if(oe.actQueue!==null)oe.thrownErrors.push(s);else{var d=r.onUncaughtError;d(s,{componentStack:o.stack})}}catch(p){setTimeout(function(){throw p})}}function J5(r,o,s){try{Hf=s.source?Y(s.source):null,Ew=Y(o);var d=r.onCaughtError;d(s.value,{componentStack:s.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function N2(r,o,s){return s=Rl(s),s.tag=yw,s.payload={element:null},s.callback=function(){me(o.source,O0,r,o)},s}function O2(r){return r=Rl(r),r.tag=yw,r}function D2(r,o,s,d){var p=s.type.getDerivedStateFromError;if(typeof p==="function"){var g=d.value;r.payload=function(){return p(g)},r.callback=function(){VA(s),me(d.source,J5,o,s,d)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch==="function"&&(r.callback=function(){VA(s),me(d.source,J5,o,s,d),typeof p!=="function"&&(ec===null?ec=new Set([this]):ec.add(this)),IW(this,d),typeof p==="function"||(s.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.",Y(s)||"Unknown")})}function dq(r,o,s,d,p){if(s.flags|=32768,Pi&&Kh(r,p),d!==null&&typeof d==="object"&&typeof d.then==="function"){if(o=s.alternate,o!==null&&Zd(o,s,p,!0),$t&&(Ii=!0),s=Do.current,s!==null){switch(s.tag){case 31:case 13:return ia===null?F0():s.alternate===null&&dn===Os&&(dn=Py),s.flags&=-257,s.flags|=65536,s.lanes=p,d===Ry?s.flags|=16384:(o=s.updateQueue,o===null?s.updateQueue=new Set([d]):o.add(d),eC(r,d,p)),!1;case 22:return s.flags|=65536,d===Ry?s.flags|=16384:(o=s.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([d])},s.updateQueue=o):(s=o.retryQueue,s===null?o.retryQueue=new Set([d]):s.add(d)),eC(r,d,p)),!1}throw Error("Unexpected Suspense handler tag ("+s.tag+"). This is a bug in React.")}return eC(r,d,p),F0(),!1}if($t)return Ii=!0,o=Do.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=p,d!==sw&&Rh(Co(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:d}),s))):(d!==sw&&Rh(Co(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:d}),s)),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,d=Co(d,s),p=N2(r.stateNode,d,p),y0(r,p),dn!==Jl&&(dn=Nu)),!1;var g=Co(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:d}),s);if(Im===null?Im=[g]:Im.push(g),dn!==Jl&&(dn=Nu),o===null)return!0;d=Co(d,s),s=o;do{switch(s.tag){case 3:return s.flags|=65536,r=p&-p,s.lanes|=r,r=N2(s.stateNode,d,r),y0(s,r),!1;case 1:if(o=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof o.getDerivedStateFromError==="function"||g!==null&&typeof g.componentDidCatch==="function"&&(ec===null||!ec.has(g))))return s.flags|=65536,p&=-p,s.lanes|=p,p=O2(p),D2(p,r,s,d),y0(s,p),!1}s=s.return}while(s!==null);return!1}function lr(r,o,s,d){o.child=r===null?$O(o,null,s,d):Au(o,r.child,s,d)}function X5(r,o,s,d,p){s=s.render;var g=o.ref;if("ref"in d){var x={};for(var C in d)C!=="ref"&&(x[C]=d[C])}else x=d;if(du(o),d=o2(r,o,s,x,g,p),C=i2(),r!==null&&!Bn)return s2(r,o,p),gs(r,o,p);return $t&&C&&FS(o),o.flags|=1,lr(r,o,d,p),o.child}function Q5(r,o,s,d,p){if(r===null){var g=s.type;if(typeof g==="function"&&!IS(g)&&g.defaultProps===void 0&&s.compare===null)return s=su(g),o.tag=15,o.type=s,L2(o,g),Z5(r,o,s,d,p);return r=BS(s.type,null,d,o,o.mode,p),r.ref=o.ref,r.return=o,o.child=r}if(g=r.child,!F2(r,p)){var x=g.memoizedProps;if(s=s.compare,s=s!==null?s:Eh,s(x,d)&&r.ref===o.ref)return gs(r,o,p)}return o.flags|=1,r=fs(g,d),r.ref=o.ref,r.return=o,o.child=r}function Z5(r,o,s,d,p){if(r!==null){var g=r.memoizedProps;if(Eh(g,d)&&r.ref===o.ref&&o.type===r.type)if(Bn=!1,o.pendingProps=d=g,F2(r,p))(r.flags&131072)!==0&&(Bn=!0);else return o.lanes=r.lanes,gs(r,o,p)}return P2(r,o,s,d,p)}function eM(r,o,s,d){var p=d.children,g=r!==null?r.memoizedState:null;if(r===null&&o.stateNode===null&&(o.stateNode={_visibility:fm,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((o.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,r!==null){d=o.child=r.child;for(p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;d=p&~g}else d=0,o.child=null;return tM(r,o,g,s,d)}if((s&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},r!==null&&f0(o,g!==null?g.cachePool:null),g!==null?g5(o,g):e2(o),b5(o);else return d=o.lanes=536870912,tM(r,o,g!==null?g.baseLanes|s:s,s,d)}else g!==null?(f0(o,g.cachePool),g5(o,g),Ml(o),o.memoizedState=null):(r!==null&&f0(o,null),e2(o),Ml(o));return lr(r,o,p,s),o.child}function Bh(r,o){return r!==null&&r.tag===22||o.stateNode!==null||(o.stateNode={_visibility:fm,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function tM(r,o,s,d,p){var g=JS();return g=g===null?null:{parent:Ln._currentValue,pool:g},o.memoizedState={baseLanes:s,cachePool:g},r!==null&&f0(o,null),e2(o),b5(o),r!==null&&Zd(r,o,d,!0),o.childLanes=p,null}function D0(r,o){var s=o.hidden;return s!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
135
|
+
- <Activity %s>
|
|
136
|
+
+ <Activity %s>`,s===!0?"hidden":s===!1?"hidden={false}":"hidden={...}",s?'mode="hidden"':'mode="visible"'),o=L0({mode:o.mode,children:o.children},r.mode),o.ref=r.ref,r.child=o,o.return=r,o}function nM(r,o,s){return Au(o,r.child,null,s),r=D0(o,o.pendingProps),r.flags|=2,To(o),o.memoizedState=null,r}function fq(r,o,s){var d=o.pendingProps,p=(o.flags&128)!==0;if(o.flags&=-129,r===null){if($t){if(d.mode==="hidden")return r=D0(o,d),o.lanes=536870912,Bh(null,r);if(n2(o),(r=Xt)?(s=RN(r,oa),s=s!==null&&s.data===Iu?s:null,s!==null&&(d={dehydrated:s,treeContext:WA(),retryLane:536870912,hydrationErrors:null},o.memoizedState=d,d=qA(s),d.return=o,o.child=d,dr=o,Xt=null)):s=null,s===null)throw i0(o,r),wl(o);return o.lanes=536870912,null}return D0(o,d)}var g=r.memoizedState;if(g!==null){var x=g.dehydrated;if(n2(o),p)if(o.flags&256)o.flags&=-257,o=nM(r,o,s);else if(o.memoizedState!==null)o.child=r.child,o.flags|=128,o=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(JA(),(s&536870912)!==0&&H0(o),Bn||Zd(r,o,s,!1),p=(s&r.childLanes)!==0,Bn||p){if(d=jt,d!==null&&(x=nu(d,s),x!==0&&x!==g.retryLane))throw g.retryLane=x,Er(r,x),pn(d,r,x),Tw;F0(),o=nM(r,o,s)}else r=g.treeContext,Xt=ko(x.nextSibling),dr=o,$t=!0,Vl=null,Ii=!1,Oo=null,oa=!1,r!==null&&YA(o,r),o=D0(o,d),o.flags|=4096;return o}return g=r.child,d={mode:d.mode,children:d.children},(s&536870912)!==0&&(s&r.lanes)!==0&&H0(o),r=fs(g,d),r.ref=o.ref,o.child=r,r.return=o,r}function P0(r,o){var s=o.ref;if(s===null)r!==null&&r.ref!==null&&(o.flags|=4194816);else{if(typeof s!=="function"&&typeof s!=="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");if(r===null||r.ref!==s)o.flags|=4194816}}function P2(r,o,s,d,p){if(s.prototype&&typeof s.prototype.render==="function"){var g=P(s)||"Unknown";UO[g]||(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.",g,g),UO[g]=!0)}if(o.mode&Rr&&Fa.recordLegacyContextWarning(o,null),r===null&&(L2(o,o.type),s.contextTypes&&(g=P(s)||"Unknown",jO[g]||(jO[g]=!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)",g)))),du(o),s=o2(r,o,s,d,void 0,p),d=i2(),r!==null&&!Bn)return s2(r,o,p),gs(r,o,p);return $t&&d&&FS(o),o.flags|=1,lr(r,o,s,p),o.child}function rM(r,o,s,d,p,g){if(du(o),Ms=-1,Mm=r!==null&&r.type!==o.type,o.updateQueue=null,s=a2(o,d,s,p),y5(r,o),d=i2(),r!==null&&!Bn)return s2(r,o,g),gs(r,o,g);return $t&&d&&FS(o),o.flags|=1,lr(r,o,s,g),o.child}function oM(r,o,s,d,p){switch(c(o)){case!1:var g=o.stateNode,x=new o.type(o.memoizedProps,g.context).state;g.updater.enqueueSetState(g,x,null);break;case!0:o.flags|=128,o.flags|=65536,g=Error("Simulated error coming from DevTools");var C=p&-p;if(o.lanes|=C,x=jt,x===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");C=O2(C),D2(C,x,o,Co(g,o)),y0(o,C)}if(du(o),o.stateNode===null){if(x=Ul,g=s.contextType,"contextType"in s&&g!==null&&(g===void 0||g.$$typeof!==Ni)&&!HO.has(s)&&(HO.add(s),C=g===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 g!=="object"?" However, it is set to a "+typeof g+".":g.$$typeof===RC?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(g).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",P(s)||"Component",C)),typeof g==="object"&&g!==null&&(x=rn(g)),g=new s(d,x),o.mode&Rr){qt(!0);try{g=new s(d,x)}finally{qt(!1)}}if(x=o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=ww,o.stateNode=g,g._reactInternals=o,g._reactInternalInstance=NO,typeof s.getDerivedStateFromProps==="function"&&x===null&&(x=P(s)||"Component",DO.has(x)||(DO.add(x),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.",x,g.state===null?"null":"undefined",x))),typeof s.getDerivedStateFromProps==="function"||typeof g.getSnapshotBeforeUpdate==="function"){var R=C=x=null;if(typeof g.componentWillMount==="function"&&g.componentWillMount.__suppressDeprecationWarning!==!0?x="componentWillMount":typeof g.UNSAFE_componentWillMount==="function"&&(x="UNSAFE_componentWillMount"),typeof g.componentWillReceiveProps==="function"&&g.componentWillReceiveProps.__suppressDeprecationWarning!==!0?C="componentWillReceiveProps":typeof g.UNSAFE_componentWillReceiveProps==="function"&&(C="UNSAFE_componentWillReceiveProps"),typeof g.componentWillUpdate==="function"&&g.componentWillUpdate.__suppressDeprecationWarning!==!0?R="componentWillUpdate":typeof g.UNSAFE_componentWillUpdate==="function"&&(R="UNSAFE_componentWillUpdate"),x!==null||C!==null||R!==null){g=P(s)||"Component";var A=typeof s.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";LO.has(g)||(LO.add(g),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`,g,A,x!==null?`
|
|
142
|
+
`+x:"",C!==null?`
|
|
143
|
+
`+C:"",R!==null?`
|
|
144
|
+
`+R:""))}}g=o.stateNode,x=P(s)||"Component",g.render||(s.prototype&&typeof s.prototype.render==="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",x):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",x)),!g.getInitialState||g.getInitialState.isReactClassApproved||g.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?",x),g.getDefaultProps&&!g.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.",x),g.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",x),s.childContextTypes&&!zO.has(s)&&(zO.add(s),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",x)),s.contextTypes&&!BO.has(s)&&(BO.add(s),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)",x)),typeof g.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.",x),s.prototype&&s.prototype.isPureReactComponent&&typeof g.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.",P(s)||"A pure component"),typeof g.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",x),typeof g.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().",x),typeof g.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",x),typeof g.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",x),C=g.props!==d,g.props!==void 0&&C&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",x),g.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.",x,x),typeof g.getSnapshotBeforeUpdate!=="function"||typeof g.componentDidUpdate==="function"||PO.has(s)||(PO.add(s),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",P(s))),typeof g.getDerivedStateFromProps==="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",x),typeof g.getDerivedStateFromError==="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",x),typeof s.getSnapshotBeforeUpdate==="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",x),(C=g.state)&&(typeof C!=="object"||Gn(C))&&console.error("%s.state: must be set to an object or null",x),typeof g.getChildContext==="function"&&typeof s.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",x),g=o.stateNode,g.props=d,g.state=o.memoizedState,g.refs={},QS(o),x=s.contextType,g.context=typeof x==="object"&&x!==null?rn(x):Ul,g.state===d&&(x=P(s)||"Component",_O.has(x)||(_O.add(x),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.",x))),o.mode&Rr&&Fa.recordLegacyContextWarning(o,g),Fa.recordUnsafeLifecycleWarnings(o,g),g.state=o.memoizedState,x=s.getDerivedStateFromProps,typeof x==="function"&&(M2(o,s,x,d),g.state=o.memoizedState),typeof s.getDerivedStateFromProps==="function"||typeof g.getSnapshotBeforeUpdate==="function"||typeof g.UNSAFE_componentWillMount!=="function"&&typeof g.componentWillMount!=="function"||(x=g.state,typeof g.componentWillMount==="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount==="function"&&g.UNSAFE_componentWillMount(),x!==g.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Y(o)||"Component"),ww.enqueueReplaceState(g,g.state,null)),Ph(o,d,g,p),Dh(),g.state=o.memoizedState),typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&Ha)!==We&&(o.flags|=134217728),g=!0}else if(r===null){g=o.stateNode;var q=o.memoizedProps;C=gu(s,q),g.props=C;var G=g.context;R=s.contextType,x=Ul,typeof R==="object"&&R!==null&&(x=rn(R)),A=s.getDerivedStateFromProps,R=typeof A==="function"||typeof g.getSnapshotBeforeUpdate==="function",q=o.pendingProps!==q,R||typeof g.UNSAFE_componentWillReceiveProps!=="function"&&typeof g.componentWillReceiveProps!=="function"||(q||G!==x)&&q5(o,g,d,x),Yl=!1;var B=o.memoizedState;g.state=B,Ph(o,d,g,p),Dh(),G=o.memoizedState,q||B!==G||Yl?(typeof A==="function"&&(M2(o,s,A,d),G=o.memoizedState),(C=Yl||K5(o,s,C,d,B,G,x))?(R||typeof g.UNSAFE_componentWillMount!=="function"&&typeof g.componentWillMount!=="function"||(typeof g.componentWillMount==="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount==="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&Ha)!==We&&(o.flags|=134217728)):(typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&Ha)!==We&&(o.flags|=134217728),o.memoizedProps=d,o.memoizedState=G),g.props=d,g.state=G,g.context=x,g=C):(typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&Ha)!==We&&(o.flags|=134217728),g=!1)}else{g=o.stateNode,ZS(r,o),x=o.memoizedProps,R=gu(s,x),g.props=R,A=o.pendingProps,B=g.context,G=s.contextType,C=Ul,typeof G==="object"&&G!==null&&(C=rn(G)),q=s.getDerivedStateFromProps,(G=typeof q==="function"||typeof g.getSnapshotBeforeUpdate==="function")||typeof g.UNSAFE_componentWillReceiveProps!=="function"&&typeof g.componentWillReceiveProps!=="function"||(x!==A||B!==C)&&q5(o,g,d,C),Yl=!1,B=o.memoizedState,g.state=B,Ph(o,d,g,p),Dh();var ee=o.memoizedState;x!==A||B!==ee||Yl||r!==null&&r.dependencies!==null&&l0(r.dependencies)?(typeof q==="function"&&(M2(o,s,q,d),ee=o.memoizedState),(R=Yl||K5(o,s,R,d,B,ee,C)||r!==null&&r.dependencies!==null&&l0(r.dependencies))?(G||typeof g.UNSAFE_componentWillUpdate!=="function"&&typeof g.componentWillUpdate!=="function"||(typeof g.componentWillUpdate==="function"&&g.componentWillUpdate(d,ee,C),typeof g.UNSAFE_componentWillUpdate==="function"&&g.UNSAFE_componentWillUpdate(d,ee,C)),typeof g.componentDidUpdate==="function"&&(o.flags|=4),typeof g.getSnapshotBeforeUpdate==="function"&&(o.flags|=1024)):(typeof g.componentDidUpdate!=="function"||x===r.memoizedProps&&B===r.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!=="function"||x===r.memoizedProps&&B===r.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=ee),g.props=d,g.state=ee,g.context=C,g=R):(typeof g.componentDidUpdate!=="function"||x===r.memoizedProps&&B===r.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!=="function"||x===r.memoizedProps&&B===r.memoizedState||(o.flags|=1024),g=!1)}if(C=g,P0(r,o),x=(o.flags&128)!==0,C||x){if(C=o.stateNode,cn(o),x&&typeof s.getDerivedStateFromError!=="function")s=null,Hr=-1;else if(s=sO(C),o.mode&Rr){qt(!0);try{sO(C)}finally{qt(!1)}}o.flags|=1,r!==null&&x?(o.child=Au(o,r.child,null,p),o.child=Au(o,null,s,p)):lr(r,o,s,p),o.memoizedState=C.state,r=o.child}else r=gs(r,o,p);return p=o.stateNode,g&&p.props!==d&&(Ff||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Y(o)||"a component"),Ff=!0),r}function aM(r,o,s,d){return uu(),o.flags|=256,lr(r,o,s,d),o.child}function L2(r,o){o&&o.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
145
|
+
%s.childContextTypes = ...`,o.displayName||o.name||"Component"),typeof o.getDerivedStateFromProps==="function"&&(r=P(o)||"Unknown",KO[r]||(console.error("%s: Function components do not support getDerivedStateFromProps.",r),KO[r]=!0)),typeof o.contextType==="object"&&o.contextType!==null&&(o=P(o)||"Unknown",VO[o]||(console.error("%s: Function components do not support contextType.",o),VO[o]=!0))}function _2(r){return{baseLanes:r,cachePool:r5()}}function I2(r,o,s){return r=r!==null?r.childLanes&~s:0,o&&(r|=io),r}function iM(r,o,s){var d,p=o.pendingProps;l(o)&&(o.flags|=128);var g=!1,x=(o.flags&128)!==0;if((d=x)||(d=r!==null&&r.memoizedState===null?!1:(An.current&km)!==0),d&&(g=!0,o.flags&=-129),d=(o.flags&32)!==0,o.flags&=-33,r===null){if($t){if(g?Al(o):Ml(o),(r=Xt)?(s=RN(r,oa),s=s!==null&&s.data!==Iu?s:null,s!==null&&(d={dehydrated:s,treeContext:WA(),retryLane:536870912,hydrationErrors:null},o.memoizedState=d,d=qA(s),d.return=o,o.child=d,dr=o,Xt=null)):s=null,s===null)throw i0(o,r),wl(o);return gC(s)?o.lanes=32:o.lanes=536870912,null}var C=p.children;if(p=p.fallback,g){Ml(o);var R=o.mode;return C=L0({mode:"hidden",children:C},R),p=lu(p,R,s,null),C.return=o,p.return=o,C.sibling=p,o.child=C,p=o.child,p.memoizedState=_2(s),p.childLanes=I2(r,d,s),o.memoizedState=Rw,Bh(null,p)}return Al(o),B2(o,C)}var A=r.memoizedState;if(A!==null){var q=A.dehydrated;if(q!==null){if(x)o.flags&256?(Al(o),o.flags&=-257,o=z2(r,o,s)):o.memoizedState!==null?(Ml(o),o.child=r.child,o.flags|=128,o=null):(Ml(o),C=p.fallback,R=o.mode,p=L0({mode:"visible",children:p.children},R),C=lu(C,R,s,null),C.flags|=2,p.return=o,C.return=o,p.sibling=C,o.child=p,Au(o,r.child,null,s),p=o.child,p.memoizedState=_2(s),p.childLanes=I2(r,d,s),o.memoizedState=Rw,o=Bh(null,p));else if(Al(o),JA(),(s&536870912)!==0&&H0(o),gC(q)){if(d=q.nextSibling&&q.nextSibling.dataset,d){C=d.dgst;var G=d.msg;R=d.stck;var B=d.cstck}g=G,d=C,p=R,q=B,C=g,R=q,C=C?Error(C):Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),C.stack=p||"",C.digest=d,d=R===void 0?null:R,p={value:C,source:null,stack:d},typeof d==="string"&&iw.set(C,p),Rh(p),o=z2(r,o,s)}else if(Bn||Zd(r,o,s,!1),d=(s&r.childLanes)!==0,Bn||d){if(d=jt,d!==null&&(p=nu(d,s),p!==0&&p!==A.retryLane))throw A.retryLane=p,Er(r,p),pn(d,r,p),Tw;mC(q)||F0(),o=z2(r,o,s)}else mC(q)?(o.flags|=192,o.child=r.child,o=null):(r=A.treeContext,Xt=ko(q.nextSibling),dr=o,$t=!0,Vl=null,Ii=!1,Oo=null,oa=!1,r!==null&&YA(o,r),o=B2(o,p.children),o.flags|=4096);return o}}if(g)return Ml(o),C=p.fallback,R=o.mode,B=r.child,q=B.sibling,p=fs(B,{mode:"hidden",children:p.children}),p.subtreeFlags=B.subtreeFlags&65011712,q!==null?C=fs(q,C):(C=lu(C,R,s,null),C.flags|=2),C.return=o,p.return=o,p.sibling=C,o.child=p,Bh(null,p),p=o.child,C=r.child.memoizedState,C===null?C=_2(s):(R=C.cachePool,R!==null?(B=Ln._currentValue,R=R.parent!==B?{parent:B,pool:B}:R):R=r5(),C={baseLanes:C.baseLanes|s,cachePool:R}),p.memoizedState=C,p.childLanes=I2(r,d,s),o.memoizedState=Rw,Bh(r.child,p);return A!==null&&(s&62914560)===s&&(s&r.lanes)!==0&&H0(o),Al(o),s=r.child,r=s.sibling,s=fs(s,{mode:"visible",children:p.children}),s.return=o,s.sibling=null,r!==null&&(d=o.deletions,d===null?(o.deletions=[r],o.flags|=16):d.push(r)),o.child=s,o.memoizedState=null,s}function B2(r,o){return o=L0({mode:"visible",children:o},r.mode),o.return=r,r.child=o}function L0(r,o){return r=y(22,r,null,o),r.lanes=0,r}function z2(r,o,s){return Au(o,r.child,null,s),r=B2(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function sM(r,o,s){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o),KS(r.return,o,s)}function H2(r,o,s,d,p,g){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:s,tailMode:p,treeForkCount:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=d,x.tail=s,x.tailMode=p,x.treeForkCount=g)}function lM(r,o,s){var d=o.pendingProps,p=d.revealOrder,g=d.tail,x=d.children,C=An.current;if((d=(C&km)!==0)?(C=C&If|km,o.flags|=128):C&=If,ie(An,C,o),C=p==null?"null":p,p!=="forwards"&&p!=="unstable_legacy-backwards"&&p!=="together"&&p!=="independent"&&!qO[C])if(qO[C]=!0,p==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(p==="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 p==="string")switch(p.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.',p,p.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.',p,p.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',p)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',p);if(C=g==null?"null":g,!Dy[C])if(g==null){if(p==="forwards"||p==="backwards"||p==="unstable_legacy-backwards")Dy[C]=!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 g!=="visible"&&g!=="collapsed"&&g!=="hidden"?(Dy[C]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',g)):p!=="forwards"&&p!=="backwards"&&p!=="unstable_legacy-backwards"&&(Dy[C]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',g));e:if((p==="forwards"||p==="backwards"||p==="unstable_legacy-backwards")&&x!==void 0&&x!==null&&x!==!1)if(Gn(x)){for(C=0;C<x.length;C++)if(!p5(x[C],C))break e}else if(C=V(x),typeof C==="function"){if(C=C.call(x))for(var R=C.next(),A=0;!R.done;R=C.next()){if(!p5(R.value,A))break e;A++}}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?',p);if(lr(r,o,x,s),$t?(Cl(),x=pm):x=0,!d&&r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&sM(r,s,o);else if(r.tag===19)sM(r,s,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(p){case"forwards":s=o.child;for(p=null;s!==null;)r=s.alternate,r!==null&&v0(r)===null&&(p=s),s=s.sibling;s=p,s===null?(p=o.child,o.child=null):(p=s.sibling,s.sibling=null),H2(o,!1,p,s,g,x);break;case"backwards":case"unstable_legacy-backwards":s=null,p=o.child;for(o.child=null;p!==null;){if(r=p.alternate,r!==null&&v0(r)===null){o.child=p;break}r=p.sibling,p.sibling=s,s=p,p=r}H2(o,!0,s,null,g,x);break;case"together":H2(o,!1,null,null,void 0,x);break;default:o.memoizedState=null}return o.child}function gs(r,o,s){if(r!==null&&(o.dependencies=r.dependencies),Hr=-1,Ql|=o.lanes,(s&o.childLanes)===0)if(r!==null){if(Zd(r,o,s,!1),(s&o.childLanes)===0)return null}else return null;if(r!==null&&o.child!==r.child)throw Error("Resuming work not yet implemented.");if(o.child!==null){r=o.child,s=fs(r,r.pendingProps),o.child=s;for(s.return=o;r.sibling!==null;)r=r.sibling,s=s.sibling=fs(r,r.pendingProps),s.return=o;s.sibling=null}return o.child}function F2(r,o){if((r.lanes&o)!==0)return!0;return r=r.dependencies,r!==null&&l0(r)?!0:!1}function pq(r,o,s){switch(o.tag){case 3:U(o,o.stateNode.containerInfo),El(o,Ln,r.memoizedState.cache),uu();break;case 27:case 5:pe(o);break;case 4:U(o,o.stateNode.containerInfo);break;case 10:El(o,o.type,o.memoizedProps.value);break;case 12:(s&o.childLanes)!==0&&(o.flags|=4),o.flags|=2048;var d=o.stateNode;d.effectDuration=-0,d.passiveEffectDuration=-0;break;case 31:if(o.memoizedState!==null)return o.flags|=128,n2(o),null;break;case 13:if(d=o.memoizedState,d!==null){if(d.dehydrated!==null)return Al(o),o.flags|=128,null;if((s&o.child.childLanes)!==0)return iM(r,o,s);return Al(o),r=gs(r,o,s),r!==null?r.sibling:null}Al(o);break;case 19:var p=(r.flags&128)!==0;if(d=(s&o.childLanes)!==0,d||(Zd(r,o,s,!1),d=(s&o.childLanes)!==0),p){if(d)return lM(r,o,s);o.flags|=128}if(p=o.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),ie(An,An.current,o),d)break;else return null;case 22:return o.lanes=0,eM(r,o,s,o.pendingProps);case 24:El(o,Ln,r.memoizedState.cache)}return gs(r,o,s)}function U2(r,o,s){if(o._debugNeedsRemount&&r!==null){s=BS(o.type,o.key,o.pendingProps,o._debugOwner||null,o.mode,o.lanes),s._debugStack=o._debugStack,s._debugTask=o._debugTask;var d=o.return;if(d===null)throw Error("Cannot swap the root fiber.");if(r.alternate=null,o.alternate=null,s.index=o.index,s.sibling=o.sibling,s.return=o.return,s.ref=o.ref,s._debugInfo=o._debugInfo,o===d.child)d.child=s;else{var p=d.child;if(p===null)throw Error("Expected parent to have a child.");for(;p.sibling!==o;)if(p=p.sibling,p===null)throw Error("Expected to find the previous sibling.");p.sibling=s}return o=d.deletions,o===null?(d.deletions=[r],d.flags|=16):o.push(r),s.flags|=2,s}if(r!==null)if(r.memoizedProps!==o.pendingProps||o.type!==r.type)Bn=!0;else{if(!F2(r,s)&&(o.flags&128)===0)return Bn=!1,pq(r,o,s);Bn=(r.flags&131072)!==0?!0:!1}else{if(Bn=!1,d=$t)Cl(),d=(o.flags&1048576)!==0;d&&(d=o.index,Cl(),GA(o,pm,d))}switch(o.lanes=0,o.tag){case 16:e:if(d=o.pendingProps,r=Tl(o.elementType),o.type=r,typeof r==="function")IS(r)?(d=gu(r,d),o.tag=1,o.type=r=su(r),o=oM(null,o,r,d,s)):(o.tag=0,L2(o,r),o.type=r=su(r),o=P2(null,o,r,d,s));else{if(r!==void 0&&r!==null){if(p=r.$$typeof,p===em){o.tag=11,o.type=r=_S(r),o=X5(null,o,r,d,s);break e}else if(p===ty){o.tag=14,o=Q5(null,o,r,d,s);break e}}throw o="",r!==null&&typeof r==="object"&&r.$$typeof===Ao&&(o=" Did you wrap a component in React.lazy() more than once?"),s=P(r)||r,Error("Element type is invalid. Received a promise that resolves to: "+s+". Lazy element type must resolve to a class or function."+o)}return o;case 0:return P2(r,o,o.type,o.pendingProps,s);case 1:return d=o.type,p=gu(d,o.pendingProps),oM(r,o,d,p,s);case 3:e:{if(U(o,o.stateNode.containerInfo),r===null)throw Error("Should have a current fiber. This is a bug in React.");d=o.pendingProps;var g=o.memoizedState;p=g.element,ZS(r,o),Ph(o,d,null,s);var x=o.memoizedState;if(d=x.cache,El(o,Ln,d),d!==g.cache&&qS(o,[Ln],s,!0),Dh(),d=x.element,g.isDehydrated)if(g={element:d,isDehydrated:!1,cache:x.cache},o.updateQueue.baseState=g,o.memoizedState=g,o.flags&256){o=aM(r,o,d,s);break e}else if(d!==p){p=Co(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),o),Rh(p),o=aM(r,o,d,s);break e}else{switch(r=o.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}Xt=ko(r.firstChild),dr=o,$t=!0,Vl=null,Ii=!1,Oo=null,oa=!0,s=$O(o,null,d,s);for(o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(uu(),d===p){o=gs(r,o,s);break e}lr(r,o,d,s)}o=o.child}return o;case 26:return P0(r,o),r===null?(s=DN(o.type,null,o.pendingProps,null))?o.memoizedState=s:$t||(s=o.type,r=o.pendingProps,d=_(_l.current),d=K0(d).createElement(s),d[ur]=o,d[Ir]=r,cr(d,s,r),Ve(d),o.stateNode=d):o.memoizedState=DN(o.type,r.memoizedProps,o.pendingProps,r.memoizedState),null;case 27:return pe(o),r===null&&$t&&(d=_(_l.current),p=Q(),d=o.stateNode=NN(o.type,o.pendingProps,d,p,!1),Ii||(p=vN(d,o.type,o.pendingProps,p),p!==null&&(cu(o,0).serverProps=p)),dr=o,oa=!0,p=Xt,Pl(o.type)?(Jw=p,Xt=ko(d.firstChild)):Xt=p),lr(r,o,o.pendingProps.children,s),P0(r,o),r===null&&(o.flags|=4194304),o.child;case 5:return r===null&&$t&&(g=Q(),d=kS(o.type,g.ancestorInfo),p=Xt,(x=!p)||(x=tG(p,o.type,o.pendingProps,oa),x!==null?(o.stateNode=x,Ii||(g=vN(x,o.type,o.pendingProps,g),g!==null&&(cu(o,0).serverProps=g)),dr=o,Xt=ko(x.firstChild),oa=!1,g=!0):g=!1,x=!g),x&&(d&&i0(o,p),wl(o))),pe(o),p=o.type,g=o.pendingProps,x=r!==null?r.memoizedProps:null,d=g.children,pC(p,g)?d=null:x!==null&&pC(p,x)&&(o.flags|=32),o.memoizedState!==null&&(p=o2(r,o,aq,null,null,s),qm._currentValue=p),P0(r,o),lr(r,o,d,s),o.child;case 6:return r===null&&$t&&(s=o.pendingProps,r=Q(),d=r.ancestorInfo.current,s=d!=null?Jb(s,d.tag,r.ancestorInfo.implicitRootScope):!0,r=Xt,(d=!r)||(d=nG(r,o.pendingProps,oa),d!==null?(o.stateNode=d,dr=o,Xt=null,d=!0):d=!1,d=!d),d&&(s&&i0(o,r),wl(o))),null;case 13:return iM(r,o,s);case 4:return U(o,o.stateNode.containerInfo),d=o.pendingProps,r===null?o.child=Au(o,null,d,s):lr(r,o,d,s),o.child;case 11:return X5(r,o,o.type,o.pendingProps,s);case 7:return lr(r,o,o.pendingProps,s),o.child;case 8:return lr(r,o,o.pendingProps.children,s),o.child;case 12:return o.flags|=4,o.flags|=2048,d=o.stateNode,d.effectDuration=-0,d.passiveEffectDuration=-0,lr(r,o,o.pendingProps.children,s),o.child;case 10:return d=o.type,p=o.pendingProps,g=p.value,"value"in p||GO||(GO=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),El(o,d,g),lr(r,o,p.children,s),o.child;case 9:return p=o.type._context,d=o.pendingProps.children,typeof d!=="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."),du(o),p=rn(p),d=hw(d,p,void 0),o.flags|=1,lr(r,o,d,s),o.child;case 14:return Q5(r,o,o.type,o.pendingProps,s);case 15:return Z5(r,o,o.type,o.pendingProps,s);case 19:return lM(r,o,s);case 31:return fq(r,o,s);case 22:return eM(r,o,s,o.pendingProps);case 24:return du(o),d=rn(Ln),r===null?(p=JS(),p===null&&(p=jt,g=GS(),p.pooledCache=g,fu(g),g!==null&&(p.pooledCacheLanes|=s),p=g),o.memoizedState={parent:d,cache:p},QS(o),El(o,Ln,p)):((r.lanes&s)!==0&&(ZS(r,o),Ph(o,null,null,s),Dh()),p=r.memoizedState,g=o.memoizedState,p.parent!==d?(p={parent:d,cache:d},o.memoizedState=p,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=p),El(o,Ln,d)):(d=g.cache,El(o,Ln,d),d!==p.cache&&qS(o,[Ln],s,!0))),lr(r,o,o.pendingProps.children,s),o.child;case 29:throw o.pendingProps}throw Error("Unknown unit of work tag ("+o.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function bs(r){r.flags|=4}function V2(r,o,s,d,p){if(o=(r.mode&DW)!==We)o=!1;if(o){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(FM())r.flags|=8192;else throw ku=Ry,gw}else r.flags&=-16777217}function cM(r,o){if(o.type!=="stylesheet"||(o.state.loading&ca)!==Hu)r.flags&=-16777217;else if(r.flags|=16777216,!BN(o))if(FM())r.flags|=8192;else throw ku=Ry,gw}function _0(r,o){o!==null&&(r.flags|=4),r.flags&16384&&(o=r.tag!==22?Gd():536870912,r.lanes|=o,Pu|=o)}function zh(r,o){if(!$t)switch(r.tailMode){case"hidden":o=r.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Gt(r){var o=r.alternate!==null&&r.alternate.child===r.child,s=0,d=0;if(o)if((r.mode&st)!==We){for(var{selfBaseDuration:p,child:g}=r;g!==null;)s|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,p+=g.treeBaseDuration,g=g.sibling;r.treeBaseDuration=p}else for(p=r.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags&65011712,d|=p.flags&65011712,p.return=r,p=p.sibling;else if((r.mode&st)!==We){p=r.actualDuration,g=r.selfBaseDuration;for(var x=r.child;x!==null;)s|=x.lanes|x.childLanes,d|=x.subtreeFlags,d|=x.flags,p+=x.actualDuration,g+=x.treeBaseDuration,x=x.sibling;r.actualDuration=p,r.treeBaseDuration=g}else for(p=r.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=d,r.childLanes=s,o}function hq(r,o,s){var d=o.pendingProps;switch(US(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gt(o),null;case 1:return Gt(o),null;case 3:if(s=o.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),o.memoizedState.cache!==d&&(o.flags|=2048),hs(Ln,o),W(o),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),r===null||r.child===null)Qd(o)?(jS(),bs(o)):r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,VS());return Gt(o),null;case 26:var{type:p,memoizedState:g}=o;return r===null?(bs(o),g!==null?(Gt(o),cM(o,g)):(Gt(o),V2(o,p,null,d,s))):g?g!==r.memoizedState?(bs(o),Gt(o),cM(o,g)):(Gt(o),o.flags&=-16777217):(r=r.memoizedProps,r!==d&&bs(o),Gt(o),V2(o,p,r,d,s)),null;case 27:if(re(o),s=_(_l.current),p=o.type,r!==null&&o.stateNode!=null)r.memoizedProps!==d&&bs(o);else{if(!d){if(o.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 Gt(o),null}r=Q(),Qd(o)?XA(o,r):(r=NN(p,d,s,r,!0),o.stateNode=r,bs(o))}return Gt(o),null;case 5:if(re(o),p=o.type,r!==null&&o.stateNode!=null)r.memoizedProps!==d&&bs(o);else{if(!d){if(o.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 Gt(o),null}var x=Q();if(Qd(o))XA(o,x);else{switch(g=_(_l.current),kS(p,x.ancestorInfo),x=x.context,g=K0(g),x){case Yf:g=g.createElementNS(vf,p);break;case Zy:g=g.createElementNS(ly,p);break;default:switch(p){case"svg":g=g.createElementNS(vf,p);break;case"math":g=g.createElementNS(ly,p);break;case"script":g=g.createElement("div"),g.innerHTML="<script></script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof d.is==="string"?g.createElement("select",{is:d.is}):g.createElement("select"),d.multiple?g.multiple=!0:d.size&&(g.size=d.size);break;default:g=typeof d.is==="string"?g.createElement(p,{is:d.is}):g.createElement(p),p.indexOf("-")===-1&&(p!==p.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",p),Object.prototype.toString.call(g)!=="[object HTMLUnknownElement]"||Ba.call(bD,p)||(bD[p]=!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.",p)))}}g[ur]=o,g[Ir]=d;e:for(x=o.child;x!==null;){if(x.tag===5||x.tag===6)g.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===o)break e;for(;x.sibling===null;){if(x.return===null||x.return===o)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}o.stateNode=g;e:switch(cr(g,p,d),p){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&bs(o)}}return Gt(o),V2(o,o.type,r===null?null:r.memoizedProps,o.pendingProps,s),null;case 6:if(r&&o.stateNode!=null)r.memoizedProps!==d&&bs(o);else{if(typeof d!=="string"&&o.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(r=_(_l.current),s=Q(),Qd(o)){if(r=o.stateNode,s=o.memoizedProps,p=!Ii,d=null,g=dr,g!==null)switch(g.tag){case 3:p&&(p=AN(r,s,d),p!==null&&(cu(o,0).serverProps=p));break;case 27:case 5:d=g.memoizedProps,p&&(p=AN(r,s,d),p!==null&&(cu(o,0).serverProps=p))}r[ur]=o,r=r.nodeValue===s||d!==null&&d.suppressHydrationWarning===!0||hN(r.nodeValue,s)?!0:!1,r||wl(o,!0)}else p=s.ancestorInfo.current,p!=null&&Jb(d,p.tag,s.ancestorInfo.implicitRootScope),r=K0(r).createTextNode(d),r[ur]=o,o.stateNode=r}return Gt(o),null;case 31:if(s=o.memoizedState,r===null||r.memoizedState!==null){if(d=Qd(o),s!==null){if(r===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(r=o.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");r[ur]=o,Gt(o),(o.mode&st)!==We&&s!==null&&(r=o.child,r!==null&&(o.treeBaseDuration-=r.treeBaseDuration))}else jS(),uu(),(o.flags&128)===0&&(s=o.memoizedState=null),o.flags|=4,Gt(o),(o.mode&st)!==We&&s!==null&&(r=o.child,r!==null&&(o.treeBaseDuration-=r.treeBaseDuration));r=!1}else s=VS(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r){if(o.flags&256)return To(o),o;return To(o),null}if((o.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return Gt(o),null;case 13:if(d=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=d,g=Qd(o),p!==null&&p.dehydrated!==null){if(r===null){if(!g)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(g=o.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");g[ur]=o,Gt(o),(o.mode&st)!==We&&p!==null&&(p=o.child,p!==null&&(o.treeBaseDuration-=p.treeBaseDuration))}else jS(),uu(),(o.flags&128)===0&&(p=o.memoizedState=null),o.flags|=4,Gt(o),(o.mode&st)!==We&&p!==null&&(p=o.child,p!==null&&(o.treeBaseDuration-=p.treeBaseDuration));p=!1}else p=VS(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p){if(o.flags&256)return To(o),o;return To(o),null}}if(To(o),(o.flags&128)!==0)return o.lanes=s,(o.mode&st)!==We&&Mh(o),o;return s=d!==null,r=r!==null&&r.memoizedState!==null,s&&(d=o.child,p=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(p=d.alternate.memoizedState.cachePool.pool),g=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(g=d.memoizedState.cachePool.pool),g!==p&&(d.flags|=2048)),s!==r&&s&&(o.child.flags|=8192),_0(o,o.updateQueue),Gt(o),(o.mode&st)!==We&&s&&(r=o.child,r!==null&&(o.treeBaseDuration-=r.treeBaseDuration)),null;case 4:return W(o),r===null&&iC(o.stateNode.containerInfo),Gt(o),null;case 10:return hs(o.type,o),Gt(o),null;case 19:if(ue(An,o),d=o.memoizedState,d===null)return Gt(o),null;if(p=(o.flags&128)!==0,g=d.rendering,g===null)if(p)zh(d,!1);else{if(dn!==Os||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(g=v0(r),g!==null){o.flags|=128,zh(d,!1),r=g.updateQueue,o.updateQueue=r,_0(o,r),o.subtreeFlags=0,r=s;for(s=o.child;s!==null;)KA(s,r),s=s.sibling;return ie(An,An.current&If|km,o),$t&&ps(o,d.treeForkCount),o.child}r=r.sibling}d.tail!==null&&Zn()>Hy&&(o.flags|=128,p=!0,zh(d,!1),o.lanes=4194304)}else{if(!p)if(r=v0(g),r!==null){if(o.flags|=128,p=!0,r=r.updateQueue,o.updateQueue=r,_0(o,r),zh(d,!0),d.tail===null&&d.tailMode==="hidden"&&!g.alternate&&!$t)return Gt(o),null}else 2*Zn()-d.renderingStartTime>Hy&&s!==536870912&&(o.flags|=128,p=!0,zh(d,!1),o.lanes=4194304);d.isBackwards?(g.sibling=o.child,o.child=g):(r=d.last,r!==null?r.sibling=g:o.child=g,d.last=g)}if(d.tail!==null)return r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=Zn(),r.sibling=null,s=An.current,s=p?s&If|km:s&If,ie(An,s,o),$t&&ps(o,d.treeForkCount),r;return Gt(o),null;case 22:case 23:return To(o),t2(o),d=o.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(o.flags|=8192):d&&(o.flags|=8192),d?(s&536870912)!==0&&(o.flags&128)===0&&(Gt(o),o.subtreeFlags&6&&(o.flags|=8192)):Gt(o),s=o.updateQueue,s!==null&&_0(o,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==s&&(o.flags|=2048),r!==null&&ue(Tu,o),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),o.memoizedState.cache!==s&&(o.flags|=2048),hs(Ln,o),Gt(o),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+o.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function mq(r,o){switch(US(o),o.tag){case 1:return r=o.flags,r&65536?(o.flags=r&-65537|128,(o.mode&st)!==We&&Mh(o),o):null;case 3:return hs(Ln,o),W(o),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 26:case 27:case 5:return re(o),null;case 31:if(o.memoizedState!==null){if(To(o),o.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");uu()}return r=o.flags,r&65536?(o.flags=r&-65537|128,(o.mode&st)!==We&&Mh(o),o):null;case 13:if(To(o),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");uu()}return r=o.flags,r&65536?(o.flags=r&-65537|128,(o.mode&st)!==We&&Mh(o),o):null;case 19:return ue(An,o),null;case 4:return W(o),null;case 10:return hs(o.type,o),null;case 22:case 23:return To(o),t2(o),r!==null&&ue(Tu,o),r=o.flags,r&65536?(o.flags=r&-65537|128,(o.mode&st)!==We&&Mh(o),o):null;case 24:return hs(Ln,o),null;case 25:return null;default:return null}}function uM(r,o){switch(US(o),o.tag){case 3:hs(Ln,o),W(o);break;case 26:case 27:case 5:re(o);break;case 4:W(o);break;case 31:o.memoizedState!==null&&To(o);break;case 13:To(o);break;case 19:ue(An,o);break;case 10:hs(o.type,o);break;case 22:case 23:To(o),t2(o),r!==null&&ue(Tu,o);break;case 24:hs(Ln,o)}}function wi(r){return(r.mode&st)!==We}function dM(r,o){wi(r)?(Ci(),Hh(o,r),Si()):Hh(o,r)}function j2(r,o,s){wi(r)?(Ci(),of(s,r,o),Si()):of(s,r,o)}function Hh(r,o){try{var s=o.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var p=d.next;s=p;do{if((s.tag&r)===r&&(d=void 0,(r&Fr)!==Ay&&(qf=!0),d=me(o,BW,s),(r&Fr)!==Ay&&(qf=!1),d!==void 0&&typeof d!=="function")){var g=void 0;g=(s.tag&Po)!==0?"useLayoutEffect":(s.tag&Fr)!==0?"useInsertionEffect":"useEffect";var x=void 0;x=d===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof d.then==="function"?`
|
|
146
|
+
|
|
147
|
+
It looks like you wrote `+g+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
148
|
+
|
|
149
|
+
`+g+`(() => {
|
|
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: "+d,me(o,function(C,R){console.error("%s must not return anything besides a function, which is used for clean-up.%s",C,R)},g,x)}s=s.next}while(s!==p)}}catch(C){_t(o,o.return,C)}}function of(r,o,s){try{var d=o.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var g=p.next;d=g;do{if((d.tag&r)===r){var x=d.inst,C=x.destroy;C!==void 0&&(x.destroy=void 0,(r&Fr)!==Ay&&(qf=!0),p=o,me(p,zW,p,s,C),(r&Fr)!==Ay&&(qf=!1))}d=d.next}while(d!==g)}}catch(R){_t(o,o.return,R)}}function fM(r,o){wi(r)?(Ci(),Hh(o,r),Si()):Hh(o,r)}function K2(r,o,s){wi(r)?(Ci(),of(s,r,o),Si()):of(s,r,o)}function pM(r){var o=r.updateQueue;if(o!==null){var s=r.stateNode;r.type.defaultProps||"ref"in r.memoizedProps||Ff||(s.props!==r.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.",Y(r)||"instance"),s.state!==r.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.",Y(r)||"instance"));try{me(r,m5,o,s)}catch(d){_t(r,r.return,d)}}}function gq(r,o,s){return r.getSnapshotBeforeUpdate(o,s)}function bq(r,o){var{memoizedProps:s,memoizedState:d}=o;o=r.stateNode,r.type.defaultProps||"ref"in r.memoizedProps||Ff||(o.props!==r.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.",Y(r)||"instance"),o.state!==r.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.",Y(r)||"instance"));try{var p=gu(r.type,s),g=me(r,gq,o,p,d);s=WO,g!==void 0||s.has(r.type)||(s.add(r.type),me(r,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Y(r))})),o.__reactInternalSnapshotBeforeUpdate=g}catch(x){_t(r,r.return,x)}}function hM(r,o,s){s.props=gu(r.type,r.memoizedProps),s.state=r.memoizedState,wi(r)?(Ci(),me(r,pO,r,o,s),Si()):me(r,pO,r,o,s)}function yq(r){var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var s=r.stateNode;break;case 30:s=r.stateNode;break;default:s=r.stateNode}if(typeof o==="function")if(wi(r))try{Ci(),r.refCleanup=o(s)}finally{Si()}else r.refCleanup=o(s);else typeof o==="string"?console.error("String refs are no longer supported."):o.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Y(r)),o.current=s}}function Fh(r,o){try{me(r,yq,r)}catch(s){_t(r,o,s)}}function Ei(r,o){var{ref:s,refCleanup:d}=r;if(s!==null)if(typeof d==="function")try{if(wi(r))try{Ci(),me(r,d)}finally{Si(r)}else me(r,d)}catch(p){_t(r,o,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s==="function")try{if(wi(r))try{Ci(),me(r,s,null)}finally{Si(r)}else me(r,s,null)}catch(p){_t(r,o,p)}else s.current=null}function mM(r,o,s,d){var p=r.memoizedProps,g=p.id,x=p.onCommit;p=p.onRender,o=o===null?"mount":"update",Cy&&(o="nested-update"),typeof p==="function"&&p(g,o,r.actualDuration,r.treeBaseDuration,r.actualStartTime,s),typeof x==="function"&&x(g,o,d,s)}function vq(r,o,s,d){var p=r.memoizedProps;r=p.id,p=p.onPostCommit,o=o===null?"mount":"update",Cy&&(o="nested-update"),typeof p==="function"&&p(r,o,d,s)}function gM(r){var{type:o,memoizedProps:s,stateNode:d}=r;try{me(r,Vq,d,o,s,r)}catch(p){_t(r,r.return,p)}}function q2(r,o,s){try{me(r,Kq,r.stateNode,r.type,s,o,r)}catch(d){_t(r,r.return,d)}}function bM(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Pl(r.type)||r.tag===4}function G2(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||bM(r.return))return null;r=r.return}r.sibling.return=r.return;for(r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Pl(r.type))continue e;if(r.flags&2)continue e;if(r.child===null||r.tag===4)continue e;else r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function W2(r,o,s){var d=r.tag;if(d===5||d===6)r=r.stateNode,o?(wN(s),(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,o)):(wN(s),o=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,o.appendChild(r),s=s._reactRootContainer,s!==null&&s!==void 0||o.onclick!==null||(o.onclick=ds));else if(d!==4&&(d===27&&Pl(r.type)&&(s=r.stateNode,o=null),r=r.child,r!==null))for(W2(r,o,s),r=r.sibling;r!==null;)W2(r,o,s),r=r.sibling}function I0(r,o,s){var d=r.tag;if(d===5||d===6)r=r.stateNode,o?s.insertBefore(r,o):s.appendChild(r);else if(d!==4&&(d===27&&Pl(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(I0(r,o,s),r=r.sibling;r!==null;)I0(r,o,s),r=r.sibling}function xq(r){for(var o,s=r.return;s!==null;){if(bM(s)){o=s;break}s=s.return}if(o==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(o.tag){case 27:o=o.stateNode,s=G2(r),I0(r,s,o);break;case 5:s=o.stateNode,o.flags&32&&(CN(s),o.flags&=-33),o=G2(r),I0(r,o,s);break;case 3:case 4:o=o.stateNode.containerInfo,s=G2(r),W2(r,s,o);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function yM(r){var{stateNode:o,memoizedProps:s}=r;try{me(r,sG,r.type,s,o,r)}catch(d){_t(r,r.return,d)}}function vM(r,o){return o.tag===31?(o=o.memoizedState,r.memoizedState!==null&&o===null):o.tag===13?(r=r.memoizedState,o=o.memoizedState,r!==null&&r.dehydrated!==null&&(o===null||o.dehydrated===null)):o.tag===3?r.memoizedState.isDehydrated&&(o.flags&256)===0:!1}function $q(r,o){if(r=r.containerInfo,Gw=rv,r=LA(r),NS(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var d=s.getSelection&&s.getSelection();if(d&&d.rangeCount!==0){s=d.anchorNode;var{anchorOffset:p,focusNode:g}=d;d=d.focusOffset;try{s.nodeType,g.nodeType}catch($e){s=null;break e}var x=0,C=-1,R=-1,A=0,q=0,G=r,B=null;t:for(;;){for(var ee;;){if(G!==s||p!==0&&G.nodeType!==3||(C=x+p),G!==g||d!==0&&G.nodeType!==3||(R=x+d),G.nodeType===3&&(x+=G.nodeValue.length),(ee=G.firstChild)===null)break;B=G,G=ee}for(;;){if(G===r)break t;if(B===s&&++A===p&&(C=x),B===g&&++q===d&&(R=x),(ee=G.nextSibling)!==null)break;G=B,B=G.parentNode}G=ee}s=C===-1||R===-1?null:{start:C,end:R}}else s=null}s=s||{start:0,end:0}}else s=null;Ww={focusedElem:r,selectionRange:s},rv=!1;for(tr=o;tr!==null;)if(o=tr,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,tr=r;else for(;tr!==null;){switch(r=o=tr,s=r.alternate,p=r.flags,r.tag){case 0:if((p&4)!==0&&(r=r.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)p=r[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:(p&1024)!==0&&s!==null&&bq(r,s);break;case 3:if((p&1024)!==0){if(r=r.stateNode.containerInfo,s=r.nodeType,s===9)hC(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":hC(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((p&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(r=o.sibling,r!==null){r.return=o.return,tr=r;break}tr=o.return}}function xM(r,o,s){var d=wo(),p=yi(),g=xi(),x=$i(),C=s.flags;switch(s.tag){case 0:case 11:case 15:Ti(r,s),C&4&&dM(s,Po|sa);break;case 1:if(Ti(r,s),C&4)if(r=s.stateNode,o===null)s.type.defaultProps||"ref"in s.memoizedProps||Ff||(r.props!==s.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.",Y(s)||"instance"),r.state!==s.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.",Y(s)||"instance")),wi(s)?(Ci(),me(s,mw,s,r),Si()):me(s,mw,s,r);else{var R=gu(s.type,o.memoizedProps);o=o.memoizedState,s.type.defaultProps||"ref"in s.memoizedProps||Ff||(r.props!==s.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.",Y(s)||"instance"),r.state!==s.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.",Y(s)||"instance")),wi(s)?(Ci(),me(s,uO,s,r,R,o,r.__reactInternalSnapshotBeforeUpdate),Si()):me(s,uO,s,r,R,o,r.__reactInternalSnapshotBeforeUpdate)}C&64&&pM(s),C&512&&Fh(s,s.return);break;case 3:if(o=ms(),Ti(r,s),C&64&&(C=s.updateQueue,C!==null)){if(R=null,s.child!==null)switch(s.child.tag){case 27:case 5:R=s.child.stateNode;break;case 1:R=s.child.stateNode}try{me(s,m5,C,R)}catch(q){_t(s,s.return,q)}}r.effectDuration+=u0(o);break;case 27:o===null&&C&4&&yM(s);case 26:case 5:if(Ti(r,s),o===null){if(C&4)gM(s);else if(C&64){r=s.type,o=s.memoizedProps,R=s.stateNode;try{me(s,jq,R,r,o,s)}catch(q){_t(s,s.return,q)}}}C&512&&Fh(s,s.return);break;case 12:if(C&4){C=ms(),Ti(r,s),r=s.stateNode,r.effectDuration+=Ah(C);try{me(s,mM,s,o,jl,r.effectDuration)}catch(q){_t(s,s.return,q)}}else Ti(r,s);break;case 31:Ti(r,s),C&4&&CM(r,s);break;case 13:Ti(r,s),C&4&&wM(r,s),C&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(C=Mq.bind(null,s),rG(r,C))));break;case 22:if(C=s.memoizedState!==null||Ns,!C){o=o!==null&&o.memoizedState!==null||zn,R=Ns;var A=zn;Ns=C,(zn=o)&&!A?(Ri(r,s,(s.subtreeFlags&8772)!==0),(s.mode&st)!==We&&0<=je&&0<=Ge&&0.05<Ge-je&&e0(s,je,Ge)):Ti(r,s),Ns=R,zn=A}break;case 30:break;default:Ti(r,s)}(s.mode&st)!==We&&0<=je&&0<=Ge&&((hn||0.05<un)&&gi(s,je,Ge,un,on),s.alternate===null&&s.return!==null&&s.return.alternate!==null&&0.05<Ge-je&&(vM(s.return.alternate,s.return)||mi(s,je,Ge,"Mount"))),Eo(d),vi(p),on=g,hn=x}function $M(r){var o=r.alternate;o!==null&&(r.alternate=null,$M(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&Ee(o)),r.stateNode=null,r._debugOwner=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function ys(r,o,s){for(s=s.child;s!==null;)SM(r,o,s),s=s.sibling}function SM(r,o,s){if(Tr&&typeof Tr.onCommitFiberUnmount==="function")try{Tr.onCommitFiberUnmount(bf,s)}catch(A){Di||(Di=!0,console.error("React instrumentation encountered an error: %o",A))}var d=wo(),p=yi(),g=xi(),x=$i();switch(s.tag){case 26:zn||Ei(s,o),ys(r,o,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(r=s.stateNode,r.parentNode.removeChild(r));break;case 27:zn||Ei(s,o);var C=Hn,R=oo;Pl(s.type)&&(Hn=s.stateNode,oo=!1),ys(r,o,s),me(s,Jh,s.stateNode),Hn=C,oo=R;break;case 5:zn||Ei(s,o);case 6:if(C=Hn,R=oo,Hn=null,ys(r,o,s),Hn=C,oo=R,Hn!==null)if(oo)try{me(s,Wq,Hn,s.stateNode)}catch(A){_t(s,o,A)}else try{me(s,Gq,Hn,s.stateNode)}catch(A){_t(s,o,A)}break;case 18:Hn!==null&&(oo?(r=Hn,EN(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),pf(r)):EN(Hn,s.stateNode));break;case 4:C=Hn,R=oo,Hn=s.stateNode.containerInfo,oo=!0,ys(r,o,s),Hn=C,oo=R;break;case 0:case 11:case 14:case 15:of(Fr,s,o),zn||j2(s,o,Po),ys(r,o,s);break;case 1:zn||(Ei(s,o),C=s.stateNode,typeof C.componentWillUnmount==="function"&&hM(s,o,C)),ys(r,o,s);break;case 21:ys(r,o,s);break;case 22:zn=(C=zn)||s.memoizedState!==null,ys(r,o,s),zn=C;break;default:ys(r,o,s)}(s.mode&st)!==We&&0<=je&&0<=Ge&&(hn||0.05<un)&&gi(s,je,Ge,un,on),Eo(d),vi(p),on=g,hn=x}function CM(r,o){if(o.memoizedState===null&&(r=o.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{me(o,aG,r)}catch(s){_t(o,o.return,s)}}}function wM(r,o){if(o.memoizedState===null&&(r=o.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{me(o,iG,r)}catch(s){_t(o,o.return,s)}}function Sq(r){switch(r.tag){case 31:case 13:case 19:var o=r.stateNode;return o===null&&(o=r.stateNode=new YO),o;case 22:return r=r.stateNode,o=r._retryCache,o===null&&(o=r._retryCache=new YO),o;default:throw Error("Unexpected Suspense handler tag ("+r.tag+"). This is a bug in React.")}}function B0(r,o){var s=Sq(r);o.forEach(function(d){if(!s.has(d)){if(s.add(d),Pi)if(Uf!==null&&Vf!==null)Kh(Vf,Uf);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var p=Nq.bind(null,r,d);d.then(p,p)}})}function no(r,o){var s=o.deletions;if(s!==null)for(var d=0;d<s.length;d++){var p=r,g=o,x=s[d],C=wo(),R=g;e:for(;R!==null;){switch(R.tag){case 27:if(Pl(R.type)){Hn=R.stateNode,oo=!1;break e}break;case 5:Hn=R.stateNode,oo=!1;break e;case 3:case 4:Hn=R.stateNode.containerInfo,oo=!0;break e}R=R.return}if(Hn===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");SM(p,g,x),Hn=null,oo=!1,(x.mode&st)!==We&&0<=je&&0<=Ge&&0.05<Ge-je&&mi(x,je,Ge,"Unmount"),Eo(C),p=x,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)EM(o,r),o=o.sibling}function EM(r,o){var s=wo(),d=yi(),p=xi(),g=$i(),x=r.alternate,C=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:no(o,r),ro(r),C&4&&(of(Fr|sa,r,r.return),Hh(Fr|sa,r),j2(r,r.return,Po|sa));break;case 1:if(no(o,r),ro(r),C&512&&(zn||x===null||Ei(x,x.return)),C&64&&Ns&&(C=r.updateQueue,C!==null&&(x=C.callbacks,x!==null))){var R=C.shared.hiddenCallbacks;C.shared.hiddenCallbacks=R===null?x:R.concat(x)}break;case 26:if(R=Va,no(o,r),ro(r),C&512&&(zn||x===null||Ei(x,x.return)),C&4){var A=x!==null?x.memoizedState:null;if(C=r.memoizedState,x===null)if(C===null)if(r.stateNode===null){e:{C=r.type,x=r.memoizedProps,R=R.ownerDocument||R;t:switch(C){case"title":if(A=R.getElementsByTagName("title")[0],!A||A[rm]||A[ur]||A.namespaceURI===vf||A.hasAttribute("itemprop"))A=R.createElement(C),R.head.insertBefore(A,R.querySelector("head > title"));cr(A,C,x),A[ur]=r,Ve(A),C=A;break e;case"link":var q=_N("link","href",R).get(C+(x.href||""));if(q){for(var G=0;G<q.length;G++)if(A=q[G],A.getAttribute("href")===(x.href==null||x.href===""?null:x.href)&&A.getAttribute("rel")===(x.rel==null?null:x.rel)&&A.getAttribute("title")===(x.title==null?null:x.title)&&A.getAttribute("crossorigin")===(x.crossOrigin==null?null:x.crossOrigin)){q.splice(G,1);break t}}A=R.createElement(C),cr(A,C,x),R.head.appendChild(A);break;case"meta":if(q=_N("meta","content",R).get(C+(x.content||""))){for(G=0;G<q.length;G++)if(A=q[G],Ie(x.content,"content"),A.getAttribute("content")===(x.content==null?null:""+x.content)&&A.getAttribute("name")===(x.name==null?null:x.name)&&A.getAttribute("property")===(x.property==null?null:x.property)&&A.getAttribute("http-equiv")===(x.httpEquiv==null?null:x.httpEquiv)&&A.getAttribute("charset")===(x.charSet==null?null:x.charSet)){q.splice(G,1);break t}}A=R.createElement(C),cr(A,C,x),R.head.appendChild(A);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+C+'". This is a bug in React.')}A[ur]=r,Ve(A),C=A}r.stateNode=C}else IN(R,r.type,r.stateNode);else r.stateNode=LN(R,C,r.memoizedProps);else A!==C?(A===null?x.stateNode!==null&&(x=x.stateNode,x.parentNode.removeChild(x)):A.count--,C===null?IN(R,r.type,r.stateNode):LN(R,C,r.memoizedProps)):C===null&&r.stateNode!==null&&q2(r,r.memoizedProps,x.memoizedProps)}break;case 27:no(o,r),ro(r),C&512&&(zn||x===null||Ei(x,x.return)),x!==null&&C&4&&q2(r,r.memoizedProps,x.memoizedProps);break;case 5:if(no(o,r),ro(r),C&512&&(zn||x===null||Ei(x,x.return)),r.flags&32){R=r.stateNode;try{me(r,CN,R)}catch(Ae){_t(r,r.return,Ae)}}C&4&&r.stateNode!=null&&(R=r.memoizedProps,q2(r,R,x!==null?x.memoizedProps:R)),C&1024&&(kw=!0,r.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(no(o,r),ro(r),C&4){if(r.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.");C=r.memoizedProps,x=x!==null?x.memoizedProps:C,R=r.stateNode;try{me(r,qq,R,x,C)}catch(Ae){_t(r,r.return,Ae)}}break;case 3:if(R=ms(),ev=null,A=Va,Va=q0(o.containerInfo),no(o,r),Va=A,ro(r),C&4&&x!==null&&x.memoizedState.isDehydrated)try{me(r,oG,o.containerInfo)}catch(Ae){_t(r,r.return,Ae)}kw&&(kw=!1,TM(r)),o.effectDuration+=u0(R);break;case 4:C=Va,Va=q0(r.stateNode.containerInfo),no(o,r),ro(r),Va=C;break;case 12:C=ms(),no(o,r),ro(r),r.stateNode.effectDuration+=Ah(C);break;case 31:no(o,r),ro(r),C&4&&(C=r.updateQueue,C!==null&&(r.updateQueue=null,B0(r,C)));break;case 13:no(o,r),ro(r),r.child.flags&8192&&r.memoizedState!==null!==(x!==null&&x.memoizedState!==null)&&(zy=Zn()),C&4&&(C=r.updateQueue,C!==null&&(r.updateQueue=null,B0(r,C)));break;case 22:R=r.memoizedState!==null;var B=x!==null&&x.memoizedState!==null,ee=Ns,$e=zn;if(Ns=ee||R,zn=$e||B,no(o,r),zn=$e,Ns=ee,B&&!R&&!ee&&!$e&&(r.mode&st)!==We&&0<=je&&0<=Ge&&0.05<Ge-je&&e0(r,je,Ge),ro(r),C&8192)e:for(o=r.stateNode,o._visibility=R?o._visibility&~fm:o._visibility|fm,!R||x===null||B||Ns||zn||(bu(r),(r.mode&st)!==We&&0<=je&&0<=Ge&&0.05<Ge-je&&mi(r,je,Ge,"Disconnect")),x=null,o=r;;){if(o.tag===5||o.tag===26){if(x===null){B=x=o;try{A=B.stateNode,R?me(B,Jq,A):me(B,Zq,B.stateNode,B.memoizedProps)}catch(Ae){_t(B,B.return,Ae)}}}else if(o.tag===6){if(x===null){B=o;try{q=B.stateNode,R?me(B,Xq,q):me(B,eG,q,B.memoizedProps)}catch(Ae){_t(B,B.return,Ae)}}}else if(o.tag===18){if(x===null){B=o;try{G=B.stateNode,R?me(B,Yq,G):me(B,Qq,B.stateNode)}catch(Ae){_t(B,B.return,Ae)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===r)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break e;for(;o.sibling===null;){if(o.return===null||o.return===r)break e;x===o&&(x=null),o=o.return}x===o&&(x=null),o.sibling.return=o.return,o=o.sibling}C&4&&(C=r.updateQueue,C!==null&&(x=C.retryQueue,x!==null&&(C.retryQueue=null,B0(r,x))));break;case 19:no(o,r),ro(r),C&4&&(C=r.updateQueue,C!==null&&(r.updateQueue=null,B0(r,C)));break;case 30:break;case 21:break;default:no(o,r),ro(r)}(r.mode&st)!==We&&0<=je&&0<=Ge&&((hn||0.05<un)&&gi(r,je,Ge,un,on),r.alternate===null&&r.return!==null&&r.return.alternate!==null&&0.05<Ge-je&&(vM(r.return.alternate,r.return)||mi(r,je,Ge,"Mount"))),Eo(s),vi(d),on=p,hn=g}function ro(r){var o=r.flags;if(o&2){try{me(r,xq,r)}catch(s){_t(r,r.return,s)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function TM(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var o=r;TM(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),r=r.sibling}}function Ti(r,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)xM(r,o.alternate,o),o=o.sibling}function RM(r){var o=wo(),s=yi(),d=xi(),p=$i();switch(r.tag){case 0:case 11:case 14:case 15:j2(r,r.return,Po),bu(r);break;case 1:Ei(r,r.return);var g=r.stateNode;typeof g.componentWillUnmount==="function"&&hM(r,r.return,g),bu(r);break;case 27:me(r,Jh,r.stateNode);case 26:case 5:Ei(r,r.return),bu(r);break;case 22:r.memoizedState===null&&bu(r);break;case 30:bu(r);break;default:bu(r)}(r.mode&st)!==We&&0<=je&&0<=Ge&&(hn||0.05<un)&&gi(r,je,Ge,un,on),Eo(o),vi(s),on=d,hn=p}function bu(r){for(r=r.child;r!==null;)RM(r),r=r.sibling}function kM(r,o,s,d){var p=wo(),g=yi(),x=xi(),C=$i(),R=s.flags;switch(s.tag){case 0:case 11:case 15:Ri(r,s,d),dM(s,Po);break;case 1:if(Ri(r,s,d),o=s.stateNode,typeof o.componentDidMount==="function"&&me(s,mw,s,o),o=s.updateQueue,o!==null){r=s.stateNode;try{me(s,oq,o,r)}catch(A){_t(s,s.return,A)}}d&&R&64&&pM(s),Fh(s,s.return);break;case 27:yM(s);case 26:case 5:Ri(r,s,d),d&&o===null&&R&4&&gM(s),Fh(s,s.return);break;case 12:if(d&&R&4){R=ms(),Ri(r,s,d),d=s.stateNode,d.effectDuration+=Ah(R);try{me(s,mM,s,o,jl,d.effectDuration)}catch(A){_t(s,s.return,A)}}else Ri(r,s,d);break;case 31:Ri(r,s,d),d&&R&4&&CM(r,s);break;case 13:Ri(r,s,d),d&&R&4&&wM(r,s);break;case 22:s.memoizedState===null&&Ri(r,s,d),Fh(s,s.return);break;case 30:break;default:Ri(r,s,d)}(s.mode&st)!==We&&0<=je&&0<=Ge&&(hn||0.05<un)&&gi(s,je,Ge,un,on),Eo(p),vi(g),on=x,hn=C}function Ri(r,o,s){s=s&&(o.subtreeFlags&8772)!==0;for(o=o.child;o!==null;)kM(r,o.alternate,o,s),o=o.sibling}function Y2(r,o){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(r=o.memoizedState.cachePool.pool),r!==s&&(r!=null&&fu(r),s!=null&&kh(s))}function J2(r,o){r=null,o.alternate!==null&&(r=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==r&&(fu(o),r!=null&&kh(r))}function Ia(r,o,s,d,p){if(o.subtreeFlags&10256||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child))for(o=o.child;o!==null;){var g=o.sibling;AM(r,o,s,d,g!==null?g.actualStartTime:p),o=g}}function AM(r,o,s,d,p){var g=wo(),x=yi(),C=xi(),R=$i(),A=Hl,q=o.flags;switch(o.tag){case 0:case 11:case 15:(o.mode&st)!==We&&0<o.actualStartTime&&(o.flags&1)!==0&&t0(o,o.actualStartTime,p,Wn,s),Ia(r,o,s,d,p),q&2048&&fM(o,Ur|sa);break;case 1:(o.mode&st)!==We&&0<o.actualStartTime&&((o.flags&128)!==0?DS(o,o.actualStartTime,p,[]):(o.flags&1)!==0&&t0(o,o.actualStartTime,p,Wn,s)),Ia(r,o,s,d,p);break;case 3:var G=ms(),B=Wn;Wn=o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)===0,Ia(r,o,s,d,p),Wn=B,q&2048&&(s=null,o.alternate!==null&&(s=o.alternate.memoizedState.cache),d=o.memoizedState.cache,d!==s&&(fu(d),s!=null&&kh(s))),r.passiveEffectDuration+=u0(G);break;case 12:if(q&2048){q=ms(),Ia(r,o,s,d,p),r=o.stateNode,r.passiveEffectDuration+=Ah(q);try{me(o,vq,o,o.alternate,jl,r.passiveEffectDuration)}catch(ee){_t(o,o.return,ee)}}else Ia(r,o,s,d,p);break;case 31:q=Wn,G=o.alternate!==null?o.alternate.memoizedState:null,B=o.memoizedState,G!==null&&B===null?(B=o.deletions,B!==null&&0<B.length&&B[0].tag===18?(Wn=!1,G=G.hydrationErrors,G!==null&&DS(o,o.actualStartTime,p,G)):Wn=!0):Wn=!1,Ia(r,o,s,d,p),Wn=q;break;case 13:q=Wn,G=o.alternate!==null?o.alternate.memoizedState:null,B=o.memoizedState,G===null||G.dehydrated===null||B!==null&&B.dehydrated!==null?Wn=!1:(B=o.deletions,B!==null&&0<B.length&&B[0].tag===18?(Wn=!1,G=G.hydrationErrors,G!==null&&DS(o,o.actualStartTime,p,G)):Wn=!0),Ia(r,o,s,d,p),Wn=q;break;case 23:break;case 22:B=o.stateNode,G=o.alternate,o.memoizedState!==null?B._visibility&$s?Ia(r,o,s,d,p):Uh(r,o,s,d,p):B._visibility&$s?Ia(r,o,s,d,p):(B._visibility|=$s,af(r,o,s,d,(o.subtreeFlags&10256)!==0||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child),p),(o.mode&st)===We||Wn||(r=o.actualStartTime,0<=r&&0.05<p-r&&e0(o,r,p),0<=je&&0<=Ge&&0.05<Ge-je&&e0(o,je,Ge))),q&2048&&Y2(G,o);break;case 24:Ia(r,o,s,d,p),q&2048&&J2(o.alternate,o);break;default:Ia(r,o,s,d,p)}if((o.mode&st)!==We){if(r=!Wn&&o.alternate===null&&o.return!==null&&o.return.alternate!==null)s=o.actualStartTime,0<=s&&0.05<p-s&&mi(o,s,p,"Mount");0<=je&&0<=Ge&&((hn||0.05<un)&&gi(o,je,Ge,un,on),r&&0.05<Ge-je&&mi(o,je,Ge,"Mount"))}Eo(g),vi(x),on=C,hn=R,Hl=A}function af(r,o,s,d,p,g){p=p&&((o.subtreeFlags&10256)!==0||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child));for(o=o.child;o!==null;){var x=o.sibling;MM(r,o,s,d,p,x!==null?x.actualStartTime:g),o=x}}function MM(r,o,s,d,p,g){var x=wo(),C=yi(),R=xi(),A=$i(),q=Hl;p&&(o.mode&st)!==We&&0<o.actualStartTime&&(o.flags&1)!==0&&t0(o,o.actualStartTime,g,Wn,s);var G=o.flags;switch(o.tag){case 0:case 11:case 15:af(r,o,s,d,p,g),fM(o,Ur);break;case 23:break;case 22:var B=o.stateNode;o.memoizedState!==null?B._visibility&$s?af(r,o,s,d,p,g):Uh(r,o,s,d,g):(B._visibility|=$s,af(r,o,s,d,p,g)),p&&G&2048&&Y2(o.alternate,o);break;case 24:af(r,o,s,d,p,g),p&&G&2048&&J2(o.alternate,o);break;default:af(r,o,s,d,p,g)}(o.mode&st)!==We&&0<=je&&0<=Ge&&(hn||0.05<un)&&gi(o,je,Ge,un,on),Eo(x),vi(C),on=R,hn=A,Hl=q}function Uh(r,o,s,d,p){if(o.subtreeFlags&10256||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child))for(var g=o.child;g!==null;){o=g.sibling;var x=r,C=s,R=d,A=o!==null?o.actualStartTime:p,q=Hl;(g.mode&st)!==We&&0<g.actualStartTime&&(g.flags&1)!==0&&t0(g,g.actualStartTime,A,Wn,C);var G=g.flags;switch(g.tag){case 22:Uh(x,g,C,R,A),G&2048&&Y2(g.alternate,g);break;case 24:Uh(x,g,C,R,A),G&2048&&J2(g.alternate,g);break;default:Uh(x,g,C,R,A)}Hl=q,g=o}}function sf(r,o,s){if(r.subtreeFlags&Om)for(r=r.child;r!==null;)NM(r,o,s),r=r.sibling}function NM(r,o,s){switch(r.tag){case 26:sf(r,o,s),r.flags&Om&&r.memoizedState!==null&&uG(s,Va,r.memoizedState,r.memoizedProps);break;case 5:sf(r,o,s);break;case 3:case 4:var d=Va;Va=q0(r.stateNode.containerInfo),sf(r,o,s),Va=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Om,Om=16777216,sf(r,o,s),Om=d):sf(r,o,s));break;default:sf(r,o,s)}}function OM(r){var o=r.alternate;if(o!==null&&(r=o.child,r!==null)){o.child=null;do o=r.sibling,r.sibling=null,r=o;while(r!==null)}}function Vh(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var d=o[s],p=wo();tr=d,LM(d,r),(d.mode&st)!==We&&0<=je&&0<=Ge&&0.05<Ge-je&&mi(d,je,Ge,"Unmount"),Eo(p)}OM(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)DM(r),r=r.sibling}function DM(r){var o=wo(),s=yi(),d=xi(),p=$i();switch(r.tag){case 0:case 11:case 15:Vh(r),r.flags&2048&&K2(r,r.return,Ur|sa);break;case 3:var g=ms();Vh(r),r.stateNode.passiveEffectDuration+=u0(g);break;case 12:g=ms(),Vh(r),r.stateNode.passiveEffectDuration+=Ah(g);break;case 22:g=r.stateNode,r.memoizedState!==null&&g._visibility&$s&&(r.return===null||r.return.tag!==13)?(g._visibility&=~$s,z0(r),(r.mode&st)!==We&&0<=je&&0<=Ge&&0.05<Ge-je&&mi(r,je,Ge,"Disconnect")):Vh(r);break;default:Vh(r)}(r.mode&st)!==We&&0<=je&&0<=Ge&&(hn||0.05<un)&&gi(r,je,Ge,un,on),Eo(o),vi(s),hn=p,on=d}function z0(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var d=o[s],p=wo();tr=d,LM(d,r),(d.mode&st)!==We&&0<=je&&0<=Ge&&0.05<Ge-je&&mi(d,je,Ge,"Unmount"),Eo(p)}OM(r)}for(r=r.child;r!==null;)PM(r),r=r.sibling}function PM(r){var o=wo(),s=yi(),d=xi(),p=$i();switch(r.tag){case 0:case 11:case 15:K2(r,r.return,Ur),z0(r);break;case 22:var g=r.stateNode;g._visibility&$s&&(g._visibility&=~$s,z0(r));break;default:z0(r)}(r.mode&st)!==We&&0<=je&&0<=Ge&&(hn||0.05<un)&&gi(r,je,Ge,un,on),Eo(o),vi(s),hn=p,on=d}function LM(r,o){for(;tr!==null;){var s=tr,d=s,p=o,g=wo(),x=yi(),C=xi(),R=$i();switch(d.tag){case 0:case 11:case 15:K2(d,p,Ur);break;case 23:case 22:d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(p=d.memoizedState.cachePool.pool,p!=null&&fu(p));break;case 24:kh(d.memoizedState.cache)}if((d.mode&st)!==We&&0<=je&&0<=Ge&&(hn||0.05<un)&&gi(d,je,Ge,un,on),Eo(g),vi(x),hn=R,on=C,d=s.child,d!==null)d.return=s,tr=d;else e:for(s=r;tr!==null;){if(d=tr,g=d.sibling,x=d.return,$M(d),d===s){tr=null;break e}if(g!==null){g.return=x,tr=g;break e}tr=x}}}function Cq(){jW.forEach(function(r){return r()})}function _M(){var r=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return r||oe.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),r}function Ro(r){if((kt&Yn)!==nr&&ct!==0)return ct&-ct;var o=oe.T;return o!==null?(o._updatedFibers||(o._updatedFibers=new Set),o._updatedFibers.add(r),oC()):Z()}function IM(){if(io===0)if((ct&536870912)===0||$t){var r=oy;oy<<=1,(oy&3932160)===0&&(oy=262144),io=r}else io=536870912;return r=Do.current,r!==null&&(r.flags|=32),io}function pn(r,o,s){if(qf&&console.error("useInsertionEffect must not schedule updates."),zw&&(Vy=!0),r===jt&&(Ht===Ou||Ht===Du)||r.cancelPendingCommit!==null)cf(r,0),Ol(r,ct,io,!1);if(xl(r,s),(kt&Yn)!==nr&&r===jt){if(Oi)switch(o.tag){case 0:case 11:case 15:r=dt&&Y(dt)||"Unknown",uD.has(r)||(uD.add(r),o=Y(o)||"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",o,r,r));break;case 1:cD||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),cD=!0)}}else Pi&&bh(r,o,s),Dq(o),r===jt&&((kt&Yn)===nr&&(Zl|=s),dn===Jl&&Ol(r,ct,io,!1)),ki(r)}function BM(r,o,s){if((kt&(Yn|Lo))!==nr)throw Error("Should not already be working.");if(ct!==0&&dt!==null){var d=dt,p=Zn();switch(nO){case Lm:case Ou:var g=ym;Jt&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Suspended",g,p,Zo,void 0,"primary-light")):console.timeStamp("Suspended",g,p,Zo,void 0,"primary-light"));break;case Du:g=ym,Jt&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Action",g,p,Zo,void 0,"primary-light")):console.timeStamp("Action",g,p,Zo,void 0,"primary-light"));break;default:Jt&&(d=p-ym,3>d||console.timeStamp("Blocked",ym,p,Zo,void 0,5>d?"primary-light":10>d?"primary":100>d?"primary-dark":"error"))}}g=(s=!s&&(o&127)===0&&(o&r.expiredLanes)===0||Zc(r,o))?Eq(r,o):Q2(r,o,!0);var x=s;do{if(g===Os){jf&&!s&&Ol(r,o,0,!1),o=Ht,ym=_n(),nO=o;break}else{if(d=Zn(),p=r.current.alternate,x&&!wq(p)){So(o),p=er,g=d,!Jt||g<=p||(xn?xn.run(console.timeStamp.bind(console,"Teared Render",p,g,gt,ht,"error")):console.timeStamp("Teared Render",p,g,gt,ht,"error")),yu(o,d),g=Q2(r,o,!1),x=!1;continue}if(g===Nu){if(x=o,r.errorRecoveryDisabledLanes&x)var C=0;else C=r.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){So(o),PS(er,d,o,xn),yu(o,d),o=C;e:{d=r,g=x,x=Im;var R=d.current.memoizedState.isDehydrated;if(R&&(cf(d,C).flags|=256),C=Q2(d,C,!1),C!==Nu){if(Nw&&!R){d.errorRecoveryDisabledLanes|=g,Zl|=g,g=Jl;break e}d=Vr,Vr=x,d!==null&&(Vr===null?Vr=d:Vr.push.apply(Vr,d))}g=C}if(x=!1,g!==Nu)continue;else d=Zn()}}if(g===Pm){So(o),PS(er,d,o,xn),yu(o,d),cf(r,0),Ol(r,o,0,!0);break}e:{switch(s=r,g){case Os:case Pm:throw Error("Root did not complete. This is a bug in React.");case Jl:if((o&4194048)!==o)break;case Ly:So(o),BA(er,d,o,xn),yu(o,d),p=o,(p&127)!==0?xy=d:(p&4194048)!==0&&($y=d),Ol(s,o,io,!Xl);break e;case Nu:Vr=null;break;case Py:case JO:break;default:throw Error("Unknown root exit status.")}if(oe.actQueue!==null)Z2(s,p,o,Vr,Bm,By,io,Zl,Pu,g,null,null,er,d);else{if((o&62914560)===o&&(x=zy+ZO-Zn(),10<x)){if(Ol(s,o,io,!Xl),Qc(s,0,!0)!==0)break e;ja=o,s.timeoutHandle=yD(zM.bind(null,s,p,Vr,Bm,By,o,io,Zl,Pu,Xl,g,"Throttled",er,d),x);break e}zM(s,p,Vr,Bm,By,o,io,Zl,Pu,Xl,g,null,er,d)}}}break}while(1);ki(r)}function zM(r,o,s,d,p,g,x,C,R,A,q,G,B,ee){r.timeoutHandle=zu;var $e=o.subtreeFlags,Ae=null;if($e&8192||($e&16785408)===16785408){if(Ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ds},NM(o,g,Ae),$e=(g&62914560)===g?zy-Zn():(g&4194048)===g?QO-Zn():0,$e=dG(Ae,$e),$e!==null){ja=g,r.cancelPendingCommit=$e(Z2.bind(null,r,o,g,s,d,p,x,C,R,q,Ae,Ae.waitingForViewTransition?"Waiting for the previous Animation":0<Ae.count?0<Ae.imgCount?"Suspended on CSS and Images":"Suspended on CSS":Ae.imgCount===1?"Suspended on an Image":0<Ae.imgCount?"Suspended on Images":null,B,ee)),Ol(r,g,x,!A);return}}Z2(r,o,g,s,d,p,x,C,R,q,Ae,G,B,ee)}function wq(r){for(var o=r;;){var s=o.tag;if((s===0||s===11||s===15)&&o.flags&16384&&(s=o.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var d=0;d<s.length;d++){var p=s[d],g=p.getSnapshot;p=p.value;try{if(!zr(g(),p))return!1}catch(x){return!1}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Ol(r,o,s,d){o&=~Ow,o&=~Zl,r.suspendedLanes|=o,r.pingedLanes&=~o,d&&(r.warmLanes|=o),d=r.expirationTimes;for(var p=o;0<p;){var g=31-_r(p),x=1<<g;d[g]=-1,p&=~x}s!==0&&eu(r,s,o)}function lf(){return(kt&(Yn|Lo))===nr?(qh(0,!1),!1):!0}function X2(){if(dt!==null){if(Ht===ao)var r=dt.return;else r=dt,s0(),l2(r),Lf=null,Rm=0,r=dt;for(;r!==null;)uM(r.alternate,r),r=r.return;dt=null}}function yu(r,o){(r&127)!==0&&(Kl=o),(r&4194048)!==0&&(zi=o),(r&62914560)!==0&&(eO=o),(r&2080374784)!==0&&(tO=o)}function cf(r,o){Jt&&(console.timeStamp("Blocking Track",0.003,0.003,"Blocking",ht,"primary-light"),console.timeStamp("Transition Track",0.003,0.003,"Transition",ht,"primary-light"),console.timeStamp("Suspense Track",0.003,0.003,"Suspense",ht,"primary-light"),console.timeStamp("Idle Track",0.003,0.003,"Idle",ht,"primary-light"));var s=er;if(er=_n(),ct!==0&&0<s){if(So(ct),dn===Py||dn===Jl)BA(s,er,o,xn);else{var d=er,p=xn;if(Jt&&!(d<=s)){var g=(o&738197653)===o?"tertiary-dark":"primary-dark",x=(o&536870912)===o?"Prewarm":(o&201326741)===o?"Interrupted Hydration":"Interrupted Render";p?p.run(console.timeStamp.bind(console,x,s,d,gt,ht,g)):console.timeStamp(x,s,d,gt,ht,g)}}yu(ct,er)}if(s=xn,xn=null,(o&127)!==0){xn=mm,p=0<=Bi&&Bi<Kl?Kl:Bi,d=0<=Cu&&Cu<Kl?Kl:Cu,g=0<=d?d:0<=p?p:er,0<=xy?(So(2),zA(xy,g,o,s)):(Sy&127)!==0&&(So(2),Th(Kl,g,Rs)),s=p;var C=d,R=gm,A=0<Of,q=ql===hm,G=ql===vy;if(p=er,d=mm,g=uw,x=dw,Jt){if(gt="Blocking",0<s?s>p&&(s=p):s=p,0<C?C>s&&(C=s):C=s,R!==null&&s>C){var B=A?"secondary-light":"warning";d?d.run(console.timeStamp.bind(console,A?"Consecutive":"Event: "+R,C,s,gt,ht,B)):console.timeStamp(A?"Consecutive":"Event: "+R,C,s,gt,ht,B)}p>s&&(C=q?"error":(o&738197653)===o?"tertiary-light":"primary-light",q=G?"Promise Resolved":q?"Cascading Update":5<p-s?"Update Blocked":"Update",G=[],x!=null&&G.push(["Component name",x]),g!=null&&G.push(["Method name",g]),s={start:s,end:p,detail:{devtools:{properties:G,track:gt,trackGroup:ht,color:C}}},d?d.run(performance.measure.bind(performance,q,s)):performance.measure(q,s))}Bi=-1.1,ql=0,dw=uw=null,xy=-1.1,Of=Cu,Cu=-1.1,Kl=_n()}if((o&4194048)!==0&&(xn=bm,p=0<=Ts&&Ts<zi?zi:Ts,s=0<=aa&&aa<zi?zi:aa,d=0<=Gl&&Gl<zi?zi:Gl,g=0<=d?d:0<=s?s:er,0<=$y?(So(256),zA($y,g,o,xn)):(Sy&4194048)!==0&&(So(256),Th(zi,g,Rs)),G=d,C=wu,R=0<Wl,A=fw===vy,g=er,d=bm,x=Q8,q=Z8,Jt&&(gt="Transition",0<s?s>g&&(s=g):s=g,0<p?p>s&&(p=s):p=s,0<G?G>p&&(G=p):G=p,p>G&&C!==null&&(B=R?"secondary-light":"warning",d?d.run(console.timeStamp.bind(console,R?"Consecutive":"Event: "+C,G,p,gt,ht,B)):console.timeStamp(R?"Consecutive":"Event: "+C,G,p,gt,ht,B)),s>p&&(d?d.run(console.timeStamp.bind(console,"Action",p,s,gt,ht,"primary-dark")):console.timeStamp("Action",p,s,gt,ht,"primary-dark")),g>s&&(p=A?"Promise Resolved":5<g-s?"Update Blocked":"Update",G=[],q!=null&&G.push(["Component name",q]),x!=null&&G.push(["Method name",x]),s={start:s,end:g,detail:{devtools:{properties:G,track:gt,trackGroup:ht,color:"primary-light"}}},d?d.run(performance.measure.bind(performance,p,s)):performance.measure(p,s))),aa=Ts=-1.1,fw=0,$y=-1.1,Wl=Gl,Gl=-1.1,zi=_n()),(o&62914560)!==0&&(Sy&62914560)!==0&&(So(4194304),Th(eO,er,Rs)),(o&2080374784)!==0&&(Sy&2080374784)!==0&&(So(268435456),Th(tO,er,Rs)),s=r.timeoutHandle,s!==zu&&(r.timeoutHandle=zu,rY(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),ja=0,X2(),jt=r,dt=s=fs(r.current,null),ct=o,Ht=ao,_o=null,Xl=!1,jf=Zc(r,o),Nw=!1,dn=Os,Pu=io=Ow=Zl=Ql=0,Vr=Im=null,By=!1,(o&8)!==0&&(o|=o&32),d=r.entangledLanes,d!==0)for(r=r.entanglements,d&=o;0<d;)p=31-_r(d),g=1<<p,o|=r[p],d&=~g;return Fi=o,n0(),r=q8(),1000<r-K8&&(oe.recentlyCreatedOwnerStacks=0,K8=r),Fa.discardPendingWarnings(),s}function HM(r,o){Xe=null,oe.H=Nm,oe.getCurrentStack=null,Oi=!1,Mo=null,o===Pf||o===Ty?(o=s5(),Ht=Lm):o===gw?(o=s5(),Ht=XO):Ht=o===Tw?Mw:o!==null&&typeof o==="object"&&typeof o.then==="function"?_m:_y,_o=o;var s=dt;s===null?(dn=Pm,O0(r,Co(o,r.current))):s.mode&st&&YS(s)}function FM(){var r=Do.current;return r===null?!0:(ct&4194048)===ct?ia===null?!0:!1:(ct&62914560)===ct||(ct&536870912)!==0?r===ia:!1}function UM(){var r=oe.H;return oe.H=Nm,r===null?Nm:r}function VM(){var r=oe.A;return oe.A=VW,r}function H0(r){xn===null&&(xn=r._debugTask==null?null:r._debugTask)}function F0(){dn=Jl,Xl||(ct&4194048)!==ct&&Do.current!==null||(jf=!0),(Ql&134217727)===0&&(Zl&134217727)===0||jt===null||Ol(jt,ct,io,!1)}function Q2(r,o,s){var d=kt;kt|=Yn;var p=UM(),g=VM();if(jt!==r||ct!==o){if(Pi){var x=r.memoizedUpdaters;0<x.size&&(Kh(r,ct),x.clear()),$l(r,o)}Bm=null,cf(r,o)}o=!1,x=dn;e:do try{if(Ht!==ao&&dt!==null){var C=dt,R=_o;switch(Ht){case Mw:X2(),x=Ly;break e;case Lm:case Ou:case Du:case _m:Do.current===null&&(o=!0);var A=Ht;if(Ht=ao,_o=null,uf(r,C,R,A),s&&jf){x=Os;break e}break;default:A=Ht,Ht=ao,_o=null,uf(r,C,R,A)}}jM(),x=dn;break}catch(q){HM(r,q)}while(1);return o&&r.shellSuspendCounter++,s0(),kt=d,oe.H=p,oe.A=g,dt===null&&(jt=null,ct=0,n0()),x}function jM(){for(;dt!==null;)KM(dt)}function Eq(r,o){var s=kt;kt|=Yn;var d=UM(),p=VM();if(jt!==r||ct!==o){if(Pi){var g=r.memoizedUpdaters;0<g.size&&(Kh(r,ct),g.clear()),$l(r,o)}Bm=null,Hy=Zn()+eD,cf(r,o)}else jf=Zc(r,o);e:do try{if(Ht!==ao&&dt!==null)t:switch(o=dt,g=_o,Ht){case _y:Ht=ao,_o=null,uf(r,o,g,_y);break;case Ou:case Du:if(a5(g)){Ht=ao,_o=null,qM(o);break}o=function(){Ht!==Ou&&Ht!==Du||jt!==r||(Ht=Iy),ki(r)},g.then(o,o);break e;case Lm:Ht=Iy;break e;case XO:Ht=Aw;break e;case Iy:a5(g)?(Ht=ao,_o=null,qM(o)):(Ht=ao,_o=null,uf(r,o,g,Iy));break;case Aw:var x=null;switch(dt.tag){case 26:x=dt.memoizedState;case 5:case 27:var C=dt;if(x?BN(x):C.stateNode.complete){Ht=ao,_o=null;var R=C.sibling;if(R!==null)dt=R;else{var A=C.return;A!==null?(dt=A,U0(A)):dt=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Ht=ao,_o=null,uf(r,o,g,Aw);break;case _m:Ht=ao,_o=null,uf(r,o,g,_m);break;case Mw:X2(),dn=Ly;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}oe.actQueue!==null?jM():Tq();break}catch(q){HM(r,q)}while(1);if(s0(),oe.H=d,oe.A=p,kt=s,dt!==null)return Os;return jt=null,ct=0,n0(),dn}function Tq(){for(;dt!==null&&!wG();)KM(dt)}function KM(r){var o=r.alternate;(r.mode&st)!==We?(WS(r),o=me(r,U2,o,r,Fi),YS(r)):o=me(r,U2,o,r,Fi),r.memoizedProps=r.pendingProps,o===null?U0(r):dt=o}function qM(r){var o=me(r,Rq,r);r.memoizedProps=r.pendingProps,o===null?U0(r):dt=o}function Rq(r){var o=r.alternate,s=(r.mode&st)!==We;switch(s&&WS(r),r.tag){case 15:case 0:o=rM(o,r,r.pendingProps,r.type,void 0,ct);break;case 11:o=rM(o,r,r.pendingProps,r.type.render,r.ref,ct);break;case 5:l2(r);default:uM(o,r),r=dt=KA(r,Fi),o=U2(o,r,Fi)}return s&&YS(r),o}function uf(r,o,s,d){s0(),l2(o),Lf=null,Rm=0;var p=o.return;try{if(dq(r,p,o,s,ct)){dn=Pm,O0(r,Co(s,r.current)),dt=null;return}}catch(g){if(p!==null)throw dt=p,g;dn=Pm,O0(r,Co(s,r.current)),dt=null;return}if(o.flags&32768){if($t||d===_y)r=!0;else if(jf||(ct&536870912)!==0)r=!1;else if(Xl=r=!0,d===Ou||d===Du||d===Lm||d===_m)d=Do.current,d!==null&&d.tag===13&&(d.flags|=16384);GM(o,r)}else U0(o)}function U0(r){var o=r;do{if((o.flags&32768)!==0){GM(o,Xl);return}var s=o.alternate;if(r=o.return,WS(o),s=me(o,hq,s,o,Fi),(o.mode&st)!==We&&e5(o),s!==null){dt=s;return}if(o=o.sibling,o!==null){dt=o;return}dt=o=r}while(o!==null);dn===Os&&(dn=JO)}function GM(r,o){do{var s=mq(r.alternate,r);if(s!==null){s.flags&=32767,dt=s;return}if((r.mode&st)!==We){e5(r),s=r.actualDuration;for(var d=r.child;d!==null;)s+=d.actualDuration,d=d.sibling;r.actualDuration=s}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!o&&(r=r.sibling,r!==null)){dt=r;return}dt=r=s}while(r!==null);dn=Ly,dt=null}function Z2(r,o,s,d,p,g,x,C,R,A,q,G,B,ee){r.cancelPendingCommit=null;do jh();while(Fn!==tc);if(Fa.flushLegacyContextWarning(),Fa.flushPendingUnsafeLifecycleWarnings(),(kt&(Yn|Lo))!==nr)throw Error("Should not already be working.");if(So(s),A===Nu?PS(B,ee,s,xn):d!==null?QK(B,ee,s,d,o!==null&&o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)!==0,xn):XK(B,ee,s,xn),o!==null){if(s===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),o===r.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(g=o.lanes|o.childLanes,g|=aw,Kb(r,s,g,x,C,R),r===jt&&(dt=jt=null,ct=0),Kf=o,nc=r,ja=s,Lw=g,Iw=p,iD=d,_w=ee,sD=G,Ka=Fy,lD=null,o.actualDuration!==0||(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Oq(gf,function(){return jm=window.event,Ka===Fy&&(Ka=Pw),QM(),null})):(r.callbackNode=null,r.callbackPriority=0),Es=null,jl=_n(),G!==null&&ZK(ee,jl,G,xn),d=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||d){d=oe.T,oe.T=null,p=It.p,It.p=No,x=kt,kt|=Lo;try{$q(r,o,s)}finally{kt=x,It.p=p,oe.T=d}}Fn=nD,WM(),YM(),JM()}}function WM(){if(Fn===nD){Fn=tc;var r=nc,o=Kf,s=ja,d=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||d){d=oe.T,oe.T=null;var p=It.p;It.p=No;var g=kt;kt|=Lo;try{Uf=s,Vf=r,d0(),EM(o,r),Vf=Uf=null,s=Ww;var x=LA(r.containerInfo),C=s.focusedElem,R=s.selectionRange;if(x!==C&&C&&C.ownerDocument&&PA(C.ownerDocument.documentElement,C)){if(R!==null&&NS(C)){var{start:A,end:q}=R;if(q===void 0&&(q=A),"selectionStart"in C)C.selectionStart=A,C.selectionEnd=Math.min(q,C.value.length);else{var G=C.ownerDocument||document,B=G&&G.defaultView||window;if(B.getSelection){var ee=B.getSelection(),$e=C.textContent.length,Ae=Math.min(R.start,$e),Wt=R.end===void 0?Ae:Math.min(R.end,$e);!ee.extend&&Ae>Wt&&(x=Wt,Wt=Ae,Ae=x);var Et=DA(C,Ae),I=DA(C,Wt);if(Et&&I&&(ee.rangeCount!==1||ee.anchorNode!==Et.node||ee.anchorOffset!==Et.offset||ee.focusNode!==I.node||ee.focusOffset!==I.offset)){var F=G.createRange();F.setStart(Et.node,Et.offset),ee.removeAllRanges(),Ae>Wt?(ee.addRange(F),ee.extend(I.node,I.offset)):(F.setEnd(I.node,I.offset),ee.addRange(F))}}}}G=[];for(ee=C;ee=ee.parentNode;)ee.nodeType===1&&G.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});typeof C.focus==="function"&&C.focus();for(C=0;C<G.length;C++){var j=G[C];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}rv=!!Gw,Ww=Gw=null}finally{kt=g,It.p=p,oe.T=d}}r.current=o,Fn=rD}}function YM(){if(Fn===rD){Fn=tc;var r=lD;if(r!==null){jl=_n();var o=ws,s=jl;!Jt||s<=o||(Rs?Rs.run(console.timeStamp.bind(console,r,o,s,gt,ht,"secondary-light")):console.timeStamp(r,o,s,gt,ht,"secondary-light"))}r=nc,o=Kf,s=ja;var d=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||d){d=oe.T,oe.T=null;var p=It.p;It.p=No;var g=kt;kt|=Lo;try{Uf=s,Vf=r,d0(),xM(r,o.alternate,o),Vf=Uf=null}finally{kt=g,It.p=p,oe.T=d}}r=_w,o=sD,ws=_n(),r=o===null?r:jl,o=ws,s=Ka===Dw,d=xn,Es!==null?HA(r,o,Es,!1,d):!Jt||o<=r||(d?d.run(console.timeStamp.bind(console,s?"Commit Interrupted View Transition":"Commit",r,o,gt,ht,s?"error":"secondary-dark")):console.timeStamp(s?"Commit Interrupted View Transition":"Commit",r,o,gt,ht,s?"error":"secondary-dark")),Fn=oD}}function JM(){if(Fn===aD||Fn===oD){if(Fn===aD){var r=ws;ws=_n();var o=ws,s=Ka===Dw;!Jt||o<=r||(Rs?Rs.run(console.timeStamp.bind(console,s?"Interrupted View Transition":"Starting Animation",r,o,gt,ht,s?"error":"secondary-light")):console.timeStamp(s?"Interrupted View Transition":"Starting Animation",r,o,gt,ht,s?" error":"secondary-light")),Ka!==Dw&&(Ka=tD)}Fn=tc,EG(),r=nc;var d=Kf;o=ja,s=iD;var p=d.actualDuration!==0||(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0;p?Fn=Uy:(Fn=tc,Kf=nc=null,XM(r,r.pendingLanes),Lu=0,Hm=null);var g=r.pendingLanes;if(g===0&&(ec=null),p||nN(r),g=M(o),d=d.stateNode,Tr&&typeof Tr.onCommitFiberRoot==="function")try{var x=(d.current.flags&128)===128;switch(g){case No:var C=IC;break;case za:C=BC;break;case Li:C=gf;break;case iy:C=zC;break;default:C=gf}Tr.onCommitFiberRoot(bf,d,C,x)}catch(G){Di||(Di=!0,console.error("React instrumentation encountered an error: %o",G))}if(Pi&&r.memoizedUpdaters.clear(),Cq(),s!==null){x=oe.T,C=It.p,It.p=No,oe.T=null;try{var R=r.onRecoverableError;for(d=0;d<s.length;d++){var A=s[d],q=kq(A.stack);me(A.source,R,A.value,q)}}finally{oe.T=x,It.p=C}}(ja&3)!==0&&jh(),ki(r),g=r.pendingLanes,(o&261930)!==0&&(g&42)!==0?(wy=!0,r===Bw?zm++:(zm=0,Bw=r)):zm=0,p||yu(o,ws),qh(0,!1)}}function kq(r){return r={componentStack:r},Object.defineProperty(r,"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.')}}),r}function XM(r,o){(r.pooledCacheLanes&=o)===0&&(o=r.pooledCache,o!=null&&(r.pooledCache=null,kh(o)))}function jh(){return WM(),YM(),JM(),QM()}function QM(){if(Fn!==Uy)return!1;var r=nc,o=Lw;Lw=0;var s=M(ja),d=Li===0||Li>s?Li:s;s=oe.T;var p=It.p;try{It.p=d,oe.T=null;var g=Iw;Iw=null,d=nc;var x=ja;if(Fn=tc,Kf=nc=null,ja=0,(kt&(Yn|Lo))!==nr)throw Error("Cannot flush passive effects while already rendering.");So(x),zw=!0,Vy=!1;var C=0;if(Es=null,C=Zn(),Ka===tD)Th(ws,C,Rs);else{var R=ws,A=C,q=Ka===Pw;!Jt||A<=R||(xn?xn.run(console.timeStamp.bind(console,q?"Waiting for Paint":"Waiting",R,A,gt,ht,"secondary-light")):console.timeStamp(q?"Waiting for Paint":"Waiting",R,A,gt,ht,"secondary-light"))}R=kt,kt|=Lo;var G=d.current;d0(),DM(G);var B=d.current;G=_w,d0(),AM(d,B,x,g,G),nN(d),kt=R;var ee=Zn();if(B=C,G=xn,Es!==null?HA(B,ee,Es,!0,G):!Jt||ee<=B||(G?G.run(console.timeStamp.bind(console,"Remaining Effects",B,ee,gt,ht,"secondary-dark")):console.timeStamp("Remaining Effects",B,ee,gt,ht,"secondary-dark")),yu(x,ee),qh(0,!1),Vy?d===Hm?Lu++:(Lu=0,Hm=d):Lu=0,Vy=zw=!1,Tr&&typeof Tr.onPostCommitFiberRoot==="function")try{Tr.onPostCommitFiberRoot(bf,d)}catch(Ae){Di||(Di=!0,console.error("React instrumentation encountered an error: %o",Ae))}var $e=d.current.stateNode;return $e.effectDuration=0,$e.passiveEffectDuration=0,!0}finally{It.p=p,oe.T=s,XM(r,o)}}function ZM(r,o,s){o=Co(s,o),t5(o),o=N2(r.stateNode,o,2),r=kl(r,o,2),r!==null&&(xl(r,2),ki(r))}function _t(r,o,s){if(qf=!1,r.tag===3)ZM(r,r,s);else{for(;o!==null;){if(o.tag===3){ZM(o,r,s);return}if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError==="function"||typeof d.componentDidCatch==="function"&&(ec===null||!ec.has(d))){r=Co(s,r),t5(r),s=O2(2),d=kl(o,s,2),d!==null&&(D2(s,d,o,r),xl(d,2),ki(d));return}}o=o.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`,s)}}function eC(r,o,s){var d=r.pingCache;if(d===null){d=r.pingCache=new KW;var p=new Set;d.set(o,p)}else p=d.get(o),p===void 0&&(p=new Set,d.set(o,p));p.has(s)||(Nw=!0,p.add(s),d=Aq.bind(null,r,o,s),Pi&&Kh(r,s),o.then(d,d))}function Aq(r,o,s){var d=r.pingCache;d!==null&&d.delete(o),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,(s&127)!==0?0>Bi&&(Kl=Bi=_n(),mm=yy("Promise Resolved"),ql=vy):(s&4194048)!==0&&0>aa&&(zi=aa=_n(),bm=yy("Promise Resolved"),fw=vy),_M()&&oe.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`),jt===r&&(ct&s)===s&&(dn===Jl||dn===Py&&(ct&62914560)===ct&&Zn()-zy<ZO?(kt&Yn)===nr&&cf(r,0):Ow|=s,Pu===ct&&(Pu=0)),ki(r)}function eN(r,o){o===0&&(o=Gd()),r=Er(r,o),r!==null&&(xl(r,o),ki(r))}function Mq(r){var o=r.memoizedState,s=0;o!==null&&(s=o.retryLane),eN(r,s)}function Nq(r,o){var s=0;switch(r.tag){case 31:case 13:var{stateNode:d,memoizedState:p}=r;p!==null&&(s=p.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}d!==null&&d.delete(o),eN(r,s)}function tC(r,o,s){if((o.subtreeFlags&67117056)!==0)for(o=o.child;o!==null;){var d=r,p=o,g=p.type===ey;g=s||g,p.tag!==22?p.flags&67108864?g&&me(p,tN,d,p):tC(d,p,g):p.memoizedState===null&&(g&&p.flags&8192?me(p,tN,d,p):p.subtreeFlags&67108864&&me(p,tC,d,p,g)),o=o.sibling}}function tN(r,o){qt(!0);try{RM(o),PM(o),kM(r,o.alternate,o,!1),MM(r,o,0,null,!1,0)}finally{qt(!1)}}function nN(r){var o=!0;r.current.mode&(Rr|Ha)||(o=!1),tC(r,r.current,o)}function rN(r){if((kt&Yn)===nr){var o=r.tag;if(o===3||o===1||o===0||o===11||o===14||o===15){if(o=Y(r)||"ReactComponent",jy!==null){if(jy.has(o))return;jy.add(o)}else jy=new Set([o]);me(r,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 Kh(r,o){Pi&&r.memoizedUpdaters.forEach(function(s){bh(r,s,o)})}function Oq(r,o){var s=oe.actQueue;return s!==null?(s.push(o),WW):_C(r,o)}function Dq(r){_M()&&oe.actQueue===null&&me(r,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`,Y(r))})}function ki(r){r!==Gf&&r.next===null&&(Gf===null?Ky=Gf=r:Gf=Gf.next=r),qy=!0,oe.actQueue!==null?Fw||(Fw=!0,sN()):Hw||(Hw=!0,sN())}function qh(r,o){if(!Uw&&qy){Uw=!0;do{var s=!1;for(var d=Ky;d!==null;){if(!o)if(r!==0){var p=d.pendingLanes;if(p===0)var g=0;else{var{suspendedLanes:x,pingedLanes:C}=d;g=(1<<31-_r(42|r)+1)-1,g&=p&~(x&~C),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,iN(d,g))}else g=ct,g=Qc(d,d===jt?g:0,d.cancelPendingCommit!==null||d.timeoutHandle!==zu),(g&3)===0||Zc(d,g)||(s=!0,iN(d,g));d=d.next}}while(s);Uw=!1}}function Pq(){jm=window.event,nC()}function nC(){qy=Fw=Hw=!1;var r=0;rc!==0&&Fq()&&(r=rc);for(var o=Zn(),s=null,d=Ky;d!==null;){var p=d.next,g=oN(d,o);if(g===0)d.next=null,s===null?Ky=p:s.next=p,p===null&&(Gf=s);else if(s=d,r!==0||(g&3)!==0)qy=!0;d=p}Fn!==tc&&Fn!==Uy||qh(r,!1),rc!==0&&(rc=0)}function oN(r,o){for(var{suspendedLanes:s,pingedLanes:d,expirationTimes:p}=r,g=r.pendingLanes&-62914561;0<g;){var x=31-_r(g),C=1<<x,R=p[x];if(R===-1){if((C&s)===0||(C&d)!==0)p[x]=xS(C,o)}else R<=o&&(r.expiredLanes|=C);g&=~C}if(o=jt,s=ct,s=Qc(r,r===o?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==zu),d=r.callbackNode,s===0||r===o&&(Ht===Ou||Ht===Du)||r.cancelPendingCommit!==null)return d!==null&&rC(d),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Zc(r,s)){if(o=s&-s,o!==r.callbackPriority||oe.actQueue!==null&&d!==Vw)rC(d);else return o;switch(M(s)){case No:case za:s=BC;break;case Li:s=gf;break;case iy:s=zC;break;default:s=gf}return d=aN.bind(null,r),oe.actQueue!==null?(oe.actQueue.push(d),s=Vw):s=_C(s,d),r.callbackPriority=o,r.callbackNode=s,o}return d!==null&&rC(d),r.callbackPriority=2,r.callbackNode=null,2}function aN(r,o){if(wy=Cy=!1,jm=window.event,Fn!==tc&&Fn!==Uy)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Ka===Fy&&(Ka=Pw),jh()&&r.callbackNode!==s)return null;var d=ct;if(d=Qc(r,r===jt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==zu),d===0)return null;return BM(r,d,o),oN(r,Zn()),r.callbackNode!=null&&r.callbackNode===s?aN.bind(null,r):null}function iN(r,o){if(jh())return null;Cy=wy,wy=!1,BM(r,o,!0)}function rC(r){r!==Vw&&r!==null&&CG(r)}function sN(){oe.actQueue!==null&&oe.actQueue.push(function(){return nC(),null}),oY(function(){(kt&(Yn|Lo))!==nr?_C(IC,Pq):nC()})}function oC(){if(rc===0){var r=Eu;r===0&&(r=ry,ry<<=1,(ry&261888)===0&&(ry=256)),rc=r}return rc}function lN(r){if(r==null||typeof r==="symbol"||typeof r==="boolean")return null;if(typeof r==="function")return r;return Ie(r,"action"),Ch(""+r)}function cN(r,o){var s=o.ownerDocument.createElement("input");return s.name=o.name,s.value=o.value,r.id&&s.setAttribute("form",r.id),o.parentNode.insertBefore(s,o),r=new FormData(r),s.parentNode.removeChild(s),r}function Lq(r,o,s,d,p){if(o==="submit"&&s&&s.stateNode===p){var g=lN((p[Ir]||null).action),x=d.submitter;x&&(o=(o=x[Ir]||null)?lN(o.formAction):x.getAttribute("formAction"),o!==null&&(g=o,x=null));var C=new dy("action","action",null,d,p);r.push({event:C,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(rc!==0){var R=x?cN(p,x):new FormData(p),A={pending:!0,data:R,method:p.method,action:g};Object.freeze(A),w2(s,A,null,R)}}else typeof g==="function"&&(C.preventDefault(),R=x?cN(p,x):new FormData(p),A={pending:!0,data:R,method:p.method,action:g},Object.freeze(A),w2(s,A,g,R))},currentTarget:p}]})}}function V0(r,o,s){r.currentTarget=s;try{o(r)}catch(d){tw(d)}r.currentTarget=null}function uN(r,o){o=(o&4)!==0;for(var s=0;s<r.length;s++){var d=r[s];e:{var p=void 0,g=d.event;if(d=d.listeners,o)for(var x=d.length-1;0<=x;x--){var C=d[x],R=C.instance,A=C.currentTarget;if(C=C.listener,R!==p&&g.isPropagationStopped())break e;R!==null?me(R,V0,g,C,A):V0(g,C,A),p=R}else for(x=0;x<d.length;x++){if(C=d[x],R=C.instance,A=C.currentTarget,C=C.listener,R!==p&&g.isPropagationStopped())break e;R!==null?me(R,V0,g,C,A):V0(g,C,A),p=R}}}}function wt(r,o){jw.has(r)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',r);var s=o[HC];s===void 0&&(s=o[HC]=new Set);var d=r+"__bubble";s.has(d)||(dN(o,r,2,!1),s.add(d))}function aC(r,o,s){jw.has(r)&&!o&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',r);var d=0;o&&(d|=4),dN(s,r,d,o)}function iC(r){if(!r[Gy]){r[Gy]=!0,s8.forEach(function(s){s!=="selectionchange"&&(jw.has(s)||aC(s,!1,r),aC(s,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Gy]||(o[Gy]=!0,aC("selectionchange",!1,o))}}function dN(r,o,s,d){switch(jN(o)){case No:var p=mG;break;case za:p=gG;break;default:p=SC}s=p.bind(null,o,s,r),p=void 0,!KC||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(p=!0),d?p!==void 0?r.addEventListener(o,s,{capture:!0,passive:p}):r.addEventListener(o,s,!0):p!==void 0?r.addEventListener(o,s,{passive:p}):r.addEventListener(o,s,!1)}function sC(r,o,s,d,p){var g=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var C=d.stateNode.containerInfo;if(C===p)break;if(x===4)for(x=d.return;x!==null;){var R=x.tag;if((R===3||R===4)&&x.stateNode.containerInfo===p)return;x=x.return}for(;C!==null;){if(x=_e(C),x===null)return;if(R=x.tag,R===5||R===6||R===26||R===27){d=g=x;continue e}C=C.parentNode}}d=d.return}SA(function(){var A=g,q=AS(s),G=[];e:{var B=j8.get(r);if(B!==void 0){var ee=dy,$e=r;switch(r){case"keypress":if(Xb(s)===0)break e;case"keydown":case"keyup":ee=uW;break;case"focusin":$e="focus",ee=YC;break;case"focusout":$e="blur",ee=YC;break;case"beforeblur":case"afterblur":ee=YC;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=M8;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=QG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=pW;break;case H8:case F8:case U8:ee=tW;break;case V8:ee=mW;break;case"scroll":case"scrollend":ee=JG;break;case"wheel":ee=bW;break;case"copy":case"cut":case"paste":ee=rW;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=O8;break;case"toggle":case"beforetoggle":ee=vW}var Ae=(o&4)!==0,Wt=!Ae&&(r==="scroll"||r==="scrollend"),Et=Ae?B!==null?B+"Capture":null:B;Ae=[];for(var I=A,F;I!==null;){var j=I;if(F=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||F===null||Et===null||(j=wh(I,Et),j!=null&&Ae.push(Gh(I,j,F))),Wt)break;I=I.return}0<Ae.length&&(B=new ee(B,$e,null,s,q),G.push({event:B,listeners:Ae}))}}if((o&7)===0){e:{if(B=r==="mouseover"||r==="pointerover",ee=r==="mouseout"||r==="pointerout",B&&s!==om&&($e=s.relatedTarget||s.fromElement)&&(_e($e)||$e[Bl]))break e;if(ee||B){if(B=q.window===q?q:(B=q.ownerDocument)?B.defaultView||B.parentWindow:window,ee){if($e=s.relatedTarget||s.toElement,ee=A,$e=$e?_e($e):null,$e!==null&&(Wt=T($e),Ae=$e.tag,$e!==Wt||Ae!==5&&Ae!==27&&Ae!==6))$e=null}else ee=null,$e=A;if(ee!==$e){if(Ae=M8,j="onMouseLeave",Et="onMouseEnter",I="mouse",r==="pointerout"||r==="pointerover")Ae=O8,j="onPointerLeave",Et="onPointerEnter",I="pointer";if(Wt=ee==null?B:tt(ee),F=$e==null?B:tt($e),B=new Ae(j,I+"leave",ee,s,q),B.target=Wt,B.relatedTarget=F,j=null,_e(q)===A&&(Ae=new Ae(Et,I+"enter",$e,s,q),Ae.target=F,Ae.relatedTarget=Wt,j=Ae),Wt=j,ee&&$e)t:{Ae=_q,Et=ee,I=$e,F=0;for(j=Et;j;j=Ae(j))F++;j=0;for(var se=I;se;se=Ae(se))j++;for(;0<F-j;)Et=Ae(Et),F--;for(;0<j-F;)I=Ae(I),j--;for(;F--;){if(Et===I||I!==null&&Et===I.alternate){Ae=Et;break t}Et=Ae(Et),I=Ae(I)}Ae=null}else Ae=null;ee!==null&&fN(G,B,ee,Ae,!1),$e!==null&&Wt!==null&&fN(G,Wt,$e,Ae,!0)}}}e:{if(B=A?tt(A):window,ee=B.nodeName&&B.nodeName.toLowerCase(),ee==="select"||ee==="input"&&B.type==="file")var Te=AA;else if(RA(B))if(B8)Te=WK;else{Te=qK;var Qe=KK}else ee=B.nodeName,!ee||ee.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?A&&Sh(A.elementType)&&(Te=AA):Te=GK;if(Te&&(Te=Te(r,A))){kA(G,Te,s,q);break e}Qe&&Qe(r,B,A),r==="focusout"&&A&&B.type==="number"&&A.memoizedProps.value!=null&&CS(B,"number",B.value)}switch(Qe=A?tt(A):window,r){case"focusin":if(RA(Qe)||Qe.contentEditable==="true")wf=Qe,XC=A,dm=null;break;case"focusout":dm=XC=wf=null;break;case"mousedown":QC=!0;break;case"contextmenu":case"mouseup":case"dragend":QC=!1,_A(G,s,q);break;case"selectionchange":if(CW)break;case"keydown":case"keyup":_A(G,s,q)}var Ue;if(JC)e:{switch(r){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Cf?EA(r,s)&&(Be="onCompositionEnd"):r==="keydown"&&s.keyCode===D8&&(Be="onCompositionStart");if(Be&&(P8&&s.locale!=="ko"&&(Cf||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Cf&&(Ue=CA()):(zl=q,qC=("value"in zl)?zl.value:zl.textContent,Cf=!0)),Qe=j0(A,Be),0<Qe.length&&(Be=new N8(Be,r,null,s,q),G.push({event:Be,listeners:Qe}),Ue?Be.data=Ue:(Ue=TA(s),Ue!==null&&(Be.data=Ue)))),Ue=$W?FK(r,s):UK(r,s))Be=j0(A,"onBeforeInput"),0<Be.length&&(Qe=new aW("onBeforeInput","beforeinput",null,s,q),G.push({event:Qe,listeners:Be}),Qe.data=Ue);Lq(G,r,A,s,q)}uN(G,o)})}function Gh(r,o,s){return{instance:r,listener:o,currentTarget:s}}function j0(r,o){for(var s=o+"Capture",d=[];r!==null;){var p=r,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=wh(r,s),p!=null&&d.unshift(Gh(r,p,g)),p=wh(r,o),p!=null&&d.push(Gh(r,p,g))),r.tag===3)return d;r=r.return}return[]}function _q(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r?r:null}function fN(r,o,s,d,p){for(var g=o._reactName,x=[];s!==null&&s!==d;){var C=s,R=C.alternate,A=C.stateNode;if(C=C.tag,R!==null&&R===d)break;C!==5&&C!==26&&C!==27||A===null||(R=A,p?(A=wh(s,g),A!=null&&x.unshift(Gh(s,A,R))):p||(A=wh(s,g),A!=null&&x.push(Gh(s,A,R)))),s=s.return}x.length!==0&&r.push({event:o,listeners:x})}function lC(r,o){IK(r,o),r!=="input"&&r!=="textarea"&&r!=="select"||o==null||o.value!==null||k8||(k8=!0,r==="select"&&o.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.",r):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",r));var s={registrationNameDependencies:vu,possibleRegistrationNames:FC};Sh(r)||typeof o.is==="string"||zK(r,o,s),o.contentEditable&&!o.suppressContentEditableWarning&&o.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 Qn(r,o,s,d){o!==s&&(s=Dl(s),Dl(o)!==s&&(d[r]=o))}function Iq(r,o,s){o.forEach(function(d){s[mN(d)]=d==="style"?uC(r):r.getAttribute(d)})}function Ai(r,o){o===!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.",r,r,r):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",r,typeof o)}function pN(r,o){return r=r.namespaceURI===ly||r.namespaceURI===vf?r.ownerDocument.createElementNS(r.namespaceURI,r.tagName):r.ownerDocument.createElement(r.tagName),r.innerHTML=o,r.innerHTML}function Dl(r){return kn(r)&&(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.",Pn(r)),nn(r)),(typeof r==="string"?r:""+r).replace(YW,`
|
|
181
|
+
`).replace(JW,"")}function hN(r,o){return o=Dl(o),Dl(r)===o?!0:!1}function Ut(r,o,s,d,p,g){switch(s){case"children":if(typeof d==="string")Jb(d,o,!1),o==="body"||o==="textarea"&&d===""||$h(r,d);else if(typeof d==="number"||typeof d==="bigint")Jb(""+d,o,!1),o!=="body"&&$h(r,""+d);break;case"className":Gb(r,"class",d);break;case"tabIndex":Gb(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Gb(r,s,d);break;case"style":vA(r,d,g);break;case"data":if(o!=="object"){Gb(r,"data",d);break}case"src":case"href":if(d===""&&(o!=="a"||s!=="href")){s==="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.',s,s):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.',s,s),r.removeAttribute(s);break}if(d==null||typeof d==="function"||typeof d==="symbol"||typeof d==="boolean"){r.removeAttribute(s);break}Ie(d,s),d=Ch(""+d),r.setAttribute(s,d);break;case"action":case"formAction":if(d!=null&&(o==="form"?s==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof d==="function"&&(p.encType==null&&p.method==null||Jy||(Jy=!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.")),p.target==null||Yy||(Yy=!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."))):o==="input"||o==="button"?s==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):o!=="input"||p.type==="submit"||p.type==="image"||Wy?o!=="button"||p.type==null||p.type==="submit"||Wy?typeof d==="function"&&(p.name==null||pD||(pD=!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.')),p.formEncType==null&&p.formMethod==null||Jy||(Jy=!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.")),p.formTarget==null||Yy||(Yy=!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."))):(Wy=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Wy=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):s==="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 d==="function"){r.setAttribute(s,"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 g==="function"&&(s==="formAction"?(o!=="input"&&Ut(r,o,"name",p.name,p,null),Ut(r,o,"formEncType",p.formEncType,p,null),Ut(r,o,"formMethod",p.formMethod,p,null),Ut(r,o,"formTarget",p.formTarget,p,null)):(Ut(r,o,"encType",p.encType,p,null),Ut(r,o,"method",p.method,p,null),Ut(r,o,"target",p.target,p,null)));if(d==null||typeof d==="symbol"||typeof d==="boolean"){r.removeAttribute(s);break}Ie(d,s),d=Ch(""+d),r.setAttribute(s,d);break;case"onClick":d!=null&&(typeof d!=="function"&&Ai(s,d),r.onclick=ds);break;case"onScroll":d!=null&&(typeof d!=="function"&&Ai(s,d),wt("scroll",r));break;case"onScrollEnd":d!=null&&(typeof d!=="function"&&Ai(s,d),wt("scrollend",r));break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!=="object"||!("__html"in d))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=d.__html,s!=null){if(p.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r.innerHTML=s}}break;case"multiple":r.multiple=d&&typeof d!=="function"&&typeof d!=="symbol";break;case"muted":r.muted=d&&typeof d!=="function"&&typeof d!=="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d==="function"||typeof d==="boolean"||typeof d==="symbol"){r.removeAttribute("xlink:href");break}Ie(d,s),s=Ch(""+d),r.setAttributeNS(_u,"xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!=="function"&&typeof d!=="symbol"?(Ie(d,s),r.setAttribute(s,""+d)):r.removeAttribute(s);break;case"inert":d!==""||Xy[s]||(Xy[s]=!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.",s));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":d&&typeof d!=="function"&&typeof d!=="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":d===!0?r.setAttribute(s,""):d!==!1&&d!=null&&typeof d!=="function"&&typeof d!=="symbol"?(Ie(d,s),r.setAttribute(s,d)):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!=="function"&&typeof d!=="symbol"&&!isNaN(d)&&1<=d?(Ie(d,s),r.setAttribute(s,d)):r.removeAttribute(s);break;case"rowSpan":case"start":d==null||typeof d==="function"||typeof d==="symbol"||isNaN(d)?r.removeAttribute(s):(Ie(d,s),r.setAttribute(s,d));break;case"popover":wt("beforetoggle",r),wt("toggle",r),qb(r,"popover",d);break;case"xlinkActuate":us(r,_u,"xlink:actuate",d);break;case"xlinkArcrole":us(r,_u,"xlink:arcrole",d);break;case"xlinkRole":us(r,_u,"xlink:role",d);break;case"xlinkShow":us(r,_u,"xlink:show",d);break;case"xlinkTitle":us(r,_u,"xlink:title",d);break;case"xlinkType":us(r,_u,"xlink:type",d);break;case"xmlBase":us(r,Kw,"xml:base",d);break;case"xmlLang":us(r,Kw,"xml:lang",d);break;case"xmlSpace":us(r,Kw,"xml:space",d);break;case"is":g!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),qb(r,"is",d);break;case"innerText":case"textContent":break;case"popoverTarget":hD||d==null||typeof d!=="object"||(hD=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",d));default:!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N"?(s=xA(s),qb(r,s,d)):vu.hasOwnProperty(s)&&d!=null&&typeof d!=="function"&&Ai(s,d)}}function cC(r,o,s,d,p,g){switch(s){case"style":vA(r,d,g);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!=="object"||!("__html"in d))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=d.__html,s!=null){if(p.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r.innerHTML=s}}break;case"children":typeof d==="string"?$h(r,d):(typeof d==="number"||typeof d==="bigint")&&$h(r,""+d);break;case"onScroll":d!=null&&(typeof d!=="function"&&Ai(s,d),wt("scroll",r));break;case"onScrollEnd":d!=null&&(typeof d!=="function"&&Ai(s,d),wt("scrollend",r));break;case"onClick":d!=null&&(typeof d!=="function"&&Ai(s,d),r.onclick=ds);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(vu.hasOwnProperty(s))d!=null&&typeof d!=="function"&&Ai(s,d);else e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),o=s.slice(2,p?s.length-7:void 0),g=r[Ir]||null,g=g!=null?g[s]:null,typeof g==="function"&&r.removeEventListener(o,g,p),typeof d==="function")){typeof g!=="function"&&g!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(o,d,p);break e}s in r?r[s]=d:d===!0?r.setAttribute(s,""):qb(r,s,d)}}}function cr(r,o,s){switch(lC(o,s),o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wt("error",r),wt("load",r);var d=!1,p=!1,g;for(g in s)if(s.hasOwnProperty(g)){var x=s[g];if(x!=null)switch(g){case"src":d=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Ut(r,o,g,x,s,null)}}p&&Ut(r,o,"srcSet",s.srcSet,s,null),d&&Ut(r,o,"src",s.src,s,null);return;case"input":Sl("input",s),wt("invalid",r);var C=g=x=p=null,R=null,A=null;for(d in s)if(s.hasOwnProperty(d)){var q=s[d];if(q!=null)switch(d){case"name":p=q;break;case"type":x=q;break;case"checked":R=q;break;case"defaultChecked":A=q;break;case"value":g=q;break;case"defaultValue":C=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Ut(r,o,d,q,s,null)}}rA(r,s),oA(r,g,C,R,A,x,p,!1);return;case"select":Sl("select",s),wt("invalid",r),d=x=g=null;for(p in s)if(s.hasOwnProperty(p)&&(C=s[p],C!=null))switch(p){case"value":g=C;break;case"defaultValue":x=C;break;case"multiple":d=C;default:Ut(r,o,p,C,s,null)}sA(r,s),o=g,s=x,r.multiple=!!d,o!=null?Yd(r,!!d,o,!1):s!=null&&Yd(r,!!d,s,!0);return;case"textarea":Sl("textarea",s),wt("invalid",r),g=p=d=null;for(x in s)if(s.hasOwnProperty(x)&&(C=s[x],C!=null))switch(x){case"value":d=C;break;case"defaultValue":p=C;break;case"children":g=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Ut(r,o,x,C,s,null)}lA(r,s),uA(r,d,p,g);return;case"option":aA(r,s);for(R in s)if(s.hasOwnProperty(R)&&(d=s[R],d!=null))switch(R){case"selected":r.selected=d&&typeof d!=="function"&&typeof d!=="symbol";break;default:Ut(r,o,R,d,s,null)}return;case"dialog":wt("beforetoggle",r),wt("toggle",r),wt("cancel",r),wt("close",r);break;case"iframe":case"object":wt("load",r);break;case"video":case"audio":for(d=0;d<Fm.length;d++)wt(Fm[d],r);break;case"image":wt("error",r),wt("load",r);break;case"details":wt("toggle",r);break;case"embed":case"source":case"link":wt("error",r),wt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in s)if(s.hasOwnProperty(A)&&(d=s[A],d!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Ut(r,o,A,d,s,null)}return;default:if(Sh(o)){for(q in s)s.hasOwnProperty(q)&&(d=s[q],d!==void 0&&cC(r,o,q,d,s,void 0));return}}for(C in s)s.hasOwnProperty(C)&&(d=s[C],d!=null&&Ut(r,o,C,d,s,null))}function Bq(r,o,s,d){switch(lC(o,d),o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,x=null,C=null,R=null,A=null,q=null;for(ee in s){var G=s[ee];if(s.hasOwnProperty(ee)&&G!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":R=G;default:d.hasOwnProperty(ee)||Ut(r,o,ee,null,d,G)}}for(var B in d){var ee=d[B];if(G=s[B],d.hasOwnProperty(B)&&(ee!=null||G!=null))switch(B){case"type":g=ee;break;case"name":p=ee;break;case"checked":A=ee;break;case"defaultChecked":q=ee;break;case"value":x=ee;break;case"defaultValue":C=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ee!==G&&Ut(r,o,B,ee,d,G)}}o=s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null,d=d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null,o||!d||fD||(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"),fD=!0),!o||d||dD||(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"),dD=!0),SS(r,x,C,R,A,q,g,p);return;case"select":ee=x=C=B=null;for(g in s)if(R=s[g],s.hasOwnProperty(g)&&R!=null)switch(g){case"value":break;case"multiple":ee=R;default:d.hasOwnProperty(g)||Ut(r,o,g,null,d,R)}for(p in d)if(g=d[p],R=s[p],d.hasOwnProperty(p)&&(g!=null||R!=null))switch(p){case"value":B=g;break;case"defaultValue":C=g;break;case"multiple":x=g;default:g!==R&&Ut(r,o,p,g,d,R)}d=C,o=x,s=ee,B!=null?Yd(r,!!o,B,!1):!!s!==!!o&&(d!=null?Yd(r,!!o,d,!0):Yd(r,!!o,o?[]:"",!1));return;case"textarea":ee=B=null;for(C in s)if(p=s[C],s.hasOwnProperty(C)&&p!=null&&!d.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:Ut(r,o,C,null,d,p)}for(x in d)if(p=d[x],g=s[x],d.hasOwnProperty(x)&&(p!=null||g!=null))switch(x){case"value":B=p;break;case"defaultValue":ee=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:p!==g&&Ut(r,o,x,p,d,g)}cA(r,B,ee);return;case"option":for(var $e in s)if(B=s[$e],s.hasOwnProperty($e)&&B!=null&&!d.hasOwnProperty($e))switch($e){case"selected":r.selected=!1;break;default:Ut(r,o,$e,null,d,B)}for(R in d)if(B=d[R],ee=s[R],d.hasOwnProperty(R)&&B!==ee&&(B!=null||ee!=null))switch(R){case"selected":r.selected=B&&typeof B!=="function"&&typeof B!=="symbol";break;default:Ut(r,o,R,B,d,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in s)B=s[Ae],s.hasOwnProperty(Ae)&&B!=null&&!d.hasOwnProperty(Ae)&&Ut(r,o,Ae,null,d,B);for(A in d)if(B=d[A],ee=s[A],d.hasOwnProperty(A)&&B!==ee&&(B!=null||ee!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Ut(r,o,A,B,d,ee)}return;default:if(Sh(o)){for(var Wt in s)B=s[Wt],s.hasOwnProperty(Wt)&&B!==void 0&&!d.hasOwnProperty(Wt)&&cC(r,o,Wt,void 0,d,B);for(q in d)B=d[q],ee=s[q],!d.hasOwnProperty(q)||B===ee||B===void 0&&ee===void 0||cC(r,o,q,B,d,ee);return}}for(var Et in s)B=s[Et],s.hasOwnProperty(Et)&&B!=null&&!d.hasOwnProperty(Et)&&Ut(r,o,Et,null,d,B);for(G in d)B=d[G],ee=s[G],!d.hasOwnProperty(G)||B===ee||B==null&&ee==null||Ut(r,o,G,B,d,ee)}function mN(r){switch(r){case"class":return"className";case"for":return"htmlFor";default:return r}}function uC(r){var o={};r=r.style;for(var s=0;s<r.length;s++){var d=r[s];o[d]=r.getPropertyValue(d)}return o}function gN(r,o,s){if(o!=null&&typeof o!=="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 d,p=d="",g;for(g in o)if(o.hasOwnProperty(g)){var x=o[g];x!=null&&typeof x!=="boolean"&&x!==""&&(g.indexOf("--")===0?(Zr(x,g),d+=p+g+":"+(""+x).trim()):typeof x!=="number"||x===0||T8.has(g)?(Zr(x,g),d+=p+g.replace($8,"-$1").toLowerCase().replace(S8,"-ms-")+":"+(""+x).trim()):d+=p+g.replace($8,"-$1").toLowerCase().replace(S8,"-ms-")+":"+x+"px",p=";")}d=d||null,o=r.getAttribute("style"),o!==d&&(d=Dl(d),Dl(o)!==d&&(s.style=uC(r)))}}function Qo(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null)switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":return}else if(d!=null)switch(typeof d){case"function":case"symbol":case"boolean":break;default:if(Ie(d,o),r===""+d)return}Qn(o,r,d,g)}function bN(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null){switch(typeof d){case"function":case"symbol":return}if(!d)return}else switch(typeof d){case"function":case"symbol":break;default:if(d)return}Qn(o,r,d,g)}function dC(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null)switch(typeof d){case"undefined":case"function":case"symbol":return}else if(d!=null)switch(typeof d){case"function":case"symbol":break;default:if(Ie(d,s),r===""+d)return}Qn(o,r,d,g)}function yN(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null)switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(d))return}else if(d!=null)switch(typeof d){case"function":case"symbol":case"boolean":break;default:if(!isNaN(d)&&(Ie(d,o),r===""+d))return}Qn(o,r,d,g)}function fC(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null)switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":return}else if(d!=null)switch(typeof d){case"function":case"symbol":case"boolean":break;default:if(Ie(d,o),s=Ch(""+d),r===s)return}Qn(o,r,d,g)}function vN(r,o,s,d){for(var p={},g=new Set,x=r.attributes,C=0;C<x.length;C++)switch(x[C].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:g.add(x[C].name)}if(Sh(o)){for(var R in s)if(s.hasOwnProperty(R)){var A=s[R];if(A!=null){if(vu.hasOwnProperty(R))typeof A!=="function"&&Ai(R,A);else if(s.suppressHydrationWarning!==!0)switch(R){case"children":typeof A!=="string"&&typeof A!=="number"||Qn("children",r.textContent,A,p);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":x=r.innerHTML,A=A?A.__html:void 0,A!=null&&(A=pN(r,A),Qn(R,x,A,p));continue;case"style":g.delete(R),gN(r,A,p);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":g.delete(R.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",R);continue;case"className":g.delete("class"),x=eA(r,"class",A),Qn("className",x,A,p);continue;default:d.context===Ds&&o!=="svg"&&o!=="math"?g.delete(R.toLowerCase()):g.delete(R),x=eA(r,R,A),Qn(R,x,A,p)}}}}else for(A in s)if(s.hasOwnProperty(A)&&(R=s[A],R!=null)){if(vu.hasOwnProperty(A))typeof R!=="function"&&Ai(A,R);else if(s.suppressHydrationWarning!==!0)switch(A){case"children":typeof R!=="string"&&typeof R!=="number"||Qn("children",r.textContent,R,p);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":x=r.innerHTML,R=R?R.__html:void 0,R!=null&&(R=pN(r,R),x!==R&&(p[A]={__html:x}));continue;case"className":Qo(r,A,"class",R,g,p);continue;case"tabIndex":Qo(r,A,"tabindex",R,g,p);continue;case"style":g.delete(A),gN(r,R,p);continue;case"multiple":g.delete(A),Qn(A,r.multiple,R,p);continue;case"muted":g.delete(A),Qn(A,r.muted,R,p);continue;case"autoFocus":g.delete("autofocus"),Qn(A,r.autofocus,R,p);continue;case"data":if(o!=="object"){g.delete(A),x=r.getAttribute("data"),Qn(A,x,R,p);continue}case"src":case"href":if(!(R!==""||o==="a"&&A==="href"||o==="object"&&A==="data")){A==="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.',A,A):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.',A,A);continue}fC(r,A,A,R,g,p);continue;case"action":case"formAction":if(x=r.getAttribute(A),typeof R==="function"){g.delete(A.toLowerCase()),A==="formAction"?(g.delete("name"),g.delete("formenctype"),g.delete("formmethod"),g.delete("formtarget")):(g.delete("enctype"),g.delete("method"),g.delete("target"));continue}else if(x===XW){g.delete(A.toLowerCase()),Qn(A,"function",R,p);continue}fC(r,A,A.toLowerCase(),R,g,p);continue;case"xlinkHref":fC(r,A,"xlink:href",R,g,p);continue;case"contentEditable":dC(r,A,"contenteditable",R,g,p);continue;case"spellCheck":dC(r,A,"spellcheck",R,g,p);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":dC(r,A,A,R,g,p);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":bN(r,A,A.toLowerCase(),R,g,p);continue;case"capture":case"download":e:{C=r;var q=x=A,G=p;if(g.delete(q),C=C.getAttribute(q),C===null)switch(typeof R){case"undefined":case"function":case"symbol":break e;default:if(R===!1)break e}else if(R!=null)switch(typeof R){case"function":case"symbol":break;case"boolean":if(R===!0&&C==="")break e;break;default:if(Ie(R,x),C===""+R)break e}Qn(x,C,R,G)}continue;case"cols":case"rows":case"size":case"span":e:{if(C=r,q=x=A,G=p,g.delete(q),C=C.getAttribute(q),C===null)switch(typeof R){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(R)||1>R)break e}else if(R!=null)switch(typeof R){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(R)||1>R)&&(Ie(R,x),C===""+R))break e}Qn(x,C,R,G)}continue;case"rowSpan":yN(r,A,"rowspan",R,g,p);continue;case"start":yN(r,A,A,R,g,p);continue;case"xHeight":Qo(r,A,"x-height",R,g,p);continue;case"xlinkActuate":Qo(r,A,"xlink:actuate",R,g,p);continue;case"xlinkArcrole":Qo(r,A,"xlink:arcrole",R,g,p);continue;case"xlinkRole":Qo(r,A,"xlink:role",R,g,p);continue;case"xlinkShow":Qo(r,A,"xlink:show",R,g,p);continue;case"xlinkTitle":Qo(r,A,"xlink:title",R,g,p);continue;case"xlinkType":Qo(r,A,"xlink:type",R,g,p);continue;case"xmlBase":Qo(r,A,"xml:base",R,g,p);continue;case"xmlLang":Qo(r,A,"xml:lang",R,g,p);continue;case"xmlSpace":Qo(r,A,"xml:space",R,g,p);continue;case"inert":R!==""||Xy[A]||(Xy[A]=!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.",A)),bN(r,A,A,R,g,p);continue;default:if(!(2<A.length)||A[0]!=="o"&&A[0]!=="O"||A[1]!=="n"&&A[1]!=="N"){C=xA(A),x=!1,d.context===Ds&&o!=="svg"&&o!=="math"?g.delete(C.toLowerCase()):(q=A.toLowerCase(),q=cy.hasOwnProperty(q)?cy[q]||null:null,q!==null&&q!==A&&(x=!0,g.delete(q)),g.delete(C));e:if(q=r,G=C,C=R,yh(G))if(q.hasAttribute(G))q=q.getAttribute(G),Ie(C,G),C=q===""+C?C:q;else{switch(typeof C){case"function":case"symbol":break e;case"boolean":if(q=G.toLowerCase().slice(0,5),q!=="data-"&&q!=="aria-")break e}C=C===void 0?void 0:null}else C=void 0;x||Qn(A,C,R,p)}}}return 0<g.size&&s.suppressHydrationWarning!==!0&&Iq(r,g,p),Object.keys(p).length===0?null:p}function zq(r,o){switch(r.length){case 0:return"";case 1:return r[0];case 2:return r[0]+" "+o+" "+r[1];default:return r.slice(0,-1).join(", ")+", "+o+" "+r[r.length-1]}}function xN(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hq(){if(typeof performance.getEntriesByType==="function"){for(var r=0,o=0,s=performance.getEntriesByType("resource"),d=0;d<s.length;d++){var p=s[d],g=p.transferSize,x=p.initiatorType,C=p.duration;if(g&&C&&xN(x)){x=0,C=p.responseEnd;for(d+=1;d<s.length;d++){var R=s[d],A=R.startTime;if(A>C)break;var{transferSize:q,initiatorType:G}=R;q&&xN(G)&&(R=R.responseEnd,x+=q*(R<C?1:(C-A)/(R-A)))}if(--d,o+=8*(g+x)/(p.duration/1000),r++,10<r)break}}if(0<r)return o/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r==="number")?r:5}function K0(r){return r.nodeType===9?r:r.ownerDocument}function $N(r){switch(r){case vf:return Yf;case ly:return Zy;default:return Ds}}function SN(r,o){if(r===Ds)switch(o){case"svg":return Yf;case"math":return Zy;default:return Ds}return r===Yf&&o==="foreignObject"?Ds:r}function pC(r,o){return r==="textarea"||r==="noscript"||typeof o.children==="string"||typeof o.children==="number"||typeof o.children==="bigint"||typeof o.dangerouslySetInnerHTML==="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}function Fq(){var r=window.event;if(r&&r.type==="popstate"){if(r===Yw)return!1;return Yw=r,!0}return Yw=null,!1}function Wh(){var r=window.event;return r&&r!==jm?r.type:null}function Yh(){var r=window.event;return r&&r!==jm?r.timeStamp:-1.1}function Uq(r){setTimeout(function(){throw r})}function Vq(r,o,s){switch(o){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break;case"img":s.src?r.src=s.src:s.srcSet&&(r.srcset=s.srcSet)}}function jq(){}function Kq(r,o,s,d){Bq(r,o,s,d),r[Ir]=d}function CN(r){$h(r,"")}function qq(r,o,s){r.nodeValue=s}function wN(r){if(!r.__reactWarnedAboutChildrenConflict){var o=r[Ir]||null;if(o!==null){var s=et(r);s!==null&&(typeof o.children==="string"||typeof o.children==="number"?(r.__reactWarnedAboutChildrenConflict=!0,me(s,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.')})):o.dangerouslySetInnerHTML!=null&&(r.__reactWarnedAboutChildrenConflict=!0,me(s,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 Pl(r){return r==="head"}function Gq(r,o){r.removeChild(o)}function Wq(r,o){(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).removeChild(o)}function EN(r,o){var s=o,d=0;do{var p=s.nextSibling;if(r.removeChild(s),p&&p.nodeType===8)if(s=p.data,s===Vm||s===Qy){if(d===0){r.removeChild(p),pf(o);return}d--}else if(s===Um||s===oc||s===Bu||s===Wf||s===Iu)d++;else if(s===ZW)Jh(r.ownerDocument.documentElement);else if(s===tY){s=r.ownerDocument.head,Jh(s);for(var g=s.firstChild;g;){var{nextSibling:x,nodeName:C}=g;g[rm]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=x}}else s===eY&&Jh(r.ownerDocument.body);s=p}while(s);pf(o)}function TN(r,o){var s=r;r=0;do{var d=s.nextSibling;if(s.nodeType===1?o?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(o?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),d&&d.nodeType===8)if(s=d.data,s===Vm)if(r===0)break;else r--;else s!==Um&&s!==oc&&s!==Bu&&s!==Wf||r++;s=d}while(s)}function Yq(r){TN(r,!0)}function Jq(r){r=r.style,typeof r.setProperty==="function"?r.setProperty("display","none","important"):r.display="none"}function Xq(r){r.nodeValue=""}function Qq(r){TN(r,!1)}function Zq(r,o){o=o[nY],o=o!==void 0&&o!==null&&o.hasOwnProperty("display")?o.display:null,r.style.display=o==null||typeof o==="boolean"?"":(""+o).trim()}function eG(r,o){r.nodeValue=o}function hC(r){var o=r.firstChild;o&&o.nodeType===10&&(o=o.nextSibling);for(;o;){var s=o;switch(o=o.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":hC(s),Ee(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function tG(r,o,s,d){for(;r.nodeType===1;){var p=s;if(r.nodeName.toLowerCase()!==o.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(!d)if(o==="input"&&r.type==="hidden"){Ie(p.name,"name");var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;else if(!r[rm])switch(o){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;else if(g!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}if(r=ko(r.nextSibling),r===null)break}return null}function nG(r,o,s){if(o==="")return null;for(;r.nodeType!==3;){if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s)return null;if(r=ko(r.nextSibling),r===null)return null}return r}function RN(r,o){for(;r.nodeType!==8;){if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o)return null;if(r=ko(r.nextSibling),r===null)return null}return r}function mC(r){return r.data===oc||r.data===Bu}function gC(r){return r.data===Wf||r.data===oc&&r.ownerDocument.readyState!==gD}function rG(r,o){var s=r.ownerDocument;if(r.data===Bu)r._reactRetry=o;else if(r.data!==oc||s.readyState!==gD)o();else{var d=function(){o(),s.removeEventListener("DOMContentLoaded",d)};s.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function ko(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o===Um||o===Wf||o===oc||o===Bu||o===Iu||o===qw||o===mD)break;if(o===Vm||o===Qy)return null}}return r}function kN(r){if(r.nodeType===1){for(var o=r.nodeName.toLowerCase(),s={},d=r.attributes,p=0;p<d.length;p++){var g=d[p];s[mN(g.name)]=g.name.toLowerCase()==="style"?uC(r):g.value}return{type:o,props:s}}return r.nodeType===8?r.data===Iu?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:r.nodeValue}function AN(r,o,s){return s===null||s[QW]!==!0?(r.nodeValue===o?r=null:(o=Dl(o),r=Dl(r.nodeValue)===o?null:r.nodeValue),r):null}function bC(r){r=r.nextSibling;for(var o=0;r;){if(r.nodeType===8){var s=r.data;if(s===Vm||s===Qy){if(o===0)return ko(r.nextSibling);o--}else s!==Um&&s!==Wf&&s!==oc&&s!==Bu&&s!==Iu||o++}r=r.nextSibling}return null}function MN(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var s=r.data;if(s===Um||s===Wf||s===oc||s===Bu||s===Iu){if(o===0)return r;o--}else s!==Vm&&s!==Qy||o++}r=r.previousSibling}return null}function oG(r){pf(r)}function aG(r){pf(r)}function iG(r){pf(r)}function NN(r,o,s,d,p){switch(p&&kS(r,d.ancestorInfo),o=K0(s),r){case"html":if(r=o.documentElement,!r)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 r;case"head":if(r=o.head,!r)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 r;case"body":if(r=o.body,!r)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 r;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function sG(r,o,s,d){if(!s[Bl]&&et(s)){var p=s.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.",p,p,p)}switch(r){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(p=s.attributes;p.length;)s.removeAttributeNode(p[0]);cr(s,r,o),s[ur]=d,s[Ir]=o}function Jh(r){for(var o=r.attributes;o.length;)r.removeAttributeNode(o[0]);Ee(r)}function q0(r){return typeof r.getRootNode==="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}function ON(r,o,s){var d=Jf;if(d&&typeof o==="string"&&o){var p=Xo(o);p='link[rel="'+r+'"][href="'+p+'"]',typeof s==="string"&&(p+='[crossorigin="'+s+'"]'),SD.has(p)||(SD.add(p),r={rel:r,crossOrigin:s,href:o},d.querySelector(p)===null&&(o=d.createElement("link"),cr(o,"link",r),Ve(o),d.head.appendChild(o)))}}function DN(r,o,s,d){var p=(p=_l.current)?q0(p):null;if(!p)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence==="string"&&typeof s.href==="string"?(s=df(s.href),o=Mt(p).hoistableStyles,d=o.get(s),d||(d={type:"style",instance:null,count:0,state:null},o.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href==="string"&&typeof s.precedence==="string"){r=df(s.href);var g=Mt(p).hoistableStyles,x=g.get(r);if(!x&&(p=p.ownerDocument||p,x={type:"stylesheet",instance:null,count:0,state:{loading:Hu,preload:null}},g.set(r,x),(g=p.querySelector(Xh(r)))&&!g._p&&(x.instance=g,x.state.loading=Km|ca),!ua.has(r))){var C={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy};ua.set(r,C),g||lG(p,r,C,x.state)}if(o&&d===null)throw s=`
|
|
182
|
+
|
|
183
|
+
- `+G0(o)+`
|
|
184
|
+
+ `+G0(s),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."+s);return x}if(o&&d!==null)throw s=`
|
|
185
|
+
|
|
186
|
+
- `+G0(o)+`
|
|
187
|
+
+ `+G0(s),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."+s);return null;case"script":return o=s.async,s=s.src,typeof s==="string"&&o&&typeof o!=="function"&&typeof o!=="symbol"?(s=ff(s),o=Mt(p).hoistableScripts,d=o.get(s),d||(d={type:"script",instance:null,count:0,state:null},o.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+r+'". this is a bug in React.')}}function G0(r){var o=0,s="<link";return typeof r.rel==="string"?(o++,s+=' rel="'+r.rel+'"'):Ba.call(r,"rel")&&(o++,s+=' rel="'+(r.rel===null?"null":"invalid type "+typeof r.rel)+'"'),typeof r.href==="string"?(o++,s+=' href="'+r.href+'"'):Ba.call(r,"href")&&(o++,s+=' href="'+(r.href===null?"null":"invalid type "+typeof r.href)+'"'),typeof r.precedence==="string"?(o++,s+=' precedence="'+r.precedence+'"'):Ba.call(r,"precedence")&&(o++,s+=" precedence={"+(r.precedence===null?"null":"invalid type "+typeof r.precedence)+"}"),Object.getOwnPropertyNames(r).length>o&&(s+=" ..."),s+" />"}function df(r){return'href="'+Xo(r)+'"'}function Xh(r){return'link[rel="stylesheet"]['+r+"]"}function PN(r){return pt({},r,{"data-precedence":r.precedence,precedence:null})}function lG(r,o,s,d){r.querySelector('link[rel="preload"][as="style"]['+o+"]")?d.loading=Km:(o=r.createElement("link"),d.preload=o,o.addEventListener("load",function(){return d.loading|=Km}),o.addEventListener("error",function(){return d.loading|=xD}),cr(o,"link",s),Ve(o),r.head.appendChild(o))}function ff(r){return'[src="'+Xo(r)+'"]'}function Qh(r){return"script[async]"+r}function LN(r,o,s){if(o.count++,o.instance===null)switch(o.type){case"style":var d=r.querySelector('style[data-href~="'+Xo(s.href)+'"]');if(d)return o.instance=d,Ve(d),d;var p=pt({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),Ve(d),cr(d,"style",p),W0(d,s.precedence,r),o.instance=d;case"stylesheet":p=df(s.href);var g=r.querySelector(Xh(p));if(g)return o.state.loading|=ca,o.instance=g,Ve(g),g;d=PN(s),(p=ua.get(p))&&yC(d,p),g=(r.ownerDocument||r).createElement("link"),Ve(g);var x=g;return x._p=new Promise(function(C,R){x.onload=C,x.onerror=R}),cr(g,"link",d),o.state.loading|=ca,W0(g,s.precedence,r),o.instance=g;case"script":if(g=ff(s.src),p=r.querySelector(Qh(g)))return o.instance=p,Ve(p),p;if(d=s,p=ua.get(g))d=pt({},s),vC(d,p);return r=r.ownerDocument||r,p=r.createElement("script"),Ve(p),cr(p,"link",d),r.head.appendChild(p),o.instance=p;case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+o.type+'". this is a bug in React.')}else o.type==="stylesheet"&&(o.state.loading&ca)===Hu&&(d=o.instance,o.state.loading|=ca,W0(d,s.precedence,r));return o.instance}function W0(r,o,s){for(var d=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,g=p,x=0;x<d.length;x++){var C=d[x];if(C.dataset.precedence===o)g=C;else if(g!==p)break}g?g.parentNode.insertBefore(r,g.nextSibling):(o=s.nodeType===9?s.head:s,o.insertBefore(r,o.firstChild))}function yC(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.title==null&&(r.title=o.title)}function vC(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.integrity==null&&(r.integrity=o.integrity)}function _N(r,o,s){if(ev===null){var d=new Map,p=ev=new Map;p.set(s,d)}else p=ev,d=p.get(s),d||(d=new Map,p.set(s,d));if(d.has(r))return d;d.set(r,null),s=s.getElementsByTagName(r);for(p=0;p<s.length;p++){var g=s[p];if(!(g[rm]||g[ur]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!==vf){var x=g.getAttribute(o)||"";x=r+x;var C=d.get(x);C?C.push(g):d.set(x,[g])}}return d}function IN(r,o,s){r=r.ownerDocument||r,r.head.insertBefore(s,o==="title"?r.querySelector("head > title"):null)}function cG(r,o,s){var d=!s.ancestorInfo.containerTagInScope;if(s.context===Yf||o.itemProp!=null)return!d||o.itemProp==null||r!=="meta"&&r!=="title"&&r!=="style"&&r!=="link"&&r!=="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.",r,r),!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof o.precedence!=="string"||typeof o.href!=="string"||o.href===""){d&&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 o.rel!=="string"||typeof o.href!=="string"||o.href===""||o.onLoad||o.onError){if(o.rel==="stylesheet"&&typeof o.precedence==="string"){r=o.href;var{onError:p,disabled:g}=o;s=[],o.onLoad&&s.push("`onLoad`"),p&&s.push("`onError`"),g!=null&&s.push("`disabled`"),p=zq(s,"and"),p+=s.length===1?" prop":" props",g=s.length===1?"an "+p:"the "+p,s.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.',r,g,p)}d&&(typeof o.rel!=="string"||typeof o.href!=="string"||o.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"):(o.onError||o.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(o.rel){case"stylesheet":return r=o.precedence,o=o.disabled,typeof r!=="string"&&d&&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 r==="string"&&o==null;default:return!0}case"script":if(r=o.async&&typeof o.async!=="function"&&typeof o.async!=="symbol",!r||o.onLoad||o.onError||!o.src||typeof o.src!=="string"){d&&(r?o.onLoad||o.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":d&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",r)}return!1}function BN(r){return r.type==="stylesheet"&&(r.state.loading&$D)===Hu?!1:!0}function uG(r,o,s,d){if(s.type==="stylesheet"&&(typeof d.media!=="string"||matchMedia(d.media).matches!==!1)&&(s.state.loading&ca)===Hu){if(s.instance===null){var p=df(d.href),g=o.querySelector(Xh(p));if(g){o=g._p,o!==null&&typeof o==="object"&&typeof o.then==="function"&&(r.count++,r=Y0.bind(r),o.then(r,r)),s.state.loading|=ca,s.instance=g,Ve(g);return}g=o.ownerDocument||o,d=PN(d),(p=ua.get(p))&&yC(d,p),g=g.createElement("link"),Ve(g);var x=g;x._p=new Promise(function(C,R){x.onload=C,x.onerror=R}),cr(g,"link",d),s.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,o),(o=s.state.preload)&&(s.state.loading&$D)===Hu&&(r.count++,s=Y0.bind(r),o.addEventListener("load",s),o.addEventListener("error",s))}}function dG(r,o){return r.stylesheets&&r.count===0&&J0(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var d=setTimeout(function(){if(r.stylesheets&&J0(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},aY+o);0<r.imgBytes&&Xw===0&&(Xw=125*Hq()*sY);var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&J0(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>Xw?50:iY)+o);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(p)}}:null}function Y0(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)J0(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}function J0(r,o){r.stylesheets=null,r.unsuspend!==null&&(r.count++,tv=new Map,o.forEach(fG,r),tv=null,Y0.call(r))}function fG(r,o){if(!(o.state.loading&ca)){var s=tv.get(r);if(s)var d=s.get(Qw);else{s=new Map,tv.set(r,s);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var x=p[g];if(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")s.set(x.dataset.precedence,x),d=x}d&&s.set(Qw,d)}p=o.instance,x=p.getAttribute("data-precedence"),g=s.get(x)||d,g===d&&s.set(Qw,p),s.set(x,p),this.count++,d=Y0.bind(this),p.addEventListener("load",d),p.addEventListener("error",d),g?g.parentNode.insertBefore(p,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),o.state.loading|=ca}}function pG(r,o,s,d,p,g,x,C,R){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=zu,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Wd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wd(0),this.hiddenUpdates=Wd(null),this.identifierPrefix=d,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,r=this.pendingUpdatersLaneMap=[];for(o=0;31>o;o++)r.push(new Set);this._debugRootType=s?"hydrateRoot()":"createRoot()"}function zN(r,o,s,d,p,g,x,C,R,A,q,G){return r=new pG(r,o,s,x,R,A,q,G,C),o=OW,g===!0&&(o|=Rr|Ha),o|=st,g=y(3,null,null,o),r.current=g,g.stateNode=r,o=GS(),fu(o),r.pooledCache=o,fu(o),g.memoizedState={element:d,isDehydrated:s,cache:o},QS(g),r}function HN(r){if(!r)return Ul;return r=Ul,r}function xC(r,o,s,d,p,g){if(Tr&&typeof Tr.onScheduleFiberRoot==="function")try{Tr.onScheduleFiberRoot(bf,d,s)}catch(x){Di||(Di=!0,console.error("React instrumentation encountered an error: %o",x))}p=HN(p),d.context===null?d.context=p:d.pendingContext=p,Oi&&Mo!==null&&!TD&&(TD=!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.`,Y(Mo)||"Unknown")),d=Rl(o),d.payload={element:s},g=g===void 0?null:g,g!==null&&(typeof g!=="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",g),d.callback=g),s=kl(r,d,o),s!==null&&(bi(o,"root.render()",null),pn(s,r,o),Oh(s,r,o))}function FN(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<o?s:o}}function $C(r,o){FN(r,o),(r=r.alternate)&&FN(r,o)}function UN(r){if(r.tag===13||r.tag===31){var o=Er(r,67108864);o!==null&&pn(o,r,67108864),$C(r,67108864)}}function VN(r){if(r.tag===13||r.tag===31){var o=Ro(r);o=ru(o);var s=Er(r,o);s!==null&&pn(s,r,o),$C(r,o)}}function hG(){return Mo}function mG(r,o,s,d){var p=oe.T;oe.T=null;var g=It.p;try{It.p=No,SC(r,o,s,d)}finally{It.p=g,oe.T=p}}function gG(r,o,s,d){var p=oe.T;oe.T=null;var g=It.p;try{It.p=za,SC(r,o,s,d)}finally{It.p=g,oe.T=p}}function SC(r,o,s,d){if(rv){var p=CC(d);if(p===null)sC(r,o,d,ov,s),KN(r,d);else if(bG(p,r,o,s,d))d.stopPropagation();else if(KN(r,d),o&4&&-1<cY.indexOf(r)){for(;p!==null;){var g=et(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var x=pi(g.pendingLanes);if(x!==0){var C=g;C.pendingLanes|=2;for(C.entangledLanes|=2;x;){var R=1<<31-_r(x);C.entanglements[1]|=R,x&=~R}ki(g),(kt&(Yn|Lo))===nr&&(Hy=Zn()+eD,qh(0,!1))}}break;case 31:case 13:C=Er(g,2),C!==null&&pn(C,g,2),lf(),$C(g,2)}if(g=CC(d),g===null&&sC(r,o,d,ov,s),g===p)break;p=g}p!==null&&d.stopPropagation()}else sC(r,o,d,null,s)}}function CC(r){return r=AS(r),wC(r)}function wC(r){if(ov=null,r=_e(r),r!==null){var o=T(r);if(o===null)r=null;else{var s=o.tag;if(s===13){if(r=D(o),r!==null)return r;r=null}else if(s===31){if(r=H(o),r!==null)return r;r=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null)}}return ov=r,null}function jN(r){switch(r){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 No;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 za;case"message":switch(TG()){case IC:return No;case BC:return za;case gf:case RG:return Li;case zC:return iy;default:return Li}default:return Li}}function KN(r,o){switch(r){case"focusin":case"focusout":ac=null;break;case"dragenter":case"dragleave":ic=null;break;case"mouseover":case"mouseout":sc=null;break;case"pointerover":case"pointerout":Gm.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wm.delete(o.pointerId)}}function Zh(r,o,s,d,p,g){if(r===null||r.nativeEvent!==g)return r={blockedOn:o,domEventName:s,eventSystemFlags:d,nativeEvent:g,targetContainers:[p]},o!==null&&(o=et(o),o!==null&&UN(o)),r;return r.eventSystemFlags|=d,o=r.targetContainers,p!==null&&o.indexOf(p)===-1&&o.push(p),r}function bG(r,o,s,d,p){switch(o){case"focusin":return ac=Zh(ac,r,o,s,d,p),!0;case"dragenter":return ic=Zh(ic,r,o,s,d,p),!0;case"mouseover":return sc=Zh(sc,r,o,s,d,p),!0;case"pointerover":var g=p.pointerId;return Gm.set(g,Zh(Gm.get(g)||null,r,o,s,d,p)),!0;case"gotpointercapture":return g=p.pointerId,Wm.set(g,Zh(Wm.get(g)||null,r,o,s,d,p)),!0}return!1}function qN(r){var o=_e(r.target);if(o!==null){var s=T(o);if(s!==null){if(o=s.tag,o===13){if(o=D(s),o!==null){r.blockedOn=o,be(r.priority,function(){VN(s)});return}}else if(o===31){if(o=H(s),o!==null){r.blockedOn=o,be(r.priority,function(){VN(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function X0(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var s=CC(r.nativeEvent);if(s===null){s=r.nativeEvent;var d=new s.constructor(s.type,s),p=d;om!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),om=p,s.target.dispatchEvent(d),om===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."),om=null}else return o=et(s),o!==null&&UN(o),r.blockedOn=s,!1;o.shift()}return!0}function GN(r,o,s){X0(r)&&s.delete(o)}function yG(){Zw=!1,ac!==null&&X0(ac)&&(ac=null),ic!==null&&X0(ic)&&(ic=null),sc!==null&&X0(sc)&&(sc=null),Gm.forEach(GN),Wm.forEach(GN)}function Q0(r,o){r.blockedOn===o&&(r.blockedOn=null,Zw||(Zw=!0,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,yG)))}function WN(r){av!==r&&(av=r,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,function(){av===r&&(av=null);for(var o=0;o<r.length;o+=3){var s=r[o],d=r[o+1],p=r[o+2];if(typeof d!=="function")if(wC(d||s)===null)continue;else break;var g=et(s);g!==null&&(r.splice(o,3),o-=3,s={pending:!0,data:p,method:s.method,action:d},Object.freeze(s),w2(g,s,d,p))}}))}function pf(r){function o(R){return Q0(R,r)}ac!==null&&Q0(ac,r),ic!==null&&Q0(ic,r),sc!==null&&Q0(sc,r),Gm.forEach(o),Wm.forEach(o);for(var s=0;s<lc.length;s++){var d=lc[s];d.blockedOn===r&&(d.blockedOn=null)}for(;0<lc.length&&(s=lc[0],s.blockedOn===null);)qN(s),s.blockedOn===null&&lc.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(d=0;d<s.length;d+=3){var p=s[d],g=s[d+1],x=p[Ir]||null;if(typeof g==="function")x||WN(s);else if(x){var C=null;if(g&&g.hasAttribute("formAction")){if(p=g,x=g[Ir]||null)C=x.formAction;else if(wC(p)!==null)continue}else C=x.action;typeof C==="function"?s[d+1]=C:(s.splice(d,3),d-=3),WN(s)}}}function YN(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(x){return p=x})},focusReset:"manual",scroll:"manual"})}function o(){p!==null&&(p(),p=null),d||setTimeout(s,20)}function s(){if(!d&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var d=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(s,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),p!==null&&(p(),p=null)}}}function EC(r){this._internalRoot=r}function Z0(r){this._internalRoot=r}function JN(r){r[Bl]&&(r._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 pt=Object.assign,vG=Symbol.for("react.element"),Mi=Symbol.for("react.transitional.element"),hf=Symbol.for("react.portal"),mf=Symbol.for("react.fragment"),ey=Symbol.for("react.strict_mode"),TC=Symbol.for("react.profiler"),RC=Symbol.for("react.consumer"),Ni=Symbol.for("react.context"),em=Symbol.for("react.forward_ref"),kC=Symbol.for("react.suspense"),AC=Symbol.for("react.suspense_list"),ty=Symbol.for("react.memo"),Ao=Symbol.for("react.lazy"),MC=Symbol.for("react.activity"),xG=Symbol.for("react.memo_cache_sentinel"),XN=Symbol.iterator,$G=Symbol.for("react.client.reference"),Gn=Array.isArray,oe=tp.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,It=mE.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,SG=Object.freeze({pending:!1,data:null,method:null,action:null}),NC=[],OC=[],vs=-1,Ll=ge(null),tm=ge(null),_l=ge(null),ny=ge(null),nm=0,QN,ZN,e8,t8,n8,r8,o8;k.__reactDisabledLog=!0;var DC,a8,PC=!1,LC=new(typeof WeakMap==="function"?WeakMap:Map),Mo=null,Oi=!1,Ba=Object.prototype.hasOwnProperty,_C=Nt.unstable_scheduleCallback,CG=Nt.unstable_cancelCallback,wG=Nt.unstable_shouldYield,EG=Nt.unstable_requestPaint,Zn=Nt.unstable_now,TG=Nt.unstable_getCurrentPriorityLevel,IC=Nt.unstable_ImmediatePriority,BC=Nt.unstable_UserBlockingPriority,gf=Nt.unstable_NormalPriority,RG=Nt.unstable_LowPriority,zC=Nt.unstable_IdlePriority,kG=Nt.log,AG=Nt.unstable_setDisableYieldValue,bf=null,Tr=null,Di=!1,Pi=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",_r=Math.clz32?Math.clz32:jb,MG=Math.log,NG=Math.LN2,ry=256,oy=262144,ay=4194304,No=2,za=8,Li=32,iy=268435456,Il=Math.random().toString(36).slice(2),ur="__reactFiber$"+Il,Ir="__reactProps$"+Il,Bl="__reactContainer$"+Il,HC="__reactEvents$"+Il,OG="__reactListeners$"+Il,DG="__reactHandles$"+Il,i8="__reactResources$"+Il,rm="__reactMarker$"+Il,s8=new Set,vu={},FC={},PG={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},LG=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]*$"),l8={},c8={},_G=/[\n"\\]/g,u8=!1,d8=!1,f8=!1,p8=!1,h8=!1,m8=!1,g8=["value","defaultValue"],b8=!1,y8=/["'&<>\n\t]|^\s|\s$/,IG="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(" "),v8="applet caption html table td th marquee object template foreignObject desc title".split(" "),BG=v8.concat(["button"]),zG="dd dt li option optgroup p rp rt".split(" "),x8={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},sy={},UC={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"]},$8=/([A-Z])/g,S8=/^ms-/,HG=/^(?:webkit|moz|o)[A-Z]/,FG=/^-ms-/,UG=/-(.)/g,C8=/;\s*$/,yf={},VC={},w8=!1,E8=!1,T8=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(" ")),ly="http://www.w3.org/1998/Math/MathML",vf="http://www.w3.org/2000/svg",VG=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"]]),cy={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"},R8={"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},xf={},jG=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]*$"),KG=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]*$"),k8=!1,Br={},A8=/^on./,qG=/^on[^A-Z]/,GG=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]*$"),WG=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]*$"),YG=/^[\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,om=null,$f=null,Sf=null,jC=!1,_i=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),KC=!1;if(_i)try{var am={};Object.defineProperty(am,"passive",{get:function(){KC=!0}}),window.addEventListener("test",am,am),window.removeEventListener("test",am,am)}catch(r){KC=!1}var zl=null,qC=null,uy=null,xu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dy=eo(xu),im=pt({},xu,{view:0,detail:0}),JG=eo(im),GC,WC,sm,fy=pt({},im,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:MS,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){if("movementX"in r)return r.movementX;return r!==sm&&(sm&&r.type==="mousemove"?(GC=r.screenX-sm.screenX,WC=r.screenY-sm.screenY):WC=GC=0,sm=r),GC},movementY:function(r){return"movementY"in r?r.movementY:WC}}),M8=eo(fy),XG=pt({},fy,{dataTransfer:0}),QG=eo(XG),ZG=pt({},im,{relatedTarget:0}),YC=eo(ZG),eW=pt({},xu,{animationName:0,elapsedTime:0,pseudoElement:0}),tW=eo(eW),nW=pt({},xu,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),rW=eo(nW),oW=pt({},xu,{data:0}),N8=eo(oW),aW=N8,iW={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sW={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"},lW={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},cW=pt({},im,{key:function(r){if(r.key){var o=iW[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=Xb(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?sW[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:MS,charCode:function(r){return r.type==="keypress"?Xb(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Xb(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),uW=eo(cW),dW=pt({},fy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),O8=eo(dW),fW=pt({},im,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:MS}),pW=eo(fW),hW=pt({},xu,{propertyName:0,elapsedTime:0,pseudoElement:0}),mW=eo(hW),gW=pt({},fy,{deltaX:function(r){return"deltaX"in r?r.deltaX:("wheelDeltaX"in r)?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:("wheelDeltaY"in r)?-r.wheelDeltaY:("wheelDelta"in r)?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),bW=eo(gW),yW=pt({},xu,{newState:0,oldState:0}),vW=eo(yW),xW=[9,13,27,32],D8=229,JC=_i&&"CompositionEvent"in window,lm=null;_i&&"documentMode"in document&&(lm=document.documentMode);var $W=_i&&"TextEvent"in window&&!lm,P8=_i&&(!JC||lm&&8<lm&&11>=lm),L8=32,_8=String.fromCharCode(L8),I8=!1,Cf=!1,SW={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},cm=null,um=null,B8=!1;_i&&(B8=VK("input")&&(!document.documentMode||9<document.documentMode));var zr=typeof Object.is==="function"?Object.is:YK,CW=_i&&"documentMode"in document&&11>=document.documentMode,wf=null,XC=null,dm=null,QC=!1,Ef={animationend:au("Animation","AnimationEnd"),animationiteration:au("Animation","AnimationIteration"),animationstart:au("Animation","AnimationStart"),transitionrun:au("Transition","TransitionRun"),transitionstart:au("Transition","TransitionStart"),transitioncancel:au("Transition","TransitionCancel"),transitionend:au("Transition","TransitionEnd")},ZC={},z8={};_i&&(z8=document.createElement("div").style,("AnimationEvent"in window)||(delete Ef.animationend.animation,delete Ef.animationiteration.animation,delete Ef.animationstart.animation),("TransitionEvent"in window)||delete Ef.transitionend.transition);var H8=iu("animationend"),F8=iu("animationiteration"),U8=iu("animationstart"),wW=iu("transitionrun"),EW=iu("transitionstart"),TW=iu("transitioncancel"),V8=iu("transitionend"),j8=new Map,ew="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(" ");ew.push("scrollEnd");var K8=0;if(typeof performance==="object"&&typeof performance.now==="function")var RW=performance,q8=function(){return RW.now()};else{var kW=Date;q8=function(){return kW.now()}}var tw=typeof reportError==="function"?reportError:function(r){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r==="object"&&r!==null&&typeof r.message==="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(o))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",r);return}console.error(r)},AW="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.",py=0,nw=1,rw=2,ow=3,hy="– ",my="+ ",G8=" ",Jt=typeof console<"u"&&typeof console.timeStamp==="function"&&typeof performance<"u"&&typeof performance.measure==="function",Zo="Components ⚛",ht="Scheduler ⚛",gt="Blocking",Hl=!1,xs={color:"primary",properties:null,tooltipText:"",track:Zo},Fl={start:-0,end:-0,detail:{devtools:xs}},MW=["Changed Props",""],W8="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",NW=["Changed Props",W8],fm=1,$s=2,ea=[],Tf=0,aw=0,Ul={};Object.freeze(Ul);var ta=null,Rf=null,We=0,OW=1,st=2,Rr=8,Ha=16,DW=32,Y8=!1;try{var J8=Object.preventExtensions({})}catch(r){Y8=!0}var iw=new WeakMap,kf=[],Af=0,gy=null,pm=0,na=[],ra=0,$u=null,Ss=1,Cs="",dr=null,Xt=null,$t=!1,Ii=!1,Oo=null,Vl=null,oa=!1,sw=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."),lw=ge(null),cw=ge(null),X8={},by=null,Mf=null,Nf=!1,PW=typeof AbortController<"u"?AbortController:function(){var r=[],o=this.signal={aborted:!1,addEventListener:function(s,d){r.push(d)}};this.abort=function(){o.aborted=!0,r.forEach(function(s){return s()})}},LW=Nt.unstable_scheduleCallback,_W=Nt.unstable_NormalPriority,Ln={$$typeof:Ni,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},_n=Nt.unstable_now,yy=console.createTask?console.createTask:function(){return null},hm=1,vy=2,er=-0,jl=-0,ws=-0,Es=null,Hr=-1.1,Su=-0,un=-0,je=-1.1,Ge=-1.1,on=null,hn=!1,Kl=-0,Bi=-1.1,mm=null,ql=0,uw=null,dw=null,Cu=-1.1,gm=null,Of=-1.1,xy=-1.1,zi=-0,Ts=-1.1,aa=-1.1,fw=0,bm=null,Q8=null,Z8=null,Gl=-1.1,wu=null,Wl=-1.1,$y=-1.1,eO=-0,tO=-0,Sy=0,Rs=null,nO=0,ym=-1.1,Cy=!1,wy=!1,vm=null,pw=0,Eu=0,Df=null,rO=oe.S;oe.S=function(r,o){if(QO=Zn(),typeof o==="object"&&o!==null&&typeof o.then==="function"){if(0>Ts&&0>aa){Ts=_n();var s=Yh(),d=Wh();if(s!==Wl||d!==wu)Wl=-1.1;Gl=s,wu=d}nq(r,o)}rO!==null&&rO(r,o)};var Tu=ge(null),Fa={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},xm=[],$m=[],Sm=[],Cm=[],wm=[],Em=[],Ru=new Set;Fa.recordUnsafeLifecycleWarnings=function(r,o){Ru.has(r.type)||(typeof o.componentWillMount==="function"&&o.componentWillMount.__suppressDeprecationWarning!==!0&&xm.push(r),r.mode&Rr&&typeof o.UNSAFE_componentWillMount==="function"&&$m.push(r),typeof o.componentWillReceiveProps==="function"&&o.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Sm.push(r),r.mode&Rr&&typeof o.UNSAFE_componentWillReceiveProps==="function"&&Cm.push(r),typeof o.componentWillUpdate==="function"&&o.componentWillUpdate.__suppressDeprecationWarning!==!0&&wm.push(r),r.mode&Rr&&typeof o.UNSAFE_componentWillUpdate==="function"&&Em.push(r))},Fa.flushPendingUnsafeLifecycleWarnings=function(){var r=new Set;0<xm.length&&(xm.forEach(function(C){r.add(Y(C)||"Component"),Ru.add(C.type)}),xm=[]);var o=new Set;0<$m.length&&($m.forEach(function(C){o.add(Y(C)||"Component"),Ru.add(C.type)}),$m=[]);var s=new Set;0<Sm.length&&(Sm.forEach(function(C){s.add(Y(C)||"Component"),Ru.add(C.type)}),Sm=[]);var d=new Set;0<Cm.length&&(Cm.forEach(function(C){d.add(Y(C)||"Component"),Ru.add(C.type)}),Cm=[]);var p=new Set;0<wm.length&&(wm.forEach(function(C){p.add(Y(C)||"Component"),Ru.add(C.type)}),wm=[]);var g=new Set;if(0<Em.length&&(Em.forEach(function(C){g.add(Y(C)||"Component"),Ru.add(C.type)}),Em=[]),0<o.size){var x=b(o);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`,x)}0<d.size&&(x=b(d),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`,x)),0<g.size&&(x=b(g),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`,x)),0<r.size&&(x=b(r),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`,x)),0<s.size&&(x=b(s),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`,x)),0<p.size&&(x=b(p),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`,x))};var Ey=new Map,oO=new Set;Fa.recordLegacyContextWarning=function(r,o){var s=null;for(var d=r;d!==null;)d.mode&Rr&&(s=d),d=d.return;s===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."):!oO.has(r.type)&&(d=Ey.get(s),r.type.contextTypes!=null||r.type.childContextTypes!=null||o!==null&&typeof o.getChildContext==="function")&&(d===void 0&&(d=[],Ey.set(s,d)),d.push(r))},Fa.flushLegacyContextWarning=function(){Ey.forEach(function(r){if(r.length!==0){var o=r[0],s=new Set;r.forEach(function(p){s.add(Y(p)||"Component"),oO.add(p.type)});var d=b(s);me(o,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`,d)})}})},Fa.discardPendingWarnings=function(){xm=[],$m=[],Sm=[],Cm=[],wm=[],Em=[],Ey=new Map};var aO={react_stack_bottom_frame:function(r,o,s){var d=Oi;Oi=!0;try{return r(o,s)}finally{Oi=d}}},hw=aO.react_stack_bottom_frame.bind(aO),iO={react_stack_bottom_frame:function(r){var o=Oi;Oi=!0;try{return r.render()}finally{Oi=o}}},sO=iO.react_stack_bottom_frame.bind(iO),lO={react_stack_bottom_frame:function(r,o){try{o.componentDidMount()}catch(s){_t(r,r.return,s)}}},mw=lO.react_stack_bottom_frame.bind(lO),cO={react_stack_bottom_frame:function(r,o,s,d,p){try{o.componentDidUpdate(s,d,p)}catch(g){_t(r,r.return,g)}}},uO=cO.react_stack_bottom_frame.bind(cO),dO={react_stack_bottom_frame:function(r,o){var s=o.stack;r.componentDidCatch(o.value,{componentStack:s!==null?s:""})}},IW=dO.react_stack_bottom_frame.bind(dO),fO={react_stack_bottom_frame:function(r,o,s){try{s.componentWillUnmount()}catch(d){_t(r,o,d)}}},pO=fO.react_stack_bottom_frame.bind(fO),hO={react_stack_bottom_frame:function(r){var o=r.create;return r=r.inst,o=o(),r.destroy=o}},BW=hO.react_stack_bottom_frame.bind(hO),mO={react_stack_bottom_frame:function(r,o,s){try{s()}catch(d){_t(r,o,d)}}},zW=mO.react_stack_bottom_frame.bind(mO),gO={react_stack_bottom_frame:function(r){var o=r._init;return o(r._payload)}},HW=gO.react_stack_bottom_frame.bind(gO),Pf=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`."),gw=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."),Ty=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."),Ry={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.')}},ku=null,Tm=!1,Lf=null,Rm=0,lt=null,bw,bO=bw=!1,yO={},vO={},xO={};m=function(r,o,s){if(s!==null&&typeof s==="object"&&s._store&&(!s._store.validated&&s.key==null||s._store.validated===2)){if(typeof s._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.");s._store.validated=1;var d=Y(r),p=d||"null";if(!yO[p]){yO[p]=!0,s=s._owner,r=r._debugOwner;var g="";r&&typeof r.tag==="number"&&(p=Y(r))&&(g=`
|
|
225
|
+
|
|
226
|
+
Check the render method of \``+p+"`."),g||d&&(g=`
|
|
227
|
+
|
|
228
|
+
Check the top-level render call using <`+d+">.");var x="";s!=null&&r!==s&&(d=null,typeof s.tag==="number"?d=Y(s):typeof s.name==="string"&&(d=s.name),d&&(x=" It was passed a child from "+d+".")),me(o,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.',g,x)})}}};var Au=f5(!0),$O=f5(!1),SO=0,CO=1,wO=2,yw=3,Yl=!1,EO=!1,vw=null,xw=!1,_f=ge(null),ky=ge(0),Do=ge(null),ia=null,If=1,km=2,An=ge(0),Ay=0,sa=1,Fr=2,Po=4,Ur=8,Bf,TO=new Set,RO=new Set,$w=new Set,kO=new Set,ks=0,Xe=null,Vt=null,In=null,My=!1,zf=!1,Mu=!1,Ny=0,Am=0,As=null,FW=0,UW=25,ne=null,la=null,Ms=-1,Mm=!1,Nm={readContext:rn,use:Nl,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useLayoutEffect:vn,useInsertionEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useSyncExternalStore:vn,useId:vn,useHostTransitionStatus:vn,useFormState:vn,useActionState:vn,useOptimistic:vn,useMemoCache:vn,useCacheRefresh:vn};Nm.useEffectEvent=vn;var Sw=null,AO=null,Cw=null,MO=null,Hi=null,Ua=null,Oy=null;Sw={readContext:function(r){return rn(r)},use:Nl,useCallback:function(r,o){return ne="useCallback",ft(),ef(o),x2(r,o)},useContext:function(r){return ne="useContext",ft(),rn(r)},useEffect:function(r,o){return ne="useEffect",ft(),ef(o),E0(r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",ft(),ef(s),v2(r,o,s)},useInsertionEffect:function(r,o){ne="useInsertionEffect",ft(),ef(o),hu(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",ft(),ef(o),y2(r,o)},useMemo:function(r,o){ne="useMemo",ft(),ef(o);var s=oe.H;oe.H=Hi;try{return $2(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",ft();var d=oe.H;oe.H=Hi;try{return c2(r,o,s)}finally{oe.H=d}},useRef:function(r){return ne="useRef",ft(),g2(r)},useState:function(r){ne="useState",ft();var o=oe.H;oe.H=Hi;try{return p2(r)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",ft()},useDeferredValue:function(r,o){return ne="useDeferredValue",ft(),S2(r,o)},useTransition:function(){return ne="useTransition",ft(),E2()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",ft(),d2(r,o,s)},useId:function(){return ne="useId",ft(),T2()},useFormState:function(r,o){return ne="useFormState",ft(),x0(),nf(r,o)},useActionState:function(r,o){return ne="useActionState",ft(),nf(r,o)},useOptimistic:function(r){return ne="useOptimistic",ft(),h2(r)},useHostTransitionStatus:mu,useMemoCache:pu,useCacheRefresh:function(){return ne="useCacheRefresh",ft(),R2()},useEffectEvent:function(r){return ne="useEffectEvent",ft(),b2(r)}},AO={readContext:function(r){return rn(r)},use:Nl,useCallback:function(r,o){return ne="useCallback",fe(),x2(r,o)},useContext:function(r){return ne="useContext",fe(),rn(r)},useEffect:function(r,o){return ne="useEffect",fe(),E0(r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",fe(),v2(r,o,s)},useInsertionEffect:function(r,o){ne="useInsertionEffect",fe(),hu(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",fe(),y2(r,o)},useMemo:function(r,o){ne="useMemo",fe();var s=oe.H;oe.H=Hi;try{return $2(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",fe();var d=oe.H;oe.H=Hi;try{return c2(r,o,s)}finally{oe.H=d}},useRef:function(r){return ne="useRef",fe(),g2(r)},useState:function(r){ne="useState",fe();var o=oe.H;oe.H=Hi;try{return p2(r)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",fe(),S2(r,o)},useTransition:function(){return ne="useTransition",fe(),E2()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",fe(),d2(r,o,s)},useId:function(){return ne="useId",fe(),T2()},useActionState:function(r,o){return ne="useActionState",fe(),nf(r,o)},useFormState:function(r,o){return ne="useFormState",fe(),x0(),nf(r,o)},useOptimistic:function(r){return ne="useOptimistic",fe(),h2(r)},useHostTransitionStatus:mu,useMemoCache:pu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),R2()},useEffectEvent:function(r){return ne="useEffectEvent",fe(),b2(r)}},Cw={readContext:function(r){return rn(r)},use:Nl,useCallback:function(r,o){return ne="useCallback",fe(),k0(r,o)},useContext:function(r){return ne="useContext",fe(),rn(r)},useEffect:function(r,o){ne="useEffect",fe(),to(2048,Ur,r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",fe(),R0(r,o,s)},useInsertionEffect:function(r,o){return ne="useInsertionEffect",fe(),to(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",fe(),to(4,Po,r,o)},useMemo:function(r,o){ne="useMemo",fe();var s=oe.H;oe.H=Ua;try{return A0(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",fe();var d=oe.H;oe.H=Ua;try{return tf(r,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",fe(),zt().memoizedState},useState:function(){ne="useState",fe();var r=oe.H;oe.H=Ua;try{return tf(_a)}finally{oe.H=r}},useDebugValue:function(){ne="useDebugValue",fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",fe(),P5(r,o)},useTransition:function(){return ne="useTransition",fe(),H5()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",fe(),S0(r,o,s)},useId:function(){return ne="useId",fe(),zt().memoizedState},useFormState:function(r){return ne="useFormState",fe(),x0(),C0(r)},useActionState:function(r){return ne="useActionState",fe(),C0(r)},useOptimistic:function(r,o){return ne="useOptimistic",fe(),w5(r,o)},useHostTransitionStatus:mu,useMemoCache:pu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),zt().memoizedState},useEffectEvent:function(r){return ne="useEffectEvent",fe(),T0(r)}},MO={readContext:function(r){return rn(r)},use:Nl,useCallback:function(r,o){return ne="useCallback",fe(),k0(r,o)},useContext:function(r){return ne="useContext",fe(),rn(r)},useEffect:function(r,o){ne="useEffect",fe(),to(2048,Ur,r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",fe(),R0(r,o,s)},useInsertionEffect:function(r,o){return ne="useInsertionEffect",fe(),to(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",fe(),to(4,Po,r,o)},useMemo:function(r,o){ne="useMemo",fe();var s=oe.H;oe.H=Oy;try{return A0(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",fe();var d=oe.H;oe.H=Oy;try{return _h(r,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",fe(),zt().memoizedState},useState:function(){ne="useState",fe();var r=oe.H;oe.H=Oy;try{return _h(_a)}finally{oe.H=r}},useDebugValue:function(){ne="useDebugValue",fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",fe(),L5(r,o)},useTransition:function(){return ne="useTransition",fe(),F5()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",fe(),S0(r,o,s)},useId:function(){return ne="useId",fe(),zt().memoizedState},useFormState:function(r){return ne="useFormState",fe(),x0(),w0(r)},useActionState:function(r){return ne="useActionState",fe(),w0(r)},useOptimistic:function(r,o){return ne="useOptimistic",fe(),T5(r,o)},useHostTransitionStatus:mu,useMemoCache:pu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),zt().memoizedState},useEffectEvent:function(r){return ne="useEffectEvent",fe(),T0(r)}},Hi={readContext:function(r){return f(),rn(r)},use:function(r){return u(),Nl(r)},useCallback:function(r,o){return ne="useCallback",u(),ft(),x2(r,o)},useContext:function(r){return ne="useContext",u(),ft(),rn(r)},useEffect:function(r,o){return ne="useEffect",u(),ft(),E0(r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",u(),ft(),v2(r,o,s)},useInsertionEffect:function(r,o){ne="useInsertionEffect",u(),ft(),hu(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",u(),ft(),y2(r,o)},useMemo:function(r,o){ne="useMemo",u(),ft();var s=oe.H;oe.H=Hi;try{return $2(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",u(),ft();var d=oe.H;oe.H=Hi;try{return c2(r,o,s)}finally{oe.H=d}},useRef:function(r){return ne="useRef",u(),ft(),g2(r)},useState:function(r){ne="useState",u(),ft();var o=oe.H;oe.H=Hi;try{return p2(r)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",u(),ft()},useDeferredValue:function(r,o){return ne="useDeferredValue",u(),ft(),S2(r,o)},useTransition:function(){return ne="useTransition",u(),ft(),E2()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",u(),ft(),d2(r,o,s)},useId:function(){return ne="useId",u(),ft(),T2()},useFormState:function(r,o){return ne="useFormState",u(),ft(),nf(r,o)},useActionState:function(r,o){return ne="useActionState",u(),ft(),nf(r,o)},useOptimistic:function(r){return ne="useOptimistic",u(),ft(),h2(r)},useMemoCache:function(r){return u(),pu(r)},useHostTransitionStatus:mu,useCacheRefresh:function(){return ne="useCacheRefresh",ft(),R2()},useEffectEvent:function(r){return ne="useEffectEvent",u(),ft(),b2(r)}},Ua={readContext:function(r){return f(),rn(r)},use:function(r){return u(),Nl(r)},useCallback:function(r,o){return ne="useCallback",u(),fe(),k0(r,o)},useContext:function(r){return ne="useContext",u(),fe(),rn(r)},useEffect:function(r,o){ne="useEffect",u(),fe(),to(2048,Ur,r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",u(),fe(),R0(r,o,s)},useInsertionEffect:function(r,o){return ne="useInsertionEffect",u(),fe(),to(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",u(),fe(),to(4,Po,r,o)},useMemo:function(r,o){ne="useMemo",u(),fe();var s=oe.H;oe.H=Ua;try{return A0(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",u(),fe();var d=oe.H;oe.H=Ua;try{return tf(r,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",u(),fe(),zt().memoizedState},useState:function(){ne="useState",u(),fe();var r=oe.H;oe.H=Ua;try{return tf(_a)}finally{oe.H=r}},useDebugValue:function(){ne="useDebugValue",u(),fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",u(),fe(),P5(r,o)},useTransition:function(){return ne="useTransition",u(),fe(),H5()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",u(),fe(),S0(r,o,s)},useId:function(){return ne="useId",u(),fe(),zt().memoizedState},useFormState:function(r){return ne="useFormState",u(),fe(),C0(r)},useActionState:function(r){return ne="useActionState",u(),fe(),C0(r)},useOptimistic:function(r,o){return ne="useOptimistic",u(),fe(),w5(r,o)},useMemoCache:function(r){return u(),pu(r)},useHostTransitionStatus:mu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),zt().memoizedState},useEffectEvent:function(r){return ne="useEffectEvent",u(),fe(),T0(r)}},Oy={readContext:function(r){return f(),rn(r)},use:function(r){return u(),Nl(r)},useCallback:function(r,o){return ne="useCallback",u(),fe(),k0(r,o)},useContext:function(r){return ne="useContext",u(),fe(),rn(r)},useEffect:function(r,o){ne="useEffect",u(),fe(),to(2048,Ur,r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",u(),fe(),R0(r,o,s)},useInsertionEffect:function(r,o){return ne="useInsertionEffect",u(),fe(),to(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",u(),fe(),to(4,Po,r,o)},useMemo:function(r,o){ne="useMemo",u(),fe();var s=oe.H;oe.H=Ua;try{return A0(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",u(),fe();var d=oe.H;oe.H=Ua;try{return _h(r,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",u(),fe(),zt().memoizedState},useState:function(){ne="useState",u(),fe();var r=oe.H;oe.H=Ua;try{return _h(_a)}finally{oe.H=r}},useDebugValue:function(){ne="useDebugValue",u(),fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",u(),fe(),L5(r,o)},useTransition:function(){return ne="useTransition",u(),fe(),F5()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",u(),fe(),S0(r,o,s)},useId:function(){return ne="useId",u(),fe(),zt().memoizedState},useFormState:function(r){return ne="useFormState",u(),fe(),w0(r)},useActionState:function(r){return ne="useActionState",u(),fe(),w0(r)},useOptimistic:function(r,o){return ne="useOptimistic",u(),fe(),T5(r,o)},useMemoCache:function(r){return u(),pu(r)},useHostTransitionStatus:mu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),zt().memoizedState},useEffectEvent:function(r){return ne="useEffectEvent",u(),fe(),T0(r)}};var NO={},OO=new Set,DO=new Set,PO=new Set,LO=new Set,_O=new Set,IO=new Set,BO=new Set,zO=new Set,HO=new Set,FO=new Set;Object.freeze(NO);var ww={enqueueSetState:function(r,o,s){r=r._reactInternals;var d=Ro(r),p=Rl(d);p.payload=o,s!==void 0&&s!==null&&(A2(s),p.callback=s),o=kl(r,p,d),o!==null&&(bi(d,"this.setState()",r),pn(o,r,d),Oh(o,r,d))},enqueueReplaceState:function(r,o,s){r=r._reactInternals;var d=Ro(r),p=Rl(d);p.tag=CO,p.payload=o,s!==void 0&&s!==null&&(A2(s),p.callback=s),o=kl(r,p,d),o!==null&&(bi(d,"this.replaceState()",r),pn(o,r,d),Oh(o,r,d))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var s=Ro(r),d=Rl(s);d.tag=wO,o!==void 0&&o!==null&&(A2(o),d.callback=o),o=kl(r,d,s),o!==null&&(bi(s,"this.forceUpdate()",r),pn(o,r,s),Oh(o,r,s))}},Hf=null,Ew=null,Tw=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."),Bn=!1,UO={},VO={},jO={},KO={},Ff=!1,qO={},Dy={},Rw={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},GO=!1,WO=null;WO=new Set;var Ns=!1,zn=!1,kw=!1,YO=typeof WeakSet==="function"?WeakSet:Set,tr=null,Uf=null,Vf=null,Hn=null,oo=!1,Va=null,Wn=!1,Om=8192,VW={getCacheForType:function(r){var o=rn(Ln),s=o.data.get(r);return s===void 0&&(s=r(),o.data.set(r,s)),s},cacheSignal:function(){return rn(Ln).controller.signal},getOwner:function(){return Mo}};if(typeof Symbol==="function"&&Symbol.for){var Dm=Symbol.for;Dm("selector.component"),Dm("selector.has_pseudo_class"),Dm("selector.role"),Dm("selector.test_id"),Dm("selector.text")}var jW=[],KW=typeof WeakMap==="function"?WeakMap:Map,nr=0,Yn=2,Lo=4,Os=0,Pm=1,Nu=2,Py=3,Jl=4,Ly=6,JO=5,kt=nr,jt=null,dt=null,ct=0,ao=0,_y=1,Ou=2,Lm=3,XO=4,Aw=5,_m=6,Iy=7,Mw=8,Du=9,Ht=ao,_o=null,Xl=!1,jf=!1,Nw=!1,Fi=0,dn=Os,Ql=0,Zl=0,Ow=0,io=0,Pu=0,Im=null,Vr=null,By=!1,zy=0,QO=0,ZO=300,Hy=1/0,eD=500,Bm=null,xn=null,ec=null,Fy=0,Dw=1,Pw=2,tD=3,tc=0,nD=1,rD=2,oD=3,aD=4,Uy=5,Fn=0,nc=null,Kf=null,ja=0,Lw=0,_w=-0,Iw=null,iD=null,sD=null,Ka=Fy,lD=null,qW=50,zm=0,Bw=null,zw=!1,Vy=!1,GW=50,Lu=0,Hm=null,qf=!1,jy=null,cD=!1,uD=new Set,WW={},Ky=null,Gf=null,Hw=!1,Fw=!1,qy=!1,Uw=!1,rc=0,Vw={};(function(){for(var r=0;r<ew.length;r++){var o=ew[r],s=o.toLowerCase();o=o[0].toUpperCase()+o.slice(1),La(s,"on"+o)}La(H8,"onAnimationEnd"),La(F8,"onAnimationIteration"),La(U8,"onAnimationStart"),La("dblclick","onDoubleClick"),La("focusin","onFocus"),La("focusout","onBlur"),La(wW,"onTransitionRun"),La(EW,"onTransitionStart"),La(TW,"onTransitionCancel"),La(V8,"onTransitionEnd")})(),xo("onMouseEnter",["mouseout","mouseover"]),xo("onMouseLeave",["mouseout","mouseover"]),xo("onPointerEnter",["pointerout","pointerover"]),xo("onPointerLeave",["pointerout","pointerover"]),wr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wr("onBeforeInput",["compositionend","keypress","textInput","paste"]),wr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fm="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(" "),jw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fm)),Gy="_reactListening"+Math.random().toString(36).slice(2),dD=!1,fD=!1,Wy=!1,pD=!1,Yy=!1,Jy=!1,hD=!1,Xy={},YW=/\r\n?/g,JW=/\u0000|\uFFFD/g,_u="http://www.w3.org/1999/xlink",Kw="http://www.w3.org/XML/1998/namespace",XW="javascript:throw new Error('React form unexpectedly submitted.')",QW="suppressHydrationWarning",Iu="&",Qy="/&",Um="$",Vm="/$",oc="$?",Bu="$~",Wf="$!",ZW="html",eY="body",tY="head",qw="F!",mD="F",gD="loading",nY="style",Ds=0,Yf=1,Zy=2,Gw=null,Ww=null,bD={dialog:!0,webview:!0},Yw=null,jm=void 0,yD=typeof setTimeout==="function"?setTimeout:void 0,rY=typeof clearTimeout==="function"?clearTimeout:void 0,zu=-1,vD=typeof Promise==="function"?Promise:void 0,oY=typeof queueMicrotask==="function"?queueMicrotask:typeof vD<"u"?function(r){return vD.resolve(null).then(r).catch(Uq)}:yD,Jw=null,Hu=0,Km=1,xD=2,$D=3,ca=4,ua=new Map,SD=new Set,Ps=It.d;It.d={f:function(){var r=Ps.f(),o=lf();return r||o},r:function(r){var o=et(r);o!==null&&o.tag===5&&o.type==="form"?z5(o):Ps.r(r)},D:function(r){Ps.D(r),ON("dns-prefetch",r,null)},C:function(r,o){Ps.C(r,o),ON("preconnect",r,o)},L:function(r,o,s){Ps.L(r,o,s);var d=Jf;if(d&&r&&o){var p='link[rel="preload"][as="'+Xo(o)+'"]';o==="image"?s&&s.imageSrcSet?(p+='[imagesrcset="'+Xo(s.imageSrcSet)+'"]',typeof s.imageSizes==="string"&&(p+='[imagesizes="'+Xo(s.imageSizes)+'"]')):p+='[href="'+Xo(r)+'"]':p+='[href="'+Xo(r)+'"]';var g=p;switch(o){case"style":g=df(r);break;case"script":g=ff(r)}ua.has(g)||(r=pt({rel:"preload",href:o==="image"&&s&&s.imageSrcSet?void 0:r,as:o},s),ua.set(g,r),d.querySelector(p)!==null||o==="style"&&d.querySelector(Xh(g))||o==="script"&&d.querySelector(Qh(g))||(o=d.createElement("link"),cr(o,"link",r),Ve(o),d.head.appendChild(o)))}},m:function(r,o){Ps.m(r,o);var s=Jf;if(s&&r){var d=o&&typeof o.as==="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Xo(d)+'"][href="'+Xo(r)+'"]',g=p;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=ff(r)}if(!ua.has(g)&&(r=pt({rel:"modulepreload",href:r},o),ua.set(g,r),s.querySelector(p)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Qh(g)))return}d=s.createElement("link"),cr(d,"link",r),Ve(d),s.head.appendChild(d)}}},X:function(r,o){Ps.X(r,o);var s=Jf;if(s&&r){var d=Mt(s).hoistableScripts,p=ff(r),g=d.get(p);g||(g=s.querySelector(Qh(p)),g||(r=pt({src:r,async:!0},o),(o=ua.get(p))&&vC(r,o),g=s.createElement("script"),Ve(g),cr(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(p,g))}},S:function(r,o,s){Ps.S(r,o,s);var d=Jf;if(d&&r){var p=Mt(d).hoistableStyles,g=df(r);o=o||"default";var x=p.get(g);if(!x){var C={loading:Hu,preload:null};if(x=d.querySelector(Xh(g)))C.loading=Km|ca;else{r=pt({rel:"stylesheet",href:r,"data-precedence":o},s),(s=ua.get(g))&&yC(r,s);var R=x=d.createElement("link");Ve(R),cr(R,"link",r),R._p=new Promise(function(A,q){R.onload=A,R.onerror=q}),R.addEventListener("load",function(){C.loading|=Km}),R.addEventListener("error",function(){C.loading|=xD}),C.loading|=ca,W0(x,o,d)}x={type:"stylesheet",instance:x,count:1,state:C},p.set(g,x)}}},M:function(r,o){Ps.M(r,o);var s=Jf;if(s&&r){var d=Mt(s).hoistableScripts,p=ff(r),g=d.get(p);g||(g=s.querySelector(Qh(p)),g||(r=pt({src:r,async:!0,type:"module"},o),(o=ua.get(p))&&vC(r,o),g=s.createElement("script"),Ve(g),cr(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(p,g))}}};var Jf=typeof document>"u"?null:document,ev=null,aY=60000,iY=800,sY=500,Xw=0,Qw=null,tv=null,Fu=SG,qm={$$typeof:Ni,Provider:null,Consumer:null,_currentValue:Fu,_currentValue2:Fu,_threadCount:0},CD="%c%s%c",wD="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",ED="",nv=" ",lY=Function.prototype.bind,TD=!1,RD=null,kD=null,AD=null,MD=null,ND=null,OD=null,DD=null,PD=null,LD=null,_D=null;RD=function(r,o,s,d){o=e(r,o),o!==null&&(s=t(o.memoizedState,s,0,d),o.memoizedState=s,o.baseState=s,r.memoizedProps=pt({},r.memoizedProps),s=Er(r,2),s!==null&&pn(s,r,2))},kD=function(r,o,s){o=e(r,o),o!==null&&(s=i(o.memoizedState,s,0),o.memoizedState=s,o.baseState=s,r.memoizedProps=pt({},r.memoizedProps),s=Er(r,2),s!==null&&pn(s,r,2))},AD=function(r,o,s,d){o=e(r,o),o!==null&&(s=n(o.memoizedState,s,d),o.memoizedState=s,o.baseState=s,r.memoizedProps=pt({},r.memoizedProps),s=Er(r,2),s!==null&&pn(s,r,2))},MD=function(r,o,s){r.pendingProps=t(r.memoizedProps,o,0,s),r.alternate&&(r.alternate.pendingProps=r.pendingProps),o=Er(r,2),o!==null&&pn(o,r,2)},ND=function(r,o){r.pendingProps=i(r.memoizedProps,o,0),r.alternate&&(r.alternate.pendingProps=r.pendingProps),o=Er(r,2),o!==null&&pn(o,r,2)},OD=function(r,o,s){r.pendingProps=n(r.memoizedProps,o,s),r.alternate&&(r.alternate.pendingProps=r.pendingProps),o=Er(r,2),o!==null&&pn(o,r,2)},DD=function(r){var o=Er(r,2);o!==null&&pn(o,r,2)},PD=function(r){var o=Gd(),s=Er(r,o);s!==null&&pn(s,r,o)},LD=function(r){c=r},_D=function(r){l=r};var rv=!0,ov=null,Zw=!1,ac=null,ic=null,sc=null,Gm=new Map,Wm=new Map,lc=[],cY="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(" "),av=null;if(Z0.prototype.render=EC.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error("Cannot update an unmounted root.");var s=arguments;typeof s[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()."):E(s[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 s[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),s=r;var d=o.current,p=Ro(d);xC(d,p,s,o,null,null)},Z0.prototype.unmount=EC.prototype.unmount=function(){var r=arguments;if(typeof r[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()."),r=this._internalRoot,r!==null){this._internalRoot=null;var o=r.containerInfo;(kt&(Yn|Lo))!==nr&&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."),xC(r.current,2,null,r,null,null),lf(),o[Bl]=null}},Z0.prototype.unstable_scheduleHydration=function(r){if(r){var o=Z();r={blockedOn:null,target:r,priority:o};for(var s=0;s<lc.length&&o!==0&&o<lc[s].priority;s++);lc.splice(s,0,r),s===0&&qN(r)}},function(){var r=tp.version;if(r!=="19.2.7")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
229
|
+
- react: `+(r+`
|
|
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"),It.findDOMNode=function(r){var o=r._reactInternals;if(o===void 0){if(typeof r.render==="function")throw Error("Unable to find node on an unmounted component.");throw r=Object.keys(r).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+r)}return r=L(o),r=r!==null?J(r):null,r=r===null?null:r.stateNode,r},!function(){var r={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:oe,reconcilerVersion:"19.2.7"};return r.overrideHookState=RD,r.overrideHookStateDeletePath=kD,r.overrideHookStateRenamePath=AD,r.overrideProps=MD,r.overridePropsDeletePath=ND,r.overridePropsRenamePath=OD,r.scheduleUpdate=DD,r.scheduleRetry=PD,r.setErrorHandler=LD,r.setSuspenseHandler=_D,r.scheduleRefresh=S,r.scheduleRoot=v,r.setRefreshHandler=w,r.getCurrentFiber=hG,qd(r)}()&&_i&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var ID=window.location.protocol;/^(https?|file):$/.test(ID)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(ID==="file:"?`
|
|
232
|
+
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}jY.createRoot=function(r,o){if(!E(r))throw Error("Target container is not a DOM element.");JN(r);var s=!1,d="",p=G5,g=W5,x=Y5;return o!==null&&o!==void 0&&(o.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof o==="object"&&o!==null&&o.$$typeof===Mi&&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 />);`),o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(p=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),o=zN(r,1,!1,null,null,s,d,null,p,g,x,YN),r[Bl]=o.current,iC(r),new EC(o)},jY.hydrateRoot=function(r,o,s){if(!E(r))throw Error("Target container is not a DOM element.");JN(r),o===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var d=!1,p="",g=G5,x=W5,C=Y5,R=null;return s!==null&&s!==void 0&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError),s.formState!==void 0&&(R=s.formState)),o=zN(r,1,!0,o,s!=null?s:null,d,p,R,g,x,C,YN),o.context=HN(null),s=o.current,d=Ro(s),d=ru(d),p=Rl(d),p.callback=null,kl(s,p,d),bi(d,"hydrateRoot()",null),s=d,o.current.lanes=s,xl(o,s),ki(o),r[Bl]=o.current,iC(r),new Z0(o)},jY.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var t6=Ui(function(cde,e6){var KY=K(ZD());e6.exports=KY});function n6(e,t){if(typeof e==="function")return e(t);else if(e!==null&&e!==void 0)e.current=t}function r6(...e){return(t)=>{let n=!1,a=e.map((i)=>{let l=n6(i,t);if(!n&&typeof l=="function")n=!0;return l});if(n)return()=>{for(let i=0;i<a.length;i++){let l=a[i];if(typeof l=="function")l();else n6(e[i],null)}}}}var qY;var o6=N(()=>{qY=K(ae(),1)});function WY(e){return typeof e==="object"&&e!==null&&"then"in e}function a6(e){return e!=null&&typeof e==="object"&&"$$typeof"in e&&e.$$typeof===GY&&"_payload"in e&&WY(e._payload)}function YY(e){let t=JY(e),n=Un.forwardRef((a,i)=>{let{children:l,...c}=a;if(a6(l)&&typeof bv==="function")l=bv(l._payload);let u=Un.Children.toArray(l),f=u.find(QY);if(f){let h=f.props.children,m=u.map((b)=>{if(b===f){if(Un.Children.count(h)>1)return Un.Children.only(null);return Un.isValidElement(h)?h.props.children:null}else return b});return gv.jsx(t,{...c,ref:i,children:Un.isValidElement(h)?Un.cloneElement(h,void 0,m):null})}return gv.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function JY(e){let t=Un.forwardRef((n,a)=>{let{children:i,...l}=n;if(a6(i)&&typeof bv==="function")i=bv(i._payload);if(Un.isValidElement(i)){let c=eJ(i),u=ZY(l,i.props);if(i.type!==Un.Fragment)u.ref=a?r6(a,c):c;return Un.cloneElement(i,u)}return Un.Children.count(i)>1?Un.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}function QY(e){return Un.isValidElement(e)&&typeof e.type==="function"&&"__radixId"in e.type&&e.type.__radixId===XY}function ZY(e,t){let n={...t};for(let a in t){let i=e[a],l=t[a];if(/^on[A-Z]/.test(a)){if(i&&l)n[a]=(...u)=>{let f=l(...u);return i(...u),f};else if(i)n[a]=i}else if(a==="style")n[a]={...i,...l};else if(a==="className")n[a]=[i,l].filter(Boolean).join(" ")}return{...e,...n}}function eJ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}var Un,gv,GY,bv,i6,XY;var s6=N(()=>{o6();Un=K(ae(),1),gv=K(so(),1),GY=Symbol.for("react.lazy"),bv=Un[" use ".trim().toString()];i6=YY("Slot");XY=Symbol("radix.slottable")});function l6(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=l6(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function zo(){for(var e,t,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=l6(e))&&(a&&(a+=" "),a+=t);return a}var c6;var _s=N(()=>{c6=zo});var u6=(e)=>typeof e==="boolean"?`${e}`:e===0?"0":e,d6,f6=(e,t)=>(n)=>{var a;if((t===null||t===void 0?void 0:t.variants)==null)return d6(e,n===null||n===void 0?void 0:n.class,n===null||n===void 0?void 0:n.className);let{variants:i,defaultVariants:l}=t,c=Object.keys(i).map((h)=>{let m=n===null||n===void 0?void 0:n[h],b=l===null||l===void 0?void 0:l[h];if(m===null)return null;let y=u6(m)||u6(b);return i[h][y]}),u=n&&Object.entries(n).reduce((h,m)=>{let[b,y]=m;if(y===void 0)return h;return h[b]=y,h},{}),f=t===null||t===void 0?void 0:(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,m)=>{let{class:b,className:y,...v}=m;return Object.entries(v).every((S)=>{let[w,E]=S;return Array.isArray(E)?E.includes({...l,...u}[w]):{...l,...u}[w]===E})?[...h,b,y]:h},[]);return d6(e,c,f,n===null||n===void 0?void 0:n.class,n===null||n===void 0?void 0:n.className)};var p6=N(()=>{_s();d6=zo});var tJ=(e,t)=>{let n=Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},nJ=(e,t)=>({classGroupId:e,validator:t}),$6=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),h6,rJ=(e)=>{let t=aJ(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:(c)=>{if(c.startsWith("[")&&c.endsWith("]"))return oJ(c);let u=c.split("-"),f=u[0]===""&&u.length>1?1:0;return S6(u,f,t)},getConflictingClassGroupIds:(c,u)=>{if(u){let f=a[c],h=n[c];if(f){if(h)return tJ(h,f);return f}return h||h6}return n[c]||h6}}},S6=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let i=e[t],l=n.nextPart.get(i);if(l){let h=S6(e,t+1,l);if(h)return h}let c=n.validators;if(c===null)return;let u=t===0?e.join("-"):e.slice(t).join("-"),f=c.length;for(let h=0;h<f;h++){let m=c[h];if(m.validator(u))return m.classGroupId}return},oJ=(e)=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?"arbitrary.."+a:void 0})(),aJ=(e)=>{let{theme:t,classGroups:n}=e;return iJ(n,t)},iJ=(e,t)=>{let n=$6();for(let a in e){let i=e[a];yE(i,n,a,t)}return n},yE=(e,t,n,a)=>{let i=e.length;for(let l=0;l<i;l++){let c=e[l];sJ(c,t,n,a)}},sJ=(e,t,n,a)=>{if(typeof e==="string"){lJ(e,t,n);return}if(typeof e==="function"){cJ(e,t,n,a);return}uJ(e,t,n,a)},lJ=(e,t,n)=>{let a=e===""?t:C6(t,e);a.classGroupId=n},cJ=(e,t,n,a)=>{if(dJ(e)){yE(e(a),t,n,a);return}if(t.validators===null)t.validators=[];t.validators.push(nJ(n,e))},uJ=(e,t,n,a)=>{let i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){let[u,f]=i[c];yE(f,C6(t,u),n,a)}},C6=(e,t)=>{let n=e,a=t.split("-"),i=a.length;for(let l=0;l<i;l++){let c=a[l],u=n.nextPart.get(c);if(!u)u=$6(),n.nextPart.set(c,u);n=u}return n},dJ=(e)=>("isThemeGetter"in e)&&e.isThemeGetter===!0,fJ=(e)=>{if(e<1)return{get:()=>{return},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null),i=(l,c)=>{if(n[l]=c,t++,t>e)t=0,a=n,n=Object.create(null)};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=a[l])!==void 0)return i(l,c),c},set(l,c){if(l in n)n[l]=c;else i(l,c)}}},pJ,m6=(e,t,n,a,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:i}),hJ=(e)=>{let{prefix:t,experimentalParseClassName:n}=e,a=(i)=>{let l=[],c=0,u=0,f=0,h,m=i.length;for(let w=0;w<m;w++){let E=i[w];if(c===0&&u===0){if(E===":"){l.push(i.slice(f,w)),f=w+1;continue}if(E==="/"){h=w;continue}}if(E==="[")c++;else if(E==="]")c--;else if(E==="(")u++;else if(E===")")u--}let b=l.length===0?i:i.slice(f),y=b,v=!1;if(b.endsWith("!"))y=b.slice(0,-1),v=!0;else if(b.startsWith("!"))y=b.slice(1),v=!0;let S=h&&h>f?h-f:void 0;return m6(l,v,y,S)};if(t){let i=t+":",l=a;a=(c)=>c.startsWith(i)?l(c.slice(i.length)):m6(pJ,!1,c,void 0,!0)}if(n){let i=a;a=(l)=>n({className:l,parseClassName:i})}return a},mJ=(e)=>{let t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),(n)=>{let a=[],i=[];for(let l=0;l<n.length;l++){let c=n[l],u=c[0]==="[",f=t.has(c);if(u||f){if(i.length>0)i.sort(),a.push(...i),i=[];a.push(c)}else i.push(c)}if(i.length>0)i.sort(),a.push(...i);return a}},gJ=(e)=>({cache:fJ(e.cacheSize),parseClassName:hJ(e),sortModifiers:mJ(e),postfixLookupClassGroupIds:bJ(e),...rJ(e)}),bJ=(e)=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)t[n[a]]=!0;return t},yJ,vJ=(e,t)=>{let{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:l,postfixLookupClassGroupIds:c}=t,u=[],f=e.trim().split(yJ),h="";for(let m=f.length-1;m>=0;m-=1){let b=f[m],{isExternal:y,modifiers:v,hasImportantModifier:S,baseClassName:w,maybePostfixModifierPosition:E}=n(b);if(y){h=b+(h.length>0?" "+h:h);continue}let T=!!E,D;if(T){let V=w.substring(0,E);D=a(V);let P=D&&c[D]?a(w):void 0;if(P&&P!==D)D=P,T=!1}else D=a(w);if(!D){if(!T){h=b+(h.length>0?" "+h:h);continue}if(D=a(w),!D){h=b+(h.length>0?" "+h:h);continue}T=!1}let H=v.length===0?"":v.length===1?v[0]:l(v).join(":"),z=S?H+"!":H,L=z+D;if(u.indexOf(L)>-1)continue;u.push(L);let J=i(D,T);for(let V=0;V<J.length;++V){let P=J[V];u.push(z+P)}h=b+(h.length>0?" "+h:h)}return h},xJ=(...e)=>{let t=0,n,a,i="";while(t<e.length)if(n=e[t++]){if(a=w6(n))i&&(i+=" "),i+=a}return i},w6=(e)=>{if(typeof e==="string")return e;let t,n="";for(let a=0;a<e.length;a++)if(e[a]){if(t=w6(e[a]))n&&(n+=" "),n+=t}return n},g6=(e,...t)=>{let n,a,i,l,c=(f)=>{let h=t.reduce((m,b)=>b(m),e());return n=gJ(h),a=n.cache.get,i=n.cache.set,l=u,u(f)},u=(f)=>{let h=a(f);if(h)return h;let m=vJ(f,n);return i(f,m),m};return l=c,(...f)=>l(xJ(...f))},$J,Jn=(e)=>{let t=(n)=>n[e]||$J;return t.isThemeGetter=!0,t},E6,T6,SJ,CJ,wJ,EJ,TJ,RJ,dc=(e)=>SJ.test(e),bt=(e)=>!!e&&!Number.isNaN(Number(e)),ji=(e)=>!!e&&Number.isInteger(Number(e)),gE=(e)=>e.endsWith("%")&&bt(e.slice(0,-1)),Is=(e)=>CJ.test(e),R6=()=>!0,kJ=(e)=>wJ.test(e)&&!EJ.test(e),vE=()=>!1,AJ=(e)=>TJ.test(e),MJ=(e)=>RJ.test(e),NJ=(e)=>!Oe(e)&&!De(e),OJ=(e)=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),DJ=(e)=>fc(e,M6,vE),Oe=(e)=>E6.test(e),Ku=(e)=>fc(e,N6,kJ),b6=(e)=>fc(e,FJ,bt),PJ=(e)=>fc(e,D6,R6),LJ=(e)=>fc(e,O6,vE),y6=(e)=>fc(e,k6,vE),_J=(e)=>fc(e,A6,MJ),yv=(e)=>fc(e,P6,AJ),De=(e)=>T6.test(e),tg=(e)=>qu(e,N6),IJ=(e)=>qu(e,O6),v6=(e)=>qu(e,k6),BJ=(e)=>qu(e,M6),zJ=(e)=>qu(e,A6),vv=(e)=>qu(e,P6,!0),HJ=(e)=>qu(e,D6,!0),fc=(e,t,n)=>{let a=E6.exec(e);if(a){if(a[1])return t(a[1]);return n(a[2])}return!1},qu=(e,t,n=!1)=>{let a=T6.exec(e);if(a){if(a[1])return t(a[1]);return n}return!1},k6=(e)=>e==="position"||e==="percentage",A6=(e)=>e==="image"||e==="url",M6=(e)=>e==="length"||e==="size"||e==="bg-size",N6=(e)=>e==="length",FJ=(e)=>e==="number",O6=(e)=>e==="family-name",D6=(e)=>e==="number"||e==="weight",P6=(e)=>e==="shadow",x6=()=>{let e=Jn("color"),t=Jn("font"),n=Jn("text"),a=Jn("font-weight"),i=Jn("tracking"),l=Jn("leading"),c=Jn("breakpoint"),u=Jn("container"),f=Jn("spacing"),h=Jn("radius"),m=Jn("shadow"),b=Jn("inset-shadow"),y=Jn("text-shadow"),v=Jn("drop-shadow"),S=Jn("blur"),w=Jn("perspective"),E=Jn("aspect"),T=Jn("ease"),D=Jn("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...z(),De,Oe],J=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],P=()=>[De,Oe,f],te=()=>[dc,"full","auto",...P()],Y=()=>[ji,"none","subgrid",De,Oe],ge=()=>["auto",{span:["full",ji,De,Oe]},ji,De,Oe],ue=()=>[ji,"auto",De,Oe],ie=()=>["auto","min","max","fr",De,Oe],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...P()],Q=()=>[dc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],pe=()=>[dc,"screen","full","dvw","lvw","svw","min","max","fit",...P()],re=()=>[dc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],k=()=>[e,De,Oe],X=()=>[...z(),v6,y6,{position:[De,Oe]}],de=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",BJ,DJ,{size:[De,Oe]}],Re=()=>[gE,tg,Ku],Ke=()=>["","none","full",h,De,Oe],Ce=()=>["",bt,tg,Ku],Je=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[bt,gE,v6,y6],xt=()=>["","none",S,De,Oe],me=()=>["none",bt,De,Oe],cn=()=>["none",bt,De,Oe],Pn=()=>[bt,De,Oe],kn=()=>[dc,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Is],breakpoint:[Is],color:[R6],container:[Is],"drop-shadow":[Is],ease:["in","out","in-out"],font:[NJ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Is],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Is],shadow:[Is],spacing:["px",bt],text:[Is],"text-shadow":[Is],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dc,Oe,De,E]}],container:["container"],"container-type":[{"@container":["","normal","size",De,Oe]}],"container-named":[OJ],columns:[{columns:[bt,Oe,De,u]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"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:L()}],overflow:[{overflow:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:te()}],"inset-x":[{"inset-x":te()}],"inset-y":[{"inset-y":te()}],start:[{"inset-s":te(),start:te()}],end:[{"inset-e":te(),end:te()}],"inset-bs":[{"inset-bs":te()}],"inset-be":[{"inset-be":te()}],top:[{top:te()}],right:[{right:te()}],bottom:[{bottom:te()}],left:[{left:te()}],visibility:["visible","invisible","collapse"],z:[{z:[ji,"auto",De,Oe]}],basis:[{basis:[dc,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[bt,dc,"auto","initial","none",Oe]}],grow:[{grow:["",bt,De,Oe]}],shrink:[{shrink:["",bt,De,Oe]}],order:[{order:[ji,"first","last","none",De,Oe]}],"grid-cols":[{"grid-cols":Y()}],"col-start-end":[{col:ge()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":Y()}],"row-start-end":[{row:ge()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...pe()]}],"min-inline-size":[{"min-inline":["auto",...pe()]}],"max-inline-size":[{"max-inline":["none",...pe()]}],"block-size":[{block:["auto",...re()]}],"min-block-size":[{"min-block":["auto",...re()]}],"max-block-size":[{"max-block":["none",...re()]}],w:[{w:[u,"screen",...Q()]}],"min-w":[{"min-w":[u,"screen","none",...Q()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",n,tg,Ku]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,HJ,PJ]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gE,Oe]}],"font-family":[{font:[IJ,LJ,t]}],"font-features":[{"font-features":[Oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,De,Oe]}],"line-clamp":[{"line-clamp":[bt,"none",De,b6]}],leading:[{leading:[l,...P()]}],"list-image":[{"list-image":["none",De,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Je(),"wavy"]}],"text-decoration-thickness":[{decoration:[bt,"from-font","auto",De,Ku]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[bt,"auto",De,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[ji,De,Oe]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Oe]}],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",De,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:de()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ji,De,Oe],radial:["",De,Oe],conic:[ji,De,Oe]},zJ,_J]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:Re()}],"gradient-via-pos":[{via:Re()}],"gradient-to-pos":[{to:Re()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:Ke()}],"rounded-s":[{"rounded-s":Ke()}],"rounded-e":[{"rounded-e":Ke()}],"rounded-t":[{"rounded-t":Ke()}],"rounded-r":[{"rounded-r":Ke()}],"rounded-b":[{"rounded-b":Ke()}],"rounded-l":[{"rounded-l":Ke()}],"rounded-ss":[{"rounded-ss":Ke()}],"rounded-se":[{"rounded-se":Ke()}],"rounded-ee":[{"rounded-ee":Ke()}],"rounded-es":[{"rounded-es":Ke()}],"rounded-tl":[{"rounded-tl":Ke()}],"rounded-tr":[{"rounded-tr":Ke()}],"rounded-br":[{"rounded-br":Ke()}],"rounded-bl":[{"rounded-bl":Ke()}],"border-w":[{border:Ce()}],"border-w-x":[{"border-x":Ce()}],"border-w-y":[{"border-y":Ce()}],"border-w-s":[{"border-s":Ce()}],"border-w-e":[{"border-e":Ce()}],"border-w-bs":[{"border-bs":Ce()}],"border-w-be":[{"border-be":Ce()}],"border-w-t":[{"border-t":Ce()}],"border-w-r":[{"border-r":Ce()}],"border-w-b":[{"border-b":Ce()}],"border-w-l":[{"border-l":Ce()}],"divide-x":[{"divide-x":Ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Je(),"hidden","none"]}],"divide-style":[{divide:[...Je(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[bt,De,Oe]}],"outline-w":[{outline:["",bt,tg,Ku]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",m,vv,yv]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",b,vv,yv]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[bt,Ku]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Ce()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",y,vv,yv]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[bt,De,Oe]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"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":[bt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[De,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":z()}],"mask-image-conic-pos":[{"mask-conic":[bt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:de()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Oe]}],filter:[{filter:["","none",De,Oe]}],blur:[{blur:xt()}],brightness:[{brightness:[bt,De,Oe]}],contrast:[{contrast:[bt,De,Oe]}],"drop-shadow":[{"drop-shadow":["","none",v,vv,yv]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",bt,De,Oe]}],"hue-rotate":[{"hue-rotate":[bt,De,Oe]}],invert:[{invert:["",bt,De,Oe]}],saturate:[{saturate:[bt,De,Oe]}],sepia:[{sepia:["",bt,De,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Oe]}],"backdrop-blur":[{"backdrop-blur":xt()}],"backdrop-brightness":[{"backdrop-brightness":[bt,De,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[bt,De,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",bt,De,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[bt,De,Oe]}],"backdrop-invert":[{"backdrop-invert":["",bt,De,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[bt,De,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[bt,De,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",bt,De,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[bt,"initial",De,Oe]}],ease:[{ease:["linear","initial",T,De,Oe]}],delay:[{delay:[bt,De,Oe]}],animate:[{animate:["none",D,De,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,De,Oe]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:cn()}],"scale-x":[{"scale-x":cn()}],"scale-y":[{"scale-y":cn()}],"scale-z":[{"scale-z":cn()}],"scale-3d":["scale-3d"],skew:[{skew:Pn()}],"skew-x":[{"skew-x":Pn()}],"skew-y":[{"skew-y":Pn()}],transform:[{transform:[De,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:kn()}],"translate-x":[{"translate-x":kn()}],"translate-y":[{"translate-y":kn()}],"translate-z":[{"translate-z":kn()}],"translate-none":["translate-none"],zoom:[{zoom:[ji,De,Oe]}],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",De,Oe]}],"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":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",De,Oe]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[bt,tg,Ku,b6]}],stroke:[{stroke:["none",...k()]}],"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"]}},UJ=(e,{cacheSize:t,prefix:n,experimentalParseClassName:a,extend:i={},override:l={}})=>(np(e,"cacheSize",t),np(e,"prefix",n),np(e,"experimentalParseClassName",a),xv(e.theme,l.theme),xv(e.classGroups,l.classGroups),xv(e.conflictingClassGroups,l.conflictingClassGroups),xv(e.conflictingClassGroupModifiers,l.conflictingClassGroupModifiers),np(e,"postfixLookupClassGroups",l.postfixLookupClassGroups),np(e,"orderSensitiveModifiers",l.orderSensitiveModifiers),$v(e.theme,i.theme),$v(e.classGroups,i.classGroups),$v(e.conflictingClassGroups,i.conflictingClassGroups),$v(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),bE(e,i,"postfixLookupClassGroups"),bE(e,i,"orderSensitiveModifiers"),e),np=(e,t,n)=>{if(n!==void 0)e[t]=n},xv=(e,t)=>{if(t)for(let n in t)np(e,n,t[n])},$v=(e,t)=>{if(t)for(let n in t)bE(e,t,n)},bE=(e,t,n)=>{let a=t[n];if(a!==void 0)e[n]=e[n]?e[n].concat(a):a},L6=(e,...t)=>typeof e==="function"?g6(x6,e,...t):g6(()=>UJ(x6(),e),...t);var _6=N(()=>{h6=[],pJ=[],yJ=/\s+/,$J=[],E6=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,T6=/^\((?:(\w[\w-]*):)?(.+)\)$/i,SJ=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,CJ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wJ=/\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$/,EJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/});var Bs,VJ,jJ=(e)=>{if(typeof e==="boolean")return e?"":void 0;if(e===void 0||e===null)return;return String(e)},KJ=(e)=>{let t=JSON.stringify(e),n=Bs.useRef({signature:t,value:e});if(n.current.signature!==t)n.current={signature:t,value:e};return n.current.value},ze=(e,t)=>{let n=f6(t?.baseClass,{variants:t?.variants,defaultVariants:t?.defaultVariants,compoundVariants:t?.compoundVariants}),a=t?.passVariantProps?new Set(t.passVariantProps):void 0,i=Bs.forwardRef((l,c)=>{let{children:u,...f}=l,h=f.className;delete f.className;let m={};for(let T in t?.variants)if(m[T]=f[T],T in f&&!a?.has(T))delete f[T];let b=KJ(m),y={};if(t?.variantsAsDataAttrs&&t.variants)for(let T of t.variantsAsDataAttrs){let D=T.toString(),H=l[D]??t.defaultVariants?.[T];y[`data-${D}`]=jJ(H)}let v=f.style,S=Bs.useMemo(()=>t?.style?{...t.style,...v}:v,[v]),w=Bs.useMemo(()=>VJ(zo(n(b),h)),[b,h]),E=e;if(l.asChild&&typeof e==="string")E=i6,delete f.asChild;return Bs.createElement(E,{ref:c,className:w,...t.defaultProps,...y,...f,style:S},u)});return i.displayName=t?.displayName??"uic",i};var $n=N(()=>{s6();p6();_s();_6();Bs=K(ae(),1),VJ=L6({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 qa(...e){return(...t)=>{for(let n of e)if(typeof n==="function")n(...t)}}var rp=()=>{};var I6,nt;var pr=N(()=>{I6=K(ae(),1),nt=typeof document<"u"?I6.default.useLayoutEffect:()=>{}});function WJ(e=!1){let t=or.useContext(B6),n=or.useRef(null);if(n.current===null&&!e){let a=or.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(a){let i=xE.get(a);if(i==null)xE.set(a,{id:t.current,state:a.memoizedState});else if(a.memoizedState!==i.state)t.current=i.id,xE.delete(a)}n.current=++t.current}return n.current}function YJ(e){let t=or.useContext(B6);if(t===Sv&&!GJ)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 n=WJ(!!e),a=`react-aria${t.prefix}`;return e||`${a}-${n}`}function JJ(e){let t=or.default.useId(),[n]=or.useState(Kr()),a=n?"react-aria":`react-aria${Sv.prefix}`;return e||`${a}-${t}`}function XJ(){return!1}function QJ(){return!0}function ZJ(e){return()=>{}}function Kr(){if(typeof or.default.useSyncExternalStore==="function")return or.default.useSyncExternalStore(ZJ,XJ,QJ);return or.useContext(qJ)}var or,Sv,B6,qJ,GJ,xE,z6;var pc=N(()=>{or=K(ae(),1),Sv={prefix:String(Math.round(Math.random()*10000000000)),current:0},B6=or.default.createContext(Sv),qJ=or.default.createContext(!1),GJ=Boolean(typeof window<"u"&&window.document&&window.document.createElement),xE=new WeakMap;z6=typeof or.default.useId==="function"?JJ:YJ});function H6(e){let[t,n]=hc.useState(e),a=hc.useRef(t),i=hc.useRef(null),l=hc.useRef(()=>{if(!i.current)return;let u=i.current.next();if(u.done){i.current=null;return}if(a.current===u.value)l.current();else n(u.value)});nt(()=>{if(a.current=t,i.current)l.current()});let c=hc.useCallback((u)=>{i.current=u(a.current),l.current()},[l]);return[t,c]}var hc;var F6=N(()=>{pr();hc=K(ae(),1)});function Nn(e){let[t,n]=zs.useState(e),a=zs.useRef(null),i=z6(t),l=zs.useRef(null);if(ng)ng.register(l,i);if(eX){let c=op.get(i);if(c&&!c.includes(a))c.push(a);else op.set(i,[a])}return nt(()=>{let c=i;return()=>{if(ng)ng.unregister(l);op.delete(c)}},[i]),zs.useEffect(()=>{let c=a.current;if(c)n(c);return()=>{if(c)a.current=null}}),i}function U6(e,t){if(e===t)return e;let n=op.get(e);if(n)return n.forEach((i)=>i.current=t),t;let a=op.get(t);if(a)return a.forEach((i)=>i.current=e),e;return t}function pa(e=[]){let t=Nn(),[n,a]=H6(t),i=zs.useCallback(()=>{a(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,a]);return nt(i,[t,i,...e]),n}var zs,eX,op,ng;var Ho=N(()=>{pr();pc();F6();zs=K(ae(),1),eX=Boolean(typeof window<"u"&&window.document&&window.document.createElement),op=new Map;if(typeof FinalizationRegistry<"u")ng=new FinalizationRegistry((e)=>{op.delete(e)})});function Ki(...e){if(e.length===1&&e[0])return e[0];return(t)=>{let n=!1,a=e.map((i)=>{let l=V6(i,t);return n||=typeof l=="function",l});if(n)return()=>{a.forEach((i,l)=>{if(typeof i==="function")i();else V6(e[l],null)})}}}function V6(e,t){if(typeof e==="function")return e(t);else if(e!=null)e.current=t}var $E=()=>{};function Le(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let a=e[n];for(let i in a){let l=t[i],c=a[i];if(typeof l==="function"&&typeof c==="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90)t[i]=qa(l,c);else if((i==="className"||i==="UNSAFE_className")&&typeof l==="string"&&typeof c==="string")t[i]=c6(l,c);else if(i==="id"&&l&&c)t.id=U6(l,c);else if(i==="ref"&&l&&c)t.ref=Ki(l,c);else t[i]=c!==void 0?c:l}}return t}var hr=N(()=>{rp();Ho();$E();_s()});var ha=N(()=>{hr()});var Cv=N(()=>{$E()});var j6=N(()=>{pr()});function co(e){let t=Gu.useRef(null),n=Gu.useRef(void 0),a=Gu.useCallback((i)=>{if(typeof e==="function"){let l=e,c=l(i);return()=>{if(typeof c==="function")c();else l(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return Gu.useMemo(()=>({get current(){return t.current},set current(i){if(t.current=i,n.current)n.current(),n.current=void 0;if(i!=null)n.current=a(i)}}),[a])}var Gu;var K6=N(()=>{Gu=K(ae(),1)});var ap=N(()=>{K6()});function qr({values:e,children:t}){for(let[n,a]of e)t=ar.default.createElement(n.Provider,{value:a},t);return t}function Yt(e){let{className:t,style:n,children:a,defaultClassName:i,defaultChildren:l,defaultStyle:c,values:u,render:f}=e;return ar.useMemo(()=>{let h,m,b;if(typeof t==="function")h=t({...u,defaultClassName:i});else h=t;if(typeof n==="function")m=n({...u,defaultStyle:c||{}});else m=n;if(typeof a==="function")b=a({...u,defaultChildren:l});else if(a==null)b=l;else b=a;return{className:h??i,style:m||c?{...c,...m}:void 0,children:b??l,"data-rac":"",render:f?(y)=>f(y,u):void 0}},[t,n,a,i,l,c,u,f])}function Wu(e,t){let n=ar.useContext(e);if(t===null)return null;if(n&&typeof n==="object"&&"slots"in n&&n.slots){let a=t||qi;if(!n.slots[a]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map((c)=>`"${c}"`)),l=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${l} Valid slot names are ${i}.`)}return n.slots[a]}return n}function an(e,t,n){let a=Wu(n,e.slot)||{},{ref:i,...l}=a,c=co(ar.useMemo(()=>Ki(t,i),[t,i])),u=Le(l,e);if("style"in l&&l.style&&"style"in e&&e.style)if(typeof l.style==="function"||typeof e.style==="function")u.style=(f)=>{let h=typeof l.style==="function"?l.style(f):l.style,m={...f.defaultStyle,...h},b=typeof e.style==="function"?e.style({...f,defaultStyle:m}):e.style;return{...m,...b}};else u.style={...l.style,...e.style};return[u,c]}function wv(e=!0){let[t,n]=ar.useState(e),a=ar.useRef(!1),i=ar.useCallback((l)=>{a.current=!0,n(!!l)},[]);return nt(()=>{if(!a.current)n(!1)},[]),[i,t]}function G6(e){let t=/^(data-.*)$/,n={};for(let a in e)if(!t.test(a))n[a]=e[a];return n}function tX(e,t,n){let{render:a,...i}=t,l=ar.useRef(null),c=ar.useMemo(()=>Ki(n,l),[n,l]);nt(()=>{if(a){if(!l.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(l.current.localName!==e)console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${e}>, got <${l.current.localName}>. This may break the component behavior and accessibility.`)}},[e,a]);let u={...i,ref:c};if(a)return a(u,void 0);return ar.default.createElement(e,u)}var ar,qi,q6,Ot;var Gr=N(()=>{ha();Cv();j6();ap();ar=K(ae(),1),qi=Symbol("default");q6={},Ot=new Proxy({},{get(e,t){if(typeof t!=="string")return;let n=q6[t];if(!n)n=ar.forwardRef(tX.bind(null,t)),q6[t]=n;return n}})});var W6="react-aria-clear-focus",Y6="react-aria-focus";var J6=()=>{};function nX(e){return e!==null&&typeof e==="object"&&"nodeType"in e&&typeof e.nodeType==="number"}function X6(e){return nX(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var rt=(e)=>e?.ownerDocument??document,mn=(e)=>{if(e&&"window"in e&&e.window===e)return e;return rt(e).defaultView||window};var mr=()=>{};function Fo(){return rX}var rX=!1;var Q6=()=>{};var Ev=N(()=>{Q6()});function yt(e,t){if(!Fo())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;while(n!==null){if(n===e)return!0;if(n.tagName==="SLOT"&&n.assignedSlot)n=n.assignedSlot.parentNode;else if(X6(n))n=n.host;else n=n.parentNode}return!1}function ke(e){if(Fo()&&e.target instanceof Element&&e.target.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;else if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function rg(e){if(!e)return!1;let t=e.getRootNode(),n=mn(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let a=t.activeElement;return a!=null&&e.contains(a)}var Tt=(e=document)=>{if(!Fo())return e.activeElement;let t=e.activeElement;while(t&&"shadowRoot"in t&&t.shadowRoot?.activeElement)t=t.shadowRoot.activeElement;return t};var fn=N(()=>{mr();Ev()});function Tv(e){let t=aX(rt(e));if(t!==e){if(t)oX(t,e);if(e)SE(e,t)}}function oX(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function SE(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function aX(e){let t=Tt(e),n=t?.getAttribute("aria-activedescendant");if(n)return e.getElementById(n)||t;return t}var CE=N(()=>{fn();mr()});function Wr(e){if(iX())e.focus({preventScroll:!0});else{let t=sX(e);e.focus(),lX(t)}}function iX(){if(Rv==null){Rv=!1;try{document.createElement("div").focus({get preventScroll(){return Rv=!0,!0}})}catch{}}return Rv}function sX(e){let t=e.parentNode,n=[],a=document.scrollingElement||document.documentElement;while(t instanceof HTMLElement&&t!==a){if(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft});t=t.parentNode}if(a instanceof HTMLElement)n.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft});return n}function lX(e){for(let{element:t,scrollTop:n,scrollLeft:a}of e)t.scrollTop=n,t.scrollLeft=a}var Rv=null;var Yu=()=>{};function uX(e){let t=mn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:a}=e.style,i=n!=="none"&&a!=="hidden"&&a!=="collapse";if(i){let{getComputedStyle:l}=e.ownerDocument.defaultView,{display:c,visibility:u}=l(e);i=c!=="none"&&u!=="hidden"&&u!=="collapse"}return i}function dX(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function kv(e,t){if(cX)return e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]");return e.nodeName!=="#comment"&&uX(e)&&dX(e,t)&&(!e.parentElement||kv(e.parentElement,e))}var cX;var Z6=N(()=>{mr();cX=typeof Element<"u"&&"checkVisibility"in Element.prototype});function Av(e,t){return e.matches(fX)&&!e7(e)&&(t?.skipVisibilityCheck||kv(e))}function Mv(e){return e.matches(pX)&&kv(e)&&!e7(e)}function e7(e){let t=e;while(t!=null){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}var wE,fX,pX;var Nv=N(()=>{Z6();wE=["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"],fX=wE.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";wE.push('[tabindex]:not([tabindex="-1"]):not([disabled])');pX=wE.join(':not([hidden]):not([tabindex="-1"]),')});function ag(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Dv(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Pv(e){let t=Ov.useRef({isFocused:!1,observer:null});return nt(()=>{let n=t.current;return()=>{if(n.observer)n.observer.disconnect(),n.observer=null}},[]),Ov.useCallback((n)=>{let a=ke(n);if(a instanceof HTMLButtonElement||a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement){t.current.isFocused=!0;let i=a,l=(c)=>{if(t.current.isFocused=!1,i.disabled){let u=ag(c);e?.(u)}if(t.current.observer)t.current.observer.disconnect(),t.current.observer=null};i.addEventListener("focusout",l,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){t.current.observer?.disconnect();let c=i===Tt()?null:Tt();i.dispatchEvent(new FocusEvent("blur",{relatedTarget:c})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:c}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[e])}function t7(e){while(e&&!Av(e,{skipVisibilityCheck:!0}))e=e.parentElement;let t=mn(e),n=t.document.activeElement;if(!n||n===e)return;og=!0;let a=!1,i=(m)=>{if(ke(m)===n||a)m.stopImmediatePropagation()},l=(m)=>{if(ke(m)===n||a){if(m.stopImmediatePropagation(),!e&&!a)a=!0,Wr(n),f()}},c=(m)=>{if(ke(m)===e||a)m.stopImmediatePropagation()},u=(m)=>{if(ke(m)===e||a){if(m.stopImmediatePropagation(),!a)a=!0,Wr(n),f()}};t.addEventListener("blur",i,!0),t.addEventListener("focusout",l,!0),t.addEventListener("focusin",u,!0),t.addEventListener("focus",c,!0);let f=()=>{cancelAnimationFrame(h),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",l,!0),t.removeEventListener("focusin",u,!0),t.removeEventListener("focus",c,!0),og=!1,a=!1},h=requestAnimationFrame(f);return f}var Ov,og=!1;var ig=N(()=>{Yu();fn();mr();Nv();pr();Ov=K(ae(),1)});function Lv(e){if(typeof window>"u"||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some((n)=>e.test(n.brand))||e.test(window.navigator.userAgent)}function EE(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Hs(e){let t=null;return()=>{if(t==null)t=e();return t}}var Ga,hX,TE,Wa,n7,r7,RE,sg,o7;var ma=N(()=>{Ga=Hs(function(){return EE(/^Mac/i)}),hX=Hs(function(){return EE(/^iPhone/i)}),TE=Hs(function(){return EE(/^iPad/i)||Ga()&&navigator.maxTouchPoints>1}),Wa=Hs(function(){return hX()||TE()}),n7=Hs(function(){return Ga()||Wa()}),r7=Hs(function(){return Lv(/AppleWebKit/i)&&!RE()}),RE=Hs(function(){return Lv(/Chrome/i)}),sg=Hs(function(){return Lv(/Android/i)}),o7=Hs(function(){return Lv(/Firefox/i)})});function _v(e){if(e.pointerType===""&&e.isTrusted)return!0;if(sg()&&e.pointerType)return e.type==="click"&&e.buttons===1;return e.detail===0&&!e.pointerType}function a7(e){return!sg()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var kE=N(()=>{ma()});function Ju(){return ip.useContext(mX)}function gX(e,t){let n=e.getAttribute("target");return(!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function ga(e,t,n=!0){let{metaKey:a,ctrlKey:i,altKey:l,shiftKey:c}=t;if(o7()&&window.event?.type?.startsWith("key")&&e.target==="_blank")if(Ga())a=!0;else i=!0;let u=r7()&&Ga()&&!TE()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:l,shiftKey:c}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:l,shiftKey:c,detail:1,bubbles:!0,cancelable:!0});ga.isOpening=n,Wr(e),e.dispatchEvent(u),ga.isOpening=!1}function bX(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");if(n.href=e.getAttribute("data-href"),e.hasAttribute("data-target"))n.target=e.getAttribute("data-target");if(e.hasAttribute("data-rel"))n.rel=e.getAttribute("data-rel");if(e.hasAttribute("data-download"))n.download=e.getAttribute("data-download");if(e.hasAttribute("data-ping"))n.ping=e.getAttribute("data-ping");if(e.hasAttribute("data-referrer-policy"))n.referrerPolicy=e.getAttribute("data-referrer-policy");e.appendChild(n),t(n),e.removeChild(n)}}function yX(e,t){bX(e,(n)=>ga(n,t))}function sp(e){let n=Ju().useHref(e?.href??""),a={};if(e){for(let i of["href","target","rel","download","ping","referrerPolicy"])if(i in e)a[i]=i==="href"?n:e[i]}return a}function i7(e,t,n,a){if(!t.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&gX(e.currentTarget,e)&&n)e.preventDefault(),t.open(e.currentTarget,e,n,a)}var ip,mX;var mc=N(()=>{Yu();ma();ip=K(ae(),1),mX=ip.createContext({isNative:!0,open:yX,useHref:(e)=>e});ga.isOpening=!1});function Bv(e,t){for(let n of AE)n(e,t)}function xX(e){return!(e.metaKey||!Ga()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Iv(e){if(Xu=!0,!ga.isOpening&&xX(e))Qu="keyboard",cg="keyboard",Bv("keyboard",e)}function lp(e){if(Qu="pointer",cg="pointerType"in e?e.pointerType:"mouse",e.type==="mousedown"||e.type==="pointerdown")Xu=!0,Bv("pointer",e)}function s7(e){if(!ga.isOpening&&_v(e))Xu=!0,Qu="virtual",cg="virtual"}function l7(e){let t=mn(ke(e)),n=rt(ke(e));if(ke(e)===t||ke(e)===n||og||!e.isTrusted)return;if(!Xu&&!ME)Qu="virtual",cg="virtual",Bv("virtual",e);Xu=!1,ME=!1}function c7(){if(og)return;Xu=!1,ME=!0}function NE(e){if(typeof window>"u"||typeof document>"u")return;let t=mn(e),n=rt(e);if(lg.get(t))return;let a=t.HTMLElement.prototype.focus;if(t.HTMLElement.prototype.focus=function(){Xu=!0,a.apply(this,arguments)},n.addEventListener("keydown",Iv,!0),n.addEventListener("keyup",Iv,!0),n.addEventListener("click",s7,!0),t.addEventListener("focus",l7,!0),t.addEventListener("blur",c7,!1),typeof PointerEvent<"u")n.addEventListener("pointerdown",lp,!0),n.addEventListener("pointermove",lp,!0),n.addEventListener("pointerup",lp,!0);t.addEventListener("beforeunload",()=>{u7(e)},{once:!0}),lg.set(t,{focus:a})}function $X(e){let t=rt(e),n;if(t.readyState!=="loading")NE(e);else n=()=>{NE(e)},t.addEventListener("DOMContentLoaded",n);return()=>u7(e,n)}function Gi(){return Qu!=="pointer"}function Zu(){return Qu}function ug(e){Qu=e,cg=e==="pointer"?"mouse":e,Bv(e,null)}function CX(e,t,n){let a=n?ke(n):void 0,i=rt(a),l=mn(a),c=typeof l<"u"?l.HTMLInputElement:HTMLInputElement,u=typeof l<"u"?l.HTMLTextAreaElement:HTMLTextAreaElement,f=typeof l<"u"?l.HTMLElement:HTMLElement,h=typeof l<"u"?l.KeyboardEvent:KeyboardEvent,m=Tt(i);return e=e||m instanceof c&&!SX.has(m.type)||m instanceof u||m instanceof f&&m.isContentEditable,!(e&&t==="keyboard"&&n instanceof h&&!vX[n.key])}function d7(e,t,n){NE(),OE.useEffect(()=>{if(n?.enabled===!1)return;let a=(i,l)=>{if(!CX(!!n?.isTextInput,i,l))return;e(Gi())};return AE.add(a),()=>{AE.delete(a)}},t)}var OE,Qu=null,cg="keyboard",AE,lg,Xu=!1,ME=!1,vX,u7=(e,t)=>{let n=mn(e),a=rt(e);if(t)a.removeEventListener("DOMContentLoaded",t);if(!lg.has(n))return;if(n.HTMLElement.prototype.focus=lg.get(n).focus,a.removeEventListener("keydown",Iv,!0),a.removeEventListener("keyup",Iv,!0),a.removeEventListener("click",s7,!0),n.removeEventListener("focus",l7,!0),n.removeEventListener("blur",c7,!1),typeof PointerEvent<"u")a.removeEventListener("pointerdown",lp,!0),a.removeEventListener("pointermove",lp,!0),a.removeEventListener("pointerup",lp,!0);lg.delete(n)},SX;var gc=N(()=>{fn();mr();ig();ma();kE();mc();OE=K(ae(),1),AE=new Set,lg=new Map,vX={Tab:!0,Escape:!0};if(typeof document<"u")$X();SX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function bc(e){if(Ga())return e.metaKey;return e.ctrlKey}function ed(e){return e instanceof HTMLInputElement&&!wX.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var wX;var dg=N(()=>{ma();wX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function gr(e){let t=cp.useRef(null);return EX(()=>{t.current=e},[e]),cp.useCallback((...n)=>{let a=t.current;return a?.(...n)},[])}var cp,EX;var td=N(()=>{pr();cp=K(ae(),1),EX=cp.default.useInsertionEffect??nt});function nd(e,t,n,a){let i=gr(n),l=n==null;f7.useEffect(()=>{if(l||!e.current)return;let c=e.current;return c.addEventListener(t,i,a),()=>{c.removeEventListener(t,i,a)}},[e,t,a,l])}var f7;var DE=N(()=>{td();f7=K(ae(),1)});function yc(e,t){let{id:n,"aria-label":a,"aria-labelledby":i}=e;if(n=Nn(n),i&&a)i=[...new Set([n,...i.trim().split(/\s+/)])].join(" ");else if(i)i=i.trim().split(/\s+/).join(" ");if(!a&&!i&&t)a=t;return{id:n,"aria-label":a,"aria-labelledby":i}}var fg=N(()=>{Ho()});function p7(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),a=typeof n.getTextInfo==="function"?n.getTextInfo():n.textInfo;if(a)return a.direction==="rtl";if(n.script)return TX.has(n.script)}let t=e.split("-")[0];return RX.has(t)}var TX,RX;var h7=N(()=>{TX=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),RX=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"])});function b7(){let e=typeof window<"u"&&window[g7]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:p7(e)?"rtl":"ltr"}}function m7(){PE=b7();for(let e of pg)e(PE)}function y7(){let e=Kr(),[t,n]=zv.useState(PE);if(zv.useEffect(()=>{if(pg.size===0)window.addEventListener("languagechange",m7);return pg.add(n),()=>{if(pg.delete(n),pg.size===0)window.removeEventListener("languagechange",m7)}},[]),e)return{locale:typeof window<"u"&&window[g7]||"en-US",direction:"ltr"};return t}var zv,g7,PE,pg;var v7=N(()=>{h7();pc();zv=K(ae(),1),g7=Symbol.for("react-aria.i18n.locale");PE=b7(),pg=new Set});function up(){let e=y7();return Hv.useContext(kX)||e}var Hv,kX;var Fv=N(()=>{v7();Hv=K(ae(),1),kX=Hv.default.createContext(null)});class dp{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,n])=>n)),this.defaultLocale=t}getStringForLocale(e,t){let a=this.getStringsForLocale(t)[e];if(!a)throw Error(`Could not find intl message ${e} in ${t} locale`);return a}getStringsForLocale(e){let t=this.strings[e];if(!t)t=NX(e,this.strings,this.defaultLocale),this.strings[e]=t;return t}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let t=window[AX];if(Uv===void 0){let a=window[MX];if(!a)return null;Uv={};for(let i in a)Uv[i]=new dp({[t]:a[i]},t)}let n=Uv?.[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}function NX(e,t,n="en-US"){if(t[e])return t[e];let a=OX(e);if(t[a])return t[a];for(let i in t)if(i.startsWith(a+"-"))return t[i];return t[n]}function OX(e){if(Intl.Locale)return new Intl.Locale(e).language;return e.split("-")[0]}var AX,MX,Uv=void 0;var x7=N(()=>{AX=Symbol.for("react-aria.i18n.locale"),MX=Symbol.for("react-aria.i18n.strings")});class Vv{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==="function"?n(t,this):n}plural(e,t,n="cardinal"){let a=t["="+e];if(a)return typeof a==="function"?a():a;let i=this.locale+":"+n,l=$7.get(i);if(!l)l=new Intl.PluralRules(this.locale,{type:n}),$7.set(i,l);let c=l.select(e);return a=t[c]||t.other,typeof a==="function"?a():a}number(e){let t=S7.get(this.locale);if(!t)t=new Intl.NumberFormat(this.locale),S7.set(this.locale,t);return t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==="function"?n():n}}var $7,S7;var C7=N(()=>{$7=new Map,S7=new Map});var w7=N(()=>{x7();C7()});function DX(e){let t=E7.get(e);if(!t)t=new dp(e),E7.set(e,t);return t}function PX(e,t){return t&&dp.getGlobalDictionaryForPackage(t)||DX(e)}function R7(e,t){let{locale:n}=up(),a=PX(e,t);return T7.useMemo(()=>new Vv(n,a),[n,a])}var T7,E7;var k7=N(()=>{Fv();w7();T7=K(ae(),1),E7=new WeakMap});function rd(e,t,n){let[a,i]=uo.useState(e||t),l=uo.useRef(a),c=uo.useRef(e!==void 0),u=e!==void 0;uo.useEffect(()=>{let b=c.current;if(b!==u)console.warn(`WARN: A component changed from ${b?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}.`);c.current=u},[u]);let f=u?e:a;LX(()=>{l.current=f});let[,h]=uo.useReducer(()=>({}),{}),m=uo.useCallback((b,...y)=>{let v=typeof b==="function"?b(l.current):b;if(!Object.is(l.current,v))l.current=v,i(v),h(),n?.(v,...y)},[n]);return[f,m]}var uo,LX;var jv=N(()=>{uo=K(ae(),1),LX=typeof document<"u"?uo.default.useInsertionEffect??uo.default.useLayoutEffect:()=>{}});var Kv,A7;var M7=N(()=>{Kv=K(ae(),1),A7=Kv.createContext(null)});function Ya(e){let t=(n,a)=>{if(od.useContext(_X))return null;return e(n,a)};return t.displayName=e.displayName||e.name,od.forwardRef(t)}var od,_X;var N7=N(()=>{od=K(ae(),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(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}});_X=od.createContext(!1)});var fp=N(()=>{N7()});var qv,Gv,vc;var LE=N(()=>{Gr();fp();qv=K(ae(),1),Gv=qv.createContext({}),vc=Ya(function(t,n){[t,n]=an(t,n,Gv);let{elementType:a="label",...i}=t,l=Ot[a];return qv.default.createElement(l,{className:"react-aria-Label",...i,ref:n})})});function mt(e,t={}){let{labelable:n,isLink:a,global:i,events:l=i,propNames:c}=t,u={};for(let f in e)if(Object.prototype.hasOwnProperty.call(e,f)&&(IX.has(f)||n&&BX.has(f)||a&&zX.has(f)||i&&HX.has(f)||l&&(O7.has(f)||f.endsWith("Capture")&&O7.has(f.slice(0,-7)))||c?.has(f)||FX.test(f)))u[f]=e[f];return u}var IX,BX,zX,HX,O7,FX;var Fs=N(()=>{IX=new Set(["id"]),BX=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),zX=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),HX=new Set(["dir","lang","hidden","inert","translate"]),O7=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"]),FX=/^(data-.*)$/});function D7(e){let{id:t,label:n,"aria-labelledby":a,"aria-label":i,labelElementType:l="label"}=e;t=Nn(t);let c=Nn(),u={};if(n)a=a?`${c} ${a}`:c,u={id:c,htmlFor:l==="label"?t:void 0};else if(!a&&!i)console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let f=yc({id:t,"aria-label":i,"aria-labelledby":a});return{labelProps:u,fieldProps:f}}var P7=N(()=>{Ho();fg()});var Ja=N(()=>{Fs()});var Wv,L7;var _7=N(()=>{Wv=K(ae(),1),L7=Wv.createContext(null)});function Yv(e,t="assertive",n=7000){if(!pp)if(pp=new I7,!(typeof IS_REACT_ACT_ENVIRONMENT==="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"))setTimeout(()=>{if(pp?.isAttached())pp?.announce(e,t,n)},100);else pp.announce(e,t,n);else pp.announce(e,t,n)}class I7{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(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){if(!this.node)return;document.body.removeChild(this.node),this.node=null}announce(e,t="assertive",n=7000){if(!this.node)return;let a=document.createElement("div");if(typeof e==="object")a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"]);else a.textContent=e;if(t==="assertive")this.assertiveLog?.appendChild(a);else this.politeLog?.appendChild(a);if(e!=="")setTimeout(()=>{a.remove()},n)}clear(e){if(!this.node)return;if((!e||e==="assertive")&&this.assertiveLog)this.assertiveLog.innerHTML="";if((!e||e==="polite")&&this.politeLog)this.politeLog.innerHTML=""}}var pp=null;var B7=()=>{};var z7=N(()=>{B7()});function H7(){if(typeof window>"u")return;function e(a){return"propertyName"in a}let t=(a)=>{let i=ke(a);if(!e(a)||!i)return;let l=xc.get(i);if(!l)l=new Set,xc.set(i,l),i.addEventListener("transitioncancel",n,{once:!0});l.add(a.propertyName)},n=(a)=>{let i=ke(a);if(!e(a)||!i)return;let l=xc.get(i);if(!l)return;if(l.delete(a.propertyName),l.size===0)i.removeEventListener("transitioncancel",n),xc.delete(i);if(xc.size===0){for(let c of _E)c();_E.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}function UX(){for(let[e]of xc)if("isConnected"in e&&!e.isConnected)xc.delete(e)}function Jv(e){requestAnimationFrame(()=>{if(UX(),xc.size===0)e();else _E.add(e)})}var xc,_E;var IE=N(()=>{fn();xc=new Map,_E=new Set;if(typeof document<"u")if(document.readyState!=="loading")H7();else document.addEventListener("DOMContentLoaded",H7)});function ba(e){if(!e.isConnected)return;let t=rt(e);if(Zu()==="virtual"){let n=Tt(t);Jv(()=>{let a=Tt(t);if((a===n||a===t.body)&&e.isConnected)Wr(e)})}else Wr(e)}var hp=N(()=>{Yu();fn();gc();mr();IE()});function ad(e){let{isDisabled:t,onFocus:n,onBlur:a,onFocusChange:i}=e,l=BE.useCallback((f)=>{if(ke(f)===f.currentTarget){if(a)a(f);if(i)i(!1);return!0}},[a,i]),c=Pv(l),u=BE.useCallback((f)=>{let h=ke(f),m=rt(h),b=m?Tt(m):Tt();if(h===f.currentTarget&&h===b){if(n)n(f);if(i)i(!0);c(f)}},[i,n,c]);return{focusProps:{onFocus:!t&&(n||i||a)?u:void 0,onBlur:!t&&(a||i)?l:void 0}}}var BE;var Xv=N(()=>{fn();mr();ig();BE=K(ae(),1)});function zE(e){if(!e)return;let t=!0;return(n)=>{let a={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){if(t)console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");else t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};if(e(a),t)n.stopPropagation()}}var F7=()=>{};function id(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:zE(e.onKeyDown),onKeyUp:zE(e.onKeyUp)}}}var Qv=N(()=>{F7()});function Zv(e,t){nt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{if(e.ref)e.ref.current=null}})}var HE=N(()=>{pr()});function VX(e){let t=Us.useContext(ex)||{};Zv(t,e);let{ref:n,...a}=t;return a}function $c(e,t){let{focusProps:n}=ad(e),{keyboardProps:a}=id(e),i=Le(n,a),l=VX(t),c=e.isDisabled?{}:l,u=Us.useRef(e.autoFocus);Us.useEffect(()=>{if(u.current&&t.current)ba(t.current);u.current=!1},[t]);let f=e.excludeFromTabOrder?-1:0;if(e.isDisabled)f=void 0;return{focusableProps:Le({...i,tabIndex:f},c)}}var Us,ex;var mp=N(()=>{hp();hr();Xv();Qv();HE();Us=K(ae(),1),ex=Us.default.createContext(null)});function U7(e){if(Wa()){if(gp==="default"){let t=rt(e);FE=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}gp="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";tx.set(e,e.style[t]),e.style[t]="none"}}function UE(e){if(Wa()){if(gp!=="disabled")return;gp="restoring",setTimeout(()=>{Jv(()=>{if(gp==="restoring"){let t=rt(e);if(t.documentElement.style.webkitUserSelect==="none")t.documentElement.style.webkitUserSelect=FE||"";FE="",gp="default"}})},300)}else if(e instanceof HTMLElement||e instanceof SVGElement){if(e&&tx.has(e)){let t=tx.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";if(e.style[n]==="none")e.style[n]=t;if(e.getAttribute("style")==="")e.removeAttribute("style");tx.delete(e)}}}var gp="default",FE="",tx;var V7=N(()=>{mr();ma();IE();tx=new WeakMap});function j7(e){return e?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}function nx(e){let t=e??(typeof document<"u"?document:void 0);if(!t)return j7(t);if(VE.has(t))return VE.get(t);let n=t.querySelector('meta[property="csp-nonce"]'),a=n&&n instanceof mn(n).HTMLMetaElement&&(n.nonce||n.content)||j7(t)||void 0;if(a!==void 0)VE.set(t,a);return a}var VE;var jE=N(()=>{mr();VE=new WeakMap});var K7,hg;var KE=N(()=>{K7=K(ae(),1),hg=K7.default.createContext({register:()=>{}});hg.displayName="PressResponderContext"});function Cc(){let e=Sc.useRef(new Map),t=Sc.useCallback((i,l,c,u)=>{let f=u?.once?(...h)=>{e.current.delete(c),c(...h)}:c;e.current.set(c,{type:l,eventTarget:i,fn:f,options:u}),i.addEventListener(l,f,u)},[]),n=Sc.useCallback((i,l,c,u)=>{let f=e.current.get(c)?.fn||c;i.removeEventListener(l,f,u),e.current.delete(c)},[]),a=Sc.useCallback(()=>{e.current.forEach((i,l)=>{n(i.eventTarget,i.type,l,i.options)})},[n]);return Sc.useEffect(()=>a,[a]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:a}}var Sc;var mg=N(()=>{Sc=K(ae(),1)});function KX(e){let t=Vn.useContext(hg);if(t){let{register:n,ref:a,...i}=t;e=Le(i,e),n()}return Zv(t,e.ref),e}class gg{#e;constructor(e,t,n,a){this.#e=!0;let l=(a?.target??n.currentTarget)?.getBoundingClientRect(),c,u=0,f,h=null;if(n.clientX!=null&&n.clientY!=null)f=n.clientX,h=n.clientY;if(l)if(f!=null&&h!=null)c=f-l.left,u=h-l.top;else c=l.width/2,u=l.height/2;this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=c,this.y=u,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}function wc(e){let{onPress:t,onPressChange:n,onPressStart:a,onPressEnd:i,onPressUp:l,onClick:c,isDisabled:u,isPressed:f,preventFocusOnPress:h,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:b,ref:y,...v}=KX(e),[S,w]=Vn.useState(!1),E=Vn.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:T,removeAllGlobalListeners:D}=Cc(),H=Vn.useCallback((_,U)=>{let W=E.current;if(u||W.didFirePressStart)return!1;let Q=!0;if(W.isTriggeringEvent=!0,a){let pe=new gg("pressstart",U,_);a(pe),Q=pe.shouldStopPropagation}if(n)n(!0);return W.isTriggeringEvent=!1,W.didFirePressStart=!0,w(!0),Q},[u,a,n]),z=Vn.useCallback((_,U,W=!0)=>{let Q=E.current;if(!Q.didFirePressStart)return!1;Q.didFirePressStart=!1,Q.isTriggeringEvent=!0;let pe=!0;if(i){let re=new gg("pressend",U,_);i(re),pe=re.shouldStopPropagation}if(n)n(!1);if(w(!1),t&&W&&!u){let re=new gg("press",U,_);t(re),pe&&=re.shouldStopPropagation}return Q.isTriggeringEvent=!1,pe},[u,i,n,t]),L=gr(z),J=Vn.useCallback((_,U)=>{let W=E.current;if(u)return!1;if(l){W.isTriggeringEvent=!0;let Q=new gg("pressup",U,_);return l(Q),W.isTriggeringEvent=!1,Q.shouldStopPropagation}return!0},[u,l]),V=gr(J),P=Vn.useCallback((_)=>{let U=E.current;if(U.isPressed&&U.target){if(U.didFirePressStart&&U.pointerType!=null)z(sd(U.target,_),U.pointerType,!1);if(U.isPressed=!1,U.isOverTarget=!1,U.activePointerId=null,U.pointerType=null,D(),!b)UE(U.target);for(let W of U.disposables)W();U.disposables=[]}},[b,D,z]),te=gr(P);Vn.useEffect(()=>{if(u&&E.current.isPressed)te({currentTarget:E.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[u]);let Y=Vn.useCallback((_)=>{if(m)P(_)},[m,P]),ge=Vn.useCallback((_)=>{if(u)return;c?.(_)},[u,c]),ue=Vn.useCallback((_,U)=>{if(u)return;if(c){let W=new MouseEvent("click",_);Dv(W,U),c(ag(W))}},[u,c]),ie=Vn.useMemo(()=>{let _=E.current,U={onKeyDown(Q){if(qE(Q.nativeEvent,Q.currentTarget)&&yt(Q.currentTarget,ke(Q))){if(Y7(ke(Q),Q.key))Q.preventDefault();let pe=!0;if(!_.isPressed&&!Q.repeat)_.target=Q.currentTarget,_.isPressed=!0,_.pointerType="keyboard",pe=H(Q,"keyboard");let re=Q.currentTarget,k=(X)=>{if(qE(X,re)&&!X.repeat&&yt(re,ke(X))&&_.target)V(sd(_.target,X),"keyboard")};if(T(rt(Q.currentTarget),"keyup",qa(k,W),!0),pe)Q.stopPropagation();if(Q.metaKey&&Ga())_.metaKeyEvents?.set(Q.key,Q.nativeEvent)}else if(Q.key==="Meta")_.metaKeyEvents=new Map},onClick(Q){if(Q&&!yt(Q.currentTarget,ke(Q)))return;if(Q&&Q.button===0&&!_.isTriggeringEvent&&!ga.isOpening){let pe=!0;if(u)Q.preventDefault();if(!_.ignoreEmulatedMouseEvents&&!_.isPressed&&(_.pointerType==="virtual"||_v(Q.nativeEvent))){let re=H(Q,"virtual"),k=V(Q,"virtual"),X=L(Q,"virtual");ge(Q),pe=re&&k&&X}else if(_.isPressed&&_.pointerType!=="keyboard"){let re=_.pointerType||Q.nativeEvent.pointerType||"virtual",k=V(sd(Q.currentTarget,Q),re),X=L(sd(Q.currentTarget,Q),re,!0);pe=k&&X,_.isOverTarget=!1,ge(Q),te(Q)}if(_.ignoreEmulatedMouseEvents=!1,pe)Q.stopPropagation()}}},W=(Q)=>{if(_.isPressed&&_.target&&qE(Q,_.target)){if(Y7(ke(Q),Q.key))Q.preventDefault();let pe=ke(Q),re=yt(_.target,pe);if(L(sd(_.target,Q),"keyboard",re),re)ue(Q,_.target);if(D(),Q.key!=="Enter"&&GE(_.target)&&yt(_.target,pe)&&!Q[q7])Q[q7]=!0,ga(_.target,Q,!1);_.isPressed=!1,_.metaKeyEvents?.delete(Q.key)}else if(Q.key==="Meta"&&_.metaKeyEvents?.size){let pe=_.metaKeyEvents;_.metaKeyEvents=void 0;for(let re of pe.values())_.target?.dispatchEvent(new KeyboardEvent("keyup",re))}};if(typeof PointerEvent<"u"){U.onPointerDown=(re)=>{if(re.button!==0||!yt(re.currentTarget,ke(re)))return;if(a7(re.nativeEvent)){_.pointerType="virtual";return}_.pointerType=re.pointerType;let k=!0;if(!_.isPressed){if(_.isPressed=!0,_.isOverTarget=!0,_.activePointerId=re.pointerId,_.target=re.currentTarget,!b)U7(_.target);k=H(re,_.pointerType);let X=ke(re);if("releasePointerCapture"in X)if("hasPointerCapture"in X){if(X.hasPointerCapture(re.pointerId))X.releasePointerCapture(re.pointerId)}else X.releasePointerCapture(re.pointerId);T(rt(re.currentTarget),"pointerup",Q,!1),T(rt(re.currentTarget),"pointercancel",pe,!1)}if(k)re.stopPropagation()},U.onMouseDown=(re)=>{if(!yt(re.currentTarget,ke(re)))return;if(re.button===0){if(h){let k=t7(re.target);if(k)_.disposables.push(k)}re.stopPropagation()}},U.onPointerUp=(re)=>{if(!yt(re.currentTarget,ke(re))||_.pointerType==="virtual")return;if(re.button===0&&!_.isPressed)V(re,_.pointerType||re.pointerType)},U.onPointerEnter=(re)=>{if(re.pointerId===_.activePointerId&&_.target&&!_.isOverTarget&&_.pointerType!=null)_.isOverTarget=!0,H(sd(_.target,re),_.pointerType)},U.onPointerLeave=(re)=>{if(re.pointerId===_.activePointerId&&_.target&&_.isOverTarget&&_.pointerType!=null)_.isOverTarget=!1,L(sd(_.target,re),_.pointerType,!1),Y(re)};let Q=(re)=>{if(re.pointerId===_.activePointerId&&_.isPressed&&re.button===0&&_.target){if(yt(_.target,ke(re))&&_.pointerType!=null){let k=!1,X=setTimeout(()=>{if(_.isPressed&&_.target instanceof HTMLElement)if(k)te(re);else Wr(_.target),_.target.click()},80);T(re.currentTarget,"click",()=>k=!0,!0),_.disposables.push(()=>clearTimeout(X))}else te(re);_.isOverTarget=!1}},pe=(re)=>{te(re)};U.onDragStart=(re)=>{if(!yt(re.currentTarget,ke(re)))return;te(re)}}return U},[T,u,h,D,b,Y,H,ge,ue]);return Vn.useEffect(()=>{if(!y)return;let _=rt(y.current);if(!_||!_.head||_.getElementById(G7))return;let U=_.createElement("style");U.id=G7;let W=nx(_);if(W)U.nonce=W;U.textContent=`
|
|
236
|
+
@layer {
|
|
237
|
+
[${W7}] {
|
|
238
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
`.trim(),_.head.prepend(U)},[y]),Vn.useEffect(()=>{let _=E.current;return()=>{if(!b)UE(_.target??void 0);for(let U of _.disposables)U();_.disposables=[]}},[b]),{isPressed:f||S,pressProps:Le(v,ie,{[W7]:!0})}}function GE(e){return e.tagName==="A"&&e.hasAttribute("href")}function qE(e,t){let{key:n,code:a}=e,i=t,l=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||a==="Space")&&!(i instanceof mn(i).HTMLInputElement&&!J7(i,n)||i instanceof mn(i).HTMLTextAreaElement||i.isContentEditable)&&!((l==="link"||!l&&GE(i))&&n!=="Enter")}function sd(e,t){let{clientX:n,clientY:a}=t;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:a,key:t.key}}function qX(e){if(e instanceof HTMLInputElement)return!1;if(e instanceof HTMLButtonElement)return e.type!=="submit"&&e.type!=="reset";if(GE(e))return!1;return!0}function Y7(e,t){if(e instanceof HTMLInputElement)return!J7(e,t);return qX(e)}function J7(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":GX.has(e.type)}var jX,Vn,q7,G7="react-aria-pressable-style",W7="data-react-aria-pressable",GX;var bg=N(()=>{rp();ig();V7();Yu();fn();jE();mr();ma();kE();hr();mc();KE();td();mg();HE();jX=K(jr(),1),Vn=K(ae(),1);q7=Symbol("linkClicked");GX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function WE(e,t){let{elementType:n="button",isDisabled:a,onPress:i,onPressStart:l,onPressEnd:c,onPressUp:u,onPressChange:f,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:b,href:y,target:v,rel:S,type:w="button"}=e,E;if(n==="button")E={type:w,disabled:a,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value};else E={role:"button",href:n==="a"&&!a?y:void 0,target:n==="a"?v:void 0,type:n==="input"?w:void 0,disabled:n==="input"?a:void 0,"aria-disabled":!a||n==="input"?void 0:a,rel:n==="a"?S:void 0};let{pressProps:T,isPressed:D}=wc({onPressStart:l,onPressEnd:c,onPressChange:f,onPress:i,onPressUp:u,onClick:b,isDisabled:a,preventFocusOnPress:h,ref:t}),{focusableProps:H}=$c(e,t);if(m)H.tabIndex=a?-1:H.tabIndex;let z=Le(H,T,mt(e,{labelable:!0}));return{isPressed:D,buttonProps:Le(E,z,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}var X7=N(()=>{Fs();hr();mp();bg()});var Q7=N(()=>{X7()});function bp(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:a,onFocusWithinChange:i}=e,l=yg.useRef({isFocusWithin:!1}),{addGlobalListener:c,removeAllGlobalListeners:u}=Cc(),f=yg.useCallback((b)=>{if(!yt(b.currentTarget,ke(b)))return;if(l.current.isFocusWithin&&!yt(b.currentTarget,b.relatedTarget)){if(l.current.isFocusWithin=!1,u(),n)n(b);if(i)i(!1)}},[n,i,l,u]),h=Pv(f),m=yg.useCallback((b)=>{if(!yt(b.currentTarget,ke(b)))return;let y=ke(b),v=rt(y),S=Tt(v);if(!l.current.isFocusWithin&&S===y){if(a)a(b);if(i)i(!0);l.current.isFocusWithin=!0,h(b);let w=b.currentTarget;c(v,"focus",(E)=>{let T=ke(E);if(l.current.isFocusWithin&&!yt(w,T)){let D=new v.defaultView.FocusEvent("blur",{relatedTarget:T});Dv(D,w);let H=ag(D);f(H)}},{capture:!0})}},[a,i,h,c,f]);if(t)return{focusWithinProps:{onFocus:void 0,onBlur:void 0}};return{focusWithinProps:{onFocus:m,onBlur:f}}}var yg;var rx=N(()=>{ig();fn();mr();mg();yg=K(ae(),1)});function Uo(e={}){let{autoFocus:t=!1,isTextInput:n,within:a}=e,i=Ec.useRef({isFocused:!1,isFocusVisible:t||Gi()}),[l,c]=Ec.useState(!1),[u,f]=Ec.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=Ec.useCallback(()=>f(i.current.isFocused&&i.current.isFocusVisible),[]),m=Ec.useCallback((v)=>{i.current.isFocused=v,i.current.isFocusVisible=Gi(),c(v),h()},[h]);d7((v)=>{i.current.isFocusVisible=v,h()},[n,l],{enabled:l,isTextInput:n});let{focusProps:b}=ad({isDisabled:a,onFocusChange:m}),{focusWithinProps:y}=bp({isDisabled:!a,onFocusWithinChange:m});return{isFocused:l,isFocusVisible:u,focusProps:a?y:b}}var Ec;var Z7=N(()=>{gc();Xv();rx();Ec=K(ae(),1)});var yp=N(()=>{Z7()});function WX(){YE=!0,setTimeout(()=>{YE=!1},500)}function eP(e){if(e.pointerType==="touch")WX()}function YX(){let e=rt(null);if(typeof e>"u")return;if(ox===0){if(typeof PointerEvent<"u")e.addEventListener("pointerup",eP)}return ox++,()=>{if(ox--,ox>0)return;if(typeof PointerEvent<"u")e.removeEventListener("pointerup",eP)}}function br(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:a,isDisabled:i}=e,[l,c]=Vs.useState(!1),u=Vs.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Vs.useEffect(YX,[]);let{addGlobalListener:f,removeAllGlobalListeners:h}=Cc(),{hoverProps:m,triggerHoverEnd:b}=Vs.useMemo(()=>{let y=(w,E)=>{if(u.pointerType=E,i||E==="touch"||u.isHovered||!yt(w.currentTarget,ke(w)))return;u.isHovered=!0;let T=w.currentTarget;if(u.target=T,f(rt(ke(w)),"pointerover",(D)=>{if(u.isHovered&&u.target&&!yt(u.target,ke(D)))v(D,D.pointerType)},{capture:!0}),t)t({type:"hoverstart",target:T,pointerType:E});if(n)n(!0);c(!0)},v=(w,E)=>{let T=u.target;if(u.pointerType="",u.target=null,E==="touch"||!u.isHovered||!T)return;if(u.isHovered=!1,h(),a)a({type:"hoverend",target:T,pointerType:E});if(n)n(!1);c(!1)},S={};if(typeof PointerEvent<"u")S.onPointerEnter=(w)=>{if(YE&&w.pointerType==="mouse")return;y(w,w.pointerType)},S.onPointerLeave=(w)=>{if(!i&&yt(w.currentTarget,ke(w)))v(w,w.pointerType)};return{hoverProps:S,triggerHoverEnd:v}},[t,n,a,i,u,f,h]);return Vs.useEffect(()=>{if(i)b({currentTarget:u.target},u.pointerType)},[i]),{hoverProps:m,isHovered:l}}var Vs,YE=!1,ox=0;var ax=N(()=>{fn();mr();mg();Vs=K(ae(),1)});var ld=N(()=>{ax()});var JE=N(()=>{Ho()});function XX(e,t){if(t){for(let n in e)if(n.startsWith("on")&&!JX.test(n))e[n]=void 0;e.href=void 0,e.target=void 0}return e}var js,cd,Xa,JX;var ix=N(()=>{Gr();_7();z7();Q7();fp();Ja();ha();yp();ld();JE();js=K(ae(),1),cd=js.createContext({}),Xa=Ya(function(t,n){[t,n]=an(t,n,cd);let a=t,{isPending:i}=a,{buttonProps:l,isPressed:c}=WE(t,n);l=XX(l,i);let{focusProps:u,isFocused:f,isFocusVisible:h}=Uo(t),{hoverProps:m,isHovered:b}=br({...t,isDisabled:t.isDisabled||i}),y={isHovered:b,isPressed:(a.isPressed||c)&&!i,isFocused:f,isFocusVisible:h,isDisabled:t.isDisabled||!1,isPending:i??!1},v=Yt({...t,values:y,defaultClassName:"react-aria-Button"}),S=Nn(l.id),w=Nn(),E=l["aria-labelledby"];if(i){if(E)E=`${E} ${w}`;else if(l["aria-label"])E=`${S} ${w}`}let T=js.useRef(i);js.useEffect(()=>{let H={"aria-labelledby":E||S};if(!T.current&&f&&i)Yv(H,"assertive");else if(T.current&&f&&!i)Yv(H,"assertive");T.current=i},[i,f,E,S]);let D=mt(t,{global:!0});return delete D.onClick,js.default.createElement(Ot.button,{...Le(D,v,l,u,m),type:l.type==="submit"&&i?"button":l.type,id:S,ref:n,"aria-labelledby":E,slot:t.slot||void 0,"aria-disabled":i?"true":l["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":y.isPressed||void 0,"data-hovered":b||void 0,"data-focused":f||void 0,"data-pending":i||void 0,"data-focus-visible":h||void 0},js.default.createElement(L7.Provider,{value:{id:w}},v.children))}),JX=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/});var sx,tP;var nP=N(()=>{sx=K(ae(),1),tP=sx.createContext({})});var vp,Tc,Wi;var xp=N(()=>{Gr();vp=K(ae(),1),Tc=vp.createContext({}),Wi=vp.forwardRef(function(t,n){[t,n]=an(t,n,Tc);let{elementType:a="span",...i}=t,l=Ot[a];return vp.default.createElement(l,{className:"react-aria-Text",...i,ref:n})})});function Yi(e,t){if(!e)return!1;let n=window.getComputedStyle(e),a=document.scrollingElement||document.documentElement,i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);if(e===a&&n.overflow!=="hidden")i=!0;if(i&&t)i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth;return i}var vg=()=>{};function xg(e,t){let n=e;if(Yi(n,t))n=n.parentElement;while(n&&!Yi(n,t))n=n.parentElement;return n||document.scrollingElement||document.documentElement}var XE=N(()=>{vg()});function lx(e,t){let n=[],a=document.scrollingElement||document.documentElement;while(e){if(Yi(e,t))n.push(e);if(e===a)break;e=e.parentElement}return n}var rP=N(()=>{vg()});function $g(e,t,n={}){let{block:a="nearest",inline:i="nearest"}=n;if(e===t)return;let{scrollTop:l,scrollLeft:c}=e,u=t.getBoundingClientRect(),f=e.getBoundingClientRect(),h=window.getComputedStyle(t),m=window.getComputedStyle(e),b=document.scrollingElement||document.documentElement,y=e===b,v=e===b?0:f.top,S=e===b?e.clientHeight:f.bottom,w=e===b?0:f.left,E=e===b?e.clientWidth:f.right,T=parseFloat(h.scrollMarginTop)||0,D=parseFloat(h.scrollMarginBottom)||0,H=parseFloat(h.scrollMarginLeft)||0,z=parseFloat(h.scrollMarginRight)||0,L=parseFloat(m.scrollPaddingTop)||0,J=parseFloat(m.scrollPaddingBottom)||0,V=parseFloat(m.scrollPaddingLeft)||0,P=parseFloat(m.scrollPaddingRight)||0,te=parseFloat(m.borderTopWidth)||0,Y=parseFloat(m.borderBottomWidth)||0,ge=parseFloat(m.borderLeftWidth)||0,ue=parseFloat(m.borderRightWidth)||0,ie=u.top-T,_=u.bottom+D,U=u.left-H,W=u.right+z,Q=e===b?0:ge+ue,pe=e===b?0:te+Y,re=e===b?0:e.offsetWidth-e.clientWidth-Q,k=e===b?0:e.offsetHeight-e.clientHeight-pe,X=v+(y?0:te)+L,de=S-(y?0:Y)-J-k,xe=w+(y?0:ge)+V,Re=E-(y?0:ue)-P;if(m.direction==="rtl"&&!Wa())xe+=re;else Re-=re;let Ke=ie<X||_>de,Ce=U<xe||W>Re;if(Ke&&a==="start")l+=ie-X;else if(Ke&&a==="center")l+=(ie+_)/2-(X+de)/2;else if(Ke&&a==="end")l+=_-de;else if(Ke&&a==="nearest"){let Je=ie-X,he=_-de;l+=Math.abs(Je)<=Math.abs(he)?Je:he}if(Ce&&i==="start")c+=U-xe;else if(Ce&&i==="center")c+=(U+W)/2-(xe+Re)/2;else if(Ce&&i==="end")c+=W-Re;else if(Ce&&i==="nearest"){let Je=U-xe,he=W-Re;c+=Math.abs(Je)<=Math.abs(he)?Je:he}e.scrollTo({left:c,top:l})}function QE(e,t={}){let{containingElement:n}=t;if(e&&e.isConnected){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow!=="hidden"){let{left:l,top:c}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:u,top:f}=e.getBoundingClientRect();if(Math.abs(l-u)>1||Math.abs(c-f)>1)n?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"})}else{let{left:l,top:c}=e.getBoundingClientRect(),u=lx(e,!0);for(let m of u)$g(m,e);let{left:f,top:h}=e.getBoundingClientRect();if(Math.abs(l-f)>1||Math.abs(c-h)>1){u=n?lx(n,!0):[];for(let m of u)$g(m,n,{block:"center",inline:"center"});for(let m of lx(e,!0))$g(m,e)}}}}var oP=N(()=>{rP();ma()});function iP(e){let[t,n]=aP.useState();return nt(()=>{if(!e)return;let a=ZE.get(e);if(!a){let i=`react-aria-description-${QX++}`;n(i);let l=document.createElement("div");l.id=i,l.style.display="none",l.textContent=e,document.body.appendChild(l),a={refCount:0,element:l},ZE.set(e,a)}else n(a.element.id);return a.refCount++,()=>{if(a&&--a.refCount===0)a.element.remove(),ZE.delete(e)}},[e]),{"aria-describedby":e?t:void 0}}var aP,QX=0,ZE;var sP=N(()=>{pr();aP=K(ae(),1),ZE=new Map});function ZX(e={}){let{style:t,isFocusable:n}=e,[a,i]=$p.useState(!1),{focusWithinProps:l}=bp({isDisabled:!n,onFocusWithinChange:(u)=>i(u)}),c=$p.useMemo(()=>{if(a)return t;else if(t)return{...lP,...t};else return lP},[a]);return{visuallyHiddenProps:{...l,style:c}}}function cP(e){let{children:t,elementType:n="div",isFocusable:a,style:i,...l}=e,{visuallyHiddenProps:c}=ZX(e);return $p.default.createElement(n,Le(l,c),t)}var $p,lP;var uP=N(()=>{hr();rx();$p=K(ae(),1),lP={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 Qa,Sg,ud,eQ;var eT=N(()=>{Gr();xp();Ja();Qa=K(ae(),1),Sg=Qa.createContext(null),ud=Qa.forwardRef(function(t,n){if(!Qa.useContext(Sg)?.isInvalid)return null;return Qa.default.createElement(eQ,{...t,ref:n})}),eQ=Qa.forwardRef((e,t)=>{let n=Qa.useContext(Sg),{elementType:a,...i}=e,l=mt(i,{global:!0}),c=Yt({...i,defaultClassName:"react-aria-FieldError",defaultChildren:n.validationErrors.length===0?void 0:n.validationErrors.join(" "),values:n});if(c.children==null)return null;return Qa.default.createElement(Wi,{slot:"errorMessage",elementType:a,...l,...c,ref:t})})});function aT(e){if(e[nT]){let{realtimeValidation:t,displayValidation:n,updateValidation:a,resetValidation:i,commitValidation:l}=e[nT];return{realtimeValidation:t,displayValidation:n,updateValidation:a,resetValidation:i,commitValidation:l}}return tQ(e)}function tQ(e){let{isInvalid:t,validationState:n,name:a,value:i,builtinValidation:l,validate:c,validationBehavior:u="aria"}=e;if(n)t||=n==="invalid";let f=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:fP}:null,h=ir.useMemo(()=>{if(!c||i==null)return null;let Y=nQ(c,i);return dP(Y)},[c,i]);if(l?.validationDetails.valid)l=void 0;let m=ir.useContext(pP),b=ir.useMemo(()=>{if(a)return Array.isArray(a)?a.flatMap((Y)=>rT(m[Y])):rT(m[a]);return[]},[m,a]),[y,v]=ir.useState(m),[S,w]=ir.useState(!1);if(m!==y)v(m),w(!1);let E=ir.useMemo(()=>dP(S?[]:b),[S,b]),T=ir.useRef(Sp),[D,H]=ir.useState(Sp),z=ir.useRef(Sp),L=()=>{if(!J)return;V(!1);let Y=h||l||T.current;if(!tT(Y,z.current))z.current=Y,H(Y)},[J,V]=ir.useState(!1);return ir.useEffect(L),{realtimeValidation:f||E||h||l||Sp,displayValidation:u==="native"?f||E||D:f||E||h||l||D,updateValidation(Y){if(u==="aria"&&!tT(D,Y))H(Y);else T.current=Y},resetValidation(){let Y=Sp;if(!tT(Y,z.current))z.current=Y,H(Y);if(u==="native")V(!1);w(!0)},commitValidation(){if(u==="native")V(!0);w(!0)}}}function rT(e){if(!e)return[];return Array.isArray(e)?e:[e]}function nQ(e,t){if(typeof e==="function"){let n=e(t);if(n&&typeof n!=="boolean")return rT(n)}return[]}function dP(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:fP}:null}function tT(e,t){if(e===t)return!0;return!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,a)=>n===t.validationErrors[a])&&Object.entries(e.validationDetails).every(([n,a])=>t.validationDetails[n]===a)}var ir,oT,fP,Sp,pP,nT="__reactAriaFormValidationState";var hP=N(()=>{ir=K(ae(),1),oT={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},fP={...oT,customError:!0,valid:!1},Sp={isInvalid:!1,validationDetails:oT,validationErrors:[]},pP=ir.createContext({})});var mP=N(()=>{hP()});var cx,gP;var bP=N(()=>{cx=K(ae(),1),gP=cx.createContext(null)});function yP(e){let{description:t,errorMessage:n,isInvalid:a,validationState:i}=e,{labelProps:l,fieldProps:c}=D7(e),u=pa([Boolean(t),Boolean(n),a,i]),f=pa([Boolean(t),Boolean(n),a,i]);return c=Le(c,{"aria-describedby":[u,f,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:l,fieldProps:c,descriptionProps:{id:u},errorMessageProps:{id:f}}}var vP=N(()=>{P7();hr();Ho()});function $P(e,t,n){let a=gr((i)=>{if(n&&!i.defaultPrevented)n(t)});xP.useEffect(()=>{let i=e?.current?.form;return i?.addEventListener("reset",a),()=>{i?.removeEventListener("reset",a)}},[e])}var xP;var SP=N(()=>{td();xP=K(ae(),1)});function CP(e,t,n){let{validationBehavior:a,focus:i}=e;nt(()=>{if(a==="native"&&n?.current&&!n.current.disabled){let h=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";if(n.current.setCustomValidity(h),!n.current.hasAttribute("title"))n.current.title="";if(!t.realtimeValidation.isInvalid)t.updateValidation(oQ(n.current))}});let l=ux.useRef(!1),c=gr(()=>{if(!l.current)t.resetValidation()}),u=gr((h)=>{if(!t.displayValidation.isInvalid)t.commitValidation();let m=n?.current?.form;if(!h.defaultPrevented&&n&&m&&aQ(m)===n.current){if(i)i();else n.current?.focus();ug("keyboard")}h.preventDefault()}),f=gr(()=>{t.commitValidation()});ux.useEffect(()=>{let h=n?.current;if(!h)return;let m=h.form,b=m?.reset;if(m)m.reset=()=>{l.current=!window.event||window.event.type==="message"&&ke(window.event)instanceof MessagePort,b?.call(m),l.current=!1};return h.addEventListener("invalid",u),h.addEventListener("change",f),m?.addEventListener("reset",c),()=>{if(h.removeEventListener("invalid",u),h.removeEventListener("change",f),m?.removeEventListener("reset",c),m)m.reset=b}},[n,a])}function rQ(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function oQ(e){return{isInvalid:!e.validity.valid,validationDetails:rQ(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function aQ(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(n.validity?.valid===!1)return n}return null}var ux;var wP=N(()=>{fn();gc();td();pr();ux=K(ae(),1)});var dx,EP;var TP=N(()=>{dx=K(ae(),1),EP=dx.createContext({})});var fx,px,iQ=(e)=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:a,...i}=e;return i},dd;var iT=N(()=>{Gr();fp();ha();yp();ld();fx=K(ae(),1),px=fx.createContext({}),dd=Ya(function(t,n){[t,n]=an(t,n,px);let{hoverProps:a,isHovered:i}=br({...t,isDisabled:t.disabled}),{isFocused:l,isFocusVisible:c,focusProps:u}=Uo({isTextInput:!0,autoFocus:t.autoFocus}),f=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",h=Yt({...t,values:{isHovered:i,isFocused:l,isFocusVisible:c,isDisabled:t.disabled||!1,isInvalid:f},defaultClassName:"react-aria-Input"});return fx.default.createElement(Ot.input,{...Le(iQ(t),u,a),...h,ref:n,"data-focused":l||void 0,"data-disabled":t.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":c||void 0,"data-invalid":f||void 0})})});class Vo{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let a=this.clone();return t.addDescendants(a,e),a}}function kP(e,t,n,a){if(n==null)return[null,null];let i=null,l=null,c=e.getItem(n);while(c!=null){let u=c.filter(e,t,a);if(u!=null){if(u.nextKey=null,l)u.prevKey=l.key,l.nextKey=u.key;if(i==null)i=u;t.addNode(u),l=u}c=c.nextKey!=null?e.getItem(c.nextKey):null}if(l&&l.type==="separator"){let u=l.prevKey;if(t.removeNode(l.key),u!=null)l=t.getItem(u),l.nextKey=null;else l=null}return[i?.key??null,l?.key??null]}var hx,RP,mx,Cp,gx,sT;var lT=N(()=>{hx=class hx extends Vo{filter(e,t,n){let[a,i]=kP(e,t,this.firstChildKey,n),l=this.clone();return l.firstChildKey=a,l.lastChildKey=i,l}};RP=class RP extends Vo{static{this.type="header"}};mx=class mx extends Vo{static{this.type="loader"}};Cp=class Cp extends hx{static{this.type="item"}filter(e,t,n){if(n(this.textValue,this)){let a=this.clone();return t.addDescendants(a,e),a}return null}};gx=class gx extends hx{static{this.type="section"}filter(e,t,n){let a=super.filter(e,t,n);if(a){if(a.lastChildKey!==null){let i=e.getItem(a.lastChildKey);if(i&&i.type!=="header")return a}}return null}};sT=class sT{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;while(e)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),a=n?.firstChildKey!=null?t.get(n.firstChildKey):null;while(a)yield a,a=a.nextKey!=null?t.get(a.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){t=this.keyMap.get(t.prevKey);while(t&&t.type!=="item"&&t.lastChildKey!=null)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;while(t){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;while(e?.lastChildKey!=null)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error("Not implemented")}clone(){let t=new this.constructor;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error("Cannot add a node to a frozen collection");if(e.type==="item"&&this.keyMap.get(e.key)==null)this.itemCount++;this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let a of n)this.addDescendants(a,t)}removeNode(e){if(this.frozen)throw Error("Cannot remove a node to a frozen collection");let t=this.keyMap.get(e);if(t!=null&&t.type==="item")this.itemCount--;this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,a]=kP(this,t,this.firstKey,e);return t?.commit(n,a),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}});function Cg(e){let{children:t,items:n,idScope:a,addIdAndValue:i,dependencies:l=[]}=e,c=wp.useMemo(()=>typeof t==="function"?t.toString():void 0,[t]),u=wp.useMemo(()=>new WeakMap,[...l,c]);return wp.useMemo(()=>{if(n&&typeof t==="function"){let f=[];for(let h of n){let m=sQ(h)?h:null,b=m?u.get(m):null;if(!b){b=t(h);let y=b.props.id??h?.key??h?.id;if(a!=null&&b.props.id==null&&y!=null)y=a+":"+y;let v=y??f.length;if(b=wp.cloneElement(b,i?{key:v,id:y,value:h}:{key:v}),m)u.set(m,b)}f.push(b)}return f}else if(typeof t!=="function")return t},[t,n,u,a,i])}function sQ(e){switch(typeof e){case"object":return e!=null;case"function":case"symbol":return!0;default:return!1}}var wp;var cT=N(()=>{wp=K(ae(),1)});var Ep=Ui(function(lQ){var jo=K(ae());(function(){function e(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}function t(y,v){h||jo.startTransition===void 0||(h=!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 S=v();if(!m){var w=v();i(S,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}w=l({inst:{value:S,getSnapshot:v}});var E=w[0].inst,T=w[1];return u(function(){E.value=S,E.getSnapshot=v,n(E)&&T({inst:E})},[y,S,v]),c(function(){return n(E)&&T({inst:E}),y(function(){n(E)&&T({inst:E})})},[y]),f(S),S}function n(y){var v=y.getSnapshot;y=y.value;try{var S=v();return!i(y,S)}catch(w){return!0}}function a(y,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=typeof Object.is==="function"?Object.is:e,l=jo.useState,c=jo.useEffect,u=jo.useLayoutEffect,f=jo.useDebugValue,h=!1,m=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:t;lQ.useSyncExternalStore=jo.useSyncExternalStore!==void 0?jo.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});function cQ(e,t,n){let a=Kr(),i=At.useRef(a);i.current=a;let l=At.useCallback(()=>i.current?n():t(),[t,n]);return NP.useSyncExternalStore(e,l)}function uQ(e){return class extends Vo{static{this.type=e}}}function dQ(e,t,n,a,i,l){if(typeof e==="string")e=uQ(e);let c=At.useCallback((f)=>{f?.setProps(t,n,e,a,l)},[t,n,a,l,e]),u=At.useContext(dT);if(u){let f=u.ownerDocument.nodesByProps.get(t);if(!f)f=u.ownerDocument.createElement(e.type),f.setProps(t,n,e,a,l),u.appendChild(f),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(t,f);return i?At.default.createElement(dT.Provider,{value:f},i):null}return At.default.createElement(e.type,{ref:c},i)}function Ji(e,t){let n=({node:i})=>t(i.props,i.props.ref,i),a=At.forwardRef((i,l)=>{let c=At.useContext(ex);if(!At.useContext(OP)){if(t.length>=3)throw Error(t.name+" cannot be rendered outside a collection.");return t(i,l)}return dQ(e,i,l,"children"in i?i.children:null,null,(f)=>At.default.createElement(ex.Provider,{value:c},At.default.createElement(n,{node:f})))});return a.displayName=t.name,a}function fQ(e){return Cg({...e,addIdAndValue:!0})}function fT(e){let t=At.useContext(AP),n=(t?.dependencies||[]).concat(e.dependencies),a=e.idScope??t?.idScope,i=fQ({...e,idScope:a,dependencies:n});if(At.useContext(uT))i=At.default.createElement(pQ,null,i);return t=At.useMemo(()=>({dependencies:n,idScope:a}),[a,...n]),At.default.createElement(AP.Provider,{value:t},i)}function pQ({children:e}){let t=At.useContext(uT),n=At.useMemo(()=>At.default.createElement(uT.Provider,{value:null},At.default.createElement(OP.Provider,{value:!0},e)),[e]);return Kr()?At.default.createElement(dT.Provider,{value:t},n):MP.createPortal(n,t)}var MP,At,NP,OP,uT,Qme,dT,AP;var pT=N(()=>{lT();cT();mp();pc();MP=K(jr(),1),At=K(ae(),1),NP=K(Ep(),1),OP=At.createContext(!1),uT=At.createContext(null);Qme=typeof At.default.useSyncExternalStore==="function"?At.default.useSyncExternalStore:cQ,dT=At.createContext(null);AP=At.createContext(null)});var wg=N(()=>{pT()});var PP=N(()=>{cT()});function LP(e,t,n){return Cg({items:t?e.getChildren(t.key):e,dependencies:[n],children(a){if(a.type==="content")return fo.default.createElement(fo.default.Fragment,null);let i=a.render(a);if(!n||a.type!=="item")return i;return fo.default.createElement(fo.default.Fragment,null,n({type:"item",key:a.key,dropPosition:"before"}),i,hQ(e,a,n))}})}function hQ(e,t,n){let a=t.key,i=e.getKeyAfter(a),l=i!=null?e.getItem(i):null;while(l!=null&&l.type!=="item")i=e.getKeyAfter(l.key),l=i!=null?e.getItem(i):null;let c=t.nextKey!=null?e.getItem(t.nextKey):null;while(c!=null&&c.type!=="item")c=c.nextKey!=null?e.getItem(c.nextKey):null;let u=[];if(c==null){let f=t;while(f?.type==="item"&&(!l||f.parentKey!==l.parentKey&&l.level<f.level)){let h=n({type:"item",key:f.key,dropPosition:"after"});if(fo.isValidElement(h))u.push(fo.cloneElement(h,{key:`${f.key}-after`}));f=f.parentKey!=null?e.getItem(f.parentKey):null}}return u}function gT(e){return fo.useMemo(()=>e!=null?new Set([e]):null,[e])}var fo,mT,Eg;var bT=N(()=>{PP();fo=K(ae(),1),mT={CollectionRoot({collection:e,renderDropIndicator:t}){return LP(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return LP(e,t,n)}};Eg=fo.createContext(mT)});var fd,_P;var IP=N(()=>{fd=K(ae(),1),_P=fd.createContext({})});var Tg=N(()=>{lT()});function BP(e){let t=Ks.useRef({});return Ks.default.createElement(gQ.Provider,{value:t},e.children)}var mQ,Ks,gQ;var zP=N(()=>{mQ=K(jr(),1),Ks=K(ae(),1),gQ=Ks.createContext(null)});var bx,Tp;var yx=N(()=>{bx=K(ae(),1),Tp=bx.createContext({isSelected:!1})});function yT(e){let t=mt(e,{labelable:!0}),n;if(e.orientation==="vertical")n="vertical";if(e.elementType!=="hr")return{separatorProps:{...t,role:"separator","aria-orientation":n}};return{separatorProps:t}}var HP=N(()=>{Fs()});var FP=N(()=>{HP()});var vx,UP,VP,vT;var jP=N(()=>{Gr();FP();Tg();wg();Ja();ha();vx=K(ae(),1),UP=vx.createContext({});VP=class VP extends Vo{static{this.type="separator"}filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!=="separator"){let a=this.clone();return t.addDescendants(a,e),a}return null}};vT=Ji(VP,function(t,n){[t,n]=an(t,n,UP);let{elementType:a,orientation:i,style:l,className:c,slot:u,...f}=t,h=a||"hr";if(h==="hr"&&i==="vertical")h="div";let m=Ot[h],{separatorProps:b}=yT({...f,elementType:a,orientation:i}),y=mt(t,{global:!0});return vx.default.createElement(m,{render:t.render,...Le(y,b),style:l,className:c??"react-aria-Separator",ref:n,slot:u||void 0})})});function bQ(e){if(typeof e==="string")return e.replace(/\s*/g,"");return""+e}function KP(e,t){let n=xT.get(e);if(!n)throw Error("Unknown list");return`${n.id}-option-${bQ(t)}`}var xT;var qP=N(()=>{xT=new WeakMap});class GP{constructor(e,t,n,a){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=(l)=>{if(l.nodeType===Node.ELEMENT_NODE){let c=l.shadowRoot;if(c){let u=this._doc.createTreeWalker(c,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else if(typeof this.filter==="function")return this.filter(l);else if(this.filter?.acceptNode)return this.filter.acceptNode(l);else if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=a??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let l=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}get currentNode(){return this._currentNode}set currentNode(e){if(!yt(this.root,e))throw Error("Cannot set currentNode to a node that is not contained by the root node.");let t=[],n=e,a=e;this._currentNode=e;while(n&&n!==this.root)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let l=n,c=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});t.push(c),c.currentNode=a,this._currentSetFor.add(c),n=a=l.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=a,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();if(!yt(e,t))return this.currentNode=e,null;if(t)this.currentNode=t;return t}lastChild(){let t=this._walkerStack[0].lastChild();if(t)this.currentNode=t;return t}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let n;if(typeof this.filter==="function")n=this.filter(e);else if(this.filter?.acceptNode)n=this.filter.acceptNode(e);if(n===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let a=this.nextNode();if(a)this.currentNode=a;return a}if(e)this.currentNode=e;return e}else if(this._walkerStack.length>1){this._walkerStack.shift();let t=this.nextNode();if(t)this.currentNode=t;return t}else return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();if(n)this.currentNode=n;return n}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){let a;if(typeof this.filter==="function")a=this.filter(t);else if(this.filter?.acceptNode)a=this.filter.acceptNode(t);if(a===NodeFilter.FILTER_ACCEPT){if(t)this.currentNode=t;return t}let i=this.lastChild();if(i)this.currentNode=i;return i}if(t)this.currentNode=t;return t}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();if(n)this.currentNode=n;return n}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function xx(e,t,n,a){if(Fo())return new GP(e,t,n,a);return e.createTreeWalker(t,n,a)}var $T=N(()=>{fn();Ev()});function XP(e){let{children:t,contain:n,restoreFocus:a,autoFocus:i}=e,l=Sn.useRef(null),c=Sn.useRef(null),u=Sn.useRef([]),{parentNode:f}=Sn.useContext(WP)||{},h=Sn.useMemo(()=>new Sx({scopeRef:u}),[u]);nt(()=>{let y=f||jn.root;if(jn.getTreeNode(y.scopeRef)&&Zt&&!$x(Zt,y.scopeRef)){let v=jn.getTreeNode(Zt);if(v)y=v}y.addChild(h),jn.addNode(h)},[h,f]),nt(()=>{let y=jn.getTreeNode(u);if(y)y.contain=!!n},[n]),nt(()=>{let y=l.current?.nextSibling,v=[],S=(w)=>w.stopPropagation();while(y&&y!==c.current)v.push(y),y.addEventListener(ST,S),y=y.nextSibling;return u.current=v,()=>{for(let w of v)w.removeEventListener(ST,S)}},[t]),CQ(u,a,n),$Q(u,n),wQ(u,a,n),SQ(u,i),Sn.useEffect(()=>{let y=Tt(rt(u.current?u.current[0]:void 0)),v=null;if(va(y,u.current)){for(let S of jn.traverse())if(S.scopeRef&&va(y,S.scopeRef.current))v=S;if(v===jn.getTreeNode(u))Zt=v.scopeRef}},[u]),nt(()=>()=>{let y=jn.getTreeNode(u)?.parent?.scopeRef??null;if((u===Zt||$x(u,Zt))&&(!y||jn.getTreeNode(y)))Zt=y;jn.removeTreeNode(u)},[u]);let m=Sn.useMemo(()=>yQ(u),[]),b=Sn.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return Sn.default.createElement(WP.Provider,{value:b},Sn.default.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:l}),t,Sn.default.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:c}))}function yQ(e){return{focusNext(t={}){let n=e.current,{from:a,tabbable:i,wrap:l,accept:c}=t,u=a||Tt(rt(n[0]??void 0)),f=n[0].previousElementSibling,h=pd(n),m=ya(h,{tabbable:i,accept:c},n);m.currentNode=va(u,n)?u:f;let b=m.nextNode();if(!b&&l)m.currentNode=f,b=m.nextNode();if(b)qs(b,!0);return b},focusPrevious(t={}){let n=e.current,{from:a,tabbable:i,wrap:l,accept:c}=t,u=a||Tt(rt(n[0]??void 0)),f=n[n.length-1].nextElementSibling,h=pd(n),m=ya(h,{tabbable:i,accept:c},n);m.currentNode=va(u,n)?u:f;let b=m.previousNode();if(!b&&l)m.currentNode=f,b=m.previousNode();if(b)qs(b,!0);return b},focusFirst(t={}){let n=e.current,{tabbable:a,accept:i}=t,l=pd(n),c=ya(l,{tabbable:a,accept:i},n);c.currentNode=n[0].previousElementSibling;let u=c.nextNode();if(u)qs(u,!0);return u},focusLast(t={}){let n=e.current,{tabbable:a,accept:i}=t,l=pd(n),c=ya(l,{tabbable:a,accept:i},n);c.currentNode=n[n.length-1].nextElementSibling;let u=c.previousNode();if(u)qs(u,!0);return u}}}function pd(e){return e[0].parentElement}function Rg(e){let t=jn.getTreeNode(Zt);while(t&&t.scopeRef!==e){if(t.contain)return!1;t=t.parent}return!0}function vQ(e){if(!e.form)return Array.from(rt(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter((a)=>!a.form);let t=e.form.elements.namedItem(e.name),n=mn(e);if(t instanceof n.RadioNodeList)return Array.from(t).filter((a)=>a instanceof n.HTMLInputElement);if(t instanceof n.HTMLInputElement)return[t];return[]}function xQ(e){if(e.checked)return!0;let t=vQ(e);return t.length>0&&!t.some((n)=>n.checked)}function $Q(e,t){let n=Sn.useRef(void 0),a=Sn.useRef(void 0);nt(()=>{let i=e.current;if(!t){if(a.current)cancelAnimationFrame(a.current),a.current=void 0;return}let l=rt(i?i[0]:void 0),c=(h)=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Rg(e)||h.isComposing)return;let m=Tt(l),b=e.current;if(!b||!va(m,b))return;let y=pd(b),v=ya(y,{tabbable:!0},b);if(!m)return;v.currentNode=m;let S=h.shiftKey?v.previousNode():v.nextNode();if(!S)v.currentNode=h.shiftKey?b[b.length-1].nextElementSibling:b[0].previousElementSibling,S=h.shiftKey?v.previousNode():v.nextNode();if(h.preventDefault(),S){if(qs(S,!0),S instanceof mn(S).HTMLInputElement)S.select()}},u=(h)=>{if((!Zt||$x(Zt,e))&&va(ke(h),e.current))Zt=e,n.current=ke(h);else if(Rg(e)&&!Rc(ke(h),e)){if(n.current)n.current.focus();else if(Zt&&Zt.current)CT(Zt.current)}else if(Rg(e))n.current=ke(h)},f=(h)=>{if(a.current)cancelAnimationFrame(a.current);a.current=requestAnimationFrame(()=>{let m=Zu(),b=(m==="virtual"||m===null)&&sg()&&RE(),y=Tt(l);if(!b&&y&&Rg(e)&&!Rc(y,e)){Zt=e;let v=ke(h);if(v&&v.isConnected)n.current=v,n.current?.focus();else if(Zt.current)CT(Zt.current)}})};return l.addEventListener("keydown",c,!1),l.addEventListener("focusin",u,!1),i?.forEach((h)=>h.addEventListener("focusin",u,!1)),i?.forEach((h)=>h.addEventListener("focusout",f,!1)),()=>{l.removeEventListener("keydown",c,!1),l.removeEventListener("focusin",u,!1),i?.forEach((h)=>h.removeEventListener("focusin",u,!1)),i?.forEach((h)=>h.removeEventListener("focusout",f,!1))}},[e,t]),nt(()=>()=>{if(a.current)cancelAnimationFrame(a.current)},[a])}function QP(e){return Rc(e)}function va(e,t){if(!e)return!1;if(!t)return!1;return t.some((n)=>yt(n,e))}function Rc(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of jn.traverse(jn.getTreeNode(t)))if(n&&va(e,n.current))return!0;return!1}function ZP(e){return Rc(e,Zt)}function $x(e,t){let n=jn.getTreeNode(t)?.parent;while(n){if(n.scopeRef===e)return!0;n=n.parent}return!1}function qs(e,t=!1){if(e!=null&&!t)try{ba(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function e9(e,t=!0){let n=e[0].previousElementSibling,a=pd(e),i=ya(a,{tabbable:t},e);i.currentNode=n;let l=i.nextNode();if(t&&!l)a=pd(e),i=ya(a,{tabbable:!1},e),i.currentNode=n,l=i.nextNode();return l}function CT(e,t=!0){qs(e9(e,t))}function SQ(e,t){let n=Sn.default.useRef(t);Sn.useEffect(()=>{if(n.current){Zt=e;let a=rt(e.current?e.current[0]:void 0);if(!va(Tt(a),Zt.current)&&e.current)CT(e.current)}n.current=!1},[e])}function CQ(e,t,n){nt(()=>{if(t||n)return;let a=e.current,i=rt(a?a[0]:void 0),l=(c)=>{let u=ke(c);if(va(u,e.current))Zt=e;else if(!QP(u))Zt=null};return i.addEventListener("focusin",l,!1),a?.forEach((c)=>c.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),a?.forEach((c)=>c.removeEventListener("focusin",l,!1))}},[e,t,n])}function YP(e){let t=jn.getTreeNode(Zt);while(t&&t.scopeRef!==e){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function wQ(e,t,n){let a=Sn.useRef(typeof document<"u"?Tt(rt(e.current?e.current[0]:void 0)):null);nt(()=>{let i=e.current,l=rt(i?i[0]:void 0);if(!t||n)return;let c=()=>{if((!Zt||$x(Zt,e))&&va(Tt(l),e.current))Zt=e};return l.addEventListener("focusin",c,!1),i?.forEach((u)=>u.addEventListener("focusin",c,!1)),()=>{l.removeEventListener("focusin",c,!1),i?.forEach((u)=>u.removeEventListener("focusin",c,!1))}},[e,n]),nt(()=>{let i=rt(e.current?e.current[0]:void 0);if(!t)return;let l=(c)=>{if(c.key!=="Tab"||c.altKey||c.ctrlKey||c.metaKey||!Rg(e)||c.isComposing)return;let u=i.activeElement;if(!Rc(u,e)||!YP(e))return;let f=jn.getTreeNode(e);if(!f)return;let h=f.nodeToRestore,m=ya(i.body,{tabbable:!0});m.currentNode=u;let b=c.shiftKey?m.previousNode():m.nextNode();if(!h||!h.isConnected||h===i.body)h=void 0,f.nodeToRestore=void 0;if((!b||!Rc(b,e))&&h){m.currentNode=h;do b=c.shiftKey?m.previousNode():m.nextNode();while(Rc(b,e));if(c.preventDefault(),c.stopPropagation(),b)qs(b,!0);else if(!QP(h))u.blur();else qs(h,!0)}};if(!n)i.addEventListener("keydown",l,!0);return()=>{if(!n)i.removeEventListener("keydown",l,!0)}},[e,t,n]),nt(()=>{let i=rt(e.current?e.current[0]:void 0);if(!t)return;let l=jn.getTreeNode(e);if(!l)return;return l.nodeToRestore=a.current??void 0,()=>{let c=jn.getTreeNode(e);if(!c)return;let u=c.nodeToRestore,f=Tt(i);if(t&&u&&(f&&Rc(f,e)||f===i.body&&YP(e))){let h=jn.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let m=h.getTreeNode(e);while(m){if(m.nodeToRestore&&m.nodeToRestore.isConnected){JP(m.nodeToRestore);return}m=m.parent}m=h.getTreeNode(e);while(m){if(m.scopeRef&&m.scopeRef.current&&jn.getTreeNode(m.scopeRef)){let b=e9(m.scopeRef.current,!0);JP(b);return}m=m.parent}}})}}},[e,t])}function JP(e){if(e.dispatchEvent(new CustomEvent(ST,{bubbles:!0,cancelable:!0})))qs(e)}function ya(e,t,n){let a=t?.tabbable?Mv:Av,i=e?.nodeType===Node.ELEMENT_NODE?e:null,l=rt(i),c=xx(l,e||l,NodeFilter.SHOW_ELEMENT,{acceptNode(u){if(yt(t?.from,u))return NodeFilter.FILTER_REJECT;if(t?.tabbable&&u.tagName==="INPUT"&&u.getAttribute("type")==="radio"){if(!xQ(u))return NodeFilter.FILTER_REJECT;if(c.currentNode.tagName==="INPUT"&&c.currentNode.type==="radio"&&c.currentNode.name===u.name)return NodeFilter.FILTER_REJECT}if(a(u)&&(!n||va(u,n))&&(!t?.accept||t.accept(u)))return NodeFilter.FILTER_ACCEPT;return NodeFilter.FILTER_SKIP}});if(t?.from)c.currentNode=t.from;return c}class wT{constructor(){this.fastMap=new Map,this.root=new Sx({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let a=this.fastMap.get(t??null);if(!a)return;let i=new Sx({scopeRef:e});if(a.addChild(i),i.parent=a,this.fastMap.set(e,i),n)i.nodeToRestore=n}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let i of this.traverse())if(i!==t&&t.nodeToRestore&&i.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&va(i.nodeToRestore,t.scopeRef.current))i.nodeToRestore=t.nodeToRestore;let a=t.children;if(n){if(n.removeChild(t),a.size>0)a.forEach((i)=>n&&n.addChild(i))}this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null)yield e;if(e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new wT;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class Sx{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}var Sn,WP,ST="react-aria-focus-scope-restore",Zt=null,jn;var kg=N(()=>{$T();hp();fn();gc();mr();ma();Nv();pr();Sn=K(ae(),1),WP=Sn.default.createContext(null);jn=new wT});function Ag(e){return n7()?e.altKey:e.ctrlKey}function Cx(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,a=e.current?.dataset.collection;if(a)n=`[data-collection="${CSS.escape(a)}"]${n}`;return e.current?.querySelector(n)}function n9(e){let t=Nn();return t9.set(e,t),t}function r9(e){return t9.get(e)}var t9;var ET=N(()=>{ma();Ho();t9=new WeakMap});function a9(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:a}=e,i=o9.useRef({search:"",timeout:void 0}).current,l=(c)=>{let u=TQ(c.key);if(!u||c.ctrlKey||c.metaKey||!yt(c.currentTarget,ke(c))||i.search.length===0&&u===" ")return;if(u===" "&&i.search.trim().length>0){if(c.preventDefault(),!("continuePropagation"in c))c.stopPropagation()}if(i.search+=u,t.getKeyForSearch!=null){let f=t.getKeyForSearch(i.search,n.focusedKey);if(f==null)f=t.getKeyForSearch(i.search);if(f!=null){if(n.setFocusedKey(f),a)a(f)}}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},EQ)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?l:void 0}}}function TQ(e){if(e.length===1||!/^[A-Z]/i.test(e))return e;return""}var o9,EQ=1000;var i9=N(()=>{fn();o9=K(ae(),1)});function RT(e,t){let n=TT.useRef(!0),a=TT.useRef(null);nt(()=>(n.current=!0,()=>{n.current=!1}),[]),nt(()=>{if(n.current)n.current=!1;else if(!a.current||t.some((i,l)=>!Object.is(i,a[l])))e();a.current=t},t)}var TT;var s9=N(()=>{pr();TT=K(ae(),1)});function c9(e){let{selectionManager:t,keyboardDelegate:n,ref:a,autoFocus:i=!1,shouldFocusWrap:l=!1,disallowEmptySelection:c=!1,disallowSelectAll:u=!1,escapeKeyBehavior:f="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:b,allowsTabNavigation:y=!1,scrollRef:v=a,linkBehavior:S="action"}=e,{direction:w}=up(),E=Ju(),T=(_)=>{if(_.altKey&&_.key==="Tab")_.preventDefault();if(!a.current||!yt(a.current,ke(_)))return;let U=(W,Q)=>{if(W!=null){if(t.isLink(W)&&S==="selection"&&h&&!Ag(_)){l9.flushSync(()=>{t.setFocusedKey(W,Q)});let pe=Cx(a,W),re=t.getItemProps(W);if(pe)E.open(pe,_,re.href,re.routerOptions);return}if(t.setFocusedKey(W,Q),t.isLink(W)&&S==="override")return;if(_.shiftKey&&t.selectionMode==="multiple")t.extendSelection(W);else if(h&&!Ag(_))t.replaceSelection(W)}};switch(_.key){case"ArrowDown":if(n.getKeyBelow){let W=t.focusedKey!=null?n.getKeyBelow?.(t.focusedKey):n.getFirstKey?.();if(W==null&&l)W=n.getFirstKey?.(t.focusedKey);if(W!=null)_.preventDefault(),U(W)}break;case"ArrowUp":if(n.getKeyAbove){let W=t.focusedKey!=null?n.getKeyAbove?.(t.focusedKey):n.getLastKey?.();if(W==null&&l)W=n.getLastKey?.(t.focusedKey);if(W!=null)_.preventDefault(),U(W)}break;case"ArrowLeft":if(n.getKeyLeftOf){let W=t.focusedKey!=null?n.getKeyLeftOf?.(t.focusedKey):n.getFirstKey?.();if(W==null&&l)W=w==="rtl"?n.getFirstKey?.(t.focusedKey):n.getLastKey?.(t.focusedKey);if(W!=null)_.preventDefault(),U(W,w==="rtl"?"first":"last")}break;case"ArrowRight":if(n.getKeyRightOf){let W=t.focusedKey!=null?n.getKeyRightOf?.(t.focusedKey):n.getFirstKey?.();if(W==null&&l)W=w==="rtl"?n.getLastKey?.(t.focusedKey):n.getFirstKey?.(t.focusedKey);if(W!=null)_.preventDefault(),U(W,w==="rtl"?"last":"first")}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&_.shiftKey)return;_.preventDefault();let W=n.getFirstKey(t.focusedKey,bc(_));if(t.setFocusedKey(W),W!=null){if(bc(_)&&_.shiftKey&&t.selectionMode==="multiple")t.extendSelection(W);else if(h)t.replaceSelection(W)}}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&_.shiftKey)return;_.preventDefault();let W=n.getLastKey(t.focusedKey,bc(_));if(t.setFocusedKey(W),W!=null){if(bc(_)&&_.shiftKey&&t.selectionMode==="multiple")t.extendSelection(W);else if(h)t.replaceSelection(W)}}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let W=n.getKeyPageBelow(t.focusedKey);if(W!=null)_.preventDefault(),U(W)}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let W=n.getKeyPageAbove(t.focusedKey);if(W!=null)_.preventDefault(),U(W)}break;case"a":if(bc(_)&&t.selectionMode==="multiple"&&u!==!0)_.preventDefault(),t.selectAll();break;case"Escape":if(f==="clearSelection"&&!c&&t.selectedKeys.size!==0)_.stopPropagation(),_.preventDefault(),t.clearSelection();break;case"Tab":if(!y){if(_.shiftKey)a.current.focus();else{let W=ya(a.current,{tabbable:!0}),Q=void 0,pe;do if(pe=W.lastChild(),pe)Q=pe;while(pe);let re=Tt();if(Q&&(!rg(Q)||re&&!Mv(re)))Wr(Q)}break}}},D=Za.useRef({top:0,left:0});nd(v,"scroll",()=>{D.current={top:v.current?.scrollTop??0,left:v.current?.scrollLeft??0}});let H=(_)=>{if(t.isFocused){if(!yt(_.currentTarget,ke(_)))t.setFocused(!1);return}if(!yt(_.currentTarget,ke(_)))return;if(t.setFocused(!0),t.focusedKey==null){let U=(Q)=>{if(Q!=null){if(t.setFocusedKey(Q),h&&!t.isSelected(Q))t.replaceSelection(Q)}},W=_.relatedTarget;if(W&&_.currentTarget.compareDocumentPosition(W)&Node.DOCUMENT_POSITION_FOLLOWING)U(t.lastSelectedKey??n.getLastKey?.());else U(t.firstSelectedKey??n.getFirstKey?.())}else if(v.current)v.current.scrollTop=D.current.top,v.current.scrollLeft=D.current.left;if(t.focusedKey!=null&&v.current){let U=Cx(a,t.focusedKey);if(U instanceof HTMLElement){if(!rg(U)&&!b)Wr(U);if(Zu()==="keyboard")QE(U,{containingElement:a.current})}}},z=(_)=>{if(!yt(_.currentTarget,_.relatedTarget))t.setFocused(!1)},L=Za.useRef(!1);nd(a,Y6,!b?void 0:(_)=>{let{detail:U}=_;if(_.stopPropagation(),t.setFocused(!0),U?.focusStrategy==="first")L.current=!0}),RT(()=>{if(L.current){let _=n.getFirstKey?.()??null;if(_==null){let U=Tt();if(Tv(a.current),SE(U,null),t.collection.size>0)L.current=!1}else t.setFocusedKey(_),L.current=!1}},[t.collection]),RT(()=>{if(t.collection.size>0)L.current=!1},[t.focusedKey]),nd(a,W6,!b?void 0:(_)=>{if(_.stopPropagation(),t.setFocused(!1),_.detail?.clearFocusKey)t.setFocusedKey(null)});let J=Za.useRef(i),V=Za.useRef(!1);Za.useEffect(()=>{if(J.current){let _=null;if(i==="first")_=n.getFirstKey?.()??null;if(i==="last")_=n.getLastKey?.()??null;let U=t.selectedKeys;if(U.size){for(let W of U)if(t.canSelectItem(W)){_=W;break}}if(t.setFocused(!0),t.setFocusedKey(_),_==null&&!b&&a.current)ba(a.current);if(t.collection.size>0)J.current=!1,V.current=!0}});let P=Za.useRef(t.focusedKey),te=Za.useRef(null);Za.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==P.current||V.current)&&v.current&&a.current){let _=Zu(),U=Cx(a,t.focusedKey);if(!(U instanceof HTMLElement))return;if(_==="keyboard"||V.current){if(te.current)cancelAnimationFrame(te.current);te.current=requestAnimationFrame(()=>{if(v.current){if($g(v.current,U),_!=="virtual")QE(U,{containingElement:a.current})}})}}if(!b&&t.isFocused&&t.focusedKey==null&&P.current!=null&&a.current)ba(a.current);P.current=t.focusedKey,V.current=!1}),Za.useEffect(()=>()=>{if(te.current)cancelAnimationFrame(te.current)},[]),nd(a,"react-aria-focus-scope-restore",(_)=>{_.preventDefault(),t.setFocused(!0)});let Y={onKeyDown:T,onFocus:H,onBlur:z,onMouseDown(_){if(v.current===ke(_))_.preventDefault()}},{typeSelectProps:ge}=a9({keyboardDelegate:n,selectionManager:t});if(!m)Y=Le(ge,Y);let ue=void 0;if(!b)ue=t.focusedKey==null?0:-1;let ie=n9(t.collection);return{collectionProps:Le(Y,{tabIndex:ue,"data-collection":ie})}}var l9,Za;var u9=N(()=>{J6();CE();hp();Yu();fn();kg();gc();ET();dg();Nv();hr();oP();DE();Fv();mc();i9();s9();l9=K(jr(),1),Za=K(ae(),1)});function f9(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:a,onLongPress:i,threshold:l=RQ,accessibilityDescription:c}=e,u=d9.useRef(void 0),{addGlobalListener:f,removeGlobalListener:h}=Cc(),{pressProps:m}=wc({isDisabled:t,onPressStart(y){if(y.continuePropagation(),y.pointerType==="mouse"||y.pointerType==="touch"){if(n)n({...y,type:"longpressstart"});if(u.current=setTimeout(()=>{if(y.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),rt(y.target).activeElement!==y.target)Wr(y.target);if(i)i({...y,type:"longpress"});u.current=void 0},l),y.pointerType==="touch"){let v=(w)=>{w.preventDefault()},S=mn(y.target);f(y.target,"contextmenu",v,{once:!0}),f(S,"pointerup",()=>{setTimeout(()=>{h(y.target,"contextmenu",v)},30)},{once:!0})}}},onPressEnd(y){if(u.current)clearTimeout(u.current);if(a&&(y.pointerType==="mouse"||y.pointerType==="touch"))a({...y,type:"longpressend"})}}),b=iP(i&&!t?c:void 0);return{longPressProps:Le(m,b)}}var d9,RQ=500;var p9=N(()=>{Yu();mr();hr();sP();mg();bg();d9=K(ae(),1)});function Rp(e){let{id:t,selectionManager:n,key:a,ref:i,shouldSelectOnPressUp:l,shouldUseVirtualFocus:c,focus:u,isDisabled:f,onAction:h,allowsDifferentPressOrigin:m,linkBehavior:b="action"}=e,y=Ju();t=Nn(t);let v=(k)=>{if(k.pointerType==="keyboard"&&Ag(k))n.toggleSelection(a);else{if(n.selectionMode==="none")return;if(n.isLink(a)){if(b==="selection"&&i.current){let X=n.getItemProps(a);y.open(i.current,k,X.href,X.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(b==="override"||b==="none")return}if(n.selectionMode==="single")if(n.isSelected(a)&&!n.disallowEmptySelection)n.toggleSelection(a);else n.replaceSelection(a);else if(k&&k.shiftKey)n.extendSelection(a);else if(n.selectionBehavior==="toggle"||k&&(bc(k)||k.pointerType==="touch"||k.pointerType==="virtual"))n.toggleSelection(a);else n.replaceSelection(a)}};hd.useEffect(()=>{if(a===n.focusedKey&&n.isFocused)if(!c){if(u)u();else if(Tt()!==i.current&&i.current)ba(i.current)}else Tv(i.current)},[i,a,n.focusedKey,n.childFocusStrategy,n.isFocused,c]),f=f||n.isDisabled(a);let S={};if(!c&&!f)S={tabIndex:a===n.focusedKey?0:-1,onFocus(k){if(ke(k)===i.current)n.setFocusedKey(a)}};else if(f)S.onMouseDown=(k)=>{k.preventDefault()};hd.useEffect(()=>{if(f&&n.focusedKey===a)n.setFocusedKey(null)},[n,f,a]);let w=n.isLink(a)&&b==="override",E=h&&e.UNSTABLE_itemBehavior==="action",T=n.isLink(a)&&b!=="selection"&&b!=="none",D=!f&&n.canSelectItem(a)&&!w&&!E,H=(h||T)&&!f,z=H&&(n.selectionBehavior==="replace"?!D:!D||n.isEmpty),L=H&&D&&n.selectionBehavior==="replace",J=z||L,V=hd.useRef(null),P=J&&D,te=hd.useRef(!1),Y=hd.useRef(!1),ge=n.getItemProps(a),ue=(k)=>{if(h)h(),i.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}));if(T&&i.current)y.open(i.current,k,ge.href,ge.routerOptions)},ie={ref:i};if(l)if(ie.onPressStart=(k)=>{if(V.current=k.pointerType,te.current=P,k.pointerType==="keyboard"&&(!J||m9(k.key)))v(k)},!m)ie.onPress=(k)=>{if(z||L&&k.pointerType!=="mouse"){if(k.pointerType==="keyboard"&&!h9(k.key))return;ue(k)}else if(k.pointerType!=="keyboard"&&D)v(k)};else ie.onPressUp=z?void 0:(k)=>{if(k.pointerType==="mouse"&&D)v(k)},ie.onPress=z?ue:(k)=>{if(k.pointerType!=="keyboard"&&k.pointerType!=="mouse"&&D)v(k)};else ie.onPressStart=(k)=>{if(V.current=k.pointerType,te.current=P,Y.current=z,D&&(k.pointerType==="mouse"&&!z||k.pointerType==="keyboard"&&(!H||m9(k.key))))v(k)},ie.onPress=(k)=>{if(k.pointerType==="touch"||k.pointerType==="pen"||k.pointerType==="virtual"||k.pointerType==="keyboard"&&J&&h9(k.key)||k.pointerType==="mouse"&&Y.current){if(J)ue(k);else if(D)v(k)}};if(S["data-collection"]=r9(n.collection),S["data-key"]=a,ie.preventFocusOnPress=c,c)ie=Le(ie,{onPressStart(k){if(k.pointerType!=="touch")n.setFocused(!0),n.setFocusedKey(a)},onPress(k){if(k.pointerType==="touch")n.setFocused(!0),n.setFocusedKey(a)}});if(ge){for(let k of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])if(ge[k])ie[k]=qa(ie[k],ge[k])}let{pressProps:_,isPressed:U}=wc(ie),W=L?(k)=>{if(V.current==="mouse")k.stopPropagation(),k.preventDefault(),ue(k)}:void 0,{longPressProps:Q}=f9({isDisabled:!P,onLongPress(k){if(k.pointerType==="touch")v(k),n.setSelectionBehavior("toggle")}}),pe=(k)=>{if(V.current==="touch"&&te.current)k.preventDefault()},re=b!=="none"&&n.isLink(a)?(k)=>{if(!ga.isOpening)k.preventDefault()}:void 0;return{itemProps:Le(S,D||z||c&&!f?_:{},P?Q:{},{onDoubleClick:W,onDragStartCapture:pe,onClick:re,id:t},c?{onMouseDown:(k)=>k.preventDefault()}:void 0),isPressed:U,isSelected:n.isSelected(a),isFocused:n.isFocused&&n.focusedKey===a,isDisabled:f,allowsSelection:D,hasAction:J}}function h9(e){return e==="Enter"}function m9(e){return e===" "}var hd;var wx=N(()=>{rp();hp();fn();ET();dg();hr();CE();mc();bg();Ho();p9();hd=K(ae(),1)});function g9(e,t){if(typeof t.getChildren==="function")return t.getChildren(e.key);return e.childNodes}var b9=()=>{};function Mg(e){let t=y9.get(e);if(t!=null)return t;let n=0,a=(i)=>{for(let l of i)if(l.type==="section")a(g9(l,e));else if(l.type==="item")n++};return a(e),y9.set(e,n),n}var y9;var v9=N(()=>{b9();y9=new WeakMap});var kT=N(()=>{v9()});function AT(e,t,n){let{key:a}=e,i=xT.get(t),l=e.isDisabled??t.selectionManager.isDisabled(a),c=e.isSelected??t.selectionManager.isSelected(a),u=e.shouldSelectOnPressUp??i?.shouldSelectOnPressUp,f=e.shouldFocusOnHover??i?.shouldFocusOnHover,h=e.shouldUseVirtualFocus??i?.shouldUseVirtualFocus,m=e.isVirtualized??i?.isVirtualized,b=pa(),y=pa(),v={role:"option","aria-disabled":l||void 0,"aria-selected":t.selectionManager.selectionMode!=="none"?c:void 0,"aria-label":e["aria-label"],"aria-labelledby":b,"aria-describedby":y},S=t.collection.getItem(a);if(m){let te=Number(S?.index);v["aria-posinset"]=Number.isNaN(te)?void 0:te+1,v["aria-setsize"]=Mg(t.collection)}let w=i?.onAction?()=>i?.onAction?.(a):void 0,E=KP(t,a),{itemProps:T,isPressed:D,isFocused:H,hasAction:z,allowsSelection:L}=Rp({selectionManager:t.selectionManager,key:a,ref:n,shouldSelectOnPressUp:u,allowsDifferentPressOrigin:u&&f,isVirtualized:m,shouldUseVirtualFocus:h,isDisabled:l,onAction:w||S?.props?.onAction?qa(S?.props?.onAction,w):void 0,linkBehavior:i?.linkBehavior,UNSTABLE_itemBehavior:i?.UNSTABLE_itemBehavior,id:E}),{hoverProps:J}=br({isDisabled:l||!f,onHoverStart(){if(!Gi())t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(a)}}),V=mt(S?.props);delete V.id;let P=sp(S?.props);return{optionProps:{...v,...Le(V,T,J,P),id:E},labelProps:{id:b},descriptionProps:{id:y},isFocused:H,isFocusVisible:H&&t.selectionManager.isFocused&&Gi(),isSelected:c,isDisabled:l,isPressed:D,allowsSelection:L,hasAction:z}}var x9=N(()=>{rp();Fs();qP();gc();hr();wx();ax();mc();Ho();kT()});var $9=N(()=>{x9()});var S9=N(()=>{pT()});function kp(e){let t=C9.version.split(".");if(parseInt(t[0],10)>=19)return e;return e?"true":void 0}var C9;var w9=N(()=>{C9=K(ae(),1)});var MT=N(()=>{w9()});function NT(e,t){let{collection:n,onLoadMore:a,scrollOffset:i=1}=e,l=E9.useRef(null),c=gr((u)=>{for(let f of u)if(f.isIntersecting&&a)a()});nt(()=>{if(t.current)l.current=new IntersectionObserver(c,{root:xg(t?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),l.current.observe(t.current);return()=>{if(l.current)l.current.disconnect()}},[n,t,i])}var E9;var T9=N(()=>{XE();td();pr();E9=K(ae(),1)});var R9=N(()=>{T9()});var k9=N(()=>{Xv()});var A9=N(()=>{Qv()});var gn,OT,Gs,kQ;var M9=N(()=>{Gr();IP();yx();xp();$9();wg();Ja();MT();Tg();R9();ha();k9();ld();A9();ap();gn=K(ae(),1),OT=gn.createContext(null),Gs=Ji(Cp,function(t,n,a){let i=co(n),l=gn.useContext(OT),{dragAndDropHooks:c,dragState:u,dropState:f}=gn.useContext(_P),h=u&&!(u.isDisabled||u.selectionManager.isDisabled(a.key)),{optionProps:m,labelProps:b,descriptionProps:y,...v}=AT({key:a.key,"aria-label":t?.["aria-label"]},l,i),{hoverProps:S,isHovered:w}=br({isDisabled:!v.allowsSelection&&!v.hasAction&&!h,onHoverStart:a.props.onHoverStart,onHoverChange:a.props.onHoverChange,onHoverEnd:a.props.onHoverEnd}),{keyboardProps:E}=id(t),{focusProps:T}=ad(t),D=null;if(u&&c)D=c.useDraggableItem({key:a.key,hasAction:v.hasAction},u);let H=null;if(f&&c)H=c.useDroppableItem({target:{type:"item",key:a.key,dropPosition:"on"}},f,i);let z=u&&u.isDragging(a.key),L=Yt({...t,id:void 0,children:t.children,defaultClassName:"react-aria-ListBoxItem",values:{...v,isHovered:w,selectionMode:l.selectionManager.selectionMode,selectionBehavior:l.selectionManager.selectionBehavior,allowsDragging:!!u,isDragging:z,isDropTarget:H?.isDropTarget}});gn.useEffect(()=>{if(!a.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.")},[a.textValue]);let J=t.href?Ot.a:Ot.div,V=mt(t,{global:!0});if(delete V.id,delete V.onClick,t.href&&m.tabIndex==null)m.tabIndex=-1;return gn.default.createElement(J,{...Le(V,L,m,S,E,T,D?.dragProps,H?.dropProps),ref:i,"data-allows-dragging":!!u||void 0,"data-selected":v.isSelected||void 0,"data-disabled":v.isDisabled||void 0,"data-hovered":w||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-dragging":z||void 0,"data-drop-target":H?.isDropTarget||void 0,"data-selection-mode":l.selectionManager.selectionMode==="none"?void 0:l.selectionManager.selectionMode},gn.default.createElement(qr,{values:[[Tc,{slots:{[qi]:b,label:b,description:y}}],[Tp,{isSelected:v.isSelected}]]},L.children))}),kQ=Ji(mx,function(t,n,a){let i=gn.useContext(OT),{isLoading:l,onLoadMore:c,scrollOffset:u,...f}=t,h=gn.useRef(null),m=gn.useMemo(()=>({onLoadMore:c,collection:i?.collection,sentinelRef:h,scrollOffset:u}),[c,u,i?.collection]);NT(m,h);let b=Yt({...f,id:void 0,children:a.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),y={tabIndex:-1};return gn.default.createElement(gn.default.Fragment,null,gn.default.createElement("div",{style:{position:"relative",width:0,height:0},inert:kp(!0)},gn.default.createElement("div",{"data-testid":"loadMoreSentinel",ref:h,style:{position:"absolute",height:1,width:1}})),l&&b.children&&gn.default.createElement(gn.default.Fragment,null,gn.default.createElement(Ot.div,{...Le(mt(t,{global:!0}),y),...b,role:"option",ref:n},b.children)))})});function N9(e){return e.dataset.liveAnnouncer==="true"||e.dataset.reactAriaTopLayer!==void 0}function O9(e,t){let n=mn(e?.[0]),a=t instanceof n.Element?{root:t}:t,i=a?.root??document.body,l=a?.shouldUseInert&&AQ,c=new Set(e),u=new Set,f=(E)=>l&&E instanceof n.HTMLElement?E.inert:E.getAttribute("aria-hidden")==="true",h=(E,T)=>{if(l&&E instanceof n.HTMLElement)E.inert=T;else if(T)E.setAttribute("aria-hidden","true");else if(E.removeAttribute("aria-hidden"),E instanceof n.HTMLElement)E.inert=!1},m=new Set;if(Fo())for(let E of e){let T=E;while(T&&T!==i){let D=T.getRootNode();if("shadowRoot"in D)m.add(D.shadowRoot);T=D.parentNode}}let b=(E)=>{for(let z of E.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))c.add(z);let T=(z)=>{if(u.has(z)||c.has(z)||z.parentElement&&u.has(z.parentElement)&&z.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let L of c)if(yt(z,L))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},D=xx(rt(E),E,NodeFilter.SHOW_ELEMENT,{acceptNode:T}),H=T(E);if(H===NodeFilter.FILTER_ACCEPT)y(E);if(H!==NodeFilter.FILTER_REJECT){let z=D.nextNode();while(z!=null)y(z),z=D.nextNode()}},y=(E)=>{let T=Ng.get(E)??0;if(f(E)&&T===0)return;if(T===0)h(E,!0);u.add(E),Ng.set(E,T+1)};if(xa.length)xa[xa.length-1].disconnect();b(i);let v=new MutationObserver((E)=>{for(let T of E){if(T.type!=="childList")continue;if(T.target.isConnected&&![...c,...u].some((D)=>yt(D,T.target))){for(let D of T.addedNodes)if((D instanceof HTMLElement||D instanceof SVGElement)&&N9(D))c.add(D);else if(D instanceof Element)b(D)}if(Fo()){for(let D of m)if(!D.isConnected){v.disconnect();break}}}});v.observe(i,{childList:!0,subtree:!0});let S=new Set;if(Fo())for(let E of m){let T=new MutationObserver((D)=>{for(let H of D){if(H.type!=="childList")continue;if(H.target.isConnected&&![...c,...u].some((z)=>yt(z,H.target))){for(let z of H.addedNodes)if((z instanceof HTMLElement||z instanceof SVGElement)&&N9(z))c.add(z);else if(z instanceof Element)b(z)}if(Fo()){for(let z of m)if(!z.isConnected){v.disconnect();break}}}});T.observe(E,{childList:!0,subtree:!0}),S.add(T)}let w={visibleNodes:c,hiddenNodes:u,observe(){v.observe(i,{childList:!0,subtree:!0})},disconnect(){v.disconnect()}};return xa.push(w),()=>{if(v.disconnect(),Fo())for(let E of S)E.disconnect();for(let E of u){let T=Ng.get(E);if(T==null)continue;if(T===1)h(E,!1),Ng.delete(E);else Ng.set(E,T-1)}if(w===xa[xa.length-1]){if(xa.pop(),xa.length)xa[xa.length-1].observe()}else xa.splice(xa.indexOf(w),1)}}var AQ,Ng,xa;var D9=N(()=>{$T();mr();fn();Ev();AQ=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;Ng=new WeakMap,xa=[]});function L9(e){let{ref:t,onInteractOutside:n,isDisabled:a,onInteractOutsideStart:i}=e,l=Ex.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),c=gr((f)=>{if(n&&P9(f,t)){if(i)i(f);l.current.isPointerDown=!0}}),u=gr((f)=>{if(n)n(f)});Ex.useEffect(()=>{let f=l.current;if(a)return;let h=t.current,m=rt(h);if(typeof PointerEvent<"u"){let b=(y)=>{if(f.isPointerDown&&P9(y,t))u(y);f.isPointerDown=!1};return m.addEventListener("pointerdown",c,!0),m.addEventListener("click",b,!0),()=>{m.removeEventListener("pointerdown",c,!0),m.removeEventListener("click",b,!0)}}},[t,a])}function P9(e,t){if(e.button>0)return!1;let n=ke(e);if(n){let a=n.ownerDocument;if(!a||!yt(a.documentElement,n))return!1;if(n.closest("[data-react-aria-top-layer]"))return!1}if(!t.current)return!1;return!e.composedPath().includes(t.current)}var Ex;var _9=N(()=>{fn();mr();td();Ex=K(ae(),1)});function I9(e,t){let{onClose:n,shouldCloseOnBlur:a,isOpen:i,isDismissable:l=!1,isKeyboardDismissDisabled:c=!1,shouldCloseOnInteractOutside:u}=e,f=Tx.useRef(void 0);Tx.useEffect(()=>{if(i&&!Xi.includes(t))return Xi.push(t),()=>{let S=Xi.indexOf(t);if(S>=0)Xi.splice(S,1)}},[i,t]);let h=()=>{if(Xi[Xi.length-1]===t&&n)n()},m=(S)=>{let w=Xi[Xi.length-1];if(f.current=w,!u||u(ke(S))){if(w===t)S.stopPropagation()}},b=(S)=>{if(!u||u(ke(S))){if(Xi[Xi.length-1]===t)S.stopPropagation();if(f.current===t)h()}f.current=void 0},y=(S)=>{if(S.key==="Escape"&&!c&&!S.nativeEvent.isComposing)S.stopPropagation(),S.preventDefault(),h()};L9({ref:t,onInteractOutside:l&&i?b:void 0,onInteractOutsideStart:m});let{focusWithinProps:v}=bp({isDisabled:!a,onBlurWithin:(S)=>{if(!S.relatedTarget||ZP(S.relatedTarget))return;if(!u||u(S.relatedTarget))n?.()}});return{overlayProps:{onKeyDown:y,...v},underlayProps:{}}}var Tx,Xi;var B9=N(()=>{fn();kg();rx();_9();Tx=K(ae(),1),Xi=[]});function F9(e={}){let{isDisabled:t}=e;nt(()=>{if(t)return;if(Rx++,Rx===1)if(Wa())DT=NQ();else DT=MQ();return()=>{if(Rx--,Rx===0)DT()}},[t])}function MQ(){let e=window.innerWidth-document.documentElement.clientWidth;return qa(e>0&&("scrollbarGutter"in document.documentElement.style?kx(document.documentElement,"scrollbarGutter","stable"):kx(document.documentElement,"paddingRight",`${e}px`)),kx(document.documentElement,"overflow","hidden"))}function NQ(){let e=kx(document.documentElement,"overflow","hidden"),t,n=!1,a=(m)=>{let b=ke(m);t=Yi(b)?b:xg(b,!0),n=!1;let y=b.ownerDocument.defaultView.getSelection();if(y&&!y.isCollapsed&&y.containsNode(b,!0))n=!0;if(m.composedPath().some((v)=>v instanceof HTMLInputElement&&v.type==="range"))n=!0;if("selectionStart"in b&&"selectionEnd"in b&&b.selectionStart<b.selectionEnd&&b.ownerDocument.activeElement===b)n=!0},i=document.createElement("style"),l=nx();if(l)i.nonce=l;i.textContent=`
|
|
242
|
+
@layer {
|
|
243
|
+
* {
|
|
244
|
+
overscroll-behavior: contain;
|
|
245
|
+
}
|
|
246
|
+
}`.trim(),document.head.prepend(i);let c=(m)=>{if(m.touches.length===2||n)return;if(!t||t===document.documentElement||t===document.body){m.preventDefault();return}if(t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth)m.preventDefault()},u=(m)=>{let b=ke(m),y=m.relatedTarget;if(y&&ed(y))y.focus({preventScroll:!0}),z9(y,ed(b));else if(!y)b.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},f=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(m){let b=Tt(),y=b!=null&&ed(b);if(f.call(this,{...m,preventScroll:!0}),!m||!m.preventScroll)z9(this,y)};let h=qa(PT(document,"touchstart",a,{passive:!1,capture:!0}),PT(document,"touchmove",c,{passive:!1,capture:!0}),PT(document,"blur",u,!0));return()=>{e(),h(),i.remove(),HTMLElement.prototype.focus=f}}function kx(e,t,n){let a=e.style[t];return e.style[t]=n,()=>{e.style[t]=a}}function PT(e,t,n,a){return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}function z9(e,t){if(t||!Og)H9(e);else Og.addEventListener("resize",()=>H9(e),{once:!0})}function H9(e){let t=document.scrollingElement||document.documentElement,n=e;while(n&&n!==t){let a=xg(n);if(a!==document.documentElement&&a!==document.body&&a!==n){let i=a.getBoundingClientRect(),l=n.getBoundingClientRect();if(l.top<i.top||l.bottom>i.top+n.clientHeight){let c=i.bottom;if(Og)c=Math.min(c,Og.offsetTop+Og.height);let u=l.top-i.top-((c-i.top)/2-l.height/2);a.scrollTo({top:Math.max(0,Math.min(a.scrollHeight-a.clientHeight,a.scrollTop+u)),behavior:"smooth"})}}n=a.parentElement}}var Og,Rx=0,DT;var U9=N(()=>{rp();fn();jE();XE();ma();vg();pr();dg();Og=typeof document<"u"&&window.visualViewport});var LT;var V9=N(()=>{LT={};LT={dismiss:"تجاهل"}});var _T;var j9=N(()=>{_T={};_T={dismiss:"Отхвърляне"}});var IT;var K9=N(()=>{IT={};IT={dismiss:"Odstranit"}});var BT;var q9=N(()=>{BT={};BT={dismiss:"Luk"}});var zT;var G9=N(()=>{zT={};zT={dismiss:"Schließen"}});var HT;var W9=N(()=>{HT={};HT={dismiss:"Απόρριψη"}});var FT;var Y9=N(()=>{FT={};FT={dismiss:"Dismiss"}});var UT;var J9=N(()=>{UT={};UT={dismiss:"Descartar"}});var VT;var X9=N(()=>{VT={};VT={dismiss:"Lõpeta"}});var jT;var Q9=N(()=>{jT={};jT={dismiss:"Hylkää"}});var KT;var Z9=N(()=>{KT={};KT={dismiss:"Rejeter"}});var qT;var eL=N(()=>{qT={};qT={dismiss:"התעלם"}});var GT;var tL=N(()=>{GT={};GT={dismiss:"Odbaci"}});var WT;var nL=N(()=>{WT={};WT={dismiss:"Elutasítás"}});var YT;var rL=N(()=>{YT={};YT={dismiss:"Ignora"}});var JT;var oL=N(()=>{JT={};JT={dismiss:"閉じる"}});var XT;var aL=N(()=>{XT={};XT={dismiss:"무시"}});var QT;var iL=N(()=>{QT={};QT={dismiss:"Atmesti"}});var ZT;var sL=N(()=>{ZT={};ZT={dismiss:"Nerādīt"}});var eR;var lL=N(()=>{eR={};eR={dismiss:"Lukk"}});var tR;var cL=N(()=>{tR={};tR={dismiss:"Negeren"}});var nR;var uL=N(()=>{nR={};nR={dismiss:"Zignoruj"}});var rR;var dL=N(()=>{rR={};rR={dismiss:"Descartar"}});var oR;var fL=N(()=>{oR={};oR={dismiss:"Dispensar"}});var aR;var pL=N(()=>{aR={};aR={dismiss:"Revocare"}});var iR;var hL=N(()=>{iR={};iR={dismiss:"Пропустить"}});var sR;var mL=N(()=>{sR={};sR={dismiss:"Zrušiť"}});var lR;var gL=N(()=>{lR={};lR={dismiss:"Opusti"}});var cR;var bL=N(()=>{cR={};cR={dismiss:"Odbaci"}});var uR;var yL=N(()=>{uR={};uR={dismiss:"Avvisa"}});var dR;var vL=N(()=>{dR={};dR={dismiss:"Kapat"}});var fR;var xL=N(()=>{fR={};fR={dismiss:"Скасувати"}});var pR;var $L=N(()=>{pR={};pR={dismiss:"取消"}});var hR;var SL=N(()=>{hR={};hR={dismiss:"關閉"}});var mR;var CL=N(()=>{V9();j9();K9();q9();G9();W9();Y9();J9();X9();Q9();Z9();eL();tL();nL();rL();oL();aL();iL();sL();lL();cL();uL();dL();fL();pL();hL();mL();gL();bL();yL();vL();xL();$L();SL();mR={};mR={"ar-AE":LT,"bg-BG":_T,"cs-CZ":IT,"da-DK":BT,"de-DE":zT,"el-GR":HT,"en-US":FT,"es-ES":UT,"et-EE":VT,"fi-FI":jT,"fr-FR":KT,"he-IL":qT,"hr-HR":GT,"hu-HU":WT,"it-IT":YT,"ja-JP":JT,"ko-KR":XT,"lt-LT":QT,"lv-LV":ZT,"nb-NO":eR,"nl-NL":tR,"pl-PL":nR,"pt-BR":rR,"pt-PT":oR,"ro-RO":aR,"ru-RU":iR,"sk-SK":sR,"sl-SI":lR,"sr-SP":cR,"sv-SE":uR,"tr-TR":dR,"uk-UA":fR,"zh-CN":pR,"zh-TW":hR}});function OQ(e){return e&&e.__esModule?e.default:e}function bR(e){let{onDismiss:t,...n}=e,a=R7(OQ(mR),"@react-aria/overlays"),i=yc(n,a.format("dismiss")),l=()=>{if(t)t()};return gR.default.createElement(cP,null,gR.default.createElement("button",{...i,tabIndex:-1,onClick:l,style:{width:1,height:1}}))}var gR;var wL=N(()=>{CL();fg();k7();uP();gR=K(ae(),1)});function EL({children:e}){let t=md.useMemo(()=>({register:()=>{}}),[]);return md.default.createElement(hg.Provider,{value:t},e)}var md;var TL=N(()=>{KE();md=K(ae(),1)});function RL(){return Dg.useContext(DQ)??{}}var Dg,DQ;var kL=N(()=>{Dg=K(ae(),1),DQ=Dg.createContext({})});function yR(e){let t=Kr(),{portalContainer:n=t?null:document.body,isExiting:a}=e,[i,l]=ei.useState(!1),c=ei.useMemo(()=>({contain:i,setContain:l}),[i,l]),{getContainer:u}=RL();if(!e.portalContainer&&u)n=u();if(!n)return null;let f=e.children;if(!e.disableFocusManagement)f=ei.default.createElement(XP,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!a},f);return f=ei.default.createElement(ML.Provider,{value:c},ei.default.createElement(EL,null,f)),AL.default.createPortal(f,n)}function Ax(){let t=ei.useContext(ML)?.setContain;nt(()=>{t?.(!0)},[t])}var ei,AL,ML;var Mx=N(()=>{TL();kg();pc();pr();kL();ei=K(ae(),1),AL=K(jr(),1),ML=ei.default.createContext(null)});var NL=N(()=>{wL();Mx()});function vR(e){let[t,n]=rd(e.isOpen,e.defaultOpen||!1,e.onOpenChange),a=Nx.useCallback(()=>{n(!0)},[n]),i=Nx.useCallback(()=>{n(!1)},[n]),l=Nx.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:a,close:i,toggle:l}}var Nx;var OL=N(()=>{jv();Nx=K(ae(),1)});var DL=N(()=>{OL()});function Mp(e,t=!0){let[n,a]=Ap.useState(!0),i=n&&t;return nt(()=>{if(i&&e.current&&"getAnimations"in e.current){for(let l of e.current.getAnimations())if(l instanceof CSSTransition)l.cancel()}},[e,i]),LL(e,i,Ap.useCallback(()=>a(!1),[])),i}function Np(e,t){let[n,a]=Ap.useState(t?"open":"closed");switch(n){case"open":if(!t)a("exiting");break;case"closed":case"exiting":if(t)a("open");break}let i=n==="exiting";return LL(e,i,Ap.useCallback(()=>{a((l)=>l==="exiting"?"closed":l)},[])),i}function LL(e,t,n){nt(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){n();return}let a=e.current.getAnimations();if(a.length===0){n();return}let i=!1;return Promise.allSettled(a.map((l)=>l.finished)).then(()=>{if(!i)PL.flushSync(()=>{n()})}),()=>{i=!0}}},[e,t,n])}var PL,Ap;var _L=N(()=>{pr();PL=K(jr(),1),Ap=K(ae(),1)});var xR=N(()=>{_L()});var Ox,IL;var BL=N(()=>{Ox=K(ae(),1),IL=Ox.createContext({})});var zL;var HL=N(()=>{zL=new WeakMap});function SR(e,t,n){let{id:a,key:i,closeOnSelect:l,shouldCloseOnSelect:c,isVirtualized:u,"aria-haspopup":f,onPressStart:h,onPressUp:m,onPress:b,onPressChange:y,onPressEnd:v,onClick:S,onHoverStart:w,onHoverChange:E,onHoverEnd:T,onKeyDown:D,onKeyUp:H,onFocus:z,onFocusChange:L,onBlur:J,selectionManager:V=t.selectionManager}=e,P=!!f,te=P&&e["aria-expanded"]==="true",Y=e.isDisabled??V.isDisabled(i),ge=e.isSelected??V.isSelected(i),ue=zL.get(t),ie=t.collection.getItem(i),_=e.onClose||ue.onClose,U=Ju(),W=()=>{if(P)return;if(ie?.props?.onAction)ie.props.onAction();else if(e.onAction)e.onAction(i);if(ue.onAction){let Ie=ue.onAction;Ie(i)}},Q="menuitem";if(!P){if(V.selectionMode==="single")Q="menuitemradio";else if(V.selectionMode==="multiple")Q="menuitemcheckbox"}let pe=pa(),re=pa(),k=pa(),X={id:a,"aria-disabled":Y||void 0,role:Q,"aria-label":e["aria-label"],"aria-labelledby":pe,"aria-describedby":[e["aria-describedby"],re,k].filter(Boolean).join(" ")||void 0,"aria-controls":e["aria-controls"],"aria-haspopup":f,"aria-expanded":e["aria-expanded"]};if(V.selectionMode!=="none"&&!P)X["aria-checked"]=ge;if(u){let Ie=Number(ie?.index);X["aria-posinset"]=Number.isNaN(Ie)?void 0:Ie+1,X["aria-setsize"]=Mg(t.collection)}let de=$R.useRef(!1),xe=(Ie)=>{y?.(Ie),de.current=Ie},Re=$R.useRef(null),Ke=(Ie)=>{if(Ie.pointerType!=="keyboard")Re.current={pointerType:Ie.pointerType};if(Ie.pointerType==="mouse"){if(!de.current)Ie.target.click()}m?.(Ie)},Ce=(Ie)=>{S?.(Ie),W(),i7(Ie,U,ie.props.href,ie?.props.routerOptions);let Zr=Re.current?.pointerType==="keyboard"?Re.current?.key==="Enter"||V.selectionMode==="none"||V.isLink(i):V.selectionMode!=="multiple"||V.isLink(i);if(Zr=c??l??Zr,_&&!P&&Zr)_();Re.current=null},{itemProps:Je,isFocused:he}=Rp({id:a,selectionManager:V,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:ue.shouldUseVirtualFocus}),{pressProps:Ne,isPressed:xt}=wc({onPressStart:h,onPress:b,onPressUp:Ke,onPressChange:xe,onPressEnd:v,isDisabled:Y}),{hoverProps:me}=br({isDisabled:Y,onHoverStart(Ie){if(!Gi()&&!(te&&f))V.setFocused(!0),V.setFocusedKey(i);w?.(Ie)},onHoverChange:E,onHoverEnd:T}),{keyboardProps:cn}=id({onKeyDown:(Ie)=>{if(Ie.repeat){Ie.continuePropagation();return}switch(Ie.key){case" ":Re.current={pointerType:"keyboard",key:" "},ke(Ie).click(),ug("keyboard");break;case"Enter":if(Re.current={pointerType:"keyboard",key:"Enter"},ke(Ie).tagName!=="A")ke(Ie).click();ug("keyboard");break;default:if(!P)Ie.continuePropagation();D?.(Ie);break}},onKeyUp:H}),{focusableProps:Pn}=$c({onBlur:J,onFocus:z,onFocusChange:L},n),kn=mt(ie?.props);delete kn.id;let nn=sp(ie?.props);return{menuItemProps:{...X,...Le(kn,nn,P?{onFocus:Je.onFocus,"data-collection":Je["data-collection"],"data-key":Je["data-key"]}:Je,Ne,me,cn,Pn,ue.shouldUseVirtualFocus||P?{onMouseDown:(Ie)=>Ie.preventDefault()}:void 0,Y?void 0:{onClick:Ce}),tabIndex:Je.tabIndex!=null&&te&&!ue.shouldUseVirtualFocus?-1:Je.tabIndex},labelProps:{id:pe},descriptionProps:{id:re},keyboardShortcutProps:{id:k},isFocused:he,isFocusVisible:he&&V.isFocused&&Gi()&&!te,isSelected:ge,isPressed:xt,isDisabled:Y}}var $R;var FL=N(()=>{Fs();fn();mc();gc();HL();hr();mp();ax();Qv();bg();wx();Ho();kT();$R=K(ae(),1)});var UL=N(()=>{FL()});var po,jL,PQ,LQ,VL,gd;var KL=N(()=>{Gr();bT();BL();yx();xp();UL();Tg();wg();Ja();ha();ld();ap();po=K(ae(),1),jL=po.createContext(null),PQ=po.createContext(null);LQ=class LQ extends Vo{static{this.type="submenutrigger"}filter(e,t,n){let a=e.getItem(this.firstChildKey);if(a&&n(a.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}};VL=po.createContext(null),gd=Ji(Cp,function(t,n,a){[t,n]=an(t,n,VL);let i=Wu(VL)?.id,l=po.useContext(jL),c=co(n),u=po.useContext(PQ),{isVirtualized:f}=po.useContext(Eg),{menuItemProps:h,labelProps:m,descriptionProps:b,keyboardShortcutProps:y,...v}=SR({...t,id:i,key:a.key,selectionManager:u,isVirtualized:f},l,c),{hoverProps:S,isHovered:w}=br({isDisabled:v.isDisabled}),E=Yt({...t,id:void 0,children:a.rendered,defaultClassName:"react-aria-MenuItem",values:{...v,isHovered:w,isFocusVisible:v.isFocusVisible,selectionMode:u.selectionMode,selectionBehavior:u.selectionBehavior,hasSubmenu:!!t["aria-haspopup"],isOpen:t["aria-expanded"]==="true"}}),T=t.href?Ot.a:Ot.div,D=mt(t,{global:!0});return delete D.id,delete D.onClick,po.default.createElement(T,{...Le(D,E,h,S),ref:c,"data-disabled":v.isDisabled||void 0,"data-hovered":w||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-selected":v.isSelected||void 0,"data-selection-mode":u.selectionMode==="none"?void 0:u.selectionMode,"data-has-submenu":!!t["aria-haspopup"]||void 0,"data-open":t["aria-expanded"]==="true"||void 0},po.default.createElement(qr,{values:[[Tc,{slots:{[qi]:m,label:m,description:b}}],[IL,y],[Tp,{isSelected:v.isSelected}]]},E.children))})});function CR(e,t){let{role:n="dialog"}=e,a=pa();a=e["aria-label"]?void 0:a;let i=Op.useRef(!1);Op.useEffect(()=>{if(t.current&&!rg(t.current)){ba(t.current);let c=setTimeout(()=>{if(Tt()===t.current||Tt()===document.body){if(i.current=!0,t.current)t.current.blur(),ba(t.current);i.current=!1}},500);return()=>{clearTimeout(c)}}},[t]),Ax();let l=Op.useRef(!1);return Op.useEffect(()=>{if(!l.current&&t.current){let c=t.current,u=c.hasAttribute("aria-label"),f=c.hasAttribute("aria-labelledby");if(!u&&!f)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."),l.current=!0}}),{dialogProps:{...mt(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:(c)=>{if(i.current)c.stopPropagation()}},titleProps:{id:a}}}var Op;var qL=N(()=>{Fs();hp();fn();Mx();Ho();Op=K(ae(),1)});var GL=N(()=>{qL()});var ti,WL,Dp,Dx;var wR=N(()=>{ix();Gr();nP();GL();Ja();ha();ti=K(ae(),1),WL=ti.createContext(null),Dp=ti.createContext(null),Dx=ti.forwardRef(function(t,n){let a=t["aria-labelledby"];[t,n]=an(t,n,WL);let{dialogProps:i,titleProps:l}=CR({...t,"aria-labelledby":a},n),c=ti.useContext(Dp);if(!i["aria-label"]&&!i["aria-labelledby"])if(t["aria-labelledby"])i["aria-labelledby"]=t["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 u=Yt({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:c?.close||(()=>{})}}),f=mt(t,{global:!0});return ti.default.createElement(Ot.section,{...Le(f,u,i),render:t.render,ref:n,slot:t.slot||void 0},ti.default.createElement(qr,{values:[[tP,{slots:{[qi]:{},title:{...l,level:2}}}],[cd,{slots:{[qi]:{},close:{onPress:()=>c?.close()}}}]]},u.children))})});var YL=N(()=>{jv()});function ER(e,t){let{inputElementType:n="input",isDisabled:a=!1,isRequired:i=!1,isReadOnly:l=!1,type:c="text",validationBehavior:u="aria"}=e,[f,h]=rd(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=$c(e,t),b=aT({...e,value:f}),{isInvalid:y,validationErrors:v,validationDetails:S}=b.displayValidation,{labelProps:w,fieldProps:E,descriptionProps:T,errorMessageProps:D}=yP({...e,isInvalid:y,errorMessage:e.errorMessage||v}),H=mt(e,{labelable:!0}),z={type:c,pattern:e.pattern},[L]=Px.useState(f);return $P(t,e.defaultValue??L,h),CP(e,b,t),{labelProps:w,inputProps:Le(H,n==="input"?z:void 0,{disabled:a,readOnly:l,required:i&&u==="native","aria-required":i&&u==="aria"||void 0,"aria-invalid":y||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:f,onChange:(J)=>h(ke(J).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(Px.default.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,...E}),descriptionProps:T,errorMessageProps:D,isInvalid:y,validationErrors:v,validationDetails:S}}var Px;var JL=N(()=>{Fs();fn();hr();vP();mp();SP();wP();YL();mP();Px=K(ae(),1)});function TR(e,t,n){let{isDisabled:a}=e,i=Nn(),l=Nn(),c=Kr(),u=bd.useRef(null),f=bd.useCallback(()=>{u.current=requestAnimationFrame(()=>{if(n.current)n.current.setAttribute("hidden","until-found")}),XL.flushSync(()=>{t.toggle()})},[n,t]);nd(n,"beforematch",f);let h=bd.useRef(null);return nt(()=>{if(u.current)cancelAnimationFrame(u.current);if(n.current&&!c){let m=n.current;if(h.current==null||typeof m.getAnimations!=="function")if(t.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(t.isExpanded!==h.current)if(t.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((b)=>b.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((b)=>b.finished)).then(()=>m.setAttribute("hidden","until-found")).catch(()=>{});h.current=t.isExpanded}},[a,n,t.isExpanded,c]),bd.useEffect(()=>()=>{if(u.current)cancelAnimationFrame(u.current)},[]),{buttonProps:{id:i,"aria-expanded":t.isExpanded,"aria-controls":l,onPress:(m)=>{if(!a&&m.pointerType!=="keyboard")t.toggle()},isDisabled:a,onPressStart(m){if(m.pointerType==="keyboard"&&!a)t.toggle()}},panelProps:{id:l,role:"group","aria-labelledby":i,"aria-hidden":!t.isExpanded,hidden:c?!t.isExpanded:void 0}}}var XL,bd;var QL=N(()=>{DE();Ho();pc();pr();XL=K(jr(),1),bd=K(ae(),1)});var ZL=N(()=>{QL()});function RR(e){let[t,n]=rd(e.isExpanded,e.defaultExpanded||!1,e.onExpandedChange),a=Lx.useCallback(()=>{n(!0)},[n]),i=Lx.useCallback(()=>{n(!1)},[n]),l=Lx.useCallback(()=>{n(!t)},[n,t]);return{isExpanded:t,setExpanded:n,expand:a,collapse:i,toggle:l}}var Lx;var e_=N(()=>{jv();Lx=K(ae(),1)});var t_=N(()=>{e_()});var yr,n_,r_,o_,a_,kR,AR;var i_=N(()=>{ix();Gr();ZL();t_();Ja();ha();Cv();yp();JE();yr=K(ae(),1),n_=yr.createContext(null),r_=yr.createContext(null),o_=yr.createContext(null),a_=yr.createContext(null),kR=yr.forwardRef(function(t,n){[t,n]=an(t,n,r_);let a=yr.useContext(n_),{id:i,...l}=t,c=Nn();i||=c;let u=a?a.expandedKeys.has(i):t.isExpanded,f=RR({...t,isExpanded:u,onExpandedChange(T){if(a)a.toggleKey(i);t.onExpandedChange?.(T)}}),h=yr.default.useRef(null),m=t.isDisabled||a?.isDisabled||!1,{buttonProps:b,panelProps:y}=TR({...t,isExpanded:u,isDisabled:m},f,h),{isFocusVisible:v,focusProps:S}=Uo({within:!0}),w=Yt({...t,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:f.isExpanded,isDisabled:m,isFocusVisibleWithin:v,state:f}}),E=mt(l,{global:!0});return yr.default.createElement(qr,{values:[[cd,{slots:{[qi]:{},trigger:b}}],[a_,{panelProps:y,panelRef:h}],[o_,f]]},yr.default.createElement(Ot.div,{...Le(E,w,S),ref:n,"data-expanded":f.isExpanded||void 0,"data-disabled":m||void 0,"data-focus-visible-within":v||void 0},w.children))}),AR=yr.forwardRef(function(t,n){let{role:a="group"}=t,{panelProps:i,panelRef:l}=yr.useContext(a_),{isFocusVisible:c,focusProps:u}=Uo({within:!0}),f=Yt({...t,defaultClassName:"react-aria-DisclosurePanel",values:{isFocusVisibleWithin:c}}),h=mt(t,{global:!0,labelable:!0});return yr.default.createElement(Ot.div,{...Le(h,f,i,u),ref:Ki(n,l),role:a,"data-focus-visible-within":c||void 0},yr.default.createElement(qr,{values:[[cd,null]]},t.children))})});function MR(e,t,n){let{overlayProps:a,underlayProps:i}=I9({...e,isOpen:t.isOpen,onClose:t.close},n);return F9({isDisabled:!t.isOpen}),Ax(),s_.useEffect(()=>{if(t.isOpen&&n.current)return O9([n.current],{shouldUseInert:!0})},[t.isOpen,n]),{modalProps:Le(a),underlayProps:i}}var s_;var l_=N(()=>{D9();B9();hr();Mx();U9();s_=K(ae(),1)});var c_=N(()=>{l_()});var u_=N(()=>{vg()});var d_=N(()=>{pc()});function OR(){let e=Kr(),[t,n]=_x.useState(()=>e?{width:0,height:0}:NR());return _x.useEffect(()=>{let a=(u)=>{n((f)=>{if(u.width===f.width&&u.height===f.height)return f;return u})},i=()=>{if(ho&&ho.scale>1)return;a(NR())},l,c=(u)=>{if(ho&&ho.scale>1)return;if(ed(ke(u)))l=requestAnimationFrame(()=>{let f=Tt();if(!f||!ed(f))a({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})})};if(a(NR()),Wa())window.addEventListener("blur",c,!0);if(!ho)window.addEventListener("resize",i);else ho.addEventListener("resize",i);return()=>{if(cancelAnimationFrame(l),Wa())window.removeEventListener("blur",c,!0);if(!ho)window.removeEventListener("resize",i);else ho.removeEventListener("resize",i)}},[]),t}function NR(){return{width:ho?Math.min(ho.width*ho.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:ho?ho.height*ho.scale:document.documentElement.clientHeight}}var _x,ho;var f_=N(()=>{fn();ma();pc();dg();_x=K(ae(),1),ho=typeof document<"u"&&window.visualViewport});var p_=N(()=>{f_()});function _Q(e,t){[e,t]=an(e,t,m_);let n=sn.useContext(Dp),a=vR(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?a:n;if(i===n){if(e.onOpenChange||e.defaultOpen!==void 0||e.isOpen!==void 0)console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.")}let l=co(t),c=sn.useRef(null),u=Np(l,i.isOpen),f=Np(c,i.isOpen),h=u||f||e.isExiting||!1,m=Kr();if(!i.isOpen&&!h||m)return null;return sn.default.createElement(IQ,{...e,state:i,isExiting:h,overlayRef:l,modalRef:c})}function IQ({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:a}=t,{modalProps:i,underlayProps:l}=MR(t,a,n),c=Mp(t.overlayRef)||t.isEntering||!1,u=Yt({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:c,isExiting:t.isExiting,state:a}}),f=OR(),h=void 0,m=void 0;if(typeof document<"u"){let y=Yi(document.body)?document.body:document.scrollingElement||document.documentElement,v=y.getBoundingClientRect().width%1,S=y.getBoundingClientRect().height%1;h=y.scrollWidth-v,m=y.scrollHeight-S}let b={...u.style,"--visual-viewport-width":f.width+"px","--visual-viewport-height":f.height+"px","--page-width":h!==void 0?h+"px":void 0,"--page-height":m!==void 0?m+"px":void 0};return sn.default.createElement(yR,{isExiting:t.isExiting,portalContainer:e},sn.default.createElement(Ot.div,{...Le(mt(t,{global:!0}),l),...u,style:b,ref:t.overlayRef,"data-entering":c||void 0,"data-exiting":t.isExiting||void 0},sn.default.createElement(qr,{values:[[DR,{modalProps:i,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[Dp,a]]},u.children)))}function h_(e){let{modalProps:t,modalRef:n,isExiting:a,isDismissable:i}=sn.useContext(DR),l=sn.useContext(Dp),c=sn.useMemo(()=>Ki(e.modalRef,n),[e.modalRef,n]),u=co(c),f=Mp(u),h=Yt({...e,defaultClassName:"react-aria-Modal",values:{isEntering:f,isExiting:a,state:l}});return sn.default.createElement(Ot.div,{...Le(mt(e,{global:!0}),t),...h,ref:u,"data-entering":f||void 0,"data-exiting":a||void 0},i&&sn.default.createElement(bR,{onDismiss:l.close}),h.children)}var sn,m_,DR,Pg,Pp;var g_=N(()=>{Gr();wR();c_();NL();Ja();u_();ha();Cv();DL();xR();d_();ap();p_();sn=K(ae(),1),m_=sn.createContext(null),DR=sn.createContext(null),Pg=sn.forwardRef(function(t,n){if(sn.useContext(DR)){if(t.onOpenChange||t.defaultOpen!==void 0||t.isOpen!==void 0){let w=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),E=Object.keys(t).filter((T)=>w.has(T));console.warn(`This modal is already wrapped in a ModalOverlay, props [${E.join(", ")}] should be placed on the ModalOverlay instead.`)}return sn.default.createElement(h_,{...t,modalRef:n},t.children)}let{isDismissable:i,isKeyboardDismissDisabled:l,isOpen:c,defaultOpen:u,onOpenChange:f,children:h,isEntering:m,isExiting:b,UNSTABLE_portalContainer:y,shouldCloseOnInteractOutside:v,...S}=t;return sn.default.createElement(Pp,{isDismissable:i,isKeyboardDismissDisabled:l,isOpen:c,defaultOpen:u,onOpenChange:f,isEntering:m,isExiting:b,UNSTABLE_portalContainer:y,shouldCloseOnInteractOutside:v},sn.default.createElement(h_,{...S,modalRef:n},h))});Pp=sn.forwardRef(_Q)});function Lp(e,t,n){if(!e)return"";if(typeof t==="string")t=t.replace(/\s+/g,"");let a=PR.get(e);if(!a)console.error("There is no tab id, please check if you have rendered the tab panel before the tab list.");return`${a}-${n}-${t}`}var PR;var Ix=N(()=>{PR=new WeakMap});function LR(e,t,n){let{key:a,isDisabled:i,shouldSelectOnPressUp:l}=e,{selectionManager:c,selectedKey:u}=t,f=a===u,h=i||t.isDisabled||t.selectionManager.isDisabled(a),m=t.collection.getItem(a),{itemProps:b,isPressed:y}=Rp({selectionManager:c,key:a,ref:n,isDisabled:h,shouldSelectOnPressUp:l??m?.props.href!=null,linkBehavior:"selection"}),v=Lp(t,a,"tab"),S=Lp(t,a,"tabpanel"),{tabIndex:w}=b,E=mt(m?.props,{labelable:!0});delete E.id;let T=sp(m?.props),{focusableProps:D}=$c({...m?.props,isDisabled:h},n);return{tabProps:Le(E,D,T,b,{id:v,"aria-selected":f,"aria-disabled":h||void 0,"aria-controls":f?S:void 0,tabIndex:h?void 0:w,role:"tab"}),isSelected:f,isDisabled:h,isPressed:y}}var b_=N(()=>{Fs();Ix();hr();mp();mc();wx()});function v_(e,t){let n=t?.isDisabled,[a,i]=y_.useState(!1);return nt(()=>{if(e?.current&&!n){let l=()=>{if(e.current){let u=ya(e.current,{tabbable:!0});i(!!u.nextNode())}};l();let c=new MutationObserver(l);return c.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{c.disconnect()}}}),n?!1:a}var y_;var x_=N(()=>{kg();pr();y_=K(ae(),1)});function _R(e,t,n){let a=v_(n)?void 0:0,i=Lp(t,e.id??t?.selectedKey,"tabpanel"),l=yc({...e,id:i,"aria-labelledby":Lp(t,t?.selectedKey,"tab")});return{tabPanelProps:Le(l,{tabIndex:a,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}var $_=N(()=>{Ix();hr();x_();fg()});class IR{constructor(e,t,n,a=new Set){this.collection=e,this.flipDirection=t==="rtl"&&n==="horizontal",this.disabledKeys=a,this.tabDirection=n==="horizontal"}getKeyLeftOf(e){if(this.flipDirection)return this.getNextKey(e);return this.getPreviousKey(e)}getKeyRightOf(e){if(this.flipDirection)return this.getPreviousKey(e);return this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();if(e!=null&&this.isDisabled(e))e=this.getNextKey(e);return e}getLastKey(){let e=this.collection.getLastKey();if(e!=null&&this.isDisabled(e))e=this.getPreviousKey(e);return e}getKeyAbove(e){if(this.tabDirection)return null;return this.getPreviousKey(e)}getKeyBelow(e){if(this.tabDirection)return null;return this.getNextKey(e)}getNextKey(e){let t=e;do if(t=this.collection.getKeyAfter(t),t==null)t=this.collection.getFirstKey();while(t!=null&&this.isDisabled(t));return t}getPreviousKey(e){let t=e;do if(t=this.collection.getKeyBefore(t),t==null)t=this.collection.getLastKey();while(t!=null&&this.isDisabled(t));return t}}var S_=()=>{};function BR(e,t,n){let{orientation:a="horizontal",keyboardActivation:i="automatic"}=e,{collection:l,selectionManager:c,disabledKeys:u}=t,{direction:f}=up(),h=C_.useMemo(()=>new IR(l,f,a,u),[l,u,a,f]),{collectionProps:m}=c9({ref:n,selectionManager:c,keyboardDelegate:h,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),b=Nn();PR.set(t,b);let y=yc({...e,id:b});return{tabListProps:{...Le(m,y),role:"tablist","aria-orientation":a,tabIndex:void 0}}}var C_;var w_=N(()=>{hr();Ix();S_();Ho();fg();Fv();u9();C_=K(ae(),1)});var E_=N(()=>{b_();$_();w_()});function BQ({props:e,forwardedRef:t}){let n=Ft.useContext(yd),{CollectionRoot:a}=Ft.useContext(Eg),{orientation:i="horizontal",keyboardActivation:l="automatic"}=Wu(zR),c=co(t),{tabListProps:u}=BR({...e,orientation:i,keyboardActivation:l},n,c),f=Yt({...e,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:n}}),h=mt(e,{global:!0});return delete h.id,Ft.default.createElement(Ot.div,{...Le(h,f,u),ref:c,"data-orientation":i||void 0},Ft.default.createElement(BP,null,Ft.default.createElement(a,{collection:n.collection,persistedKeys:gT(n.selectionManager.focusedKey)})))}function zQ(e){let t=Ft.useContext(yd),{id:n,tabPanelRef:a,isInitiallySelected:i,isExiting:l,...c}=e,{tabPanelProps:u}=_R(e,t,a),{focusProps:f,isFocused:h,isFocusVisible:m}=Uo(),b=t.selectedKey===e.id,y=Mp(a)&&!i,v=Yt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:h,isFocusVisible:m,isInert:kp(!b),isEntering:y,isExiting:l,state:t}}),S=mt(c,{global:!0});delete S.id;let w=b?Le(S,u,f,v):Le(S,v);return Ft.default.createElement(Ot.div,{...w,ref:a,"data-focused":h||void 0,"data-focus-visible":m||void 0,inert:kp(!b||e.inert),"data-inert":!b?"true":void 0,"data-entering":y||void 0,"data-exiting":l||void 0},Ft.default.createElement(qr,{values:[[zR,null],[yd,null]]},Ft.default.createElement(Eg.Provider,{value:mT},v.children)))}var Ft,zR,yd,HR,T_,FR,UR;var R_=N(()=>{Gr();bT();yx();zP();E_();S9();wg();Tg();fp();Ja();MT();ha();xR();yp();ld();ap();Ft=K(ae(),1),zR=Ft.createContext(null),yd=Ft.createContext(null),HR=Ft.forwardRef(function(t,n){return Ft.useContext(yd)?Ft.default.createElement(BQ,{props:t,forwardedRef:n}):Ft.default.createElement(fT,t)});T_=class T_ extends Vo{static{this.type="item"}};FR=Ji(T_,(e,t,n)=>{let a=Ft.useContext(yd),i=co(t),{tabProps:l,isSelected:c,isDisabled:u,isPressed:f}=LR({key:n.key,...e},a,i),{focusProps:h,isFocused:m,isFocusVisible:b}=Uo(),{hoverProps:y,isHovered:v}=br({isDisabled:u,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),S=Yt({...e,id:void 0,children:n.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:c,isDisabled:u,isFocused:m,isFocusVisible:b,isPressed:f,isHovered:v}}),w=n.props.href?Ot.a:Ot.div,E=mt(e,{global:!0});return delete E.id,delete E.onClick,Ft.default.createElement(w,{...Le(E,S,l,h,y),ref:i,"data-selected":c||void 0,"data-disabled":u||void 0,"data-focused":m||void 0,"data-focus-visible":b||void 0,"data-pressed":f||void 0,"data-hovered":v||void 0},Ft.default.createElement(Tp.Provider,{value:{isSelected:c}},S.children))}),UR=Ya(function(t,n){let a=Ft.useContext(yd),i=co(n),l=a.selectedKey===t.id,[c,u]=Ft.useState(a.selectedKey!=null?l:null);if(c==null&&a.selectedKey!=null)u(l);else if(!l&&c)u(!1);let f=Np(i,l);if(!l&&!t.shouldForceMount&&!f)return null;return Ft.default.createElement(zQ,{...t,tabPanelRef:i,isInitiallySelected:c||!1,isExiting:f})})});var _p,Bx,HQ=(e)=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:a,...i}=e;return i},VR;var jR=N(()=>{Gr();ha();yp();ld();_p=K(ae(),1),Bx=_p.createContext({}),VR=_p.forwardRef(function(t,n){[t,n]=an(t,n,Bx);let{hoverProps:a,isHovered:i}=br(t),{isFocused:l,isFocusVisible:c,focusProps:u}=Uo({isTextInput:!0,autoFocus:t.autoFocus}),f=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",h=Yt({...t,values:{isHovered:i,isFocused:l,isFocusVisible:c,isDisabled:t.disabled||!1,isInvalid:f},defaultClassName:"react-aria-TextArea"});return _p.default.createElement(Ot.textarea,{...Le(HQ(t),u,a),...h,ref:n,"data-focused":l||void 0,"data-disabled":t.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":c||void 0,"data-invalid":f||void 0})})});var k_=N(()=>{JL()});var ni,A_,Lg;var M_=N(()=>{Gr();eT();M7();bP();TP();iT();LE();jR();xp();k_();fp();Ja();ni=K(ae(),1),A_=ni.createContext(null),Lg=Ya(function(t,n){[t,n]=an(t,n,A_);let{validationBehavior:a}=Wu(gP)||{},i=t.validationBehavior??a??"native",l=ni.useRef(null);[t,l]=an(t,l,A7);let[c,u]=wv(!t["aria-label"]&&!t["aria-labelledby"]),[f,h]=ni.useState("input"),{labelProps:m,inputProps:b,descriptionProps:y,errorMessageProps:v,...S}=ER({...G6(t),inputElementType:f,label:u,validationBehavior:i},l),w=ni.useCallback((D)=>{if(l.current=D,D)h(D instanceof HTMLTextAreaElement?"textarea":"input")},[l]),E=Yt({...t,values:{isDisabled:t.isDisabled||!1,isInvalid:S.isInvalid,isReadOnly:t.isReadOnly||!1,isRequired:t.isRequired||!1},defaultClassName:"react-aria-TextField"}),T=mt(t,{global:!0});return delete T.id,ni.default.createElement(Ot.div,{...T,...E,ref:n,slot:t.slot||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":S.isInvalid||void 0,"data-readonly":t.isReadOnly||void 0,"data-required":t.isRequired||void 0},ni.default.createElement(qr,{values:[[Gv,{...m,ref:c}],[px,{...b,ref:w}],[Bx,{...b,ref:w}],[EP,{role:"presentation",isInvalid:S.isInvalid,isDisabled:t.isDisabled||!1}],[Tc,{slots:{description:y,errorMessage:v}}],[Sg,S]]},E.children))})});class _g{constructor(e){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate}runWithWrapUpdate(e,t){if(this.wrapUpdate)this.wrapUpdate(e,t);else e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,t={}){let n="_"+Math.random().toString(36).slice(2),a={...t,content:e,key:n,timer:t.timeout?new O_(()=>this.close(n),t.timeout):void 0};return this.queue.unshift(a),this.updateVisibleToasts("add"),n}close(e){let t=this.queue.findIndex((n)=>n.key===e);if(t>=0)this.queue[t].onClose?.(),this.queue.splice(t,1);this.updateVisibleToasts("remove")}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let t of this.subscriptions)t()},e)}pauseAll(){for(let e of this.visibleToasts)if(e.timer)e.timer.pause()}resumeAll(){for(let e of this.visibleToasts)if(e.timer)e.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class O_{constructor(e,t){this.startTime=null,this.remaining=t,this.callback=e}reset(e){this.remaining=e,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 N_,FQ;var D_=N(()=>{N_=K(ae(),1),FQ=K(Ep(),1)});var P_=N(()=>{D_()});var L_=()=>{};var Yr=N(()=>{ix();wR();i_();eT();iT();LE();M9();KL();g_();jP();R_();xp();jR();M_();L_();P_()});var we;var Qi=N(()=>{Yr();$n();we=ze(Xa,{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 Rt=Ui(function(jQ){var vd=K(ae());(function(){function e(k){if(k==null)return null;if(typeof k==="function")return k.$$typeof===Y?null:k.displayName||k.name||null;if(typeof k==="string")return k;switch(k){case w:return"Fragment";case T:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case J:return"SuspenseList";case te:return"Activity"}if(typeof k==="object")switch(typeof k.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case S:return"Portal";case H:return k.displayName||"Context";case D:return(k._context.displayName||"Context")+".Consumer";case z:var X=k.render;return k=k.displayName,k||(k=X.displayName||X.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case V:return X=k.displayName||null,X!==null?X:e(k.type)||"Memo";case P:X=k._payload,k=k._init;try{return e(k(X))}catch(de){}}return null}function t(k){return""+k}function n(k){try{t(k);var X=!1}catch(Re){X=!0}if(X){X=console;var de=X.error,xe=typeof Symbol==="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return de.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",xe),t(k)}}function a(k){if(k===w)return"<>";if(typeof k==="object"&&k!==null&&k.$$typeof===P)return"<...>";try{var X=e(k);return X?"<"+X+">":"<...>"}catch(de){return"<...>"}}function i(){var k=ge.A;return k===null?null:k.getOwner()}function l(){return Error("react-stack-top-frame")}function c(k){if(ue.call(k,"key")){var X=Object.getOwnPropertyDescriptor(k,"key").get;if(X&&X.isReactWarning)return!1}return k.key!==void 0}function u(k,X){function de(){U||(U=!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)",X))}de.isReactWarning=!0,Object.defineProperty(k,"key",{get:de,configurable:!0})}function f(){var k=e(this.type);return W[k]||(W[k]=!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.")),k=this.props.ref,k!==void 0?k:null}function h(k,X,de,xe,Re,Ke){var Ce=de.ref;return k={$$typeof:v,type:k,key:X,props:de,_owner:xe},(Ce!==void 0?Ce:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:f}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Re}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ke}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function m(k,X,de,xe,Re,Ke){var Ce=X.children;if(Ce!==void 0)if(xe)if(ie(Ce)){for(xe=0;xe<Ce.length;xe++)b(Ce[xe]);Object.freeze&&Object.freeze(Ce)}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 b(Ce);if(ue.call(X,"key")){Ce=e(k);var Je=Object.keys(X).filter(function(Ne){return Ne!=="key"});xe=0<Je.length?"{key: someKey, "+Je.join(": ..., ")+": ...}":"{key: someKey}",re[Ce+xe]||(Je=0<Je.length?"{"+Je.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} />`,xe,Ce,Je,Ce),re[Ce+xe]=!0)}if(Ce=null,de!==void 0&&(n(de),Ce=""+de),c(X)&&(n(X.key),Ce=""+X.key),"key"in X){de={};for(var he in X)he!=="key"&&(de[he]=X[he])}else de=X;return Ce&&u(de,typeof k==="function"?k.displayName||k.name||"Unknown":k),h(k,Ce,de,i(),Re,Ke)}function b(k){y(k)?k._store&&(k._store.validated=1):typeof k==="object"&&k!==null&&k.$$typeof===P&&(k._payload.status==="fulfilled"?y(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function y(k){return typeof k==="object"&&k!==null&&k.$$typeof===v}var v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),H=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),Y=Symbol.for("react.client.reference"),ge=vd.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=Object.prototype.hasOwnProperty,ie=Array.isArray,_=console.createTask?console.createTask:function(){return null};vd={react_stack_bottom_frame:function(k){return k()}};var U,W={},Q=vd.react_stack_bottom_frame.bind(vd,l)(),pe=_(a(l)),re={};jQ.Fragment=w,jQ.jsxDEV=function(k,X,de,xe){var Re=1e4>ge.recentlyCreatedOwnerStacks++;return m(k,X,de,xe,Re?Error("react-stack-top-frame"):Q,Re?_(a(k)):pe)}})()});var Ip,KQ,On=({label:e,description:t,errorMessage:n,placeholder:a,size:i,rootClassName:l,inputClassName:c,...u})=>Ip.jsxDEV(Lg,{...u,className:`flex w-full flex-col gap-3 ${l??""}`,children:[Ip.jsxDEV(vc,{className:"text-panel-heading font-medium text-fg",children:e},void 0,!1,void 0,this),Ip.jsxDEV(KQ,{className:c,placeholder:a,fieldSize:i},void 0,!1,void 0,this),t?Ip.jsxDEV(Wi,{slot:"description",className:"text-label text-fg-muted",children:t},void 0,!1,void 0,this):null,Ip.jsxDEV(ud,{className:"text-label text-danger",children:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var Hx=N(()=>{Yr();$n();Ip=K(Rt(),1),KQ=ze(dd,{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 Bp,qQ,Fx=({label:e,description:t,errorMessage:n,placeholder:a,rows:i,...l})=>Bp.jsxDEV(Lg,{...l,className:"flex w-full flex-col gap-2",children:[Bp.jsxDEV(vc,{className:"text-small font-medium text-fg",children:e},void 0,!1,void 0,this),Bp.jsxDEV(qQ,{placeholder:a,rows:i},void 0,!1,void 0,this),t?Bp.jsxDEV(Wi,{slot:"description",className:"text-label text-fg-muted",children:t},void 0,!1,void 0,this):null,Bp.jsxDEV(ud,{className:"text-label text-danger",children:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var B_=N(()=>{Yr();$n();Bp=K(Rt(),1),qQ=ze(VR,{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 qR(e){let t=e.trim();return/^(https?:\/\/|mailto:|tel:|\/|#)/i.test(t)?t:null}var GR="Only http(s), mailto, tel, or relative (/, #) links are allowed.";var WR,GQ;var Ws=N(()=>{WR=K(ae(),1),GQ=WR.createContext(!1)});var z_;var H_=N(()=>{_s();Ws();z_=K(ae(),1)});var Ys,WQ,eEe;var F_=N(()=>{_s();Ws();Ys=K(ae(),1),WQ=K(jr(),1),eEe=Ys.createContext(null)});var U_=()=>{};var V_=()=>{};var j_=()=>{};var uEe,YQ;var YR=N(()=>{Yr();$n();Ws();uEe=ze(Xa,{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"}),YQ=ze(Gs,{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 mEe,gEe;var K_=N(()=>{Yr();$n();Ws();mEe=ze(dd,{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"}),gEe=ze(Gs,{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 JR,SEe;var q_=N(()=>{Yr();_s();$n();Ws();JR=K(ae(),1),SEe=ze(Gs,{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 G_=()=>{};var W_=()=>{};var Y_=()=>{};var J_=()=>{};var eZ;var X_=N(()=>{Qi();Ws();eZ=K(ae(),1)});var XR=()=>{};var Q_=N(()=>{_s();XR();Ws()});var Ux,Vx,jx;var xd=N(()=>{Yr();$n();Ux=ze(Pp,{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"}),Vx=ze(Pg,{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"}),jx=Dx});var VEe,jEe,KEe;var Z_=N(()=>{Yr();$n();VEe=ze(Pp,{displayName:"SidePanel.Overlay",baseClass:"fixed inset-0 z-50 flex justify-end bg-modal-backdrop backdrop-blur-modal-backdrop data-[entering]:animate-modal-overlay-in data-[exiting]:animate-modal-overlay-out motion-reduce:data-[entering]:animate-none motion-reduce:data-[exiting]:animate-none"}),jEe=ze(Pg,{displayName:"SidePanel.Surface",baseClass:"ml-auto flex h-dvh w-full flex-col overflow-hidden bg-surface outline-none shadow-modal-surface sm:rounded-l-lg data-[entering]:animate-side-panel-in data-[exiting]:animate-side-panel-out motion-reduce:data-[entering]:animate-none motion-reduce:data-[exiting]:animate-none",variants:{size:{sm:"sm:max-w-sm",md:"sm:max-w-md",lg:"sm:max-w-lg"}},defaultVariants:{size:"md"}}),KEe=ze(Xa,{displayName:"SidePanel.Close",baseClass:"inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-full text-fg-subtle outline-none transition-colors hover:bg-surface-muted hover:text-fg data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2"})});var YEe,JEe;var eI=N(()=>{Yr();$n();YEe=ze(gd,{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"}}}),JEe=ze(vT,{displayName:"DropdownMenuSeparator",baseClass:"my-2 h-px border-0 bg-border"})});var Kx,eTe;var tI=N(()=>{Yr();$n();Kx=K(ae(),1),eTe=ze(gd,{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 QR=()=>{};var sTe;var nI=N(()=>{Yr();sTe=new _g({maxVisibleToasts:5})});var dTe,fTe;var rI=N(()=>{Yr();$n();dTe=ze(kR,{displayName:"Disclosure"}),fTe=ze(AR,{displayName:"DisclosurePanel"})});var oI=()=>{};var bTe,yTe,vTe;var aI=N(()=>{Yr();$n();bTe=ze(HR,{displayName:"TabList",baseClass:"flex gap-2 border-b border-border"}),yTe=ze(FR,{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"}),vTe=ze(UR,{displayName:"TabPanel",baseClass:"py-4 text-small text-fg outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring"})});var iI=N(()=>{Qi()});var sI=()=>{};var rZ,ETe,qx,Gx;var ZR=N(()=>{$n();rZ=ze("h2",{displayName:"DisplayHeading",baseClass:"text-display-large font-medium text-fg"}),ETe=ze("h3",{displayName:"PanelHeading",baseClass:"text-panel-heading font-medium text-fg"}),qx=ze("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"}}),Gx=ze("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 lI=N(()=>{QR()});var cI;var uI=N(()=>{$n();cI=ze("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 PTe;var dI=N(()=>{$n();PTe=ze("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 ITe;var fI=N(()=>{$n();ITe=ze("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 pI,HTe,FTe,UTe;var hI=N(()=>{$n();pI=K(ae(),1),HTe=ze("div",{displayName:"AppShell",baseClass:"grid h-screen w-full overflow-hidden bg-surface grid-rows-[100%] grid-cols-[1fr] md:grid-cols-[auto_1fr]"}),FTe=ze("aside",{displayName:"AppShell.Sidebar",baseClass:"h-full w-64 shrink-0 overflow-y-auto border-r border-border bg-surface"}),UTe=ze("main",{displayName:"AppShell.Main",baseClass:"min-w-0 flex-1 bg-surface px-6 pb-6 pt-6"})});var mI,oZ,aZ,iZ,sZ=(e)=>mI.jsxDEV(iZ,{...e},void 0,!1,void 0,this),lZ,cZ,qTe,GTe,zg;var gI=N(()=>{Yr();$n();mI=K(Rt(),1),oZ=ze("header",{displayName:"Topbar",baseClass:"flex h-14 w-full items-center gap-5 border-b border-border"}),aZ=ze("div",{displayName:"Topbar.Brand",baseClass:"flex min-w-0 items-center gap-3 text-compact leading-4 font-medium tracking-tight text-fg"}),iZ=ze("nav",{displayName:"Topbar.Nav",baseClass:"ml-auto flex min-w-0 items-center gap-2 overflow-x-auto"}),lZ=ze("div",{displayName:"Topbar.Actions",baseClass:"ml-auto flex items-center gap-4"}),cZ=ze("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"]}),qTe=ze(Gs,{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"}),GTe=ze(gd,{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"}),zg=Object.assign(oZ,{Brand:aZ,Nav:sZ,NavLink:cZ,Actions:lZ})});var uZ,JTe;var bI=N(()=>{$n();uZ=K(ae(),1),JTe=ze("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 yI=()=>{};var Wx;var vI=N(()=>{Qi();ZR();Wx=K(ae(),1)});var e3;var t3=N(()=>{e3=K(ae(),1)});var xI=()=>{};var $I=N(()=>{t3()});var zp,SI,CI=(e)=>zp.jsxDEV("svg",{...SI,...e,children:[zp.jsxDEV("circle",{cx:"12",cy:"12",r:"4"},void 0,!1,void 0,this),zp.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),wI=(e)=>zp.jsxDEV("svg",{...SI,...e,children:zp.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 Yx=N(()=>{zp=K(Rt(),1),SI={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0}});var EI=()=>{};var n3;var r3=N(()=>{Yx();n3=K(ae(),1)});var dZ;var TI=N(()=>{r3();dZ=K(ae(),1)});var RI;var kI=N(()=>{Yx();RI=K(ae(),1)});var AI=()=>{};var MI;var NI=N(()=>{Qi();xd();MI=K(ae(),1)});var OI;var DI=N(()=>{Qi();xd();OI=K(ae(),1)});var fZ;var PI=N(()=>{Qi();xd();fZ=K(ae(),1)});var LI;var _I=N(()=>{Qi();xd();Hx();LI=K(ae(),1)});var pZ;var II=N(()=>{Qi();xd();Hx();YR();pZ=K(ae(),1)});var HRe,FRe;var BI=N(()=>{$n();HRe=ze("div",{displayName:"DeliveryStatusModule",baseClass:"grid gap-3 rounded-md bg-surface-inverted p-4 text-fg-inverted"}),FRe=ze("span",{displayName:"DeliveryStatusPill",baseClass:"inline-flex min-h-5 items-center rounded-full border border-white/30 px-3"})});var Zi=N(()=>{$n();Qi();Hx();B_();H_();F_();Ws();U_();V_();j_();YR();K_();q_();G_();W_();Y_();J_();X_();XR();Q_();xd();Z_();eI();tI();QR();nI();rI();oI();aI();iI();sI();ZR();lI();uI();dI();fI();hI();gI();bI();yI();vI();t3();xI();$I();Yx();EI();TI();r3();kI();AI();NI();DI();PI();_I();II();BI()});function Xx(e){try{let t=String(e).split(".")[1];if(!t)return!1;let n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp==="number"&&Date.now()>=n.exp*1000}catch{return!1}}function zI(){try{let e=localStorage.getItem(o3);if(e)return JSON.parse(e)}catch{}return{baseUrl:"http://localhost:8787",token:"",tenant:"main"}}function HI(e){localStorage.setItem(o3,JSON.stringify(e))}function FI(){try{localStorage.removeItem(o3)}catch{}}class a3{cfg;onExpired;constructor(e,t){this.cfg=e;this.onExpired=t}setConfig(e){this.cfg=e}base(){return this.cfg.baseUrl.replace(/\/+$/,"")}async call(e,t){if(this.onExpired&&this.cfg.token&&Xx(this.cfg.token))return this.onExpired(),new Promise(()=>{});let n=new Headers({"content-type":"application/json","x-pramen-tenant":this.cfg.tenant||"main"});if(this.cfg.token)n.set("authorization",`Bearer ${this.cfg.token}`);let a=await fetch(`${this.base()}/rpc/${e}`,{method:"POST",headers:n,body:JSON.stringify(t??{})}),i;try{i=await a.json()}catch{throw new Hp(`non-JSON response (HTTP ${a.status})`,"bad_response",a.status)}if(i.ok!==!0){let l=i.error??`request failed (HTTP ${a.status})`,c=a.status===403?" — check your token has an editor/reviewer role":"";throw new Hp(l+c,i.code??"error",a.status)}return i.result}async put(e,t,n){let a=e.startsWith("http")?e:`${this.base()}${e}`,i=await fetch(a,{method:"PUT",headers:{"content-type":n},body:t});if(!i.ok)throw new Hp(`upload failed (HTTP ${i.status})`,"upload_failed",i.status)}resolve(e){return e.startsWith("http")?e:`${this.base()}${e}`}listBlockTypes=()=>this.call("listBlockTypes");listContentTypes=()=>this.call("listContentTypes");getContentType=(e)=>this.call("getContentType",{id:e});listPages=()=>this.call("listPages");getPagePreview=(e,t)=>this.call("getPage",{slug:e,locale:t,preview:!0});listPageAudit=(e)=>this.call("listPageAudit",{pageId:e});listMedia=(e=50,t=0)=>this.call("listMedia",{limit:e,offset:t});getMedia=(e)=>this.call("getMedia",{id:e});updateMedia=(e,t)=>this.call("updateMedia",{id:e,alt:t});deleteMedia=(e)=>this.call("deleteMedia",{id:e});listTrash=(e=50)=>this.call("listTrash",{limit:e});restoreMedia=(e)=>this.call("restoreMedia",{id:e});purgeMedia=(e)=>this.call("purgeMedia",{id:e});async uploadMedia(e){let t=e.type||"application/octet-stream",n=await this.call("signMediaUpload",{contentType:t,filename:e.name});return await this.put(n.url,await e.arrayBuffer(),t),this.call("createMedia",{ref:n.ref,alt:e.name})}}var Hp,o3="pramen.cmsEditor";var i3=N(()=>{Hp=class Hp extends Error{code;status;constructor(e,t,n){super(e);this.code=t;this.status=n;this.name="ApiError"}}});function UI(e){if(typeof e!=="string")return;let t=e.trim();return t===""?void 0:t}function hZ(e){let t=UI(e?.name);if(e!==void 0&&e!==null&&t===void 0)console.warn('pramen/cms-editor: `brand` is set but has no usable `name`, so the wordmark stays "pramen". Expected `brand: { name: "Your name" }`.');let n=t??"pramen",a=e?.suffix===void 0?"cms":UI(e.suffix)??null;return{name:n,suffix:a,title:a?`${n} · ${a}`:n,spoken:a?`${n} ${a}`:n}}function mZ(e){return e?.PRAMEN_CMS_EDITOR?.brand}function KI(e){return e.name==="pramen"&&e.suffix==="cms"}var Ko,VI,jI;var Qx=N(()=>{Ko=hZ(mZ(globalThis)),VI=Ko.suffix?`· ${Ko.suffix}${KI(Ko)?" editor":""}`:"",jI=KI(Ko)?`${Ko.title} editor`:Ko.title});var s3;var qI=N(()=>{s3={locales:["en"],defaultLocale:"en",multilingual:!1}});function l3(){FI(),location.replace(Hg)}function Kn(){let e=Dn.use(GI);if(!e)throw Error("useApp must be used within <AppProvider>");return e}function WI({children:e}){let[t,n]=Dn.useState(zI()),[a,i]=Dn.useState(null),[l,c]=Dn.useState([]),[u,f]=Dn.useState(s3),[h,m]=Dn.useState(""),b=Boolean(t.baseUrl&&t.token)&&!Xx(t.token),y=Dn.useMemo(()=>new a3(t,Hg?l3:void 0),[t]),v=Dn.useRef(null),S=Dn.useCallback((T)=>{v.current=T},[]),w=Dn.useCallback(()=>v.current?.()??!0,[]);if(Dn.useEffect(()=>{if(!Hg)return;let T=()=>{if(!t.token||Xx(t.token))l3()};T();let D=()=>{if(!document.hidden)T()},H=window.setInterval(T,30000);return window.addEventListener("visibilitychange",D),window.addEventListener("focus",T),()=>{window.clearInterval(H),window.removeEventListener("visibilitychange",D),window.removeEventListener("focus",T)}},[t.token]),Dn.useEffect(()=>{if(!b)return;y.call("me").then(i).catch(()=>i({})),y.call("listCollections").then(c).catch(()=>c([])),y.call("listCmsCapabilities").then(f).catch(()=>f(s3))},[y,b]),!b)return Hg?null:mo.jsxDEV(gZ,{cfg:t,onSave:(T)=>{HI(T),n(T)}},void 0,!1,void 0,this);let E={api:y,cfg:t,me:a,isAdmin:(a?.roles??[]).includes("admin"),collections:l,cms:u,error:h,setError:m,confirmNavigation:w,setNavGuard:S,reconfigure:()=>{if(Hg){l3();return}i(null),m(""),n({...t,token:""})}};return mo.jsxDEV(GI,{value:E,children:e},void 0,!1,void 0,this)}function gZ({cfg:e,onSave:t}){let[n,a]=Dn.useState(e);return mo.jsxDEV("div",{className:"mx-auto mt-[14vh] w-full max-w-[520px] px-6",children:mo.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:[mo.jsxDEV("h1",{className:"mb-4 text-display text-fg",children:[Ko.name," ",mo.jsxDEV("span",{className:"text-fg-subtle",children:VI},void 0,!1,void 0,this)]},void 0,!0,void 0,this),mo.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 (",mo.jsxDEV("code",{children:"CORS_ORIGINS"},void 0,!1,void 0,this),")."]},void 0,!0,void 0,this),mo.jsxDEV("div",{className:"flex flex-col gap-4",children:[mo.jsxDEV(On,{label:"Worker base URL",value:n.baseUrl,onChange:(i)=>a({...n,baseUrl:i}),placeholder:"https://your-worker.workers.dev"},void 0,!1,void 0,this),mo.jsxDEV(On,{label:"Tenant",value:n.tenant,onChange:(i)=>a({...n,tenant:i}),placeholder:"main"},void 0,!1,void 0,this),mo.jsxDEV(On,{label:"Bearer token (editor or reviewer)",value:n.token,onChange:(i)=>a({...n,token:i}),placeholder:"eyJ…"},void 0,!1,void 0,this),mo.jsxDEV(we,{className:"mt-2 w-full",onPress:()=>t(n),isDisabled:!n.baseUrl||!n.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 Dn,mo,Hg,GI;var ri=N(()=>{Zi();i3();Qx();qI();Dn=K(ae(),1),mo=K(Rt(),1),Hg=typeof window<"u"&&!new URLSearchParams(window.location.search).has("setup")?window.PRAMEN_CMS_EDITOR?.signInUrl:void 0;GI=Dn.createContext(null)});function Ar(e){this.content=e}var u3;var JI=N(()=>{Ar.prototype={constructor:Ar,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var a=n&&n!=e?this.remove(n):this,i=a.find(e),l=a.content.slice();if(i==-1)l.push(n||e,t);else if(l[i+1]=t,n)l[i]=n;return new Ar(l)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Ar(n)},addToStart:function(e,t){return new Ar([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Ar(n)},addBefore:function(e,t,n){var a=this.remove(t),i=a.content.slice(),l=a.find(e);return i.splice(l==-1?i.length:l,0,t,n),new Ar(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){if(e=Ar.from(e),!e.size)return this;return new Ar(e.content.concat(this.subtract(e).content))},append:function(e){if(e=Ar.from(e),!e.size)return this;return new Ar(this.subtract(e).content.concat(e.content))},subtract:function(e){var t=this;e=Ar.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Ar.from=function(e){if(e instanceof Ar)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ar(t)};u3=Ar});function iB(e,t,n){for(let a=0;;a++){if(a==e.childCount||a==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(a),l=t.child(a);if(i==l){n+=i.nodeSize;continue}if(!i.sameMarkup(l))return n;if(i.isText&&i.text!=l.text){let c=i.text,u=l.text,f=0;for(;c[f]==u[f];f++)n++;if(f&&f<c.length&&f<u.length&&cB(c.charCodeAt(f-1))&&lB(c.charCodeAt(f)))n--;return n}if(i.content.size||l.content.size){let c=iB(i.content,l.content,n+1);if(c!=null)return c}n+=i.nodeSize}}function sB(e,t,n,a){for(let i=e.childCount,l=t.childCount;;){if(i==0||l==0)return i==l?null:{a:n,b:a};let c=e.child(--i),u=t.child(--l),f=c.nodeSize;if(c==u){n-=f,a-=f;continue}if(!c.sameMarkup(u))return{a:n,b:a};if(c.isText&&c.text!=u.text){let h=c.text,m=u.text,b=h.length,y=m.length;while(b>0&&y>0&&h[b-1]==m[y-1])b--,y--,n--,a--;if(b&&y&&b<h.length&&cB(h.charCodeAt(b-1))&&lB(h.charCodeAt(b)))n++,a++;return{a:n,b:a}}if(c.content.size||u.content.size){let h=sB(c.content,u.content,n-1,a-1);if(h)return h}n-=f,a-=f}}function lB(e){return e>=56320&&e<57344}function cB(e){return e>=55296&&e<56320}class le{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,a=0,i){for(let l=0,c=0;c<t;l++){let u=this.content[l],f=c+u.nodeSize;if(f>e&&n(u,a+c,i||null,l)!==!1&&u.content.size){let h=c+1;u.nodesBetween(Math.max(0,e-h),Math.min(u.content.size,t-h),n,a+h)}c=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,a){let i="",l=!0;return this.nodesBetween(e,t,(c,u)=>{let f=c.isText?c.text.slice(Math.max(e,u)-u,t-u):!c.isLeaf?"":a?typeof a==="function"?a(c):a:c.type.spec.leafText?c.type.spec.leafText(c):"";if(c.isBlock&&(c.isLeaf&&f||c.isTextblock)&&n)if(l)l=!1;else i+=n;i+=f},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,a=this.content.slice(),i=0;if(t.isText&&t.sameMarkup(n))a[a.length-1]=t.withText(t.text+n.text),i=1;for(;i<e.content.length;i++)a.push(e.content[i]);return new le(a,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],a=0;if(t>e)for(let i=0,l=0;l<t;i++){let c=this.content[i],u=l+c.nodeSize;if(u>e){if(l<e||u>t)if(c.isText)c=c.cut(Math.max(0,e-l),Math.min(c.text.length,t-l));else c=c.cut(Math.max(0,e-l-1),Math.min(c.content.size,t-l-1));n.push(c),a+=c.nodeSize}l=u}return new le(n,a)}cutByIndex(e,t){if(e==t)return le.empty;if(e==0&&t==this.content.length)return this;return new le(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let a=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return a[e]=t,new le(a,i)}addToStart(e){return new le([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new le(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let a=this.content[t];e(a,n,t),n+=a.nodeSize}}findDiffStart(e,t=0){return iB(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return sB(this,e,t,n)}findIndex(e){if(e==0)return e1(0,e);if(e==this.size)return e1(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let a=this.child(t),i=n+a.nodeSize;if(i>=e){if(i==e)return e1(t+1,i);return e1(t,n)}n=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e)=>e.toJSON()):null}static fromJSON(e,t){if(!t)return le.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return le.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return le.empty;let t,n=0;for(let a=0;a<e.length;a++){let i=e[a];if(n+=i.nodeSize,a&&i.isText&&e[a-1].sameMarkup(i)){if(!t)t=e.slice(0,a);t[t.length-1]=i.withText(t[t.length-1].text+i.text)}else if(t)t.push(i)}return new le(t||e,n)}static from(e){if(!e)return le.empty;if(e instanceof le)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new le([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}function e1(e,t){return d3.index=e,d3.offset=t,d3}function r1(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let a=0;a<e.length;a++)if(!r1(e[a],t[a]))return!1}else{for(let a in e)if(!(a in t)||!r1(e[a],t[a]))return!1;for(let a in t)if(!(a in e))return!1}return!0}class Pt{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let a=0;a<e.length;a++){let i=e[a];if(this.eq(i))return e;if(this.type.excludes(i.type)){if(!t)t=e.slice(0,a)}else if(i.type.excludes(this.type))return e;else{if(!n&&i.type.rank>this.type.rank){if(!t)t=e.slice(0,a);t.push(this),n=!0}if(t)t.push(i)}}if(!t)t=e.slice();if(!n)t.push(this);return t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&r1(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let a=n.create(t.attrs);return n.checkAttrs(a.attrs),a}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Pt.none;if(e instanceof Pt)return[e];let t=e.slice();return t.sort((n,a)=>n.type.rank-a.type.rank),t}}class Se{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=dB(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new Se(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Se(uB(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};if(this.openStart>0)e.openStart=this.openStart;if(this.openEnd>0)e.openEnd=this.openEnd;return e}static fromJSON(e,t){if(!t)return Se.empty;let n=t.openStart||0,a=t.openEnd||0;if(typeof n!="number"||typeof a!="number")throw RangeError("Invalid input for Slice.fromJSON");return new Se(le.fromJSON(e,t.content),n,a)}static maxOpen(e,t=!0){let n=0,a=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)a++;return new Se(e,n,a)}}function uB(e,t,n){let{index:a,offset:i}=e.findIndex(t),l=e.maybeChild(a),{index:c,offset:u}=e.findIndex(n);if(i==t||l.isText){if(u!=n&&!e.child(c).isText)throw RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(a!=c)throw RangeError("Removing non-flat range");return e.replaceChild(a,l.copy(uB(l.content,t-i-1,n-i-1)))}function dB(e,t,n,a,i,l){let{index:c,offset:u}=e.findIndex(t),f=e.maybeChild(c);if(u==t||f.isText){if(l&&a<=0&&i<=0&&!l.canReplace(c,c,n))return null;return e.cut(0,t).append(n).append(e.cut(t))}let h=dB(f.content,t-u-1,n,c==0?a-1:0,c==e.childCount-1?i-1:0,f);return h&&e.replaceChild(c,f.copy(h))}function bZ(e,t,n){if(n.openStart>e.depth)throw new Cd("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Cd("Inconsistent open depths");return fB(e,t,n,0)}function fB(e,t,n,a){let i=e.index(a),l=e.node(a);if(i==t.index(a)&&a<e.depth-n.openStart){let c=fB(e,t,n,a+1);return l.copy(l.content.replaceChild(i,c))}else if(!n.content.size)return Sd(l,o1(e,t,a));else if(!n.openStart&&!n.openEnd&&e.depth==a&&t.depth==a){let c=e.parent,u=c.content;return Sd(c,u.cut(0,e.parentOffset).append(n.content).append(u.cut(t.parentOffset)))}else{let{start:c,end:u}=yZ(n,e);return Sd(l,hB(e,c,u,t,a))}}function pB(e,t){if(!t.type.compatibleContent(e.type))throw new Cd("Cannot join "+t.type.name+" onto "+e.type.name)}function f3(e,t,n){let a=e.node(n);return pB(a,t.node(n)),a}function $d(e,t){let n=t.length-1;if(n>=0&&e.isText&&e.sameMarkup(t[n]))t[n]=e.withText(t[n].text+e.text);else t.push(e)}function Ug(e,t,n,a){let i=(t||e).node(n),l=0,c=t?t.index(n):i.childCount;if(e){if(l=e.index(n),e.depth>n)l++;else if(e.textOffset)$d(e.nodeAfter,a),l++}for(let u=l;u<c;u++)$d(i.child(u),a);if(t&&t.depth==n&&t.textOffset)$d(t.nodeBefore,a)}function Sd(e,t){if(!e.type.validContent(t))throw new Cd("Invalid content for node "+e.type.name);return e.copy(t)}function hB(e,t,n,a,i){let l=e.depth>i&&f3(e,t,i+1),c=a.depth>i&&f3(n,a,i+1),u=[];if(Ug(null,e,i,u),l&&c&&t.index(i)==n.index(i))pB(l,c),$d(Sd(l,hB(e,t,n,a,i+1)),u);else{if(l)$d(Sd(l,o1(e,t,i+1)),u);if(Ug(t,n,i,u),c)$d(Sd(c,o1(n,a,i+1)),u)}return Ug(a,null,i,u),new le(u)}function o1(e,t,n){let a=[];if(Ug(null,e,n,a),e.depth>n){let i=f3(e,t,n+1);$d(Sd(i,o1(e,t,n+1)),a)}return Ug(t,null,n,a),new le(a)}function yZ(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let l=n-1;l>=0;l--)i=t.node(l).copy(le.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class jg{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){if(e==null)return this.depth;if(e<0)return this.depth+e;return e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],a=e.child(t);return n?e.child(t).cut(n):a}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];if(t)return this.parent.child(e).cut(0,t);return e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],a=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)a+=n.child(i).nodeSize;return a}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Pt.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),a=e.maybeChild(t);if(!n){let c=n;n=a,a=c}let i=n.marks;for(var l=0;l<i.length;l++)if(i[l].type.spec.inclusive===!1&&(!a||!i[l].isInSet(a.marks)))i=i[l--].removeFromSet(i);return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,a=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)if(n[i].type.spec.inclusive===!1&&(!a||!n[i].isInSet(a.marks)))n=n[i--].removeFromSet(n);return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Fp(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],a=0,i=t;for(let l=e;;){let{index:c,offset:u}=l.content.findIndex(i),f=i-u;if(n.push(l,c,a+u),!f)break;if(l=l.child(c),l.isText)break;i=f-1,a+=u+1}return new jg(t,n,i)}static resolveCached(e,t){let n=XI.get(e);if(n)for(let i=0;i<n.elts.length;i++){let l=n.elts[i];if(l.pos==t)return l}else XI.set(e,n=new mB);let a=n.elts[n.i]=jg.resolve(e,t);return n.i=(n.i+1)%vZ,a}}class mB{constructor(){this.elts=[],this.i=0}}class Fp{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}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 Mr{constructor(e,t,n,a=Pt.none){this.type=e,this.attrs=t,this.marks=a,this.content=n||le.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,a=0){this.content.nodesBetween(e,t,n,a,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,a){return this.content.textBetween(e,t,n,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&r1(this.attrs,t||e.defaultAttrs||xZ)&&Pt.sameSet(this.marks,n||Pt.none)}copy(e=null){if(e==this.content)return this;return new Mr(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Mr(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){if(e==0&&t==this.content.size)return this;return this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return Se.empty;let a=this.resolve(e),i=this.resolve(t),l=n?0:a.sharedDepth(t),c=a.start(l),f=a.node(l).content.cut(a.pos-c,i.pos-c);return new Se(f,a.depth-l,i.depth-l)}replace(e,t,n){return bZ(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:a}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(a==e||t.isText)return t;e-=a+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let a=this.content.child(t-1);return{node:a,index:t-1,offset:n-a.nodeSize}}resolve(e){return jg.resolveCached(this,e)}resolveNoCache(e){return jg.resolve(this,e)}rangeHasMark(e,t,n){let a=!1;if(t>e)this.nodesBetween(e,t,(i)=>{if(n.isInSet(i.marks))a=!0;return!a});return a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;if(this.content.size)e+="("+this.content.toStringInner()+")";return gB(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=le.empty,a=0,i=n.childCount){let l=this.contentMatchAt(e).matchFragment(n,a,i),c=l&&l.matchFragment(this.content,t);if(!c||!c.validEnd)return!1;for(let u=a;u<i;u++)if(!this.type.allowsMarks(n.child(u).marks))return!1;return!0}canReplaceWith(e,t,n,a){if(a&&!this.type.allowsMarks(a))return!1;let i=this.contentMatchAt(e).matchType(n),l=i&&i.matchFragment(this.content,t);return l?l.validEnd:!1}canAppend(e){if(e.content.size)return this.canReplace(this.childCount,this.childCount,e.content);else return this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Pt.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Pt.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t)=>t.type.name)}`);this.content.forEach((t)=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}if(this.content.size)e.content=this.content.toJSON();if(this.marks.length)e.marks=this.marks.map((t)=>t.toJSON());return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Node.fromJSON");let n=void 0;if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let a=le.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,a,n);return i.type.checkAttrs(i.attrs),i}}function gB(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class wd{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new bB(e,t);if(n.next==null)return wd.empty;let a=yB(n);if(n.next)n.err("Unexpected trailing text");let i=RZ(TZ(a));return kZ(i,n),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let a=this;for(let i=t;a&&i<n;i++)a=a.matchType(e.child(i).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let a=[this];function i(l,c){let u=l.matchFragment(e,n);if(u&&(!t||u.validEnd))return le.from(c.map((f)=>f.createAndFill()));for(let f=0;f<l.next.length;f++){let{type:h,next:m}=l.next[f];if(!(h.isText||h.hasRequiredAttrs())&&a.indexOf(m)==-1){a.push(m);let b=i(m,c.concat(h));if(b)return b}}return null}return i(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];while(n.length){let a=n.shift(),i=a.match;if(i.matchType(e)){let l=[];for(let c=a;c.type;c=c.via)l.push(c.type);return l.reverse()}for(let l=0;l<i.next.length;l++){let{type:c,next:u}=i.next[l];if(!c.isLeaf&&!c.hasRequiredAttrs()&&!(c.name in t)&&(!a.type||u.validEnd))n.push({match:c.contentMatch,type:c,via:a}),t[c.name]=!0}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let a=0;a<n.next.length;a++)if(e.indexOf(n.next[a].next)==-1)t(n.next[a].next)}return t(this),e.map((n,a)=>{let i=a+(n.validEnd?"*":" ")+" ";for(let l=0;l<n.next.length;l++)i+=(l?", ":"")+n.next[l].type.name+"->"+e.indexOf(n.next[l].next);return i}).join(`
|
|
252
|
+
`)}}class bB{constructor(e,t){if(this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function yB(e){let t=[];do t.push($Z(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function $Z(e){let t=[];do t.push(SZ(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function SZ(e){let t=EZ(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=CZ(e,t);else break;return t}function QI(e){if(/\D/.test(e.next))e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function CZ(e,t){let n=QI(e),a=n;if(e.eat(","))if(e.next!="}")a=QI(e);else a=-1;if(!e.eat("}"))e.err("Unclosed braced range");return{type:"range",min:n,max:a,expr:t}}function wZ(e,t){let n=e.nodeTypes,a=n[t];if(a)return[a];let i=[];for(let l in n){let c=n[l];if(c.isInGroup(t))i.push(c)}if(i.length==0)e.err("No node type or group '"+t+"' found");return i}function EZ(e){if(e.eat("(")){let t=yB(e);if(!e.eat(")"))e.err("Missing closing paren");return t}else if(!/\W/.test(e.next)){let t=wZ(e,e.next).map((n)=>{if(e.inline==null)e.inline=n.isInline;else if(e.inline!=n.isInline)e.err("Mixing inline and block content");return{type:"name",value:n}});return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}else e.err("Unexpected token '"+e.next+"'")}function TZ(e){let t=[[]];return i(l(e,0),n()),t;function n(){return t.push([])-1}function a(c,u,f){let h={term:f,to:u};return t[c].push(h),h}function i(c,u){c.forEach((f)=>f.to=u)}function l(c,u){if(c.type=="choice")return c.exprs.reduce((f,h)=>f.concat(l(h,u)),[]);else if(c.type=="seq")for(let f=0;;f++){let h=l(c.exprs[f],u);if(f==c.exprs.length-1)return h;i(h,u=n())}else if(c.type=="star"){let f=n();return a(u,f),i(l(c.expr,f),f),[a(f)]}else if(c.type=="plus"){let f=n();return i(l(c.expr,u),f),i(l(c.expr,f),f),[a(f)]}else if(c.type=="opt")return[a(u)].concat(l(c.expr,u));else if(c.type=="range"){let f=u;for(let h=0;h<c.min;h++){let m=n();i(l(c.expr,f),m),f=m}if(c.max==-1)i(l(c.expr,f),f);else for(let h=c.min;h<c.max;h++){let m=n();a(f,m),i(l(c.expr,f),m),f=m}return[a(f)]}else if(c.type=="name")return[a(u,void 0,c.value)];else throw Error("Unknown expr type")}}function vB(e,t){return t-e}function ZI(e,t){let n=[];return a(t),n.sort(vB);function a(i){let l=e[i];if(l.length==1&&!l[0].term)return a(l[0].to);n.push(i);for(let c=0;c<l.length;c++){let{term:u,to:f}=l[c];if(!u&&n.indexOf(f)==-1)a(f)}}}function RZ(e){let t=Object.create(null);return n(ZI(e,0));function n(a){let i=[];a.forEach((c)=>{e[c].forEach(({term:u,to:f})=>{if(!u)return;let h;for(let m=0;m<i.length;m++)if(i[m][0]==u)h=i[m][1];ZI(e,f).forEach((m)=>{if(!h)i.push([u,h=[]]);if(h.indexOf(m)==-1)h.push(m)})})});let l=t[a.join(",")]=new wd(a.indexOf(e.length-1)>-1);for(let c=0;c<i.length;c++){let u=i[c][1].sort(vB);l.next.push({type:i[c][0],next:t[u.join(",")]||n(u)})}return l}}function kZ(e,t){for(let n=0,a=[e];n<a.length;n++){let i=a[n],l=!i.validEnd,c=[];for(let u=0;u<i.next.length;u++){let{type:f,next:h}=i.next[u];if(c.push(f.name),l&&!(f.isText||f.hasRequiredAttrs()))l=!1;if(a.indexOf(h)==-1)a.push(h)}if(l)t.err("Only non-generatable nodes ("+c.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function xB(e){let t=Object.create(null);for(let n in e){let a=e[n];if(!a.hasDefault)return null;t[n]=a.default}return t}function $B(e,t){let n=Object.create(null);for(let a in e){let i=t&&t[a];if(i===void 0){let l=e[a];if(l.hasDefault)i=l.default;else throw RangeError("No value supplied for attribute "+a)}n[a]=i}return n}function SB(e,t,n,a){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${a}`);for(let i in e)if(e[i].validate)e[i].validate(t[i])}function CB(e,t){let n=Object.create(null);if(t)for(let a in t)n[a]=new wB(e,a,t[a]);return n}class i1{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=CB(e,n.attrs),this.defaultAttrs=xB(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==wd.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){if(!e&&this.defaultAttrs)return this.defaultAttrs;else return $B(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new Mr(this,this.computeAttrs(e),le.from(t),Pt.setFrom(n))}createChecked(e=null,t,n){return t=le.from(t),this.checkContent(t),new Mr(this,this.computeAttrs(e),t,Pt.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=le.from(t),t.size){let l=this.contentMatch.fillBefore(t);if(!l)return null;t=l.append(t)}let a=this.contentMatch.matchFragment(t),i=a&&a.fillBefore(le.empty,!0);if(!i)return null;return new Mr(this,e,t.append(i),Pt.setFrom(n))}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){SB(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type)){if(!t)t=e.slice(0,n)}else if(t)t.push(e[n]);return!t?e:t.length?t:Pt.none}static compile(e,t){let n=Object.create(null);e.forEach((i,l)=>n[i]=new i1(i,t,l));let a=t.spec.topNode||"doc";if(!n[a])throw RangeError("Schema is missing its top node type ('"+a+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}function AZ(e,t,n){let a=n.split("|");return(i)=>{let l=i===null?"null":typeof i;if(a.indexOf(l)<0)throw RangeError(`Expected value of type ${a} for attribute ${t} on type ${e}, got ${l}`)}}class wB{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?AZ(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class qg{constructor(e,t,n,a){this.name=e,this.rank=t,this.schema=n,this.spec=a,this.attrs=CB(e,a.attrs),this.excluded=null;let i=xB(this.attrs);this.instance=i?new Pt(this,i):null}create(e=null){if(!e&&this.instance)return this.instance;return new Pt(this,$B(this.attrs,e))}static compile(e,t){let n=Object.create(null),a=0;return e.forEach((i,l)=>n[i]=new qg(i,a++,t,l)),n}removeFromSet(e){for(var t=0;t<e.length;t++)if(e[t].type==this)e=e.slice(0,t).concat(e.slice(t+1)),t--;return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){SB(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Gg{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let a in e)t[a]=e[a];t.nodes=u3.from(e.nodes),t.marks=u3.from(e.marks||{}),this.nodes=i1.compile(this.spec.nodes,this),this.marks=qg.compile(this.spec.marks,this);let n=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw RangeError(a+" can not be both a node and a mark");let i=this.nodes[a],l=i.spec.content||"",c=i.spec.marks;if(i.contentMatch=n[l]||(n[l]=wd.parse(l,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=c=="_"?null:c?eB(this,c.split(" ")):c==""||!i.inlineContent?[]:null}for(let a in this.marks){let i=this.marks[a],l=i.spec.excludes;i.excluded=l==null?[i]:l==""?[]:eB(this,l.split(" "))}this.nodeFromJSON=(a)=>Mr.fromJSON(this,a),this.markFromJSON=(a)=>Pt.fromJSON(this,a),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,a){if(typeof e=="string")e=this.nodeType(e);else if(!(e instanceof i1))throw RangeError("Invalid node type: "+e);else if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")");return e.createChecked(t,n,a)}text(e,t){let n=this.nodes.text;return new a1(n,n.defaultAttrs,e,Pt.setFrom(t))}mark(e,t){if(typeof e=="string")e=this.marks[e];return e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function eB(e,t){let n=[];for(let a=0;a<t.length;a++){let i=t[a],l=e.marks[i],c=l;if(l)n.push(l);else for(let u in e.marks){let f=e.marks[u];if(i=="_"||f.spec.group&&f.spec.group.split(" ").indexOf(i)>-1)n.push(c=f)}if(!c)throw SyntaxError("Unknown mark type: '"+t[a]+"'")}return n}function MZ(e){return e.tag!=null}function NZ(e){return e.style!=null}class qo{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach((a)=>{if(MZ(a))this.tags.push(a);else if(NZ(a)){let i=/[^=]*/.exec(a.style)[0];if(n.indexOf(i)<0)n.push(i);this.styles.push(a)}}),this.normalizeLists=!this.tags.some((a)=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let i=e.nodes[a.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let n=new h3(this,t,!1);return n.addAll(e,Pt.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new h3(this,t,!0);return n.addAll(e,Pt.none,t.from,t.to),Se.maxOpen(n.finish())}matchTag(e,t,n){for(let a=n?this.tags.indexOf(n)+1:0;a<this.tags.length;a++){let i=this.tags[a];if(PZ(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let l=i.getAttrs(e);if(l===!1)continue;i.attrs=l||void 0}return i}}}matchStyle(e,t,n,a){for(let i=a?this.styles.indexOf(a)+1:0;i<this.styles.length;i++){let l=this.styles[i],c=l.style;if(c.indexOf(e)!=0||l.context&&!n.matchesContext(l.context)||c.length>e.length&&(c.charCodeAt(e.length)!=61||c.slice(e.length+1)!=t))continue;if(l.getAttrs){let u=l.getAttrs(t);if(u===!1)continue;l.attrs=u||void 0}return l}}static schemaRules(e){let t=[];function n(a){let i=a.priority==null?50:a.priority,l=0;for(;l<t.length;l++){let c=t[l];if((c.priority==null?50:c.priority)<i)break}t.splice(l,0,a)}for(let a in e.marks){let i=e.marks[a].spec.parseDOM;if(i)i.forEach((l)=>{if(n(l=nB(l)),!(l.mark||l.ignore||l.clearMark))l.mark=a})}for(let a in e.nodes){let i=e.nodes[a].spec.parseDOM;if(i)i.forEach((l)=>{if(n(l=nB(l)),!(l.node||l.ignore||l.mark))l.node=a})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new qo(e,qo.schemaRules(e)))}}function tB(e,t,n){if(t!=null)return(t?Kg:0)|(t==="full"?p3:0);return e&&e.whitespace=="pre"?Kg|p3:n&~Vg}class Fg{constructor(e,t,n,a,i,l){this.type=e,this.attrs=t,this.marks=n,this.solid=a,this.options=l,this.content=[],this.activeMarks=Pt.none,this.match=i||(l&Vg?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(le.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,a;if(a=n.findWrapping(e.type))return this.match=n,a;else return null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Kg)){let n=this.content[this.content.length-1],a;if(n&&n.isText&&(a=/[ \t\r\n\u000c]+$/.exec(n.text))){let i=n;if(n.text.length==a[0].length)this.content.pop();else this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-a[0].length))}}let t=le.from(this.content);if(!e&&this.match)t=t.append(this.match.fillBefore(le.empty,!0));return this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){if(this.type)return this.type.inlineContent;if(this.content.length)return this.content[0].isInline;return e.parentNode&&!EB.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class h3{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let a=t.topNode,i,l=tB(null,t.preserveWhitespace,0)|(n?Vg:0);if(a)i=new Fg(a.type,a.attrs,Pt.none,!0,t.topMatch||a.type.contentMatch,l);else if(n)i=new Fg(null,null,Pt.none,!0,null,l);else i=new Fg(e.schema.topNodeType,null,Pt.none,!0,null,l);this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){if(e.nodeType==3)this.addTextNode(e,t);else if(e.nodeType==1)this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,a=this.top,i=a.options&p3?"full":this.localPreserveWS||(a.options&Kg)>0,{schema:l}=this.parser;if(i==="full"||a.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let c=a.content[a.content.length-1],u=e.previousSibling;if(!c||u&&u.nodeName=="BR"||c.isText&&/[ \t\r\n\u000c]$/.test(c.text))n=n.slice(1)}}else if(i==="full")n=n.replace(/\r\n?/g,`
|
|
253
|
+
`);else if(l.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(l.linebreakReplacement.create())){let c=n.split(/\r?\n|\r/);for(let u=0;u<c.length;u++){if(u)this.insertNode(l.linebreakReplacement.create(),t,!0);if(c[u])this.insertNode(l.text(c[u]),t,!/\S/.test(c[u]))}n=""}else n=n.replace(/\r?\n|\r/g," ");if(n)this.insertNode(l.text(n),t,!/\S/.test(n));this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let a=this.localPreserveWS,i=this.top;if(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))this.localPreserveWS=!0;let l=e.nodeName.toLowerCase(),c;if(TB.hasOwnProperty(l)&&this.parser.normalizeLists)DZ(e);let u=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(c=this.parser.matchTag(e,this,n));e:if(u?u.ignore:OZ.hasOwnProperty(l))this.findInside(e),this.ignoreFallback(e,t);else if(!u||u.skip||u.closeParent){if(u&&u.closeParent)this.open=Math.max(0,this.open-1);else if(u&&u.skip.nodeType)e=u.skip;let f,h=this.needsBlock;if(EB.hasOwnProperty(l)){if(i.content.length&&i.content[0].isInline&&this.open)this.open--,i=this.top;if(f=!0,!i.type)this.needsBlock=!0}else if(!e.firstChild){this.leafFallback(e,t);break e}let m=u&&u.skip?t:this.readStyles(e,t);if(m)this.addAll(e,m);if(f)this.sync(i);this.needsBlock=h}else{let f=this.readStyles(e,t);if(f)this.addElementByRule(e,u,f,u.consuming===!1?c:void 0)}this.localPreserveWS=a}leafFallback(e,t){if(e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent)this.addTextNode(e.ownerDocument.createTextNode(`
|
|
254
|
+
`),t)}ignoreFallback(e,t){if(e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent))this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let i=this.parser.matchedStyles[a],l=n.getPropertyValue(i);if(l)for(let c=void 0;;){let u=this.parser.matchStyle(i,l,this,c);if(!u)break;if(u.ignore)return null;if(u.clearMark)t=t.filter((f)=>!u.clearMark(f));else t=t.concat(this.parser.schema.marks[u.mark].create(u.attrs));if(u.consuming===!1)c=u;else break}}return t}addElementByRule(e,t,n,a){let i,l;if(t.node){if(l=this.parser.schema.nodes[t.node],!l.isLeaf){let u=this.enter(l,t.attrs||null,n,t.preserveWhitespace);if(u)i=!0,n=u}else if(!this.insertNode(l.create(t.attrs),n,e.nodeName=="BR"))this.leafFallback(e,n)}else{let u=this.parser.schema.marks[t.mark];n=n.concat(u.create(t.attrs))}let c=this.top;if(l&&l.isLeaf)this.findInside(e);else if(a)this.addElement(e,n,a);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((u)=>this.insertNode(u,n,!1));else{let u=e;if(typeof t.contentElement=="string")u=e.querySelector(t.contentElement);else if(typeof t.contentElement=="function")u=t.contentElement(e);else if(t.contentElement)u=t.contentElement;this.findAround(e,u,!0),this.addAll(u,n),this.findAround(e,u,!1)}if(i&&this.sync(c))this.open--}addAll(e,t,n,a){let i=n||0;for(let l=n?e.childNodes[n]:e.firstChild,c=a==null?null:e.childNodes[a];l!=c;l=l.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(l,t);this.findAtPoint(e,i)}findPlace(e,t,n){let a,i;for(let l=this.open,c=0;l>=0;l--){let u=this.nodes[l],f=u.findWrapping(e);if(f&&(!a||a.length>f.length+c)){if(a=f,i=u,!f.length)break}if(u.solid){if(n)break;c+=2}}if(!a)return null;this.sync(i);for(let l=0;l<a.length;l++)t=this.enterInner(a[l],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();if(i)t=this.enterInner(i,null,t)}let a=this.findPlace(e,t,n);if(a){this.closeExtra();let i=this.top;if(i.match)i.match=i.match.matchType(e.type);let l=Pt.none;for(let c of a.concat(e.marks))if(i.type?i.type.allowsMarkType(c.type):rB(c.type,e.type))l=c.addToSet(l);return i.content.push(e.mark(l)),!0}return!1}enter(e,t,n,a){let i=this.findPlace(e.create(t),n,!1);if(i)i=this.enterInner(e,t,n,!0,a);return i}enterInner(e,t,n,a=!1,i){this.closeExtra();let l=this.top;l.match=l.match&&l.match.matchType(e);let c=tB(e,i,l.options);if(l.options&Vg&&l.content.length==0)c|=Vg;let u=Pt.none;return n=n.filter((f)=>{if(l.type?l.type.allowsMarkType(f.type):rB(f.type,e))return u=f.addToSet(u),!1;return!0}),this.nodes.push(new Fg(e,t,u,a,null,c)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else if(this.localPreserveWS)this.nodes[t].options|=Kg;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let a=n.length-1;a>=0;a--)e+=n[a].nodeSize;if(t)e++}return e}findAtPoint(e,t){if(this.find){for(let n=0;n<this.find.length;n++)if(this.find[n].node==e&&this.find[n].offset==t)this.find[n].pos=this.currentPos}}findInside(e){if(this.find){for(let t=0;t<this.find.length;t++)if(this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node))this.find[t].pos=this.currentPos}}findAround(e,t,n){if(e!=t&&this.find){for(let a=0;a<this.find.length;a++)if(this.find[a].pos==null&&e.nodeType==1&&e.contains(this.find[a].node)){if(t.compareDocumentPosition(this.find[a].node)&(n?2:4))this.find[a].pos=this.currentPos}}}findInText(e){if(this.find){for(let t=0;t<this.find.length;t++)if(this.find[t].node==e)this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset)}}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,a=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(a?0:1),l=(c,u)=>{for(;c>=0;c--){let f=t[c];if(f==""){if(c==t.length-1||c==0)continue;for(;u>=i;u--)if(l(c-1,u))return!0;return!1}else{let h=u>0||u==0&&a?this.nodes[u].type:n&&u>=i?n.node(u-i).type:null;if(!h||h.name!=f&&!h.isInGroup(f))return!1;u--}}return!0};return l(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];if(n.isTextblock&&n.defaultAttrs)return n}}}function DZ(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let a=t.nodeType==1?t.nodeName.toLowerCase():null;if(a&&TB.hasOwnProperty(a)&&n)n.appendChild(t),t=n;else if(a=="li")n=t;else if(a)n=null}}function PZ(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function nB(e){let t={};for(let n in e)t[n]=e[n];return t}function rB(e,t){let n=t.schema.nodes;for(let a in n){let i=n[a];if(!i.allowsMarkType(e))continue;let l=[],c=(u)=>{l.push(u);for(let f=0;f<u.edgeCount;f++){let{type:h,next:m}=u.edge(f);if(h==t)return!0;if(l.indexOf(m)<0&&c(m))return!0}};if(c(i.contentMatch))return!0}}class es{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){if(!n)n=t1(t).createDocumentFragment();let a=n,i=[];return e.forEach((l)=>{if(i.length||l.marks.length){let c=0,u=0;while(c<i.length&&u<l.marks.length){let f=l.marks[u];if(!this.marks[f.type.name]){u++;continue}if(!f.eq(i[c][0])||f.type.spec.spanning===!1)break;c++,u++}while(c<i.length)a=i.pop()[1];while(u<l.marks.length){let f=l.marks[u++],h=this.serializeMark(f,l.isInline,t);if(h)i.push([f,a]),a.appendChild(h.dom),a=h.contentDOM||h.dom}}a.appendChild(this.serializeNodeInner(l,t))}),n}serializeNodeInner(e,t){if(e.isText)return t1(t).createTextNode(e.text);let{dom:n,contentDOM:a}=n1(t1(t),this.nodes[e.type.name](e),null,e.attrs);if(a){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,a)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let a=e.marks.length-1;a>=0;a--){let i=this.serializeMark(e.marks[a],e.isInline,t);if(i)(i.contentDOM||i.dom).appendChild(n),n=i.dom}return n}serializeMark(e,t,n={}){let a=this.marks[e.type.name];return a&&n1(t1(n),a(e,t),null,e.attrs)}static renderSpec(e,t,n=null,a){if(typeof t=="string")return{dom:e.createTextNode(t)};return n1(e,t,n,a)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new es(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=oB(e.nodes);if(!t.text)t.text=(n)=>n.text;return t}static marksFromSchema(e){return oB(e.marks)}}function oB(e){let t={};for(let n in e){let a=e[n].spec.toDOM;if(a)t[n]=a}return t}function t1(e){return e.document||window.document}function LZ(e){let t=aB.get(e);if(t===void 0)aB.set(e,t=_Z(e));return t}function _Z(e){let t=null;function n(a){if(a&&typeof a=="object")if(Array.isArray(a))if(typeof a[0]=="string"){if(!t)t=[];t.push(a)}else for(let i=0;i<a.length;i++)n(a[i]);else for(let i in a)n(a[i])}return n(e),t}function n1(e,t,n,a){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],l;if(typeof i!="string")throw RangeError("Invalid array passed to renderSpec");if(a&&(l=LZ(a))&&l.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let c=i.indexOf(" ");if(c>0)n=i.slice(0,c),i=i.slice(c+1);let u,f=n?e.createElementNS(n,i):e.createElement(i),h=t[1],m=1;if(h&&typeof h=="object"&&h.nodeType==null&&!Array.isArray(h)){m=2;for(let b in h)if(h[b]!=null){let y=b.indexOf(" ");if(y>0)f.setAttributeNS(b.slice(0,y),b.slice(y+1),h[b]);else if(b=="style"&&f.style)f.style.cssText=h[b];else f.setAttribute(b,h[b])}}for(let b=m;b<t.length;b++){let y=t[b];if(y===0){if(b<t.length-1||b>m)throw RangeError("Content hole must be the only child of its parent node");return{dom:f,contentDOM:f}}else if(typeof y=="string")f.appendChild(e.createTextNode(y));else{let{dom:v,contentDOM:S}=n1(e,y,n,a);if(f.appendChild(v),S){if(u)throw RangeError("Multiple content holes");u=S}}}return{dom:f,contentDOM:u}}var d3,Cd,vZ=12,XI,xZ,a1,EB,OZ,TB,Kg=1,p3=2,Vg=4,aB;var Js=N(()=>{JI();le.empty=new le([],0);d3={index:0,offset:0};Pt.none=[];Cd=class Cd extends Error{};Se.empty=new Se(le.empty,0,0);XI=new WeakMap;xZ=Object.create(null);Mr.prototype.text=void 0;a1=class a1 extends Mr{constructor(e,t,n,a){super(e,t,null,a);if(!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);return gB(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new a1(this.type,this.attrs,this.text,e)}withText(e){if(e==this.text)return this;return new a1(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){if(e==0&&t==this.text.length)return this;return this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};wd.empty=new wd(!0);EB={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},OZ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},TB={ol:!0,ul:!0};aB=new WeakMap});function IZ(e,t){return e+t*MB}function RB(e){return e&AB}function BZ(e){return(e-(e&AB))/MB}class l1{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&DB)>0}get deletedBefore(){return(this.delInfo&(NB|s1))>0}get deletedAfter(){return(this.delInfo&(OB|s1))>0}get deletedAcross(){return(this.delInfo&s1)>0}}class Go{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Go.empty)return Go.empty}recover(e){let t=0,n=RB(e);if(!this.inverted)for(let a=0;a<n;a++)t+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[n*3]+t+BZ(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let a=0,i=this.inverted?2:1,l=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let u=this.ranges[c]-(this.inverted?a:0);if(u>e)break;let f=this.ranges[c+i],h=this.ranges[c+l],m=u+f;if(e<=m){let b=!f?t:e==u?-1:e==m?1:t,y=u+a+(b<0?0:h);if(n)return y;let v=e==(t<0?u:m)?null:IZ(c/3,e-u),S=e==u?OB:e==m?NB:s1;if(t<0?e!=u:e!=m)S|=DB;return new l1(y,S,v)}a+=h-f}return n?e+a:new l1(e+a,0,null)}touches(e,t){let n=0,a=RB(t),i=this.inverted?2:1,l=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let u=this.ranges[c]-(this.inverted?n:0);if(u>e)break;let f=this.ranges[c+i],h=u+f;if(e<=h&&c==a*3)return!0;n+=this.ranges[c+l]-f}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let a=0,i=0;a<this.ranges.length;a+=3){let l=this.ranges[a],c=l-(this.inverted?i:0),u=l+(this.inverted?0:i),f=this.ranges[a+t],h=this.ranges[a+n];e(c,c+f,u,u+h),i+=h-f}}invert(){return new Go(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Go.empty:new Go(e<0?[0,-e,0]:[0,0,e])}}class Vp{constructor(e,t,n=0,a=e?e.length:0){this.mirror=t,this.from=n,this.to=a,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Vp(this._maps,this.mirror,e,t)}appendMap(e,t){if(!this.ownData)this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0;if(this.to=this._maps.push(e),t!=null)this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let a=e.getMirror(t);this.appendMap(e._maps[t],a!=null&&a<t?n+a:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){if(!this.mirror)this.mirror=[];this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let a=e.getMirror(t);this.appendMap(e._maps[t].invert(),a!=null&&a>t?n-a-1:void 0)}}invert(){let e=new Vp;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let a=0;for(let i=this.from;i<this.to;i++){let l=this._maps[i],c=l.mapResult(e,t);if(c.recover!=null){let u=this.getMirror(i);if(u!=null&&u>i&&u<this.to){i=u,e=this._maps[u].recover(c.recover);continue}}a|=c.delInfo,e=c.pos}return n?e:new l1(e,a,null)}}class vr{getMap(){return Go.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=m3[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in m3)throw RangeError("Duplicate use of step JSON ID "+e);return m3[e]=t,t.prototype.jsonID=e,t}}class qn{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new qn(e,null)}static fail(e){return new qn(null,e)}static fromReplace(e,t,n,a){try{return qn.ok(e.replace(t,n,a))}catch(i){if(i instanceof Cd)return qn.fail(i.message);throw i}}}function v3(e,t,n){let a=[];for(let i=0;i<e.childCount;i++){let l=e.child(i);if(l.content.size)l=l.copy(v3(l.content,t,l));if(l.isInline)l=t(l,n,i);a.push(l)}return le.fromArray(a)}function y3(e,t,n){let a=e.resolve(t),i=n-t,l=a.depth;while(i>0&&l>0&&a.indexAfter(l)==a.node(l).childCount)l--,i--;if(i>0){let c=a.node(l).maybeChild(a.indexAfter(l));while(i>0){if(!c||c.isLeaf)return!0;c=c.firstChild,i--}}return!1}function zZ(e,t,n,a){let i=[],l=[],c,u;e.doc.nodesBetween(t,n,(f,h,m)=>{if(!f.isInline)return;let b=f.marks;if(!a.isInSet(b)&&m.type.allowsMarkType(a.type)){let y=Math.max(h,t),v=Math.min(h+f.nodeSize,n),S=a.addToSet(b);for(let w=0;w<b.length;w++)if(!b[w].isInSet(S))if(c&&c.to==y&&c.mark.eq(b[w]))c.to=v;else i.push(c=new $a(y,v,b[w]));if(u&&u.to==y)u.to=v;else l.push(u=new kc(y,v,a))}}),i.forEach((f)=>e.step(f)),l.forEach((f)=>e.step(f))}function HZ(e,t,n,a){let i=[],l=0;e.doc.nodesBetween(t,n,(c,u)=>{if(!c.isInline)return;l++;let f=null;if(a instanceof qg){let h=c.marks,m;while(m=a.isInSet(h))(f||(f=[])).push(m),h=m.removeFromSet(h)}else if(a){if(a.isInSet(c.marks))f=[a]}else f=c.marks;if(f&&f.length){let h=Math.min(u+c.nodeSize,n);for(let m=0;m<f.length;m++){let b=f[m],y;for(let v=0;v<i.length;v++){let S=i[v];if(S.step==l-1&&b.eq(i[v].style))y=S}if(y)y.to=h,y.step=l;else i.push({style:b,from:Math.max(u,t),to:h,step:l})}}}),i.forEach((c)=>e.step(new $a(c.from,c.to,c.style)))}function x3(e,t,n,a=n.contentMatch,i=!0){let l=e.doc.nodeAt(t),c=[],u=t+1;for(let f=0;f<l.childCount;f++){let h=l.child(f),m=u+h.nodeSize,b=a.matchType(h.type);if(!b)c.push(new bn(u,m,Se.empty));else{a=b;for(let y=0;y<h.marks.length;y++)if(!n.allowsMarkType(h.marks[y].type))e.step(new $a(u,m,h.marks[y]));if(i&&h.isText&&n.whitespace!="pre"){let y,v=/\r?\n|\r/g,S;while(y=v.exec(h.text)){if(!S)S=new Se(le.from(n.schema.text(" ",n.allowedMarks(h.marks))),0,0);c.push(new bn(u+y.index,u+y.index+y[0].length,S))}}}u=m}if(!a.validEnd){let f=a.fillBefore(le.empty,!0);e.replace(u,u,new Se(f,0,0))}for(let f=c.length-1;f>=0;f--)e.step(c[f])}function FZ(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Xs(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let a=e.depth,i=0,l=0;;--a){let c=e.$from.node(a),u=e.$from.index(a)+i,f=e.$to.indexAfter(a)-l;if(a<e.depth&&c.canReplace(u,f,n))return a;if(a==0||c.type.spec.isolating||!FZ(c,u,f))break;if(u)i=1;if(f<c.childCount)l=1}return null}function UZ(e,t,n){let{$from:a,$to:i,depth:l}=t,c=a.before(l+1),u=i.after(l+1),f=c,h=u,m=le.empty,b=0;for(let S=l,w=!1;S>n;S--)if(w||a.index(S)>0)w=!0,m=le.from(a.node(S).copy(m)),b++;else f--;let y=le.empty,v=0;for(let S=l,w=!1;S>n;S--)if(w||i.after(S+1)<i.end(S))w=!0,y=le.from(i.node(S).copy(y)),v++;else h++;e.step(new wn(f,h,c,u,new Se(m.append(y),b,v),m.size-b,!0))}function Kp(e,t,n=null,a=e){let i=VZ(e,t),l=i&&jZ(a,t);if(!l)return null;return i.map(kB).concat({type:t,attrs:n}).concat(l.map(kB))}function kB(e){return{type:e,attrs:null}}function VZ(e,t){let{parent:n,startIndex:a,endIndex:i}=e,l=n.contentMatchAt(a).findWrapping(t);if(!l)return null;let c=l.length?l[0]:t;return n.canReplaceWith(a,i,c)?l:null}function jZ(e,t){let{parent:n,startIndex:a,endIndex:i}=e,l=n.child(a),c=t.contentMatch.findWrapping(l.type);if(!c)return null;let f=(c.length?c[c.length-1]:t).contentMatch;for(let h=a;f&&h<i;h++)f=f.matchType(n.child(h).type);if(!f||!f.validEnd)return null;return c}function KZ(e,t,n){let a=le.empty;for(let c=n.length-1;c>=0;c--){if(a.size){let u=n[c].type.contentMatch.matchFragment(a);if(!u||!u.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}a=le.from(n[c].type.create(n[c].attrs,a))}let{start:i,end:l}=t;e.step(new wn(i,l,i,l,new Se(a,0,0),n.length,!0))}function qZ(e,t,n,a,i){if(!a.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let l=e.steps.length;e.doc.nodesBetween(t,n,(c,u)=>{let f=typeof i=="function"?i(c):i;if(c.isTextblock&&!c.hasMarkup(a,f)&&GZ(e.doc,e.mapping.slice(l).map(u),a)){let h=null;if(a.schema.linebreakReplacement){let v=a.whitespace=="pre",S=!!a.contentMatch.matchType(a.schema.linebreakReplacement);if(v&&!S)h=!1;else if(!v&&S)h=!0}if(h===!1)LB(e,c,u,l);x3(e,e.mapping.slice(l).map(u,1),a,void 0,h===null);let m=e.mapping.slice(l),b=m.map(u,1),y=m.map(u+c.nodeSize,1);if(e.step(new wn(b,y,b+1,y-1,new Se(le.from(a.create(f,null,c.marks)),0,0),1,!0)),h===!0)PB(e,c,u,l);return!1}})}function PB(e,t,n,a){t.forEach((i,l)=>{if(i.isText){let c,u=/\r?\n|\r/g;while(c=u.exec(i.text)){let f=e.mapping.slice(a).map(n+1+l+c.index);e.replaceWith(f,f+1,t.type.schema.linebreakReplacement.create())}}})}function LB(e,t,n,a){t.forEach((i,l)=>{if(i.type==i.type.schema.linebreakReplacement){let c=e.mapping.slice(a).map(n+1+l);e.replaceWith(c,c+1,t.type.schema.text(`
|
|
255
|
+
`))}})}function GZ(e,t,n){let a=e.resolve(t),i=a.index();return a.parent.canReplaceWith(i,i+1,n)}function WZ(e,t,n,a,i){let l=e.doc.nodeAt(t);if(!l)throw RangeError("No node at given position");if(!n)n=l.type;let c=n.create(a,null,i||l.marks);if(l.isLeaf)return e.replaceWith(t,t+l.nodeSize,c);if(!n.validContent(l.content))throw RangeError("Invalid content for node type "+n.name);e.step(new wn(t,t+l.nodeSize,t+1,t+l.nodeSize-1,new Se(le.from(c),0,0),1,!0))}function Wo(e,t,n=1,a){let i=e.resolve(t),l=i.depth-n,c=a&&a[a.length-1]||i.parent;if(l<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!c.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let h=i.depth-1,m=n-2;h>l;h--,m--){let b=i.node(h),y=i.index(h);if(b.type.spec.isolating)return!1;let v=b.content.cutByIndex(y,b.childCount),S=a&&a[m+1];if(S)v=v.replaceChild(0,S.type.create(S.attrs));let w=a&&a[m]||b;if(!b.canReplace(y+1,b.childCount)||!w.type.validContent(v))return!1}let u=i.indexAfter(l),f=a&&a[0];return i.node(l).canReplaceWith(u,u,f?f.type:i.node(l+1).type)}function YZ(e,t,n=1,a){let i=e.doc.resolve(t),l=le.empty,c=le.empty;for(let u=i.depth,f=i.depth-n,h=n-1;u>f;u--,h--){l=le.from(i.node(u).copy(l));let m=a&&a[h];c=le.from(m?m.type.create(m.attrs,c):i.node(u).copy(c))}e.step(new bn(t,t,new Se(l.append(c),n,n),!0))}function Sa(e,t){let n=e.resolve(t),a=n.index();return _B(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(a,a+1)}function JZ(e,t){if(!t.content.size)e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:a}=e.type.schema;for(let i=0;i<t.childCount;i++){let l=t.child(i),c=l.type==a?e.type.schema.nodes.text:l.type;if(n=n.matchType(c),!n)return!1;if(!e.type.allowsMarks(l.marks))return!1}return n.validEnd}function _B(e,t){return!!(e&&t&&!e.isLeaf&&JZ(e,t))}function Td(e,t,n=-1){let a=e.resolve(t);for(let i=a.depth;;i--){let l,c,u=a.index(i);if(i==a.depth)l=a.nodeBefore,c=a.nodeAfter;else if(n>0)l=a.node(i+1),u++,c=a.node(i).maybeChild(u);else l=a.node(i).maybeChild(u-1),c=a.node(i+1);if(l&&!l.isTextblock&&_B(l,c)&&a.node(i).canReplace(u,u+1))return t;if(i==0)break;t=n<0?a.before(i):a.after(i)}}function XZ(e,t,n){let a=null,{linebreakReplacement:i}=e.doc.type.schema,l=e.doc.resolve(t-n),c=l.node().type;if(i&&c.inlineContent){let m=c.whitespace=="pre",b=!!c.contentMatch.matchType(i);if(m&&!b)a=!1;else if(!m&&b)a=!0}let u=e.steps.length;if(a===!1){let m=e.doc.resolve(t+n);LB(e,m.node(),m.before(),u)}if(c.inlineContent)x3(e,t+n-1,c,l.node().contentMatchAt(l.index()),a==null);let f=e.mapping.slice(u),h=f.map(t-n);if(e.step(new bn(h,f.map(t+n,-1),Se.empty,!0)),a===!0){let m=e.doc.resolve(h);PB(e,m.node(),m.before(),e.steps.length)}return e}function QZ(e,t,n){let a=e.resolve(t);if(a.parent.canReplaceWith(a.index(),a.index(),n))return t;if(a.parentOffset==0)for(let i=a.depth-1;i>=0;i--){let l=a.index(i);if(a.node(i).canReplaceWith(l,l,n))return a.before(i+1);if(l>0)return null}if(a.parentOffset==a.parent.content.size)for(let i=a.depth-1;i>=0;i--){let l=a.indexAfter(i);if(a.node(i).canReplaceWith(l,l,n))return a.after(i+1);if(l<a.node(i).childCount)return null}return null}function c1(e,t,n){let a=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let l=0;l<n.openStart;l++)i=i.firstChild.content;for(let l=1;l<=(n.openStart==0&&n.size?2:1);l++)for(let c=a.depth;c>=0;c--){let u=c==a.depth?0:a.pos<=(a.start(c+1)+a.end(c+1))/2?-1:1,f=a.index(c)+(u>0?1:0),h=a.node(c),m=!1;if(l==1)m=h.canReplace(f,f,i);else{let b=h.contentMatchAt(f).findWrapping(i.firstChild.type);m=b&&h.canReplaceWith(f,f,b[0])}if(m)return u==0?a.pos:u<0?a.before(c+1):a.after(c+1)}return null}function Xg(e,t,n=t,a=Se.empty){if(t==n&&!a.size)return null;let i=e.resolve(t),l=e.resolve(n);if(IB(i,l,a))return new bn(t,n,a);return new BB(i,l,a).fit()}function IB(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class BB{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=le.empty;for(let a=0;a<=e.depth;a++){let i=e.node(a);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(a))})}for(let a=e.depth;a>0;a--)this.placed=le.from(e.node(a).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){while(this.unplaced.size){let f=this.findFittable();if(f)this.placeNodes(f);else this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,a=this.close(e<0?this.$to:n.doc.resolve(e));if(!a)return null;let i=this.placed,l=n.depth,c=a.depth;while(l&&c&&i.childCount==1)i=i.firstChild.content,l--,c--;let u=new Se(i,l,c);if(e>-1)return new wn(n.pos,e,this.$to.pos,this.$to.end(),u,t);if(u.size||n.pos!=this.$to.pos)return new bn(n.pos,a.pos,u);return null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,a=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1)a=0;if(i.type.spec.isolating&&a<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let a,i=null;if(n)i=g3(this.unplaced.content,n-1).firstChild,a=i.content;else a=this.unplaced.content;let l=a.firstChild;for(let c=this.depth;c>=0;c--){let{type:u,match:f}=this.frontier[c],h,m=null;if(t==1&&(l?f.matchType(l.type)||(m=f.fillBefore(le.from(l),!1)):i&&u.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:c,parent:i,inject:m};else if(t==2&&l&&(h=f.findWrapping(l.type)))return{sliceDepth:n,frontierDepth:c,parent:i,wrap:h};if(i&&f.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,a=g3(e,t);if(!a.childCount||a.firstChild.isLeaf)return!1;return this.unplaced=new Se(e,t+1,Math.max(n,a.size+t>=e.size-n?t+1:0)),!0}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,a=g3(e,t);if(a.childCount<=1&&t>0){let i=e.size-t<=t+a.size;this.unplaced=new Se(Wg(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new Se(Wg(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:a,wrap:i}){while(this.depth>t)this.closeFrontierNode();if(i)for(let S=0;S<i.length;S++)this.openFrontierNode(i[S]);let l=this.unplaced,c=n?n.content:l.content,u=l.openStart-e,f=0,h=[],{match:m,type:b}=this.frontier[t];if(a){for(let S=0;S<a.childCount;S++)h.push(a.child(S));m=m.matchFragment(a)}let y=c.size+e-(l.content.size-l.openEnd);while(f<c.childCount){let S=c.child(f),w=m.matchType(S.type);if(!w)break;if(f++,f>1||u==0||S.content.size)m=w,h.push(zB(S.mark(b.allowedMarks(S.marks)),f==1?u:0,f==c.childCount?y:-1))}let v=f==c.childCount;if(!v)y=-1;if(this.placed=Yg(this.placed,t,le.from(h)),this.frontier[t].match=m,v&&y<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1)this.closeFrontierNode();for(let S=0,w=c;S<y;S++){let E=w.lastChild;this.frontier.push({type:E.type,match:E.contentMatchAt(E.childCount)}),w=E.content}this.unplaced=!v?new Se(Wg(l.content,e,f),l.openStart,l.openEnd):e==0?Se.empty:new Se(Wg(l.content,e-1,1),e-1,y<0?l.openEnd:e-1)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!b3(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,a=this.$to.after(n);while(n>1&&a==this.$to.end(--n))++a;return a}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:a}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),l=b3(e,t,a,n,i);if(!l)continue;for(let c=t-1;c>=0;c--){let{match:u,type:f}=this.frontier[c],h=b3(e,c,f,u,!0);if(!h||h.childCount)continue e}return{depth:t,fit:l,move:i?e.doc.resolve(e.after(t+1)):e}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;while(this.depth>t.depth)this.closeFrontierNode();if(t.fit.childCount)this.placed=Yg(this.placed,t.depth,t.fit);e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let a=e.node(n),i=a.type.contentMatch.fillBefore(a.content,!0,e.index(n));this.openFrontierNode(a.type,a.attrs,i)}return e}openFrontierNode(e,t=null,n){let a=this.frontier[this.depth];a.match=a.match.matchType(e),this.placed=Yg(this.placed,this.depth,le.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(le.empty,!0);if(t.childCount)this.placed=Yg(this.placed,this.frontier.length,t)}}function Wg(e,t,n){if(t==0)return e.cutByIndex(n,e.childCount);return e.replaceChild(0,e.firstChild.copy(Wg(e.firstChild.content,t-1,n)))}function Yg(e,t,n){if(t==0)return e.append(n);return e.replaceChild(e.childCount-1,e.lastChild.copy(Yg(e.lastChild.content,t-1,n)))}function g3(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function zB(e,t,n){if(t<=0)return e;let a=e.content;if(t>1)a=a.replaceChild(0,zB(a.firstChild,t-1,a.childCount==1?n-1:0));if(t>0){if(a=e.type.contentMatch.fillBefore(a).append(a),n<=0)a=a.append(e.type.contentMatch.matchFragment(a).fillBefore(le.empty,!0))}return e.copy(a)}function b3(e,t,n,a,i){let l=e.node(t),c=i?e.indexAfter(t):e.index(t);if(c==l.childCount&&!n.compatibleContent(l.type))return null;let u=a.fillBefore(l.content,!0,c);return u&&!ZZ(n,l.content,c)?u:null}function ZZ(e,t,n){for(let a=n;a<t.childCount;a++)if(!e.allowsMarks(t.child(a).marks))return!0;return!1}function eee(e){return e.spec.defining||e.spec.definingForContent}function tee(e,t,n,a){if(!a.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),l=e.doc.resolve(n);if(IB(i,l,a))return e.step(new bn(t,n,a));let c=FB(i,l);if(c[c.length-1]==0)c.pop();let u=-(i.depth+1);c.unshift(u);for(let y=i.depth,v=i.pos-1;y>0;y--,v--){let S=i.node(y).type.spec;if(S.defining||S.definingAsContext||S.isolating)break;if(c.indexOf(y)>-1)u=y;else if(i.before(y)==v)c.splice(1,0,-y)}let f=c.indexOf(u),h=[],m=a.openStart;for(let y=a.content,v=0;;v++){let S=y.firstChild;if(h.push(S),v==a.openStart)break;y=S.content}for(let y=m-1;y>=0;y--){let v=h[y],S=eee(v.type);if(S&&!v.sameMarkup(i.node(Math.abs(u)-1)))m=y;else if(S||!v.type.isTextblock)break}for(let y=a.openStart;y>=0;y--){let v=(y+m+1)%(a.openStart+1),S=h[v];if(!S)continue;for(let w=0;w<c.length;w++){let E=c[(w+f)%c.length],T=!0;if(E<0)T=!1,E=-E;let D=i.node(E-1),H=i.index(E-1);if(D.canReplaceWith(H,H,S.type,S.marks))return e.replace(i.before(E),T?l.after(E):n,new Se(HB(a.content,0,a.openStart,v),v,a.openEnd))}}let b=e.steps.length;for(let y=c.length-1;y>=0;y--){if(e.replace(t,n,a),e.steps.length>b)break;let v=c[y];if(v<0)continue;t=i.before(v),n=l.after(v)}}function HB(e,t,n,a,i){if(t<n){let l=e.firstChild;e=e.replaceChild(0,l.copy(HB(l.content,t+1,n,a,l)))}if(t>a){let l=i.contentMatchAt(0),c=l.fillBefore(e).append(e);e=c.append(l.matchFragment(c).fillBefore(le.empty,!0))}return e}function nee(e,t,n,a){if(!a.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=QZ(e.doc,t,a.type);if(i!=null)t=n=i}e.replaceRange(t,n,new Se(le.from(a),0,0))}function ree(e,t,n){let a=e.doc.resolve(t),i=e.doc.resolve(n);if(a.parent.isTextblock&&i.parent.isTextblock&&a.start()!=i.start()&&a.parentOffset==0&&i.parentOffset==0){let c=a.sharedDepth(n),u=!1;for(let f=a.depth;f>c;f--)if(a.node(f).type.spec.isolating)u=!0;for(let f=i.depth;f>c;f--)if(i.node(f).type.spec.isolating)u=!0;if(!u){for(let f=a.depth;f>0&&t==a.start(f);f--)t=a.before(f);for(let f=i.depth;f>0&&n==i.start(f);f--)n=i.before(f);a=e.doc.resolve(t),i=e.doc.resolve(n)}}let l=FB(a,i);for(let c=0;c<l.length;c++){let u=l[c],f=c==l.length-1;if(f&&u==0||a.node(u).type.contentMatch.validEnd)return e.delete(a.start(u),i.end(u));if(u>0&&(f||a.node(u-1).canReplace(a.index(u-1),i.indexAfter(u-1))))return e.delete(a.before(u),i.after(u))}for(let c=1;c<=a.depth&&c<=i.depth;c++)if(t-a.start(c)==a.depth-c&&n>a.end(c)&&i.end(c)-n!=i.depth-c&&a.start(c-1)==i.start(c-1)&&a.node(c-1).canReplace(a.index(c-1),i.index(c-1)))return e.delete(a.before(c),n);e.delete(t,n)}function FB(e,t){let n=[],a=Math.min(e.depth,t.depth);for(let i=a;i>=0;i--){let l=e.start(i);if(l<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;if(l==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==l-1)n.push(i)}return n}class Qg{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Vp}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new jp(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);if(!t.failed)this.addStep(e,t.doc);return t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let a=this.mapping.maps[n];if(n)e=a.map(e,1),t=a.map(t,-1);a.forEach((i,l,c,u)=>{e=Math.min(e,c),t=Math.max(t,u)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=Se.empty){let a=Xg(this.doc,e,t,n);if(a)this.step(a);return this}replaceWith(e,t,n){return this.replace(e,t,new Se(le.from(n),0,0))}delete(e,t){return this.replace(e,t,Se.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return tee(this,e,t,n),this}replaceRangeWith(e,t,n){return nee(this,e,t,n),this}deleteRange(e,t){return ree(this,e,t),this}lift(e,t){return UZ(this,e,t),this}join(e,t=1){return XZ(this,e,t),this}wrap(e,t){return KZ(this,e,t),this}setBlockType(e,t=e,n,a=null){return qZ(this,e,t,n,a),this}setNodeMarkup(e,t,n=null,a){return WZ(this,e,t,n,a),this}setNodeAttribute(e,t,n){return this.step(new Up(e,t,n)),this}setDocAttribute(e,t){return this.step(new Jg(e,t)),this}addNodeMark(e,t){return this.step(new Ac(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof Pt){if(t.isInSet(n.marks))this.step(new Ed(e,t))}else{let a=n.marks,i,l=[];while(i=t.isInSet(a))l.push(new Ed(e,i)),a=i.removeFromSet(a);for(let c=l.length-1;c>=0;c--)this.step(l[c])}return this}split(e,t=1,n){return YZ(this,e,t,n),this}addMark(e,t,n){return zZ(this,e,t,n),this}removeMark(e,t,n){return HZ(this,e,t,n),this}clearIncompatible(e,t,n){return x3(this,e,t,n),this}}var AB=65535,MB,NB=1,OB=2,s1=4,DB=8,m3,kc,$a,Ac,Ed,bn,wn,Up,Jg,jp;var Mc=N(()=>{Js();MB=Math.pow(2,16);Go.empty=new Go([]);m3=Object.create(null);kc=class kc extends vr{constructor(e,t,n){super();this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),a=n.node(n.sharedDepth(this.to)),i=new Se(v3(t.content,(l,c)=>{if(!l.isAtom||!c.type.allowsMarkType(this.mark.type))return l;return l.mark(this.mark.addToSet(l.marks))},a),t.openStart,t.openEnd);return qn.fromReplace(e,this.from,this.to,i)}invert(){return new $a(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);if(t.deleted&&n.deleted||t.pos>=n.pos)return null;return new kc(t.pos,n.pos,this.mark)}merge(e){if(e instanceof kc&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new kc(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark);return null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw RangeError("Invalid input for AddMarkStep.fromJSON");return new kc(t.from,t.to,e.markFromJSON(t.mark))}};vr.jsonID("addMark",kc);$a=class $a extends vr{constructor(e,t,n){super();this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new Se(v3(t.content,(a)=>a.mark(this.mark.removeFromSet(a.marks)),e),t.openStart,t.openEnd);return qn.fromReplace(e,this.from,this.to,n)}invert(){return new kc(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);if(t.deleted&&n.deleted||t.pos>=n.pos)return null;return new $a(t.pos,n.pos,this.mark)}merge(e){if(e instanceof $a&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new $a(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark);return null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $a(t.from,t.to,e.markFromJSON(t.mark))}};vr.jsonID("removeMark",$a);Ac=class Ac extends vr{constructor(e,t){super();this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return qn.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return qn.fromReplace(e,this.pos,this.pos+1,new Se(le.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let a=0;a<t.marks.length;a++)if(!t.marks[a].isInSet(n))return new Ac(this.pos,t.marks[a]);return new Ac(this.pos,this.mark)}}return new Ed(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ac(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ac(t.pos,e.markFromJSON(t.mark))}};vr.jsonID("addNodeMark",Ac);Ed=class Ed extends vr{constructor(e,t){super();this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return qn.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return qn.fromReplace(e,this.pos,this.pos+1,new Se(le.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(!t||!this.mark.isInSet(t.marks))return this;return new Ac(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ed(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ed(t.pos,e.markFromJSON(t.mark))}};vr.jsonID("removeNodeMark",Ed);bn=class bn extends vr{constructor(e,t,n,a=!1){super();this.from=e,this.to=t,this.slice=n,this.structure=a}apply(e){if(this.structure&&y3(e,this.from,this.to))return qn.fail("Structure replace would overwrite content");return qn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Go([this.from,this.to-this.from,this.slice.size])}invert(e){return new bn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&bn.MAP_BIAS<0?t:e.mapResult(this.from,1);if(n.deletedAcross&&t.deletedAcross)return null;return new bn(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof bn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?Se.empty:new Se(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new bn(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?Se.empty:new Se(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new bn(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};if(this.slice.size)e.slice=this.slice.toJSON();if(this.structure)e.structure=!0;return e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw RangeError("Invalid input for ReplaceStep.fromJSON");return new bn(t.from,t.to,Se.fromJSON(e,t.slice),!!t.structure)}};bn.MAP_BIAS=1;vr.jsonID("replace",bn);wn=class wn extends vr{constructor(e,t,n,a,i,l,c=!1){super();this.from=e,this.to=t,this.gapFrom=n,this.gapTo=a,this.slice=i,this.insert=l,this.structure=c}apply(e){if(this.structure&&(y3(e,this.from,this.gapFrom)||y3(e,this.gapTo,this.to)))return qn.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return qn.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);if(!n)return qn.fail("Content does not fit in gap");return qn.fromReplace(e,this.from,this.to,n)}getMap(){return new Go([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new wn(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),a=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);if(t.deletedAcross&&n.deletedAcross||a<t.pos||i>n.pos)return null;return new wn(t.pos,n.pos,a,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};if(this.slice.size)e.slice=this.slice.toJSON();if(this.structure)e.structure=!0;return e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new wn(t.from,t.to,t.gapFrom,t.gapTo,Se.fromJSON(e,t.slice),t.insert,!!t.structure)}};vr.jsonID("replaceAround",wn);Up=class Up extends vr{constructor(e,t,n){super();this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return qn.fail("No node at attribute step's position");let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let a=t.type.create(n,null,t.marks);return qn.fromReplace(e,this.pos,this.pos+1,new Se(le.from(a),0,t.isLeaf?0:1))}getMap(){return Go.empty}invert(e){return new Up(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Up(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw RangeError("Invalid input for AttrStep.fromJSON");return new Up(t.pos,t.attr,t.value)}};vr.jsonID("attr",Up);Jg=class Jg extends vr{constructor(e,t){super();this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let a in e.attrs)t[a]=e.attrs[a];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return qn.ok(n)}getMap(){return Go.empty}invert(e){return new Jg(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw RangeError("Invalid input for DocAttrStep.fromJSON");return new Jg(t.attr,t.value)}};vr.jsonID("docAttr",Jg);jp=class extends Error{};jp=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};jp.prototype=Object.create(Error.prototype);jp.prototype.constructor=jp;jp.prototype.name="TransformError"});var oi=N(()=>{Mc()});class Fe{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Zg(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=Se.empty){let n=t.content.lastChild,a=null;for(let c=0;c<t.openEnd;c++)a=n,n=n.lastChild;let i=e.steps.length,l=this.ranges;for(let c=0;c<l.length;c++){let{$from:u,$to:f}=l[c],h=e.mapping.slice(i);if(e.replaceRange(h.map(u.pos),h.map(f.pos),c?Se.empty:t),c==0)jB(e,i,(n?n.isInline:a&&a.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,a=this.ranges;for(let i=0;i<a.length;i++){let{$from:l,$to:c}=a[i],u=e.mapping.slice(n),f=u.map(l.pos),h=u.map(c.pos);if(i)e.deleteRange(f,h);else e.replaceRangeWith(f,h,t),jB(e,n,t.isInline?-1:1)}}static findFrom(e,t,n=!1){let a=e.parent.inlineContent?new Me(e):qp(e.node(0),e.parent,e.pos,e.index(),t,n);if(a)return a;for(let i=e.depth-1;i>=0;i--){let l=t<0?qp(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):qp(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(l)return l}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new xr(e.node(0))}static atStart(e){return qp(e,e,0,0,1)||new xr(e)}static atEnd(e){return qp(e,e,e.content.size,e.childCount,-1)||new xr(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=$3[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in $3)throw RangeError("Duplicate use of selection JSON ID "+e);return $3[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Me.between(this.$anchor,this.$head).getBookmark()}}class Zg{constructor(e,t){this.$from=e,this.$to=t}}function VB(e){if(!UB&&!e.parent.inlineContent)UB=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")")}class f1{constructor(e,t){this.anchor=e,this.head=t}map(e){return new f1(e.map(this.anchor),e.map(this.head))}resolve(e){return Me.between(e.resolve(this.anchor),e.resolve(this.head))}}class C3{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new f1(n,n):new C3(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;if(n&&Pe.isSelectable(n))return new Pe(t);return Fe.near(t)}}function qp(e,t,n,a,i,l=!1){if(t.inlineContent)return Me.create(e,n);for(let c=a-(i>0?0:1);i>0?c<t.childCount:c>=0;c+=i){let u=t.child(c);if(!u.isAtom){let f=qp(e,u,n+i,i<0?u.childCount:0,i,l);if(f)return f}else if(!l&&Pe.isSelectable(u))return Pe.create(e,n-(i<0?u.nodeSize:0));n+=u.nodeSize*i}return null}function jB(e,t,n){let a=e.steps.length-1;if(a<t)return;let i=e.steps[a];if(!(i instanceof bn||i instanceof wn))return;let l=e.mapping.maps[a],c;l.forEach((u,f,h,m)=>{if(c==null)c=m}),e.setSelection(Fe.near(e.doc.resolve(c),n))}function GB(e,t){return!t||!e?e:e.bind(t)}class Gp{constructor(e,t,n){this.name=e,this.init=GB(t.init,n),this.apply=GB(t.apply,n)}}class d1{constructor(e,t){if(this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=aee.slice(),t)t.forEach((n)=>{if(this.pluginsByKey[n.key])throw RangeError("Adding different instances of a keyed plugin ("+n.key+")");if(this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state)this.fields.push(new Gp(n.key,n.spec.state,n))})}}class Nc{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let a=this.config.plugins[n];if(a.spec.filterTransaction&&!a.spec.filterTransaction.call(a,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),a=null;for(;;){let i=!1;for(let l=0;l<this.config.plugins.length;l++){let c=this.config.plugins[l];if(c.spec.appendTransaction){let u=a?a[l].n:0,f=a?a[l].state:this,h=u<t.length&&c.spec.appendTransaction.call(c,u?t.slice(u):t,f,n);if(h&&n.filterTransaction(h,l)){if(h.setMeta("appendedTransaction",e),!a){a=[];for(let m=0;m<this.config.plugins.length;m++)a.push(m<l?{state:n,n:t.length}:{state:this,n:0})}t.push(h),n=n.applyInner(h),i=!0}if(a)a[l]={state:n,n:t.length}}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new Nc(this.config),n=this.config.fields;for(let a=0;a<n.length;a++){let i=n[a];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new WB(this)}static create(e){let t=new d1(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new Nc(t);for(let a=0;a<t.fields.length;a++)n[t.fields[a].name]=t.fields[a].init(e,n);return n}reconfigure(e){let t=new d1(this.schema,e.plugins),n=t.fields,a=new Nc(t);for(let i=0;i<n.length;i++){let l=n[i].name;a[l]=this.hasOwnProperty(l)?this[l]:n[i].init(e,a)}return a}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks)t.storedMarks=this.storedMarks.map((n)=>n.toJSON());if(e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw RangeError("The JSON fields `doc` and `selection` are reserved");let a=e[n],i=a.spec.state;if(i&&i.toJSON)t[n]=i.toJSON.call(a,this[a.key])}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let a=new d1(e.schema,e.plugins),i=new Nc(a);return a.fields.forEach((l)=>{if(l.name=="doc")i.doc=Mr.fromJSON(e.schema,t.doc);else if(l.name=="selection")i.selection=Fe.fromJSON(i.doc,t.selection);else if(l.name=="storedMarks"){if(t.storedMarks)i.storedMarks=t.storedMarks.map(e.schema.markFromJSON)}else{if(n)for(let c in n){let u=n[c],f=u.spec.state;if(u.key==l.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(t,c)){i[l.name]=f.fromJSON.call(u,e,t[c],i);return}}i[l.name]=l.init(e,i)}}),i}}function YB(e,t,n){for(let a in e){let i=e[a];if(i instanceof Function)i=i.bind(t);else if(a=="handleDOMEvents")i=YB(i,t,{});n[a]=i}return n}class qe{constructor(e){if(this.spec=e,this.props={},e.props)YB(e.props,this,this.props);this.key=e.key?e.key.key:JB("plugin")}getState(e){return e[this.key]}}function JB(e){if(e in S3)return e+"$"+ ++S3[e];return S3[e]=0,e+"$"}class Ze{constructor(e="key"){this.key=JB(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var $3,UB=!1,Me,Pe,xr,oee,KB=1,u1=2,qB=4,WB,aee,S3;var Qs=N(()=>{Js();Mc();$3=Object.create(null);Fe.prototype.visible=!0;Me=class Me extends Fe{constructor(e,t=e){VB(e),VB(t);super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return Fe.near(n);let a=e.resolve(t.map(this.anchor));return new Me(a.parent.inlineContent?a:n,n)}replace(e,t=Se.empty){if(super.replace(e,t),t==Se.empty){let n=this.$from.marksAcross(this.$to);if(n)e.ensureMarks(n)}}eq(e){return e instanceof Me&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new f1(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw RangeError("Invalid input for TextSelection.fromJSON");return new Me(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let a=e.resolve(t);return new this(a,n==t?a:e.resolve(n))}static between(e,t,n){let a=e.pos-t.pos;if(!n||a)n=a>=0?1:-1;if(!t.parent.inlineContent){let i=Fe.findFrom(t,n,!0)||Fe.findFrom(t,-n,!0);if(i)t=i.$head;else return Fe.near(t,n)}if(!e.parent.inlineContent){if(a==0)e=t;else if(e=(Fe.findFrom(e,-n,!0)||Fe.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=a<0)e=t}return new Me(e,t)}};Fe.jsonID("text",Me);Pe=class Pe extends Fe{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n);this.node=t}map(e,t){let{deleted:n,pos:a}=t.mapResult(this.anchor),i=e.resolve(a);if(n)return Fe.near(i);return new Pe(i)}content(){return new Se(le.from(this.node),0,0)}eq(e){return e instanceof Pe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new C3(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw RangeError("Invalid input for NodeSelection.fromJSON");return new Pe(e.resolve(t.anchor))}static create(e,t){return new Pe(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};Pe.prototype.visible=!1;Fe.jsonID("node",Pe);xr=class xr extends Fe{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Se.empty){if(t==Se.empty){e.delete(0,e.doc.content.size);let n=Fe.atStart(e.doc);if(!n.eq(e.selection))e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new xr(e)}map(e){return new xr(e)}eq(e){return e instanceof xr}getBookmark(){return oee}};Fe.jsonID("all",xr);oee={map(){return this},resolve(e){return new xr(e)}};WB=class WB extends Qg{constructor(e){super(e.doc);this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){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(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|KB)&~u1,this.storedMarks=null,this}get selectionSet(){return(this.updated&KB)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=u1,this}ensureMarks(e){if(!Pt.sameSet(this.storedMarks||this.selection.$from.marks(),e))this.setStoredMarks(e);return this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&u1)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~u1,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;if(t)e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Pt.none));return n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let a=this.doc.type.schema;if(t==null){if(!e)return this.deleteSelection();return this.replaceSelectionWith(a.text(e),!0)}else{if(n==null)n=t;if(!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let l=this.doc.resolve(t);i=n==t?l.marks():l.marksAcross(this.doc.resolve(n))}if(this.replaceRangeWith(t,n,a.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length)this.setSelection(Fe.near(this.selection.$to));return this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=qB,this}get scrolledIntoView(){return(this.updated&qB)>0}};aee=[new Gp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Gp("selection",{init(e,t){return e.selection||Fe.atStart(t.doc)},apply(e){return e.selection}}),new Gp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,a){return a.selection.$cursor?e.storedMarks:null}}),new Gp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];S3=Object.create(null)});function ZB(e,t){let{$cursor:n}=e.selection;if(!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0))return null;return n}function nz(e,t,n){let a=t.nodeBefore,i=a,l=t.pos-1;for(;!i.isTextblock;l--){if(i.type.spec.isolating)return!1;let m=i.lastChild;if(!m)return!1;i=m}let c=t.nodeAfter,u=c,f=t.pos+1;for(;!u.isTextblock;f++){if(u.type.spec.isolating)return!1;let m=u.firstChild;if(!m)return!1;u=m}let h=Xg(e.doc,l,f,Se.empty);if(!h||h.from!=l||h instanceof bn&&h.slice.size>=f-l)return!1;if(n){let m=e.tr.step(h);m.setSelection(Me.create(m.doc,l)),n(m.scrollIntoView())}return!0}function Wp(e,t,n=!1){for(let a=e;a;a=t=="start"?a.firstChild:a.lastChild){if(a.isTextblock)return!0;if(n&&a.childCount!=1)return!1}return!1}function R3(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function rz(e,t){let{$cursor:n}=e.selection;if(!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size))return null;return n}function M3(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function O3(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function iee(e){return(t,n)=>{let{$from:a,$to:i}=t.selection;if(t.selection instanceof Pe&&t.selection.node.isBlock){if(!a.parentOffset||!Wo(t.doc,a.pos))return!1;if(n)n(t.tr.split(a.pos).scrollIntoView());return!0}if(!a.depth)return!1;let l=[],c,u,f=!1,h=!1;for(let v=a.depth;;v--)if(a.node(v).isBlock){f=a.end(v)==a.pos+(a.depth-v),h=a.start(v)==a.pos-(a.depth-v),u=O3(a.node(v-1).contentMatchAt(a.indexAfter(v-1)));let w=e&&e(i.parent,f,a);l.unshift(w||(f&&u?{type:u}:null)),c=v;break}else{if(v==1)return!1;l.unshift(null)}let m=t.tr;if(t.selection instanceof Me||t.selection instanceof xr)m.deleteSelection();let b=m.mapping.map(a.pos),y=Wo(m.doc,b,l.length,l);if(!y)l[0]=u?{type:u}:null,y=Wo(m.doc,b,l.length,l);if(!y)return!1;if(m.split(b,l.length,l),!f&&h&&a.node(c).type!=u){let v=m.mapping.map(a.before(c)),S=m.doc.resolve(v);if(u&&a.node(c-1).canReplaceWith(S.index(),S.index()+1,u))m.setNodeMarkup(m.mapping.map(a.before(c)),u)}if(n)n(m.scrollIntoView());return!0}}function cee(e,t,n){let{nodeBefore:a,nodeAfter:i}=t,l=t.index();if(!a||!i||!a.type.compatibleContent(i.type))return!1;if(!a.content.size&&t.parent.canReplace(l-1,l)){if(n)n(e.tr.delete(t.pos-a.nodeSize,t.pos).scrollIntoView());return!0}if(!t.parent.canReplace(l,l+1)||!(i.isTextblock||Sa(e.doc,t.pos)))return!1;if(n)n(e.tr.join(t.pos).scrollIntoView());return!0}function lz(e,t,n,a){let{nodeBefore:i,nodeAfter:l}=t,c,u,f=i.type.spec.isolating||l.type.spec.isolating;if(!f&&cee(e,t,n))return!0;let h=!f&&t.parent.canReplace(t.index(),t.index()+1);if(h&&(c=(u=i.contentMatchAt(i.childCount)).findWrapping(l.type))&&u.matchType(c[0]||l.type).validEnd){if(n){let v=t.pos+l.nodeSize,S=le.empty;for(let T=c.length-1;T>=0;T--)S=le.from(c[T].create(null,S));S=le.from(i.copy(S));let w=e.tr.step(new wn(t.pos-1,v,t.pos,v,new Se(S,1,0),c.length,!0)),E=w.doc.resolve(v+2*c.length);if(E.nodeAfter&&E.nodeAfter.type==i.type&&Sa(w.doc,E.pos))w.join(E.pos);n(w.scrollIntoView())}return!0}let m=l.type.spec.isolating||a>0&&f?null:Fe.findFrom(t,1),b=m&&m.$from.blockRange(m.$to),y=b&&Xs(b);if(y!=null&&y>=t.depth){if(n)n(e.tr.lift(b,y).scrollIntoView());return!0}if(h&&Wp(l,"start",!0)&&Wp(i,"end")){let v=i,S=[];for(;;){if(S.push(v),v.isTextblock)break;v=v.lastChild}let w=l,E=1;for(;!w.isTextblock;w=w.firstChild)E++;if(v.canReplace(v.childCount,v.childCount,w.content)){if(n){let T=le.empty;for(let H=S.length-1;H>=0;H--)T=le.from(S[H].copy(T));let D=e.tr.step(new wn(t.pos-S.length,t.pos+l.nodeSize,t.pos+E,t.pos+l.nodeSize-E,new Se(T,S.length,0),0,!0));n(D.scrollIntoView())}return!0}}return!1}function cz(e){return function(t,n){let a=t.selection,i=e<0?a.$from:a.$to,l=i.depth;while(i.node(l).isInline){if(!l)return!1;l--}if(!i.node(l).isTextblock)return!1;if(n)n(t.tr.setSelection(Me.create(t.doc,e<0?i.start(l):i.end(l))));return!0}}function uz(e,t=null){return function(n,a){let{$from:i,$to:l}=n.selection,c=i.blockRange(l),u=c&&Kp(c,e,t);if(!u)return!1;if(a)a(n.tr.wrap(c,u).scrollIntoView());return!0}}function B3(e,t=null){return function(n,a){let i=!1;for(let l=0;l<n.selection.ranges.length&&!i;l++){let{$from:{pos:c},$to:{pos:u}}=n.selection.ranges[l];n.doc.nodesBetween(c,u,(f,h)=>{if(i)return!1;if(!f.isTextblock||f.hasMarkup(e,t))return;if(f.type==e)i=!0;else{let m=n.doc.resolve(h),b=m.index();i=m.parent.canReplaceWith(b,b+1,e)}})}if(!i)return!1;if(a){let l=n.tr;for(let c=0;c<n.selection.ranges.length;c++){let{$from:{pos:u},$to:{pos:f}}=n.selection.ranges[c];l.setBlockType(u,f,e,t)}a(l.scrollIntoView())}return!0}}function z3(...e){return function(t,n,a){for(let i=0;i<e.length;i++)if(e[i](t,n,a))return!0;return!1}}var QB=(e,t)=>{if(e.selection.empty)return!1;if(t)t(e.tr.deleteSelection().scrollIntoView());return!0},E3=(e,t,n)=>{let a=ZB(e,n);if(!a)return!1;let i=R3(a);if(!i){let c=a.blockRange(),u=c&&Xs(c);if(u==null)return!1;if(t)t(e.tr.lift(c,u).scrollIntoView());return!0}let l=i.nodeBefore;if(lz(e,i,t,-1))return!0;if(a.parent.content.size==0&&(Wp(l,"end")||Pe.isSelectable(l)))for(let c=a.depth;;c--){let u=Xg(e.doc,a.before(c),a.after(c),Se.empty);if(u&&u.slice.size<u.to-u.from){if(t){let f=e.tr.step(u);f.setSelection(Wp(l,"end")?Fe.findFrom(f.doc.resolve(f.mapping.map(i.pos,-1)),-1):Pe.create(f.doc,i.pos-l.nodeSize)),t(f.scrollIntoView())}return!0}if(c==1||a.node(c-1).childCount>1)break}if(l.isAtom&&i.depth==a.depth-1){if(t)t(e.tr.delete(i.pos-l.nodeSize,i.pos).scrollIntoView());return!0}return!1},ez=(e,t,n)=>{let a=ZB(e,n);if(!a)return!1;let i=R3(a);return i?nz(e,i,t):!1},tz=(e,t,n)=>{let a=rz(e,n);if(!a)return!1;let i=M3(a);return i?nz(e,i,t):!1},T3=(e,t,n)=>{let{$head:a,empty:i}=e.selection,l=a;if(!i)return!1;if(a.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):a.parentOffset>0)return!1;l=R3(a)}let c=l&&l.nodeBefore;if(!c||!Pe.isSelectable(c))return!1;if(t)t(e.tr.setSelection(Pe.create(e.doc,l.pos-c.nodeSize)).scrollIntoView());return!0},k3=(e,t,n)=>{let a=rz(e,n);if(!a)return!1;let i=M3(a);if(!i)return!1;let l=i.nodeAfter;if(lz(e,i,t,1))return!0;if(a.parent.content.size==0&&(Wp(l,"start")||Pe.isSelectable(l))){let c=Xg(e.doc,a.before(),a.after(),Se.empty);if(c&&c.slice.size<c.to-c.from){if(t){let u=e.tr.step(c);u.setSelection(Wp(l,"start")?Fe.findFrom(u.doc.resolve(u.mapping.map(i.pos)),1):Pe.create(u.doc,u.mapping.map(i.pos))),t(u.scrollIntoView())}return!0}}if(l.isAtom&&i.depth==a.depth-1){if(t)t(e.tr.delete(i.pos,i.pos+l.nodeSize).scrollIntoView());return!0}return!1},A3=(e,t,n)=>{let{$head:a,empty:i}=e.selection,l=a;if(!i)return!1;if(a.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):a.parentOffset<a.parent.content.size)return!1;l=M3(a)}let c=l&&l.nodeAfter;if(!c||!Pe.isSelectable(c))return!1;if(t)t(e.tr.setSelection(Pe.create(e.doc,l.pos)).scrollIntoView());return!0},oz=(e,t)=>{let n=e.selection,a=n instanceof Pe,i;if(a){if(n.node.isTextblock||!Sa(e.doc,n.from))return!1;i=n.from}else if(i=Td(e.doc,n.from,-1),i==null)return!1;if(t){let l=e.tr.join(i);if(a)l.setSelection(Pe.create(l.doc,i-e.doc.resolve(i).nodeBefore.nodeSize));t(l.scrollIntoView())}return!0},az=(e,t)=>{let n=e.selection,a;if(n instanceof Pe){if(n.node.isTextblock||!Sa(e.doc,n.to))return!1;a=n.to}else if(a=Td(e.doc,n.to,1),a==null)return!1;if(t)t(e.tr.join(a).scrollIntoView());return!0},iz=(e,t)=>{let{$from:n,$to:a}=e.selection,i=n.blockRange(a),l=i&&Xs(i);if(l==null)return!1;if(t)t(e.tr.lift(i,l).scrollIntoView());return!0},N3=(e,t)=>{let{$head:n,$anchor:a}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(a))return!1;if(t)t(e.tr.insertText(`
|
|
256
|
+
`).scrollIntoView());return!0},D3=(e,t)=>{let{$head:n,$anchor:a}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(a))return!1;let i=n.node(-1),l=n.indexAfter(-1),c=O3(i.contentMatchAt(l));if(!c||!i.canReplaceWith(l,l,c))return!1;if(t){let u=n.after(),f=e.tr.replaceWith(u,u,c.createAndFill());f.setSelection(Fe.near(f.doc.resolve(u),1)),t(f.scrollIntoView())}return!0},P3=(e,t)=>{let n=e.selection,{$from:a,$to:i}=n;if(n instanceof xr||a.parent.inlineContent||i.parent.inlineContent)return!1;let l=O3(i.parent.contentMatchAt(i.indexAfter()));if(!l||!l.isTextblock)return!1;if(t){let c=(!a.parentOffset&&i.index()<i.parent.childCount?a:i).pos,u=e.tr.insert(c,l.createAndFill());u.setSelection(Me.create(u.doc,c+1)),t(u.scrollIntoView())}return!0},L3=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let l=n.before();if(Wo(e.doc,l)){if(t)t(e.tr.split(l).scrollIntoView());return!0}}let a=n.blockRange(),i=a&&Xs(a);if(i==null)return!1;if(t)t(e.tr.lift(a,i).scrollIntoView());return!0},see,sz=(e,t)=>{let{$from:n,to:a}=e.selection,i,l=n.sharedDepth(a);if(l==0)return!1;if(i=n.before(l),t)t(e.tr.setSelection(Pe.create(e.doc,i)));return!0},lee=(e,t)=>{if(t)t(e.tr.setSelection(new xr(e.doc)));return!0},_3,I3,w3,XB,Oc,uee,xke;var dz=N(()=>{Mc();Js();Qs();see=iee();_3=cz(-1),I3=cz(1);w3=z3(QB,E3,T3),XB=z3(QB,k3,A3),Oc={Enter:z3(N3,P3,L3,see),"Mod-Enter":D3,Backspace:w3,"Mod-Backspace":w3,"Shift-Backspace":w3,Delete:XB,"Mod-Delete":XB,"Mod-a":lee},uee={"Ctrl-h":Oc.Backspace,"Alt-Backspace":Oc["Mod-Backspace"],"Ctrl-d":Oc.Delete,"Ctrl-Alt-Backspace":Oc["Mod-Delete"],"Alt-Delete":Oc["Mod-Delete"],"Alt-d":Oc["Mod-Delete"],"Ctrl-a":_3,"Ctrl-e":I3};for(let e in Oc)uee[e]=Oc[e];xke=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1});var Nr=N(()=>{dz()});var at=N(()=>{Qs()});var Ca=N(()=>{Js()});function fz(e,t=null){return function(n,a){let{$from:i,$to:l}=n.selection,c=i.blockRange(l);if(!c)return!1;let u=a?n.tr:null;if(!dee(u,c,e,t))return!1;if(a)a(u.scrollIntoView());return!0}}function dee(e,t,n,a=null){let i=!1,l=t,c=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let f=c.resolve(t.start-2);if(l=new Fp(f,f,t.depth),t.endIndex<t.parent.childCount)t=new Fp(t.$from,c.resolve(t.$to.end(t.depth)),t.depth);i=!0}let u=Kp(l,n,a,t);if(!u)return!1;if(e)fee(e,t,u,i,n);return!0}function fee(e,t,n,a,i){let l=le.empty;for(let m=n.length-1;m>=0;m--)l=le.from(n[m].type.create(n[m].attrs,l));e.step(new wn(t.start-(a?2:0),t.end,t.start,t.end,new Se(l,0,0),n.length,!0));let c=0;for(let m=0;m<n.length;m++)if(n[m].type==i)c=m+1;let u=n.length-c,f=t.start+n.length-(a?2:0),h=t.parent;for(let{startIndex:m,endIndex:b}=t,y=!0;m<b;m++,y=!1){if(!y&&Wo(e.doc,f,u))e.split(f,u),f+=2*u;f+=h.child(m).nodeSize}return e}function pz(e){return function(t,n){let{$from:a,$to:i}=t.selection,l=a.blockRange(i,(c)=>c.childCount>0&&c.firstChild.type==e);if(!l)return!1;if(!n)return!0;if(a.node(l.depth-1).type==e)return pee(t,n,e,l);else return hee(t,n,l)}}function pee(e,t,n,a){let i=e.tr,l=a.end,c=a.$to.end(a.depth);if(l<c)i.step(new wn(l-1,c,l,c,new Se(le.from(n.create(null,a.parent.copy())),1,0),1,!0)),a=new Fp(i.doc.resolve(a.$from.pos),i.doc.resolve(c),a.depth);let u=Xs(a);if(u==null)return!1;i.lift(a,u);let f=i.doc.resolve(i.mapping.map(l,-1)-1);if(Sa(i.doc,f.pos)&&f.nodeBefore.type==f.nodeAfter.type)i.join(f.pos);return t(i.scrollIntoView()),!0}function hee(e,t,n){let a=e.tr,i=n.parent;for(let v=n.end,S=n.endIndex-1,w=n.startIndex;S>w;S--)v-=i.child(S).nodeSize,a.delete(v-1,v+1);let l=a.doc.resolve(n.start),c=l.nodeAfter;if(a.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let u=n.startIndex==0,f=n.endIndex==i.childCount,h=l.node(-1),m=l.index(-1);if(!h.canReplace(m+(u?0:1),m+1,c.content.append(f?le.empty:le.from(i))))return!1;let b=l.pos,y=b+c.nodeSize;return a.step(new wn(b-(u?1:0),y+(f?1:0),b+1,y-1,new Se((u?le.empty:le.from(i.copy(le.empty))).append(f?le.empty:le.from(i.copy(le.empty))),u?0:1,f?0:1),u?0:1)),t(a.scrollIntoView()),!0}function hz(e){return function(t,n){let{$from:a,$to:i}=t.selection,l=a.blockRange(i,(h)=>h.childCount>0&&h.firstChild.type==e);if(!l)return!1;let c=l.startIndex;if(c==0)return!1;let u=l.parent,f=u.child(c-1);if(f.type!=e)return!1;if(n){let h=f.lastChild&&f.lastChild.type==u.type,m=le.from(h?e.create():null),b=new Se(le.from(e.create(null,le.from(u.type.create(null,m)))),h?3:1,0),y=l.start,v=l.end;n(t.tr.step(new wn(y-(h?3:1),v,y,v,b,1,!0)).scrollIntoView())}return!0}}var mz=N(()=>{Mc();Js()});var p1=N(()=>{mz()});function gz(e,t,n,a,i){var l;for(;;){if(e==n&&t==a)return!0;if(t==(i<0?0:Ea(e))){let c=e.parentNode;if(!c||c.nodeType!=1||ib(e)||gee.test(e.nodeName)||e.contentEditable=="false")return!1;t=$r(e)+(i<0?0:1),e=c}else if(e.nodeType==1){let c=e.childNodes[t+(i<0?-1:0)];if(c.nodeType==1&&c.contentEditable=="false")if((l=c.pmViewDesc)===null||l===void 0?void 0:l.ignoreForSelection)t+=i;else return!1;else e=c,t=i<0?Ea(e):0}else return!1}}function Ea(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function bee(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Ea(e)}else if(e.parentNode&&!ib(e))t=$r(e),e=e.parentNode;else return null}}function yee(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!ib(e))t=$r(e)+1,e=e.parentNode;else return null}}function vee(e,t,n){for(let a=t==0,i=t==Ea(e);a||i;){if(e==n)return!0;let l=$r(e);if(e=e.parentNode,!e)return!1;a=a&&l==0,i=i&&l==Ea(e)}}function ib(e){let t;for(let n=e;n;n=n.parentNode)if(t=n.pmViewDesc)break;return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}function Rd(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function xee(e){let t=e.activeElement;while(t&&t.shadowRoot)t=t.shadowRoot.activeElement;return t}function $ee(e,t,n){if(e.caretPositionFromPoint)try{let a=e.caretPositionFromPoint(t,n);if(a)return{node:a.offsetNode,offset:Math.min(Ea(a.offsetNode),a.offset)}}catch(a){}if(e.caretRangeFromPoint){let a=e.caretRangeFromPoint(t,n);if(a)return{node:a.startContainer,offset:Math.min(Ea(a.startContainer),a.startOffset)}}}function Cee(e){let t=e.defaultView&&e.defaultView.visualViewport;if(t)return{left:0,right:t.width,top:0,bottom:t.height};return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Zs(e,t){return typeof e=="number"?e:e[t]}function wee(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,a=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*a}}function yz(e,t,n){if(!Y3(t)&&t.left==0)return;let a=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,l=e.dom.ownerDocument;for(let c=n||e.dom;;){if(!c)break;if(c.nodeType!=1){c=Qp(c);continue}let u=c,f=u==l.body,h=f?Cee(l):wee(u),m=0,b=0;if(t.top<h.top+Zs(a,"top"))b=-(h.top-t.top+Zs(i,"top"));else if(t.bottom>h.bottom-Zs(a,"bottom"))b=t.bottom-t.top>h.bottom-h.top?t.top+Zs(i,"top")-h.top:t.bottom-h.bottom+Zs(i,"bottom");if(t.left<h.left+Zs(a,"left"))m=-(h.left-t.left+Zs(i,"left"));else if(t.right>h.right-Zs(a,"right"))m=t.right-h.right+Zs(i,"right");if(m||b)if(f)l.defaultView.scrollBy(m,b);else{let{scrollLeft:v,scrollTop:S}=u;if(b)u.scrollTop+=b;if(m)u.scrollLeft+=m;let w=u.scrollLeft-v,E=u.scrollTop-S;t={left:t.left-w,top:t.top-E,right:t.right-w,bottom:t.bottom-E}}let y=f?"fixed":getComputedStyle(c).position;if(/^(fixed|sticky)$/.test(y))break;c=y=="absolute"?c.offsetParent:Qp(c)}}function Eee(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),a,i;for(let l=(t.left+t.right)/2,c=n+1;c<Math.min(innerHeight,t.bottom);c+=5){let u=e.root.elementFromPoint(l,c);if(!u||u==e.dom||!e.dom.contains(u))continue;let f=u.getBoundingClientRect();if(f.top>=n-20){a=u,i=f.top;break}}return{refDOM:a,refTop:i,stack:Yz(e.dom)}}function Yz(e){let t=[],n=e.ownerDocument;for(let a=e;a;a=Qp(a))if(t.push({dom:a,top:a.scrollTop,left:a.scrollLeft}),e==n)break;return t}function Tee({refDOM:e,refTop:t,stack:n}){let a=e?e.getBoundingClientRect().top:0;Jz(n,a==0?0:a-t)}function Jz(e,t){for(let n=0;n<e.length;n++){let{dom:a,top:i,left:l}=e[n];if(a.scrollTop!=i+t)a.scrollTop=i+t;if(a.scrollLeft!=l)a.scrollLeft=l}}function Ree(e){if(e.setActive)return e.setActive();if(Yp)return e.focus(Yp);let t=Yz(e);if(e.focus(Yp==null?{get preventScroll(){return Yp={preventScroll:!0},!0}}:void 0),!Yp)Yp=!1,Jz(t,0)}function Xz(e,t){let n,a=200000000,i,l=0,c=t.top,u=t.top,f,h;for(let m=e.firstChild,b=0;m;m=m.nextSibling,b++){let y;if(m.nodeType==1)y=m.getClientRects();else if(m.nodeType==3)y=el(m).getClientRects();else continue;for(let v=0;v<y.length;v++){let S=y[v];if(S.top<=c&&S.bottom>=u){c=Math.max(S.bottom,c),u=Math.min(S.top,u);let w=S.left>t.left?S.left-t.left:S.right<t.left?t.left-S.right:0;if(w<a){if(n=m,a=w,i=w&&n.nodeType==3?{left:S.right<t.left?S.right:S.left,top:t.top}:t,m.nodeType==1&&w)l=b+(t.left>=(S.left+S.right)/2?1:0);continue}}else if(S.top>t.top&&!f&&S.left<=t.left&&S.right>=t.left)f=m,h={left:Math.max(S.left,Math.min(S.right,t.left)),top:S.top};if(!n&&(t.left>=S.right&&t.top>=S.top||t.left>=S.left&&t.top>=S.bottom))l=b+1}}if(!n&&f)n=f,i=h,a=0;if(n&&n.nodeType==3)return kee(n,i);if(!n||a&&n.nodeType==1)return{node:e,offset:l};return Xz(n,i)}function kee(e,t){let n=e.nodeValue.length,a=document.createRange(),i;for(let l=0;l<n;l++){a.setEnd(e,l+1),a.setStart(e,l);let c=Dc(a,1);if(c.top==c.bottom)continue;if(nk(t,c)){i={node:e,offset:l+(t.left>=(c.left+c.right)/2?1:0)};break}}return a.detach(),i||{node:e,offset:0}}function nk(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Aee(e,t){let n=e.parentNode;if(n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left)return n;return e}function Mee(e,t,n){let{node:a,offset:i}=Xz(t,n),l=-1;if(a.nodeType==1&&!a.firstChild){let c=a.getBoundingClientRect();l=c.left!=c.right&&n.left>(c.left+c.right)/2?1:-1}return e.docView.posFromDOM(a,i,l)}function Nee(e,t,n,a){let i=-1;for(let l=t,c=!1;;){if(l==e.dom)break;let u=e.docView.nearestDesc(l,!0),f;if(!u)return null;if(u.dom.nodeType==1&&(u.node.isBlock&&u.parent||!u.contentDOM)&&((f=u.dom.getBoundingClientRect()).width||f.height)){if(u.node.isBlock&&u.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(u.dom.nodeName)){if(!c&&f.left>a.left||f.top>a.top)i=u.posBefore;else if(!c&&f.right<a.left||f.bottom<a.top)i=u.posAfter;c=!0}if(!u.contentDOM&&i<0&&!u.node.isText)return(u.node.isBlock?a.top<(f.top+f.bottom)/2:a.left<(f.left+f.right)/2)?u.posBefore:u.posAfter}l=u.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function Qz(e,t,n){let a=e.childNodes.length;if(a&&n.top<n.bottom)for(let i=Math.max(0,Math.min(a-1,Math.floor(a*(t.top-n.top)/(n.bottom-n.top))-2)),l=i;;){let c=e.childNodes[l];if(c.nodeType==1){let u=c.getClientRects();for(let f=0;f<u.length;f++){let h=u[f];if(nk(t,h))return Qz(c,t,h)}}if((l=(l+1)%a)==i)break}return e}function Oee(e,t){let n=e.dom.ownerDocument,a,i=0,l=$ee(n,t.left,t.top);if(l)({node:a,offset:i}=l);let c=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),u;if(!c||!e.dom.contains(c.nodeType!=1?c.parentNode:c)){let h=e.dom.getBoundingClientRect();if(!nk(t,h))return null;if(c=Qz(e.dom,t,h),!c)return null}if(Dr){for(let h=c;a&&h;h=Qp(h))if(h.draggable)a=void 0}if(c=Aee(c,t),a){if(Ta&&a.nodeType==1){if(i=Math.min(i,a.childNodes.length),i<a.childNodes.length){let m=a.childNodes[i],b;if(m.nodeName=="IMG"&&(b=m.getBoundingClientRect()).right<=t.left&&b.bottom>t.top)i++}}let h;if(sb&&i&&a.nodeType==1&&(h=a.childNodes[i-1]).nodeType==1&&h.contentEditable=="false"&&h.getBoundingClientRect().top>=t.top)i--;if(a==e.dom&&i==a.childNodes.length-1&&a.lastChild.nodeType==1&&t.top>a.lastChild.getBoundingClientRect().bottom)u=e.state.doc.content.size;else if(i==0||a.nodeType!=1||a.childNodes[i-1].nodeName!="BR")u=Nee(e,a,i,t)}if(u==null)u=Mee(e,c,t);let f=e.docView.nearestDesc(c,!0);return{pos:u,inside:f?f.posAtStart-f.border:-1}}function Y3(e){return e.top<e.bottom||e.left<e.right}function Dc(e,t){let n=e.getClientRects();if(n.length){let a=n[t<0?0:n.length-1];if(Y3(a))return a}return Array.prototype.find.call(n,Y3)||e.getBoundingClientRect()}function Zz(e,t,n){let{node:a,offset:i,atom:l}=e.docView.domFromPos(t,n<0?-1:1),c=sb||Ta;if(a.nodeType==3)if(c&&(Dee.test(a.nodeValue)||(n<0?!i:i==a.nodeValue.length))){let f=Dc(el(a,i,i),n);if(Ta&&i&&/\s/.test(a.nodeValue[i-1])&&i<a.nodeValue.length){let h=Dc(el(a,i-1,i-1),-1);if(h.top==f.top){let m=Dc(el(a,i,i+1),-1);if(m.top!=f.top)return eb(m,m.left<h.left)}}return f}else{let f=i,h=i,m=n<0?1:-1;if(n<0&&!i)h++,m=-1;else if(n>=0&&i==a.nodeValue.length)f--,m=1;else if(n<0)f--;else h++;return eb(Dc(el(a,f,h),m),m<0)}if(!e.state.doc.resolve(t-(l||0)).parent.inlineContent){if(l==null&&i&&(n<0||i==Ea(a))){let f=a.childNodes[i-1];if(f.nodeType==1)return H3(f.getBoundingClientRect(),!1)}if(l==null&&i<Ea(a)){let f=a.childNodes[i];if(f.nodeType==1)return H3(f.getBoundingClientRect(),!0)}return H3(a.getBoundingClientRect(),n>=0)}if(l==null&&i&&(n<0||i==Ea(a))){let f=a.childNodes[i-1],h=f.nodeType==3?el(f,Ea(f)-(c?0:1)):f.nodeType==1&&(f.nodeName!="BR"||!f.nextSibling)?f:null;if(h)return eb(Dc(h,1),!1)}if(l==null&&i<Ea(a)){let f=a.childNodes[i];while(f.pmViewDesc&&f.pmViewDesc.ignoreForCoords)f=f.nextSibling;let h=!f?null:f.nodeType==3?el(f,0,c?0:1):f.nodeType==1?f:null;if(h)return eb(Dc(h,-1),!0)}return eb(Dc(a.nodeType==3?el(a):a,-n),n>=0)}function eb(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function H3(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function eH(e,t,n){let a=e.state,i=e.root.activeElement;if(a!=t)e.updateState(t);if(i!=e.dom)e.focus();try{return n()}finally{if(a!=t)e.updateState(a);if(i!=e.dom&&i)i.focus()}}function Pee(e,t,n){let a=t.selection,i=n=="up"?a.$from:a.$to;return eH(e,t,()=>{let{node:l}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let u=e.docView.nearestDesc(l,!0);if(!u)break;if(u.node.isBlock){l=u.contentDOM||u.dom;break}l=u.dom.parentNode}let c=Zz(e,i.pos,1);for(let u=l.firstChild;u;u=u.nextSibling){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=el(u,0,u.nodeValue.length).getClientRects();else continue;for(let h=0;h<f.length;h++){let m=f[h];if(m.bottom>m.top+1&&(n=="up"?c.top-m.top>(m.bottom-c.top)*2:m.bottom-c.bottom>(c.bottom-m.top)*2))return!1}}return!0})}function _ee(e,t,n){let{$head:a}=t.selection;if(!a.parent.isTextblock)return!1;let i=a.parentOffset,l=!i,c=i==a.parent.content.size,u=e.domSelection();if(!u)return a.pos==a.start()||a.pos==a.end();if(!Lee.test(a.parent.textContent)||!u.modify)return n=="left"||n=="backward"?l:c;return eH(e,t,()=>{let{focusNode:f,focusOffset:h,anchorNode:m,anchorOffset:b}=e.domSelectionRange(),y=u.caretBidiLevel;u.modify("move",n,"character");let v=a.depth?e.docView.domAfterPos(a.before()):e.dom,{focusNode:S,focusOffset:w}=e.domSelectionRange(),E=S&&!v.contains(S.nodeType==1?S:S.parentNode)||f==S&&h==w;try{if(u.collapse(m,b),f&&(f!=m||h!=b)&&u.extend)u.extend(f,h)}catch(T){}if(y!=null)u.caretBidiLevel=y;return E})}function Iee(e,t,n){if(vz==t&&xz==n)return $z;return vz=t,xz=n,$z=n=="up"||n=="down"?Pee(e,t,n):_ee(e,t,n)}class eh{constructor(e,t,n,a){this.parent=e,this.children=t,this.dom=n,this.contentDOM=a,this.dirty=Ra,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){if(this.parent=void 0,this.dom.pmViewDesc==this)this.dom.pmViewDesc=void 0;for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let a=this.children[t];if(a==e)return n;n+=a.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let i,l;if(e==this.contentDOM)i=e.childNodes[t-1];else{while(e.parentNode!=this.contentDOM)e=e.parentNode;i=e.previousSibling}while(i&&!((l=i.pmViewDesc)&&l.parent==this))i=i.previousSibling;return i?this.posBeforeChild(l)+l.size:this.posAtStart}else{let i,l;if(e==this.contentDOM)i=e.childNodes[t];else{while(e.parentNode!=this.contentDOM)e=e.parentNode;i=e.nextSibling}while(i&&!((l=i.pmViewDesc)&&l.parent==this))i=i.nextSibling;return i?this.posBeforeChild(l):this.posAtEnd}let a;if(e==this.dom&&this.contentDOM)a=t>$r(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let i=e;;i=i.parentNode){if(i==this.dom){a=!1;break}if(i.previousSibling)break}if(a==null&&t==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){a=!0;break}if(i.nextSibling)break}}return(a==null?n>0:a)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,a=e;a;a=a.parentNode){let i=this.getDesc(a),l;if(i&&(!t||i.node))if(n&&(l=i.nodeDOM)&&!(l.nodeType==1?l.contains(e.nodeType==1?e:e.parentNode):l==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let a=e;a;a=a.parentNode){let i=this.getDesc(a);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let a=this.children[t],i=n+a.size;if(n==e&&i!=n){while(!a.border&&a.children.length)for(let l=0;l<a.children.length;l++){let c=a.children[l];if(c.size){a=c;break}}return a}if(e<i)return a.descAt(e-n-a.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,a=0;for(let i=0;n<this.children.length;n++){let l=this.children[n],c=i+l.size;if(c>e||l instanceof ok){a=e-i;break}i=c}if(a)return this.children[n].domFromPos(a-this.children[n].border,t);for(let i;n&&!(i=this.children[n-1]).size&&i instanceof rk&&i.side>=0;n--);if(t<=0){let i,l=!0;for(;;n--,l=!1)if(i=n?this.children[n-1]:null,!i||i.dom.parentNode==this.contentDOM)break;if(i&&t&&l&&!i.border&&!i.domAtom)return i.domFromPos(i.size,t);return{node:this.contentDOM,offset:i?$r(i.dom)+1:0}}else{let i,l=!0;for(;;n++,l=!1)if(i=n<this.children.length?this.children[n]:null,!i||i.dom.parentNode==this.contentDOM)break;if(i&&l&&!i.border&&!i.domAtom)return i.domFromPos(0,t);return{node:this.contentDOM,offset:i?$r(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let a=-1,i=-1;for(let l=n,c=0;;c++){let u=this.children[c],f=l+u.size;if(a==-1&&e<=f){let h=l+u.border;if(e>=h&&t<=f-u.border&&u.node&&u.contentDOM&&this.contentDOM.contains(u.contentDOM))return u.parseRange(e,t,h);e=l;for(let m=c;m>0;m--){let b=this.children[m-1];if(b.size&&b.dom.parentNode==this.contentDOM&&!b.emptyChildAt(1)){a=$r(b.dom)+1;break}e-=b.size}if(a==-1)a=0}if(a>-1&&(f>t||c==this.children.length-1)){t=f;for(let h=c+1;h<this.children.length;h++){let m=this.children[h];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){i=$r(m.dom);break}t+=m.size}if(i==-1)i=this.contentDOM.childNodes.length;break}l=f}return{node:this.contentDOM,from:e,to:t,fromOffset:a,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,a=!1){let i=Math.min(e,t),l=Math.max(e,t);for(let y=0,v=0;y<this.children.length;y++){let S=this.children[y],w=v+S.size;if(i>v&&l<w)return S.setSelection(e-v-S.border,t-v-S.border,n,a);v=w}let c=this.domFromPos(e,e?-1:1),u=t==e?c:this.domFromPos(t,t?-1:1),f=n.root.getSelection(),h=n.domSelectionRange(),m=!1;if((Ta||Dr)&&e==t){let{node:y,offset:v}=c;if(y.nodeType==3){if(m=!!(v&&y.nodeValue[v-1]==`
|
|
257
|
+
`),m&&v==y.nodeValue.length)for(let S=y,w;S;S=S.parentNode){if(w=S.nextSibling){if(w.nodeName=="BR")c=u={node:w.parentNode,offset:$r(w)+1};break}let E=S.pmViewDesc;if(E&&E.node&&E.node.isBlock)break}}else{let S=y.childNodes[v-1];m=S&&(S.nodeName=="BR"||S.contentEditable=="false")}}if(Ta&&h.focusNode&&h.focusNode!=u.node&&h.focusNode.nodeType==1){let y=h.focusNode.childNodes[h.focusOffset];if(y&&y.contentEditable=="false")a=!0}if(!(a||m&&Dr)&&Od(c.node,c.offset,h.anchorNode,h.anchorOffset)&&Od(u.node,u.offset,h.focusNode,h.focusOffset))return;let b=!1;if((f.extend||e==t)&&!(m&&Ta)){f.collapse(c.node,c.offset);try{if(e!=t)f.extend(u.node,u.offset);b=!0}catch(y){}}if(!b){if(e>t){let v=c;c=u,u=v}let y=document.createRange();y.setEnd(u.node,u.offset),y.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(y)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,a=0;a<this.children.length;a++){let i=this.children[a],l=n+i.size;if(n==l?e<=l&&t>=n:e<l&&t>n){let c=n+i.border,u=l-i.border;if(e>=c&&t<=u){if(this.dirty=e==n||t==l?kd:Sz,e==c&&t==u&&(i.contentLost||i.dom.parentNode!=this.contentDOM))i.dirty=ai;else i.markDirty(e-c,t-c);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?kd:ai}n=l}this.dirty=kd}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?kd:Sz;if(t.dirty<n)t.dirty=n}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}function Cz(e,t,n,a,i){aH(a,t,e);let l=new Bc(void 0,e,t,n,a,a,a);if(l.contentDOM)l.updateChildren(i,0);return l}function rH(e,t,n){let a=e.firstChild,i=!1;for(let l=0;l<t.length;l++){let c=t[l],u=c.dom;if(u.parentNode==e){while(u!=a)a=wz(a),i=!0;a=a.nextSibling}else i=!0,e.insertBefore(u,a);if(c instanceof Ic){let f=a?a.previousSibling:e.lastChild;rH(c.contentDOM,c.children,n),a=f?f.nextSibling:e.firstChild}}while(a)a=wz(a),i=!0;if(i&&n.trackWrites==e)n.trackWrites=null}function J3(e,t,n){if(e.length==0)return Ad;let a=n?Ad[0]:new tb,i=[a];for(let l=0;l<e.length;l++){let c=e[l].type.attrs;if(!c)continue;if(c.nodeName)i.push(a=new tb(c.nodeName));for(let u in c){let f=c[u];if(f==null)continue;if(n&&i.length==1)i.push(a=new tb(t.isInline?"span":"div"));if(u=="class")a.class=(a.class?a.class+" ":"")+f;else if(u=="style")a.style=(a.style?a.style+";":"")+f;else if(u!="nodeName")a[u]=f}}return i}function oH(e,t,n,a){if(n==Ad&&a==Ad)return t;let i=t;for(let l=0;l<a.length;l++){let c=a[l],u=n[l];if(l){let f;if(u&&u.nodeName==c.nodeName&&i!=e&&(f=i.parentNode)&&f.nodeName.toLowerCase()==c.nodeName)i=f;else f=document.createElement(c.nodeName),f.pmIsDeco=!0,f.appendChild(i),u=Ad[0],i=f}Bee(i,u||Ad[0],c)}return i}function Bee(e,t,n){for(let a in t)if(a!="class"&&a!="style"&&a!="nodeName"&&!(a in n))e.removeAttribute(a);for(let a in n)if(a!="class"&&a!="style"&&a!="nodeName"&&n[a]!=t[a])e.setAttribute(a,n[a]);if(t.class!=n.class){let a=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let l=0;l<a.length;l++)if(i.indexOf(a[l])==-1)e.classList.remove(a[l]);for(let l=0;l<i.length;l++)if(a.indexOf(i[l])==-1)e.classList.add(i[l]);if(e.classList.length==0)e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let a=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;while(i=a.exec(t.style))e.style.removeProperty(i[1])}if(n.style)e.style.cssText+=n.style}}function aH(e,t,n){return oH(e,e,Ad,J3(t,n,e.nodeType!=1))}function h1(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function wz(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class iH{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=zee(e.node.content,e)}destroyBetween(e,t){if(e==t)return;for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,a){let i=0,l=this.stack.length>>1,c=Math.min(l,e.length);while(i<c&&(i==l-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1)i++;while(i<l)this.destroyRest(),this.top.dirty=Ra,this.index=this.stack.pop(),this.top=this.stack.pop(),l--;while(l<e.length){this.stack.push(this.top,this.index+1);let u=-1,f=this.top.children.length;if(a<this.preMatch.index)f=Math.min(this.index+3,f);for(let h=this.index;h<f;h++){let m=this.top.children[h];if(m.matchesMark(e[l])&&!this.isLocked(m.dom)){u=h;break}}if(u<0&&this.index<this.top.children.length){let h=this.top.children[this.index];if(h instanceof Ic&&h.dirty!=ai&&h.mark.type==e[l].type&&h.spec.update&&!this.isLocked(h.dom)&&h.spec.update(e[l]))h.mark=e[l],u=this.index,this.changed=!0}if(u>-1){if(u>this.index)this.changed=!0,this.destroyBetween(this.index,u);this.top=this.top.children[this.index]}else{let h=Ic.create(this.top,e[l],t,n);this.top.children.splice(this.index,0,h),this.top=h,this.changed=!0}this.index=0,l++}}findNodeMatch(e,t,n,a){let i=-1,l;if(a>=this.preMatch.index&&(l=this.preMatch.matches[a-this.preMatch.index]).parent==this.top&&l.matchesNode(e,t,n))i=this.top.children.indexOf(l,this.index);else for(let c=this.index,u=Math.min(this.top.children.length,c+5);c<u;c++){let f=this.top.children[c];if(f.matchesNode(e,t,n)&&!this.preMatch.matched.has(f)){i=c;break}}if(i<0)return!1;return this.destroyBetween(this.index,i),this.index++,!0}updateNodeAt(e,t,n,a,i){let l=this.top.children[a];if(l.dirty==ai&&l.dom==l.contentDOM)l.dirty=kd;if(!l.update(e,t,n,i))return!1;return this.destroyBetween(this.index,a),this.index++,!0}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let a=this.index;a<this.top.children.length;a++)if(this.top.children[a]==n)return a}return-1}e=t}}updateNextNode(e,t,n,a,i,l){for(let c=this.index;c<this.top.children.length;c++){let u=this.top.children[c];if(u instanceof Bc){let f=this.preMatch.matched.get(u);if(f!=null&&f!=i)return!1;let h=u.dom,m,b=this.isLocked(h)&&!(e.isText&&u.node&&u.node.isText&&u.nodeDOM.nodeValue==e.text&&u.dirty!=ai&&h1(t,u.outerDeco));if(!b&&u.update(e,t,n,a)){if(this.destroyBetween(this.index,c),u.dom!=h)this.changed=!0;return this.index++,!0}else if(!b&&(m=this.recreateWrapper(u,e,t,n,a,l))){if(this.destroyBetween(this.index,c),this.top.children[this.index]=m,m.contentDOM)m.dirty=kd,m.updateChildren(a,l+1),m.dirty=Ra;return this.changed=!0,this.index++,!0}break}}return!1}recreateWrapper(e,t,n,a,i,l){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!h1(n,e.outerDeco)||!a.eq(e.innerDeco))return null;let c=Bc.create(this.top,t,n,a,i,l);if(c.contentDOM){c.children=e.children,e.children=[];for(let u of c.children)u.parent=c}return e.destroy(),c}addNode(e,t,n,a,i){let l=Bc.create(this.top,e,t,n,a,i);if(l.contentDOM)l.updateChildren(a,i+1);this.top.children.splice(this.index++,0,l),this.changed=!0}placeWidget(e,t,n){let a=this.index<this.top.children.length?this.top.children[this.index]:null;if(a&&a.matchesWidget(e)&&(e==a.widget||!a.widget.type.toDOM.parentNode))this.index++;else{let i=new rk(this.top,e,t,n);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;while(e instanceof Ic)t=e,e=t.children[t.children.length-1];if(!e||!(e instanceof x1)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text)){if((Dr||Sr)&&e&&e.dom.contentEditable=="false")this.addHackNode("IMG",t);this.addHackNode("BR",this.top)}}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);if(e=="IMG")n.className="ProseMirror-separator",n.alt="";if(e=="BR")n.className="ProseMirror-trailingBreak";let a=new ok(this.top,[],n,null);if(t!=this.top)t.children.push(a);else t.children.splice(this.index++,0,a);this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function zee(e,t){let n=t,a=n.children.length,i=e.childCount,l=new Map,c=[];e:while(i>0){let u;for(;;)if(a){let h=n.children[a-1];if(h instanceof Ic)n=h,a=h.children.length;else{u=h,a--;break}}else if(n==t)break e;else a=n.parent.children.indexOf(n),n=n.parent;let f=u.node;if(!f)continue;if(f!=e.child(i-1))break;--i,l.set(u,i),c.push(u)}return{index:i,matched:l,matches:c.reverse()}}function Hee(e,t){return e.type.side-t.type.side}function Fee(e,t,n,a){let i=t.locals(e),l=0;if(i.length==0){for(let h=0;h<e.childCount;h++){let m=e.child(h);a(m,i,t.forChild(l,m),h),l+=m.nodeSize}return}let c=0,u=[],f=null;for(let h=0;;){let m,b;while(c<i.length&&i[c].to==l){let E=i[c++];if(E.widget)if(!m)m=E;else(b||(b=[m])).push(E)}if(m)if(b){b.sort(Hee);for(let E=0;E<b.length;E++)n(b[E],h,!!f)}else n(m,h,!!f);let y,v;if(f)v=-1,y=f,f=null;else if(h<e.childCount)v=h,y=e.child(h++);else break;for(let E=0;E<u.length;E++)if(u[E].to<=l)u.splice(E--,1);while(c<i.length&&i[c].from<=l&&i[c].to>l)u.push(i[c++]);let S=l+y.nodeSize;if(y.isText){let E=S;if(c<i.length&&i[c].from<E)E=i[c].from;for(let T=0;T<u.length;T++)if(u[T].to<E)E=u[T].to;if(E<S)f=y.cut(E-l),y=y.cut(0,E-l),S=E,v=-1}else while(c<i.length&&i[c].to<S)c++;let w=y.isInline&&!y.isLeaf?u.filter((E)=>!E.inline):u.slice();a(y,w,t.forChild(l,y),v),l=S}}function Uee(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function Vee(e,t,n,a){for(let i=0,l=0;i<e.childCount&&l<=a;){let c=e.child(i++),u=l;if(l+=c.nodeSize,!c.isText)continue;let f=c.text;while(i<e.childCount){let h=e.child(i++);if(l+=h.nodeSize,!h.isText)break;f+=h.text}if(l>=n){if(l>=a&&f.slice(a-t.length-u,a-u)==t)return a-t.length;let h=u<a?f.lastIndexOf(t,a-u-1):-1;if(h>=0&&h+t.length+u>=n)return u+h;if(n==a&&f.length>=a+t.length-u&&f.slice(a-u,a-u+t.length)==t)return a}}return-1}function X3(e,t,n,a,i){let l=[];for(let c=0,u=0;c<e.length;c++){let f=e[c],h=u,m=u+=f.size;if(h>=n||m<=t)l.push(f);else{if(h<t)l.push(f.slice(0,t-h,a));if(i)l.push(i),i=void 0;if(m>n)l.push(f.slice(n-h,f.size,a))}}return l}function ak(e,t=null){let n=e.domSelectionRange(),a=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),l=i&&i.size==0,c=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(c<0)return null;let u=a.resolve(c),f,h;if(v1(n)){f=c;while(i&&!i.node)i=i.parent;let b=i.node;if(i&&b.isAtom&&Pe.isSelectable(b)&&i.parent&&!(b.isInline&&vee(n.focusNode,n.focusOffset,i.dom))){let y=i.posBefore;h=new Pe(c==y?u:a.resolve(y))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let b=c,y=c;for(let v=0;v<n.rangeCount;v++){let S=n.getRangeAt(v);b=Math.min(b,e.docView.posFromDOM(S.startContainer,S.startOffset,1)),y=Math.max(y,e.docView.posFromDOM(S.endContainer,S.endOffset,-1))}if(b<0)return null;[f,c]=y==e.state.selection.anchor?[y,b]:[b,y],u=a.resolve(c)}else f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null}let m=a.resolve(f);if(!h){let b=t=="pointer"||e.state.selection.head<u.pos&&!l?1:-1;h=ik(e,m,u,b)}return h}function sH(e){return e.editable?e.hasFocus():cH(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function rl(e,t=!1){let n=e.state.selection;if(lH(e,n),!sH(e))return;let a=e.input.mouseDown;if(!t&&Sr&&a){let i=e.domSelectionRange(),l=e.domObserver.currentSelection;if(i.anchorNode&&l.anchorNode&&Od(i.anchorNode,i.anchorOffset,l.anchorNode,l.anchorOffset)&&a.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Kee(e);else{let{anchor:i,head:l}=n,c,u;if(Ez&&!(n instanceof Me)){if(!n.$from.parent.inlineContent)c=Tz(e,n.from);if(!n.empty&&!n.$from.parent.inlineContent)u=Tz(e,n.to)}if(e.docView.setSelection(i,l,e,t),Ez){if(c)Rz(c);if(u)Rz(u)}if(n.visible)e.dom.classList.remove("ProseMirror-hideselection");else if(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document)jee(e)}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}function Tz(e,t){let{node:n,offset:a}=e.docView.domFromPos(t,0),i=a<n.childNodes.length?n.childNodes[a]:null,l=a?n.childNodes[a-1]:null;if(Dr&&i&&i.contentEditable=="false")return F3(i);if((!i||i.contentEditable=="false")&&(!l||l.contentEditable=="false")){if(i)return F3(i);else if(l)return F3(l)}}function F3(e){if(e.contentEditable="true",Dr&&e.draggable)e.draggable=!1,e.wasDraggable=!0;return e}function Rz(e){if(e.contentEditable="false",e.wasDraggable)e.draggable=!0,e.wasDraggable=null}function jee(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),a=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{if(n.anchorNode!=a||n.anchorOffset!=i)t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{if(!sH(e)||e.state.selection.visible)e.dom.classList.remove("ProseMirror-hideselection")},20)})}function Kee(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,a=n.nodeName=="IMG";if(a)t.collapse(n.parentNode,$r(n)+1);else t.collapse(n,0);if(!a&&!e.state.selection.visible&&go&&_c<=11)n.disabled=!0,n.disabled=!1}function lH(e,t){if(t instanceof Pe){let n=e.docView.descAt(t.from);if(n!=e.lastSelectedViewDesc){if(kz(e),n)n.selectNode();e.lastSelectedViewDesc=n}}else kz(e)}function kz(e){if(e.lastSelectedViewDesc){if(e.lastSelectedViewDesc.parent)e.lastSelectedViewDesc.deselectNode();e.lastSelectedViewDesc=void 0}}function ik(e,t,n,a){return e.someProp("createSelectionBetween",(i)=>i(e,t,n))||Me.between(t,n,a)}function Az(e){if(e.editable&&!e.hasFocus())return!1;return cH(e)}function cH(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function qee(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Od(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Q3(e,t){let{$anchor:n,$head:a}=e.selection,i=t>0?n.max(a):n.min(a),l=!i.parent.inlineContent?i:i.depth?e.doc.resolve(t>0?i.after():i.before()):null;return l&&Fe.findFrom(l,t)}function Pc(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Mz(e,t,n){let a=e.state.selection;if(a instanceof Me){if(n.indexOf("s")>-1){let{$head:i}=a,l=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!l||l.isText||!l.isLeaf)return!1;let c=e.state.doc.resolve(i.pos+l.nodeSize*(t<0?-1:1));return Pc(e,new Me(a.$anchor,c))}else if(!a.empty)return!1;else if(e.endOfTextblock(t>0?"forward":"backward")){let i=Q3(e.state,t);if(i&&i instanceof Pe)return Pc(e,i);return!1}else if(!(wa&&n.indexOf("m")>-1)){let i=a.$head,l=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,c;if(!l||l.isText)return!1;let u=t<0?i.pos-l.nodeSize:i.pos;if(!(l.isAtom||(c=e.docView.descAt(u))&&!c.contentDOM))return!1;if(Pe.isSelectable(l))return Pc(e,new Pe(t<0?e.state.doc.resolve(i.pos-l.nodeSize):i));else if(sb)return Pc(e,new Me(e.state.doc.resolve(t<0?u:u+l.nodeSize)));else return!1}}else if(a instanceof Pe&&a.node.isInline)return Pc(e,new Me(t>0?a.$to:a.$from));else{let i=Q3(e.state,t);if(i)return Pc(e,i);return!1}}function m1(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function nb(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Jp(e,t){return t<0?Gee(e):Wee(e)}function Gee(e){let t=e.domSelectionRange(),n=t.focusNode,a=t.focusOffset;if(!n)return;let i,l,c=!1;if(Ta&&n.nodeType==1&&a<m1(n)&&nb(n.childNodes[a],-1))c=!0;for(;;)if(a>0)if(n.nodeType!=1)break;else{let u=n.childNodes[a-1];if(nb(u,-1))i=n,l=--a;else if(u.nodeType==3)n=u,a=n.nodeValue.length;else break}else if(uH(n))break;else{let u=n.previousSibling;while(u&&nb(u,-1))i=n.parentNode,l=$r(u),u=u.previousSibling;if(!u){if(n=n.parentNode,n==e.dom)break;a=0}else n=u,a=m1(n)}if(c)Z3(e,n,a);else if(i)Z3(e,i,l)}function Wee(e){let t=e.domSelectionRange(),n=t.focusNode,a=t.focusOffset;if(!n)return;let i=m1(n),l,c;for(;;)if(a<i){if(n.nodeType!=1)break;let u=n.childNodes[a];if(nb(u,1))l=n,c=++a;else break}else if(uH(n))break;else{let u=n.nextSibling;while(u&&nb(u,1))l=u.parentNode,c=$r(u)+1,u=u.nextSibling;if(!u){if(n=n.parentNode,n==e.dom)break;a=i=0}else n=u,a=0,i=m1(n)}if(l)Z3(e,l,c)}function uH(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Yee(e,t){while(e&&t==e.childNodes.length&&!ib(e))t=$r(e)+1,e=e.parentNode;while(e&&t<e.childNodes.length){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function Jee(e,t){while(e&&!t&&!ib(e))t=$r(e),e=e.parentNode;while(e&&t){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function Z3(e,t,n){if(t.nodeType!=3){let l,c;if(c=Yee(t,n))t=c,n=0;else if(l=Jee(t,n))t=l,n=l.nodeValue.length}let a=e.domSelection();if(!a)return;if(v1(a)){let l=document.createRange();l.setEnd(t,n),l.setStart(t,n),a.removeAllRanges(),a.addRange(l)}else if(a.extend)a.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{if(e.state==i)rl(e)},50)}function Nz(e,t){let n=e.state.doc.resolve(t);if(!(Sr||Wz)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let l=e.coordsAtPos(t-1),c=(l.top+l.bottom)/2;if(c>i.top&&c<i.bottom&&Math.abs(l.left-i.left)>1)return l.left<i.left?"ltr":"rtl"}if(t<n.end()){let l=e.coordsAtPos(t+1),c=(l.top+l.bottom)/2;if(c>i.top&&c<i.bottom&&Math.abs(l.left-i.left)>1)return l.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function Oz(e,t,n){let a=e.state.selection;if(a instanceof Me&&!a.empty||n.indexOf("s")>-1)return!1;if(wa&&n.indexOf("m")>-1)return!1;let{$from:i,$to:l}=a;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let c=Q3(e.state,t);if(c&&c instanceof Pe)return Pc(e,c)}if(!i.parent.inlineContent){let c=t<0?i:l,u=a instanceof xr?Fe.near(c,t):Fe.findFrom(c,t);return u?Pc(e,u):!1}return!1}function Dz(e,t){if(!(e.state.selection instanceof Me))return!0;let{$head:n,$anchor:a,empty:i}=e.state.selection;if(!n.sameParent(a))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let l=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(l&&!l.isText){let c=e.state.tr;if(t<0)c.delete(n.pos-l.nodeSize,n.pos);else c.delete(n.pos,n.pos+l.nodeSize);return e.dispatch(c),!0}return!1}function Pz(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Xee(e){if(!Dr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let a=t.firstChild;Pz(e,a,"true"),setTimeout(()=>Pz(e,a,"false"),20)}return!1}function Qee(e){let t="";if(e.ctrlKey)t+="c";if(e.metaKey)t+="m";if(e.altKey)t+="a";if(e.shiftKey)t+="s";return t}function Zee(e,t){let n=t.keyCode,a=Qee(t);if(n==8||wa&&n==72&&a=="c")return Dz(e,-1)||Jp(e,-1);else if(n==46&&!t.shiftKey||wa&&n==68&&a=="c")return Dz(e,1)||Jp(e,1);else if(n==13||n==27)return!0;else if(n==37||wa&&n==66&&a=="c"){let i=n==37?Nz(e,e.state.selection.from)=="ltr"?-1:1:-1;return Mz(e,i,a)||Jp(e,i)}else if(n==39||wa&&n==70&&a=="c"){let i=n==39?Nz(e,e.state.selection.from)=="ltr"?1:-1:1;return Mz(e,i,a)||Jp(e,i)}else if(n==38||wa&&n==80&&a=="c")return Oz(e,-1,a)||Jp(e,-1);else if(n==40||wa&&n==78&&a=="c")return Xee(e)||Oz(e,1,a)||Jp(e,1);else if(a==(wa?"m":"c")&&(n==66||n==73||n==89||n==90))return!0;return!1}function sk(e,t){e.someProp("transformCopied",(v)=>{t=v(t,e)});let n=[],{content:a,openStart:i,openEnd:l}=t;while(i>1&&l>1&&a.childCount==1&&a.firstChild.childCount==1){i--,l--;let v=a.firstChild;n.push(v.type.name,v.attrs!=v.type.defaultAttrs?v.attrs:null),a=v.content}let c=e.someProp("clipboardSerializer")||es.fromSchema(e.state.schema),u=gH(),f=u.createElement("div");f.appendChild(c.serializeFragment(a,{document:u}));let h=f.firstChild,m,b=0;while(h&&h.nodeType==1&&(m=mH[h.nodeName.toLowerCase()])){for(let v=m.length-1;v>=0;v--){let S=u.createElement(m[v]);while(f.firstChild)S.appendChild(f.firstChild);f.appendChild(S),b++}h=f.firstChild}if(h&&h.nodeType==1)h.setAttribute("data-pm-slice",`${i} ${l}${b?` -${b}`:""} ${JSON.stringify(n)}`);let y=e.someProp("clipboardTextSerializer",(v)=>v(t,e))||t.content.textBetween(0,t.content.size,`
|
|
258
|
+
|
|
259
|
+
`);return{dom:f,text:y,slice:t}}function dH(e,t,n,a,i){let l=i.parent.type.spec.code,c,u;if(!n&&!t)return null;let f=!!t&&(a||l||!n);if(f){if(e.someProp("transformPastedText",(y)=>{t=y(t,l||a,e)}),l)return u=new Se(le.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
260
|
+
`))),0,0),e.someProp("transformPasted",(y)=>{u=y(u,e,!0)}),u;let b=e.someProp("clipboardTextParser",(y)=>y(t,i,a,e));if(b)u=b;else{let y=i.marks(),{schema:v}=e.state,S=es.fromSchema(v);c=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((w)=>{let E=c.appendChild(document.createElement("p"));if(w)E.appendChild(S.serializeNode(v.text(w,y)))})}}else if(e.someProp("transformPastedHTML",(b)=>{n=b(n,e)}),c=rte(n),sb)ote(c);let h=c&&c.querySelector("[data-pm-slice]"),m=h&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(h.getAttribute("data-pm-slice")||"");if(m&&m[3])for(let b=+m[3];b>0;b--){let y=c.firstChild;while(y&&y.nodeType!=1)y=y.nextSibling;if(!y)break;c=y}if(!u)u=(e.someProp("clipboardParser")||e.someProp("domParser")||qo.fromSchema(e.state.schema)).parseSlice(c,{preserveWhitespace:!!(f||m),context:i,ruleFromNode(y){if(y.nodeName=="BR"&&!y.nextSibling&&y.parentNode&&!ete.test(y.parentNode.nodeName))return{ignore:!0};return null}});if(m)u=ate(Lz(u,+m[1],+m[2]),m[4]);else if(u=Se.maxOpen(tte(u.content,i),!0),u.openStart||u.openEnd){let b=0,y=0;for(let v=u.content.firstChild;b<u.openStart&&!v.type.spec.isolating;b++,v=v.firstChild);for(let v=u.content.lastChild;y<u.openEnd&&!v.type.spec.isolating;y++,v=v.lastChild);u=Lz(u,b,y)}return e.someProp("transformPasted",(b)=>{u=b(u,e,f)}),u}function tte(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),l,c=[];if(e.forEach((u)=>{if(!c)return;let f=i.findWrapping(u.type),h;if(!f)return c=null;if(h=c.length&&l.length&&pH(f,l,u,c[c.length-1],0))c[c.length-1]=h;else{if(c.length)c[c.length-1]=hH(c[c.length-1],l.length);let m=fH(u,f);c.push(m),i=i.matchType(m.type),l=f}}),c)return le.from(c)}return e}function fH(e,t,n=0){for(let a=t.length-1;a>=n;a--)e=t[a].create(null,le.from(e));return e}function pH(e,t,n,a,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let l=pH(e,t,n,a.lastChild,i+1);if(l)return a.copy(a.content.replaceChild(a.childCount-1,l));if(a.contentMatchAt(a.childCount).matchType(i==e.length-1?n.type:e[i+1]))return a.copy(a.content.append(le.from(fH(n,e,i+1))))}}function hH(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,hH(e.lastChild,t-1)),a=e.contentMatchAt(e.childCount).fillBefore(le.empty,!0);return e.copy(n.append(a))}function ek(e,t,n,a,i,l){let c=t<0?e.firstChild:e.lastChild,u=c.content;if(e.childCount>1)l=0;if(i<a-1)u=ek(u,t,n,a,i+1,l);if(i>=n)u=t<0?c.contentMatchAt(0).fillBefore(u,l<=i).append(u):u.append(c.contentMatchAt(c.childCount).fillBefore(le.empty,!0));return e.replaceChild(t<0?0:e.childCount-1,c.copy(u))}function Lz(e,t,n){if(t<e.openStart)e=new Se(ek(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd);if(n<e.openEnd)e=new Se(ek(e.content,1,n,e.openEnd,0,0),e.openStart,n);return e}function gH(){return document.implementation.createHTMLDocument("title")}function nte(e){let t=window.trustedTypes;if(!t)return e;if(!U3)U3=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:(n)=>n});return U3.createHTML(e)}function rte(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);if(t)e=e.slice(t[0].length);let n=gH(),a=n.body,i=/<([a-z][^>\s]+)/i.exec(e),l;if(l=i&&mH[i[1].toLowerCase()])e=l.map((c)=>"<"+c+">").join("")+e+l.map((c)=>"</"+c+">").reverse().join("");if(a.innerHTML=nte(e),l)for(let c=0;c<l.length;c++)a=a.querySelector(l[c])||a;for(let c=0;c<n.styleSheets.length;c++){let u=n.styleSheets[c];for(let f=0;f<u.rules.length;f++){let h=u.rules[f];if(h instanceof CSSStyleRule){let m=a.querySelectorAll(h.selectorText);for(let b=0;b<m.length;b++)m[b].style.cssText+=h.style.cssText}}}return a}function ote(e){let t=e.querySelectorAll(Sr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let a=t[n];if(a.childNodes.length==1&&a.textContent==" "&&a.parentNode)a.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),a)}}function ate(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,a;try{a=JSON.parse(t)}catch(u){return e}let{content:i,openStart:l,openEnd:c}=e;for(let u=a.length-2;u>=0;u-=2){let f=n.nodes[a[u]];if(!f||f.hasRequiredAttrs())break;i=le.from(f.create(a[u+1],i)),l++,c++}return new Se(i,l,c)}class bH{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 ste(e){for(let t in Jr){let n=Jr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=(a)=>{if(cte(e,a)&&!lk(e,a)&&(e.editable||!(a.type in Xr)))n(e,a)},ite[t]?{passive:!0}:void 0)}if(Dr)e.dom.addEventListener("input",()=>null);tk(e)}function nl(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function lte(e){if(e.input.mouseDown)e.input.mouseDown.done();e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function tk(e){e.someProp("handleDOMEvents",(t)=>{for(let n in t)if(!e.input.eventHandlers[n])e.dom.addEventListener(n,e.input.eventHandlers[n]=(a)=>lk(e,a))})}function lk(e,t){return e.someProp("handleDOMEvents",(n)=>{let a=n[t.type];return a?a(e,t)||t.defaultPrevented:!1})}function cte(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function ute(e,t){if(!lk(e,t)&&Jr[t.type]&&(e.editable||!(t.type in Xr)))Jr[t.type](e,t)}function lb(e){return{left:e.clientX,top:e.clientY}}function dte(e,t){let n=t.x-e.clientX,a=t.y-e.clientY;return n*n+a*a<100}function ck(e,t,n,a,i){if(a==-1)return!1;let l=e.state.doc.resolve(a);for(let c=l.depth+1;c>0;c--)if(e.someProp(t,(u)=>c>l.depth?u(e,n,l.nodeAfter,l.before(c),i,!0):u(e,n,l.node(c),l.before(c),i,!1)))return!0;return!1}function cb(e,t,n){if(!e.focused)e.focus();if(e.state.selection.eq(t))return;let a=e.state.tr.setSelection(t);if(n=="pointer")a.setMeta("pointer",!0);e.dispatch(a)}function fte(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),a=n.nodeAfter;if(a&&a.isAtom&&Pe.isSelectable(a))return cb(e,new Pe(n),"pointer"),!0;return!1}function pte(e,t){if(t==-1)return!1;let n=e.state.selection,a,i;if(n instanceof Pe)a=n.node;let l=e.state.doc.resolve(t);for(let c=l.depth+1;c>0;c--){let u=c>l.depth?l.nodeAfter:l.node(c);if(Pe.isSelectable(u)){if(a&&n.$from.depth>0&&c>=n.$from.depth&&l.before(n.$from.depth+1)==n.$from.pos)i=l.before(n.$from.depth);else i=l.before(c);break}}if(i!=null)return cb(e,Pe.create(e.state.doc,i),"pointer"),!0;else return!1}function hte(e,t,n,a,i){return ck(e,"handleClickOn",t,n,a)||e.someProp("handleClick",(l)=>l(e,t,a))||(i?pte(e,n):fte(e,n))}function mte(e,t,n,a){return ck(e,"handleDoubleClickOn",t,n,a)||e.someProp("handleDoubleClick",(i)=>i(e,t,a))}function gte(e,t,n,a){return ck(e,"handleTripleClickOn",t,n,a)||e.someProp("handleTripleClick",(i)=>i(e,t,a))||bte(e,n,a)}function bte(e,t,n){if(n.button!=0)return!1;let a=yH(e,t,!0),i=e.state.doc;if(!a)return!1;if(cb(e,a,"pointer"),a instanceof Me&&i.eq(e.state.doc))e.input.mouseDown=new $H(e,a);return!0}function yH(e,t,n){let a=e.state.doc;if(t==-1)return a.inlineContent?Me.create(a,0,a.content.size):null;let i=a.resolve(t);for(let l=i.depth+1;l>0;l--){let c=l>i.depth?i.nodeAfter:i.node(l),u=i.before(l);if(c.inlineContent)return Me.create(a,u+1,u+1+c.content.size);else if(n&&Pe.isSelectable(c))return Pe.create(a,u)}return null}function uk(e){return g1(e)}class dk{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(e){this.done()}move(e){if(e.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 SH(e,t){if(e.composing)return!0;if(Dr&&Math.abs(Date.now()-e.input.compositionEndedAt)<500)return e.input.compositionEndedAt=-200000000,!0;return!1}function vte(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let a=t.childNodes[n];return a.nodeType==1&&a.contentEditable=="false"}function CH(e,t){if(clearTimeout(e.input.composingTimeout),t>-1)e.input.composingTimeout=setTimeout(()=>g1(e),t)}function wH(e){if(e.composing)e.input.composing=!1,e.input.compositionEndedAt=Date.now();while(e.input.compositionNodes.length>0)e.input.compositionNodes.pop().markParentsDirty()}function xte(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=bee(t.focusNode,t.focusOffset),a=yee(t.focusNode,t.focusOffset);if(n&&a&&n!=a){let i=a.pmViewDesc,l=e.domObserver.lastChangedTextNode;if(n==l||a==l)return l;if(!i||!i.isText(a.nodeValue))return a;else if(e.input.compositionNode==a){let c=n.pmViewDesc;if(!(!c||!c.isText(n.nodeValue)))return a}}return n||a}function g1(e,t=!1){if(tl&&e.domObserver.flushingSoon>=0)return;if(e.domObserver.forceFlush(),wH(e),t||e.docView&&e.docView.dirty){let n=ak(e),a=e.state.selection;if(n&&!n.eq(a))e.dispatch(e.state.tr.setSelection(n));else if((e.markCursor||t)&&!a.$from.node(a.$from.sharedDepth(a.to)).inlineContent)e.dispatch(e.state.tr.deleteSelection());else e.updateState(e.state);return!0}return!1}function $te(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let a=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),a.removeAllRanges(),a.addRange(i),setTimeout(()=>{if(n.parentNode)n.parentNode.removeChild(n);e.focus()},50)}function Ste(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Cte(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,a=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));if(!n)a.contentEditable="true";a.style.cssText="position: fixed; left: -10000px; top: 10px",a.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{if(e.focus(),a.parentNode)a.parentNode.removeChild(a);if(n)ob(e,a.value,null,i,t);else ob(e,a.textContent,a.innerHTML,i,t)},50)}function ob(e,t,n,a,i){let l=dH(e,t,n,a,e.state.selection.$from);if(e.someProp("handlePaste",(f)=>f(e,i,l||Se.empty)))return!0;if(!l)return!1;let c=Ste(l),u=c?e.state.tr.replaceSelectionWith(c,a):e.state.tr.replaceSelection(l);return e.dispatch(u.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function EH(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}class fk{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}function TH(e,t){let n;return e.someProp("dragCopies",(a)=>{n=n||a(t)}),n!=null?!n:!t[wte]}function Ete(e,t,n){if(!t.dataTransfer)return;let a=e.posAtCoords(lb(t));if(!a)return;let i=e.state.doc.resolve(a.pos),l=n&&n.slice;if(l)e.someProp("transformPasted",(v)=>{l=v(l,e,!1)});else l=dH(e,EH(t.dataTransfer),rb?null:t.dataTransfer.getData("text/html"),!1,i);let c=!!(n&&TH(e,t));if(e.someProp("handleDrop",(v)=>v(e,t,l||Se.empty,c))){t.preventDefault();return}if(!l)return;t.preventDefault();let u=l?c1(e.state.doc,i.pos,l):i.pos;if(u==null)u=i.pos;let f=e.state.tr;if(c){let{node:v}=n;if(v)v.replace(f);else f.deleteSelection()}let h=f.mapping.map(u),m=l.openStart==0&&l.openEnd==0&&l.content.childCount==1,b=f.doc;if(m)f.replaceRangeWith(h,h,l.content.firstChild);else f.replaceRange(h,h,l);if(f.doc.eq(b))return;let y=f.doc.resolve(h);if(m&&Pe.isSelectable(l.content.firstChild)&&y.nodeAfter&&y.nodeAfter.sameMarkup(l.content.firstChild))f.setSelection(new Pe(y));else{let v=f.mapping.map(u);f.mapping.maps[f.mapping.maps.length-1].forEach((S,w,E,T)=>v=T),f.setSelection(ik(e,y,f.doc.resolve(v)))}e.focus(),e.dispatch(f.setMeta("uiEvent","drop"))}function ab(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class b1{constructor(e,t){this.toDOM=e,this.spec=t||Md,this.side=this.spec.side||0}map(e,t,n,a){let{pos:i,deleted:l}=e.mapResult(t.from+a,this.side<0?-1:1);return l?null:new Xn(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof b1&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ab(this.spec,e.spec))}destroy(e){if(this.spec.destroy)this.spec.destroy(e)}}class zc{constructor(e,t){this.attrs=e,this.spec=t||Md}map(e,t,n,a){let i=e.map(t.from+a,this.spec.inclusiveStart?-1:1)-n,l=e.map(t.to+a,this.spec.inclusiveEnd?1:-1)-n;return i>=l?null:new Xn(i,l,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof zc&&ab(this.attrs,e.attrs)&&ab(this.spec,e.spec)}static is(e){return e.type instanceof zc}destroy(){}}class pk{constructor(e,t){this.attrs=e,this.spec=t||Md}map(e,t,n,a){let i=e.mapResult(t.from+a,1);if(i.deleted)return null;let l=e.mapResult(t.to+a,-1);if(l.deleted||l.pos<=i.pos)return null;return new Xn(i.pos-n,l.pos-n,this)}valid(e,t){let{index:n,offset:a}=e.content.findIndex(t.from),i;return a==t.from&&!(i=e.child(n)).isText&&a+i.nodeSize==t.to}eq(e){return this==e||e instanceof pk&&ab(this.attrs,e.attrs)&&ab(this.spec,e.spec)}destroy(){}}class Xn{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Xn(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Xn(e,e,new b1(t,n))}static inline(e,t,n,a){return new Xn(e,t,new zc(n,a))}static node(e,t,n,a){return new Xn(e,t,new pk(n,a))}get spec(){return this.type.spec}get inline(){return this.type instanceof zc}get widget(){return this.type instanceof b1}}class Lt{constructor(e,t){this.local=e.length?e:Xp,this.children=t.length?t:Xp}static create(e,t){return t.length?y1(t,e,0,Md):Or}find(e,t,n){let a=[];return this.findInner(e==null?0:e,t==null?1e9:t,a,0,n),a}findInner(e,t,n,a,i){for(let l=0;l<this.local.length;l++){let c=this.local[l];if(c.from<=t&&c.to>=e&&(!i||i(c.spec)))n.push(c.copy(c.from+a,c.to+a))}for(let l=0;l<this.children.length;l+=3)if(this.children[l]<t&&this.children[l+1]>e){let c=this.children[l]+1;this.children[l+2].findInner(e-c,t-c,n,a+c,i)}}map(e,t,n){if(this==Or||e.maps.length==0)return this;return this.mapInner(e,t,0,0,n||Md)}mapInner(e,t,n,a,i){let l;for(let c=0;c<this.local.length;c++){let u=this.local[c].map(e,n,a);if(u&&u.type.valid(t,u))(l||(l=[])).push(u);else if(i.onRemove)i.onRemove(this.local[c].spec)}if(this.children.length)return Tte(this.children,l||[],e,t,n,a,i);else return l?new Lt(l.sort(Nd),Xp):Or}add(e,t){if(!t.length)return this;if(this==Or)return Lt.create(e,t);return this.addInner(e,t,0)}addInner(e,t,n){let a,i=0;e.forEach((c,u)=>{let f=u+n,h;if(!(h=kH(t,c,f)))return;if(!a)a=this.children.slice();while(i<a.length&&a[i]<u)i+=3;if(a[i]==u)a[i+2]=a[i+2].addInner(c,h,f+1);else a.splice(i,0,u,u+c.nodeSize,y1(h,c,f+1,Md));i+=3});let l=RH(i?AH(t):t,-n);for(let c=0;c<l.length;c++)if(!l[c].type.valid(e,l[c]))l.splice(c--,1);return new Lt(l.length?this.local.concat(l).sort(Nd):this.local,a||this.children)}remove(e){if(e.length==0||this==Or)return this;return this.removeInner(e,0)}removeInner(e,t){let n=this.children,a=this.local;for(let i=0;i<n.length;i+=3){let l,c=n[i]+t,u=n[i+1]+t;for(let h=0,m;h<e.length;h++)if(m=e[h]){if(m.from>c&&m.to<u)e[h]=null,(l||(l=[])).push(m)}if(!l)continue;if(n==this.children)n=this.children.slice();let f=n[i+2].removeInner(l,c+1);if(f!=Or)n[i+2]=f;else n.splice(i,3),i-=3}if(a.length){for(let i=0,l;i<e.length;i++)if(l=e[i]){for(let c=0;c<a.length;c++)if(a[c].eq(l,t)){if(a==this.local)a=this.local.slice();a.splice(c--,1)}}}if(n==this.children&&a==this.local)return this;return a.length||n.length?new Lt(a,n):Or}forChild(e,t){if(this==Or)return this;if(t.isLeaf)return Lt.empty;let n,a;for(let c=0;c<this.children.length;c+=3)if(this.children[c]>=e){if(this.children[c]==e)n=this.children[c+2];break}let i=e+1,l=i+t.content.size;for(let c=0;c<this.local.length;c++){let u=this.local[c];if(u.from<l&&u.to>i&&u.type instanceof zc){let f=Math.max(i,u.from)-i,h=Math.min(l,u.to)-i;if(f<h)(a||(a=[])).push(u.copy(f,h))}}if(a){let c=new Lt(a.sort(Nd),Xp);return n?new Lc([c,n]):c}return n||Or}eq(e){if(this==e)return!0;if(!(e instanceof Lt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return hk(this.localsInner(e))}localsInner(e){if(this==Or)return Xp;if(e.inlineContent||!this.local.some(zc.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)if(!(this.local[n].type instanceof zc))t.push(this.local[n]);return t}forEachSet(e){e(this)}}class Lc{constructor(e){this.members=e}map(e,t){let n=this.members.map((a)=>a.map(e,t,Md));return Lc.from(n)}forChild(e,t){if(t.isLeaf)return Lt.empty;let n=[];for(let a=0;a<this.members.length;a++){let i=this.members[a].forChild(e,t);if(i==Or)continue;if(i instanceof Lc)n=n.concat(i.members);else n.push(i)}return Lc.from(n)}eq(e){if(!(e instanceof Lc)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let a=0;a<this.members.length;a++){let i=this.members[a].localsInner(e);if(!i.length)continue;if(!t)t=i;else{if(n)t=t.slice(),n=!1;for(let l=0;l<i.length;l++)t.push(i[l])}}return t?hk(n?t:t.sort(Nd)):Xp}static from(e){switch(e.length){case 0:return Or;case 1:return e[0];default:return new Lc(e.every((t)=>t instanceof Lt)?e:e.reduce((t,n)=>t.concat(n instanceof Lt?n:n.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function Tte(e,t,n,a,i,l,c){let u=e.slice();for(let h=0,m=l;h<n.maps.length;h++){let b=0;n.maps[h].forEach((y,v,S,w)=>{let E=w-S-(v-y);for(let T=0;T<u.length;T+=3){let D=u[T+1];if(D<0||y>D+m-b)continue;let H=u[T]+m-b;if(v>=H)u[T+1]=y<=H?-2:-1;else if(y>=m&&E)u[T]+=E,u[T+1]+=E}b+=E}),m=n.maps[h].map(m,-1)}let f=!1;for(let h=0;h<u.length;h+=3)if(u[h+1]<0){if(u[h+1]==-2){f=!0,u[h+1]=-1;continue}let m=n.map(e[h]+l),b=m-i;if(b<0||b>=a.content.size){f=!0;continue}let y=n.map(e[h+1]+l,-1),v=y-i,{index:S,offset:w}=a.content.findIndex(b),E=a.maybeChild(S);if(E&&w==b&&w+E.nodeSize==v){let T=u[h+2].mapInner(n,E,m+1,e[h]+l+1,c);if(T!=Or)u[h]=b,u[h+1]=v,u[h+2]=T;else u[h+1]=-2,f=!0}else f=!0}if(f){let h=Rte(u,e,t,n,i,l,c),m=y1(h,a,0,c);t=m.local;for(let b=0;b<u.length;b+=3)if(u[b+1]<0)u.splice(b,3),b-=3;for(let b=0,y=0;b<m.children.length;b+=3){let v=m.children[b];while(y<u.length&&u[y]<v)y+=3;u.splice(y,0,m.children[b],m.children[b+1],m.children[b+2])}}return new Lt(t.sort(Nd),u)}function RH(e,t){if(!t||!e.length)return e;let n=[];for(let a=0;a<e.length;a++){let i=e[a];n.push(new Xn(i.from+t,i.to+t,i.type))}return n}function Rte(e,t,n,a,i,l,c){function u(f,h){for(let m=0;m<f.local.length;m++){let b=f.local[m].map(a,i,h);if(b)n.push(b);else if(c.onRemove)c.onRemove(f.local[m].spec)}for(let m=0;m<f.children.length;m+=3)u(f.children[m+2],f.children[m]+h+1)}for(let f=0;f<e.length;f+=3)if(e[f+1]==-1)u(e[f+2],t[f]+l+1);return n}function kH(e,t,n){if(t.isLeaf)return null;let a=n+t.nodeSize,i=null;for(let l=0,c;l<e.length;l++)if((c=e[l])&&c.from>n&&c.to<a)(i||(i=[])).push(c),e[l]=null;return i}function AH(e){let t=[];for(let n=0;n<e.length;n++)if(e[n]!=null)t.push(e[n]);return t}function y1(e,t,n,a){let i=[],l=!1;t.forEach((u,f)=>{let h=kH(e,u,f+n);if(h){l=!0;let m=y1(h,u,n+f+1,a);if(m!=Or)i.push(f,f+u.nodeSize,m)}});let c=RH(l?AH(e):e,-n).sort(Nd);for(let u=0;u<c.length;u++)if(!c[u].type.valid(t,c[u])){if(a.onRemove)a.onRemove(c[u].spec);c.splice(u--,1)}return c.length||i.length?new Lt(c,i):Or}function Nd(e,t){return e.from-t.from||e.to-t.to}function hk(e){let t=e;for(let n=0;n<t.length-1;n++){let a=t[n];if(a.from!=a.to)for(let i=n+1;i<t.length;i++){let l=t[i];if(l.from==a.from){if(l.to!=a.to){if(t==e)t=e.slice();t[i]=l.copy(l.from,a.to),_z(t,i+1,l.copy(a.to,l.to))}continue}else{if(l.from<a.to){if(t==e)t=e.slice();t[n]=a.copy(a.from,l.from),_z(t,i,a.copy(l.from,a.to))}break}}}return t}function _z(e,t,n){while(t<e.length&&Nd(n,e[t])>0)t++;e.splice(t,0,n)}function V3(e){let t=[];if(e.someProp("decorations",(n)=>{let a=n(e.state);if(a&&a!=Or)t.push(a)}),e.cursorWrapper)t.push(Lt.create(e.state.doc,[e.cursorWrapper.deco]));return Lc.from(t)}class MH{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class NH{constructor(e,t){if(this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new MH,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((n)=>{for(let a=0;a<n.length;a++)this.queue.push(n[a]);if(go&&_c<=11&&n.some((a)=>a.type=="childList"&&a.removedNodes.length||a.type=="characterData"&&a.oldValue.length>a.target.nodeValue.length))this.flushSoon();else if(Dr&&e.composing&&n.some((a)=>a.type=="childList"&&a.target.nodeName=="TR"))e.input.badSafariComposition=!0,this.flushSoon();else this.flush()}),Ate)this.onCharData=(n)=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.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,kte);if(this.onCharData)this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData);this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);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(!Az(this.view))return;if(this.suppressingSelectionUpdates)return rl(this.view);if(go&&_c<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Od(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let i=e.focusNode;i;i=Qp(i))t.add(i);for(let i=e.anchorNode;i;i=Qp(i))if(t.has(i)){n=i;break}let a=n&&this.view.docView.nearestDesc(n);if(a&&a.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();if(t.length)this.queue=[];let n=e.domSelectionRange(),a=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Az(e)&&!this.ignoreSelectionChange(n),i=-1,l=-1,c=!1,u=[];if(e.editable)for(let h=0;h<t.length;h++){let m=this.registerMutation(t[h],u);if(m){if(i=i<0?m.from:Math.min(m.from,i),l=l<0?m.to:Math.max(m.to,l),m.typeOver)c=!0}}if(u.some((h)=>h.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||Sr&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some((h)=>h.type=="childList"&&h.removedNodes.length))){for(let h of u)if(h.nodeName=="BR"&&h.parentNode){let m=h.nextSibling;while(m&&m.nodeType==1){if(m.contentEditable=="false"){h.parentNode.removeChild(h);break}m=m.firstChild}}}else if(Ta&&u.length){let h=u.filter((m)=>m.nodeName=="BR");if(h.length==2){let[m,b]=h;if(m.parentNode&&m.parentNode.parentNode==b.parentNode)b.remove();else m.remove()}else{let{focusNode:m}=this.currentSelection;for(let b of h){let y=b.parentNode;if(y&&y.nodeName=="LI"&&(!m||Ote(e,m)!=y))b.remove()}}}let f=null;if(i<0&&a&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&v1(n)&&(f=ak(e))&&f.eq(Fe.near(e.state.doc.resolve(0),1)))e.input.lastFocus=0,rl(e),this.currentSelection.set(n),e.scrollToSelection();else if(i>-1||a){if(i>-1)e.docView.markDirty(i,l),Mte(e);if(e.input.badSafariComposition)e.input.badSafariComposition=!1,Dte(e,u);if(this.handleDOMChange(i,l,c,u),e.docView&&e.docView.dirty)e.updateState(e.state);else if(!this.currentSelection.eq(n))rl(e);this.currentSelection.set(n)}}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let h=0;h<e.addedNodes.length;h++){let m=e.addedNodes[h];if(t.push(m),m.nodeType==3)this.lastChangedTextNode=m}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let{previousSibling:a,nextSibling:i}=e;if(go&&_c<=11&&e.addedNodes.length)for(let h=0;h<e.addedNodes.length;h++){let{previousSibling:m,nextSibling:b}=e.addedNodes[h];if(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)a=m;if(!b||Array.prototype.indexOf.call(e.addedNodes,b)<0)i=b}let l=a&&a.parentNode==e.target?$r(a)+1:0,c=n.localPosFromDOM(e.target,l,-1),u=i&&i.parentNode==e.target?$r(i):e.target.childNodes.length,f=n.localPosFromDOM(e.target,u,1);return{from:c,to:f}}else if(e.type=="attributes")return{from:n.posAtStart-n.border,to:n.posAtEnd+n.border};else return this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}function Mte(e){if(Iz.has(e))return;if(Iz.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1){if(e.requiresGeckoHackNode=Ta,Bz)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."),Bz=!0}}function zz(e,t){let{startContainer:n,startOffset:a,endContainer:i,endOffset:l}=t,c=e.domAtPos(e.state.selection.anchor);if(Od(c.node,c.offset,i,l))[n,a,i,l]=[i,l,n,a];return{anchorNode:n,anchorOffset:a,focusNode:i,focusOffset:l}}function Nte(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return zz(e,i)}let n;function a(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",a,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",a,!0),n?zz(e,n):null}function Ote(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let a=e.docView.nearestDesc(n,!0);if(a&&a.node.isBlock)return n}return null}function Dte(e,t){var n;let{focusNode:a,focusOffset:i}=e.domSelectionRange();for(let l of t)if(((n=l.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let c=l.nextSibling;while(c&&(c.nodeName!="TD"&&c.nodeName!="TH"))c=c.nextSibling;if(c){let u=c;for(;;){let f=u.firstChild;if(!f||f.nodeType!=1||f.contentEditable=="false"||/^(BR|IMG)$/.test(f.nodeName))break;u=f}if(u.insertBefore(l,u.firstChild),a==l)e.domSelection().collapse(l,i)}else l.parentNode.removeChild(l)}}function Pte(e,t,n,a){let{node:i,fromOffset:l,toOffset:c,from:u,to:f}=e.docView.parseRange(t,n),h=e.domSelectionRange(),m,b=h.anchorNode;if(b&&e.dom.contains(b.nodeType==1?b:b.parentNode)){if(m=[{node:b,offset:h.anchorOffset}],!v1(h))m.push({node:h.focusNode,offset:h.focusOffset})}if(Sr&&e.input.lastKeyCode===8)for(let T=c;T>l;T--){let D=i.childNodes[T-1],H=D.pmViewDesc;if(D.nodeName=="BR"&&!H){c=T;break}if(!H||H.size)break}let y=e.state.doc,v=e.someProp("domParser")||qo.fromSchema(e.state.schema),S=y.resolve(u),w=null,E=v.parse(i,{topNode:S.parent,topMatch:S.parent.contentMatchAt(S.index()),topOpen:!0,from:l,to:c,preserveWhitespace:S.parent.type.whitespace=="pre"?"full":!0,findPositions:m,ruleFromNode:Lte(a),context:S});if(m&&m[0].pos!=null){let T=m[0].pos,D=m[1]&&m[1].pos;if(D==null)D=T;w={anchor:T+u,head:D+u}}return{doc:E,sel:w,from:u,to:f}}function Ite(e,t,n,a,i){let l=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let V=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,P=ak(e,V);if(P&&!e.state.selection.eq(P)){if(Sr&&tl&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",(Y)=>Y(e,Rd(13,"Enter"))))return;let te=e.state.tr.setSelection(P);if(V=="pointer")te.setMeta("pointer",!0);else if(V=="key")te.scrollIntoView();if(l)te.setMeta("composition",l);e.dispatch(te)}return}let c=e.state.doc.resolve(t),u=c.sharedDepth(n);t=c.before(u+1),n=e.state.doc.resolve(n).after(u+1);let f=e.state.selection,h=Pte(e,t,n,i),m=e.state.doc,b=m.slice(h.from,h.to),y,v;if(e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime)y=e.state.selection.to,v="end";else y=e.state.selection.from,v="start";e.input.lastKeyCode=null;let S=Hte(b.content,h.doc.content,h.from,y,v);if(S)e.input.domChangeCount++;if((Zp&&e.input.lastIOSEnter>Date.now()-225||tl)&&i.some((V)=>V.nodeType==1&&!_te.test(V.nodeName))&&(!S||S.endA>=S.endB)&&e.someProp("handleKeyDown",(V)=>V(e,Rd(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!S)if(a&&f instanceof Me&&!f.empty&&f.$head.sameParent(f.$anchor)&&!e.composing&&!(h.sel&&h.sel.anchor!=h.sel.head))S={start:f.from,endA:f.to,endB:f.to};else{if(h.sel){let V=Hz(e,e.state.doc,h.sel);if(V&&!V.eq(e.state.selection)){let P=e.state.tr.setSelection(V);if(l)P.setMeta("composition",l);e.dispatch(P)}}return}if(e.state.selection.from<e.state.selection.to&&S.start==S.endB&&e.state.selection instanceof Me){if(S.start>e.state.selection.from&&S.start<=e.state.selection.from+2&&e.state.selection.from>=h.from)S.start=e.state.selection.from;else if(S.endA<e.state.selection.to&&S.endA>=e.state.selection.to-2&&e.state.selection.to<=h.to)S.endB+=e.state.selection.to-S.endA,S.endA=e.state.selection.to}if(go&&_c<=11&&S.endB==S.start+1&&S.endA==S.start&&S.start>h.from&&h.doc.textBetween(S.start-h.from-1,S.start-h.from+1)==" ")S.start--,S.endA--,S.endB--;let w=h.doc.resolveNoCache(S.start-h.from),E=h.doc.resolveNoCache(S.endB-h.from),T=m.resolve(S.start),D=w.sameParent(E)&&w.parent.inlineContent&&T.end()>=S.endA;if((Zp&&e.input.lastIOSEnter>Date.now()-225&&(!D||i.some((V)=>V.nodeName=="DIV"||V.nodeName=="P"))||!D&&w.pos<h.doc.content.size&&(!w.sameParent(E)||!w.parent.inlineContent)&&w.pos<E.pos&&!/\S/.test(h.doc.textBetween(w.pos,E.pos,"","")))&&e.someProp("handleKeyDown",(V)=>V(e,Rd(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>S.start&&zte(m,S.start,S.endA,w,E)&&e.someProp("handleKeyDown",(V)=>V(e,Rd(8,"Backspace")))){if(tl&&Sr)e.domObserver.suppressSelectionUpdates();return}if(Sr&&S.endB==S.start)e.input.lastChromeDelete=Date.now();if(tl&&!D&&w.start()!=E.start()&&E.parentOffset==0&&w.depth==E.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==S.endA)S.endB-=2,E=h.doc.resolveNoCache(S.endB-h.from),setTimeout(()=>{e.someProp("handleKeyDown",function(V){return V(e,Rd(13,"Enter"))})},20);let{start:H,endA:z}=S,L=(V)=>{let P=V||e.state.tr.replace(H,z,h.doc.slice(S.start-h.from,S.endB-h.from));if(h.sel){let te=Hz(e,P.doc,h.sel);if(te&&!(Sr&&e.composing&&te.empty&&(S.start!=S.endB||e.input.lastChromeDelete<Date.now()-100)&&(te.head==H||te.head==P.mapping.map(z)-1)||go&&te.empty&&te.head==H))P.setSelection(te)}if(l)P.setMeta("composition",l);return P.scrollIntoView()},J;if(D)if(w.pos==E.pos){if(go&&_c<=11&&w.parentOffset==0)e.domObserver.suppressSelectionUpdates(),setTimeout(()=>rl(e),20);let V=L(e.state.tr.delete(H,z)),P=m.resolve(S.start).marksAcross(m.resolve(S.endA));if(P)V.ensureMarks(P);e.dispatch(V)}else if(S.endA==S.endB&&(J=Bte(w.parent.content.cut(w.parentOffset,E.parentOffset),T.parent.content.cut(T.parentOffset,S.endA-T.start())))){let V=L(e.state.tr);if(J.type=="add")V.addMark(H,z,J.mark);else V.removeMark(H,z,J.mark);e.dispatch(V)}else if(w.parent.child(w.index()).isText&&w.index()==E.index()-(E.textOffset?0:1)){let V=w.parent.textBetween(w.parentOffset,E.parentOffset),P=()=>L(e.state.tr.insertText(V,H,z));if(!e.someProp("handleTextInput",(te)=>te(e,H,z,V,P)))e.dispatch(P())}else e.dispatch(L());else e.dispatch(L())}function Hz(e,t,n){if(Math.max(n.anchor,n.head)>t.content.size)return null;return ik(e,t.resolve(n.anchor),t.resolve(n.head))}function Bte(e,t){let n=e.firstChild.marks,a=t.firstChild.marks,i=n,l=a,c,u,f;for(let m=0;m<a.length;m++)i=a[m].removeFromSet(i);for(let m=0;m<n.length;m++)l=n[m].removeFromSet(l);if(i.length==1&&l.length==0)u=i[0],c="add",f=(m)=>m.mark(u.addToSet(m.marks));else if(i.length==0&&l.length==1)u=l[0],c="remove",f=(m)=>m.mark(u.removeFromSet(m.marks));else return null;let h=[];for(let m=0;m<t.childCount;m++)h.push(f(t.child(m)));if(le.from(h).eq(e))return{mark:u,type:c}}function zte(e,t,n,a,i){if(n-t<=i.pos-a.pos||j3(a,!0,!1)<i.pos)return!1;let l=e.resolve(t);if(!a.parent.isTextblock){let u=l.nodeAfter;return u!=null&&n==t+u.nodeSize}if(l.parentOffset<l.parent.content.size||!l.parent.isTextblock)return!1;let c=e.resolve(j3(l,!0,!0));if(!c.parent.isTextblock||c.pos>n||j3(c,!0,!1)<n)return!1;return a.parent.content.cut(a.parentOffset).eq(c.parent.content)}function j3(e,t,n){let a=e.depth,i=t?e.end():e.pos;while(a>0&&(t||e.indexAfter(a)==e.node(a).childCount))a--,i++,t=!1;if(n){let l=e.node(a).maybeChild(e.indexAfter(a));while(l&&!l.isLeaf)l=l.firstChild,i++}return i}function Hte(e,t,n,a,i){let l=e.findDiffStart(t,n),c=n+e.size,u=n+t.size;if(l==null)return null;let{a:f,b:h}=e.findDiffEnd(t,c,u);if(i=="end"){let m=Math.max(0,l-Math.min(f,h));a-=f+m-l}if(f<l&&c<u){let m=a<=l&&a>=f?l-a:0;l-=m,h=l+(h-f),f=l}else if(h<l){let m=a<=l&&a>=h?l-a:0;l-=m,f=l+(f-h),h=l}return{start:l,endA:f,endB:h}}class $1{constructor(e,t){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 bH,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Kz),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e){if(e.appendChild)e.appendChild(this.dom);else if(typeof e=="function")e(this.dom);else if(e.mount)this.mounted=!0}this.editable=Vz(this),Uz(this),this.nodeViews=jz(this),this.docView=Cz(this.state.doc,Fz(this),V3(this),this.dom,this),this.domObserver=new NH(this,(n,a,i,l)=>Ite(this,n,a,i,l)),this.domObserver.start(),ste(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){if(e.handleDOMEvents!=this._props.handleDOMEvents)tk(this);let t=this._props;if(this._props=e,e.plugins)e.plugins.forEach(Kz),this.directPlugins=e.plugins;this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let a=this.state,i=!1,l=!1;if(e.storedMarks&&this.composing)wH(this),l=!0;this.state=e;let c=a.plugins!=e.plugins||this._props.plugins!=t.plugins;if(c||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let y=jz(this);if(Ute(y,this.nodeViews))this.nodeViews=y,i=!0}if(c||t.handleDOMEvents!=this._props.handleDOMEvents)tk(this);this.editable=Vz(this),Uz(this);let u=V3(this),f=Fz(this),h=a.plugins!=e.plugins&&!a.doc.eq(e.doc)?"reset":e.scrollToSelection>a.scrollToSelection?"to selection":"preserve",m=i||!this.docView.matchesNode(e.doc,f,u);if(m||!e.selection.eq(a.selection))l=!0;let b=h=="preserve"&&l&&this.dom.style.overflowAnchor==null&&Eee(this);if(l){this.domObserver.stop();let y=m&&(go||Sr)&&!this.composing&&!a.selection.empty&&!e.selection.empty&&Fte(a.selection,e.selection);if(m){let S=Sr?this.trackWrites=this.domSelectionRange().focusNode:null;if(this.composing)this.input.compositionNode=xte(this);if(i||!this.docView.update(e.doc,f,u,this))this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=Cz(e.doc,f,u,this.dom,this);if(S&&(!this.trackWrites||!this.dom.contains(this.trackWrites)))y=!0}let v=this.input.mouseDown;if(y||!(v&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&qee(this)&&v.delaySelUpdate()))rl(this,y);else lH(this,e.selection),this.domObserver.setCurSelection();this.domObserver.start()}if(this.updatePluginViews(a),((n=this.dragging)===null||n===void 0?void 0:n.node)&&!a.doc.eq(e.doc))this.updateDraggedNode(this.dragging,a);if(h=="reset")this.dom.scrollTop=0;else if(h=="to selection")this.scrollToSelection();else if(b)Tee(b)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode));else if(this.someProp("handleScrollToSelection",(t)=>t(this)));else if(this.state.selection instanceof Pe){let t=this.docView.domAfterPos(this.state.selection.from);if(t.nodeType==1)yz(this,t.getBoundingClientRect(),e)}else yz(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;while(e=this.pluginViews.pop())if(e.destroy)e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let n=this.directPlugins[t];if(n.spec.view)this.pluginViews.push(n.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let n=this.state.plugins[t];if(n.spec.view)this.pluginViews.push(n.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];if(n.update)n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,a=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)a=n.from;else{let i=n.from+(this.state.doc.content.size-t.doc.content.size);if((i>0&&i<this.state.doc.content.size&&this.state.doc.nodeAt(i))==n.node)a=i}this.dragging=new fk(e.slice,e.move,a<0?void 0:Pe.create(this.state.doc,a))}someProp(e,t){let n=this._props&&this._props[e],a;if(n!=null&&(a=t?t(n):n))return a;for(let l=0;l<this.directPlugins.length;l++){let c=this.directPlugins[l].props[e];if(c!=null&&(a=t?t(c):c))return a}let i=this.state.plugins;if(i)for(let l=0;l<i.length;l++){let c=i[l].props[e];if(c!=null&&(a=t?t(c):c))return a}}hasFocus(){if(go){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;while(e&&this.dom!=e&&this.dom.contains(e)){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){if(this.domObserver.stop(),this.editable)Ree(this.dom);rl(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host){if(!t.getSelection)Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection();return this._root=t}}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Oee(this,e)}coordsAtPos(e,t=1){return Zz(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let a=this.docView.posFromDOM(e,t,n);if(a==null)throw RangeError("DOM position not inside the editor");return a}endOfTextblock(e,t){return Iee(this,t||this.state,e)}pasteHTML(e,t){return ob(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return ob(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return sk(this,e)}destroy(){if(!this.docView)return;if(lte(this),this.destroyPluginViews(),this.mounted)this.docView.update(this.state.doc,[],V3(this),this),this.dom.textContent="";else if(this.dom.parentNode)this.dom.parentNode.removeChild(this.dom);this.docView.destroy(),this.docView=null,mee()}get isDestroyed(){return this.docView==null}dispatchEvent(e){return ute(this,e)}domSelectionRange(){let e=this.domSelection();if(!e)return{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0};return Dr&&this.root.nodeType===11&&xee(this.dom.ownerDocument)==this.dom&&Nte(this,e)||e}domSelection(){return this.root.getSelection()}}function Fz(e){let t=Object.create(null);if(t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(n)=>{if(typeof n=="function")n=n(e.state);if(n){for(let a in n)if(a=="class")t.class+=" "+n[a];else if(a=="style")t.style=(t.style?t.style+";":"")+n[a];else if(!t[a]&&a!="contenteditable"&&a!="nodeName")t[a]=String(n[a])}}),!t.translate)t.translate="no";return[Xn.node(0,e.state.doc.content.size,t)]}function Uz(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Xn.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Vz(e){return!e.someProp("editable",(t)=>t(e.state)===!1)}function Fte(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function jz(e){let t=Object.create(null);function n(a){for(let i in a)if(!Object.prototype.hasOwnProperty.call(t,i))t[i]=a[i]}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Ute(e,t){let n=0,a=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)a++;return n!=a}function Kz(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}var $r=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Qp=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},K3=null,el=function(e,t,n){let a=K3||(K3=document.createRange());return a.setEnd(e,n==null?e.nodeValue.length:n),a.setStart(e,t||0),a},mee=function(){K3=null},Od=function(e,t,n,a){return n&&(gz(e,t,n,a,-1)||gz(e,t,n,a,1))},gee,v1=function(e){return e.focusNode&&Od(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)},ts,bz,Hc,q3,qz,G3,go,_c,Ta,W3,Sr,Gz,Dr,Zp,wa,Wz,tl,sb,See,Yp=null,Dee,Lee,vz=null,xz=null,$z=!1,Ra=0,Sz=1,kd=2,ai=3,rk,tH,Ic,Bc,x1,ok,nH,tb=function(e){if(e)this.nodeName=e},Ad,Ez,ete,mH,U3=null,Jr,Xr,ite,vH,xH,$H,yte,rb,wte,Xp,Md,Or,kte,Ate,Iz,Bz=!1,Lte=(e)=>(t)=>{let n=t.pmViewDesc;if(n)return n.parseRule(e);else if(t.nodeName=="BR"&&t.parentNode){if(Dr&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let a=document.createElement("div");return a.appendChild(document.createElement("li")),{skip:a}}else if(t.parentNode.lastChild==t||Dr&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null},_te;var mk=N(()=>{Qs();Js();Mc();gee=/^(img|br|input|textarea|hr)$/i;ts=typeof navigator<"u"?navigator:null,bz=typeof document<"u"?document:null,Hc=ts&&ts.userAgent||"",q3=/Edge\/(\d+)/.exec(Hc),qz=/MSIE \d/.exec(Hc),G3=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Hc),go=!!(qz||G3||q3),_c=qz?document.documentMode:G3?+G3[1]:q3?+q3[1]:0,Ta=!go&&/gecko\/(\d+)/i.test(Hc);Ta&&+(/Firefox\/(\d+)/.exec(Hc)||[0,0])[1];W3=!go&&/Chrome\/(\d+)/.exec(Hc),Sr=!!W3,Gz=W3?+W3[1]:0,Dr=!go&&!!ts&&/Apple Computer/.test(ts.vendor),Zp=Dr&&(/Mobile\/\w+/.test(Hc)||!!ts&&ts.maxTouchPoints>2),wa=Zp||(ts?/Mac/.test(ts.platform):!1),Wz=ts?/Win/.test(ts.platform):!1,tl=/Android \d/.test(Hc),sb=!!bz&&"webkitFontSmoothing"in bz.documentElement.style,See=sb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;Dee=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;Lee=/[\u0590-\u08ac]/;rk=class rk extends eh{constructor(e,t,n,a){let i,l=t.type.toDOM;if(typeof l=="function")l=l(n,()=>{if(!i)return a;if(i.parent)return i.parent.posBeforeChild(i)});if(!t.type.spec.raw){if(l.nodeType!=1){let c=document.createElement("span");c.appendChild(l),l=c}l.contentEditable="false",l.classList.add("ProseMirror-widget")}super(e,[],l,null);this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==Ra&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}};tH=class tH extends eh{constructor(e,t,n,a){super(e,[],t,null);this.textDOM=n,this.text=a}get size(){return this.text.length}localPosFromDOM(e,t){if(e!=this.textDOM)return this.posAtStart+(t?this.size:0);return this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}};Ic=class Ic extends eh{constructor(e,t,n,a,i){super(e,[],n,a);this.mark=t,this.spec=i}static create(e,t,n,a){let i=a.nodeViews[t.type.name],l=i&&i(t,a,n);if(!l||!l.dom)l=es.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs);return new Ic(e,t,l.dom,l.contentDOM||l.dom,l)}parseRule(){if(this.dirty&ai||this.mark.type.spec.reparseInView)return null;return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ai&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Ra){let n=this.parent;while(!n.node)n=n.parent;if(n.dirty<this.dirty)n.dirty=this.dirty;this.dirty=Ra}}slice(e,t,n){let a=Ic.create(this.parent,this.mark,!0,n),i=this.children,l=this.size;if(t<l)i=X3(i,t,l,n);if(e>0)i=X3(i,0,e,n);for(let c=0;c<i.length;c++)i[c].parent=a;return a.children=i,a}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){if(this.spec.destroy)this.spec.destroy();super.destroy()}};Bc=class Bc extends eh{constructor(e,t,n,a,i,l,c){super(e,[],i,l);this.node=t,this.outerDeco=n,this.innerDeco=a,this.nodeDOM=c}static create(e,t,n,a,i,l){let c=i.nodeViews[t.type.name],u,f=c&&c(t,i,()=>{if(!u)return l;if(u.parent)return u.parent.posBeforeChild(u)},n,a),h=f&&f.dom,m=f&&f.contentDOM;if(t.isText){if(!h)h=document.createTextNode(t.text);else if(h.nodeType!=3)throw RangeError("Text must be rendered as a DOM text node")}else if(!h)({dom:h,contentDOM:m}=es.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));if(!m&&!t.isText&&h.nodeName!="BR"){if(!h.hasAttribute("contenteditable"))h.contentEditable="false";if(t.type.spec.draggable)h.draggable=!0}let b=h;if(h=aH(h,n,t),f)return u=new nH(e,t,n,a,h,m||null,b,f);else if(t.isText)return new x1(e,t,n,a,h,b);else return new Bc(e,t,n,a,h,m||null,b)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre")t.preserveWhitespace="full";if(!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let a=this.children[n];if(this.dom.contains(a.dom.parentNode)){t.contentElement=a.dom.parentNode;break}}if(!t.contentElement){let n=e&&e.find((a)=>a.nodeType==1&&e.indexOf(a.parentNode)<0&&this.dom.contains(a));if(n)t.contentElement=n;else t.getContent=()=>le.empty}}return t}matchesNode(e,t,n){return this.dirty==Ra&&e.eq(this.node)&&h1(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,a=t,i=e.composing?this.localCompositionInfo(e,t):null,l=i&&i.pos>-1?i:null,c=i&&i.pos<0,u=new iH(this,l&&l.node,e);if(Fee(this.node,this.innerDeco,(f,h,m)=>{if(f.spec.marks)u.syncToMarks(f.spec.marks,n,e,h);else if(f.type.side>=0&&!m)u.syncToMarks(h==this.node.childCount?Pt.none:this.node.child(h).marks,n,e,h);u.placeWidget(f,e,a)},(f,h,m,b)=>{u.syncToMarks(f.marks,n,e,b);let y;if(u.findNodeMatch(f,h,m,b));else if(c&&e.state.selection.from>a&&e.state.selection.to<a+f.nodeSize&&(y=u.findIndexWithChild(i.node))>-1&&u.updateNodeAt(f,h,m,y,e));else if(u.updateNextNode(f,h,m,e,b,a));else u.addNode(f,h,m,e,a);a+=f.nodeSize}),u.syncToMarks([],n,e,0),this.node.isTextblock)u.addTextblockHacks();if(u.destroyRest(),u.changed||this.dirty==kd){if(l)this.protectLocalComposition(e,l);if(rH(this.contentDOM,this.children,e),Zp)Uee(this.dom)}}localCompositionInfo(e,t){let{from:n,to:a}=e.state.selection;if(!(e.state.selection instanceof Me)||n<t||a>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let l=i.nodeValue,c=Vee(this.node.content,l,n-t,a-t);return c<0?null:{node:i,pos:c,text:l}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:a}){if(this.getDesc(t))return;let i=t;for(;;i=i.parentNode){if(i.parentNode==this.contentDOM)break;while(i.previousSibling)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling)i.parentNode.removeChild(i.nextSibling);if(i.pmViewDesc)i.pmViewDesc=void 0}let l=new tH(this,i,t,a);e.input.compositionNodes.push(l),this.children=X3(this.children,n,n+a.length,e,l)}update(e,t,n,a){if(this.dirty==ai||!e.sameMarkup(this.node))return!1;return this.updateInner(e,t,n,a),!0}updateInner(e,t,n,a){if(this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM)this.updateChildren(a,this.posAtStart);this.dirty=Ra}updateOuterDeco(e){if(h1(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;if(this.dom=oH(this.dom,this.nodeDOM,J3(this.outerDeco,this.node,t),J3(e,this.node,t)),this.dom!=n)n.pmViewDesc=void 0,this.dom.pmViewDesc=this;this.outerDeco=e}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}};x1=class x1 extends Bc{constructor(e,t,n,a,i,l){super(e,t,n,a,i,null,l)}parseRule(){let e=this.nodeDOM.parentNode;while(e&&e!=this.dom&&!e.pmIsDeco)e=e.parentNode;return{skip:e||!0}}update(e,t,n,a){if(this.dirty==ai||this.dirty!=Ra&&!this.inParent()||!e.sameMarkup(this.node))return!1;if(this.updateOuterDeco(t),(this.dirty!=Ra||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue){if(this.nodeDOM.nodeValue=e.text,a.trackWrites==this.nodeDOM)a.trackWrites=null}return this.node=e,this.dirty=Ra,!0}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){if(e==this.nodeDOM)return this.posAtStart+Math.min(t,this.node.text.length);return super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,n){let a=this.node.cut(e,t),i=document.createTextNode(a.text);return new x1(this.parent,a,this.outerDeco,this.innerDeco,i,i)}markDirty(e,t){if(super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length))this.dirty=ai}get domAtom(){return!1}isText(e){return this.node.text==e}};ok=class ok extends eh{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Ra&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}};nH=class nH extends Bc{constructor(e,t,n,a,i,l,c,u){super(e,t,n,a,i,l,c);this.spec=u}update(e,t,n,a){if(this.dirty==ai)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);if(i)this.updateInner(e,t,n,a);return i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,n,a)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,a){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,a)}destroy(){if(this.spec.destroy)this.spec.destroy();super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};tb.prototype=Object.create(null);Ad=[new tb];Ez=Dr||Sr&&Gz<63;ete=/^(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;mH={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};Jr={},Xr={},ite={touchstart:!0,touchmove:!0};Xr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,SH(e))return;if(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),tl&&Sr&&n.keyCode==13)return;if(n.keyCode!=229)e.domObserver.forceFlush();if(Zp&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let a=Date.now();e.input.lastIOSEnter=a,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{if(e.input.lastIOSEnter==a)e.someProp("handleKeyDown",(i)=>i(e,Rd(13,"Enter"))),e.input.lastIOSEnter=0},200)}else if(e.someProp("handleKeyDown",(a)=>a(e,n))||Zee(e,n))n.preventDefault();else nl(e,"key")};Xr.keyup=(e,t)=>{if(t.keyCode==16)e.input.shiftKey=!1};Xr.keypress=(e,t)=>{let n=t;if(SH(e)||!n.charCode||n.ctrlKey&&!n.altKey||wa&&n.metaKey)return;if(e.someProp("handleKeyPress",(i)=>i(e,n))){n.preventDefault();return}let a=e.state.selection;if(!(a instanceof Me)||!a.$from.sameParent(a.$to)){let i=String.fromCharCode(n.charCode),l=()=>e.state.tr.insertText(i).scrollIntoView();if(!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",(c)=>c(e,a.$from.pos,a.$to.pos,i,l)))e.dispatch(l());n.preventDefault()}};vH=wa?"metaKey":"ctrlKey";Jr.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let a=uk(e),i=Date.now(),l="singleClick";if(i-e.input.lastClick.time<500&&dte(n,e.input.lastClick)&&!n[vH]&&e.input.lastClick.button==n.button){if(e.input.lastClick.type=="singleClick")l="doubleClick";else if(e.input.lastClick.type=="doubleClick")l="tripleClick"}if(e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:l,button:n.button},e.input.mouseDown)e.input.mouseDown.done();let c=e.posAtCoords(lb(n));if(!c)return;if(l=="singleClick")e.input.mouseDown=new xH(e,c,n,!!a);else if((l=="doubleClick"?mte:gte)(e,c.pos,c.inside,n))n.preventDefault();else nl(e,"pointer")};xH=class xH extends dk{constructor(e,t,n,a){super(e);this.pos=t,this.event=n,this.flushed=a,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!n[vH],this.allowDefault=n.shiftKey;let i,l;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),l=t.inside;else{let h=e.state.doc.resolve(t.pos);i=h.parent,l=h.depth?h.before():0}let c=a?null:n.target,u=c?e.docView.nearestDesc(c,!0):null;this.target=u&&u.nodeDOM.nodeType==1?u.nodeDOM:null;let{selection:f}=e.state;if(n.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||f instanceof Pe&&f.from<=l&&f.to>l))this.mightDrag={node:i,pos:l,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ta&&!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()}nl(e,"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)rl(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;if(this.view.state.doc!=this.startDoc)t=this.view.posAtCoords(lb(e));if(this.updateAllowDefault(e),this.allowDefault||!t)nl(this.view,"pointer");else if(hte(this.view,t.pos,t.inside,e,this.selectNode))e.preventDefault();else if(e.button==0&&(this.flushed||Dr&&this.mightDrag&&!this.mightDrag.node.isAtom||Sr&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2))cb(this.view,Fe.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault();else nl(this.view,"pointer")}move(e){this.updateAllowDefault(e),nl(this.view,"pointer"),super.move(e)}updateAllowDefault(e){if(!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4))this.allowDefault=!0}delaySelUpdate(){if(!this.allowDefault)return!1;return this.delayedSelectionSync=!0,!0}};$H=class $H extends dk{constructor(e,t){super(e);this.startSelection=t,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),nl(this.view,"pointer");let t=this.view.posAtCoords(lb(e)),n=t&&yH(this.view,t.inside,!1);if(!n)return;let{doc:a}=this.view.state,i=this.startSelection,[l,c]=n.from<i.from?[i.to,n.from]:[i.from,n.to];cb(this.view,Me.create(a,l,c),"pointer")}};Jr.touchstart=(e)=>{e.input.lastTouch=Date.now(),uk(e),nl(e,"pointer")};Jr.touchmove=(e)=>{e.input.lastTouch=Date.now(),nl(e,"pointer")};Jr.contextmenu=(e)=>uk(e);yte=tl?5000:-1;Xr.compositionstart=Xr.compositionupdate=(e)=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Me&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((a)=>a.type.spec.inclusive===!1)||Sr&&Wz&&vte(e)))e.markCursor=e.state.storedMarks||n.marks(),g1(e,!0),e.markCursor=null;else if(g1(e,!t.selection.empty),Ta&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let a=e.domSelectionRange();for(let{focusNode:i,focusOffset:l}=a;i&&i.nodeType==1&&l!=0;){let c=l<0?i.lastChild:i.childNodes[l-1];if(!c)break;if(c.nodeType==3){let u=e.domSelection();if(u)u.collapse(c,c.nodeValue.length);break}else i=c,l=-1}}e.input.composing=!0}CH(e,yte)};Xr.compositionend=(e,t)=>{if(e.composing){if(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition)e.domObserver.forceFlush();else if(e.input.compositionPendingChanges)Promise.resolve().then(()=>e.domObserver.flush());e.input.compositionID++,CH(e,20)}};rb=go&&_c<15||Zp&&See<604;Jr.copy=Xr.cut=(e,t)=>{let n=t,a=e.state.selection,i=n.type=="cut";if(a.empty)return;let l=rb?null:n.clipboardData,c=a.content(),{dom:u,text:f}=sk(e,c);if(l)n.preventDefault(),l.clearData(),l.setData("text/html",u.innerHTML),l.setData("text/plain",f);else $te(e,u);if(i)e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};Xr.paste=(e,t)=>{let n=t;if(e.composing&&!tl)return;let a=rb?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;if(a&&ob(e,EH(a),a.getData("text/html"),i,n))n.preventDefault();else Cte(e,n)};wte=wa?"altKey":"ctrlKey";Jr.dragstart=(e,t)=>{let n=t,a=e.input.mouseDown;if(a)a.done();if(!n.dataTransfer)return;let i=e.state.selection,l=i.empty?null:e.posAtCoords(lb(n)),c;if(l&&l.pos>=i.from&&l.pos<=(i instanceof Pe?i.to-1:i.to));else if(a&&a.mightDrag)c=Pe.create(e.state.doc,a.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let b=e.docView.nearestDesc(n.target,!0);if(b&&b.node.type.spec.draggable&&b!=e.docView)c=Pe.create(e.state.doc,b.posBefore)}let u=(c||e.state.selection).content(),{dom:f,text:h,slice:m}=sk(e,u);if(!n.dataTransfer.files.length||!Sr||Gz>120)n.dataTransfer.clearData();if(n.dataTransfer.setData(rb?"Text":"text/html",f.innerHTML),n.dataTransfer.effectAllowed="copyMove",!rb)n.dataTransfer.setData("text/plain",h);e.dragging=new fk(m,TH(e,n),c)};Jr.dragend=(e)=>{let t=e.dragging;window.setTimeout(()=>{if(e.dragging==t)e.dragging=null},50)};Xr.dragover=Xr.dragenter=(e,t)=>t.preventDefault();Xr.drop=(e,t)=>{try{Ete(e,t,e.dragging)}finally{e.dragging=null}};Jr.focus=(e)=>{if(e.input.lastFocus=Date.now(),!e.focused)e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{if(e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange()))rl(e)},20)};Jr.blur=(e,t)=>{let n=t;if(e.focused){if(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget))e.domObserver.currentSelection.clear();e.focused=!1}};Jr.beforeinput=(e,t)=>{if(tl&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:a}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=a)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(l)=>l(e,Rd(8,"Backspace"))))return;let{$cursor:i}=e.state.selection;if(i&&i.pos>0)e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in Xr)Jr[e]=Xr[e];Xp=[],Md={};Lt.empty=new Lt([],[]);Lt.removeOverlap=hk;Or=Lt.empty;kte={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ate=go&&_c<=11;Iz=new WeakMap;_te=/^(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;$1.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;if(t)t.call(this,e);else this.updateState(this.state.apply(e))}});var Fc=N(()=>{mk()});function OH(e){var t=Vte&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||jte&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?S1:ol)[e.keyCode]||e.key||"Unidentified";if(n=="Esc")n="Escape";if(n=="Del")n="Delete";if(n=="Left")n="ArrowLeft";if(n=="Up")n="ArrowUp";if(n=="Right")n="ArrowRight";if(n=="Down")n="ArrowDown";return n}var ol,S1,Vte,jte,yn,yn,yn,ub;var DH=N(()=>{ol={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:"'"},S1={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Vte=typeof navigator<"u"&&/Mac/.test(navigator.platform),jte=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(yn=0;yn<10;yn++)ol[48+yn]=ol[96+yn]=String(yn);for(yn=1;yn<=24;yn++)ol[yn+111]="F"+yn;for(yn=65;yn<=90;yn++)ol[yn]=String.fromCharCode(yn+32),S1[yn]=String.fromCharCode(yn);for(ub in ol)if(!S1.hasOwnProperty(ub))S1[ub]=ol[ub]});function Gte(e){let t=e.split(/-(?!$)/),n=t[t.length-1];if(n=="Space")n=" ";let a,i,l,c;for(let u=0;u<t.length-1;u++){let f=t[u];if(/^(cmd|meta|m)$/i.test(f))c=!0;else if(/^a(lt)?$/i.test(f))a=!0;else if(/^(c|ctrl|control)$/i.test(f))i=!0;else if(/^s(hift)?$/i.test(f))l=!0;else if(/^mod$/i.test(f))if(Kte)c=!0;else i=!0;else throw Error("Unrecognized modifier name: "+f)}if(a)n="Alt-"+n;if(i)n="Ctrl-"+n;if(c)n="Meta-"+n;if(l)n="Shift-"+n;return n}function Wte(e){let t=Object.create(null);for(let n in e)t[Gte(n)]=e[n];return t}function gk(e,t,n=!0){if(t.altKey)e="Alt-"+e;if(t.ctrlKey)e="Ctrl-"+e;if(t.metaKey)e="Meta-"+e;if(n&&t.shiftKey)e="Shift-"+e;return e}function PH(e){return new qe({props:{handleKeyDown:db(e)}})}function db(e){let t=Wte(e);return function(n,a){let i=OH(a),l,c=t[gk(i,a)];if(c&&c(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(a.shiftKey){let u=t[gk(i,a,!1)];if(u&&u(n.state,n.dispatch,n))return!0}if((a.altKey||a.metaKey||a.ctrlKey)&&!(qte&&a.ctrlKey&&a.altKey)&&(l=ol[a.keyCode])&&l!=i){let u=t[gk(l,a)];if(u&&u(n.state,n.dispatch,n))return!0}}return!1}}var Kte,qte;var C1=N(()=>{DH();Qs();Kte=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),qte=typeof navigator<"u"&&/Win/.test(navigator.platform)});var LH=N(()=>{C1()});function M1(e){let{state:t,transaction:n}=e,{selection:a}=n,{doc:i}=n,{storedMarks:l}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return l},get selection(){return a},get doc(){return i},get tr(){return a=n.selection,i=n.doc,l=n.storedMarks,n}}}function En(e,t){if(typeof e==="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function wk(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function k1(e,t,n={strict:!0}){let a=Object.keys(t);if(!a.length)return!0;return a.every((i)=>{if(n.strict)return t[i]===e[i];if(wk(t[i]))return t[i].test(e[i]);return t[i]===e[i]})}function WH(e,t,n={}){return e.find((a)=>a.type===t&&k1(Object.fromEntries(Object.keys(n).map((i)=>[i,a.attrs[i]])),n))}function IH(e,t,n={}){return!!WH(e,t,n)}function Ek(e,t,n){if(!e||!t)return;let a=e.parent.childAfter(e.parentOffset);if(!a.node||!a.node.marks.some((h)=>h.type===t))a=e.parent.childBefore(e.parentOffset);if(!a.node||!a.node.marks.some((h)=>h.type===t))return;if(!n){let h=a.node.marks.find((m)=>m.type===t);if(h)n=h.attrs}if(!WH([...a.node.marks],t,n))return;let l=a.index,c=e.start()+a.offset,u=l+1,f=c+a.node.nodeSize;while(l>0&&IH([...e.parent.child(l-1).marks],t,n))l-=1,c-=e.parent.child(l).nodeSize;while(u<e.parent.childCount&&IH([...e.parent.child(u).marks],t,n))f+=e.parent.child(u).nodeSize,u+=1;return{from:c,to:f}}function il(e,t){if(typeof e==="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function O1(e){return e instanceof Me}function al(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function xk(e,t=null){if(!t)return null;let n=Fe.atStart(e),a=Fe.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return a;let i=n.from,l=a.to;if(t==="all")return Me.create(e,al(0,i,l),al(e.content.size,i,l));return Me.create(e,al(t,i,l),al(t,i,l))}function BH(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function A1(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function fne(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}function pb(e){if(typeof window>"u")throw Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return YH(n)}function th(e,t,n){if(e instanceof Mr||e instanceof le)return e;n={slice:!0,parseOptions:{},...n};let a=typeof e==="object"&&e!==null,i=typeof e==="string";if(a)try{if(Array.isArray(e)&&e.length>0)return le.fromArray(e.map((u)=>t.nodeFromJSON(u)));let c=t.nodeFromJSON(e);if(n.errorOnInvalidContent)c.check();return c}catch(l){if(n.errorOnInvalidContent)throw Error("[tiptap error]: Invalid JSON content",{cause:l});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",l),th("",t,n)}if(i){if(n.errorOnInvalidContent){let c=!1,u="",f=new Gg({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:(h)=>(c=!0,u=typeof h==="string"?h:h.outerHTML,null)}]}})});if(n.slice)qo.fromSchema(f).parseSlice(pb(e),n.parseOptions);else qo.fromSchema(f).parse(pb(e),n.parseOptions);if(n.errorOnInvalidContent&&c)throw Error("[tiptap error]: Invalid HTML content",{cause:Error(`Invalid element found: ${u}`)})}let l=qo.fromSchema(t);if(n.slice)return l.parseSlice(pb(e),n.parseOptions).content;return l.parse(pb(e),n.parseOptions)}return th("",t,n)}function JH(e,t,n){let a=e.steps.length-1;if(a<t)return;let i=e.steps[a];if(!(i instanceof bn||i instanceof wn))return;let l=e.mapping.maps[a],c=0;l.forEach((u,f,h,m)=>{if(c===0)c=m}),e.setSelection(Fe.near(e.doc.resolve(c),n))}function XH(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function QH(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Rne(e){let t=e.split(/-(?!$)/),n=t[t.length-1];if(n==="Space")n=" ";let a,i,l,c;for(let u=0;u<t.length-1;u+=1){let f=t[u];if(/^(cmd|meta|m)$/i.test(f))c=!0;else if(/^a(lt)?$/i.test(f))a=!0;else if(/^(c|ctrl|control)$/i.test(f))i=!0;else if(/^s(hift)?$/i.test(f))l=!0;else if(/^mod$/i.test(f))if(A1()||QH())c=!0;else i=!0;else throw Error(`Unrecognized modifier name: ${f}`)}if(a)n=`Alt-${n}`;if(i)n=`Ctrl-${n}`;if(c)n=`Meta-${n}`;if(l)n=`Shift-${n}`;return n}function ns(e,t,n={}){let{from:a,to:i,empty:l}=e.selection,c=t?En(t,e.schema):null,u=[];e.doc.nodesBetween(a,i,(b,y)=>{if(b.isText)return;let v=Math.max(a,y),S=Math.min(i,y+b.nodeSize);u.push({node:b,from:v,to:S})});let f=i-a,h=u.filter((b)=>{if(!c)return!0;return c.name===b.node.type.name}).filter((b)=>k1(b.node.attrs,n,{strict:!1}));if(l)return!!h.length;return h.reduce((b,y)=>b+y.to-y.from,0)>=f}function D1(e,t){if(t.nodes[e])return"node";if(t.marks[e])return"mark";return null}function zH(e,t){let n=typeof t==="string"?[t]:t;return Object.keys(e).reduce((a,i)=>{if(!n.includes(i))a[i]=e[i];return a},{})}function $k(e,t,n={},a={}){return th(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:a.errorOnInvalidContent})}function ZH(e,t){let n=il(t,e.schema),{from:a,to:i,empty:l}=e.selection,c=[];if(l){if(e.storedMarks)c.push(...e.storedMarks);c.push(...e.selection.$head.marks())}else e.doc.nodesBetween(a,i,(f)=>{c.push(...f.marks)});let u=c.find((f)=>f.type.name===n.name);if(!u)return{};return{...u.attrs}}function Tk(e,t){let n=new Qg(e);return t.forEach((a)=>{a.steps.forEach((i)=>{n.step(i)})}),n}function eF(e,t,n){let a=[];return e.nodesBetween(t.from,t.to,(i,l)=>{if(n(i))a.push({node:i,pos:l})}),a}function Une(e,t){for(let n=e.depth;n>0;n-=1){let a=e.node(n);if(t(a))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:a}}}function P1(e){return(t)=>Une(t.$from,e)}function He(e,t,n){if(e.config[t]===void 0&&e.parent)return He(e.parent,t,n);if(typeof e.config[t]==="function")return e.config[t].bind({...n,parent:e.parent?He(e.parent,t,n):null});return e.config[t]}function Rk(e){return e.map((t)=>{let n={name:t.name,options:t.options,storage:t.storage},a=He(t,"addExtensions",n);if(a)return[t,...Rk(a())];return t}).flat(10)}function L1(e,t){let n=es.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function tF(e){return typeof e==="function"}function Bt(e,t=void 0,...n){if(tF(e)){if(t)return e.bind(t)(...n);return e(...n)}return e}function Vne(e={}){return Object.keys(e).length===0&&e.constructor===Object}function nh(e){let t=e.filter((i)=>i.type==="extension"),n=e.filter((i)=>i.type==="node"),a=e.filter((i)=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:a}}function nF(e){let t=[],{nodeExtensions:n,markExtensions:a}=nh(e),i=[...n,...a],l={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},c=n.filter((h)=>h.name!=="text").map((h)=>h.name),u=a.map((h)=>h.name),f=[...c,...u];return e.forEach((h)=>{let m={name:h.name,options:h.options,storage:h.storage,extensions:i},b=He(h,"addGlobalAttributes",m);if(!b)return;b().forEach((v)=>{let S;if(Array.isArray(v.types))S=v.types;else if(v.types==="*")S=f;else if(v.types==="nodes")S=c;else if(v.types==="marks")S=u;else S=[];S.forEach((w)=>{Object.entries(v.attributes).forEach(([E,T])=>{t.push({type:w,name:E,attribute:{...l,...T}})})})})}),i.forEach((h)=>{let m={name:h.name,options:h.options,storage:h.storage},b=He(h,"addAttributes",m);if(!b)return;let y=b();Object.entries(y).forEach(([v,S])=>{let w={...l,...S};if(typeof(w==null?void 0:w.default)==="function")w.default=w.default();if((w==null?void 0:w.isRequired)&&(w==null?void 0:w.default)===void 0)delete w.default;t.push({type:h.name,name:v,attribute:w})})}),t}function jne(e){let t=[],n="",a=!1,i=!1,l=0,c=e.length;for(let u=0;u<c;u+=1){let f=e[u];if(f==="'"&&!i){a=!a,n+=f;continue}if(f==='"'&&!a){i=!i,n+=f;continue}if(!a&&!i){if(f==="("){l+=1,n+=f;continue}if(f===")"&&l>0){l-=1,n+=f;continue}if(f===";"&&l===0){t.push(n),n="";continue}}n+=f}if(n)t.push(n);return t}function HH(e){let t=[],n=jne(e||""),a=n.length;for(let i=0;i<a;i+=1){let l=n[i],c=l.indexOf(":");if(c===-1)continue;let u=l.slice(0,c).trim(),f=l.slice(c+1).trim();if(u&&f)t.push([u,f])}return t}function St(...e){return e.filter((t)=>!!t).reduce((t,n)=>{let a={...t};return Object.entries(n).forEach(([i,l])=>{if(!a[i]){a[i]=l;return}if(i==="class"){let u=l?String(l).split(" "):[],f=a[i]?a[i].split(" "):[],h=u.filter((m)=>!f.includes(m));a[i]=[...f,...h].join(" ")}else if(i==="style"){let u=new Map([...HH(a[i]),...HH(l)]);a[i]=Array.from(u.entries()).map(([f,h])=>`${f}: ${h}`).join("; ")}else a[i]=l}),a},{})}function rh(e,t){return t.filter((n)=>n.type===e.type.name).filter((n)=>n.attribute.rendered).map((n)=>{if(!n.attribute.renderHTML)return{[n.name]:e.attrs[n.name]};return n.attribute.renderHTML(e.attrs)||{}}).reduce((n,a)=>St(n,a),{})}function Kne(e){if(typeof e!=="string")return e;if(e.match(/^[+-]?(?:\d*\.)?\d+$/))return Number(e);if(e==="true")return!0;if(e==="false")return!1;return e}function FH(e,t){if("style"in e)return e;return{...e,getAttrs:(n)=>{let a=e.getAttrs?e.getAttrs(n):e.attrs;if(a===!1)return!1;let i=t.reduce((l,c)=>{let u=c.attribute.parseHTML?c.attribute.parseHTML(n):Kne(n.getAttribute(c.name));if(u===null||u===void 0)return l;return{...l,[c.name]:u}},{});return{...a,...i}}}}function UH(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>{if(t==="attrs"&&Vne(n))return!1;return n!==null&&n!==void 0}))}function VH(e){var t,n;let a={};if(!((t=e==null?void 0:e.attribute)==null?void 0:t.isRequired)&&"default"in((e==null?void 0:e.attribute)||{}))a.default=e.attribute.default;if(((n=e==null?void 0:e.attribute)==null?void 0:n.validate)!==void 0)a.validate=e.attribute.validate;return[e.name,a]}function rF(e,t){var n;let a=nF(e),{nodeExtensions:i,markExtensions:l}=nh(e),c=(n=i.find((h)=>He(h,"topNode")))==null?void 0:n.name,u=Object.fromEntries(i.map((h)=>{let m=a.filter((T)=>T.type===h.name),b={name:h.name,options:h.options,storage:h.storage,editor:t},y=e.reduce((T,D)=>{let H=He(D,"extendNodeSchema",b);return{...T,...H?H(h):{}}},{}),v=UH({...y,content:Bt(He(h,"content",b)),marks:Bt(He(h,"marks",b)),group:Bt(He(h,"group",b)),inline:Bt(He(h,"inline",b)),atom:Bt(He(h,"atom",b)),selectable:Bt(He(h,"selectable",b)),draggable:Bt(He(h,"draggable",b)),code:Bt(He(h,"code",b)),whitespace:Bt(He(h,"whitespace",b)),linebreakReplacement:Bt(He(h,"linebreakReplacement",b)),defining:Bt(He(h,"defining",b)),isolating:Bt(He(h,"isolating",b)),attrs:Object.fromEntries(m.map(VH))}),S=Bt(He(h,"parseHTML",b));if(S)v.parseDOM=S.map((T)=>FH(T,m));let w=He(h,"renderHTML",b);if(w)v.toDOM=(T)=>w({node:T,HTMLAttributes:rh(T,m)});let E=He(h,"renderText",b);if(E)v.toText=E;return[h.name,v]})),f=Object.fromEntries(l.map((h)=>{let m=a.filter((E)=>E.type===h.name),b={name:h.name,options:h.options,storage:h.storage,editor:t},y=e.reduce((E,T)=>{let D=He(T,"extendMarkSchema",b);return{...E,...D?D(h):{}}},{}),v=UH({...y,inclusive:Bt(He(h,"inclusive",b)),excludes:Bt(He(h,"excludes",b)),group:Bt(He(h,"group",b)),spanning:Bt(He(h,"spanning",b)),code:Bt(He(h,"code",b)),attrs:Object.fromEntries(m.map(VH))}),S=Bt(He(h,"parseHTML",b));if(S)v.parseDOM=S.map((E)=>FH(E,m));let w=He(h,"renderHTML",b);if(w)v.toDOM=(E)=>w({mark:E,HTMLAttributes:rh(E,m)});return[h.name,v]}));return new Gg({topNode:c,nodes:u,marks:f})}function qne(e){let t=e.filter((n,a)=>e.indexOf(n)!==a);return Array.from(new Set(t))}function hb(e){return e.sort((n,a)=>{let i=He(n,"priority")||100,l=He(a,"priority")||100;if(i>l)return-1;if(i<l)return 1;return 0})}function kk(e){let t=hb(Rk(e)),n=qne(t.map((a)=>a.name));if(n.length)console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((a)=>`'${a}'`).join(", ")}]. This can lead to issues.`);return t}function oF(e,t){let n=kk(e);return rF(n,t)}function aF(e,t){let n=oF(t),a=Mr.fromJSON(n,e);return L1(a.content,n)}function iF(e,t){let n=oF(t),a=pb(e);return qo.fromSchema(n).parse(a).toJSON()}function sF(e,t,n){let{from:a,to:i}=t,{blockSeparator:l=`
|
|
261
|
+
|
|
262
|
+
`,textSerializers:c={}}=n||{},u="";return e.nodesBetween(a,i,(f,h,m,b)=>{var y;if(f.isBlock&&h>a)u+=l;let v=c==null?void 0:c[f.type.name];if(v){if(m)u+=v({node:f,pos:h,parent:m,index:b,range:t});return!1}if(f.isText)u+=(y=f==null?void 0:f.text)==null?void 0:y.slice(Math.max(a,h)-h,i-h)}),u}function Ak(e,t){let n={from:0,to:e.content.size};return sF(e,n,t)}function _1(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function Gne(e,t){let n=En(t,e.schema),{from:a,to:i}=e.selection,l=[];e.doc.nodesBetween(a,i,(u)=>{l.push(u)});let c=l.reverse().find((u)=>u.type.name===n.name);if(!c)return{};return{...c.attrs}}function Mk(e,t){let n=D1(typeof t==="string"?t:t.name,e.schema);if(n==="node")return Gne(e,t);if(n==="mark")return ZH(e,t);return{}}function Wne(e,t=JSON.stringify){let n={};return e.filter((a)=>{let i=t(a);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function Yne(e){let t=Wne(e);return t.length===1?t:t.filter((n,a)=>!t.filter((l,c)=>c!==a).some((l)=>n.oldRange.from>=l.oldRange.from&&n.oldRange.to<=l.oldRange.to&&n.newRange.from>=l.newRange.from&&n.newRange.to<=l.newRange.to))}function mb(e){let{mapping:t,steps:n}=e,a=[];return t.maps.forEach((i,l)=>{let c=[];if(!i.ranges.length){let{from:u,to:f}=n[l];if(u===void 0||f===void 0)return;c.push({from:u,to:f})}else i.forEach((u,f)=>{c.push({from:u,to:f})});c.forEach(({from:u,to:f})=>{let h=t.slice(l).map(u,-1),m=t.slice(l).map(f),b=t.invert().map(h,-1),y=t.invert().map(m);a.push({oldRange:{from:b,to:y},newRange:{from:h,to:m}})})}),Yne(a)}function I1(e,t,n){let a=[];if(e===t)n.resolve(e).marks().forEach((i)=>{let l=n.resolve(e),c=Ek(l,i.type);if(!c)return;a.push({mark:i,...c})});else n.nodesBetween(e,t,(i,l)=>{if(!i||(i==null?void 0:i.nodeSize)===void 0)return;a.push(...i.marks.map((c)=>({from:l,to:l+i.nodeSize,mark:c})))});return a}function fb(e,t){return t.nodes[e]||t.marks[e]||null}function R1(e,t,n){return Object.fromEntries(Object.entries(n).filter(([a])=>{let i=e.find((l)=>l.type===t&&l.name===a);if(!i)return!1;return i.attribute.keepOnSplit}))}function Sk(e,t,n={}){let{empty:a,ranges:i}=e.selection,l=t?il(t,e.schema):null;if(a)return!!(e.storedMarks||e.selection.$from.marks()).filter((b)=>{if(!l)return!0;return l.name===b.type.name}).find((b)=>k1(b.attrs,n,{strict:!1}));let c=0,u=[];if(i.forEach(({$from:b,$to:y})=>{let v=b.pos,S=y.pos;e.doc.nodesBetween(v,S,(w,E)=>{if(l&&w.inlineContent&&!w.type.allowsMarkType(l))return!1;if(!w.isText&&!w.marks.length)return;let T=Math.max(v,E),D=Math.min(S,E+w.nodeSize),H=D-T;c+=H,u.push(...w.marks.map((z)=>({mark:z,from:T,to:D})))})}),c===0)return!1;let f=u.filter((b)=>{if(!l)return!0;return l.name===b.mark.type.name}).filter((b)=>k1(b.mark.attrs,n,{strict:!1})).reduce((b,y)=>b+y.to-y.from,0),h=u.filter((b)=>{if(!l)return!0;return b.mark.type!==l&&b.mark.type.excludes(l)}).reduce((b,y)=>b+y.to-y.from,0);return(f>0?f+h:f)>=c}function Xne(e,t,n={}){if(!t)return ns(e,null,n)||Sk(e,null,n);let a=D1(t,e.schema);if(a==="node")return ns(e,t,n);if(a==="mark")return Sk(e,t,n);return!1}function jH(e,t){if(Array.isArray(t))return t.some((n)=>(typeof n==="string"?n:n.name)===e.name);return t}function bk(e,t){let{nodeExtensions:n}=nh(t),a=n.find((c)=>c.name===e);if(!a)return!1;let i={name:a.name,options:a.options,storage:a.storage},l=Bt(He(a,"group",i));if(typeof l!=="string")return!1;return l.split(" ").includes("list")}function oh(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var a;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return!/\S/.test((a=e.text)!=null?a:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach((l)=>{if(i===!1)return;if(!oh(l,{ignoreWhitespace:n,checkChildren:t}))i=!1}),i}return!1}function B1(e){return e instanceof Pe}function Qne(e,t){let n=t.mapping.mapResult(e.position);return{position:new dF(n.pos),mapResult:n}}function Zne(e){return new dF(e)}function z1(e,t,n){let i=e.state.doc.content.size,l=al(t,0,i),c=al(n,0,i),u=e.coordsAtPos(l),f=e.coordsAtPos(c,-1),h=Math.min(u.top,f.top),m=Math.max(u.bottom,f.bottom),b=Math.min(u.left,f.left),y=Math.max(u.right,f.right),v=y-b,S=m-h,T={top:h,bottom:m,left:b,right:y,width:v,height:S,x:b,y:h};return{...T,toJSON:()=>T}}function ere(e,t,n){var a;let{selection:i}=t,l=null;if(O1(i))l=i.$cursor;if(l){let u=(a=e.storedMarks)!=null?a:l.marks();return l.parent.type.allowsMarkType(n)&&(!!n.isInSet(u)||!u.some((h)=>h.type.excludes(n)))}let{ranges:c}=i;return c.some(({$from:u,$to:f})=>{let h=u.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(u.pos,f.pos,(m,b,y)=>{if(h)return!1;if(m.isInline){let v=!y||y.type.allowsMarkType(n),S=!!n.isInSet(m.marks)||!m.marks.some((w)=>w.type.excludes(n));h=v&&S}return!h}),h})}function KH(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let a=n.filter((i)=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(a)}}function qH(e){return!e||e==="1"?null:e}function fF(e,t){return qH(e)===qH(t)}function ure(e){let t=e.doc,n=t.firstChild;if(!n)return null;let a=t.resolve(1),i=t.resolve(n.nodeSize-1);return Me.between(a,i)}function pF(e,t){let{selection:n}=e,{$from:a}=n;if(n instanceof Pe){let l=a.index();return a.parent.canReplaceWith(l,l+1,t)}let i=a.depth;while(i>=0){let l=a.index(i);if(a.node(i).contentMatchAt(l).matchType(t))return!0;i-=1}return!1}function Cre(e,t,n){let a=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(a!==null)return a;let i=document.createElement("style");if(t)i.setAttribute("nonce",t);return i.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}function hF(e,t){let n=e.getAttribute("style");if(!n)return null;let a=n.split(";").map((l)=>l.trim()).filter(Boolean),i=t.toLowerCase();for(let l=a.length-1;l>=0;l-=1){let c=a[l],u=c.indexOf(":");if(u===-1)continue;if(c.slice(0,u).trim().toLowerCase()===i)return c.slice(u+1).trim()}return null}function wre(e){return typeof e==="number"}function Ere(e){return Object.prototype.toString.call(e).slice(8,-1)}function w1(e){if(Ere(e)!=="Object")return!1;return e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Nk(e){if(!(e==null?void 0:e.trim()))return{};let t={},n=[],a=e.replace(/["']([^"']*)["']/g,(h)=>(n.push(h),`__QUOTED_${n.length-1}__`)),i=a.match(/(?:^|\s)\.([\w-]+)/g);if(i){let h=i.map((m)=>m.trim().slice(1));t.class=h.join(" ")}let l=a.match(/(?:^|\s)#([\w-]+)/);if(l)t.id=l[1];let c=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(a.matchAll(c)).forEach(([,h,m])=>{var b;let y=parseInt(((b=m.match(/__QUOTED_(\d+)__/))==null?void 0:b[1])||"0",10),v=n[y];if(v)t[h]=v.slice(1,-1)});let f=a.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();if(f)f.split(/\s+/).filter(Boolean).forEach((m)=>{if(m.match(/^[a-zA-Z][\w-]*$/))t[m]=!0});return t}function Ok(e){if(!e||Object.keys(e).length===0)return"";let t=[];if(e.class)String(e.class).split(/\s+/).filter(Boolean).forEach((a)=>t.push(`.${a}`));if(e.id)t.push(`#${e.id}`);return Object.entries(e).forEach(([n,a])=>{if(n==="class"||n==="id")return;if(a===!0)t.push(n);else if(a!==!1&&a!=null)t.push(`${n}="${String(a)}"`)}),t.join(" ")}function Rre(e){let{nodeName:t,name:n,parseAttributes:a=Nk,serializeAttributes:i=Ok,defaultAttributes:l={},requiredAttributes:c=[],allowedAttributes:u}=e,f=n||t,h=(m)=>{if(!u)return m;let b={};return u.forEach((y)=>{if(y in m)b[y]=m[y]}),b};return{parseMarkdown:(m,b)=>{let y={...l,...m.attributes};return b.createNode(t,y,[])},markdownTokenizer:{name:t,level:"block",start(m){var b;let y=new RegExp(`^:::${f}(?:\\s|$)`,"m"),v=(b=m.match(y))==null?void 0:b.index;return v!==void 0?v:-1},tokenize(m,b,y){let v=new RegExp(`^:::${f}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),S=m.match(v);if(!S)return;let w=S[1]||"",E=a(w);if(c.find((D)=>!(D in E)))return;return{type:t,raw:S[0],attributes:E}}},renderMarkdown:(m)=>{let b=h(m.attrs||{}),y=i(b),v=y?` {${y}}`:"";return`:::${f}${v} :::`}}}function kre(e){let{nodeName:t,name:n,getContent:a,parseAttributes:i=Nk,serializeAttributes:l=Ok,defaultAttributes:c={},content:u="block",allowedAttributes:f}=e,h=n||t,m=(b)=>{if(!f)return b;let y={};return f.forEach((v)=>{if(v in b)y[v]=b[v]}),y};return{parseMarkdown:(b,y)=>{let v;if(a){let w=a(b);v=typeof w==="string"?[{type:"text",text:w}]:w}else if(u==="block")v=y.parseChildren(b.tokens||[]);else v=y.parseInline(b.tokens||[]);let S={...c,...b.attributes};return y.createNode(t,S,v)},markdownTokenizer:{name:t,level:"block",start(b){var y;let v=new RegExp(`^:::${h}`,"m"),S=(y=b.match(v))==null?void 0:y.index;return S!==void 0?S:-1},tokenize(b,y,v){var S;let w=new RegExp(`^:::${h}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),E=b.match(w);if(!E)return;let[T,D=""]=E,H=i(D),z=1,L=T.length,J="",V=/^:::([\w-]*)(\s.*)?/gm,P=b.slice(L);V.lastIndex=0;for(;;){let te=V.exec(P);if(te===null)break;let Y=te.index,ge=te[1];if((S=te[2])==null?void 0:S.endsWith(":::"))continue;if(ge)z+=1;else if(z-=1,z===0){let ue=P.slice(0,Y);J=ue.trim();let ie=b.slice(0,L+Y+te[0].length),_=[];if(J)if(u==="block"){_=v.blockTokens(ue),_.forEach((U)=>{if(U.text&&(!U.tokens||U.tokens.length===0))U.tokens=v.inlineTokens(U.text)});while(_.length>0){let U=_[_.length-1];if(U.type==="paragraph"&&(!U.text||U.text.trim()===""))_.pop();else break}}else _=v.inlineTokens(J);return{type:t,raw:ie,attributes:H,content:J,tokens:_}}}return}},renderMarkdown:(b,y)=>{let v=m(b.attrs||{}),S=l(v),w=S?` {${S}}`:"",E=y.renderChildren(b.content||[],`
|
|
263
|
+
|
|
264
|
+
`);return`:::${h}${w}
|
|
265
|
+
|
|
266
|
+
${E}
|
|
267
|
+
|
|
268
|
+
:::`}}}function Are(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,a=n.exec(e);while(a!==null){let[,i,l,c]=a;t[i]=l||c,a=n.exec(e)}return t}function Mre(e){return Object.entries(e).filter(([,t])=>t!==void 0&&t!==null).map(([t,n])=>`${t}="${n}"`).join(" ")}function Nre(e){let{nodeName:t,name:n,getContent:a,parseAttributes:i=Are,serializeAttributes:l=Mre,defaultAttributes:c={},selfClosing:u=!1,allowedAttributes:f}=e,h=n||t,m=(y)=>{if(!f)return y;let v={};return f.forEach((S)=>{let w=typeof S==="string"?S:S.name,E=typeof S==="string"?void 0:S.skipIfDefault;if(w in y){let T=y[w];if(E!==void 0&&T===E)return;v[w]=T}}),v},b=h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(y,v)=>{let S={...c,...y.attributes};if(u)return v.createNode(t,S);let w=a?a(y):y.content||"";if(w)return v.createNode(t,S,[v.createTextNode(w)]);return v.createNode(t,S,[])},markdownTokenizer:{name:t,level:"inline",start(y){let v=u?new RegExp(`\\[${b}\\s*[^\\]]*\\]`):new RegExp(`\\[${b}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${b}\\]`),S=y.match(v),w=S==null?void 0:S.index;return w!==void 0?w:-1},tokenize(y,v,S){let w=u?new RegExp(`^\\[${b}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${b}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${b}\\]`),E=y.match(w);if(!E)return;let T="",D="";if(u){let[,z]=E;D=z}else{let[,z,L]=E;D=z,T=L||""}let H=i(D.trim());return{type:t,raw:E[0],content:T.trim(),attributes:H}}},renderMarkdown:(y)=>{let v="";if(a)v=a(y);else if(y.content&&y.content.length>0)v=y.content.filter((T)=>T.type==="text").map((T)=>T.text).join("");let S=m(y.attrs||{}),w=l(S),E=w?` ${w}`:"";if(u)return`[${h}${E}]`;return`[${h}${E}]${v}[/${h}]`}}}function H1(e,t,n){var a,i,l,c;let u=e.split(`
|
|
269
|
+
`),f=[],h="",m=0,b=t.baseIndentSize||2;while(m<u.length){let y=u[m],v=y.match(t.itemPattern);if(!v)if(f.length>0)break;else if(y.trim()===""){m+=1,h=`${h}${y}
|
|
270
|
+
`;continue}else return;let S=t.extractItemData(v),{indentLevel:w,mainContent:E}=S;h=`${h}${y}
|
|
271
|
+
`;let T=[E];m+=1;while(m<u.length){let L=u[m];if(L.trim()===""){let V=u.slice(m+1).findIndex((Y)=>Y.trim()!=="");if(V===-1)break;if((((i=(a=u[m+1+V].match(/^(\s*)/))==null?void 0:a[1])==null?void 0:i.length)||0)>w){T.push(L),h=`${h}${L}
|
|
272
|
+
`,m+=1;continue}else break}if((((c=(l=L.match(/^(\s*)/))==null?void 0:l[1])==null?void 0:c.length)||0)>w)T.push(L),h=`${h}${L}
|
|
273
|
+
`,m+=1;else break}let D,H=T.slice(1);if(H.length>0){let L=H.map((J)=>J.slice(w+b)).join(`
|
|
274
|
+
`);if(L.trim())if(t.customNestedParser)D=t.customNestedParser(L);else D=n.blockTokens(L)}let z=t.createToken(S,D);f.push(z)}if(f.length===0)return;return{items:f,raw:h}}function gb(e,t,n,a){if(!e||!Array.isArray(e.content))return"";let i=typeof n==="function"?n(a):n,[l,...c]=e.content,u=t.renderChildren([l]),f=`${i}${u}`;if(c&&c.length>0)c.forEach((h,m)=>{var b,y;let v=(y=(b=t.renderChild)==null?void 0:b.call(t,h,m+1))!=null?y:t.renderChildren([h]);if(v!==void 0&&v!==null){let S=v.split(`
|
|
275
|
+
`).map((w)=>w?t.indent(w):t.indent("")).join(`
|
|
276
|
+
`);f+=h.type==="paragraph"?`
|
|
277
|
+
|
|
278
|
+
${S}`:`
|
|
279
|
+
${S}`}});return f}function mF(e,t){let n={...e};if(w1(e)&&w1(t))Object.keys(t).forEach((a)=>{if(w1(t[a])&&w1(e[a]))n[a]=mF(e[a],t[a]);else n[a]=t[a]});return n}function Ore(e,t,n={}){let{state:a}=t,{doc:i,tr:l}=a,c=e;if(i.descendants((u,f)=>{let h=l.mapping.map(f),m=l.mapping.map(f)+u.nodeSize,b=null;if(u.marks.forEach((v)=>{if(v!==c)return!1;b=v}),!b)return;let y=!1;if(Object.keys(n).forEach((v)=>{if(n[v]!==b.attrs[v])y=!0}),y){let v=e.type.create({...e.attrs,...n});l.removeMark(h,m,e.type),l.addMark(h,m,v)}}),l.docChanged)t.view.dispatch(l)}function E1(e){var t;let{editor:n,from:a,to:i,text:l,rules:c,plugin:u}=e,{view:f}=n;if(f.composing)return!1;let h=f.state.doc.resolve(a);if(h.parent.type.spec.code||!!((t=h.nodeBefore||h.nodeAfter)==null?void 0:t.marks.find((y)=>y.type.spec.code)))return!1;let m=!1,b=Jne(h)+l;return c.forEach((y)=>{if(m)return;let v=Dre(b,y.find);if(!v)return;let S=v[0].length-l.length;if(S>0){let J=h.parentOffset-S;if(J<0||h.parent.textBetween(J,h.parentOffset)!==v[0].slice(0,S))return}let w=f.state.tr,E=M1({state:f.state,transaction:w}),T={from:a-(v[0].length-l.length),to:i},{commands:D,chain:H,can:z}=new N1({editor:n,state:E});if(y.handler({state:E,range:T,match:v,commands:D,chain:H,can:z})===null||!w.steps.length)return;if(y.undoable)w.setMeta(u,{transform:w,from:a,to:i,text:l});f.dispatch(w),m=!0}),m}function Pre(e){let{editor:t,rules:n}=e,a=new qe({state:{init(){return null},apply(i,l,c){let u=i.getMeta(a);if(u)return u;let f=i.getMeta("applyInputRules");if(!!f)setTimeout(()=>{let{text:m}=f;if(typeof m==="string")m=m;else m=L1(le.from(m),c.schema);let{from:b}=f,y=b+m.length;E1({editor:t,from:b,to:y,text:m,rules:n,plugin:a})});return i.selectionSet||i.docChanged?null:l}},props:{handleTextInput(i,l,c,u){return E1({editor:t,from:l,to:c,text:u,rules:n,plugin:a})},handleDOMEvents:{compositionend:(i)=>(setTimeout(()=>{let{$cursor:l}=i.state.selection;if(l)E1({editor:t,from:l.pos,to:l.pos,text:"",rules:n,plugin:a})}),!1)},handleKeyDown(i,l){if(l.key!=="Enter")return!1;let{$cursor:c}=i.state.selection;if(c)return E1({editor:t,from:c.pos,to:c.pos,text:`
|
|
280
|
+
`,rules:n,plugin:a});return!1}},isInputRules:!0});return a}function _re(e){let{editor:t,state:n,from:a,to:i,rule:l,pasteEvent:c,dropEvent:u}=e,{commands:f,chain:h,can:m}=new N1({editor:t,state:n}),b=[];return n.doc.nodesBetween(a,i,(v,S)=>{var w,E,T,D,H;if(((E=(w=v.type)==null?void 0:w.spec)==null?void 0:E.code)||!(v.isText||v.isTextblock||v.isInline))return;let z=(H=(D=(T=v.content)==null?void 0:T.size)!=null?D:v.nodeSize)!=null?H:0,L=Math.max(a,S),J=Math.min(i,S+z);if(L>=J)return;let V=v.isText?v.text||"":v.textBetween(L-S,J-S,void 0,"");Lre(V,l.find,c).forEach((te)=>{if(te.index===void 0)return;let Y=L+te.index+1,ge=Y+te[0].length,ue={from:n.tr.mapping.map(Y),to:n.tr.mapping.map(ge)},ie=l.handler({state:n,range:ue,match:te,commands:f,chain:h,can:m,pasteEvent:c,dropEvent:u});b.push(ie)})}),b.every((v)=>v!==null)}function Bre(e){let{editor:t,rules:n}=e,a=null,i=!1,l=!1,c=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,u;try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}let f=({state:m,from:b,to:y,rule:v,pasteEvt:S})=>{let w=m.tr,E=M1({state:m,transaction:w});if(!_re({editor:t,state:E,from:Math.max(b-1,0),to:y.b-1,rule:v,pasteEvent:S,dropEvent:u})||!w.steps.length)return;try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}return c=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,w};return n.map((m)=>new qe({view(b){let y=(S)=>{var w;if(a=((w=b.dom.parentElement)==null?void 0:w.contains(S.target))?b.dom.parentElement:null,a)T1=t},v=()=>{if(T1)T1=null};return window.addEventListener("dragstart",y),window.addEventListener("dragend",v),{destroy(){window.removeEventListener("dragstart",y),window.removeEventListener("dragend",v)}}},props:{handleDOMEvents:{drop:(b,y)=>{if(l=a===b.dom.parentElement,u=y,!l){let v=T1;if(v==null?void 0:v.isEditable)setTimeout(()=>{let S=v.state.selection;if(S)v.commands.deleteRange({from:S.from,to:S.to})},10)}return!1},paste:(b,y)=>{var v;let S=(v=y.clipboardData)==null?void 0:v.getData("text/html");return c=y,i=!!(S==null?void 0:S.includes("data-pm-slice")),!1}}},appendTransaction:(b,y,v)=>{let S=b[0],w=S.getMeta("uiEvent")==="paste"&&!i,E=S.getMeta("uiEvent")==="drop"&&!l,T=S.getMeta("applyPasteRules"),D=!!T;if(!w&&!E&&!D)return;if(D){let{text:L}=T;if(typeof L==="string")L=L;else L=L1(le.from(L),v.schema);let{from:J}=T,V=J+L.length,P=Ire(L);return f({rule:m,state:v,from:J,to:{b:V},pasteEvt:P})}let H=y.doc.content.findDiffStart(v.doc.content),z=y.doc.content.findDiffEnd(v.doc.content);if(!wre(H)||!z||H===z.b)return;return f({rule:m,state:v,from:H,to:z,pasteEvt:c})}}))}function bo(e){return new ah({find:e.find,handler:({state:t,range:n,match:a})=>{let i=Bt(e.getAttributes,void 0,a);if(i===!1||i===null)return null;let{tr:l}=t,c=a[a.length-1],u=a[0];if(c){let f=u.search(/\S/),h=n.from+u.indexOf(c),m=h+c.length;if(I1(n.from,n.to,t.doc).filter((v)=>v.mark.type.excluded.find((w)=>w===e.type&&w!==v.mark.type)).filter((v)=>v.to>h).length)return null;if(m<n.to)l.delete(m,n.to);if(h>n.from)l.delete(n.from+f,h);let y=n.from+f+c.length;l.addMark(n.from+f,y,e.type.create(i||{})),l.removeStoredMark(e.type)}},undoable:e.undoable})}function kF(e){return new ah({find:e.find,handler:({state:t,range:n,match:a})=>{let i=Bt(e.getAttributes,void 0,a)||{},{tr:l}=t,c=n.from,u=n.to,f=e.type.create(i);if(a[1]){let h=a[0].lastIndexOf(a[1]),m=c+h;if(m>u)m=u;else u=m+a[1].length;let b=a[0][a[0].length-1];l.insertText(b,c+a[0].length-1),l.replaceWith(m,u,f)}else if(a[0]){let h=e.type.isInline?c:c-1;l.insert(h,e.type.create(i)).delete(l.mapping.map(c),l.mapping.map(u))}l.scrollIntoView()},undoable:e.undoable})}function bb(e){return new ah({find:e.find,handler:({state:t,range:n,match:a})=>{let i=t.doc.resolve(n.from),l=Bt(e.getAttributes,void 0,a)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,l)},undoable:e.undoable})}function rs(e){return new ah({find:e.find,handler:({state:t,range:n,match:a,chain:i})=>{let l=Bt(e.getAttributes,void 0,a)||{},c=t.tr.delete(n.from,n.to),f=c.doc.resolve(n.from).blockRange(),h=f&&Kp(f,e.type,l);if(!h)return null;if(c.wrap(f,h),e.keepMarks&&e.editor){let{selection:b,storedMarks:y}=t,{splittableMarks:v}=e.editor.extensionManager,S=y||b.$to.parentOffset&&b.$from.marks();if(S){let w=S.filter((E)=>v.includes(E.type.name));c.ensureMarks(w)}}if(e.keepAttributes){let b=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(b,l).run()}let m=c.doc.resolve(n.from-1).nodeBefore;if(m&&m.type===e.type&&Sa(c.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(a,m)))c.join(n.from-1)},undoable:e.undoable})}function Pr(e){return new Pk({find:e.find,handler:({state:t,range:n,match:a,pasteEvent:i})=>{let l=Bt(e.getAttributes,void 0,a,i);if(l===!1||l===null)return null;let{tr:c}=t,u=a[a.length-1],f=a[0],h=n.to;if(u){let m=f.search(/\S/),b=n.from+f.indexOf(u),y=b+u.length;if(I1(n.from,n.to,t.doc).filter((w)=>w.mark.type.excluded.find((T)=>T===e.type&&T!==w.mark.type)).filter((w)=>w.to>b).length)return null;if(y<n.to)c.delete(y,n.to);if(b>n.from)c.delete(n.from+m,b);if(h=n.from+m+u.length,c.addMark(n.from+m,h,e.type.create(l||{})),!(a.index!==void 0&&a.input!==void 0&&a.index+a[0].length>=a.input.length))c.removeStoredMark(e.type)}}})}var Yte,Ck=(e,t)=>{for(var n in t)Yte(e,n,{get:t[n],enumerable:!0})},N1=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:a}=t,{tr:i}=n,l=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([c,u])=>[c,(...h)=>{let m=u(...h)(l);if(!i.getMeta("preventDispatch")&&!this.hasCustomState)a.dispatch(i);return m}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:a,state:i}=this,{view:l}=a,c=[],u=!!e,f=e||i.tr,h=()=>{if(!u&&t&&!f.getMeta("preventDispatch")&&!this.hasCustomState)l.dispatch(f);return c.every((b)=>b===!0)},m={...Object.fromEntries(Object.entries(n).map(([b,y])=>[b,(...S)=>{let w=this.buildProps(f,t),E=y(...S)(w);return c.push(E),m}])),run:h};return m}createCan(e){let{rawCommands:t,state:n}=this,a=!1,i=e||n.tr,l=this.buildProps(i,!1);return{...Object.fromEntries(Object.entries(t).map(([u,f])=>[u,(...h)=>f(...h)({...l,dispatch:void 0})])),chain:()=>this.createChain(i,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:a,state:i}=this,{view:l}=a,c={tr:e,editor:a,view:l,state:M1({state:i,transaction:e}),dispatch:t?()=>{return}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([u,f])=>[u,(...h)=>f(...h)(c)]))}};return c}},GH,Jte=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;if(!e.isDestroyed)t.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges()}),!0),Xte=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),Qte=()=>({state:e,tr:t,dispatch:n})=>{let{selection:a}=t,{ranges:i}=a;if(!n)return!0;return i.forEach(({$from:l,$to:c})=>{e.doc.nodesBetween(l.pos,c.pos,(u,f)=>{if(u.type.isText)return;let{doc:h,mapping:m}=t,b=h.resolve(m.map(f)),y=h.resolve(m.map(f+u.nodeSize)),v=b.blockRange(y);if(!v)return;let S=Xs(v);if(u.type.isTextblock){let{defaultType:w}=b.parent.contentMatchAt(b.index());t.setNodeMarkup(v.start,w)}if(S||S===0)t.lift(v,S)})}),!0},Zte=(e)=>(t)=>e(t),ene=()=>({state:e,dispatch:t})=>P3(e,t),tne=(e,t)=>({editor:n,tr:a})=>{let{state:i}=n,l=i.doc.slice(e.from,e.to);a.deleteRange(e.from,e.to);let c=a.mapping.map(t);return a.insert(c,l.content),a.setSelection(new Me(a.doc.resolve(Math.max(c-1,0)))),!0},nne=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,a=n.$anchor.node();if(a.content.size>0)return!1;let i=e.selection.$anchor;for(let l=i.depth;l>0;l-=1)if(i.node(l).type===a.type){if(t){let u=i.before(l),f=i.after(l);e.delete(u,f).scrollIntoView()}return!0}return!1},rne=(e)=>({tr:t,state:n,dispatch:a})=>{let i=En(e,n.schema),l=t.selection.$anchor;for(let c=l.depth;c>0;c-=1)if(l.node(c).type===i){if(a){let f=l.before(c),h=l.after(c);t.delete(f,h).scrollIntoView()}return!0}return!1},one=(e)=>({tr:t,dispatch:n})=>{let{from:a,to:i}=e;if(n)t.delete(a,i);return!0},ane=(e)=>{if(!e.content)return!1;return/^text(\*|\+)/.test(e.content)},_H=(e,t,n)=>{if(!e.parent.isInline)return e.pos;if(n==="left"&&e.pos>e.start()||n==="right"&&e.pos<e.end())return e.pos;let a=t.nodes[e.parent.type.name].spec;if(!ane(a))return e.pos;return n==="left"?e.start()-1:e.end()+1},ine=(e,t,n)=>{let a=_H(e,n,"left"),i=_H(t,n,"right");return{from:a,to:i}},sne=()=>({state:e,dispatch:t})=>{if(e.selection.empty)return!1;if(t){let n=e.tr,{ranges:a}=e.selection,i=n.steps.length;if(a.forEach((l)=>{let c=n.mapping.slice(i),u=n.doc.resolve(c.map(l.$from.pos)),f=n.doc.resolve(c.map(l.$to.pos)),{from:h,to:m}=ine(u,f,e.schema);n.deleteRange(h,m)}),!n.selection.empty)n.setSelection(Me.near(n.doc.resolve(n.selection.from)));n.scrollIntoView(),t(n)}return!0},lne=()=>({commands:e})=>e.keyboardShortcut("Enter"),cne=()=>({state:e,dispatch:t})=>D3(e,t),une=(e,t)=>({tr:n,state:a,dispatch:i})=>{let l=il(e,a.schema),{doc:c,selection:u}=n,{$from:f,from:h,to:m}=u;if(i){let b=Ek(f,l,t);if(b&&b.from<=h&&b.to>=m){let y=Me.create(c,b.from,b.to);n.setSelection(y)}}return!0},dne=(e)=>(t)=>{let n=typeof e==="function"?e(t):e;for(let a=0;a<n.length;a+=1)if(n[a](t))return!0;return!1},pne=(e=null,t={})=>({editor:n,view:a,tr:i,dispatch:l})=>{t={scrollIntoView:!0,...t};let c=()=>{if(A1()||BH())a.dom.focus();if(fne()&&!A1()&&!BH())a.dom.focus({preventScroll:!0});requestAnimationFrame(()=>{if(!n.isDestroyed){if(a.focus(),t==null?void 0:t.scrollIntoView)n.commands.scrollIntoView()}})};try{if(a.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(l&&e===null&&!O1(n.state.selection))return c(),!0;let u=xk(i.doc,e)||n.state.selection,f=n.state.selection.eq(u);if(l){if(!f)i.setSelection(u);if(f&&i.storedMarks)i.setStoredMarks(i.storedMarks);c()}return!0},hne=(e,t)=>(n)=>e.every((a,i)=>t(a,{...n,index:i})),mne=(e,t)=>({tr:n,commands:a})=>a.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),YH=(e)=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let a=t[n];if(a.nodeType===3&&a.nodeValue&&/^(\n\s\s|\n)$/.test(a.nodeValue))e.removeChild(a);else if(a.nodeType===1)YH(a)}return e},gne=(e)=>!("type"in e),bne=(e,t,n)=>({tr:a,dispatch:i,editor:l})=>{var c;if(i){n={parseOptions:l.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let u,f=(E)=>{l.emit("contentError",{editor:l,error:E,disableCollaboration:()=>{if("collaboration"in l.storage&&typeof l.storage.collaboration==="object"&&l.storage.collaboration)l.storage.collaboration.isDisabled=!0}})},h={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!l.options.enableContentCheck&&l.options.emitContentError)try{th(t,l.schema,{parseOptions:h,errorOnInvalidContent:!0})}catch(E){f(E)}try{u=th(t,l.schema,{parseOptions:h,errorOnInvalidContent:(c=n.errorOnInvalidContent)!=null?c:l.options.enableContentCheck})}catch(E){return f(E),!1}let{from:m,to:b}=typeof e==="number"?{from:e,to:e}:{from:e.from,to:e.to},y=!0,v=!0;if((gne(u)?u:[u]).forEach((E)=>{E.check(),y=y?E.isText&&E.marks.length===0:!1,v=v?E.isBlock:!1}),m===b&&v){let{parent:E}=a.doc.resolve(m);if(E.isTextblock&&!E.type.spec.code&&!E.childCount)m-=1,b+=1}let w;if(y){if(Array.isArray(t))w=t.map((E)=>E.text||"").join("");else if(t instanceof le){let E="";t.forEach((T)=>{if(T.text)E+=T.text}),w=E}else if(typeof t==="object"&&!!t&&!!t.text)w=t.text;else w=t;a.insertText(w,m,b)}else{w=u;let E=a.doc.resolve(m),T=E.node(),D=E.parentOffset===0,H=T.isText||T.isTextblock,z=T.content.size>0;if(D&&H&&z&&v)m=Math.max(0,m-1);a.replaceWith(m,b,w)}if(n.updateSelection)JH(a,a.steps.length-1,-1);if(n.applyInputRules)a.setMeta("applyInputRules",{from:m,text:w});if(n.applyPasteRules)a.setMeta("applyPasteRules",{from:m,text:w})}return!0},yne=(e={})=>({tr:t,dispatch:n,editor:a})=>{let{pos:i,attrs:l,content:c,updateSelection:u=!0}=e,f;if(typeof i==="number")f=t.doc.resolve(i);else if(i)f=i;else f=t.selection.$from;let h=XH(f.parent.contentMatchAt(f.index()));if(!h)return!1;let m=Object.keys(h.spec.attrs||{}),b=l?Object.fromEntries(Object.entries(l).filter(([v])=>m.includes(v))):{},y;if(c){let v=th(c,a.schema);y=h.createAndFill(b,v)}else y=h.createAndFill(b);if(!y)return!1;if(n){if(t.insert(f.pos,y),u)JH(t,t.steps.length-1,-1)}return!0},vne=()=>({state:e,dispatch:t})=>oz(e,t),xne=()=>({state:e,dispatch:t})=>az(e,t),$ne=()=>({state:e,dispatch:t})=>E3(e,t),Sne=()=>({state:e,dispatch:t})=>k3(e,t),Cne=()=>({state:e,dispatch:t,tr:n})=>{try{let a=Td(e.doc,e.selection.$from.pos,-1);if(a===null||a===void 0)return!1;if(n.join(a,2),t)t(n);return!0}catch{return!1}},wne=()=>({state:e,dispatch:t,tr:n})=>{try{let a=Td(e.doc,e.selection.$from.pos,1);if(a===null||a===void 0)return!1;if(n.join(a,2),t)t(n);return!0}catch{return!1}},Ene=()=>({state:e,dispatch:t})=>ez(e,t),Tne=()=>({state:e,dispatch:t})=>tz(e,t),kne=(e)=>({editor:t,view:n,tr:a,dispatch:i})=>{let l=Rne(e).split(/-(?!$)/),c=l.find((h)=>!["Alt","Ctrl","Meta","Shift"].includes(h)),u=new KeyboardEvent("keydown",{key:c==="Space"?" ":c,altKey:l.includes("Alt"),ctrlKey:l.includes("Ctrl"),metaKey:l.includes("Meta"),shiftKey:l.includes("Shift"),bubbles:!0,cancelable:!0}),f=t.captureTransaction(()=>{n.someProp("handleKeyDown",(h)=>h(n,u))});return f==null||f.steps.forEach((h)=>{let m=h.map(a.mapping);if(m&&i)a.maybeStep(m)}),!0},Ane=(e,t={})=>({state:n,dispatch:a})=>{let i=En(e,n.schema);if(!ns(n,i,t))return!1;return iz(n,a)},Mne=()=>({state:e,dispatch:t})=>L3(e,t),Nne=(e)=>({state:t,dispatch:n})=>{let a=En(e,t.schema);return pz(a)(t,n)},One=()=>({state:e,dispatch:t})=>N3(e,t),Dne=(e,t)=>({tr:n,state:a,dispatch:i})=>{let l=null,c=null,u=D1(typeof e==="string"?e:e.name,a.schema);if(!u)return!1;if(u==="node")l=En(e,a.schema);if(u==="mark")c=il(e,a.schema);let f=!1;return n.selection.ranges.forEach((h)=>{a.doc.nodesBetween(h.$from.pos,h.$to.pos,(m,b)=>{if(l&&l===m.type){if(f=!0,i)n.setNodeMarkup(b,void 0,zH(m.attrs,t))}if(c&&m.marks.length)m.marks.forEach((y)=>{if(c===y.type){if(f=!0,i)n.addMark(b,b+m.nodeSize,c.create(zH(y.attrs,t)))}})})}),f},Pne=()=>({tr:e,dispatch:t})=>{if(t)e.scrollIntoView();return!0},Lne=()=>({tr:e,dispatch:t})=>{if(t){let n=new xr(e.doc);e.setSelection(n)}return!0},_ne=()=>({state:e,dispatch:t})=>T3(e,t),Ine=()=>({state:e,dispatch:t})=>A3(e,t),Bne=()=>({state:e,dispatch:t})=>sz(e,t),zne=()=>({state:e,dispatch:t})=>I3(e,t),Hne=()=>({state:e,dispatch:t})=>_3(e,t),Fne=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:a={}}={})=>({editor:i,tr:l,dispatch:c,commands:u})=>{let{doc:f}=l;if(a.preserveWhitespace!=="full"){let h=$k(e,i.schema,a,{errorOnInvalidContent:t!=null?t:i.options.enableContentCheck});if(c)l.replaceWith(0,f.content.size,h).setMeta("preventUpdate",!n);return!0}if(c)l.setMeta("preventUpdate",!n);return u.insertContentAt({from:0,to:f.content.size},e,{parseOptions:a,errorOnInvalidContent:t!=null?t:i.options.enableContentCheck})},lF=(e,t,n,a=20)=>{let i=e.doc.resolve(n),l=a,c=null;while(l>0&&c===null){let u=i.node(l);if((u==null?void 0:u.type.name)===t)c=u;else l-=1}return[c,l]},Jne=(e,t=500)=>{let n="",a=e.parentOffset;return e.parent.nodesBetween(Math.max(0,a-t),a,(i,l,c,u)=>{var f,h;let m=((h=(f=i.type.spec).toText)==null?void 0:h.call(f,{node:i,pos:l,parent:c,index:u}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?m:m.slice(0,Math.max(0,a-l))}),n},cF=(e,t)=>{let{$from:n,$to:a,$anchor:i}=e.selection;if(t){let l=P1((u)=>u.type.name===t)(e.selection);if(!l)return!1;let c=e.doc.resolve(l.pos+1);if(i.pos+1===c.end())return!0;return!1}if(a.parentOffset<a.parent.nodeSize-2||n.pos!==a.pos)return!1;return!0},uF=(e)=>{let{$from:t,$to:n}=e.selection;if(t.parentOffset>0||t.pos!==n.pos)return!1;return!0},dF=class e{constructor(t){this.position=t}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}},tre=(e,t={})=>({tr:n,state:a,dispatch:i})=>{let{selection:l}=n,{empty:c,ranges:u}=l,f=il(e,a.schema);if(i)if(c){let h=ZH(a,f);n.addStoredMark(f.create({...h,...t}))}else u.forEach((h)=>{let m=h.$from.pos,b=h.$to.pos;a.doc.nodesBetween(m,b,(y,v)=>{let S=Math.max(v,m),w=Math.min(v+y.nodeSize,b);if(y.marks.find((T)=>T.type===f))y.marks.forEach((T)=>{if(f===T.type)n.addMark(S,w,f.create({...T.attrs,...t}))});else n.addMark(S,w,f.create(t))})});return ere(a,n,f)},nre=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),rre=(e,t={})=>({state:n,dispatch:a,chain:i})=>{let l=En(e,n.schema),c;if(n.selection.$anchor.sameParent(n.selection.$head))c=n.selection.$anchor.parent.attrs;if(!l.isTextblock)return console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1;return i().command(({commands:u})=>{if(B3(l,{...c,...t})(n))return!0;return u.clearNodes()}).command(({state:u})=>B3(l,{...c,...t})(u,a)).run()},ore=(e)=>({tr:t,dispatch:n})=>{if(n){let{doc:a}=t,i=al(e,0,a.content.size),l=Pe.create(a,i);t.setSelection(l)}return!0},are=(e,t)=>({tr:n,state:a,dispatch:i})=>{let{selection:l}=a,c,u;if(typeof t==="number")c=t,u=t;else if(t&&"from"in t&&"to"in t)c=t.from,u=t.to;else c=l.from,u=l.to;if(i)n.doc.nodesBetween(c,u,(f,h)=>{if(f.isText)return;n.setNodeMarkup(h,void 0,{...f.attrs,dir:e})});return!0},ire=(e)=>({tr:t,dispatch:n})=>{if(n){let{doc:a}=t,{from:i,to:l}=typeof e==="number"?{from:e,to:e}:e,c=Me.atStart(a).from,u=Me.atEnd(a).to,f=al(i,c,u),h=al(l,c,u),m=Me.create(a,f,h);t.setSelection(m)}return!0},sre=(e)=>({state:t,dispatch:n})=>{let a=En(e,t.schema);return hz(a)(t,n)},lre=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:a,editor:i})=>{let{selection:l,doc:c}=t,{$from:u,$to:f}=l,h=i.extensionManager.attributes,m=R1(h,u.node().type.name,u.node().attrs);if(l instanceof Pe&&l.node.isBlock){if(!u.parentOffset||!Wo(c,u.pos))return!1;if(a){if(e)KH(n,i.extensionManager.splittableMarks);t.split(u.pos).scrollIntoView()}return!0}if(!u.parent.isBlock)return!1;let b=f.parentOffset===f.parent.content.size,y=u.depth===0?void 0:XH(u.node(-1).contentMatchAt(u.indexAfter(-1))),v=b&&y?[{type:y,attrs:m}]:void 0,S=Wo(t.doc,t.mapping.map(u.pos),1,v);if(!v&&!S&&Wo(t.doc,t.mapping.map(u.pos),1,y?[{type:y}]:void 0))S=!0,v=y?[{type:y,attrs:m}]:void 0;if(a){if(S){if(l instanceof Me)t.deleteSelection();if(t.split(t.mapping.map(u.pos),1,v),y&&!b&&!u.parentOffset&&u.parent.type!==y){let w=t.mapping.map(u.before()),E=t.doc.resolve(w);if(u.node(-1).canReplaceWith(E.index(),E.index()+1,y))t.setNodeMarkup(t.mapping.map(u.before()),y)}}if(e)KH(n,i.extensionManager.splittableMarks);t.scrollIntoView()}return S},cre=(e,t={})=>({tr:n,state:a,dispatch:i,editor:l})=>{var c;let u=En(e,a.schema),{$from:f,$to:h}=a.selection,m=a.selection.node;if(m&&m.isBlock||f.depth<2||!f.sameParent(h))return!1;let b=f.node(-1);if(b.type!==u)return!1;let y=l.extensionManager.attributes;if(f.parent.content.size===0&&f.node(-1).childCount===f.indexAfter(-1)){if(f.depth===2||f.node(-3).type!==u||f.index(-2)!==f.node(-2).childCount-1)return!1;if(i){let T=le.empty,D=f.index(-1)?1:f.index(-2)?2:3;for(let P=f.depth-D;P>=f.depth-3;P-=1)T=le.from(f.node(P).copy(T));let H=f.indexAfter(-1)<f.node(-2).childCount?1:f.indexAfter(-2)<f.node(-3).childCount?2:3,z={...R1(y,f.node().type.name,f.node().attrs),...t},L=((c=u.contentMatch.defaultType)==null?void 0:c.createAndFill(z))||void 0;T=T.append(le.from(u.createAndFill(null,L)||void 0));let J=f.before(f.depth-(D-1));n.replace(J,f.after(-H),new Se(T,4-D,0));let V=-1;if(n.doc.nodesBetween(J,n.doc.content.size,(P,te)=>{if(V>-1)return!1;if(P.isTextblock&&P.content.size===0)V=te+1}),V>-1)n.setSelection(Me.near(n.doc.resolve(V)));n.scrollIntoView()}return!0}let v=h.pos===f.end()?b.contentMatchAt(0).defaultType:null,S={...R1(y,b.type.name,b.attrs),...t},w={...R1(y,f.node().type.name,f.node().attrs),...t};n.delete(f.pos,h.pos);let E=v?[{type:u,attrs:S},{type:v,attrs:w}]:[{type:u,attrs:S}];if(!Wo(n.doc,f.pos,2))return!1;if(i){let{selection:T,storedMarks:D}=a,{splittableMarks:H}=l.extensionManager,z=D||T.$to.parentOffset&&T.$from.marks();if(n.split(f.pos,2,E).scrollIntoView(),!z||!i)return!0;let L=z.filter((J)=>H.includes(J.type.name));n.ensureMarks(L)}return!0},yk=(e,t)=>{let n=P1((c)=>c.type===t)(e.selection);if(!n)return!0;let a=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(a===void 0)return!0;let i=e.doc.nodeAt(a);if(!(n.node.type===(i==null?void 0:i.type)&&Sa(e.doc,n.pos)))return!0;if(!fF(n.node.attrs.type,i==null?void 0:i.attrs.type))return!0;return e.join(n.pos),!0},vk=(e,t)=>{let n=P1((c)=>c.type===t)(e.selection);if(!n)return!0;let a=e.doc.resolve(n.start).after(n.depth);if(a===void 0)return!0;let i=e.doc.nodeAt(a);if(!(n.node.type===(i==null?void 0:i.type)&&Sa(e.doc,a)))return!0;if(!fF(n.node.attrs.type,i==null?void 0:i.attrs.type))return!0;return e.join(a),!0},dre=(e,t,n,a={})=>({editor:i,tr:l,state:c,dispatch:u,chain:f,commands:h,can:m})=>{let{extensions:b,splittableMarks:y}=i.extensionManager,v=En(e,c.schema),S=En(t,c.schema),{selection:w,storedMarks:E}=c,{$from:T,$to:D}=w,H=T.blockRange(D),z=E||w.$to.parentOffset&&w.$from.marks();if(!H)return!1;let L=P1((ie)=>bk(ie.type.name,b))(w),J=w.from===0&&w.to===c.doc.content.size,V=c.doc.content.content,P=V.length===1?V[0]:null,te=J&&P&&bk(P.type.name,b)?{node:P,pos:0,depth:0}:null,Y=L!=null?L:te,ge=!!L&&H.depth>=1&&H.depth-L.depth<=1,ue=!!te;if((ge||ue)&&Y){if(Y.node.type===v){if(J&&ue)return f().command(({tr:ie,dispatch:_})=>{let U=ure(ie);if(!U)return!1;if(ie.setSelection(U),_)_(ie);return!0}).liftListItem(S).run();return h.liftListItem(S)}if(bk(Y.node.type.name,b)&&v.validContent(Y.node.content))return f().command(()=>(l.setNodeMarkup(Y.pos,v),!0)).command(()=>yk(l,v)).command(()=>vk(l,v)).run()}if(!n||!z||!u)return f().command(()=>{if(m().wrapInList(v,a))return!0;return h.clearNodes()}).wrapInList(v,a).command(()=>yk(l,v)).command(()=>vk(l,v)).run();return f().command(()=>{let ie=m().wrapInList(v,a),_=z.filter((U)=>y.includes(U.type.name));if(l.ensureMarks(_),ie)return!0;return h.clearNodes()}).wrapInList(v,a).command(()=>yk(l,v)).command(()=>vk(l,v)).run()},fre=(e,t={},n={})=>({state:a,commands:i})=>{let{extendEmptyMarkRange:l=!1}=n,c=il(e,a.schema);if(Sk(a,c,t))return i.unsetMark(c,{extendEmptyMarkRange:l});return i.setMark(c,t)},pre=(e,t,n={})=>({state:a,commands:i})=>{let l=En(e,a.schema),c=En(t,a.schema),u=ns(a,l,n),f;if(a.selection.$anchor.sameParent(a.selection.$head))f=a.selection.$anchor.parent.attrs;if(u)return i.setNode(c,f);return i.setNode(l,{...f,...n})},hre=(e,t={})=>({state:n,commands:a})=>{let i=En(e,n.schema);if(ns(n,i,t))return a.lift(i);return a.wrapIn(i,t)},mre=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let a=0;a<n.length;a+=1){let i=n[a],l;if(i.spec.isInputRules&&(l=i.getState(e))){if(t){let c=e.tr,u=l.transform;for(let f=u.steps.length-1;f>=0;f-=1)c.step(u.steps[f].invert(u.docs[f]));if(l.text){let f=c.doc.resolve(l.from).marks();c.replaceWith(l.from,l.to,e.schema.text(l.text,f))}else c.delete(l.from,l.to)}return!0}}return!1},gre=(e={})=>({tr:t,dispatch:n,editor:a})=>{let{ignoreClearable:i=!1}=e,{selection:l}=t,{empty:c,ranges:u}=l;if(c)return!0;let{nonClearableMarks:f}=a.extensionManager;if(n){let h=Object.values(a.schema.marks).filter((m)=>i||!f.includes(m.name));u.forEach((m)=>{for(let b of h)t.removeMark(m.$from.pos,m.$to.pos,b)})}return!0},bre=(e,t={})=>({tr:n,state:a,dispatch:i})=>{var l;let{extendEmptyMarkRange:c=!1}=t,{selection:u}=n,f=il(e,a.schema),{$from:h,empty:m,ranges:b}=u;if(!i)return!0;if(m&&c){let{from:y,to:v}=u,S=(l=h.marks().find((E)=>E.type===f))==null?void 0:l.attrs,w=Ek(h,f,S);if(w)y=w.from,v=w.to;n.removeMark(y,v,f)}else b.forEach((y)=>{n.removeMark(y.$from.pos,y.$to.pos,f)});return n.removeStoredMark(f),!0},yre=(e)=>({tr:t,state:n,dispatch:a})=>{let{selection:i}=n,l,c;if(typeof e==="number")l=e,c=e;else if(e&&"from"in e&&"to"in e)l=e.from,c=e.to;else l=i.from,c=i.to;if(a)t.doc.nodesBetween(l,c,(u,f)=>{if(u.isText)return;let h={...u.attrs};delete h.dir,t.setNodeMarkup(f,void 0,h)});return!0},vre=(e,t={})=>({tr:n,state:a,dispatch:i})=>{let l=null,c=null,u=D1(typeof e==="string"?e:e.name,a.schema);if(!u)return!1;if(u==="node")l=En(e,a.schema);if(u==="mark")c=il(e,a.schema);let f=!1;return n.selection.ranges.forEach((h)=>{let m=h.$from.pos,b=h.$to.pos,y,v,S,w;if(n.selection.empty)a.doc.nodesBetween(m,b,(E,T)=>{if(l&&l===E.type)f=!0,S=Math.max(T,m),w=Math.min(T+E.nodeSize,b),y=T,v=E});else a.doc.nodesBetween(m,b,(E,T)=>{if(T<m&&l&&l===E.type)f=!0,S=Math.max(T,m),w=Math.min(T+E.nodeSize,b),y=T,v=E;if(T>=m&&T<=b){if(l&&l===E.type){if(f=!0,i)n.setNodeMarkup(T,void 0,{...E.attrs,...t})}if(c&&E.marks.length)E.marks.forEach((D)=>{if(c===D.type){if(f=!0,i){let H=Math.max(T,m),z=Math.min(T+E.nodeSize,b);n.addMark(H,z,c.create({...D.attrs,...t}))}}})}});if(v){if(y!==void 0&&i)n.setNodeMarkup(y,void 0,{...v.attrs,...t});if(c&&v.marks.length)v.marks.forEach((E)=>{if(c===E.type&&i)n.addMark(S,w,c.create({...E.attrs,...t}))})}}),f},xre=(e,t={})=>({state:n,dispatch:a})=>{let i=En(e,n.schema);return uz(i,t)(n,a)},$re=(e,t={})=>({state:n,dispatch:a})=>{let i=En(e,n.schema);return fz(i,t)(n,a)},Sre=class{constructor(){this.callbacks={}}on(e,t){if(!this.callbacks[e])this.callbacks[e]=[];return this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];if(n)n.forEach((a)=>a.apply(this,t));return this}off(e,t){let n=this.callbacks[e];if(n)if(t)this.callbacks[e]=n.filter((a)=>a!==t);else delete this.callbacks[e];return this}once(e,t){let n=(...a)=>{this.off(e,n),t.apply(this,a)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},Tre,ah=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},Dre=(e,t)=>{if(wk(t))return t.exec(e);let n=t(e);if(!n)return null;let a=[n.text];if(a.index=n.index,a.input=e,a.data=n.data,n.replaceWith){if(!n.text.includes(n.replaceWith))console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".');a.push(n.replaceWith)}return a},Dk=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...Bt(He(this,"addOptions",{name:this.name}))}}get storage(){return{...Bt(He(this,"addStorage",{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>mF(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Qr,Pk=class{constructor(e){this.find=e.find,this.handler=e.handler}},Lre=(e,t,n)=>{if(wk(t))return[...e.matchAll(t)];let a=t(e,n);if(!a)return[];return a.map((i)=>{let l=[i.text];if(l.index=i.index,l.input=e,l.data=i.data,i.replaceWith){if(!i.text.includes(i.replaceWith))console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".');l.push(i.replaceWith)}return l})},T1=null,Ire=(e)=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n},F1=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=kk(e),this.schema=rF(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:fb(t.name,this.schema)},a=He(t,"addCommands",n);if(!a)return e;return{...e,...a()}},{})}get plugins(){let{editor:e}=this;return hb([...this.extensions].reverse()).flatMap((a)=>{let i={name:a.name,options:a.options,storage:this.editor.extensionStorage[a.name],editor:e,type:fb(a.name,this.schema)},l=[],c=He(a,"addKeyboardShortcuts",i),u={};if(a.type==="mark"&&He(a,"exitable",i))u.ArrowRight=()=>Qr.handleExit({editor:e,mark:a});if(c){let y=Object.fromEntries(Object.entries(c()).map(([v,S])=>[v,()=>S({editor:e})]));u={...u,...y}}let f=PH(u);l.push(f);let h=He(a,"addInputRules",i);if(jH(a,e.options.enableInputRules)&&h){let y=h();if(y&&y.length){let v=Pre({editor:e,rules:y}),S=Array.isArray(v)?v:[v];l.push(...S)}}let m=He(a,"addPasteRules",i);if(jH(a,e.options.enablePasteRules)&&m){let y=m();if(y&&y.length){let v=Bre({editor:e,rules:y});l.push(...v)}}let b=He(a,"addProseMirrorPlugins",i);if(b){let y=b();l.push(...y)}return l})}get attributes(){return nF(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=nh(this.extensions);return Object.fromEntries(t.filter((n)=>!!He(n,"addNodeView")).map((n)=>{let a=this.attributes.filter((f)=>f.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:En(n.name,this.schema)},l=He(n,"addNodeView",i);if(!l)return[];let c=l();if(!c)return[];let u=(f,h,m,b,y)=>{let v=rh(f,a);return c({node:f,view:h,getPos:m,decorations:b,innerDecorations:y,editor:e,extension:n,HTMLAttributes:v})};return[n.name,u]}))}dispatchTransaction(e){let{editor:t}=this;return hb([...this.extensions].reverse()).reduceRight((a,i)=>{let l={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:fb(i.name,this.schema)},c=He(i,"dispatchTransaction",l);if(!c)return a;return(u)=>{c.call(l,{transaction:u,next:a})}},e)}transformPastedHTML(e){let{editor:t}=this;return hb([...this.extensions]).reduce((a,i)=>{let l={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:fb(i.name,this.schema)},c=He(i,"transformPastedHTML",l);if(!c)return a;return(u,f)=>{let h=a(u,f);return c.call(l,h)}},e||((a)=>a))}get markViews(){let{editor:e}=this,{markExtensions:t}=nh(this.extensions);return Object.fromEntries(t.filter((n)=>!!He(n,"addMarkView")).map((n)=>{let a=this.attributes.filter((u)=>u.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:il(n.name,this.schema)},l=He(n,"addMarkView",i);if(!l)return[];let c=(u,f,h)=>{let m=rh(u,a);return l()({mark:u,view:f,inline:h,editor:e,extension:n,HTMLAttributes:m,updateAttributes:(b)=>{Ore(u,e,b)}})};return[n.name,c]}))}destroy(){this.extensions.forEach((e)=>{let t=e;while(t.parent){let n=t.parent;if(n.child===t)n.child=null;t=n}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map((t)=>[t.name,t.storage])),e.forEach((t)=>{var n,a;let i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:fb(t.name,this.schema)};if(t.type==="mark"){if((n=Bt(He(t,"keepOnSplit",i)))!=null?n:!0)this.splittableMarks.push(t.name);if(!((a=Bt(He(t,"clearable",i)))!=null?a:!0))this.nonClearableMarks.push(t.name)}let l=He(t,"onBeforeCreate",i),c=He(t,"onCreate",i),u=He(t,"onUpdate",i),f=He(t,"onSelectionUpdate",i),h=He(t,"onTransaction",i),m=He(t,"onFocus",i),b=He(t,"onBlur",i),y=He(t,"onDestroy",i);if(l)this.editor.on("beforeCreate",l);if(c)this.editor.on("create",c);if(u)this.editor.on("update",u);if(f)this.editor.on("selectionUpdate",f);if(h)this.editor.on("transaction",h);if(m)this.editor.on("focus",m);if(b)this.editor.on("blur",b);if(y)this.editor.on("destroy",y)})}},zre,Ct,gF,bF,yF,vF,xF,$F,SF,CF,wF,EF,TF,Hre=class e{constructor(t,n,a=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=a,this.resolvedPos=t,this.editor=n,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,a=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,a=this.to-1}this.editor.commands.insertContentAt({from:n,to:a},t)}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 t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new e(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));if(t.depth!==this.depth)t=this.resolvedPos.doc.resolve(this.from-3);return new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));if(t.depth!==this.depth)t=this.resolvedPos.doc.resolve(this.to+3);return new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,a)=>{let i=n.isBlock&&!n.isTextblock,l=n.isAtom&&!n.isText,c=n.isInline,u=this.pos+a+(l?0:1);if(u<0||u>this.resolvedPos.doc.nodeSize-2)return;let f=this.resolvedPos.doc.resolve(u);if(!i&&!c&&f.depth<=this.depth)return;let h=new e(f,this.editor,i,i||c?n:null);if(i)h.actualDepth=this.depth+1;t.push(h)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let a=null,i=this.parent;while(i&&!a){if(i.node.type.name===t)if(Object.keys(n).length>0){let l=i.node.attrs,c=Object.keys(n);for(let u=0;u<c.length;u+=1){let f=c[u];if(l[f]!==n[f])break}}else a=i;i=i.parent}return a}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},a=!1){let i=[];if(!this.children||this.children.length===0)return i;let l=Object.keys(n);return this.children.forEach((c)=>{if(a&&i.length>0)return;if(c.node.type.name===t){if(l.every((f)=>n[f]===c.node.attrs[f]))i.push(c)}if(a&&i.length>0)return;i=i.concat(c.querySelectorAll(t,n,a))}),i}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},Fre=`.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
|
+
}`,RF,en;var Ye=N(()=>{oi();Nr();at();at();Nr();at();at();at();Ca();Ca();at();oi();Nr();oi();oi();Nr();Nr();Nr();Nr();p1();Nr();at();Nr();Nr();Nr();Nr();Nr();oi();Ca();Ca();Ca();Ca();Ca();at();Nr();at();at();p1();at();oi();Ca();at();oi();at();oi();Nr();p1();at();Fc();LH();at();Ca();at();Ca();at();at();oi();at();at();at();at();at();at();at();oi();at();Yte=Object.defineProperty;GH={};Ck(GH,{blur:()=>Jte,clearContent:()=>Xte,clearNodes:()=>Qte,command:()=>Zte,createParagraphNear:()=>ene,cut:()=>tne,deleteCurrentNode:()=>nne,deleteNode:()=>rne,deleteRange:()=>one,deleteSelection:()=>sne,enter:()=>lne,exitCode:()=>cne,extendMarkRange:()=>une,first:()=>dne,focus:()=>pne,forEach:()=>hne,insertContent:()=>mne,insertContentAt:()=>bne,insertDefaultBlock:()=>yne,joinBackward:()=>$ne,joinDown:()=>xne,joinForward:()=>Sne,joinItemBackward:()=>Cne,joinItemForward:()=>wne,joinTextblockBackward:()=>Ene,joinTextblockForward:()=>Tne,joinUp:()=>vne,keyboardShortcut:()=>kne,lift:()=>Ane,liftEmptyBlock:()=>Mne,liftListItem:()=>Nne,newlineInCode:()=>One,resetAttributes:()=>Dne,scrollIntoView:()=>Pne,selectAll:()=>Lne,selectNodeBackward:()=>_ne,selectNodeForward:()=>Ine,selectParentNode:()=>Bne,selectTextblockEnd:()=>zne,selectTextblockStart:()=>Hne,setContent:()=>Fne,setMark:()=>tre,setMeta:()=>nre,setNode:()=>rre,setNodeSelection:()=>ore,setTextDirection:()=>are,setTextSelection:()=>ire,sinkListItem:()=>sre,splitBlock:()=>lre,splitListItem:()=>cre,toggleList:()=>dre,toggleMark:()=>fre,toggleNode:()=>pre,toggleWrap:()=>hre,undoInputRule:()=>mre,unsetAllMarks:()=>gre,unsetMark:()=>bre,unsetTextDirection:()=>yre,updateAttributes:()=>vre,wrapIn:()=>xre,wrapInList:()=>$re});Tre={};Ck(Tre,{createAtomBlockMarkdownSpec:()=>Rre,createBlockMarkdownSpec:()=>kre,createInlineMarkdownSpec:()=>Nre,parseAttributes:()=>Nk,parseIndentedBlocks:()=>H1,renderNestedMarkdownContent:()=>gb,serializeAttributes:()=>Ok});Qr=class e extends Dk{constructor(){super(...arguments);this.type="mark"}static create(t={}){let n=typeof t==="function"?t():t;return new e(n)}static handleExit({editor:t,mark:n}){let{tr:a}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){let c=i.marks();if(!c.find((h)=>(h==null?void 0:h.type.name)===n.name))return!1;let f=c.find((h)=>(h==null?void 0:h.type.name)===n.name);if(f)a.removeStoredMark(f);return a.insertText(" ",i.pos),t.view.dispatch(a),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t==="function"?t():t;return super.extend(n)}};F1.resolve=kk;F1.sort=hb;F1.flatten=Rk;zre={};Ck(zre,{ClipboardTextSerializer:()=>gF,Commands:()=>bF,Delete:()=>yF,Drop:()=>vF,Editable:()=>xF,FocusEvents:()=>SF,Keymap:()=>CF,Paste:()=>wF,Tabindex:()=>EF,TextDirection:()=>TF,focusEventsPluginKey:()=>$F});Ct=class e extends Dk{constructor(){super(...arguments);this.type="extension"}static create(t={}){let n=typeof t==="function"?t():t;return new e(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t==="function"?t():t;return super.extend(n)}},gF=Ct.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new qe({key:new Ze("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:a,selection:i}=t,l=_1(n),{blockSeparator:c}=this.options,u={...c!==void 0?{blockSeparator:c}:{},textSerializers:l};return[...i.ranges].sort((h,m)=>h.$from.pos-m.$from.pos).map(({$from:h,$to:m})=>sF(a,{from:h.pos,to:m.pos},u)).join(c!=null?c:`
|
|
351
|
+
|
|
352
|
+
`)}}})]}}),bF=Ct.create({name:"commands",addCommands(){return{...GH}}}),yF=Ct.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,a,i;let l=()=>{var c,u,f,h;if((h=(f=(u=(c=this.editor.options.coreExtensionOptions)==null?void 0:c.delete)==null?void 0:u.filterTransaction)==null?void 0:f.call(u,e))!=null?h:e.getMeta("y-sync$"))return;let m=Tk(e.before,[e,...t]);mb(m).forEach((v)=>{if(m.mapping.mapResult(v.oldRange.from).deletedAfter&&m.mapping.mapResult(v.oldRange.to).deletedBefore)m.before.nodesBetween(v.oldRange.from,v.oldRange.to,(S,w)=>{let E=w+S.nodeSize-2,T=v.oldRange.from<=w&&E<=v.oldRange.to;this.editor.emit("delete",{type:"node",node:S,from:w,to:E,newFrom:m.mapping.map(w),newTo:m.mapping.map(E),deletedRange:v.oldRange,newRange:v.newRange,partial:!T,editor:this.editor,transaction:e,combinedTransform:m})})});let y=m.mapping;m.steps.forEach((v,S)=>{var w,E;if(v instanceof $a){let T=y.slice(S).map(v.from,-1),D=y.slice(S).map(v.to),H=y.invert().map(T,-1),z=y.invert().map(D),L=T>0?(w=m.doc.nodeAt(T-1))==null?void 0:w.marks.some((V)=>V.eq(v.mark)):!1,J=(E=m.doc.nodeAt(D))==null?void 0:E.marks.some((V)=>V.eq(v.mark));this.editor.emit("delete",{type:"mark",mark:v.mark,from:v.from,to:v.to,deletedRange:{from:H,to:z},newRange:{from:T,to:D},partial:Boolean(J||L),editor:this.editor,transaction:e,combinedTransform:m})}})};if((i=(a=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:a.async)!=null?i:!0)setTimeout(l,0);else l()}}),vF=Ct.create({name:"drop",addProseMirrorPlugins(){return[new qe({key:new Ze("tiptapDrop"),props:{handleDrop:(e,t,n,a)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:a})}}})]}}),xF=Ct.create({name:"editable",addProseMirrorPlugins(){return[new qe({key:new Ze("editable"),props:{editable:()=>this.editor.options.editable}})]}}),$F=new Ze("focusEvents"),SF=Ct.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new qe({key:$F,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let a=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(a),!1},blur:(t,n)=>{e.isFocused=!1;let a=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(a),!1}}}})]}}),CF=Ct.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:c})=>[()=>c.undoInputRule(),()=>c.command(({tr:u})=>{let{selection:f,doc:h}=u,{empty:m,$anchor:b}=f,{pos:y,parent:v}=b,S=b.parent.isTextblock&&y>0?u.doc.resolve(y-1):b,w=S.parent.type.spec.isolating,E=b.pos-b.parentOffset,T=w&&S.parent.childCount===1?E===b.pos:Fe.atStart(h).from===y;if(!m||!v.type.isTextblock||v.textContent.length||!T||T&&b.parent.type.name==="paragraph")return!1;return c.clearNodes()}),()=>c.deleteSelection(),()=>c.joinBackward(),()=>c.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:c})=>[()=>c.deleteSelection(),()=>c.deleteCurrentNode(),()=>c.joinForward(),()=>c.selectNodeForward()]),a={Enter:()=>this.editor.commands.first(({commands:c})=>[()=>c.newlineInCode(),()=>c.createParagraphNear(),()=>c.liftEmptyBlock(),()=>c.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...a},l={...a,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};if(A1()||QH())return l;return i},addProseMirrorPlugins(){return[new qe({key:new Ze("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some((w)=>w.getMeta("composition")))return;let a=e.some((w)=>w.docChanged)&&!t.doc.eq(n.doc),i=e.some((w)=>w.getMeta("preventClearDocument"));if(!a||i)return;let{empty:l,from:c,to:u}=t.selection,f=Fe.atStart(t.doc).from,h=Fe.atEnd(t.doc).to;if(l||!(c===f&&u===h))return;if(!oh(n.doc))return;let y=n.tr,v=M1({state:n,transaction:y}),{commands:S}=new N1({editor:this.editor,state:v});if(S.clearNodes(),!y.steps.length)return;return y}})]}}),wF=Ct.create({name:"paste",addProseMirrorPlugins(){return[new qe({key:new Ze("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),EF=Ct.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new qe({key:new Ze("tabindex"),props:{attributes:()=>{var e;if(!this.editor.isEditable&&this.options.value===void 0)return{};return{tabindex:(e=this.options.value)!=null?e:"0"}}}})]}}),TF=Ct.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=nh(this.extensions);return[{types:e.filter((t)=>t.name!=="text").map((t)=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:(t)=>{let n=t.getAttribute("dir");if(n&&(n==="ltr"||n==="rtl"||n==="auto"))return n;return this.options.direction},renderHTML:(t)=>{if(!t.dir)return{};return{dir:t.dir}}}}}]},addProseMirrorPlugins(){return[new qe({key:new Ze("textDirection"),props:{attributes:()=>{let e=this.options.direction;if(!e)return{};return{dir:e}}}})]}}),RF=class extends Sre{constructor(e={}){super();this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Qne,createMappablePosition:Zne},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:a,moved:i})=>this.options.onDrop(n,a,i)),this.on("paste",({event:n,slice:a})=>this.options.onPaste(n,a)),this.on("delete",this.options.onDelete);let t=this.createDoc();if(!this.editorState){let n=xk(t,this.options.autofocus);this.editorState=Nc.create({doc:t,schema:this.schema,selection:n||void 0})}if(this.options.element)this.mount(this.options.element)}mount(e){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(e),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 e=this.editorView.dom;if(e==null?void 0:e.editor)delete e.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(e){console.warn("Failed to remove CSS element:",e)}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=Cre(Fre,this.options.injectNonce)}setOptions(e={}){if(this.options={...this.options,...e},!this.editorView||!this.state||this.isDestroyed)return;if(this.options.editorProps)this.view.setProps(this.options.editorProps);this.view.updateState(this.state)}setEditable(e,t=!0){if(this.setOptions({editable:e}),t)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:(e)=>{this.editorState=e},dispatch:(e)=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){if(this.editorView)this.editorState=this.view.state;return this.editorState}registerPlugin(e,t){let n=tF(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],a=this.state.reconfigure({plugins:n});return this.view.updateState(a),a}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach((i)=>{let l=typeof i==="string"?`${i}$`:i.key;n=n.filter((c)=>!c.key.startsWith(l))}),t.length===n.length)return;let a=this.state.reconfigure({plugins:n});return this.view.updateState(a),a}createExtensionManager(){var e,t,n,a;let l=[...this.options.enableCoreExtensions?[xF,gF.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),bF,SF,CF,EF.configure({value:(a=(n=this.options.coreExtensionOptions)==null?void 0:n.tabindex)==null?void 0:a.value}),vF,wF,yF,TF.configure({direction:this.options.textDirection})].filter((c)=>{if(typeof this.options.enableCoreExtensions==="object")return this.options.enableCoreExtensions[c.name]!==!1;return!0}):[],...this.options.extensions].filter((c)=>["extension","node","mark"].includes(c==null?void 0:c.type));this.extensionManager=new F1(l,this)}createCommandManager(){this.commandManager=new N1({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=$k(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;let n=$k(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Nc.create({doc:n,schema:this.schema,selection:xk(n,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:t,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((a)=>a.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,a=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(a):a,l=t.transformPastedHTML,c=this.extensionManager.transformPastedHTML(l);this.editorView=new $1(e,{...t,attributes:{role:"textbox",...t==null?void 0:t.attributes},dispatchTransaction:i,transformPastedHTML:c,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let u=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(u),this.prependClass(),this.injectCSS();let f=this.view.dom;f.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(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach((h)=>{var m;return(m=this.capturedTransaction)==null?void 0:m.step(h)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),a=!this.state.selection.eq(t.selection),i=n.includes(e),l=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!i)return;if(this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),a)this.emit("selectionUpdate",{editor:this,transaction:e});let c=n.findLast((h)=>h.getMeta("focus")||h.getMeta("blur")),u=c==null?void 0:c.getMeta("focus"),f=c==null?void 0:c.getMeta("blur");if(u)this.emit("focus",{editor:this,event:u.event,transaction:c});if(f)this.emit("blur",{editor:this,event:f.event,transaction:c});if(e.getMeta("preventUpdate")||!n.some((h)=>h.docChanged)||l.doc.eq(t.doc))return;this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Mk(this.state,e)}isActive(e,t){let n=typeof e==="string"?e:null,a=typeof e==="string"?t:e;return Xne(this.state,n,a)}getJSON(){return this.state.doc.toJSON()}getHTML(){return L1(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
|
|
353
|
+
|
|
354
|
+
`,textSerializers:n={}}=e||{};return Ak(this.state.doc,{blockSeparator:t,textSerializers:{..._1(this.schema),...n}})}get isEmpty(){return oh(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 e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e),n=e>0&&t.nodeAfter&&!t.nodeAfter.isText&&t.nodeAfter.isAtom?t.nodeAfter:null;return new Hre(t,this,!1,n)}get $doc(){return this.$pos(0)}};en=class e extends Dk{constructor(){super(...arguments);this.type="node"}static create(t={}){let n=typeof t==="function"?t():t;return new e(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t==="function"?t():t;return super.extend(n)}}});function Lk(e,t){return function(a,i,l){return e(a,i,l)&&t(a,i,l)}}function U1(e){return function(n,a,i){if(!n||!a||typeof n!=="object"||typeof a!=="object")return e(n,a,i);let{cache:l}=i,c=l.get(n),u=l.get(a);if(c&&u)return c===a&&u===n;l.set(n,a),l.set(a,n);let f=e(n,a,i);return l.delete(n),l.delete(a),f}}function Kre(e){return e!=null?e[Symbol.toStringTag]:void 0}function AF(e){return Ure(e).concat(Vre(e))}function Dd(e,t){return e===t||!e&&!t&&e!==e&&t!==t}function Jre(e,t){return e.byteLength===t.byteLength&&V1(new Uint8Array(e),new Uint8Array(t))}function Xre(e,t,n){let a=e.length;if(t.length!==a)return!1;while(a-- >0)if(!n.equals(e[a],t[a],a,a,e,t,n))return!1;return!0}function Qre(e,t){return e.byteLength===t.byteLength&&V1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Zre(e,t){return Dd(e.getTime(),t.getTime())}function eoe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function toe(e,t){return e===t}function OF(e,t,n){let a=e.size;if(a!==t.size)return!1;if(!a)return!0;let i=Array(a),l=e.entries(),c,u,f=0;while(c=l.next()){if(c.done)break;let h=t.entries(),m=!1,b=0;while(u=h.next()){if(u.done)break;if(i[b]){b++;continue}let y=c.value,v=u.value;if(n.equals(y[0],v[0],f,b,e,t,n)&&n.equals(y[1],v[1],y[0],v[0],e,t,n)){m=i[b]=!0;break}b++}if(!m)return!1;f++}return!0}function roe(e,t,n){let a=NF(e),i=a.length;if(NF(t).length!==i)return!1;while(i-- >0)if(!PF(e,t,n,a[i]))return!1;return!0}function yb(e,t,n){let a=AF(e),i=a.length;if(AF(t).length!==i)return!1;let l,c,u;while(i-- >0){if(l=a[i],!PF(e,t,n,l))return!1;if(c=MF(e,l),u=MF(t,l),(c||u)&&(!c||!u||c.configurable!==u.configurable||c.enumerable!==u.enumerable||c.writable!==u.writable))return!1}return!0}function ooe(e,t){return Dd(e.valueOf(),t.valueOf())}function aoe(e,t){return e.source===t.source&&e.flags===t.flags}function DF(e,t,n){let a=e.size;if(a!==t.size)return!1;if(!a)return!0;let i=Array(a),l=e.values(),c,u;while(c=l.next()){if(c.done)break;let f=t.values(),h=!1,m=0;while(u=f.next()){if(u.done)break;if(!i[m]&&n.equals(c.value,u.value,c.value,u.value,e,t,n)){h=i[m]=!0;break}m++}if(!h)return!1}return!0}function V1(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;while(n-- >0)if(e[n]!==t[n])return!1;return!0}function ioe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function PF(e,t,n,a){if((a===Yre||a===Wre||a===Gre)&&(e.$$typeof||t.$$typeof))return!0;return qre(t,a)&&n.equals(e[a],t[a],a,a,e,t,n)}function Soe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:a,areErrorsEqual:i,areFunctionsEqual:l,areMapsEqual:c,areNumbersEqual:u,areObjectsEqual:f,arePrimitiveWrappersEqual:h,areRegExpsEqual:m,areSetsEqual:b,areTypedArraysEqual:y,areUrlsEqual:v,unknownTagComparators:S}){return function(E,T,D){if(E===T)return!0;if(E==null||T==null)return!1;let H=typeof E;if(H!==typeof T)return!1;if(H!=="object"){if(H==="number")return u(E,T,D);if(H==="function")return l(E,T,D);return!1}let z=E.constructor;if(z!==T.constructor)return!1;if(z===Object)return f(E,T,D);if(Array.isArray(E))return t(E,T,D);if(z===Date)return a(E,T,D);if(z===RegExp)return m(E,T,D);if(z===Map)return c(E,T,D);if(z===Set)return b(E,T,D);let L=$oe.call(E);if(L===doe)return a(E,T,D);if(L===goe)return m(E,T,D);if(L===poe)return c(E,T,D);if(L===boe)return b(E,T,D);if(L===moe)return typeof E.then!=="function"&&typeof T.then!=="function"&&f(E,T,D);if(L===xoe)return v(E,T,D);if(L===foe)return i(E,T,D);if(L===loe)return f(E,T,D);if(voe[L])return y(E,T,D);if(L===soe)return e(E,T,D);if(L===uoe)return n(E,T,D);if(L===coe||L===hoe||L===yoe)return h(E,T,D);if(S){let J=S[L];if(!J){let V=Kre(E);if(V)J=S[V]}if(J)return J(E,T,D)}return!1}}function Coe({circular:e,createCustomConfig:t,strict:n}){let a={areArrayBuffersEqual:Jre,areArraysEqual:n?yb:Xre,areDataViewsEqual:Qre,areDatesEqual:Zre,areErrorsEqual:eoe,areFunctionsEqual:toe,areMapsEqual:n?Lk(OF,yb):OF,areNumbersEqual:noe,areObjectsEqual:n?yb:roe,arePrimitiveWrappersEqual:ooe,areRegExpsEqual:aoe,areSetsEqual:n?Lk(DF,yb):DF,areTypedArraysEqual:n?Lk(V1,yb):V1,areUrlsEqual:ioe,unknownTagComparators:void 0};if(t)a=Object.assign({},a,t(a));if(e){let i=U1(a.areArraysEqual),l=U1(a.areMapsEqual),c=U1(a.areObjectsEqual),u=U1(a.areSetsEqual);a=Object.assign({},a,{areArraysEqual:i,areMapsEqual:l,areObjectsEqual:c,areSetsEqual:u})}return a}function woe(e){return function(t,n,a,i,l,c,u){return e(t,n,u)}}function Eoe({circular:e,comparator:t,createState:n,equals:a,strict:i}){if(n)return function(u,f){let{cache:h=e?new WeakMap:void 0,meta:m}=n();return t(u,f,{cache:h,equals:a,meta:m,strict:i})};if(e)return function(u,f){return t(u,f,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};let l={cache:void 0,equals:a,meta:void 0,strict:i};return function(u,f){return t(u,f,l)}}function Uc(e={}){let{circular:t=!1,createInternalComparator:n,createState:a,strict:i=!1}=e,l=Coe(e),c=Soe(l),u=n?n(c):woe(c);return Eoe({circular:t,comparator:c,createState:a,equals:u,strict:i})}var Ure,Vre,jre,qre,Gre="__v",Wre="__o",Yre="_owner",MF,NF,noe,soe="[object ArrayBuffer]",loe="[object Arguments]",coe="[object Boolean]",uoe="[object DataView]",doe="[object Date]",foe="[object Error]",poe="[object Map]",hoe="[object Number]",moe="[object Object]",goe="[object RegExp]",boe="[object Set]",yoe="[object String]",voe,xoe="[object URL]",$oe,LF,dAe,fAe,pAe,hAe,mAe,gAe,bAe;var _F=N(()=>{({getOwnPropertyNames:Ure,getOwnPropertySymbols:Vre}=Object),{hasOwnProperty:jre}=Object.prototype;qre=Object.hasOwn||((e,t)=>jre.call(e,t));({getOwnPropertyDescriptor:MF,keys:NF}=Object);noe=Dd;voe={"[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},$oe=Object.prototype.toString;LF=Uc(),dAe=Uc({strict:!0}),fAe=Uc({circular:!0}),pAe=Uc({circular:!0,strict:!0}),hAe=Uc({createInternalComparator:()=>Dd}),mAe=Uc({strict:!0,createInternalComparator:()=>Dd}),gAe=Uc({circular:!0,createInternalComparator:()=>Dd}),bAe=Uc({circular:!0,createInternalComparator:()=>Dd,strict:!0})});var IF=Ui(function(Toe){var sl=K(ae());(function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Ep(),n=typeof Object.is==="function"?Object.is:e,a=t.useSyncExternalStore,i=sl.useRef,l=sl.useEffect,c=sl.useMemo,u=sl.useDebugValue;Toe.useSyncExternalStoreWithSelector=function(f,h,m,b,y){var v=i(null);if(v.current===null){var S={hasValue:!1,value:null};v.current=S}else S=v.current;v=c(function(){function E(L){if(!T){if(T=!0,D=L,L=b(L),y!==void 0&&S.hasValue){var J=S.value;if(y(J,L))return H=J}return H=L}if(J=H,n(D,L))return J;var V=b(L);if(y!==void 0&&y(J,V))return D=L,J;return D=L,H=V}var T=!1,D,H,z=m===void 0?null:m;return[function(){return E(h())},z===null?void 0:function(){return E(z())}]},[h,m,b,y]);var w=a(f,v[0],v[1]);return l(function(){S.hasValue=!0,S.value=w},[w]),u(w),w},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});function Aoe(){let e=new Set,t={},n=!1,a=()=>{if(n||!e.size)return;n=!0,queueMicrotask(()=>{n=!1,e.forEach((i)=>i())})};return{subscribe(i){return e.add(i),()=>{e.delete(i)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(i,l){t={...t,[i]:zF.default.createPortal(l.reactElement,l.element,i)},a()},removeRenderer(i){let l={...t};delete l[i],t=l,a()}}}function Ik(e){var t;let[n]=Kc.useState(()=>new Doe(e.editor)),a=UF.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:LF);return Ooe(()=>n.watch(e.editor),[e.editor,n]),Kc.useDebugValue(a),a}function jF(e={},t=[]){let n=jc.useRef(e);n.current=e;let[a]=jc.useState(()=>new Loe(n)),i=FF.useSyncExternalStore(a.subscribe,a.getEditor,a.getServerSnapshot);return jc.useDebugValue(i),jc.useEffect(a.onRender(t)),Ik({editor:i,selector:({transactionNumber:l})=>{if(e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0)return null;if(e.immediatelyRender&&l===0)return 0;return l+1}}),i}function YF({children:e,...t}){let n="editor"in t?t.editor:t.instance;if(!n)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let a=Pd.useMemo(()=>({editor:n}),[n]),i=Pd.useMemo(()=>({editor:n}),[n]);return j1.jsx(Bk.Provider,{value:i,children:j1.jsx(Hk.Provider,{value:a,children:e})})}function JF({...e}){let{editor:t}=joe();return j1.jsx(_k,{editor:t,...e})}var vb,Vc,zF,HF,ll,jc,FF,Kc,UF,KF,xb,Boe,qF,GF,WF,zoe,Hoe,Foe,Uoe,zk,Voe,Pd,j1,Roe=(...e)=>(t)=>{e.forEach((n)=>{if(typeof n==="function")n(t);else if(n)n.current=t})},koe=({contentComponent:e})=>{let t=HF.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return ll.jsx(ll.Fragment,{children:Object.values(t)})},Moe,Noe,_k,Ooe,Doe=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,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(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t,n=(i)=>{if((i==null?void 0:i.transaction)!==void 0&&i.transaction===t)return;t=i==null?void 0:i.transaction,this.transactionNumber+=1,this.subscribers.forEach((l)=>l())},a=this.editor;return a.on("transaction",n),a.on("update",n),()=>{a.off("transaction",n),a.off("update",n)}}return}},BF=!0,VF,Poe,Loe=class e{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,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(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach((n)=>n())}getInitialEditor(){let t=this.options.current.immediatelyRender,n=t!=null?t:!0;if(VF){if(n&&BF)console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches");n=!1}else if(Poe&&t===void 0){if(n=!1,BF)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 n?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...a)=>{var i,l;return(l=(i=this.options.current).onBeforeCreate)==null?void 0:l.call(i,...a)},onBlur:(...a)=>{var i,l;return(l=(i=this.options.current).onBlur)==null?void 0:l.call(i,...a)},onCreate:(...a)=>{var i,l;return(l=(i=this.options.current).onCreate)==null?void 0:l.call(i,...a)},onDestroy:(...a)=>{var i,l;return(l=(i=this.options.current).onDestroy)==null?void 0:l.call(i,...a)},onFocus:(...a)=>{var i,l;return(l=(i=this.options.current).onFocus)==null?void 0:l.call(i,...a)},onSelectionUpdate:(...a)=>{var i,l;return(l=(i=this.options.current).onSelectionUpdate)==null?void 0:l.call(i,...a)},onTransaction:(...a)=>{var i,l;return(l=(i=this.options.current).onTransaction)==null?void 0:l.call(i,...a)},onUpdate:(...a)=>{var i,l;return(l=(i=this.options.current).onUpdate)==null?void 0:l.call(i,...a)},onContentError:(...a)=>{var i,l;return(l=(i=this.options.current).onContentError)==null?void 0:l.call(i,...a)},onDrop:(...a)=>{var i,l;return(l=(i=this.options.current).onDrop)==null?void 0:l.call(i,...a)},onPaste:(...a)=>{var i,l;return(l=(i=this.options.current).onPaste)==null?void 0:l.call(i,...a)},onDelete:(...a)=>{var i,l;return(l=(i=this.options.current).onDelete)==null?void 0:l.call(i,...a)},onMount:(...a)=>{var i,l;return(l=(i=this.options.current).onMount)==null?void 0:l.call(i,...a)},onUnmount:(...a)=>{var i,l;return(l=(i=this.options.current).onUnmount)==null?void 0:l.call(i,...a)}};return new RF(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every((a)=>{if(["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(a))return!0;if(a==="extensions"&&t.extensions&&n.extensions){if(t.extensions.length!==n.extensions.length)return!1;return t.extensions.every((i,l)=>{var c;if(i!==((c=n.extensions)==null?void 0:c[l]))return!1;return!0})}if(t[a]!==n[a])return!1;return!0})}onRender(t){return()=>{if(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0){if(!e.compareOptions(this.options.current,this.editor.options))this.editor.setOptions({...this.options.current,editable:this.editor.isEditable})}else this.refreshEditorInstance(t);return()=>{this.isComponentMounted=!1,this.scheduleDestroy()}}}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((a,i)=>a===t[i]))return}if(this.editor&&!this.editor.isDestroyed)this.editor.destroy();this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){if(n)n.setOptions(this.options.current);return}if(n&&!n.isDestroyed){if(n.destroy(),this.instanceId===t)this.setEditor(null)}},1)}},Bk,wAe,K1=()=>vb.useContext(Bk),_oe,Ioe=()=>xb.useContext(_oe),EAe,TAe,Hk,joe=()=>Pd.useContext(Hk),RAe;var q1=N(()=>{Ye();_F();vb=K(ae(),1),Vc=K(ae(),1),zF=K(jr(),1),HF=K(Ep(),1),ll=K(so(),1),jc=K(ae(),1),FF=K(Ep(),1),Kc=K(ae(),1),UF=K(IF(),1),KF=K(so(),1),xb=K(ae(),1),Boe=K(so(),1),qF=K(ae(),1),GF=K(so(),1),WF=K(ae(),1),zoe=K(ae(),1),Hoe=K(jr(),1),Foe=K(so(),1),Uoe=K(so(),1),zk=K(ae(),1),Voe=K(so(),1),Pd=K(ae(),1),j1=K(so(),1);Ye();Moe=class extends Vc.default.Component{constructor(e){super(e);this.editorContentRef=Vc.default.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)==null?void 0:e.parentNode)){if(t.contentComponent)return;let n=this.editorContentRef.current;n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n}),t.contentComponent=Aoe(),t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var e;let t=this.props.editor;if(!t)return;if(t.isEditorContentInitialized=!1,!t.isDestroyed)t.view.setProps({nodeViews:{}});t.contentComponent=null;try{if(!((e=t.view.dom)==null?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}render(){let{editor:e,innerRef:t,...n}=this.props;return ll.jsxs(ll.Fragment,{children:[ll.jsx("div",{ref:Roe(t,this.editorContentRef),...n}),(e==null?void 0:e.contentComponent)&&ll.jsx(koe,{contentComponent:e.contentComponent})]})}},Noe=Vc.forwardRef((e,t)=>{let n=Vc.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Vc.default.createElement(Moe,{key:n,innerRef:t,...e})}),_k=Vc.default.memo(Noe),Ooe=typeof window<"u"?Kc.useLayoutEffect:Kc.useEffect;VF=typeof window>"u",Poe=VF||Boolean(typeof window<"u"&&window.next);Bk=vb.createContext({editor:null}),wAe=Bk.Consumer,_oe=xb.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),EAe=qF.default.forwardRef((e,t)=>{let{onDragStart:n}=Ioe(),a=e.as||"div";return GF.jsx(a,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})}),TAe=WF.default.createContext({markViewContentRef:()=>{}}),Hk=Pd.createContext({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});Hk.displayName="TiptapContext";YF.displayName="Tiptap";JF.displayName="Tiptap.Content";RAe=Object.assign(YF,{Content:JF})});function Vk(e,t,n){return Yo(e,ka(t,n))}function is(e,t){return typeof e==="function"?e(t):e}function Aa(e){return e.split("-")[0]}function Ma(e){return e.split("-")[1]}function jk(e){return e==="x"?"y":"x"}function G1(e){return e==="y"?"height":"width"}function ii(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function W1(e){return jk(ii(e))}function Kk(e,t,n){if(n===void 0)n=!1;let a=Ma(e),i=W1(e),l=G1(i),c=i==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";if(t.reference[l]>t.floating[l])c=Sb(c);return[c,Sb(c)]}function eU(e){let t=Sb(e);return[$b(e),t,$b(t)]}function $b(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Woe(e,t,n){switch(e){case"top":case"bottom":if(n)return t?ZF:QF;return t?QF:ZF;case"left":case"right":return t?qoe:Goe;default:return[]}}function tU(e,t,n,a){let i=Ma(e),l=Woe(Aa(e),n==="start",a);if(i){if(l=l.map((c)=>c+"-"+i),t)l=l.concat(l.map($b))}return l}function Sb(e){let t=Aa(e);return Koe[t]+e.slice(t.length)}function Yoe(e){var t,n,a,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(a=e.bottom)!=null?a:0,left:(i=e.left)!=null?i:0}}function Y1(e){return typeof e!=="number"?Yoe(e):{top:e,right:e,bottom:e,left:e}}function si(e){let{x:t,y:n,width:a,height:i}=e;return{width:a,height:i,top:n,left:t,right:t+a,bottom:n+i,x:t,y:n}}var Fk,XF,Uk,ka,Yo,Cb,as=(e)=>({x:e,y:e}),Koe,QF,ZF,qoe,Goe;var J1=N(()=>{Fk=["top","right","bottom","left"],XF=["start","end"],Uk=Fk.reduce((e,t)=>e.concat(t,t+"-"+XF[0],t+"-"+XF[1]),[]),ka=Math.min,Yo=Math.max,Cb=Math.round,Koe={left:"right",right:"left",bottom:"top",top:"bottom"};QF=["left","right"],ZF=["right","left"],qoe=["top","bottom"],Goe=["bottom","top"]});function nU(e,t,n){let{reference:a,floating:i}=e,l=ii(t),c=W1(t),u=G1(c),f=Aa(t),h=l==="y",m=a.x+a.width/2-i.width/2,b=a.y+a.height/2-i.height/2,y=a[u]/2-i[u]/2,v;switch(f){case"top":v={x:m,y:a.y-i.height};break;case"bottom":v={x:m,y:a.y+a.height};break;case"right":v={x:a.x+a.width,y:b};break;case"left":v={x:a.x-i.width,y:b};break;default:v={x:a.x,y:a.y}}let S=Ma(t);if(S)v[c]+=y*(S==="end"?1:-1)*(n&&h?-1:1);return v}async function aU(e,t){var n;if(t===void 0)t={};let{x:a,y:i,platform:l,rects:c,elements:u,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:y=!1,padding:v=0}=is(t,e),S=Y1(v),E=u[y?b==="floating"?"reference":"floating":b],T=si(await l.getClippingRect({element:((n=await(l.isElement==null?void 0:l.isElement(E)))!=null?n:!0)?E:E.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(u.floating)),boundary:h,rootBoundary:m,strategy:f})),D=b==="floating"?{x:a,y:i,width:c.floating.width,height:c.floating.height}:c.reference,H=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u.floating)),z=await(l.isElement==null?void 0:l.isElement(H))&&await(l.getScale==null?void 0:l.getScale(H))||{x:1,y:1},L=si(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:D,offsetParent:H,strategy:f}):D);return{top:(T.top-L.top+S.top)/z.y,bottom:(L.bottom-T.bottom+S.bottom)/z.y,left:(T.left-L.left+S.left)/z.x,right:(L.right-T.right+S.right)/z.x}}function Xoe(e,t,n){return(e?[...n.filter((i)=>Ma(i)===e),...n.filter((i)=>Ma(i)!==e)]:n.filter((i)=>Aa(i)===i)).filter((i)=>{if(e)return Ma(i)===e||(t?$b(i)!==i:!1);return!0})}function rU(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oU(e){return Fk.some((t)=>e[t]>=0)}function dU(e){let t=ka(...e.map((l)=>l.left)),n=ka(...e.map((l)=>l.top)),a=Yo(...e.map((l)=>l.right)),i=Yo(...e.map((l)=>l.bottom));return{x:t,y:n,width:a-t,height:i-n}}function Qoe(e){let t=e.slice().sort((i,l)=>i.y-l.y),n=[],a=null;for(let i=0;i<t.length;i++){let l=t[i];if(!a||l.y-a.y>a.height/2)n.push([l]);else n[n.length-1].push(l);a=l}return n.map((i)=>si(dU(i)))}async function eae(e,t){let{placement:n,platform:a,elements:i}=e,l=await(a.isRTL==null?void 0:a.isRTL(i.floating)),c=Aa(n),u=Ma(n),f=ii(n)==="y",h=Zoe.has(c)?-1:1,m=l&&f?-1:1,b=is(t,e),{mainAxis:y,crossAxis:v,alignmentAxis:S}=typeof b==="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};if(u&&typeof S==="number")v=u==="end"?S*-1:S;return f?{x:v*m,y:y*h}:{x:y*h,y:v*m}}var Joe=50,iU=async(e,t,n)=>{let{placement:a="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,u=c.detectOverflow?c:{...c,detectOverflow:aU},f=await(c.isRTL==null?void 0:c.isRTL(t)),h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:b}=nU(h,a,f),y=a,v=0,S={};for(let w=0;w<l.length;w++){let E=l[w];if(!E)continue;let{name:T,fn:D}=E,{x:H,y:z,data:L,reset:J}=await D({x:m,y:b,initialPlacement:a,placement:y,strategy:i,middlewareData:S,rects:h,platform:u,elements:{reference:e,floating:t}});if(m=H!=null?H:m,b=z!=null?z:b,S[T]={...S[T],...L},J&&v<Joe){if(v++,typeof J==="object"){if(J.placement)y=J.placement;if(J.rects)h=J.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):J.rects;({x:m,y:b}=nU(h,y,f))}w=-1}}return{x:m,y:b,placement:y,strategy:i,middlewareData:S}},sU=(e)=>({name:"arrow",options:e,async fn(t){let{x:n,y:a,placement:i,rects:l,platform:c,elements:u,middlewareData:f}=t,{element:h,padding:m=0}=is(e,t)||{};if(h==null)return{};let b=Y1(m),y={x:n,y:a},v=W1(i),S=G1(v),w=await c.getDimensions(h),E=v==="y",T=E?"top":"left",D=E?"bottom":"right",H=E?"clientHeight":"clientWidth",z=l.reference[S]+l.reference[v]-y[v]-l.floating[S],L=y[v]-l.reference[v],J=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h)),V=J?J[H]:0;if(!V||!await(c.isElement==null?void 0:c.isElement(J)))V=u.floating[H]||l.floating[S];let P=z/2-L/2,te=V/2-w[S]/2-1,Y=ka(b[T],te),ge=ka(b[D],te),ue=V-w[S]-ge,ie=V/2-w[S]/2+P,_=Vk(Y,ie,ue),U=!f.arrow&&Ma(i)!=null&&ie!==_&&l.reference[S]/2-(ie<Y?Y:ge)-w[S]/2<0,W=U?ie<Y?ie-Y:ie-ue:0;return{[v]:y[v]+W,data:{[v]:_,centerOffset:ie-_-W,...U&&{alignmentOffset:W}},reset:U}}}),lU=function(e){if(e===void 0)e={};return{name:"autoPlacement",options:e,async fn(t){var n,a,i;let{rects:l,middlewareData:c,placement:u,platform:f,elements:h}=t,{crossAxis:m=!1,alignment:b,allowedPlacements:y=Uk,autoAlignment:v=!0,...S}=is(e,t),w=b!==void 0||y===Uk?Xoe(b||null,v,y):y,E=((n=c.autoPlacement)==null?void 0:n.index)||0,T=w[E];if(T==null)return{};if(u!==T)return{reset:{placement:w[0]}};let D=await f.detectOverflow(t,S),H=Kk(T,l,await(f.isRTL==null?void 0:f.isRTL(h.floating))),z=[D[Aa(T)],D[H[0]],D[H[1]]],L=[...((a=c.autoPlacement)==null?void 0:a.overflows)||[],{placement:T,overflows:z}],J=w[E+1];if(J)return{data:{index:E+1,overflows:L},reset:{placement:J}};let V=L.map((Y)=>{let ge=Ma(Y.placement);return[Y.placement,ge&&m?Y.overflows.slice(0,2).reduce((ue,ie)=>ue+ie,0):Y.overflows[0],Y.overflows]}).sort((Y,ge)=>Y[1]-ge[1]),te=((i=V.filter((Y)=>Y[2].slice(0,Ma(Y[0])?2:3).every((ge)=>ge<=0))[0])==null?void 0:i[0])||V[0][0];if(te!==u)return{data:{index:E+1,overflows:L},reset:{placement:te}};return{}}}},cU=function(e){if(e===void 0)e={};return{name:"flip",options:e,async fn(t){var n,a;let{placement:i,middlewareData:l,rects:c,initialPlacement:u,platform:f,elements:h}=t,{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...E}=is(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};let T=Aa(i),D=ii(u),H=Aa(u)===u,z=await(f.isRTL==null?void 0:f.isRTL(h.floating)),L=y||(H||!w?[Sb(u)]:eU(u)),J=S!=="none";if(!y&&J)L.push(...tU(u,w,S,z));let V=[u,...L],P=await f.detectOverflow(t,E),te=[],Y=((a=l.flip)==null?void 0:a.overflows)||[];if(m)te.push(P[T]);if(b){let _=Kk(i,c,z);te.push(P[_[0]],P[_[1]])}if(Y=[...Y,{placement:i,overflows:te}],!te.every((_)=>_<=0)){var ge,ue;let _=(((ge=l.flip)==null?void 0:ge.index)||0)+1,U=V[_];if(U){if(!(b==="alignment"?D!==ii(U):!1)||Y.every((pe)=>ii(pe.placement)===D?pe.overflows[0]>0:!0))return{data:{index:_,overflows:Y},reset:{placement:U}}}let W=(ue=Y.filter((Q)=>Q.overflows[0]<=0).sort((Q,pe)=>Q.overflows[1]-pe.overflows[1])[0])==null?void 0:ue.placement;if(!W)switch(v){case"bestFit":{var ie;let Q=(ie=Y.filter((pe)=>{if(J){let re=ii(pe.placement);return re===D||re==="y"}return!0}).map((pe)=>[pe.placement,pe.overflows.filter((re)=>re>0).reduce((re,k)=>re+k,0)]).sort((pe,re)=>pe[1]-re[1])[0])==null?void 0:ie[0];if(Q)W=Q;break}case"initialPlacement":W=u;break}if(i!==W)return{reset:{placement:W}}}return{}}}},uU=function(e){if(e===void 0)e={};return{name:"hide",options:e,async fn(t){let{rects:n,platform:a}=t,{strategy:i="referenceHidden",...l}=is(e,t);switch(i){case"referenceHidden":{let c=await a.detectOverflow(t,{...l,elementContext:"reference"}),u=rU(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:oU(u)}}}case"escaped":{let c=await a.detectOverflow(t,{...l,altBoundary:!0}),u=rU(c,n.floating);return{data:{escapedOffsets:u,escaped:oU(u)}}}default:return{}}}}},fU=function(e){if(e===void 0)e={};return{name:"inline",options:e,async fn(t){let{placement:n,elements:a,rects:i,platform:l,strategy:c}=t,{padding:u=2,x:f,y:h}=is(e,t),m=Array.from(await(l.getClientRects==null?void 0:l.getClientRects(a.reference))||[]);if(!m.length)return{};let b=Qoe(m),y=si(dU(m)),v=Y1(u);function S(){if(b.length===2&&(b[0].left>b[1].right||b[1].left>b[0].right)&&f!=null&&h!=null)return b.find((E)=>f>E.left-v.left&&f<E.right+v.right&&h>E.top-v.top&&h<E.bottom+v.bottom)||y;if(b.length>=2){if(ii(n)==="y"){let J=b[0],V=b[b.length-1],P=Aa(n)==="top",te=J.top,Y=V.bottom,ge=P?J.left:V.left,ue=P?J.right:V.right;return si({x:ge,y:te,width:ue-ge,height:Y-te})}let E=Aa(n)==="left",T=Yo(...b.map((J)=>J.right)),D=ka(...b.map((J)=>J.left)),H=b.filter((J)=>E?J.left===D:J.right===T),z=H[0].top,L=H[H.length-1].bottom;return si({x:D,y:z,width:T-D,height:L-z})}return y}let w=await l.getElementRects({reference:{getBoundingClientRect:S},floating:a.floating,strategy:c});if(i.reference.x!==w.reference.x||i.reference.y!==w.reference.y||i.reference.width!==w.reference.width||i.reference.height!==w.reference.height)return{reset:{rects:w}};return{}}}},Zoe,pU=function(e){if(e===void 0)e=0;return{name:"offset",options:e,async fn(t){var n,a;let{x:i,y:l,placement:c,middlewareData:u}=t,f=await eae(t,e);if(c===((n=u.offset)==null?void 0:n.placement)&&(a=u.arrow)!=null&&a.alignmentOffset)return{};return{x:i+f.x,y:l+f.y,data:{...f,placement:c}}}}},hU=function(e){if(e===void 0)e={};return{name:"shift",options:e,async fn(t){let{x:n,y:a,placement:i,platform:l}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:f={fn:(D)=>{let{x:H,y:z}=D;return{x:H,y:z}}},...h}=is(e,t),m={x:n,y:a},b=await l.detectOverflow(t,h),y=ii(i),v=jk(y),S=m[v],w=m[y],E=(D,H)=>Vk(H+b[D==="y"?"top":"left"],H,H-b[D==="y"?"bottom":"right"]);if(c)S=E(v,S);if(u)w=E(y,w);let T=f.fn({...t,[v]:S,[y]:w});return{...T,data:{x:T.x-n,y:T.y-a,enabled:{[v]:c,[y]:u}}}}}},mU=function(e){if(e===void 0)e={};return{name:"size",options:e,async fn(t){let{placement:n,rects:a,platform:i,elements:l}=t,{apply:c=()=>{},...u}=is(e,t),f=await i.detectOverflow(t,u),h=Aa(n),m=Ma(n),b=ii(n)==="y",{width:y,height:v}=a.floating,S,w;if(h==="top"||h==="bottom")S=h,w=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right";else w=h,S=m==="end"?"top":"bottom";let E=v-f.top-f.bottom,T=y-f.left-f.right,D=ka(v-f[S],E),H=ka(y-f[w],T),z=t.middlewareData.shift,L=!z,J=D,V=H;if(z!=null&&z.enabled.x)V=T;if(z!=null&&z.enabled.y)J=E;if(L&&!m)if(b)V=y-2*Yo(f.left,f.right);else J=v-2*Yo(f.top,f.bottom);await c({...t,availableWidth:V,availableHeight:J});let P=await i.getDimensions(l.floating);if(y!==P.width||v!==P.height)return{reset:{rects:!0}};return{}}}};var gU=N(()=>{J1();J1();Zoe=new Set(["left","top"])});function Q1(){return typeof window<"u"}function _d(e){if(yU(e))return(e.nodeName||"").toLowerCase();return"#document"}function yo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cl(e){var t;return(t=(yU(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yU(e){if(!Q1())return!1;return e instanceof Node||e instanceof yo(e).Node}function li(e){if(!Q1())return!1;return e instanceof Element||e instanceof yo(e).Element}function ul(e){if(!Q1())return!1;return e instanceof HTMLElement||e instanceof yo(e).HTMLElement}function bU(e){if(!Q1()||typeof ShadowRoot>"u")return!1;return e instanceof ShadowRoot||e instanceof yo(e).ShadowRoot}function wb(e){let{overflow:t,overflowX:n,overflowY:a,display:i}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&i!=="inline"&&i!=="contents"}function vU(e){return/^(table|td|th)$/.test(_d(e))}function Eb(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}function Z1(e){let t=li(e)?ci(e):e;return Ld(t.transform)||Ld(t.translate)||Ld(t.scale)||Ld(t.rotate)||Ld(t.perspective)||!e$()&&(Ld(t.backdropFilter)||Ld(t.filter))||tae.test(t.willChange||"")||nae.test(t.contain||"")}function xU(e){let t=qc(e);while(ul(t)&&!ih(t)){if(Z1(t))return t;else if(Eb(t))return null;t=qc(t)}return null}function e$(){if(qk==null)qk=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return qk}function ih(e){return/^(html|body|#document)$/.test(_d(e))}function ci(e){return yo(e).getComputedStyle(e)}function Tb(e){if(li(e))return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop};return{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qc(e){if(_d(e)==="html")return e;let t=e.assignedSlot||e.parentNode||bU(e)&&e.host||cl(e);return bU(t)?t.host:t}function $U(e){let t=qc(e);if(ih(t))return(e.ownerDocument||e).body;if(ul(t)&&wb(t))return t;return $U(t)}function X1(e,t,n){var a;if(t===void 0)t=[];if(n===void 0)n=!0;let i=$U(e),l=i===((a=e.ownerDocument)==null?void 0:a.body),c=yo(i);if(l){let u=t$(c);return t.concat(c,c.visualViewport||[],wb(i)?i:[],u&&n?X1(u):[])}else return t.concat(i,X1(i,[],n))}function t$(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var tae,nae,Ld=(e)=>!!e&&e!=="none",qk;var SU=N(()=>{tae=/transform|translate|scale|rotate|perspective|filter/,nae=/paint|layout|strict|content/});function EU(e){let t=ci(e),n=parseFloat(t.width)||0,a=parseFloat(t.height)||0,i=ul(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:a,u=Cb(n)!==l||Cb(a)!==c;if(u)n=l,a=c;return{width:n,height:a,$:u}}function TU(e){return!li(e)?e.contextElement:e}function sh(e){let t=TU(e);if(!ul(t))return as(1);let n=t.getBoundingClientRect(),{width:a,height:i,$:l}=EU(t),c=(l?Cb(n.width):n.width)/a,u=(l?Cb(n.height):n.height)/i;if(!c||!Number.isFinite(c))c=1;if(!u||!Number.isFinite(u))u=1;return{x:c,y:u}}function RU(e){let t=yo(e);if(!e$()||!t.visualViewport)return rae;return{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oae(e,t,n){if(t===void 0)t=!1;return!!n&&t&&n===yo(e)}function Rb(e,t,n,a){if(t===void 0)t=!1;if(n===void 0)n=!1;let i=e.getBoundingClientRect(),l=TU(e),c=as(1);if(t)if(a){if(li(a))c=sh(a)}else c=sh(e);let u=oae(l,n,a)?RU(l):as(0),f=(i.left+u.x)/c.x,h=(i.top+u.y)/c.y,m=i.width/c.x,b=i.height/c.y;if(l&&a){let y=yo(l),v=li(a)?yo(a):a,S=y,w=t$(S);while(w&&v!==S){let E=sh(w),T=w.getBoundingClientRect(),D=ci(w),H=T.left+(w.clientLeft+parseFloat(D.paddingLeft))*E.x,z=T.top+(w.clientTop+parseFloat(D.paddingTop))*E.y;f*=E.x,h*=E.y,m*=E.x,b*=E.y,f+=H,h+=z,S=yo(w),w=t$(S)}}return si({width:m,height:b,x:f,y:h})}function n$(e,t){let n=Tb(e).scrollLeft;if(!t)return Rb(cl(e)).left+n;return t.left+n}function kU(e,t){let n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-n$(e,n),i=n.top+t.scrollTop;return{x:a,y:i}}function aae(e){let{elements:t,rect:n,offsetParent:a,strategy:i}=e,l=i==="fixed",c=cl(a),u=t?Eb(t.floating):!1;if(a===c||u&&l)return n;let f={scrollLeft:0,scrollTop:0},h=as(1),m=as(0),b=ul(a);if(b||!l){if(_d(a)!=="body"||wb(c))f=Tb(a);if(b){let v=Rb(a);h=sh(a),m.x=v.x+a.clientLeft,m.y=v.y+a.clientTop}}let y=c&&!b&&!l?kU(c,f):as(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+y.x,y:n.y*h.y-f.scrollTop*h.y+m.y+y.y}}function iae(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function sae(e){let t=Tb(e),n=e.ownerDocument.body,a=Yo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Yo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),l=-t.scrollLeft+n$(e),c=-t.scrollTop;if(ci(n).direction==="rtl")l+=Yo(e.clientWidth,n.clientWidth)-a;return{width:a,height:i,x:l,y:c}}function cae(e,t,n){if(n===void 0)n="viewport";let a=n==="layoutViewport",i=yo(e),l=cl(e),c=i.visualViewport,u=l.clientWidth,f=l.clientHeight,h=0,m=0;if(c){let y=!e$()||t==="fixed";if(a){if(!y)h=-c.offsetLeft,m=-c.offsetTop}else if(u=c.width,f=c.height,y)h=c.offsetLeft,m=c.offsetTop}if(n$(l)<=0){let y=l.ownerDocument,v=y.body,S=getComputedStyle(v),w=y.compatMode==="CSS1Compat"?parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0:0,E=Math.abs(l.clientWidth-v.clientWidth-w),T=getComputedStyle(l).scrollbarGutter==="stable both-edges"?E/2:E;if(T<=lae)u-=T}return{width:u,height:f,x:h,y:m}}function uae(e,t){let n=Rb(e,!0,t==="fixed"),a=n.top+e.clientTop,i=n.left+e.clientLeft,l=sh(e),c=e.clientWidth*l.x,u=e.clientHeight*l.y,f=i*l.x,h=a*l.y;return{width:c,height:u,x:f,y:h}}function CU(e,t,n){let a;if(t==="viewport"||t==="layoutViewport")a=cae(e,n,t);else if(t==="document")a=sae(cl(e));else if(li(t))a=uae(t,n);else{let i=RU(e);a={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return si(a)}function dae(e,t){let n=t.get(e);if(n)return n;let a=X1(e,[],!1).filter((u)=>li(u)&&_d(u)!=="body"),i=null,l=ci(e).position==="fixed",c=l?qc(e):e;while(li(c)&&!ih(c)){let u=ci(c),f=Z1(c),h=i?i.position:l?"fixed":"";if(!f&&(h==="fixed"||h==="absolute"&&u.position==="static"))a=a.filter((b)=>b!==c);else i=u;c=qc(c)}return t.set(e,a),a}function fae(e){let{element:t,boundary:n,rootBoundary:a,strategy:i}=e,c=[...n==="clippingAncestors"?Eb(t)?[]:dae(t,this._c):[].concat(n),a],u=CU(t,c[0],i),f=u.top,h=u.right,m=u.bottom,b=u.left;for(let y=1;y<c.length;y++){let v=CU(t,c[y],i);f=Yo(v.top,f),h=ka(v.right,h),m=ka(v.bottom,m),b=Yo(v.left,b)}return{width:h-b,height:m-f,x:b,y:f}}function pae(e){let{width:t,height:n}=EU(e);return{width:t,height:n}}function hae(e,t,n){let a=ul(t),i=cl(t),l=n==="fixed",c=Rb(e,!0,l,t),u={scrollLeft:0,scrollTop:0},f=as(0);if(a||!l){if(_d(t)!=="body"||wb(i))u=Tb(t);if(a){let y=Rb(t,!0,l,t);f.x=y.x+t.clientLeft,f.y=y.y+t.clientTop}}if(!a&&i)f.x=n$(i);let h=i&&!a&&!l?kU(i,u):as(0),m=c.left+u.scrollLeft-f.x-h.x,b=c.top+u.scrollTop-f.y-h.y;return{x:m,y:b,width:c.width,height:c.height}}function Gk(e){return ci(e).position==="static"}function wU(e,t){if(!ul(e)||ci(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;if(cl(e)===n)n=n.ownerDocument.body;return n}function AU(e,t){let n=yo(e);if(Eb(e))return n;if(!ul(e)){let i=qc(e);while(i&&!ih(i)){if(li(i)&&!Gk(i))return i;i=qc(i)}return n}let a=wU(e,t);while(a&&vU(a)&&Gk(a))a=wU(a,t);if(a&&ih(a)&&Gk(a)&&!Z1(a))return n;return a||xU(e)||n}function gae(e){return ci(e).direction==="rtl"}var rae,lae=25,mae=async function(e){let t=this.getOffsetParent||AU,n=this.getDimensions,a=await n(e.floating);return{reference:hae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}},bae,r$,o$,a$,i$,s$,l$,c$,u$,d$=(e,t,n)=>{let a=new Map,i=n!=null?n:{},l={...bae,...i.platform,_c:a};return iU(e,t,{...i,platform:l})};var Wk=N(()=>{gU();J1();SU();rae=as(0);bae={convertOffsetParentRelativeRectToViewportRelativeRect:aae,getDocumentElement:cl,getClippingRect:fae,getOffsetParent:AU,getElementRects:mae,getClientRects:iae,getDimensions:pae,getScale:sh,isElement:li,isRTL:gae},r$=pU,o$=lU,a$=hU,i$=cU,s$=mU,l$=uU,c$=sU,u$=fU});function yae(e){if(e.type.spec.tableRole!="table")throw RangeError("Not a table node: "+e.type.name);let t=vae(e),n=e.childCount,a=[],i=0,l=null,c=[];for(let h=0,m=t*n;h<m;h++)a[h]=0;for(let h=0,m=0;h<n;h++){let b=e.child(h);m++;for(let S=0;;S++){while(i<a.length&&a[i]!=0)i++;if(S==b.childCount)break;let w=b.child(S),{colspan:E,rowspan:T,colwidth:D}=w.attrs;for(let H=0;H<T;H++){if(H+h>=n){(l||(l=[])).push({type:"overlong_rowspan",pos:m,n:T-H});break}let z=i+H*t;for(let L=0;L<E;L++){if(a[z+L]==0)a[z+L]=m;else(l||(l=[])).push({type:"collision",row:h,pos:m,n:E-L});let J=D&&D[L];if(J){let V=(z+L)%t*2,P=c[V];if(P==null||P!=J&&c[V+1]==1)c[V]=J,c[V+1]=1;else if(P==J)c[V+1]++}}}i+=E,m+=w.nodeSize}let y=(h+1)*t,v=0;while(i<y)if(a[i++]==0)v++;if(v)(l||(l=[])).push({type:"missing",row:h,n:v});m++}if(t===0||n===0)(l||(l=[])).push({type:"zero_sized"});let u=new dl(t,n,a,l),f=!1;for(let h=0;!f&&h<c.length;h+=2)if(c[h]!=null&&c[h+1]<n)f=!0;if(f)xae(u,c,e);return u}function vae(e){let t=-1,n=!1;for(let a=0;a<e.childCount;a++){let i=e.child(a),l=0;if(n)for(let c=0;c<a;c++){let u=e.child(c);for(let f=0;f<u.childCount;f++){let h=u.child(f);if(c+h.attrs.rowspan>a)l+=h.attrs.colspan}}for(let c=0;c<i.childCount;c++){let u=i.child(c);if(l+=u.attrs.colspan,u.attrs.rowspan>1)n=!0}if(t==-1)t=l;else if(t!=l)t=Math.max(t,l)}return t}function xae(e,t,n){if(!e.problems)e.problems=[];let a={};for(let i=0;i<e.map.length;i++){let l=e.map[i];if(a[l])continue;a[l]=!0;let c=n.nodeAt(l);if(!c)throw RangeError(`No cell with offset ${l} found`);let u=null,f=c.attrs;for(let h=0;h<f.colspan;h++){let m=t[(i+h)%e.width*2];if(m!=null&&(!f.colwidth||f.colwidth[h]!=m))(u||(u=$ae(f)))[h]=m}if(u)e.problems.unshift({type:"colwidth mismatch",pos:l,colwidth:u})}}function $ae(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Xk(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let a=e.nodes[n],i=a.spec.tableRole;if(i)t[i]=a}}return t}function Sae(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function DU(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Cae(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;else if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=Sae(t.$head)||wae(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function wae(e){for(let{nodeAfter:t,pos:n}=e;t;t=t.firstChild,n++){let a=t.type.spec.tableRole;if(a=="cell"||a=="header_cell")return e.doc.resolve(n)}for(let{nodeBefore:t,pos:n}=e;t;t=t.lastChild,n--){let a=t.type.spec.tableRole;if(a=="cell"||a=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function MU(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function PU(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function LU(e,t,n){let a=e.node(-1),i=dl.get(a),l=e.start(-1),c=i.nextCell(e.pos-l,t,n);return c==null?null:e.node(0).resolve(l+c)}function NU(e,t,n=1){let a={...e,colspan:e.colspan-n};if(a.colwidth){if(a.colwidth=a.colwidth.slice(),a.colwidth.splice(t,n),!a.colwidth.some((i)=>i>0))a.colwidth=null}return a}function _U(e){let t=e.selection,n=Cae(e),a=n.node(-1),i=n.start(-1),l=dl.get(a);return{...t instanceof ui?l.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):l.findCell(n.pos-i),tableStart:i,map:l,table:a}}function Tae(e){return function(t,n){if(!DU(t))return!1;if(n){let a=Xk(t.schema),i=_U(t),l=t.tr,c=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),u=c.map((f)=>i.table.nodeAt(f));for(let f=0;f<c.length;f++)if(u[f].type==a.header_cell)l.setNodeMarkup(i.tableStart+c[f],a.cell,u[f].attrs);if(l.steps.length===0)for(let f=0;f<c.length;f++)l.setNodeMarkup(i.tableStart+c[f],a.header_cell,u[f].attrs);n(l)}return!0}}function OU(e,t,n){let a=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let i=0;i<a.length;i++){let l=t.table.nodeAt(a[i]);if(l&&l.type!==n.header_cell)return!1}return!0}function Qk(e,t){if(t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic)return Tae(e);return function(n,a){if(!DU(n))return!1;if(a){let i=Xk(n.schema),l=_U(n),c=n.tr,u=OU("row",l,i),f=OU("column",l,i),h=(e==="column"?u:e==="row"?f:!1)?1:0,m=e=="column"?{left:0,top:h,right:1,bottom:l.map.height}:e=="row"?{left:h,top:0,right:l.map.width,bottom:1}:l,b=e=="column"?f?i.cell:i.header_cell:e=="row"?u?i.cell:i.header_cell:i.cell;l.map.cellsInRect(m).forEach((y)=>{let v=y+l.tableStart,S=c.doc.nodeAt(v);if(S)c.setNodeMarkup(v,b,S.attrs)}),a(c)}return!0}}function f$(e,t){let n=e.selection;if(!(n instanceof ui))return!1;if(t){let a=e.tr,i=Xk(e.schema).cell.createAndFill().content;if(n.forEachCell((l,c)=>{if(!l.content.eq(i))a.replace(a.mapping.map(c+1),a.mapping.map(c+l.nodeSize-1),new Se(i,0,0))}),a.docChanged)t(a)}return!0}function m$(e,t,n){if(n.eq(e.selection))return!1;if(t)t(e.tr.setSelection(n).scrollIntoView());return!0}function p$(e,t){return(n,a,i)=>{if(!i)return!1;let l=n.selection;if(l instanceof ui)return m$(n,a,Fe.near(l.$headCell,t));if(e!="horiz"&&!l.empty)return!1;let c=IU(i,e,t);if(c==null)return!1;if(e=="horiz")return m$(n,a,Fe.near(n.doc.resolve(l.head+t),t));else{let u=n.doc.resolve(c),f=LU(u,e,t),h;if(f)h=Fe.near(f,1);else if(t<0)h=Fe.near(n.doc.resolve(u.before(-1)),-1);else h=Fe.near(n.doc.resolve(u.after(-1)),1);return m$(n,a,h)}}}function h$(e,t){return(n,a,i)=>{if(!i)return!1;let l=n.selection,c;if(l instanceof ui)c=l;else{let f=IU(i,e,t);if(f==null)return!1;c=new ui(n.doc.resolve(f))}let u=LU(c.$headCell,e,t);if(!u)return!1;return m$(n,a,new ui(c.$anchorCell,u))}}function IU(e,t,n){if(!(e.state.selection instanceof Me))return null;let{$head:a}=e.state.selection;for(let i=a.depth-1;i>=0;i--){let l=a.node(i);if((n<0?a.index(i):a.indexAfter(i))!=(n<0?0:l.childCount))return null;if(l.type.spec.tableRole=="cell"||l.type.spec.tableRole=="header_cell"){let c=a.before(i),u=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(u)?c:null}}return null}var Yk,Jk,dl=class{constructor(e,t,n,a){this.width=e,this.height=t,this.map=n,this.problems=a}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let a=t%this.width,i=t/this.width|0,l=a+1,c=i+1;for(let u=1;l<this.width&&this.map[t+u]==n;u++)l++;for(let u=1;c<this.height&&this.map[t+this.width*u]==n;u++)c++;return{left:a,top:i,right:l,bottom:c}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:a,right:i,top:l,bottom:c}=this.findCell(e);if(t=="horiz"){if(n<0?a==0:i==this.width)return null;return this.map[l*this.width+(n<0?a-1:i)]}else{if(n<0?l==0:c==this.height)return null;return this.map[a+this.width*(n<0?l-1:c)]}}rectBetween(e,t){let{left:n,right:a,top:i,bottom:l}=this.findCell(e),{left:c,right:u,top:f,bottom:h}=this.findCell(t);return{left:Math.min(n,c),top:Math.min(i,f),right:Math.max(a,u),bottom:Math.max(l,h)}}cellsInRect(e){let t=[],n={};for(let a=e.top;a<e.bottom;a++)for(let i=e.left;i<e.right;i++){let l=a*this.width+i,c=this.map[l];if(n[c])continue;if(n[c]=!0,i==e.left&&i&&this.map[l-1]==c||a==e.top&&a&&this.map[l-this.width]==c)continue;t.push(c)}return t}positionAt(e,t,n){for(let a=0,i=0;;a++){let l=i+n.child(a).nodeSize;if(a==e){let c=t+e*this.width,u=(e+1)*this.width;while(c<u&&this.map[c]<i)c++;return c==u?l-1:this.map[c]}i=l}}static get(e){return Yk(e)||Jk(e,yae(e))}},qAe,ui,Eae=class e{constructor(t,n){this.anchor=t,this.head=n}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(t){let n=t.resolve(this.anchor),a=t.resolve(this.head);if(n.parent.type.spec.tableRole=="row"&&a.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&a.index()<a.parent.childCount&&PU(n,a))return new ui(n,a);else return Fe.near(a,1)}},GAe,WAe,YAe,JAe,XAe,QAe;var BU=N(()=>{Qs();Js();C1();if(typeof WeakMap<"u"){let e=new WeakMap;Yk=(t)=>e.get(t),Jk=(t,n)=>(e.set(t,n),n)}else{let e=[],t=10,n=0;Yk=(a)=>{for(let i=0;i<e.length;i+=2)if(e[i]==a)return e[i+1]},Jk=(a,i)=>{if(n==10)n=0;return e[n++]=a,e[n++]=i}}qAe=new Ze("selectingCells");ui=class e extends Fe{constructor(t,n=t){let a=t.node(-1),i=dl.get(a),l=t.start(-1),c=i.rectBetween(t.pos-l,n.pos-l),u=t.node(0),f=i.cellsInRect(c).filter((m)=>m!=n.pos-l);f.unshift(n.pos-l);let h=f.map((m)=>{let b=a.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);let y=l+m+1;return new Zg(u.resolve(y),u.resolve(y+b.content.size))});super(h[0].$from,h[0].$to,h);this.$anchorCell=t,this.$headCell=n}map(t,n){let a=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(MU(a)&&MU(i)&&PU(a,i)){let l=this.$anchorCell.node(-1)!=a.node(-1);if(l&&this.isRowSelection())return e.rowSelection(a,i);else if(l&&this.isColSelection())return e.colSelection(a,i);else return new e(a,i)}return Me.between(a,i)}content(){let t=this.$anchorCell.node(-1),n=dl.get(t),a=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-a,this.$headCell.pos-a),l={},c=[];for(let f=i.top;f<i.bottom;f++){let h=[];for(let m=f*n.width+i.left,b=i.left;b<i.right;b++,m++){let y=n.map[m];if(l[y])continue;l[y]=!0;let v=n.findCell(y),S=t.nodeAt(y);if(!S)throw RangeError(`No cell with offset ${y} found`);let w=i.left-v.left,E=v.right-i.right;if(w>0||E>0){let T=S.attrs;if(w>0)T=NU(T,0,w);if(E>0)T=NU(T,T.colspan-E,E);if(v.left<i.left){if(S=S.type.createAndFill(T),!S)throw RangeError(`Could not create cell with attrs ${JSON.stringify(T)}`)}else S=S.type.create(T,S.content)}if(v.top<i.top||v.bottom>i.bottom){let T={...S.attrs,rowspan:Math.min(v.bottom,i.bottom)-Math.max(v.top,i.top)};if(v.top<i.top)S=S.type.createAndFill(T);else S=S.type.create(T,S.content)}h.push(S)}c.push(t.child(f).copy(le.from(h)))}let u=this.isColSelection()&&this.isRowSelection()?t:c;return new Se(le.from(u),1,1)}replace(t,n=Se.empty){let a=t.steps.length,i=this.ranges;for(let c=0;c<i.length;c++){let{$from:u,$to:f}=i[c],h=t.mapping.slice(a);t.replace(h.map(u.pos),h.map(f.pos),c?Se.empty:n)}let l=Fe.findFrom(t.doc.resolve(t.mapping.slice(a).map(this.to)),-1);if(l)t.setSelection(l)}replaceWith(t,n){this.replace(t,new Se(le.from(n),0,0))}forEachCell(t){let n=this.$anchorCell.node(-1),a=dl.get(n),i=this.$anchorCell.start(-1),l=a.cellsInRect(a.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let c=0;c<l.length;c++)t(n.nodeAt(l[c]),i+l[c])}isColSelection(){let t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;let a=t+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(a,i)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let a=t.node(-1),i=dl.get(a),l=t.start(-1),c=i.findCell(t.pos-l),u=i.findCell(n.pos-l),f=t.node(0);if(c.top<=u.top){if(c.top>0)t=f.resolve(l+i.map[c.left]);if(u.bottom<i.height)n=f.resolve(l+i.map[i.width*(i.height-1)+u.right-1])}else{if(u.top>0)n=f.resolve(l+i.map[u.left]);if(c.bottom<i.height)t=f.resolve(l+i.map[i.width*(i.height-1)+c.right-1])}return new e(t,n)}isRowSelection(){let t=this.$anchorCell.node(-1),n=dl.get(t),a=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-a),l=n.colCount(this.$headCell.pos-a);if(Math.min(i,l)>0)return!1;let c=i+this.$anchorCell.nodeAfter.attrs.colspan,u=l+this.$headCell.nodeAfter.attrs.colspan;return Math.max(c,u)==n.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let a=t.node(-1),i=dl.get(a),l=t.start(-1),c=i.findCell(t.pos-l),u=i.findCell(n.pos-l),f=t.node(0);if(c.left<=u.left){if(c.left>0)t=f.resolve(l+i.map[c.top*i.width]);if(u.right<i.width)n=f.resolve(l+i.map[i.width*(u.top+1)-1])}else{if(u.left>0)n=f.resolve(l+i.map[u.top*i.width]);if(c.right<i.width)t=f.resolve(l+i.map[i.width*(c.top+1)-1])}return new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,a=n){return new e(t.resolve(n),t.resolve(a))}getBookmark(){return new Eae(this.$anchorCell.pos,this.$headCell.pos)}};ui.prototype.visible=!1;Fe.jsonID("cell",ui);GAe=new Ze("fix-tables");WAe=Qk("row",{useDeprecatedLogic:!0}),YAe=Qk("column",{useDeprecatedLogic:!0}),JAe=Qk("cell",{useDeprecatedLogic:!0});XAe=db({ArrowLeft:p$("horiz",-1),ArrowRight:p$("horiz",1),ArrowUp:p$("vert",-1),ArrowDown:p$("vert",1),"Shift-ArrowLeft":h$("horiz",-1),"Shift-ArrowRight":h$("horiz",1),"Shift-ArrowUp":h$("vert",-1),"Shift-ArrowDown":h$("vert",1),Backspace:f$,"Mod-Backspace":f$,Delete:f$,"Mod-Delete":f$});QAe=new Ze("tableColumnResizing")});var zU=N(()=>{BU()});function Rae(e,t){let n=Math.min(e.top,t.top),a=Math.max(e.bottom,t.bottom),i=Math.min(e.left,t.left),c=Math.max(e.right,t.right)-i,u=a-n;return new DOMRect(i,n,c,u)}var kae=class{constructor({editor:e,element:t,view:n,pluginKey:a="bubbleMenu",updateDelay:i=250,resizeDelay:l=60,shouldShow:c,appendTo:u,getReferencedVirtualElement:f,options:h}){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:b,state:y,from:v,to:S})=>{let{doc:w,selection:E}=y,{empty:T}=E,D=!w.textBetween(v,S).length&&O1(y.selection),H=this.element.contains(document.activeElement);if(!(b.hasFocus()||H)||T||D||!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:b})=>{var y;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}if((b==null?void 0:b.relatedTarget)&&((y=this.element.parentNode)==null?void 0:y.contains(b.relatedTarget)))return;if((b==null?void 0:b.relatedTarget)===this.editor.view.dom)return;this.hide()},this.handleDebouncedUpdate=(b,y)=>{let v=!(y==null?void 0:y.selection.eq(b.state.selection)),S=!(y==null?void 0:y.doc.eq(b.state.doc));if(!v&&!S)return;if(this.updateDebounceTimer)clearTimeout(this.updateDebounceTimer);this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(b,v,S,y)},this.updateDelay)},this.updateHandler=(b,y,v,S)=>{let{composing:w}=b;if(w||!y&&!v)return;if(!this.getShouldShow(S)){this.hide();return}this.show(),this.updatePosition()},this.transactionHandler=({transaction:b})=>{let y=b.getMeta(this.pluginKey);if(y==="updatePosition")this.updatePosition();else if(y&&typeof y==="object"&&y.type==="updateOptions")this.updateOptions(y.options);else if(y==="hide")this.hide();else if(y==="show")this.updatePosition(),this.show()};var m;if(this.editor=e,this.element=t,this.view=n,this.pluginKey=a,this.updateDelay=i,this.resizeDelay=l,this.appendTo=u,this.scrollTarget=(m=h==null?void 0:h.scrollTarget)!=null?m:window,this.getReferencedVirtualElement=f,this.floatingUIOptions={...this.floatingUIOptions,...h},this.element.tabIndex=0,c)this.shouldShow=c;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(n,n.state),this.getShouldShow())this.show(),this.updatePosition()}get middlewares(){let e=[];if(this.floatingUIOptions.flip)e.push(i$(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)e.push(a$(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)e.push(r$(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)e.push(c$(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)e.push(s$(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)e.push(o$(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)e.push(l$(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)e.push(u$(typeof this.floatingUIOptions.inline!=="boolean"?this.floatingUIOptions.inline:void 0));return e}get virtualElement(){var e,t,n;let{selection:a}=this.editor.state,i=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(i)return i;if(!((n=(t=this.view)==null?void 0:t.dom)==null?void 0:n.parentNode))return;let l=z1(this.view,a.from,a.to),c={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(a instanceof Pe){let u=this.view.nodeDOM(a.from),f=u.dataset.nodeViewWrapper?u:u.querySelector("[data-node-view-wrapper]");if(f)u=f;if(u)c={getBoundingClientRect:()=>u.getBoundingClientRect(),getClientRects:()=>[u.getBoundingClientRect()]}}if(a instanceof ui){let{$anchorCell:u,$headCell:f}=a,h=u?u.pos:f.pos,m=f?f.pos:u.pos,b=this.view.nodeDOM(h),y=this.view.nodeDOM(m);if(!b||!y)return;let v=b===y?b.getBoundingClientRect():Rae(b.getBoundingClientRect(),y.getBoundingClientRect());c={getBoundingClientRect:()=>v,getClientRects:()=>[v]}}return c}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;if(!e)return;d$(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:a,middlewareData:i})=>{var l,c;if(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)return;if(((l=i.hide)==null?void 0:l.referenceHidden)||((c=i.hide)==null?void 0:c.escaped)){this.element.style.visibility="hidden";return}if(this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=a,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate)this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,a=n.selection.from!==n.selection.to;if(this.updateDelay>0&&a){this.handleDebouncedUpdate(e,t);return}let i=!(t==null?void 0:t.selection.eq(e.state.selection)),l=!(t==null?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,i,l,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:a}=n,{ranges:i}=a,l=Math.min(...i.map((f)=>f.$from.pos)),c=Math.max(...i.map((f)=>f.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:l,to:c}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo==="function"?this.appendTo():this.appendTo;if((e=t!=null?t:this.view.dom.parentElement)==null||e.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(e){var t;if(e.updateDelay!==void 0)this.updateDelay=e.updateDelay;if(e.resizeDelay!==void 0)this.resizeDelay=e.resizeDelay;if(e.appendTo!==void 0)this.appendTo=e.appendTo;if(e.getReferencedVirtualElement!==void 0)this.getReferencedVirtualElement=e.getReferencedVirtualElement;if(e.shouldShow!==void 0){if(e.shouldShow)this.shouldShow=e.shouldShow}if(e.options!==void 0){let n=(t=e.options.scrollTarget)!=null?t:window;if(n!==this.scrollTarget)this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler);this.floatingUIOptions={...this.floatingUIOptions,...e.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()}},Zk=(e)=>new qe({key:typeof e.pluginKey==="string"?new Ze(e.pluginKey):e.pluginKey,view:(t)=>new kae({view:t,...e})}),l5e;var HU=N(()=>{Ye();Wk();Ye();at();zU();l5e=Ct.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){if(!this.options.element)return[];return[Zk({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 Aae=class{constructor({editor:e,element:t,view:n,pluginKey:a="floatingMenu",updateDelay:i=250,resizeDelay:l=60,options:c,appendTo:u,shouldShow:f}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:m,state:b})=>{let{selection:y}=b,{$anchor:v,empty:S}=y,w=v.depth===1,E=v.parent.isTextblock&&!v.parent.type.spec.code&&!v.parent.textContent&&v.parent.childCount===0&&!this.getTextContent(v.parent);if(!m.hasFocus()||!S||!w||!E||!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,b,y,v)=>{let{composing:S}=m;if(S||!b&&!y)return;if(!this.getShouldShow(v)){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 b;if(this.preventHide){this.preventHide=!1;return}if((m==null?void 0:m.relatedTarget)&&((b=this.element.parentNode)==null?void 0:b.contains(m.relatedTarget)))return;if((m==null?void 0:m.relatedTarget)===this.editor.view.dom)return;this.hide()},this.transactionHandler=({transaction:m})=>{let b=m.getMeta(this.pluginKey);if(b==="updatePosition")this.updatePosition();else if(b&&typeof b==="object"&&b.type==="updateOptions")this.updateOptions(b.options);else if(b==="hide")this.hide();else if(b==="show")this.updatePosition(),this.show()},this.resizeHandler=()=>{if(this.resizeDebounceTimer)clearTimeout(this.resizeDebounceTimer);this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)};var h;if(this.editor=e,this.element=t,this.view=n,this.pluginKey=a,this.updateDelay=i,this.resizeDelay=l,this.appendTo=u,this.scrollTarget=(h=c==null?void 0:c.scrollTarget)!=null?h:window,this.floatingUIOptions={...this.floatingUIOptions,...c},this.element.tabIndex=0,f)this.shouldShow=f;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(n,n.state),this.getShouldShow())this.show(),this.updatePosition()}getTextContent(e){return Ak(e,{textSerializers:_1(this.editor.schema)})}get middlewares(){let e=[];if(this.floatingUIOptions.flip)e.push(i$(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)e.push(a$(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)e.push(r$(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)e.push(c$(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)e.push(s$(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)e.push(o$(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)e.push(l$(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)e.push(u$(typeof this.floatingUIOptions.inline!=="boolean"?this.floatingUIOptions.inline:void 0));return e}getShouldShow(e){var t;let{state:n}=this.view,{selection:a}=n,{ranges:i}=a,l=Math.min(...i.map((f)=>f.$from.pos)),c=Math.max(...i.map((f)=>f.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:l,to:c})}updateOptions(e){var t;if(e.updateDelay!==void 0)this.updateDelay=e.updateDelay;if(e.resizeDelay!==void 0)this.resizeDelay=e.resizeDelay;if(e.appendTo!==void 0)this.appendTo=e.appendTo;if(e.shouldShow!==void 0){if(e.shouldShow)this.shouldShow=e.shouldShow}if(e.options!==void 0){let n=(t=e.options.scrollTarget)!=null?t:window;if(n!==this.scrollTarget)this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler);this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){var e,t;if(!((t=(e=this.view)==null?void 0:e.dom)==null?void 0:t.parentNode))return;let{selection:n}=this.editor.state,a=z1(this.view,n.from,n.to);d$({getBoundingClientRect:()=>a,getClientRects:()=>[a]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:l,y:c,strategy:u,middlewareData:f})=>{var h,m;if(((h=f.hide)==null?void 0:h.referenceHidden)||((m=f.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=u,this.element.style.left=`${l}px`,this.element.style.top=`${c}px`,this.isVisible&&this.floatingUIOptions.onUpdate)this.floatingUIOptions.onUpdate()})}update(e,t){let n=!(t==null?void 0:t.selection.eq(e.state.selection)),a=!(t==null?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,n,a,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo==="function"?this.appendTo():this.appendTo;if((e=t!=null?t:this.view.dom.parentElement)==null||e.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()}},e4=(e)=>new qe({key:typeof e.pluginKey==="string"?new Ze(e.pluginKey):e.pluginKey,view:(t)=>new Aae({view:t,...e})}),m5e;var FU=N(()=>{Ye();Wk();Ye();at();m5e=Ct.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:e,dispatch:t})=>{if(t)e.setMeta(this.options.pluginKey,"updatePosition");return!0}}},addProseMirrorPlugins(){if(!this.options.element)return[];return[e4({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 jU(e,t){return e!=null?e:new Ze(t)}function n4(e,t){return/^on[A-Z]/.test(e)&&typeof t==="function"}function _ae(e){if(e.startsWith("aria-")||e.startsWith("data-"))return e;return e}function Iae(e){return e.startsWith("aria-")||e.startsWith("data-")||Pae.has(e)}function qU(e){if(e.startsWith("--"))return e;return e.replace(/[A-Z]/g,(t)=>`-${t.toLowerCase()}`)}function Bae(e){var t;let n=e.endsWith("Capture"),i=(n?e.slice(0,-7):e).slice(2);return{eventName:(t=Lae[i])!=null?t:i.toLowerCase(),options:n?{capture:!0}:void 0}}function zae(e,t){let n=t.defaultPrevented,a=!1,i=Object.create(t);return Object.defineProperties(i,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>{return}},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>a},preventDefault:{value:()=>{n=!0,t.preventDefault()}},stopPropagation:{value:()=>{a=!0,t.stopPropagation()}}}),i}function t4(e){return Dae.has(e)}function UU(e,t,n){if(t==="tabIndex"){e.tabIndex=Number(n);return}e[t]=n}function Hae(e,t){if(t==="tabIndex"){e.removeAttribute("tabindex");return}let n=e[t];if(typeof n==="boolean"){e[t]=!1;return}if(typeof n==="number"){e[t]=0;return}e[t]=""}function Fae(e,t){if(typeof t!=="number"||t===0||e.startsWith("--")||Nae.has(e))return String(t);return`${t}px`}function Uae(e,t){if(KU.has(t))return;e.style.removeProperty(qU(t))}function Vae(e,t,n){if(KU.has(t))return;e.style.setProperty(qU(t),Fae(t,n))}function jae(e,t,n){new Set([...Object.keys(t),...Object.keys(n)]).forEach((i)=>{if(Oae.has(i)||!Iae(i)||n4(i,t[i])||n4(i,n[i]))return;let l=t[i],c=n[i];if(l===c)return;let u=_ae(i);if(c==null||c===!1){if(t4(i))Hae(e,i);e.removeAttribute(u);return}if(c===!0){if(t4(i))UU(e,i,!0);e.setAttribute(u,"");return}if(t4(i)){UU(e,i,c);return}e.setAttribute(u,String(c))})}function Kae(e,t,n){if(t===n)return;if(n){e.className=n;return}e.removeAttribute("class")}function qae(e,t,n){let a=t!=null?t:{},i=n!=null?n:{};new Set([...Object.keys(a),...Object.keys(i)]).forEach((c)=>{let u=a[c],f=i[c];if(u===f)return;if(f==null){Uae(e,c);return}Vae(e,c,f)})}function Gae(e,t,n){t.forEach(({eventName:i,listener:l,options:c})=>{e.removeEventListener(i,l,c)});let a=[];return Object.entries(n).forEach(([i,l])=>{if(!n4(i,l))return;let{eventName:c,options:u}=Bae(i),f=(h)=>{l(zae(e,h))};e.addEventListener(c,f,u),a.push({eventName:c,listener:f,options:u})}),a}function GU(e,t){let n=Id.useRef({}),a=Id.useRef([]);Mae(()=>{let i=n.current;return Kae(e,i.className,t.className),qae(e,i.style,t.style),jae(e,i,t),a.current=Gae(e,a.current,t),n.current=t,()=>{a.current.forEach(({eventName:l,listener:c,options:u})=>{e.removeEventListener(l,c,u)}),a.current=[]}},[e,t])}var Na,VU,Id,Oa,YU,Mae,KU,Nae,Oae,Dae,Pae,Lae,WU,C5e;var JU=N(()=>{HU();q1();at();FU();q1();Na=K(ae(),1),VU=K(jr(),1),Id=K(ae(),1),Oa=K(ae(),1),YU=K(jr(),1);Mae=typeof window<"u"?Id.useLayoutEffect:Id.useEffect,KU=new Set(["left","opacity","position","top","visibility","width"]),Nae=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"]),Oae=new Set(["children","className","style"]),Dae=new Set(["tabIndex"]),Pae=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),Lae={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};WU=Na.default.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:a,appendTo:i,shouldShow:l=null,getReferencedVirtualElement:c,options:u,children:f,...h},m)=>{let b=Na.useRef(document.createElement("div")),y=Na.useRef(jU(e,"bubbleMenu")).current;if(GU(b.current,h),typeof m==="function")m(b.current);else if(m)m.current=b.current;let{editor:v}=K1(),S=t||v,w={updateDelay:n,resizeDelay:a,appendTo:i,pluginKey:y,shouldShow:l,getReferencedVirtualElement:c,options:u},E=Na.useRef(w);E.current=w;let[T,D]=Na.useState(!1),H=Na.useRef(!0);return Na.useEffect(()=>{if(S==null?void 0:S.isDestroyed)return;if(!S){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}let z=b.current;z.style.visibility="hidden",z.style.position="absolute";let L=Zk({...E.current,editor:S,element:z});S.registerPlugin(L);let J=E.current.pluginKey;return H.current=!0,D(!0),()=>{D(!1),S.unregisterPlugin(J),window.requestAnimationFrame(()=>{if(z.parentNode)z.parentNode.removeChild(z)})}},[S]),Na.useEffect(()=>{if(!T||!S||S.isDestroyed)return;if(H.current){H.current=!1;return}S.view.dispatch(S.state.tr.setMeta(y,{type:"updateOptions",options:E.current}))},[T,S,n,a,l,u,i,c,y]),VU.createPortal(f,b.current)}),C5e=Oa.default.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:a,appendTo:i,shouldShow:l=null,options:c,children:u,...f},h)=>{let m=Oa.useRef(document.createElement("div")),b=Oa.useRef(jU(e,"floatingMenu")).current;if(GU(m.current,f),typeof h==="function")h(m.current);else if(h)h.current=m.current;let{editor:y}=K1(),v=t||y,S={updateDelay:n,resizeDelay:a,appendTo:i,pluginKey:b,shouldShow:l,options:c},w=Oa.useRef(S);w.current=S;let[E,T]=Oa.useState(!1),D=Oa.useRef(!0);return Oa.useEffect(()=>{if(v==null?void 0:v.isDestroyed)return;if(!v){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}let H=m.current;H.style.visibility="hidden",H.style.position="absolute";let z=e4({...w.current,editor:v,element:H});v.registerPlugin(z);let L=w.current.pluginKey;return D.current=!0,T(!0),()=>{T(!1),v.unregisterPlugin(L),window.requestAnimationFrame(()=>{if(H.parentNode)H.parentNode.removeChild(H)})}},[v]),Oa.useEffect(()=>{if(!E||!v||v.isDestroyed)return;if(D.current){D.current=!1;return}v.view.dispatch(v.state.tr.setMeta(b,{type:"updateOptions",options:w.current}))},[E,v,n,a,l,c,i,b]),YU.createPortal(u,m.current)})});var lh=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...a}=t!=null?t:{};if(e==="svg")throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,a,n]};var XU=()=>{};var r4=N(()=>{XU()});var Wae=(e,t)=>{var n;let{state:a,view:i}=e,{selection:l}=a;if(!l.empty)return!1;let{$from:c}=l;if(c.parentOffset!==0)return!1;let u=c.depth-1;if(u<0)return!1;let f=c.node(u),h=c.index(u);if(h===0)return!1;if(f.type===t)return e.commands.lift(t.name);let m=f.child(h-1);if(m.type!==t||!((n=m.lastChild)==null?void 0:n.isTextblock))return!1;let b=c.before(),v=b-1-1,{tr:S}=a;return S.delete(b,c.after()).insert(v,c.parent.content),S.setSelection(Me.create(S.doc,v)),i.dispatch(S.scrollIntoView()),!0},Yae,QU;var ZU=N(()=>{Ye();at();r4();Yae=/^\s*>\s$/,QU=en.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return lh("blockquote",{...St(this.options.HTMLAttributes,e),children:lh("slot",{})})},parseMarkdown:(e,t)=>{var n;let a=(n=t.parseBlockChildren)!=null?n:t.parseChildren;return t.createNode("blockquote",void 0,a(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",a=[];return e.content.forEach((i,l)=>{var c,u;let m=((u=(c=t.renderChild)==null?void 0:c.call(t,i,l))!=null?u:t.renderChildren([i])).split(`
|
|
355
|
+
`).map((b)=>{if(b.trim()==="")return n;return`${n} ${b}`});a.push(m.join(`
|
|
356
|
+
`))}),a.join(`
|
|
357
|
+
${n}
|
|
358
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>Wae(this.editor,this.type)}},addInputRules(){return[rs({find:Yae,type:this.type})]}})});var Jae,Xae,Qae,Zae,eV;var tV=N(()=>{Ye();r4();Jae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Xae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Qae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Zae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,eV=Qr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:(e)=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:(e)=>e.type.name===this.name},{style:"font-weight",getAttrs:(e)=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return lh("strong",{...St(this.options.HTMLAttributes,e),children:lh("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[bo({find:Jae,type:this.type}),bo({find:Qae,type:this.type})]},addPasteRules(){return[Pr({find:Xae,type:this.type}),Pr({find:Zae,type:this.type})]}})});var eie=(e)=>{let t=/`([^`]+)`(?!`)$/.exec(e);if(!t)return null;if(t.index>0&&e[t.index-1]==="`")return null;return{index:t.index,text:t[0],replaceWith:t[1]}},tie=(e)=>{let t=/`([^`]+)`(?!`)/g,n=[],a;while((a=t.exec(e))!==null){if(a.index>0&&e[a.index-1]==="`")continue;n.push({index:a.index,text:a[0],replaceWith:a[1]})}return n},nV;var rV=N(()=>{Ye();nV=Qr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",St(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>{if(!e.content)return"";return`\`${t.renderChildren(e.content)}\``},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[bo({find:eie,type:this.type})]},addPasteRules(){return[Pr({find:tie,type:this.type})]}})});var o4=4,nie,rie,oV;var aV=N(()=>{Ye();at();nie=/^```([a-z]+)?[\s\n]$/,rie=/^~~~([a-z]+)?[\s\n]$/,oV=en.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:o4,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:(e)=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let l=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter((c)=>c.startsWith(n)).map((c)=>c.replace(n,""))[0];if(!l)return null;return l},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",St(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,a;if(((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&((a=e.raw)==null?void 0:a.startsWith("~~~"))===!1&&e.codeBlockStyle!=="indented")return[];return t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let a="",i=((n=e.attrs)==null?void 0:n.language)||"";if(!e.content)a=`\`\`\`${i}
|
|
359
|
+
|
|
360
|
+
\`\`\``;else a=[`\`\`\`${i}`,t.renderChildren(e.content),"```"].join(`
|
|
361
|
+
`);return a},addCommands(){return{setCodeBlock:(e)=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:(e)=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;if(!e||t.parent.type.name!==this.name)return!1;if(n||!t.parent.textContent.length)return this.editor.commands.clearNodes();return!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:o4,{state:a}=e,{selection:i}=a,{$from:l,empty:c}=i;if(l.parent.type!==this.type)return!1;let u=" ".repeat(n);if(c)return e.commands.insertContent(u);return e.commands.command(({tr:f})=>{let{from:h,to:m}=i,v=a.doc.textBetween(h,m,`
|
|
362
|
+
`,`
|
|
363
|
+
`).split(`
|
|
364
|
+
`).map((S)=>u+S).join(`
|
|
365
|
+
`);return f.replaceWith(h,m,a.schema.text(v)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:o4,{state:a}=e,{selection:i}=a,{$from:l,empty:c}=i;if(l.parent.type!==this.type)return!1;if(c)return e.commands.command(({tr:u})=>{var f;let{pos:h}=l,m=l.start(),b=l.end(),v=a.doc.textBetween(m,b,`
|
|
366
|
+
`,`
|
|
367
|
+
`).split(`
|
|
368
|
+
`),S=0,w=0,E=h-m;for(let J=0;J<v.length;J+=1){if(w+v[J].length>=E){S=J;break}w+=v[J].length+1}let D=((f=v[S].match(/^ */))==null?void 0:f[0])||"",H=Math.min(D.length,n);if(H===0)return!0;let z=m;for(let J=0;J<S;J+=1)z+=v[J].length+1;if(u.delete(z,z+H),h-z<=H)u.setSelection(Me.create(u.doc,z));return!0});return e.commands.command(({tr:u})=>{let{from:f,to:h}=i,y=a.doc.textBetween(f,h,`
|
|
369
|
+
`,`
|
|
370
|
+
`).split(`
|
|
371
|
+
`).map((v)=>{var S;let w=((S=v.match(/^ */))==null?void 0:S[0])||"",E=Math.min(w.length,n);return v.slice(E)}).join(`
|
|
372
|
+
`);return u.replaceWith(f,h,a.schema.text(y)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:a,empty:i}=n;if(!i||a.parent.type!==this.type)return!1;let l=a.parentOffset===a.parent.nodeSize-2,c=a.parent.textContent.endsWith(`
|
|
373
|
+
|
|
374
|
+
`);if(!l||!c)return!1;return e.chain().command(({tr:u})=>(u.delete(a.pos-2,a.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:a,empty:i}=n;if(!i||a.parent.type!==this.type)return!1;if(a.parentOffset!==0)return!1;let l=a.before();if(l>0)return!1;return e.commands.insertDefaultBlock({pos:l})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:a}=t,{$from:i,empty:l}=n;if(!l||i.parent.type!==this.type)return!1;if(i.parentOffset!==i.parent.nodeSize-2)return!1;let u=i.after();if(u===void 0)return!1;if(a.nodeAt(u))return e.commands.command(({tr:h})=>(h.setSelection(Fe.near(a.resolve(u))),!0));return e.commands.exitCode()}}},addInputRules(){return[bb({find:nie,type:this.type,getAttributes:(e)=>({language:e[1]})}),bb({find:rie,type:this.type,getAttributes:(e)=>({language:e[1]})})]},addProseMirrorPlugins(){return[new qe({key:new Ze("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),a=t.clipboardData.getData("vscode-editor-data"),i=a?JSON.parse(a):void 0,l=i==null?void 0:i.mode;if(!n||!l)return!1;let{tr:c,schema:u}=e.state,f=u.text(n.replace(/\r\n?/g,`
|
|
375
|
+
`));if(c.replaceSelectionWith(this.type.create({language:l},f)),c.selection.$from.parent.type!==this.type)c.setSelection(Me.near(c.doc.resolve(Math.max(0,c.selection.from-2))));return c.setMeta("paste",!0),e.dispatch(c),!0}}})]}})});var iV;var sV=N(()=>{Ye();iV=en.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
|
|
376
|
+
|
|
377
|
+
`)}})});var lV;var cV=N(()=>{Ye();lV=en.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",St(this.options.HTMLAttributes,e)]},renderText(){return`
|
|
378
|
+
`},renderMarkdown:()=>`
|
|
379
|
+
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:a})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:i,storedMarks:l}=n;if(i.$from.parent.type.spec.isolating)return!1;let{keepMarks:c}=this.options,{splittableMarks:u}=a.extensionManager,f=l||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:h,dispatch:m})=>{if(m&&f&&c){let b=f.filter((y)=>u.includes(y.type.name));h.ensureMarks(b)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})});var uV;var dV=N(()=>{Ye();uV=en.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((e)=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,St(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let a=((n=e.attrs)==null?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(a);if(!e.content)return"";return`${i} ${t.renderChildren(e.content)}`},addCommands(){return{setHeading:(e)=>({commands:t})=>{if(!this.options.levels.includes(e.level))return!1;return t.setNode(this.name,e)},toggleHeading:(e)=>({commands:t})=>{if(!this.options.levels.includes(e.level))return!1;return t.toggleNode(this.name,"paragraph",e)}}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map((e)=>bb({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}})});var fV;var pV=N(()=>{Ye();at();fV=en.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",St(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!pF(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:a}=n,i=e();if(B1(n))i.insertContentAt(a.pos,{type:this.name});else i.insertContent({type:this.name});return i.command(({state:l,tr:c,dispatch:u})=>{if(u){let{$to:f}=c.selection,h=f.end();if(f.nodeAfter)if(f.nodeAfter.isTextblock)c.setSelection(Me.create(c.doc,f.pos+1));else if(f.nodeAfter.isBlock)c.setSelection(Pe.create(c.doc,f.pos));else c.setSelection(Me.create(c.doc,f.pos));else{let m=l.schema.nodes[this.options.nextNodeType]||f.parent.type.contentMatch.defaultType,b=m==null?void 0:m.create();if(b)c.insert(h,b),c.setSelection(Me.create(c.doc,h+1))}c.scrollIntoView()}return!0}).run()}}},addInputRules(){return[kF({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}})});var oie,aie,iie,sie,hV;var mV=N(()=>{Ye();oie=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,aie=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,iie=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,sie=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,hV=Qr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:(e)=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:(e)=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",St(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[bo({find:oie,type:this.type}),bo({find:iie,type:this.type})]},addPasteRules(){return[Pr({find:aie,type:this.type}),Pr({find:sie,type:this.type})]}})});function lie(e,t){if(!(e in t))t[e]=[];return t[e]}function Bd(e,t,n){if(t.numeric)t.asciinumeric=!0,t.alphanumeric=!0;if(t.ascii)t.asciinumeric=!0,t.alpha=!0;if(t.asciinumeric)t.alphanumeric=!0;if(t.alpha)t.alphanumeric=!0;if(t.alphanumeric)t.domain=!0;if(t.emoji)t.domain=!0;for(let a in t){let i=lie(a,n);if(i.indexOf(e)<0)i.push(e)}}function cie(e,t){let n={};for(let a in t)if(t[a].indexOf(e)>=0)n[a]=!0;return n}function vo(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}function fie(e=[]){let t={};vo.groups=t;let n=new vo;if(g$==null)g$=yV("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2");if(b$==null)b$=yV("ελ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");ye(n,"'",L$),ye(n,"{",Ab),ye(n,"}",Mb),ye(n,"[",x$),ye(n,"]",$$),ye(n,"(",S$),ye(n,")",C$),ye(n,"<",w$),ye(n,">",E$),ye(n,"(",T$),ye(n,")",R$),ye(n,"「",k$),ye(n,"」",A$),ye(n,"『",M$),ye(n,"』",N$),ye(n,"<",O$),ye(n,">",D$),ye(n,"&",P$),ye(n,"*",_$),ye(n,"@",Wc),ye(n,"`",B$),ye(n,"^",z$),ye(n,":",zd),ye(n,",",g4),ye(n,"$",H$),ye(n,".",ss),ye(n,"=",F$),ye(n,"!",b4),ye(n,"-",Pa),ye(n,"%",Nb),ye(n,"|",U$),ye(n,"+",V$),ye(n,"#",j$),ye(n,"?",Ob),ye(n,'"',y4),ye(n,"/",ls),ye(n,";",v4),ye(n,"~",Db),ye(n,"_",K$),ye(n,"\\",I$),ye(n,"・",CV);let a=Tn(n,pl,h4,{["numeric"]:!0});Tn(a,pl,a);let i=Tn(a,fl,$V,{["asciinumeric"]:!0}),l=Tn(a,kb,SV,{["alphanumeric"]:!0}),c=Tn(n,fl,hl,{["ascii"]:!0});Tn(c,pl,i),Tn(c,fl,c),Tn(i,pl,i),Tn(i,fl,i);let u=Tn(n,kb,u4,{["alpha"]:!0});Tn(u,fl),Tn(u,pl,l),Tn(u,kb,u),Tn(l,pl,l),Tn(l,fl),Tn(l,kb,l);let f=ye(n,s4,m4,{["whitespace"]:!0}),h=ye(n,bV,p4,{["whitespace"]:!0}),m=Tn(n,i4,p4,{["whitespace"]:!0});ye(n,l4,m),ye(h,s4,f),ye(h,l4,m),Tn(h,i4,m),ye(m,bV),ye(m,s4),Tn(m,i4,m),ye(m,l4,m);let b=Tn(n,a4,wV,{["emoji"]:!0});ye(b,"#"),Tn(b,a4,b),ye(b,uie,b);let y=ye(b,die);ye(y,"#"),Tn(y,a4,b);let v=[[fl,c],[pl,i]],S=[[fl,null],[kb,u],[pl,l]];for(let w=0;w<g$.length;w++)Gc(n,g$[w],d4,hl,v);for(let w=0;w<b$.length;w++)Gc(n,b$[w],f4,u4,S);Bd(d4,{tld:!0,ascii:!0},t),Bd(f4,{utld:!0,alpha:!0},t),Gc(n,"file",v$,hl,v),Gc(n,"mailto",v$,hl,v),Gc(n,"http",ch,hl,v),Gc(n,"https",ch,hl,v),Gc(n,"ftp",ch,hl,v),Gc(n,"ftps",ch,hl,v),Bd(v$,{scheme:!0,ascii:!0},t),Bd(ch,{slashscheme:!0,ascii:!0},t),e=e.sort((w,E)=>w[0]>E[0]?1:-1);for(let w=0;w<e.length;w++){let E=e[w][0],D=e[w][1]?{["scheme"]:!0}:{["slashscheme"]:!0};if(E.indexOf("-")>=0)D.domain=!0;else if(!fl.test(E))D.numeric=!0;else if(pl.test(E))D.asciinumeric=!0;else D.ascii=!0;gV(n,E,E,D)}return gV(n,"localhost",Pb,{ascii:!0}),n.jd=new vo(q$),{start:n,tokens:Object.assign({groups:t},EV)}}function TV(e,t){let n=pie(t.replace(/[A-Z]/g,(u)=>u.toLowerCase())),a=n.length,i=[],l=0,c=0;while(c<a){let u=e,f=null,h=0,m=null,b=-1,y=-1;while(c<a&&(f=u.go(n[c]))){if(u=f,u.accepts())b=0,y=0,m=u;else if(b>=0)b+=n[c].length,y++;h+=n[c].length,l+=n[c].length,c++}l-=b,c-=y,h-=b,i.push({t:m.t,v:t.slice(l-h,l),s:l-h,e:l})}return i}function pie(e){let t=[],n=e.length,a=0;while(a<n){let i=e.charCodeAt(a),l,c=i<55296||i>56319||a+1===n||(l=e.charCodeAt(a+1))<56320||l>57343?e[a]:e.slice(a,a+2);t.push(c),a+=c.length}return t}function Gc(e,t,n,a,i){let l,c=t.length;for(let u=0;u<c-1;u++){let f=t[u];if(e.j[f])l=e.j[f];else l=new vo(a),l.jr=i.slice(),e.j[f]=l;e=l}return l=new vo(n),l.jr=i.slice(),e.j[t[c-1]]=l,l}function yV(e){let t=[],n=[],a=0,i="0123456789";while(a<e.length){let l=0;while(i.indexOf(e[a+l])>=0)l++;if(l>0){t.push(n.join(""));for(let c=parseInt(e.substring(a,a+l),10);c>0;c--)n.pop();a+=l}else n.push(e[a]),a++}return t}function x4(e,t=null){let n=Object.assign({},Lb);if(e)n=Object.assign(n,e instanceof x4?e.o:e);let a=n.ignoreTags,i=[];for(let l=0;l<a.length;l++)i.push(a[l].toUpperCase());if(this.o=n,t)this.defaultRender=t;this.ignoreTags=i}function vV(e){return e}function RV(e,t){this.t="token",this.v=e,this.tk=t}function G$(e,t){class n extends RV{constructor(a,i){super(a,i);this.t=e}}for(let a in t)n.prototype[a]=t[a];return n.t=e,n}function gie({groups:e}){let t=e.domain.concat([P$,_$,Wc,I$,B$,z$,H$,F$,Pa,h4,Nb,U$,V$,j$,ls,q$,Db,K$]),n=[L$,zd,g4,ss,b4,Nb,Ob,y4,v4,w$,E$,Ab,Mb,$$,x$,S$,C$,T$,R$,k$,A$,M$,N$,O$,D$],a=[P$,L$,_$,I$,B$,z$,H$,F$,Pa,Ab,Mb,Nb,U$,V$,j$,Ob,ls,q$,Db,K$],i=Da(),l=ye(i,Db);vt(l,a,l),vt(l,e.domain,l);let c=Da(),u=Da(),f=Da();vt(i,e.domain,c),vt(i,e.scheme,u),vt(i,e.slashscheme,f),vt(c,a,l),vt(c,e.domain,c);let h=ye(c,Wc);ye(l,Wc,h),ye(u,Wc,h),ye(f,Wc,h);let m=ye(l,ss);vt(m,a,l),vt(m,e.domain,l);let b=Da();vt(h,e.domain,b),vt(b,e.domain,b);let y=ye(b,ss);vt(y,e.domain,b);let v=Da(hie);vt(y,e.tld,v),vt(y,e.utld,v),ye(h,Pb,v);let S=ye(b,Pa);ye(S,Pa,S),vt(S,e.domain,b),vt(v,e.domain,b),ye(v,ss,y),ye(v,Pa,S);let w=ye(c,Pa),E=ye(c,ss);ye(w,Pa,w),vt(w,e.domain,c),vt(E,a,l),vt(E,e.domain,c);let T=Da(y$);vt(E,e.tld,T),vt(E,e.utld,T),vt(T,e.domain,c),vt(T,a,l),ye(T,ss,E),ye(T,Pa,w),ye(T,Wc,h);let D=ye(T,zd),H=Da(y$);vt(D,e.numeric,H);let z=Da(y$),L=Da();vt(z,t,z),vt(z,n,L),vt(L,t,z),vt(L,n,L),ye(T,ls,z),ye(H,ls,z);let J=ye(u,zd),V=ye(f,zd),P=ye(V,ls),te=ye(P,ls);vt(u,e.domain,c),ye(u,ss,E),ye(u,Pa,w),vt(f,e.domain,c),ye(f,ss,E),ye(f,Pa,w),vt(J,e.domain,z),ye(J,ls,z),ye(J,Ob,z),vt(te,e.domain,z),vt(te,t,z),ye(te,ls,z);let Y=[[Ab,Mb],[x$,$$],[S$,C$],[w$,E$],[T$,R$],[k$,A$],[M$,N$],[O$,D$]];for(let ge=0;ge<Y.length;ge++){let[ue,ie]=Y[ge],_=ye(z,ue);ye(L,ue,_);let U=Da(y$);vt(_,t,U);let W=Da();vt(_,n,W),ye(_,ie,z),vt(U,t,U),vt(U,n,W),vt(W,t,U),vt(W,n,W),ye(U,ie,z),ye(W,ie,z)}return ye(i,Pb,T),ye(i,m4,mie),{start:i,tokens:EV}}function bie(e,t,n){let a=n.length,i=0,l=[],c=[];while(i<a){let u=e,f=null,h=null,m=0,b=null,y=-1;while(i<a&&!(f=u.go(n[i].t)))c.push(n[i++]);while(i<a&&(h=f||u.go(n[i].t))){if(f=null,u=h,u.accepts())y=0,b=u;else if(y>=0)y++;i++,m++}if(y<0){if(i-=m,i<a)c.push(n[i]),i++}else{if(c.length>0)l.push(c4(xV,t,c)),c=[];i-=y,m-=y;let v=b.t,S=n.slice(i-m,i);l.push(c4(v,t,S))}}if(c.length>0)l.push(c4(xV,t,c));return l}function c4(e,t,n){let a=n[0].s,i=n[n.length-1].e,l=t.slice(a,i);return new e(l,n)}function kV(){return vo.groups={},ln.scanner=null,ln.parser=null,ln.tokenQueue=[],ln.pluginQueue=[],ln.customSchemes=[],ln.initialized=!1,ln}function $4(e,t=!1){if(ln.initialized)yie(`linkifyjs: already initialized - will not register custom scheme "${e}" ${vie}`);if(!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))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`);ln.customSchemes.push([e,t])}function xie(){ln.scanner=fie(ln.customSchemes);for(let e=0;e<ln.tokenQueue.length;e++)ln.tokenQueue[e][1]({scanner:ln.scanner});ln.parser=gie(ln.scanner.tokens);for(let e=0;e<ln.pluginQueue.length;e++)ln.pluginQueue[e][1]({scanner:ln.scanner,parser:ln.parser});return ln.initialized=!0,ln}function W$(e){if(!ln.initialized)xie();return bie(ln.parser.start,e,TV(ln.scanner.start,e))}function Y$(e,t=null,n=null){if(t&&typeof t==="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let a=new x4(n),i=W$(e),l=[];for(let c=0;c<i.length;c++){let u=i[c];if(u.isLink&&(!t||u.t===t)&&a.check(u))l.push(u.toFormattedObject(a))}return l}var vt=(e,t,n,a,i)=>e.ta(t,n,a,i),Tn=(e,t,n,a,i)=>e.tr(t,n,a,i),gV=(e,t,n,a,i)=>e.ts(t,n,a,i),ye=(e,t,n,a,i)=>e.tt(t,n,a,i),hl="WORD",u4="UWORD",$V="ASCIINUMERICAL",SV="ALPHANUMERICAL",Pb="LOCALHOST",d4="TLD",f4="UTLD",v$="SCHEME",ch="SLASH_SCHEME",h4="NUM",p4="WS",m4="NL",Ab="OPENBRACE",Mb="CLOSEBRACE",x$="OPENBRACKET",$$="CLOSEBRACKET",S$="OPENPAREN",C$="CLOSEPAREN",w$="OPENANGLEBRACKET",E$="CLOSEANGLEBRACKET",T$="FULLWIDTHLEFTPAREN",R$="FULLWIDTHRIGHTPAREN",k$="LEFTCORNERBRACKET",A$="RIGHTCORNERBRACKET",M$="LEFTWHITECORNERBRACKET",N$="RIGHTWHITECORNERBRACKET",O$="FULLWIDTHLESSTHAN",D$="FULLWIDTHGREATERTHAN",P$="AMPERSAND",L$="APOSTROPHE",_$="ASTERISK",Wc="AT",I$="BACKSLASH",B$="BACKTICK",z$="CARET",zd="COLON",g4="COMMA",H$="DOLLAR",ss="DOT",F$="EQUALS",b4="EXCLAMATION",Pa="HYPHEN",Nb="PERCENT",U$="PIPE",V$="PLUS",j$="POUND",Ob="QUERY",y4="QUOTE",CV="FULLWIDTHMIDDLEDOT",v4="SEMI",ls="SLASH",Db="TILDE",K$="UNDERSCORE",wV="EMOJI",q$="SYM",EV,fl,kb,a4,pl,i4,bV="\r",s4=`
|
|
383
|
+
`,uie="️",die="",l4="",g$=null,b$=null,Lb,hie,xV,mie,y$,Da=(e)=>new vo(e),yie,vie="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",ln;var J$=N(()=>{vo.groups={};vo.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let a=0;a<t.jr.length;a++){let i=t.jr[a][0],l=t.jr[a][1];if(l&&i.test(e))return l}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,a){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,a)},tr(e,t,n,a){a=a||vo.groups;let i;if(t&&t.j)i=t;else if(i=new vo(t),n&&a)Bd(t,n,a);return this.jr.push([e,i]),i},ts(e,t,n,a){let i=this,l=e.length;if(!l)return i;for(let c=0;c<l-1;c++)i=i.tt(e[c]);return i.tt(e[l-1],t,n,a)},tt(e,t,n,a){a=a||vo.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let l=t,c,u=i.go(e);if(u)c=new vo,Object.assign(c.j,u.j),c.jr.push.apply(c.jr,u.jr),c.jd=u.jd,c.t=u.t;else c=new vo;if(l){if(a){if(c.t&&typeof c.t==="string"){let f=Object.assign(cie(c.t,a),n);Bd(l,f,a)}else if(n)Bd(l,n,a)}c.t=l}return i.j[e]=c,c}};EV=Object.freeze({__proto__:null,ALPHANUMERICAL:SV,AMPERSAND:P$,APOSTROPHE:L$,ASCIINUMERICAL:$V,ASTERISK:_$,AT:Wc,BACKSLASH:I$,BACKTICK:B$,CARET:z$,CLOSEANGLEBRACKET:E$,CLOSEBRACE:Mb,CLOSEBRACKET:$$,CLOSEPAREN:C$,COLON:zd,COMMA:g4,DOLLAR:H$,DOT:ss,EMOJI:wV,EQUALS:F$,EXCLAMATION:b4,FULLWIDTHGREATERTHAN:D$,FULLWIDTHLEFTPAREN:T$,FULLWIDTHLESSTHAN:O$,FULLWIDTHMIDDLEDOT:CV,FULLWIDTHRIGHTPAREN:R$,HYPHEN:Pa,LEFTCORNERBRACKET:k$,LEFTWHITECORNERBRACKET:M$,LOCALHOST:Pb,NL:m4,NUM:h4,OPENANGLEBRACKET:w$,OPENBRACE:Ab,OPENBRACKET:x$,OPENPAREN:S$,PERCENT:Nb,PIPE:U$,PLUS:V$,POUND:j$,QUERY:Ob,QUOTE:y4,RIGHTCORNERBRACKET:A$,RIGHTWHITECORNERBRACKET:N$,SCHEME:v$,SEMI:v4,SLASH:ls,SLASH_SCHEME:ch,SYM:q$,TILDE:Db,TLD:d4,UNDERSCORE:K$,UTLD:f4,UWORD:u4,WORD:hl,WS:p4}),fl=/[a-z]/,kb=/\p{L}/u,a4=/\p{Emoji}/u,pl=/\d/,i4=/\s/;Lb={defaultProtocol:"http",events:null,format:vV,formatHref:vV,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};x4.prototype={o:Lb,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let a=t!=null,i=this.o[e];if(!i)return i;if(typeof i==="object"){if(i=n.t in i?i[n.t]:Lb[e],typeof i==="function"&&a)i=i(t,n)}else if(typeof i==="function"&&a)i=i(t,n.t,n);return i},getObj(e,t,n){let a=this.o[e];if(typeof a==="function"&&t!=null)a=a(t,n.t,n);return a},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};RV.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),a=e.get("format",t,this);return n&&a.length>n?a.substring(0,n)+"…":a},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Lb.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),a=e.get("formatHref",n,this),i=e.get("tagName",n,t),l=this.toFormattedString(e),c={},u=e.get("className",n,t),f=e.get("target",n,t),h=e.get("rel",n,t),m=e.getObj("attributes",n,t),b=e.getObj("events",n,t);if(c.href=a,u)c.class=u;if(f)c.target=f;if(h)c.rel=h;if(m)Object.assign(c,m);return{tagName:i,attributes:c,content:l,eventListeners:b}}};hie=G$("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),xV=G$("text"),mie=G$("nl"),y$=G$("url",{isLink:!0,toHref(e=Lb.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Pb&&e[1].t===zd}});yie=typeof console<"u"&&console&&console.warn||(()=>{}),ln={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};W$.scan=TV});function wie(e){if(e.length===1)return e[0].isLink;if(e.length===3&&e[1].isLink)return["()","[]"].includes(e[0].value+e[2].value);return!1}function Eie(e){return new qe({key:new Ze("autolink"),appendTransaction:(t,n,a)=>{let i=t.some((h)=>h.docChanged)&&!n.doc.eq(a.doc),l=t.some((h)=>h.getMeta("preventAutolink"));if(!i||l)return;let{tr:c}=a,u=Tk(n.doc,[...t]);if(mb(u).forEach(({newRange:h})=>{let m=eF(a.doc,h,(v)=>v.isTextblock),b,y;if(m.length>1)b=m[0],y=a.doc.textBetween(b.pos,b.pos+b.node.nodeSize,void 0," ");else if(m.length){let v=a.doc.textBetween(h.from,h.to," "," ");if(!Sie.test(v))return;b=m[0],y=a.doc.textBetween(b.pos,h.to,void 0," ")}if(b&&y){let v=y.split($ie).filter(Boolean);if(v.length<=0)return!1;let S=v[v.length-1],w=b.pos+y.lastIndexOf(S);if(!S)return!1;let E=W$(S).map((T)=>T.toObject(e.defaultProtocol));if(!wie(E))return!1;E.filter((T)=>T.isLink).map((T)=>({...T,from:w+T.start+1,to:w+T.end+1})).filter((T)=>{if(!a.schema.marks.code)return!0;return!a.doc.rangeHasMark(T.from,T.to,a.schema.marks.code)}).filter((T)=>e.validate(T.value)).filter((T)=>e.shouldAutoLink(T.value)).forEach((T)=>{if(I1(T.from,T.to,a.doc).some((D)=>D.mark.type===e.type))return;c.addMark(T.from,T.to,e.type.create({href:T.href}))})}}),!c.steps.length)return;return c}})}function Tie(e){return new qe({key:new Ze("handleClickLink"),props:{handleClick:(t,n,a)=>{var i,l;if(a.button!==0)return!1;if(!t.editable)return!1;let c=null;if(a.target instanceof HTMLAnchorElement)c=a.target;else{let f=a.target;if(!f)return!1;let h=e.editor.view.dom;if(c=f.closest("a"),c&&!h.contains(c))c=null}if(!c)return!1;let u=!1;if(e.enableClickSelection)u=e.editor.commands.extendMarkRange(e.type.name);if(e.openOnClick){let f=Mk(t.state,e.type.name),h=(i=c.href)!=null?i:f.href,m=(l=c.target)!=null?l:f.target;if(h)window.open(h,m),u=!0}return u}}})}function AV(e,t){let n=0;for(let a=t-1;a>=0&&e[a]==="\\";a-=1)n+=1;return n%2===1}function Aie(e,t){let n=0,a=0;while(a<t){if(e[a]!=="`"){a+=1;continue}if(n===0&&AV(e,a)){a+=1;continue}let i=0;while(a<t&&e[a]==="`")i+=1,a+=1;if(n===0)n=i;else if(i===n)n=0}return n>0}function MV(e,t,n){var a,i;let[,l,c]=t;if((t.index?e[t.index-1]:void 0)==="!"||AV(e,(a=t.index)!=null?a:0))return!1;if(Aie(e,(i=t.index)!=null?i:0))return!1;return!!l.trim()&&n(c)}function NV(e){var t,n;let[a,i,l,,c,u,f]=e,h=(t=c!=null?c:u)!=null?t:f;return{index:(n=e.index)!=null?n:0,text:a,replaceWith:i,data:{href:l,title:h||null,markdown:!0}}}function Mie(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function OV(e){var t,n,a;return{href:(t=e.data)==null?void 0:t.href,title:(a=(n=e.data)==null?void 0:n.title)!=null?a:null}}function Nie(e){let t=bo({find:(n)=>{let a=Rie.exec(n);if(!a||!MV(n,a,e.isAllowedHref))return null;return NV(a)},type:e.type,getAttributes:OV});return new ah({find:t.find,handler:(n)=>{let a=t.handler(n);if(a!==null&&n.state.tr.steps.length)n.state.tr.setMeta("preventAutolink",!0);return a}})}function Oie(e){let t=Pr({find:(n)=>{var a,i;let l=[];for(let u of n.matchAll(kie))if(MV(n,u,e.isAllowedHref))l.push(NV(u));let c=((i=(a=e.findPlainUrls)==null?void 0:a.call(e,n))!=null?i:[]).filter((u)=>!l.some((f)=>Mie(f,u)));return[...l,...c]},type:e.type,getAttributes:OV});return new Pk({find:t.find,handler:(n)=>{var a;let i=t.handler(n);if(i!==null&&n.state.tr.steps.length&&((a=n.match.data)==null?void 0:a.markdown))n.state.tr.setMeta("preventAutolink",!0);return i}})}function Die(e){return new qe({key:new Ze("handlePasteLink"),props:{handlePaste:(t,n,a)=>{let{shouldAutoLink:i}=e,{state:l}=t,{selection:c}=l,{empty:u}=c;if(u)return!1;let f="";a.content.forEach((m)=>{f+=m.textContent});let h=Y$(f,{defaultProtocol:e.defaultProtocol}).find((m)=>m.isLink&&m.value===f);if(!f||!h||i!==void 0&&!i(h.value))return!1;return e.editor.commands.setMark(e.type,{href:h.href})}}})}function ml(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];if(t)t.forEach((a)=>{let i=typeof a==="string"?a:a.scheme;if(i)n.push(i)});return!e||e.replace(Cie,"").match(new RegExp(`^(?:(?:${n.map((a)=>a.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var S4="[\x00- -\u2029 ]",$ie,Sie,Cie,Rie,kie,DV;var PV=N(()=>{Ye();J$();Ye();at();J$();Ye();at();Ye();at();J$();$ie=new RegExp(S4),Sie=new RegExp(`${S4}$`),Cie=new RegExp(S4,"g");Rie=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,kie=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;DV=Qr.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((e)=>{if(typeof e==="string"){$4(e);return}$4(e.scheme,e.optionalSlashes)})},onDestroy(){kV()},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:(e,t)=>!!ml(e,t.protocols),validate:(e)=>!!e,shouldAutoLink:(e)=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let i=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];if(/^\d{1,3}(\.\d{1,3}){3}$/.test(i))return!1;if(!/\./.test(i))return!1;return!0}}},addAttributes(){var e,t,n;return{href:{default:null,parseHTML(a){return a.getAttribute("href")}},target:{default:(e=this.options.HTMLAttributes.target)!=null?e:null},rel:{default:(t=this.options.HTMLAttributes.rel)!=null?t:null},class:{default:(n=this.options.HTMLAttributes.class)!=null?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:(e)=>{let t=e.getAttribute("href");if(!t||!this.options.isAllowedUri(t,{defaultValidate:(n)=>!!ml(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return null}}]},renderHTML({HTMLAttributes:e}){if(!this.options.isAllowedUri(e.href,{defaultValidate:(t)=>!!ml(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return["a",St(this.options.HTMLAttributes,{...e,href:""}),0];return["a",St(this.options.HTMLAttributes,e),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,a,i,l;let c=(a=(n=e.attrs)==null?void 0:n.href)!=null?a:"",u=(l=(i=e.attrs)==null?void 0:i.title)!=null?l:"",f=t.renderChildren(e);return u?`[${f}](${c} "${u}")`:`[${f}](${c})`},addCommands(){return{setLink:(e)=>({chain:t})=>{let{href:n}=e;if(!this.options.isAllowedUri(n,{defaultValidate:(a)=>!!ml(a,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:(e)=>({chain:t})=>{let{href:n}=e||{};if(n&&!this.options.isAllowedUri(n,{defaultValidate:(a)=>!!ml(a,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){if(!this.options.markdownLinks)return[];return[Nie({type:this.type,isAllowedHref:(e)=>this.options.isAllowedUri(e,{defaultValidate:(t)=>!!ml(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]},addPasteRules(){let e=(t)=>{let n=[];if(t){let{protocols:a,defaultProtocol:i}=this.options;Y$(t).filter((c)=>c.isLink&&this.options.isAllowedUri(c.value,{defaultValidate:(u)=>!!ml(u,a),protocols:a,defaultProtocol:i})).forEach((c)=>{if(!this.options.shouldAutoLink(c.value))return;n.push({text:c.value,data:{href:c.href},index:c.start})})}return n};if(this.options.markdownLinks)return[Oie({type:this.type,isAllowedHref:(t)=>this.options.isAllowedUri(t,{defaultValidate:(n)=>!!ml(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})];return[Pr({find:e,type:this.type,getAttributes:(t)=>{var n;return{href:(n=t.data)==null?void 0:n.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;if(this.options.autolink)e.push(Eie({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:(a)=>this.options.isAllowedUri(a,{defaultValidate:(i)=>!!ml(i,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink}));if(e.push(Tie({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste)e.push(Die({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink}));return e}})});function Z$(e){let t=e,n="";for(let[a,i]of FV)while(t>=a)n+=i,t-=a;return n}function R4(e){return Z$(e).toUpperCase()}function VV(e){let t=e.toLowerCase(),n=0,a=0;while(n<t.length){let i=!1;for(let[l,c]of FV)if(t.startsWith(c,n)){a+=l,n+=c.length,i=!0;break}if(!i)return 0}return a}function Fie(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=VV(e);if(t<=0)return!1;return(e===e.toLowerCase()?Z$(t):R4(t))===e}function Uie(e){let t=e.toLowerCase();if(t.length===1)return t.charCodeAt(0)-97+1;if(t.length===2){let n=t.charCodeAt(0)-97,a=t.charCodeAt(1)-97;return(n+1)*26+a+1}return 0}function Q$(e){if(e<=26)return X$[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;if(t<0)return X$[n];return X$[t]+X$[n]}function eS(e){if(!e||/^\d+$/.test(e))return;if(Fie(e))return e===e.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(e))return"a";if(/^[A-Z]{1,2}$/.test(e))return"A";return}function k4(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=eS(e);if(t==="i"||t==="I")return VV(e);if(t==="a"||t==="A"){let a=Uie(e);return a>0?a:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}function Vie(e,t){if(e==="numeric")return String(t);switch(e){case"a":return Q$(t);case"A":return Q$(t).toUpperCase();case"i":return Z$(t);case"I":return R4(t);default:return String(t)}}function jie(e){var t;if(e.length===0)return!1;let n=(t=eS(e[0]))!=null?t:"numeric",a=k4(e[0]);if(a<1)return!1;for(let i=0;i<e.length;i++){let l=Vie(n,a+i);if(e[i]!==l)return!1}return!0}function Kie(e){return{type:eS(e),start:k4(e)}}function qie(e){let{type:t,start:n}=Kie(e),a={};if(t)a.type=t;if(n!==1)a.start=n;return a}function Gie(e,t,n=". "){let a=t+1;if(!e||e==="1")return`${a}${n}`;switch(e){case"a":return`${Q$(a)}${n}`;case"A":return`${Q$(a).toUpperCase()}${n}`;case"i":return`${Z$(a)}${n}`;case"I":return`${R4(a)}${n}`;default:return`${a}${n}`}}function Wie(e){var t,n;let a=(t=e.tokens)==null?void 0:t[0];return Boolean(e.text&&((n=e.tokens)==null?void 0:n.length)===1&&(a==null?void 0:a.type)==="list"&&a.ordered&&a.raw===e.text)}function Yie(e,t){if(t.tokenizeInline)return t.parseInline(t.tokenizeInline(e));return t.parseInline([{type:"text",raw:e,text:e}])}function tse(e){return E4.test(e.trimStart())}function nse(e){let t=e.trimStart();return _b.bulletItem.test(t)||tse(t)||_b.heading.test(t)||_b.thematicBreak.test(t)&&!t.startsWith("-")||/^>\s?/.test(t)||_b.codeFence.test(t)}function rse(e){return Object.values(_b).some((t)=>t.test(e))}function ose(e){let t=[],n=[],a=!1;return e.forEach((i)=>{if(a){n.push(i);return}if(i.trim()===""){a=!0,n.push(i);return}if(t.length>0&&nse(i)){a=!0,n.push(i);return}t.push(i)}),{paragraphLines:t,blockLines:n}}function ase(e){let t=[],n=0,a=0;while(n<e.length){let i=e[n],l=i.match(E4);if(!l)break;let[,c,u,f,h]=l,m=c.length,b=parseInt(u,10),y=isNaN(b)?eS(u):void 0,v=isNaN(b)?k4(u):b,S=[h],w=n+1,E=[i],T=!1;while(w<e.length){let D=e[w];if(D.match(E4))break;if(D.trim()==="")E.push(D),S.push(""),T=!0,w+=1;else if(D.match(ese)){let z=D.length-D.trimStart().length,L=m+u.length+1;E.push(D),S.push(D.slice(Math.min(z,L))),w+=1}else{if(T||rse(D))break;E.push(D),S.push(D),w+=1}}t.push({indent:m,number:v,type:y,content:S.join(`
|
|
384
|
+
`).trim(),contentLines:S,raw:E.join(`
|
|
385
|
+
`)}),a=w,n=w}return[t,a]}function sse(e){let t=e.split(`
|
|
386
|
+
`).filter((l)=>l.trim().length>0);if(t.length===0)return null;let n=[];for(let l of t){let c=l.trim().match(ise);if(!c)return null;n.push({marker:c[1],content:c[3]})}let a=n.map((l)=>l.marker);if(!jie(a))return null;return{type:"orderedList",attrs:qie(n[0].marker),content:n.map((l)=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:l.content}]}]}))}}function GV(e,t,n){let a=[],i=0;while(i<e.length){let l=e[i];if(l.indent===t){let{paragraphLines:c,blockLines:u}=ose(l.contentLines),f=c.join(`
|
|
387
|
+
`).trim(),h=[];if(f)h.push({type:"paragraph",raw:f,tokens:n.inlineTokens(f)});let m=u.join(`
|
|
388
|
+
`).trim();if(m){let v=n.blockTokens(m);h.push(...v)}let b=i+1,y=[];while(b<e.length&&e[b].indent>t)y.push(e[b]),b+=1;if(y.length>0){let v=Math.min(...y.map((w)=>w.indent)),S=GV(y,v,n);h.push({type:"list",ordered:!0,start:y[0].number,typeMarker:y[0].type,items:S,raw:y.map((w)=>w.raw).join(`
|
|
389
|
+
`)})}a.push({type:"list_item",raw:l.raw,tokens:h}),i=b}else i+=1}return a}function lse(e,t){return e.map((n)=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let a=[];if(n.tokens&&n.tokens.length>0)n.tokens.forEach((i)=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")a.push(...t.parseChildren([i]));else if(i.type==="text"&&i.tokens){let l=t.parseChildren([i]);a.push({type:"paragraph",content:l})}else{let l=t.parseChildren([i]);if(l.length>0)a.push(...l)}});return{type:"listItem",content:a}})}function zV(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[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 Pie,Lie=(e,t)=>{for(var n in t)Pie(e,n,{get:t[n],enumerable:!0})},_ie="listItem",LV="textStyle",_V,T4,Iie=(e,t,n)=>{let{selection:a}=e;if(!a.empty)return null;let{$from:i}=a;if(!i.parent.isTextblock)return null;if(i.parentOffset!==i.parent.content.size)return null;let l=-1;for(let v=i.depth;v>0;v-=1)if(i.node(v).type.name===t){l=v;break}if(l<0)return null;let c=i.node(l),u=i.index(l);if(u+1>=c.childCount)return null;let f=c.child(u+1);if(!n.includes(f.type.name))return null;let h=e.schema.nodes[t],m=!1;if(f.forEach((v)=>{if(v.type===h&&v.childCount>1)m=!0}),!m)return null;let b=e.doc.resolve(i.after()).nodeAfter;if(!b||!n.includes(b.type.name))return null;let y=[];if(b.forEach((v)=>{y.push(v)}),y.length===0)return null;return{listItemDepth:l,nestedList:b,nestedListPos:i.after(),insertPos:i.after(l),items:y}},Bie=(e,t,n,a)=>{let i=Iie(e,n,a);if(!i)return!1;let{selection:l}=e,{nestedList:c,nestedListPos:u,insertPos:f,items:h}=i,m=e.tr;m.delete(u,u+c.nodeSize);let b=m.mapping.map(f);if(m.insert(b,le.from(h)),m.setSelection(l.map(m.doc,m.mapping)),t)t(m);return!0},zie=(e,t,n)=>Bie(e.state,e.view.dispatch,t,n),HV=(e,t)=>Ct.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>zie(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),FV,X$="abcdefghijklmnopqrstuvwxyz",Hie="[a-zA-Z]{1,2}",UV,A4,Jie,tS=(e,t)=>{let{$from:n}=t.selection,a=En(e,t.schema),i=null,l=n.depth,c=n.pos,u=null;while(l>0&&u===null)if(i=n.node(l),i.type===a)u=l;else l-=1,c-=1;if(u===null)return null;return{$pos:t.doc.resolve(c),depth:u}},M4=(e,t)=>{let n=tS(e,t);if(!n)return!1;let[,a]=lF(t,e,n.$pos.pos+4);return a},jV=(e,t,n)=>{let{$anchor:a}=e.selection,i=Math.max(0,a.pos-2),l=e.doc.resolve(i).node();if(!l||!n.includes(l.type.name))return!1;return!0},C4=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!ns(e.state,t)&&jV(e.state,t,n)){let{$anchor:a}=e.state.selection,i=e.state.doc.resolve(a.before()-1),l=[];i.node().descendants((f,h)=>{if(f.type.name===t)l.push({node:f,pos:h})});let c=l.at(-1);if(!c)return!1;let u=e.state.doc.resolve(i.start()+c.pos+1);return e.chain().cut({from:a.start()-1,to:a.end()+1},u.end()).joinForward().run()}if(!ns(e.state,t))return!1;if(!uF(e.state))return!1;return e.chain().liftListItem(t).run()},KV=(e,t)=>{let n=M4(e,t),a=tS(e,t);if(!a||!n)return!1;if(n>a.depth)return!0;return!1},qV=(e,t)=>{let n=M4(e,t),a=tS(e,t);if(!a||!n)return!1;if(n<a.depth)return!0;return!1},w4=(e,t)=>{if(!ns(e.state,t))return!1;if(!cF(e.state,t))return!1;let{selection:n}=e.state,{$from:a,$to:i}=n;if(!n.empty&&a.sameParent(i))return!1;if(KV(t,e.state))return e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run();if(qV(t,e.state))return e.chain().joinForward().joinBackward().run();return e.commands.joinItemForward()},Xie=(e,t)=>{var n;let{$anchor:a}=t.selection,i=t.doc.resolve(a.pos-a.parentOffset-2);if(i.index()===i.parent.childCount-1)return!1;if(((n=i.nodeAfter)==null?void 0:n.type.name)!==e)return!1;return!0},Qie=(e,t)=>{var n;let{$anchor:a}=t.selection,i=t.doc.resolve(a.pos-2);if(i.index()===0)return!1;if(((n=i.nodeBefore)==null?void 0:n.type.name)!==e)return!1;return!0},Zie=(e,t,n)=>{if(!n)return!1;let a=En(e,t.schema),i=!1;return n.descendants((l)=>{if(l.type===a)i=!0}),i},N4,E4,ese,_b,ise,cse="listItem",IV="textStyle",BV,O4,use,nS,rS,wMe;var uh=N(()=>{Ye();Ye();Ye();Ca();Ye();Ye();Ye();Ye();Ye();Ye();Ye();at();Ye();Ye();Ye();Pie=Object.defineProperty,_V=/^\s*([-+*])\s$/,T4=en.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:e}){return["ul",St(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||e.ordered)return[];return{type:"bulletList",content:e.items?t.parseChildren(e.items):[]}},renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
|
|
390
|
+
`)},markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>{if(this.options.keepAttributes)return t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(_ie,this.editor.getAttributes(LV)).run();return e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=rs({find:_V,type:this.type});if(this.options.keepMarks||this.options.keepAttributes)e=rs({find:_V,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(LV),editor:this.editor});return[e]}}),FV=[[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"]],UV=String.raw`\d+|[ivxlcdmIVXLCDM]+|${Hie}`;A4=en.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",St(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if(e.type!=="list_item")return[];let a=(n=t.parseBlockChildren)!=null?n:t.parseChildren,i=[];if(e.tokens&&e.tokens.length>0){if(Wie(e))return{type:"listItem",content:[{type:"paragraph",content:Yie(e.text||"",t)}]};if(e.tokens.some((c)=>c.type==="paragraph"))i=a(e.tokens);else{let c=e.tokens[0];if(c&&c.type==="text"&&c.tokens&&c.tokens.length>0){if(i=[{type:"paragraph",content:t.parseInline(c.tokens)}],e.tokens.length>1){let f=e.tokens.slice(1),h=a(f);i.push(...h)}}else i=a(e.tokens)}}if(i.length===0)i=[{type:"paragraph",content:[]}];return{type:"listItem",content:i}},renderMarkdown:(e,t,n)=>gb(e,t,(a)=>{var i,l,c,u;if(a.parentType==="bulletList")return"- ";if(a.parentType==="orderedList"){let f=((l=(i=a.meta)==null?void 0:i.parentAttrs)==null?void 0:l.start)||1,h=(u=(c=a.meta)==null?void 0:c.parentAttrs)==null?void 0:u.type,m=f-1+(a.index||0);return Gie(h,m,". ")}return"- "},n),addExtensions(){return[HV(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)}}}),Jie={};Lie(Jie,{findListItemPos:()=>tS,getNextListDepth:()=>M4,handleBackspace:()=>C4,handleDelete:()=>w4,hasListBefore:()=>jV,hasListItemAfter:()=>Xie,hasListItemBefore:()=>Qie,listItemHasSubList:()=>Zie,nextListIsDeeper:()=>KV,nextListIsHigher:()=>qV});N4=Ct.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{if(e.state.schema.nodes[n]===void 0)return;if(w4(e,n))t=!0}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{if(e.state.schema.nodes[n]===void 0)return;if(w4(e,n))t=!0}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:a})=>{if(e.state.schema.nodes[n]===void 0)return;if(C4(e,n,a))t=!0}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:a})=>{if(e.state.schema.nodes[n]===void 0)return;if(C4(e,n,a))t=!0}),t}}}}),E4=new RegExp(`^(\\s*)(${UV})([.)])\\s+(.*)$`),ese=/^\s/,_b={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};ise=new RegExp(`^(${UV})([.)])\\s+(.+)$`);BV=/^(\d+)\.\s$/;O4=en.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:(e)=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:(e)=>{let t=e.getAttribute("type");if(t)return t;let n=e.getAttribute("style");if(n){let i=zV(n);if(i)return i}let a=e.querySelector("li");if(a){let i=a.getAttribute("style");if(i){let l=zV(i);if(l)return l}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,type:n,...a}=e,i=St(this.options.HTMLAttributes,a);if(t!==1)i.start=t;if(n&&n!=="1")i.type=n;return["ol",i,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,a=e.typeMarker,i=e.items?lse(e.items,t):[],l={};if(n!==1)l.start=n;if(a)l.type=a;if(Object.keys(l).length>0)return{type:"orderedList",attrs:l,content:i};return{type:"orderedList",content:i}},renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
|
|
391
|
+
`)},markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(e,t,n)=>{var a,i;let l=e.split(`
|
|
392
|
+
`),[c,u]=ase(l);if(c.length===0)return;let f=GV(c,c[0].indent,n);if(f.length===0)return;let h=((a=c[0])==null?void 0:a.number)||1,m=(i=c[0])==null?void 0:i.type;return{type:"list",ordered:!0,start:h,typeMarker:m,items:f,raw:l.slice(0,u).join(`
|
|
393
|
+
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>{if(this.options.keepAttributes)return t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(cse,this.editor.getAttributes(IV)).run();return e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new qe({props:{handlePaste:(e,t)=>{var n,a;let i=(n=t.clipboardData)==null?void 0:n.getData("text/html");if(i==null?void 0:i.trim())return!1;let l=(a=t.clipboardData)==null?void 0:a.getData("text/plain");if(!l)return!1;let c=sse(l);if(!c)return!1;try{let u=e.state.schema.nodeFromJSON(c),f=e.state.tr.replaceSelectionWith(u);return e.dispatch(f),!0}catch{return!1}}}})]},addInputRules(){let e=(n,a)=>(!a.attrs.type||a.attrs.type==="1")&&a.childCount+a.attrs.start===+n[1],t=rs({find:BV,type:this.type,getAttributes:(n)=>({start:+n[1]}),joinPredicate:e});if(this.options.keepMarks||this.options.keepAttributes)t=rs({find:BV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:(n)=>({start:+n[1],...this.editor.getAttributes(IV)}),joinPredicate:e,editor:this.editor});return[t]}}),use=/^\s*(\[([( |x])?\])\s$/,nS=en.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:(e)=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:(e)=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",St(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0)n.push(t.createNode("paragraph",{},t.parseInline(e.tokens)));else if(e.text)n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})]));else n.push(t.createNode("paragraph",{},[]));if(e.nestedTokens&&e.nestedTokens.length>0){let a=t.parseChildren(e.nestedTokens);n.push(...a)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let i=`- [${((n=e.attrs)==null?void 0:n.checked)?"x":" "}] `;return gb(e,t,i)},addExtensions(){if(!this.options.nested)return[];return[HV(this.name,[this.options.taskListTypeName])]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};if(!this.options.nested)return e;return{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:a})=>{let i=document.createElement("li"),l=document.createElement("label"),c=document.createElement("span"),u=document.createElement("input"),f=document.createElement("div"),h=(b)=>{var y,v;u.ariaLabel=((v=(y=this.options.a11y)==null?void 0:y.checkboxLabel)==null?void 0:v.call(y,b,u.checked))||`Task item checkbox for ${b.textContent||"empty task item"}`};h(e),l.contentEditable="false",u.type="checkbox",u.addEventListener("mousedown",(b)=>b.preventDefault()),u.addEventListener("change",(b)=>{if(!a.isEditable&&!this.options.onReadOnlyChecked){u.checked=!u.checked;return}let{checked:y}=b.target;if(a.isEditable&&typeof n==="function")a.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:v})=>{let S=n();if(typeof S!=="number")return!1;let w=v.doc.nodeAt(S);return v.setNodeMarkup(S,void 0,{...w==null?void 0:w.attrs,checked:y}),!0}).run();if(!a.isEditable&&this.options.onReadOnlyChecked){if(!this.options.onReadOnlyChecked(e,y))u.checked=!u.checked}}),Object.entries(this.options.HTMLAttributes).forEach(([b,y])=>{i.setAttribute(b,y)}),i.dataset.checked=e.attrs.checked,u.checked=e.attrs.checked,l.append(u,c),i.append(l,f),Object.entries(t).forEach(([b,y])=>{i.setAttribute(b,y)});let m=new Set(Object.keys(t));return{dom:i,contentDOM:f,update:(b)=>{if(b.type!==this.type)return!1;i.dataset.checked=b.attrs.checked,u.checked=b.attrs.checked,h(b);let y=a.extensionManager.attributes,v=rh(b,y),S=new Set(Object.keys(v)),w=this.options.HTMLAttributes;return m.forEach((E)=>{if(!S.has(E))if(E in w)i.setAttribute(E,w[E]);else i.removeAttribute(E)}),Object.entries(v).forEach(([E,T])=>{if(T===null||T===void 0)if(E in w)i.setAttribute(E,w[E]);else i.removeAttribute(E);else i.setAttribute(E,T)}),m=S,!0}}}},addInputRules(){return[rs({find:use,type:this.type,getAttributes:(e)=>({checked:e[e.length-1]==="x"})})]}}),rS=en.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:e}){return["ul",St(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
|
|
394
|
+
`)},markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let a=(l)=>{let c=H1(l,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:(u)=>({indentLevel:u[1].length,mainContent:u[4],checked:u[3].toLowerCase()==="x"}),createToken:(u,f)=>({type:"taskItem",raw:"",mainContent:u.mainContent,indentLevel:u.indentLevel,checked:u.checked,text:u.mainContent,tokens:n.inlineTokens(u.mainContent),nestedTokens:f}),customNestedParser:a},n);if(c){let u={type:"taskList",raw:c.raw,items:c.items},f=l.slice(c.raw.length);if(f.trim())return[u,...n.blockTokens(f)];return[u]}return n.blockTokens(l)},i=H1(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:(l)=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,c)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:c}),customNestedParser:a},n);if(!i)return;return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),wMe=Ct.create({name:"listKit",addExtensions(){let e=[];if(this.options.bulletList!==!1)e.push(T4.configure(this.options.bulletList));if(this.options.listItem!==!1)e.push(A4.configure(this.options.listItem));if(this.options.listKeymap!==!1)e.push(N4.configure(this.options.listKeymap));if(this.options.orderedList!==!1)e.push(O4.configure(this.options.orderedList));if(this.options.taskItem!==!1)e.push(nS.configure(this.options.taskItem));if(this.options.taskList!==!1)e.push(rS.configure(this.options.taskList));return e}})});var oS=" ",D4=" ",WV;var YV=N(()=>{Ye();WV=en.create({name:"paragraph",priority:1000,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",St(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type==="image")return t.parseChildren([n[0]]);let a=t.parseInline(n);if(n.length===1&&n[0].type==="text"&&(n[0].raw===oS||n[0].text===oS||n[0].raw===D4||n[0].text===D4)&&a.length===1&&a[0].type==="text"&&(a[0].text===oS||a[0].text===D4))return t.createNode("paragraph",void 0,[]);return t.createNode("paragraph",void 0,a)},renderMarkdown:(e,t,n)=>{var a,i;if(!e)return"";let l=Array.isArray(e.content)?e.content:[];if(l.length===0){let c=Array.isArray((a=n==null?void 0:n.previousNode)==null?void 0:a.content)?n.previousNode.content:[];return((i=n==null?void 0:n.previousNode)==null?void 0:i.type)==="paragraph"&&c.length===0?oS:""}return t.renderChildren(l)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})});var dse,fse,JV;var XV=N(()=>{Ye();dse=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,fse=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,JV=Qr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:(e)=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",St(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[bo({find:dse,type:this.type})]},addPasteRules(){return[Pr({find:fse,type:this.type})]}})});var QV;var ZV=N(()=>{Ye();QV=en.create({name:"text",group:"inline",parseMarkdown:(e)=>({type:"text",text:e.text||""}),renderMarkdown:(e)=>e.text||""})});var ej;var tj=N(()=>{Ye();ej=Qr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:(e)=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",St(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!i)return;let l=i[2].trim();return{type:"underline",raw:i[0],text:l,tokens:n.inlineTokens(l)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})});function nj(e={}){return new qe({view(t){return new rj(t,e)}})}class rj{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(n=t.width)!==null&&n!==void 0?n:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((a)=>{let i=(l)=>{this[a](l)};return e.dom.addEventListener(a,i),{name:a,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(this.cursorPos!=null&&t.doc!=e.state.doc)if(this.lastDragEvent){let n=this.computeTarget(this.lastDragEvent);if(n==this.cursorPos)this.updateOverlay();else this.setCursor(n)}else this.updateOverlay()}setCursor(e){if(e==this.cursorPos)return;if(this.cursorPos=e,e==null)this.element.parentNode.removeChild(this.element),this.element=null;else this.updateOverlay()}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,a=this.editorView.dom,i=a.getBoundingClientRect(),l=i.width/a.offsetWidth,c=i.height/a.offsetHeight;if(t){let{nodeBefore:m,nodeAfter:b}=e;if(m||b){let y=this.editorView.nodeDOM(this.cursorPos-(m?m.nodeSize:0));if(y){let v=y.getBoundingClientRect(),S=m?v.bottom:v.top;if(m&&b)S=(S+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2;let w=this.width/2*c;n={left:v.left,right:v.right,top:S-w,bottom:S+w}}}}if(!n){let m=this.editorView.coordsAtPos(this.cursorPos),b=this.width/2*l;n={left:m.left-b,right:m.left+b,top:m.top,bottom:m.bottom}}let u=this.editorView.dom.offsetParent;if(!this.element){if(this.element=u.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",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let f,h;if(!u||u==document.body&&getComputedStyle(u).position=="static")f=-pageXOffset,h=-pageYOffset;else{let m=u.getBoundingClientRect(),b=m.width/u.offsetWidth,y=m.height/u.offsetHeight;f=m.left-u.scrollLeft*b,h=m.top-u.scrollTop*y}this.element.style.left=(n.left-f)/l+"px",this.element.style.top=(n.top-h)/c+"px",this.element.style.width=(n.right-n.left)/l+"px",this.element.style.height=(n.bottom-n.top)/c+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),a=n&&n.type.spec.disableDropCursor,i=typeof a=="function"?a(this.editorView,t,e):a;if(!t||i)return null;let l=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let c=c1(this.editorView.state.doc,l,this.editorView.dragging.slice);if(c!=null)l=c}return l}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);if(t!=null)this.setCursor(t),this.scheduleRemoval(5000)}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){if(!this.editorView.dom.contains(e.relatedTarget))this.setCursor(null)}}var oj=N(()=>{Qs();Mc()});var aj=N(()=>{oj()});class P4{constructor(e){this.pos=e}map(e){return new P4(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Rn.valid(t)?new Rn(t):Fe.near(t)}}function ij(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function pse(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),a=e.node(t);if(n==0){if(a.type.spec.isolating)return!0;continue}for(let i=a.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||ij(i.type))return!0;if(i.inlineContent)return!1}}return!0}function hse(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),a=e.node(t);if(n==a.childCount){if(a.type.spec.isolating)return!0;continue}for(let i=a.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||ij(i.type))return!0;if(i.inlineContent)return!1}}return!0}function sj(){return new qe({props:{decorations:yse,createSelectionBetween(e,t,n){return t.pos==n.pos&&Rn.valid(n)?new Rn(n):null},handleClick:gse,handleKeyDown:mse,handleDOMEvents:{beforeinput:bse}}})}function aS(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(a,i,l){let c=a.selection,u=t>0?c.$to:c.$from,f=c.empty;if(c instanceof Me){if(!l.endOfTextblock(n)||u.depth==0)return!1;f=!1,u=a.doc.resolve(t>0?u.after():u.before())}let h=Rn.findGapCursorFrom(u,t,f);if(!h)return!1;if(i)i(a.tr.setSelection(new Rn(h)));return!0}}function gse(e,t,n){if(!e||!e.editable)return!1;let a=e.state.doc.resolve(t);if(!Rn.valid(a))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});if(i&&i.inside>-1&&Pe.isSelectable(e.state.doc.nodeAt(i.inside)))return!1;return e.dispatch(e.state.tr.setSelection(new Rn(a))),!0}function bse(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Rn))return!1;let{$from:n}=e.state.selection,a=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!a)return!1;let i=le.empty;for(let c=a.length-1;c>=0;c--)i=le.from(a[c].createAndFill(null,i));let l=e.state.tr.replace(n.pos,n.pos,new Se(i,0,0));return l.setSelection(Me.near(l.doc.resolve(n.pos+1))),e.dispatch(l),!1}function yse(e){if(!(e.selection instanceof Rn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Lt.create(e.doc,[Xn.widget(e.selection.head,t,{key:"gapcursor"})])}var Rn,mse;var lj=N(()=>{C1();Qs();Js();mk();Rn=class Rn extends Fe{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return Rn.valid(n)?new Rn(n):Fe.near(n)}content(){return Se.empty}eq(e){return e instanceof Rn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw RangeError("Invalid input for GapCursor.fromJSON");return new Rn(e.resolve(t.pos))}getBookmark(){return new P4(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!pse(e)||!hse(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let a=t.contentMatchAt(e.index()).defaultType;return a&&a.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&Rn.valid(e))return e;let a=e.pos,i=null;for(let l=e.depth;;l--){let c=e.node(l);if(t>0?e.indexAfter(l)<c.childCount:e.index(l)>0){i=c.child(t>0?e.indexAfter(l):e.index(l)-1);break}else if(l==0)return null;a+=t;let u=e.doc.resolve(a);if(Rn.valid(u))return u}for(;;){let l=t>0?i.firstChild:i.lastChild;if(!l){if(i.isAtom&&!i.isText&&!Pe.isSelectable(i)){e=e.doc.resolve(a+i.nodeSize*t),n=!1;continue e}break}i=l,a+=t;let c=e.doc.resolve(a);if(Rn.valid(c))return c}return null}}};Rn.prototype.visible=!1;Rn.findFrom=Rn.findGapCursorFrom;Fe.jsonID("gapcursor",Rn);mse=db({ArrowLeft:aS("horiz",-1),ArrowRight:aS("horiz",1),ArrowUp:aS("vert",-1),ArrowDown:aS("vert",1)})});var cj=N(()=>{lj()});var iS=200,Cr=function(){},uj,vse,L4;var dj=N(()=>{Cr.prototype.append=function(t){if(!t.length)return this;return t=Cr.from(t),!this.length&&t||t.length<iS&&this.leafAppend(t)||this.length<iS&&t.leafPrepend(this)||this.appendInner(t)};Cr.prototype.prepend=function(t){if(!t.length)return this;return Cr.from(t).append(this)};Cr.prototype.appendInner=function(t){return new vse(this,t)};Cr.prototype.slice=function(t,n){if(t===void 0)t=0;if(n===void 0)n=this.length;if(t>=n)return Cr.empty;return this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Cr.prototype.get=function(t){if(t<0||t>=this.length)return;return this.getInner(t)};Cr.prototype.forEach=function(t,n,a){if(n===void 0)n=0;if(a===void 0)a=this.length;if(n<=a)this.forEachInner(t,n,a,0);else this.forEachInvertedInner(t,n,a,0)};Cr.prototype.map=function(t,n,a){if(n===void 0)n=0;if(a===void 0)a=this.length;var i=[];return this.forEach(function(l,c){return i.push(t(l,c))},n,a),i};Cr.from=function(t){if(t instanceof Cr)return t;return t&&t.length?new uj(t):Cr.empty};uj=function(e){function t(a){e.call(this),this.values=a}if(e)t.__proto__=e;t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,l){if(i==0&&l==this.length)return this;return new t(this.values.slice(i,l))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,l,c,u){for(var f=l;f<c;f++)if(i(this.values[f],u+f)===!1)return!1},t.prototype.forEachInvertedInner=function(i,l,c,u){for(var f=l-1;f>=c;f--)if(i(this.values[f],u+f)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=iS)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=iS)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Cr);Cr.empty=new uj([]);vse=function(e){function t(n,a){e.call(this),this.left=n,this.right=a,this.length=n.length+a.length,this.depth=Math.max(n.depth,a.depth)+1}if(e)t.__proto__=e;return t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(a){return a<this.left.length?this.left.get(a):this.right.get(a-this.left.length)},t.prototype.forEachInner=function(a,i,l,c){var u=this.left.length;if(i<u&&this.left.forEachInner(a,i,Math.min(l,u),c)===!1)return!1;if(l>u&&this.right.forEachInner(a,Math.max(i-u,0),Math.min(this.length,l)-u,c+u)===!1)return!1},t.prototype.forEachInvertedInner=function(a,i,l,c){var u=this.left.length;if(i>u&&this.right.forEachInvertedInner(a,i-u,Math.max(l,u)-u,c+u)===!1)return!1;if(l<u&&this.left.forEachInvertedInner(a,Math.min(i,u),l,c)===!1)return!1},t.prototype.sliceInner=function(a,i){if(a==0&&i==this.length)return this;var l=this.left.length;if(i<=l)return this.left.slice(a,i);if(a>=l)return this.right.slice(a-l,i-l);return this.left.slice(a,l).append(this.right.slice(0,i-l))},t.prototype.leafAppend=function(a){var i=this.right.leafAppend(a);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(a){var i=this.left.leafPrepend(a);if(i)return new t(i,this.right)},t.prototype.appendInner=function(a){if(this.left.depth>=Math.max(this.right.depth,a.depth)+1)return new t(this.left,new t(this.right,a));return new t(this,a)},t}(Cr),L4=Cr});class di{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let a,i;if(t)a=this.remapping(n,this.items.length),i=a.maps.length;let l=e.tr,c,u,f=[],h=[];return this.items.forEach((m,b)=>{if(!m.step){if(!a)a=this.remapping(n,b+1),i=a.maps.length;i--,h.push(m);return}if(a){h.push(new cs(m.map));let y=m.step.map(a.slice(i)),v;if(y&&l.maybeStep(y).doc)v=l.mapping.maps[l.mapping.maps.length-1],f.push(new cs(v,void 0,void 0,f.length+h.length));if(i--,v)a.appendMap(v,i)}else l.maybeStep(m.step);if(m.selection)return c=a?m.selection.map(a.slice(i)):m.selection,u=new di(this.items.slice(0,n).append(h.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:l,selection:c}}addTransform(e,t,n,a){let i=[],l=this.eventCount,c=this.items,u=!a&&c.length?c.get(c.length-1):null;for(let h=0;h<e.steps.length;h++){let m=e.steps[h].invert(e.docs[h]),b=new cs(e.mapping.maps[h],m,t),y;if(y=u&&u.merge(b))if(b=y,h)i.pop();else c=c.slice(0,c.length-1);if(i.push(b),t)l++,t=void 0;if(!a)u=b}let f=l-n.depth;if(f>Sse)c=$se(c,f),l-=f;return new di(c.append(i),l)}remapping(e,t){let n=new Vp;return this.items.forEach((a,i)=>{let l=a.mirrorOffset!=null&&i-a.mirrorOffset>=e?n.maps.length-a.mirrorOffset:void 0;n.appendMap(a.map,l)},e,t),n}addMaps(e){if(this.eventCount==0)return this;return new di(this.items.append(e.map((t)=>new cs(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],a=Math.max(0,this.items.length-t),i=e.mapping,l=e.steps.length,c=this.eventCount;this.items.forEach((b)=>{if(b.selection)c--},a);let u=t;this.items.forEach((b)=>{let y=i.getMirror(--u);if(y==null)return;l=Math.min(l,y);let v=i.maps[y];if(b.step){let S=e.steps[y].invert(e.docs[y]),w=b.selection&&b.selection.map(i.slice(u+1,y));if(w)c++;n.push(new cs(v,S,w))}else n.push(new cs(v))},a);let f=[];for(let b=t;b<l;b++)f.push(new cs(i.maps[b]));let h=this.items.slice(0,a).append(f).append(n),m=new di(h,c);if(m.emptyItemCount()>xse)m=m.compress(this.items.length-n.length);return m}emptyItemCount(){let e=0;return this.items.forEach((t)=>{if(!t.step)e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,a=[],i=0;return this.items.forEach((l,c)=>{if(c>=e){if(a.push(l),l.selection)i++}else if(l.step){let u=l.step.map(t.slice(n)),f=u&&u.getMap();if(n--,f)t.appendMap(f,n);if(u){let h=l.selection&&l.selection.map(t.slice(n));if(h)i++;let m=new cs(f.invert(),u,h),b,y=a.length-1;if(b=a.length&&a[y].merge(m))a[y]=b;else a.push(m)}}else if(l.map)n--},this.items.length,0),new di(L4.from(a.reverse()),i)}}function $se(e,t){let n;return e.forEach((a,i)=>{if(a.selection&&t--==0)return n=i,!1}),e.slice(n)}class cs{constructor(e,t,n,a){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=a}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new cs(t.getMap().invert(),t,this.selection)}}}class gl{constructor(e,t,n,a,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=a,this.prevComposition=i}}function Cse(e,t,n,a){let i=n.getMeta(Hd),l;if(i)return i.historyState;if(n.getMeta(Tse))e=new gl(e.done,e.undone,null,0,-1);let c=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;else if(c&&c.getMeta(Hd))if(c.getMeta(Hd).redo)return new gl(e.done.addTransform(n,void 0,a,sS(t)),e.undone,fj(n.mapping.maps),e.prevTime,e.prevComposition);else return new gl(e.done,e.undone.addTransform(n,void 0,a,sS(t)),null,e.prevTime,e.prevComposition);else if(n.getMeta("addToHistory")!==!1&&!(c&&c.getMeta("addToHistory")===!1)){let u=n.getMeta("composition"),f=e.prevTime==0||!c&&e.prevComposition!=u&&(e.prevTime<(n.time||0)-a.newGroupDelay||!wse(n,e.prevRanges)),h=c?_4(e.prevRanges,n.mapping):fj(n.mapping.maps);return new gl(e.done.addTransform(n,f?t.selection.getBookmark():void 0,a,sS(t)),di.empty,h,n.time,u==null?e.prevComposition:u)}else if(l=n.getMeta("rebased"))return new gl(e.done.rebased(n,l),e.undone.rebased(n,l),_4(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new gl(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),_4(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function wse(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((a,i)=>{for(let l=0;l<t.length;l+=2)if(a<=t[l+1]&&i>=t[l])n=!0}),n}function fj(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((a,i,l,c)=>t.push(l,c));return t}function _4(e,t){if(!e)return null;let n=[];for(let a=0;a<e.length;a+=2){let i=t.map(e[a],1),l=t.map(e[a+1],-1);if(i<=l)n.push(i,l)}return n}function Ese(e,t,n){let a=sS(t),i=Hd.get(t).spec.config,l=(n?e.undone:e.done).popEvent(t,a);if(!l)return null;let c=l.selection.resolve(l.transform.doc),u=(n?e.done:e.undone).addTransform(l.transform,t.selection.getBookmark(),i,a),f=new gl(n?u:l.remaining,n?l.remaining:u,null,0,-1);return l.transform.setSelection(c).setMeta(Hd,{redo:n,historyState:f})}function sS(e){let t=e.plugins;if(pj!=t){I4=!1,pj=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){I4=!0;break}}return I4}function hj(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new qe({key:Hd,state:{init(){return new gl(di.empty,di.empty,null,0,-1)},apply(t,n,a){return Cse(n,a,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let a=n.inputType,i=a=="historyUndo"?B4:a=="historyRedo"?z4:null;if(!i||!t.editable)return!1;return n.preventDefault(),i(t.state,t.dispatch)}}}})}function lS(e,t){return(n,a)=>{let i=Hd.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(a){let l=Ese(i,n,e);if(l)a(t?l.scrollIntoView():l)}return!0}}var xse=500,Sse=20,I4=!1,pj=null,Hd,Tse,B4,z4,JMe,XMe;var mj=N(()=>{dj();Mc();Qs();di.empty=new di(L4.empty,0);Hd=new Ze("history"),Tse=new Ze("closeHistory");B4=lS(!1,!0),z4=lS(!0,!0),JMe=lS(!1,!1),XMe=lS(!0,!1)});var gj=N(()=>{mj()});function Sj(e){let{editor:t,placeholder:n,dataAttribute:a,pos:i,node:l,isEmptyDoc:c,hasAnchor:u,classes:{emptyNode:f,emptyEditor:h}}=e,m=[f];if(c)m.push(h);return Xn.node(i,i+l.nodeSize,{class:m.join(" "),[a]:typeof n==="function"?n({editor:t,node:l,pos:i,hasAnchor:u}):n})}function Cj(e,t){return typeof e==="function"?e(t):e}function wj({editor:e,options:t,dataAttribute:n,doc:a,selection:i,from:l,to:c}){let{anchor:u}=i,f=[],h=e.isEmpty;return a.nodesBetween(l,c,(m,b)=>{let y=u>=b&&u<=b+m.nodeSize,v=!m.isLeaf&&oh(m);if(!m.type.isTextblock)return t.includeChildren;if((y||!t.showOnlyCurrent)&&v)f.push(Sj({editor:e,isEmptyDoc:h,dataAttribute:n,hasAnchor:y,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:Cj(t.emptyNodeClass,{editor:e,node:m,pos:b,hasAnchor:y})},node:m,pos:b}));return t.includeChildren}),f}function Ej({editor:e,options:t,dataAttribute:n,doc:a,selection:i}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:c}=i,u=[],f=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let m=a.resolve(c),b=m.depth>0?m.node(1):m.nodeAfter,y=m.depth>0?m.before(1):c;if(b&&b.type.isTextblock&&oh(b)){let v=c>=y&&c<=y+b.nodeSize;u.push(Sj({editor:e,isEmptyDoc:f,dataAttribute:n,hasAnchor:v,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:Cj(t.emptyNodeClass,{editor:e,node:b,pos:y,hasAnchor:v})},node:b,pos:y}))}}else u.push(...wj({editor:e,options:t,dataAttribute:n,doc:a,selection:i,from:0,to:a.content.size}));return Lt.create(a,u)}function Ib(e,t){var n;let a=e.resolve(t);if(a.depth===0){let c=(n=a.nodeAfter)!=null?n:a.nodeBefore;if(!c)return{from:t,to:t};let u=a.nodeAfter?t:t-c.nodeSize;return{from:u,to:u+c.nodeSize}}let i=a.before(1),l=a.node(1);return{from:i,to:i+l.nodeSize}}function Bb(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function Rse(e,t,n){let a=[];return e.forEach((i,l)=>{let c=l,u=c+i.nodeSize,f=c+1,h=u+1;if(f<n&&h>t)a.push({from:c,to:u})}),a}function kse(e){if(e.length===0)return[];let t=[...e].sort((a,i)=>a.from-i.from),n=[{...t[0]}];for(let a=1;a<t.length;a+=1){let i=n[n.length-1],l=t[a];if(l.from<=i.to)i.to=Math.max(i.to,l.to);else n.push({...l})}return n}function Ase(e,t){let n=Rse(e,t.from,t.to);if(n.push(Bb(e,Ib(e,t.from))),t.to>t.from)n.push(Bb(e,Ib(e,Math.min(t.to,e.content.size+1)-1)));else if(t.from<e.content.size+1)n.push(Bb(e,Ib(e,Math.min(t.from+1,e.content.size))));return n}function Mse(e,t,n){let a=[];if(e.docChanged){let i=mb(e);for(let l of i)a.push(...Ase(n.doc,l.newRange))}if(e.selectionSet)a.push(Bb(n.doc,Ib(n.doc,e.mapping.map(t.selection.anchor)))),a.push(Bb(n.doc,Ib(n.doc,n.selection.anchor)));return kse(a)}function Nse(e,t,n){let a=Math.max(0,Math.min(e,n.content.size)),i=Math.max(a,Math.min(t,n.content.size));return{from:a,to:i}}function Ose({decorations:e,ranges:t,editor:n,options:a,dataAttribute:i,doc:l,selection:c}){let u=e;for(let f of t){let{from:h,to:m}=Nse(f.from,f.to,l),b=u.find(h,m).filter((v)=>v.from>=h&&v.to<=m);if(b.length)u=u.remove(b);let y=wj({editor:n,options:a,dataAttribute:i,doc:l,selection:c,from:h,to:m});if(y.length)u=u.add(l,y)}return u}function Dse({editor:e,options:t,dataAttribute:n}){return{init(a,i){let l=Ej({editor:e,options:t,dataAttribute:n,doc:i.doc,selection:i.selection});return l!=null?l:Lt.empty},apply(a,i,l,c){if(!a.docChanged&&!a.selectionSet)return i;let u=i.map(a.mapping,a.doc),f=Mse(a,l,c);return Ose({decorations:u,ranges:f,editor:e,options:t,dataAttribute:n,doc:c.doc,selection:c.selection})}}}function Pse(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function Lse({editor:e,options:t}){let n=t.dataAttribute?`data-${Pse(t.dataAttribute)}`:`data-${$j}`,a=t.showOnlyCurrent&&!t.includeChildren;return new qe({key:bj,...a?{}:{state:Dse({editor:e,options:t,dataAttribute:n})},props:{decorations:a?({doc:i,selection:l})=>Ej({editor:e,options:t,dataAttribute:n,doc:i,selection:l}):(i)=>{var l;if(t.showOnlyWhenEditable&&!e.isEditable)return Lt.empty;return(l=bj.getState(i))!=null?l:Lt.empty}}})}function H4(e,t){return!e.selection.empty&&!B1(e.selection)&&t.isEditable}function _se(e,t){return H4(e,t)&&!t.isFocused&&!t.view.dragging}function Ise(){var e;(e=window.getSelection())==null||e.removeAllRanges()}function Bse(e){e.focus()}function yj({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var rNe,vj,cNe,xj,$j="placeholder",bj,F4,wNe,zse="skipTrailingNode",Tj,Rj;var cS=N(()=>{Ye();at();Ye();aj();Ye();at();Fc();Ye();cj();at();Ye();at();Fc();Ye();Fc();Fc();Ye();Fc();Ye();at();Fc();Ye();at();Ye();gj();rNe=Ct.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:(e)=>e.length,wordCounter:(e)=>e.split(" ").filter((t)=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=(e)=>{let t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){let a=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(a)}return t.nodeSize},this.storage.words=(e)=>{let t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new qe({key:new Ze("characterCount"),appendTransaction:(t,n,a)=>{if(e)return;let i=this.options.limit,l=this.options.autoTrim;if(i===null||i===void 0||i===0||l===!1){e=!0;return}let c=this.storage.characters({node:a.doc});if(c>i){let u=c-i,f=0,h=u;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let m=a.tr.deleteRange(0,h);return e=!0,m}e=!0},filterTransaction:(t,n)=>{let a=this.options.limit;if(!t.docChanged||a===0||a===null||a===void 0)return!0;let i=this.storage.characters({node:n.doc}),l=this.storage.characters({node:t.doc});if(l<=a)return!0;if(i>a&&l>a&&l<=i)return!0;if(i>a&&l>a&&l>i)return!1;if(!t.getMeta("paste"))return!1;let u=t.selection.$head.pos,f=l-a,h=u-f,m=u;if(t.deleteRange(h,m),this.storage.characters({node:t.doc})>a)return!1;return!0}})]}}),vj=Ct.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[nj(this.options)]}}),cNe=Ct.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new qe({key:new Ze("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:a}=this.editor,{anchor:i}=t,l=[];if(!n||!a)return Lt.create(e,[]);let c=0;if(this.options.mode==="deepest")e.descendants((f,h)=>{if(f.isText)return;if(!(i>=h&&i<=h+f.nodeSize-1))return!1;c+=1});let u=0;return e.descendants((f,h)=>{if(f.isText)return!1;if(!(i>=h&&i<=h+f.nodeSize-1))return!1;if(u+=1,this.options.mode==="deepest"&&c-u>0||this.options.mode==="shallowest"&&u>1)return this.options.mode==="deepest";l.push(Xn.node(h,h+f.nodeSize,{class:this.options.className}))}),Lt.create(e,l)}}})]}}),xj=Ct.create({name:"gapCursor",addProseMirrorPlugins(){return[sj()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Bt(He(e,"allowGapCursor",n)))!=null?t:null}}}),bj=new Ze("tiptap__placeholder");F4=Ct.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:$j,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[Lse({editor:this.editor,options:this.options})]}});wNe=Ct.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new qe({key:new Ze("selection"),props:{decorations(n){if(!_se(n,e))return null;return Lt.create(n.doc,[Xn.inline(n.selection.from,n.selection.to,{class:t.className})])},handleDOMEvents:{blur(n){if(!H4(n.state,e))return!1;return Ise(),!1},focus(n){if(!H4(n.state,e))return!1;return requestAnimationFrame(()=>{if(!e.isDestroyed&&n.hasFocus())Bse(n)}),!1}}}})]}});Tj=Ct.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Ze(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",a=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter((i)=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new qe({key:t,appendTransaction:(i,l,c)=>{let{doc:u,tr:f,schema:h}=c,m=t.getState(c),b=u.content.size,y=h.nodes[n];if(i.some((v)=>v.getMeta(zse)))return;if(!m)return;return f.insert(b,y.create())},state:{init:(i,l)=>{let c=l.tr.doc.lastChild;return!yj({node:c,types:a})},apply:(i,l)=>{if(!i.docChanged)return l;if(i.getMeta("__uniqueIDTransaction"))return l;let c=i.doc.lastChild;return!yj({node:c,types:a})}}})]}}),Rj=Ct.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>B4(e,t),redo:()=>({state:e,dispatch:t})=>z4(e,t)}},addProseMirrorPlugins(){return[hj(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 Hse,uS;var U4=N(()=>{Ye();ZU();tV();rV();aV();sV();cV();dV();pV();mV();PV();uh();YV();XV();ZV();tj();cS();Hse=Ct.create({name:"starterKit",addExtensions(){var e,t,n,a;let i=[];if(this.options.bold!==!1)i.push(eV.configure(this.options.bold));if(this.options.blockquote!==!1)i.push(QU.configure(this.options.blockquote));if(this.options.bulletList!==!1)i.push(T4.configure(this.options.bulletList));if(this.options.code!==!1)i.push(nV.configure(this.options.code));if(this.options.codeBlock!==!1)i.push(oV.configure(this.options.codeBlock));if(this.options.document!==!1)i.push(iV.configure(this.options.document));if(this.options.dropcursor!==!1)i.push(vj.configure(this.options.dropcursor));if(this.options.gapcursor!==!1)i.push(xj.configure(this.options.gapcursor));if(this.options.hardBreak!==!1)i.push(lV.configure(this.options.hardBreak));if(this.options.heading!==!1)i.push(uV.configure(this.options.heading));if(this.options.undoRedo!==!1)i.push(Rj.configure(this.options.undoRedo));if(this.options.horizontalRule!==!1)i.push(fV.configure(this.options.horizontalRule));if(this.options.italic!==!1)i.push(hV.configure(this.options.italic));if(this.options.listItem!==!1)i.push(A4.configure(this.options.listItem));if(this.options.listKeymap!==!1)i.push(N4.configure((e=this.options)==null?void 0:e.listKeymap));if(this.options.link!==!1)i.push(DV.configure((t=this.options)==null?void 0:t.link));if(this.options.orderedList!==!1)i.push(O4.configure(this.options.orderedList));if(this.options.paragraph!==!1)i.push(WV.configure(this.options.paragraph));if(this.options.strike!==!1)i.push(JV.configure(this.options.strike));if(this.options.text!==!1)i.push(QV.configure(this.options.text));if(this.options.underline!==!1)i.push(ej.configure((n=this.options)==null?void 0:n.underline));if(this.options.trailingNode!==!1)i.push(Tj.configure((a=this.options)==null?void 0:a.trailingNode));return i}}),uS=Hse});var kj;var Aj=N(()=>{cS();cS();kj=F4});var Fse,Use,Vse,dS;var V4=N(()=>{Ye();Fse=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Use=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,Vse=Qr.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){if(!this.options.multicolor)return{};return{color:{default:null,parseHTML:(e)=>e.getAttribute("data-color")||hF(e,"background-color")||e.style.backgroundColor,renderHTML:(e)=>{if(!e.color)return{};return{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}}}}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",St(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark("highlight",t.parseInline(e.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:(e)=>e.indexOf("=="),tokenize(e,t,n){let i=/^(==)([^=]+)(==)/.exec(e);if(i){let l=i[2].trim(),c=n.inlineTokens(l);return{type:"highlight",raw:i[0],text:l,tokens:c}}}},addCommands(){return{setHighlight:(e)=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:(e)=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[bo({find:Fse,type:this.type})]},addPasteRules(){return[Pr({find:Use,type:this.type})]}}),dS=Vse});var fS;var j4=N(()=>{uh();uh();fS=rS});var pS;var K4=N(()=>{uh();uh();pS=nS});function q4(e){let t=e.trim().toLowerCase();if(!t)return[...Mj];return Mj.filter((n)=>n.title.toLowerCase().includes(t)||n.keywords.some((a)=>a.includes(t)))}function jse(e,t){if(t<0||t>e.doc.content.size)return!1;let n=e.doc.resolve(t);if(n.parent.type.spec.code)return!1;if(n.parentOffset===0)return!0;return/^\s*$/.test(n.parent.textBetween(n.parentOffset-1,n.parentOffset))}function G4({value:e,onChange:t,placeholder:n="Write, or press '/' for blocks…",label:a,editable:i=!0,minHeight:l=200,className:c,...u}){let f=Dt.useRef(t);f.current=t;let h=Dt.useRef(e),m=Dt.useRef(n);m.current=n;let b=Dt.useRef(null),[y,v]=Dt.useState(null),S=Dt.useCallback((he)=>{b.current=he,v(he)},[]),[w,E]=Dt.useState(!1),T=Dt.useRef(!1);T.current=w;let[D,H]=Dt.useState(""),[z,L]=Dt.useState(null),J=Dt.useRef(null),V=Dt.useRef(null),[P,te]=Dt.useState(null),[Y,ge]=Dt.useState(!1);Dt.useEffect(()=>ge(!0),[]);let ue=Dt.useId(),ie=`${ue}-label`,_=`${ue}-slash`,U=(he)=>`${_}-option-${he}`,W=Dt.useRef(()=>{}),Q=u["aria-label"],pe=Dt.useMemo(()=>q4(y?.query??""),[y?.query]),re=y?Math.min(y.index,Math.max(pe.length-1,0)):0,k=y!==null&&pe.length>0,X=jF({editable:i,immediatelyRender:!1,extensions:[uS.configure({heading:{levels:[1,2,3]},link:{openOnClick:!1,autolink:!0}}),dS,fS,pS.configure({nested:!0}),kj.configure({placeholder:()=>m.current})],content:e||"",editorProps:{attributes:{class:zo("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 l==="number"?`${l}px`:l}`,role:"textbox","aria-multiline":"true",...a?{"aria-labelledby":ie}:{},...Q?{"aria-label":Q}:{},"aria-expanded":k?"true":"false",...k?{"aria-controls":_,"aria-activedescendant":U(re)}:{}},handleTextInput(he,Ne,xt,me){if(me!=="/"||b.current)return!1;if(!jse(he.state,Ne))return!1;return S({from:Ne,query:"",index:0}),!1},handleKeyDown(he,Ne){let xt=b.current;if(!xt)return!1;if(Ne.key==="Escape")return S(null),!0;let me=q4(xt.query);if(me.length===0)return S(null),!1;if(Ne.key==="ArrowDown")return S({...xt,index:(xt.index+1)%me.length}),!0;if(Ne.key==="ArrowUp")return S({...xt,index:(xt.index-1+me.length)%me.length}),!0;if(Ne.key==="Enter"||Ne.key==="Tab")return W.current(me[Math.min(xt.index,me.length-1)]),!0;return!1}},onUpdate({editor:he}){let Ne=he.getHTML();h.current=Ne,f.current(Ne);let xt=b.current;if(!xt)return;let me=he.state.selection.from;if(me<xt.from)return S(null);let cn=he.state.doc.textBetween(xt.from,me,`
|
|
395
|
+
`,`
|
|
396
|
+
`);if(!cn.startsWith("/"))return S(null);let Pn=cn.slice(1);if(/\s/.test(Pn)||q4(Pn).length===0)return S(null);S({...xt,query:Pn,index:0})},onSelectionUpdate({editor:he}){let Ne=b.current;if(!Ne)return;let xt=he.state.selection.from;if(xt<Ne.from||xt>Ne.from+Ne.query.length+1)S(null)},onBlur(){S(null)}});Dt.useEffect(()=>{if(!X)return;if(e!==h.current&&e!==X.getHTML())X.commands.setContent(e||"",{emitUpdate:!1}),h.current=e},[e,X]),Dt.useEffect(()=>{if(X)X.setEditable(i)},[i,X]);let de=Dt.useCallback((he)=>{let Ne=b.current;if(!X||!Ne||!he)return;let xt=X.state.doc.content.size,me=Math.min(Math.max(Ne.from,0),xt),cn=Math.min(Math.max(X.state.selection.from,me),xt);X.chain().focus().deleteRange({from:me,to:cn}).run(),he.run(X),S(null)},[X,S]);W.current=de;let xe=Dt.useCallback(()=>{let he=b.current,Ne=V.current;if(!X||!he||!Ne)return;let xt=X.state.doc.content.size;if(he.from>xt)return S(null);let me=X.view.coordsAtPos(he.from),cn=Ne.getBoundingClientRect(),Pn=6,kn=8,nn=me.bottom+Pn;if(nn+cn.height>window.innerHeight-kn)nn=Math.max(kn,me.top-Pn-cn.height);let Ie=Math.max(kn,Math.min(me.left,window.innerWidth-cn.width-kn));te((Zr)=>Zr&&Zr.left===Ie&&Zr.top===nn?Zr:{left:Ie,top:nn})},[X,S]);Dt.useLayoutEffect(()=>{if(y)xe();else te(null)},[y,xe]),Dt.useEffect(()=>{if(!y)return;let he=()=>xe();return window.addEventListener("scroll",he,!0),window.addEventListener("resize",he),()=>{window.removeEventListener("scroll",he,!0),window.removeEventListener("resize",he)}},[y,xe]);let Re=Ik({editor:X,selector:({editor:he})=>he?{bold:he.isActive("bold"),italic:he.isActive("italic"),strike:he.isActive("strike"),highlight:he.isActive("highlight"),code:he.isActive("code"),link:he.isActive("link"),hasSelection:!he.state.selection.empty}:null}),Ke=Dt.useCallback(()=>{E(!1),L(null),T.current=!1},[]);Dt.useEffect(()=>{if(w&&Re&&!Re.hasSelection&&!Re.link)Ke()},[w,Re,Ke]),Dt.useEffect(()=>{if(w)J.current?.focus()},[w]);let Ce=()=>{if(!X)return;H(X.getAttributes("link").href??""),L(null),T.current=!0,E(!0)},Je=()=>{if(!X)return;if(D.trim()===""){X.chain().focus().extendMarkRange("link").unsetLink().run(),Ke();return}let he=qR(D);if(!he)return L(GR);X.chain().focus().extendMarkRange("link").setLink({href:he}).run(),Ke()};return Kt.jsxDEV("div",{className:zo("flex w-full flex-col gap-2",c),children:[a?Kt.jsxDEV("span",{id:ie,className:"text-small font-medium text-fg",children:a},void 0,!1,void 0,this):null,Kt.jsxDEV("div",{className:"relative rounded-lg border border-border bg-surface focus-within:border-brand-green",children:[X?Kt.jsxDEV(WU,{editor:X,shouldShow:({editor:he,view:Ne,state:xt,element:me})=>{let cn=me.contains(document.activeElement);if(!he.isEditable||!(Ne.hasFocus()||cn))return!1;return T.current||!xt.selection.empty},className:"flex flex-col gap-1 rounded-lg border border-border bg-surface-card p-1 shadow-md",children:w?Kt.jsxDEV(Kt.Fragment,{children:[Kt.jsxDEV("div",{className:"flex items-center gap-1",children:[Kt.jsxDEV("input",{ref:J,type:"text",value:D,"aria-label":"Link URL","aria-invalid":z?!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:(he)=>{H(he.target.value),L(null)},onKeyDown:(he)=>{if(he.key==="Enter")he.preventDefault(),Je();if(he.key==="Escape")he.preventDefault(),Ke(),X.chain().focus().run()}},void 0,!1,void 0,this),Kt.jsxDEV("button",{type:"button",className:hS,onMouseDown:(he)=>he.preventDefault(),onClick:Je,title:"Apply link",children:"Apply"},void 0,!1,void 0,this),Kt.jsxDEV("button",{type:"button",className:hS,onMouseDown:(he)=>he.preventDefault(),onClick:()=>{Ke(),X.chain().focus().run()},title:"Cancel",children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z?Kt.jsxDEV("span",{className:"px-1 pb-0.5 text-caption text-danger",children:z},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):Kt.jsxDEV("div",{className:"flex items-center gap-0.5",children:[Kse.map((he)=>Kt.jsxDEV("button",{type:"button",className:hS,"data-active":Re?.[he.key]??!1,"aria-pressed":Re?.[he.key]??!1,onMouseDown:(Ne)=>Ne.preventDefault(),onClick:()=>he.run(X),title:he.title,children:he.label},he.key,!1,void 0,this)),Kt.jsxDEV("button",{type:"button",className:hS,"data-active":Re?.link??!1,"aria-pressed":Re?.link??!1,onMouseDown:(he)=>he.preventDefault(),onClick:Ce,title:"Link",children:Kt.jsxDEV(qse,{},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,Kt.jsxDEV(_k,{editor:X},void 0,!1,void 0,this),Y&&k&&y?Nj.createPortal(Kt.jsxDEV("div",{ref:V,id:_,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:P?.left??0,top:P?.top??0,visibility:P?"visible":"hidden"},children:pe.map((he,Ne)=>Kt.jsxDEV("div",{id:U(Ne),role:"option","aria-selected":Ne===re,className:zo("flex w-full cursor-pointer flex-col items-start rounded-md px-3 py-1.5 text-left",Ne===re?"bg-surface-muted":"hover:bg-surface-muted"),onMouseDown:(xt)=>xt.preventDefault(),onClick:()=>de(he),children:[Kt.jsxDEV("span",{className:"text-small text-fg",children:he.title},void 0,!1,void 0,this),Kt.jsxDEV("span",{className:"text-caption text-fg-subtle",children:he.hint},void 0,!1,void 0,this)]},he.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 Dt,Nj,Kt,Mj,hS="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",Kse,qse=()=>Kt.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:[Kt.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),Kt.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 Oj=N(()=>{q1();JU();U4();Aj();V4();j4();K4();_s();Dt=K(ae(),1),Nj=K(jr(),1),Kt=K(Rt(),1),Mj=[{title:"Text",hint:"Plain paragraph",keywords:["text","paragraph","body","p"],run:(e)=>e.chain().focus().setParagraph().run()},{title:"Heading 1",hint:"Big section heading",keywords:["h1","heading","title"],run:(e)=>e.chain().focus().toggleHeading({level:1}).run()},{title:"Heading 2",hint:"Medium heading",keywords:["h2","subheading"],run:(e)=>e.chain().focus().toggleHeading({level:2}).run()},{title:"Heading 3",hint:"Small heading",keywords:["h3"],run:(e)=>e.chain().focus().toggleHeading({level:3}).run()},{title:"Bulleted list",hint:"Unordered list",keywords:["bullet","unordered","ul","list"],run:(e)=>e.chain().focus().toggleBulletList().run()},{title:"Numbered list",hint:"Ordered list",keywords:["numbered","ordered","ol","list"],run:(e)=>e.chain().focus().toggleOrderedList().run()},{title:"To-do list",hint:"Checklist",keywords:["todo","task","checkbox","check"],run:(e)=>e.chain().focus().toggleTaskList().run()},{title:"Quote",hint:"Block quote",keywords:["quote","blockquote","citation"],run:(e)=>e.chain().focus().toggleBlockquote().run()},{title:"Code",hint:"Code block",keywords:["code","snippet","pre"],run:(e)=>e.chain().focus().toggleCodeBlock().run()},{title:"Divider",hint:"Horizontal rule",keywords:["divider","rule","hr","separator"],run:(e)=>e.chain().focus().setHorizontalRule().run()}];Kse=[{key:"bold",title:"Bold",label:Kt.jsxDEV("b",{children:"B"},void 0,!1,void 0,this),run:(e)=>e.chain().focus().toggleBold().run()},{key:"italic",title:"Italic",label:Kt.jsxDEV("i",{children:"i"},void 0,!1,void 0,this),run:(e)=>e.chain().focus().toggleItalic().run()},{key:"strike",title:"Strikethrough",label:Kt.jsxDEV("s",{children:"S"},void 0,!1,void 0,this),run:(e)=>e.chain().focus().toggleStrike().run()},{key:"highlight",title:"Highlight",label:"H",run:(e)=>e.chain().focus().toggleHighlight().run()},{key:"code",title:"Inline code",label:"</>",run:(e)=>e.chain().focus().toggleCode().run()}]});var Dj=N(()=>{Oj()});function dh(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&e.type==="doc"}function zb(e){let t=[],n=(a)=>{for(let i of a){if(i.type==="text")t.push(i.text??"");else if(i.type==="hardBreak")t.push(`
|
|
397
|
+
`);if(i.content)n(i.content);if(Gse.has(i.type))t.push(`
|
|
398
|
+
`)}};return n(e?.content??[]),t.join("").replace(/\n{2,}/g,`
|
|
399
|
+
`).trim()}var Gse;var W4=N(()=>{Gse=new Set(["paragraph","heading","listItem","taskItem","blockquote","codeBlock","horizontalRule"])});function Fd({label:e,children:t}){return ve.jsxDEV("label",{className:"flex w-full flex-col gap-2",children:[e===void 0?null:ve.jsxDEV("span",{className:"text-sm font-medium text-fg",children:e},void 0,!1,void 0,this),t]},void 0,!0,void 0,this)}function mS(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let n=(a)=>String(a).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function gS(e){let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}function Ud(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Wse(e){let[t,n]=tn.useState(0);tn.useEffect(()=>{if(e===null)return;let a=e-Date.now();if(a<=0)return;let i=setTimeout(()=>n((l)=>l+1),Math.min(a+1000,2147483647));return()=>clearTimeout(i)},[e,t])}function Yse({value:e,onChange:t}){let[n,a]=tn.useState(!1),[i,l]=tn.useState(""),c=Boolean(e),u=c?new Date(e).getTime():Number.NaN,f=Number.isFinite(u)&&u>Date.now();Wse(f?u:null);let h=!c?{text:"Not published",tone:"text-fg-muted"}:f?{text:`Scheduled for ${Ud(e)}`,tone:"text-accent-strong"}:{text:`Published ${Ud(e)}`,tone:"text-fg"},m=()=>{l(mS(e)),a((b)=>!b)};return ve.jsxDEV("div",{className:"flex flex-col gap-2",children:[ve.jsxDEV("span",{className:`text-sm ${h.tone}`,children:h.text},void 0,!1,void 0,this),ve.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[!c||f?ve.jsxDEV(we,{size:"sm",onPress:()=>{a(!1),t(new Date().toISOString())},children:"Publish now"},void 0,!1,void 0,this):null,ve.jsxDEV(we,{variant:"secondary",size:"sm",onPress:m,children:f?"Change schedule":c?"Change time":"Schedule…"},void 0,!1,void 0,this),c?ve.jsxDEV(we,{variant:"ghost",size:"sm",className:"text-danger",onPress:()=>{a(!1),t(null)},children:"Unpublish"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),n?ve.jsxDEV("input",{className:fi,type:"datetime-local",value:i,autoFocus:!0,onChange:(b)=>{l(b.target.value);let y=b.target.value?gS(b.target.value):null;if(y)t(y)}},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function ph({schema:e,value:t,onChange:n,api:a}){let i=(l,c)=>n({...t,[l]:c});return ve.jsxDEV("div",{className:"flex flex-col gap-4",children:e.map((l)=>ve.jsxDEV(_j,{def:l,value:t[l.name],onChange:(c)=>i(l.name,c),api:a,siblings:t},l.name,!1,void 0,this))},void 0,!1,void 0,this)}function _j({def:e,value:t,onChange:n,api:a,hideLabelAs:i,siblings:l}){let c=i!==void 0?void 0:ve.jsxDEV(ve.Fragment,{children:[e.label??e.name," ",e.required?ve.jsxDEV("span",{className:"text-danger",children:"*"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),u=(f)=>typeof f==="string"?f:f==null?"":JSON.stringify(f);switch(e.type){case"text":case"url":{let f=e.type==="url"?"https://…":"";return i!==void 0?ve.jsxDEV("input",{className:fi,type:"text","aria-label":i,placeholder:f,value:t??"",onChange:(h)=>n(h.target.value)},void 0,!1,void 0,this):ve.jsxDEV(On,{label:c,value:t??"",onChange:n,placeholder:f},void 0,!1,void 0,this)}case"textarea":return i!==void 0?ve.jsxDEV("textarea",{className:`${fi} h-auto min-h-20 py-2.5`,"aria-label":i,value:u(t),onChange:(f)=>n(f.target.value)},void 0,!1,void 0,this):ve.jsxDEV(Fx,{label:c,value:u(t),onChange:n},void 0,!1,void 0,this);case"richtext":return ve.jsxDEV(Fd,{label:c,children:ve.jsxDEV(Jse,{value:t,onChange:n},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"number":return ve.jsxDEV(Fd,{label:c,children:ve.jsxDEV("input",{className:fi,type:"number","aria-label":i,value:t==null?"":String(t),onChange:(f)=>n(f.target.value===""?null:Number(f.target.value))},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"date":case"datetime":return ve.jsxDEV(Fd,{label:c,children:ve.jsxDEV("input",{className:fi,type:e.type==="date"?"date":"datetime-local","aria-label":i,value:t??"",onChange:(f)=>n(f.target.value||null)},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"slug":return ve.jsxDEV(Qse,{def:e,label:c,value:typeof t==="string"?t:"",source:typeof l?.[e.from??""]==="string"?l[e.from??""]:"",onChange:n},void 0,!1,void 0,this);case"publish":return ve.jsxDEV("div",{className:"flex w-full flex-col gap-2",children:[ve.jsxDEV("span",{className:"text-sm font-medium text-fg",children:c},void 0,!1,void 0,this),ve.jsxDEV(Yse,{value:typeof t==="string"?t:"",onChange:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"boolean":return ve.jsxDEV("label",{className:"flex items-center gap-2",children:[ve.jsxDEV("input",{type:"checkbox",checked:Boolean(t),onChange:(f)=>n(f.target.checked)},void 0,!1,void 0,this),ve.jsxDEV("span",{className:"text-sm text-fg",children:e.label??e.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"select":return ve.jsxDEV(Fd,{label:c,children:ve.jsxDEV(Zse,{def:e,value:t,onChange:n,api:a,ariaLabel:i},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"media":return ve.jsxDEV(Fd,{label:c,children:ve.jsxDEV(ele,{value:t,onChange:n,api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"group":return ve.jsxDEV(Fd,{label:c,children:ve.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-muted p-3.5",children:ve.jsxDEV(ph,{schema:e.fields??[],value:t??{},onChange:n,api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"repeater":return ve.jsxDEV(Xse,{def:e,value:t??[],onChange:n,api:a,label:c},void 0,!1,void 0,this);default:return null}}function Pj(e){try{return iF(e,Ij)}catch(t){return console.error("pramen/cms-editor: could not parse editor HTML",t),{type:"doc",content:[]}}}function Lj(e){if(typeof e==="string")return e;if(!dh(e))return"";try{return aF(e,Ij)}catch(t){return console.error("pramen/cms-editor: rich-text document uses nodes this editor cannot render",t),""}}function Jse({value:e,onChange:t}){let[n,a]=tn.useState(()=>Lj(e)),i=tn.useRef(null),l=tn.useRef(!1);return tn.useEffect(()=>{if(l.current||typeof e!=="string"||e==="")return;l.current=!0;let u=Pj(e);i.current=u,t(u)},[e,t]),tn.useEffect(()=>{if(e!==null&&e===i.current)return;a(Lj(e))},[e]),ve.jsxDEV(G4,{value:n,onChange:(u)=>{a(u);let f=Pj(u);i.current=f,t(f)},minHeight:180,placeholder:"Write, or press '/' for blocks…"},void 0,!1,void 0,this)}function Xse({def:e,value:t,onChange:n,api:a,label:i}){let l=Array.isArray(t)?t:[],c=e.fields??[],u=c.length===1&&!["repeater","group","richtext","media"].includes(c[0].type),[f,h]=tn.useState(null),m=(V,P)=>n(l.map((te,Y)=>Y===V?P:te)),b=()=>n([...l,{}]),y=(V)=>n(l.filter((P,te)=>te!==V)),v=(V,P)=>{if(V===P||P<0||P>=l.length)return;let te=l.slice(),[Y]=te.splice(V,1);te.splice(P,0,Y),n(te)},S=(V,P)=>v(V,V+P),w=e.max!=null&&l.length>=e.max,E=e.min!=null&&l.length<=e.min,T=(V)=>{let P=["text","textarea","richtext","select","url"];for(let te of c){if(!P.includes(te.type))continue;let Y=V[te.name],ue=(dh(Y)?zb(Y):typeof Y==="string"?Y.replace(/<[^>]+>/g," "):"").replace(/\s+/g," ").trim();if(ue)return ue.slice(0,80)}return""},D=(V)=>({onDragOver:(P)=>{if(!f)return;P.preventDefault(),h((te)=>te&&te.over!==V?{...te,over:V}:te)},onDrop:(P)=>{if(!f)return;P.preventDefault(),v(f.from,V),h(null)}}),H=(V)=>ve.jsxDEV("span",{draggable:!0,onDragStart:(P)=>{P.dataTransfer.effectAllowed="move",P.dataTransfer.setData("text/plain",""),h({from:V,over:V})},onDragEnd:()=>h(null),className:"cursor-grab select-none px-1 text-fg-subtle transition-colors hover:text-fg active:cursor-grabbing",title:"Drag to reorder","aria-hidden":!0,children:"⠿"},void 0,!1,void 0,this),z=(V)=>`${f&&f.over===V&&f.from!==V?"ring-2 ring-brand-green":""} ${f&&f.from===V?"opacity-40":""}`,L="opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 [@media(hover:none)]:opacity-100",J=(V)=>ve.jsxDEV("div",{className:"flex shrink-0 items-center",children:[ve.jsxDEV("button",{type:"button",className:"px-1.5 text-fg-subtle hover:text-fg disabled:opacity-30",title:"Move up",disabled:V===0,onClick:()=>S(V,-1),children:"↑"},void 0,!1,void 0,this),ve.jsxDEV("button",{type:"button",className:"px-1.5 text-fg-subtle hover:text-fg disabled:opacity-30",title:"Move down",disabled:V===l.length-1,onClick:()=>S(V,1),children:"↓"},void 0,!1,void 0,this),ve.jsxDEV("button",{type:"button",className:"px-1.5 text-fg-subtle hover:text-danger disabled:opacity-30",title:"Remove",disabled:E,onClick:()=>y(V),children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return ve.jsxDEV("div",{className:"flex flex-col gap-2",children:[ve.jsxDEV("span",{className:"text-sm font-medium text-fg",children:i},void 0,!1,void 0,this),l.length===0?ve.jsxDEV("span",{className:"text-sm text-fg-muted",children:"None yet."},void 0,!1,void 0,this):null,ve.jsxDEV("div",{className:`flex flex-col ${u?"gap-1":"gap-2"}`,children:l.map((V,P)=>u?ve.jsxDEV("div",{className:`group/row flex items-center gap-1 rounded-lg px-1 py-0.5 transition-colors ${z(P)}`,...D(P),children:[H(P),ve.jsxDEV("div",{className:"min-w-0 flex-1",children:ve.jsxDEV(_j,{def:c[0],hideLabelAs:`${e.label??e.name} ${P+1}`,value:V[c[0].name],onChange:(te)=>m(P,{...V,[c[0].name]:te}),api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this),ve.jsxDEV("div",{className:"opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 [@media(hover:none)]:opacity-100",children:J(P)},void 0,!1,void 0,this)]},P,!0,void 0,this):ve.jsxDEV("div",{className:`rounded-lg border border-border bg-surface-muted transition-colors ${z(P)}`,...D(P),children:[ve.jsxDEV("div",{className:"flex items-center gap-1 border-b border-border px-2 py-1.5",children:[H(P),ve.jsxDEV("span",{className:"text-caption text-fg-subtle",children:P+1},void 0,!1,void 0,this),ve.jsxDEV("span",{className:"min-w-0 flex-1 truncate text-sm text-fg-muted",children:T(V)},void 0,!1,void 0,this),J(P)]},void 0,!0,void 0,this),ve.jsxDEV("div",{className:"p-3.5",children:ve.jsxDEV(ph,{schema:c,value:V,onChange:(te)=>m(P,te),api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},P,!0,void 0,this))},void 0,!1,void 0,this),ve.jsxDEV(we,{variant:"secondary",size:"sm",className:"self-start",onPress:b,isDisabled:w,children:["+ Add ",e.label??e.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function fh(e){return Bj(e).replace(/-+$/,"")}function Bj(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/-{2,}/g,"-").replace(/^-+/,"").slice(0,80)}function Qse({def:e,label:t,value:n,source:a,onChange:i}){let l=tn.useRef(null),c=tn.useRef(!1),u=tn.useRef(null);tn.useEffect(()=>{if(!e.from)return;let m=u.current;if(u.current=a,m===null||m===a||!a)return;if(c.current)return;if(n!==""&&n!==l.current)return;let b=fh(a);if(b===n)return;l.current=b,i(b)},[a,n,e.from,i]);let f=a?fh(a):"",h=Boolean(f)&&f!==n;return ve.jsxDEV(Fd,{label:t,children:[ve.jsxDEV("input",{className:fi,value:n,onChange:(m)=>{c.current=!0,l.current=null,i(Bj(m.target.value))},onBlur:()=>{let m=fh(n);if(m!==n)i(m)},placeholder:f},void 0,!1,void 0,this),h?ve.jsxDEV("button",{type:"button",className:"self-start text-caption text-fg-subtle underline hover:text-fg",onClick:()=>{l.current=f,c.current=!1,i(f)},children:["Generate from ",e.from,": ",f]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function Zse({def:e,value:t,onChange:n,api:a,ariaLabel:i}){let[l,c]=tn.useState(null),u=e.optionsFrom;tn.useEffect(()=>{if(!u)return;let m=!0;return a.call(u).then((b)=>{if(m)c(Array.isArray(b)?b:[])}).catch(()=>{if(m)c([])}),()=>{m=!1}},[u,a]);let f=Boolean(u)&&l===null,h=u?l??[]:(e.options??[]).map((m)=>({value:m,label:m}));return ve.jsxDEV("select",{className:fi,"aria-label":i,value:t??"",onChange:(m)=>n(m.target.value||null),children:[ve.jsxDEV("option",{value:"",children:f?"Načítám…":"—"},void 0,!1,void 0,this),h.map((m)=>ve.jsxDEV("option",{value:m.value,children:m.label},m.value,!1,void 0,this))]},void 0,!0,void 0,this)}function ele({value:e,onChange:t,api:n}){let[a,i]=tn.useState(!1),[l,c]=tn.useState(null);return tn.useEffect(()=>{if(e)n.call("getMedia",{id:e}).then(c).catch(()=>c(null));else c(null)},[e,n]),ve.jsxDEV("div",{children:[ve.jsxDEV("div",{className:"flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",children:[l?ve.jsxDEV("img",{className:"h-10 w-10 rounded object-cover",src:n.resolve(`/media/${l.file.key}`),alt:""},void 0,!1,void 0,this):ve.jsxDEV("span",{className:"text-fg-subtle",children:"no media"},void 0,!1,void 0,this),ve.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:l?.file.filename??e??""},void 0,!1,void 0,this),ve.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>i(!0),children:"pick"},void 0,!1,void 0,this),e?ve.jsxDEV(we,{variant:"ghost",size:"sm",className:"text-danger",onPress:()=>t(null),children:"clear"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),a?ve.jsxDEV(tle,{api:n,onClose:()=>i(!1),onPick:(u)=>{t(u),i(!1)}},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function tle({api:e,onClose:t,onPick:n}){let[a,i]=tn.useState([]),[l,c]=tn.useState(!1),[u,f]=tn.useState(""),h=()=>e.listMedia().then(i).catch((b)=>f(String(b.message??b)));tn.useEffect(()=>{h()},[]);let m=async(b)=>{c(!0),f("");try{let y=await e.uploadMedia(b);n(y.id)}catch(y){f(String(y.message??y))}finally{c(!1)}};return ve.jsxDEV(Ux,{isOpen:!0,isDismissable:!0,onOpenChange:(b)=>!b&&t(),children:ve.jsxDEV(Vx,{className:"w-full max-w-[680px] px-9 py-8",children:ve.jsxDEV(jx,{className:"max-h-[86vh] overflow-auto outline-none",children:[ve.jsxDEV(Gx,{level:"1",className:"mb-5 font-normal",children:["Choose ",ve.jsxDEV("span",{className:"text-fg-subtle",children:"a file"},void 0,!1,void 0,this)," from the library"]},void 0,!0,void 0,this),u?ve.jsxDEV("div",{className:"my-2 rounded-lg border border-danger bg-surface-card px-3.5 py-2.5 text-small text-danger",children:u},void 0,!1,void 0,this):null,ve.jsxDEV("label",{className:"mb-4 flex w-full flex-col gap-2",children:[ve.jsxDEV(qx,{size:"small",weight:"medium",children:"Upload a new file"},void 0,!1,void 0,this),ve.jsxDEV("input",{type:"file",className:"text-small text-fg-muted",disabled:l,onChange:(b)=>b.target.files?.[0]&&m(b.target.files[0])},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ve.jsxDEV("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5",children:a.map((b)=>ve.jsxDEV("div",{className:"cursor-pointer overflow-hidden rounded-lg border border-border bg-surface-card",onClick:()=>n(b.id),children:[(b.file.contentType??"").startsWith("image/")?ve.jsxDEV("img",{className:"block h-[130px] w-full object-cover",src:e.resolve(`/media/${b.file.key}`),alt:""},void 0,!1,void 0,this):ve.jsxDEV("div",{className:"h-[130px] bg-surface-muted"},void 0,!1,void 0,this),ve.jsxDEV("div",{className:"truncate px-2 py-1.5 text-caption text-fg-muted",children:b.file.filename??b.id},void 0,!1,void 0,this)]},b.id,!0,void 0,this))},void 0,!1,void 0,this),ve.jsxDEV("div",{className:"mt-3 text-right",children:ve.jsxDEV(we,{variant:"ghost",onPress:t,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 tn,ve,fi="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",Ij;var zj=N(()=>{Zi();Dj();Ye();V4();K4();j4();U4();W4();tn=K(ae(),1),ve=K(Rt(),1);Ij=[uS.configure({heading:{levels:[1,2,3]},link:{openOnClick:!1,autolink:!0}}),dS,fS,pS.configure({nested:!0})]});function Y4(e){return e?Hj:Hj.filter((t)=>t!=="i18n")}function Fb({lead:e,em:t,children:n}){return O.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:[O.jsxDEV("h1",{className:"m-0 text-[56px] font-normal leading-[1.05] tracking-[-0.01em] max-[820px]:text-[40px]",children:[O.jsxDEV("span",{className:"block text-fg-subtle",children:e},void 0,!1,void 0,this),O.jsxDEV("span",{className:"block text-fg",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n]},void 0,!0,void 0,this)}function bS({text:e,em:t,children:n}){return O.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:[O.jsxDEV("span",{className:"text-callout text-fg-on-brand",children:[e," ",O.jsxDEV("span",{className:"font-semibold",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n]},void 0,!0,void 0,this)}function bl({children:e}){return O.jsxDEV("div",{className:"mb-2 mt-[18px] text-sm text-fg-subtle first:mt-0",children:e},void 0,!1,void 0,this)}function yl({status:e,children:t}){return O.jsxDEV("span",{className:`inline-block whitespace-nowrap rounded-full border px-2.5 py-0.5 text-caption font-medium ${e==="published"||e==="active"?"bg-brand-green text-fg-on-brand border-transparent":e==="in_review"||e==="review"?"bg-accent-yellow text-fg-on-brand border-transparent":e==="rejected"||e==="archived"||e==="inactive"?"border-danger text-danger bg-surface-card":"border-border text-fg-muted bg-surface-card"}`,children:t},void 0,!1,void 0,this)}function J4({onClose:e,wide:t,children:n}){return O.jsxDEV(Ux,{isOpen:!0,isDismissable:!0,onOpenChange:(a)=>!a&&e(),children:O.jsxDEV(Vx,{className:`w-full px-9 py-8 ${t?"max-w-[680px]":"max-w-[520px]"}`,children:O.jsxDEV(jx,{className:"max-h-[86vh] overflow-auto outline-none",children:n},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function X4({children:e}){return O.jsxDEV(Gx,{level:"1",className:"mb-5 font-normal",children:e},void 0,!1,void 0,this)}function yS({children:e,className:t}){return O.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 ${t??""}`,children:e},void 0,!1,void 0,this)}function Kj({children:e}){return O.jsxDEV("div",{className:"overflow-auto rounded-lg border border-border bg-surface-card p-6",children:e},void 0,!1,void 0,this)}function mh({ok:e,children:t}){return O.jsxDEV("div",{className:`my-2 rounded-lg border px-3.5 py-2.5 text-small ${e?"border-brand-green bg-brand-green/20 text-fg":"border-danger bg-surface-card text-danger"}`,children:t},void 0,!1,void 0,this)}function qj({api:e,pages:t,blockTypes:n,onOpen:a,onCreated:i,onError:l}){let{cms:{multilingual:c}}=Kn(),[u,f]=ce.useState(!1);return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Fb,{lead:"Pages",em:t.length===0?"None yet":t.length===1?"1 page total":`${t.length} pages total`,children:O.jsxDEV(bS,{text:"Let's",em:"create something",children:O.jsxDEV(we,{className:"shrink-0",onPress:()=>f(!0),children:"+ New page"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:hh,children:O.jsxDEV("div",{className:"flex flex-col gap-2",children:[t.map((h)=>O.jsxDEV("div",{className:`${Yc} cursor-pointer hover:bg-surface-muted`,onClick:()=>a(h),children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:h.title},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:["/",h.slug]},void 0,!0,void 0,this),c?O.jsxDEV("span",{className:"text-fg-subtle",children:h.locale},void 0,!1,void 0,this):null,O.jsxDEV(yl,{status:h.status,children:h.status},void 0,!1,void 0,this)]},h.id,!0,void 0,this)),t.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:["No pages yet. ",n.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),u?O.jsxDEV(nle,{api:e,onClose:()=>f(!1),onCreated:()=>{f(!1),i()},onError:l},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function nle({api:e,onClose:t,onCreated:n,onError:a}){let[i,l]=ce.useState([]),[c,u]=ce.useState(""),[f,h]=ce.useState(""),[m,b]=ce.useState("");ce.useEffect(()=>{e.listContentTypes().then((v)=>{if(l(v),v[0])u(v[0].id)}).catch((v)=>a(ut(v)))},[e,a]);let y=async()=>{try{await e.call("createPage",{typeId:c,title:f,slug:m||fh(f)}),n()}catch(v){a(ut(v))}};return O.jsxDEV(J4,{onClose:t,children:[O.jsxDEV(X4,{children:["Create a ",O.jsxDEV(Hb,{children:"new page"},void 0,!1,void 0,this)," and define the essentials",O.jsxDEV(Hb,{children:"."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV("div",{className:"flex w-full flex-col gap-2",children:[O.jsxDEV("span",{className:"text-sm font-medium text-fg",children:"Content type"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-wrap gap-2",children:i.map((v)=>O.jsxDEV("button",{type:"button",onClick:()=>u(v.id),className:`rounded-lg border px-4 py-2.5 text-sm font-medium transition-colors ${c===v.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:v.name},v.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV(On,{label:"Title",value:f,onChange:h},void 0,!1,void 0,this),O.jsxDEV(On,{label:"Slug",value:m,onChange:b,placeholder:fh(f)},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex justify-end gap-2",children:[O.jsxDEV(we,{variant:"ghost",onPress:t,children:"cancel"},void 0,!1,void 0,this),O.jsxDEV(we,{onPress:y,isDisabled:!c||!f,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 Fj(e){if(e==null)return"";if(typeof e==="boolean")return e?"yes":"no";if(Array.isArray(e))return e.length===1?"1 item":`${e.length} items`;if(dh(e)){let t=zb(e).replace(/\s+/g," ").trim();return t.length>80?t.slice(0,80)+"…":t}if(typeof e==="object")return"—";return String(e)}function Gj({api:e,def:t,onOpen:n,onNew:a,onError:i}){let[l,c]=ce.useState([]),[u,f]=ce.useState(0),[h,m]=ce.useState(!1),[b,y]=ce.useState(!0),v=ce.useCallback((w)=>(y(!0),e.call("collectionList",{collection:t.slug,limit:Uj,offset:w}).then((E)=>{c((T)=>w===0?E:[...T,...E]),m(E.length===Uj),f(w+E.length)}).catch((E)=>i(ut(E))).finally(()=>y(!1))),[e,t.slug,i]);ce.useEffect(()=>{c([]),f(0),m(!1),v(0)},[v]);let S=(w)=>t.fields.find((E)=>E.name===w)?.label??w;return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Fb,{lead:t.pluralLabel,em:l.length===0?"None yet":l.length===1?`1 ${t.label.toLowerCase()}`:`${l.length}${h?"+":""} ${t.pluralLabel.toLowerCase()}`,children:O.jsxDEV(bS,{text:"Let's",em:`add a ${t.label.toLowerCase()}`,children:O.jsxDEV(we,{className:"shrink-0",onPress:a,children:["+ New ",t.label.toLowerCase()]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:hh,children:[O.jsxDEV("div",{className:"flex flex-col gap-2",children:[l.map((w)=>{let E=String(w[t.idField]??""),[T,...D]=t.list;return O.jsxDEV("div",{className:`${Yc} cursor-pointer hover:bg-surface-muted`,onClick:()=>n(E),children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:Fj(w[T??t.titleField])||O.jsxDEV(Hb,{children:"untitled"},void 0,!1,void 0,this)},void 0,!1,void 0,this),D.map((H)=>O.jsxDEV("span",{className:"truncate text-fg-subtle",title:S(H),children:Fj(w[H])},H,!1,void 0,this))]},E,!0,void 0,this)}),!b&&l.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:["No ",t.pluralLabel.toLowerCase()," yet. Create one."]},void 0,!0,void 0,this):null,b?O.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),h&&!b?O.jsxDEV("div",{className:"mt-3.5 text-center",children:O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>void v(u),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 rle({api:e,def:t,id:n,values:a,onChanged:i,onError:l}){let c=t.supports??[],[u,f]=ce.useState(!1),[h,m]=ce.useState(!1),[b,y]=ce.useState(""),[v,S]=ce.useState(""),[w,E]=ce.useState(null),[T,D]=ce.useState(null),H=typeof a.status==="string"?a.status:"draft",z=H==="published",L=(U)=>typeof a[U]==="string"&&a[U]!==""?a[U]:null,J=L("scheduledAt"),V=L("unpublishAt"),P=L("publishedAt");if(c.length===0)return null;let te=async(U,W={})=>{f(!0);try{let Q=await e.call(U,{collection:t.slug,id:n,...W});if(Q&&typeof Q==="object"&&t.idField in Q)i(Q);else{let pe=await e.call("collectionGet",{collection:t.slug,id:n});if(pe)i(pe)}return!0}catch(Q){return l(ut(Q)),!1}finally{f(!1)}},Y=async()=>{let U=b?gS(b):null;if(!U)return l("Pick a publication date and time first.");let W=v?gS(v):null;if(v&&!W)return l("That takedown date is not a valid date and time.");if(await te("collectionSchedule",{publishAt:Date.parse(U),unpublishAt:W?Date.parse(W):null}))m(!1)},ge=()=>{y(mS(J??P??new Date().toISOString())),S(V?mS(V):""),m((U)=>!U)},ue=async()=>{f(!0);try{let U=await e.call("signCollectionPreview",{collection:t.slug,id:n}),W=e.resolve(U.url);E(W),await navigator.clipboard?.writeText(W).catch(()=>{})}catch(U){l(ut(U))}finally{f(!1)}},ie=async()=>{if(T)return D(null);try{D(await e.call("collectionListRevisions",{collection:t.slug,id:n}))}catch(U){l(ut(U))}},_=async(U)=>{if(!confirm("Restore this version? The current content is snapshotted first, so this is itself undoable."))return;if(await te("collectionRestoreRevision",{revisionId:U}))D(null)};return O.jsxDEV("div",{className:"flex flex-col gap-3 rounded-[14px] border border-border bg-surface-card px-[18px] py-4",children:[O.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[O.jsxDEV("span",{className:"text-fg-subtle",children:"Status"},void 0,!1,void 0,this),O.jsxDEV(yl,{status:H,children:H},void 0,!1,void 0,this),P&&z?O.jsxDEV("span",{className:"text-fg-subtle",children:["since ",Ud(P)]},void 0,!0,void 0,this):null,J?O.jsxDEV("span",{className:"text-accent-strong",children:["publishes ",Ud(J)]},void 0,!0,void 0,this):null,V?O.jsxDEV("span",{className:"text-danger",children:["comes down ",Ud(V)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[c.includes("drafts")&&!z?O.jsxDEV(we,{size:"sm",isDisabled:u,onPress:()=>void te("collectionPublish"),children:"Publish now"},void 0,!1,void 0,this):null,c.includes("drafts")&&z?O.jsxDEV(we,{variant:"secondary",size:"sm",isDisabled:u,onPress:()=>void te("collectionUnpublish"),children:"Unpublish"},void 0,!1,void 0,this):null,c.includes("scheduling")?O.jsxDEV(we,{variant:"secondary",size:"sm",isDisabled:u,onPress:ge,children:J?"Change schedule":"Schedule…"},void 0,!1,void 0,this):null,c.includes("preview")?O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:u,onPress:()=>void ue(),children:"Preview link"},void 0,!1,void 0,this):null,c.includes("revisions")?O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:u,onPress:()=>void ie(),children:T?"Hide history":"History"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),h?O.jsxDEV("div",{className:"flex flex-col gap-2 border-t border-border pt-3",children:[O.jsxDEV("label",{className:"flex flex-col gap-1 text-sm",children:[O.jsxDEV("span",{className:"font-medium text-fg",children:"Publish at"},void 0,!1,void 0,this),O.jsxDEV("input",{className:fi,type:"datetime-local",value:b,onChange:(U)=>y(U.target.value)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("label",{className:"flex flex-col gap-1 text-sm",children:[O.jsxDEV("span",{className:"font-medium text-fg",children:"Take down at (optional)"},void 0,!1,void 0,this),O.jsxDEV("input",{className:fi,type:"datetime-local",value:v,onChange:(U)=>S(U.target.value)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("p",{className:"text-fg-subtle",children:"Scheduling does not take a live row down — it publishes at the first instant. A takedown must be after the publication time. Leave it empty to cancel one."},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex gap-2",children:[O.jsxDEV(we,{size:"sm",isDisabled:u,onPress:()=>void Y(),children:"Save schedule"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>m(!1),children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null,w?O.jsxDEV("div",{className:"border-t border-border pt-3 text-sm",children:[O.jsxDEV("span",{className:"text-fg-subtle",children:"Preview link (copied): "},void 0,!1,void 0,this),O.jsxDEV("a",{className:"break-all underline",href:w,target:"_blank",rel:"noreferrer",children:w},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,T?O.jsxDEV("div",{className:"flex flex-col gap-2 border-t border-border pt-3",children:[T.map((U)=>O.jsxDEV("div",{className:`${Yc} text-xs`,children:[O.jsxDEV("span",{className:"rounded-full bg-surface-muted px-2 py-0.5 font-mono text-xs text-fg-muted",children:["#",U.revision]},void 0,!0,void 0,this),O.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:[U.note??"edit"," · ",U.actor??"system"," · ",Ud(U.createdAt)]},void 0,!0,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:u,onPress:()=>void _(U.id),children:"Restore"},void 0,!1,void 0,this)]},U.id,!0,void 0,this)),T.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"No history yet."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function Wj({api:e,def:t,id:n,onSaved:a,onDeleted:i,onBack:l,onError:c}){let u=n===null,[f,h]=ce.useState({}),[m,b]=ce.useState(!u),[y,v]=ce.useState(!1),[S,w]=ce.useState(!1),[E,T]=ce.useState(!1);ce.useEffect(()=>{if(u){h({});return}let z=!0;return b(!0),v(!1),e.call("collectionGet",{collection:t.slug,id:n}).then((L)=>{if(!z)return;if(L)h(L);else v(!0)}).catch((L)=>c(ut(L))).finally(()=>{if(z)b(!1)}),()=>{z=!1}},[e,t.slug,n,u,c]);let D=async()=>{w(!0);try{if(u)await e.call("collectionCreate",{collection:t.slug,values:f}),a();else{let z=await e.call("collectionUpdate",{collection:t.slug,id:n,values:f});if(z)h(z);T(!0),setTimeout(()=>T(!1),1200)}}catch(z){c(ut(z))}finally{w(!1)}},H=async()=>{if(u||!confirm(`Delete this ${t.label.toLowerCase()}? This cannot be undone.`))return;w(!0);try{await e.call("collectionDelete",{collection:t.slug,id:n}),i()}catch(z){c(ut(z))}finally{w(!1)}};return O.jsxDEV("div",{className:hh,children:[O.jsxDEV("div",{className:"mb-4 mt-2 flex items-center gap-3",children:[O.jsxDEV(we,{variant:"ghost",size:"sm",onPress:l,children:["← ",t.pluralLabel]},void 0,!0,void 0,this),O.jsxDEV("h1",{className:"text-[22px] font-normal text-fg",children:u?`New ${t.label.toLowerCase()}`:`Edit ${t.label.toLowerCase()}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y?O.jsxDEV("p",{className:"text-fg-subtle",children:"Not found."},void 0,!1,void 0,this):m?O.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this):O.jsxDEV("div",{className:"flex max-w-[720px] flex-col gap-4",children:[E?O.jsxDEV(mh,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,!u&&n?O.jsxDEV(rle,{api:e,def:t,id:n,values:f,onChanged:h,onError:c},void 0,!1,void 0,this):null,O.jsxDEV(ph,{schema:t.fields,value:f,onChange:h,api:e},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex items-center gap-2",children:[O.jsxDEV(we,{onPress:D,isDisabled:S,children:S?"Saving…":u?"Create":"Save"},void 0,!1,void 0,this),!u?O.jsxDEV(we,{variant:"ghost",className:"text-danger",onPress:H,isDisabled:S,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 Yj({api:e,page:t,blockTypes:n,tab:a,onTab:i,onBack:l,onChange:c,registerGuard:u}){let{cms:{multilingual:f}}=Kn(),[h,m]=ce.useState(null),[b,y]=ce.useState(null),[v,S]=ce.useState(""),w=ce.useRef(new Set),[E,T]=ce.useState(0),D=ce.useCallback((k,X)=>{let de=w.current;if(X?de.has(k):!de.has(k))return;if(X)de.add(k);else de.delete(k);T(de.size)},[]),H=ce.useCallback(()=>w.current.size===0||window.confirm(`You have ${w.current.size} unsaved change${w.current.size===1?"":"s"}. Leave without saving?`),[]);ce.useEffect(()=>(u(H),()=>u(null)),[u,H]);let z=ce.useMemo(()=>new Map(n.map((k)=>[k.slug,k])),[n]),L=ce.useCallback(async()=>{try{let[k,X]=await Promise.all([e.getContentType(t.typeId),e.getPagePreview(t.slug,t.locale)]);m(k??null),y(X)}catch(k){S(ut(k))}},[e,t.typeId,t.slug,t.locale]);ce.useEffect(()=>{L()},[L]),ce.useEffect(()=>{if(E===0)return;let k=(X)=>{X.preventDefault(),X.returnValue=""};return window.addEventListener("beforeunload",k),()=>window.removeEventListener("beforeunload",k)},[E]);let J=h?.regions??[],V=h?.fieldsSchema??[],P=(k,X)=>y((de)=>de?{...de,regions:{...de.regions,[k]:X(de.regions[k]??[])}}:de),te=async(k,X,de)=>{let xe=`tmp:${crypto.randomUUID()}`,Re=(b?.regions[k]??[]).map((Ce)=>Ce.id),Ke=de!=null&&de>=0&&de<Re.length?de:Re.length;P(k,(Ce)=>{let Je=[...Ce];return Je.splice(Ke,0,{id:xe,block_id:xe,block_type:X,title:null,fields:{},is_shared:!1,pending:!0}),Je});try{let{block:Ce,placement:Je}=await e.call("addBlock",{pageId:t.id,blockTypeSlug:X,region:k,fields:{}}),he={id:String(Je.id),block_id:String(Ce.id),block_type:X,title:Ce.title??null,fields:Ce.fields??{},is_shared:Boolean(Je.isShared)};if(P(k,(Ne)=>Ne.map((xt)=>xt.id===xe?he:xt)),Ke<Re.length){let Ne=[...Re];Ne.splice(Ke,0,he.id),await ge(k,Ne)}}catch(Ce){P(k,(Je)=>Je.filter((he)=>he.id!==xe)),S(ut(Ce))}},Y=async(k)=>{try{await e.call("removeBlock",{pageBlockId:k.id}),await L()}catch(X){S(ut(X))}},ge=async(k,X)=>{try{await e.call("reorderRegion",{pageId:t.id,region:k,order:X}),await L()}catch(de){S(ut(de))}},ue=ce.useCallback((k,X)=>{y((de)=>{if(!de)return de;let xe={};for(let[Re,Ke]of Object.entries(de.regions))xe[Re]=Ke.map((Ce)=>Ce.id===k?{...Ce,fields:X}:Ce);return{...de,regions:xe}})},[]),[ie,_]=ce.useState(null),U=(k,X)=>_({region:k,from:X,over:X}),W=(k,X)=>_((de)=>de&&de.region===k&&de.over!==X?{...de,over:X}:de),Q=()=>_(null),pe=(k)=>{if(_(null),!ie||ie.region!==k||ie.from===ie.over)return;let X=(b?.regions[k]??[]).map((xe)=>xe.id),[de]=X.splice(ie.from,1);X.splice(ie.over,0,de),ge(k,X)},re=E>0?O.jsxDEV("span",{className:"text-[11px] text-accent-strong",children:["● ",E," unsaved change",E===1?"":"s"]},void 0,!0,void 0,this):null;return O.jsxDEV("div",{className:`grid min-h-[calc(100vh-68px)] gap-5 px-7 pb-7 pt-2 max-[820px]:grid-cols-1 ${J.length?"grid-cols-[260px_1fr_400px]":"grid-cols-[1fr_400px]"}`,children:[J.length===0?null:O.jsxDEV("div",{className:"overflow-auto rounded-panel bg-surface-muted p-[18px]",children:[O.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>{if(H())l()},children:"← all pages"},void 0,!1,void 0,this),re?O.jsxDEV("p",{className:"mt-2",children:re},void 0,!1,void 0,this):null,O.jsxDEV(bl,{children:"Regions"},void 0,!1,void 0,this),J.map((k)=>O.jsxDEV("div",{className:`${Yc} mb-2`,children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:k.label??k.name},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:(b?.regions[k.name]??[]).length},void 0,!1,void 0,this)]},k.name,!0,void 0,this)),O.jsxDEV(bl,{children:"Status"},void 0,!1,void 0,this),O.jsxDEV("div",{className:Yc,children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:t.title},void 0,!1,void 0,this),O.jsxDEV(yl,{status:t.status,children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"overflow-auto py-1.5 pl-8 pr-2",children:[v?O.jsxDEV(mh,{children:v},void 0,!1,void 0,this):null,J.length===0?O.jsxDEV("div",{className:"mb-2 flex items-center gap-2",children:[O.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>{if(H())l()},children:"← all pages"},void 0,!1,void 0,this),O.jsxDEV(yl,{status:t.status,children:t.status},void 0,!1,void 0,this),re]},void 0,!0,void 0,this):null,V.length?O.jsxDEV(ile,{api:e,page:t,schema:V,initialFields:b?.page.fields??{},onDirtyChange:D,onError:S},void 0,!1,void 0,this):null,J.map((k)=>{let X=b?.regions[k.name]??[],de=k.allowedTypes&&k.allowedTypes.length?k.allowedTypes:n.map((xe)=>xe.slug);return O.jsxDEV("div",{className:"mb-10",children:[O.jsxDEV("div",{className:"mb-1 text-caption font-medium uppercase tracking-wide text-fg-subtle",children:k.label??k.name},void 0,!1,void 0,this),X.map((xe,Re)=>O.jsxDEV("div",{children:[O.jsxDEV(Vj,{compact:!0,allowed:de,btBySlug:z,onAdd:(Ke)=>te(k.name,Ke,Re)},void 0,!1,void 0,this),O.jsxDEV(ole,{api:e,block:xe,blockType:z.get(xe.block_type),isFirst:Re===0,isLast:Re===X.length-1,onMove:(Ke)=>$le(X,k.name,Re,Ke,ge),onRemove:()=>Y(xe),onPatch:ue,onDirtyChange:D,onError:S,dragging:ie?.region===k.name&&ie.from===Re,isOver:!!ie&&ie.region===k.name&&ie.over===Re&&ie.from!==Re,onDragStartBlock:()=>U(k.name,Re),onDragOverBlock:()=>W(k.name,Re),onDropBlock:()=>pe(k.name),onDragEndBlock:Q},void 0,!1,void 0,this)]},xe.id,!0,void 0,this)),O.jsxDEV("div",{className:"mt-1",children:O.jsxDEV(Vj,{allowed:de,btBySlug:z,onAdd:(xe)=>te(k.name,xe)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},k.name,!0,void 0,this)}),J.length===0&&V.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"This page's content type defines no fields or regions."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"overflow-auto rounded-panel border border-border bg-surface-card p-5",children:[O.jsxDEV("div",{className:"mb-3 flex gap-1",children:Y4(f).map((k)=>O.jsxDEV(we,{variant:"ghost",size:"sm",className:a===k?"bg-surface-muted text-fg":"text-fg-muted",onPress:()=>i(k),children:k},k,!1,void 0,this))},void 0,!1,void 0,this),a==="settings"?O.jsxDEV(ale,{api:e,page:t,onSaved:c,onError:S},void 0,!1,void 0,this):null,a==="seo"?O.jsxDEV(sle,{api:e,page:t,onError:S},void 0,!1,void 0,this):null,a==="workflow"?O.jsxDEV(lle,{api:e,page:t,onChanged:(k)=>{c(k)},onError:S},void 0,!1,void 0,this):null,a==="i18n"&&f?O.jsxDEV(cle,{api:e,page:t,onError:S},void 0,!1,void 0,this):null,a==="audit"?O.jsxDEV(ule,{api:e,pageId:t.id,onError:S},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function ole({api:e,block:t,blockType:n,isFirst:a,isLast:i,onMove:l,onRemove:c,onPatch:u,onDirtyChange:f,onError:h,dragging:m,isOver:b,onDragStartBlock:y,onDragOverBlock:v,onDropBlock:S,onDragEndBlock:w}){let[E,T]=ce.useState(null),[D,H]=ce.useState(!1),[z,L]=ce.useState("idle"),J=ce.useRef(""),V=ce.useRef(null),P=t.block_id,te=t.id;ce.useEffect(()=>{if(t.pending){T({}),J.current="{}";return}let W=!0;return e.call("getBlock",{blockId:P}).then((Q)=>{if(!W)return;let pe=Q?.fields??{};T(pe),J.current=JSON.stringify(pe)}).catch((Q)=>h(ut(Q))),()=>{W=!1}},[e,P,h,t.pending]);let Y=E!=null&&JSON.stringify(E)!==J.current,ge=ce.useCallback(async()=>{if(t.pending||E==null)return;let W=JSON.stringify(E);if(W===J.current)return;L("saving");try{await e.call("updateBlock",{blockId:P,fields:E}),J.current=W,u(te,E),L("saved"),setTimeout(()=>L((Q)=>Q==="saved"?"idle":Q),1500)}catch(Q){h(ut(Q)),L("idle")}},[e,P,te,E,u,h,t.pending]),ue=ce.useRef(ge);ue.current=ge,ce.useEffect(()=>{if(E==null||t.pending)return;if(JSON.stringify(E)===J.current)return;let W=setTimeout(()=>void ue.current(),800);return()=>clearTimeout(W)},[E,t.pending]);let ie=(W)=>T(W);ce.useEffect(()=>{f(te,Y)},[Y,te,f]),ce.useEffect(()=>()=>{f(te,!1)},[te,f]);let _=n?.fieldsSchema??[],U=n?.name??t.block_type;return O.jsxDEV("div",{ref:V,className:`group relative rounded-lg px-2 py-1 transition-colors ${b?"ring-2 ring-brand-green":""} ${m?"opacity-40":""} ${t.pending?"pointer-events-none opacity-60":""}`,onDragOver:(W)=>{W.preventDefault(),v()},onDrop:(W)=>{W.preventDefault(),S()},children:[O.jsxDEV("span",{draggable:!0,onDragStart:(W)=>{if(V.current)W.dataTransfer.setDragImage(V.current,12,12);W.dataTransfer.effectAllowed="move",W.dataTransfer.setData("text/plain",""),y()},onDragEnd:w,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),O.jsxDEV("div",{className:"flex items-center gap-2 opacity-60 transition-opacity group-hover:opacity-100",children:[O.jsxDEV("button",{type:"button",className:"w-4 shrink-0 text-fg-subtle hover:text-fg",title:D?"Expand":"Collapse",onClick:()=>H((W)=>!W),children:D?"▸":"▾"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-caption font-medium uppercase tracking-wide text-fg-subtle",children:U},void 0,!1,void 0,this),t.is_shared?O.jsxDEV("span",{className:"text-caption text-accent-strong",children:"shared"},void 0,!1,void 0,this):null,O.jsxDEV("span",{className:`text-caption ${Y&&z!=="saving"?"text-accent-strong":"text-fg-subtle"}`,children:z==="saving"?"saving…":z==="saved"?"saved ✓":Y?"● unsaved":""},void 0,!1,void 0,this),O.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:a,onPress:()=>l(-1),children:"↑"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:i,onPress:()=>l(1),children:"↓"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",className:"text-danger",onPress:c,children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),D?O.jsxDEV("div",{className:"cursor-pointer truncate pb-1 pl-6 text-small text-fg-subtle",onClick:()=>H(!1),children:E==null?"…":xle(E)||O.jsxDEV("span",{className:"italic",children:"empty"},void 0,!1,void 0,this)},void 0,!1,void 0,this):O.jsxDEV("div",{className:"pb-1 pl-6",children:E==null?O.jsxDEV("p",{className:"text-small text-fg-subtle",children:"loading…"},void 0,!1,void 0,this):_.length===0?O.jsxDEV("p",{className:"text-small text-fg-subtle",children:"This block has no editable fields."},void 0,!1,void 0,this):O.jsxDEV(O.Fragment,{children:[O.jsxDEV(ph,{schema:_,value:E,onChange:ie,api:e},void 0,!1,void 0,this),Y||z==="saving"?O.jsxDEV("div",{className:"mt-2 flex items-center gap-2",children:[O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>void ge(),isDisabled:!Y||z==="saving"||t.pending,children:z==="saving"?"Saving…":"Save now"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-caption text-fg-subtle",children:z==="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 Vj({allowed:e,btBySlug:t,onAdd:n,compact:a}){let[i,l]=ce.useState(!1),[c,u]=ce.useState(""),[f,h]=ce.useState(0),m=ce.useRef(null),b=ce.useMemo(()=>{let S=e.map((E)=>({slug:E,name:t.get(E)?.name??E})),w=c.trim().toLowerCase();return w?S.filter((E)=>E.name.toLowerCase().includes(w)||E.slug.toLowerCase().includes(w)):S},[e,t,c]);ce.useEffect(()=>{if(i)m.current?.focus()},[i]),ce.useEffect(()=>{h(0)},[c]);let y=()=>{l(!1),u("")},v=(S)=>{if(S)n(S);y()};if(!i){if(a)return O.jsxDEV("button",{type:"button",onClick:()=>l(!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:O.jsxDEV("span",{className:"flex h-full w-full items-center",children:[O.jsxDEV("span",{className:"h-px flex-1 bg-brand-green/40"},void 0,!1,void 0,this),O.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),O.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 O.jsxDEV("button",{type:"button",onClick:()=>l(!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:[O.jsxDEV("span",{className:"text-base leading-none",children:"+"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Add block"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}return O.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-card p-1 shadow-md",children:[O.jsxDEV("input",{ref:m,value:c,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:(S)=>u(S.target.value),onBlur:()=>setTimeout(y,120),onKeyDown:(S)=>{if(S.key==="Escape")y();else if(S.key==="ArrowDown")S.preventDefault(),h((w)=>(w+1)%Math.max(b.length,1));else if(S.key==="ArrowUp")S.preventDefault(),h((w)=>(w-1+Math.max(b.length,1))%Math.max(b.length,1));else if(S.key==="Enter")S.preventDefault(),v(b[f]?.slug)}},void 0,!1,void 0,this),O.jsxDEV("div",{className:"max-h-64 overflow-auto",children:b.length===0?O.jsxDEV("div",{className:"px-2.5 py-2 text-small text-fg-subtle",children:"No matching block types"},void 0,!1,void 0,this):b.map((S,w)=>O.jsxDEV("button",{type:"button",onMouseEnter:()=>h(w),onMouseDown:(E)=>E.preventDefault(),onClick:()=>v(S.slug),className:`flex w-full items-center rounded-md px-2.5 py-1.5 text-left text-small ${w===f?"bg-surface-muted text-fg":"text-fg-muted hover:bg-surface-muted"}`,children:S.name},S.slug,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function ale({api:e,page:t,onSaved:n,onError:a}){let{cms:{multilingual:i,locales:l}}=Kn(),[c,u]=ce.useState(t.title),[f,h]=ce.useState(t.slug),[m,b]=ce.useState(t.locale),[y,v]=ce.useState(!1),[S,w]=ce.useState(!1);ce.useEffect(()=>{u(t.title),h(t.slug),b(t.locale)},[t.id,t.title,t.slug,t.locale]);let E=async()=>{w(!0);try{let T=i?{title:c,slug:f.trim(),locale:m}:{title:c,slug:f.trim()},D=await e.call("updatePage",{pageId:t.id,...T});if(D?.page)n(D.page);v(!0),setTimeout(()=>v(!1),1500)}catch(T){a(ut(T))}finally{w(!1)}};return O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(bl,{children:"Page"},void 0,!1,void 0,this),y?O.jsxDEV(mh,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,O.jsxDEV(On,{label:"Title",value:c,onChange:u},void 0,!1,void 0,this),O.jsxDEV(On,{label:"Slug",value:f,onChange:h},void 0,!1,void 0,this),i?O.jsxDEV("label",{className:"flex flex-col gap-1 text-sm",children:[O.jsxDEV("span",{className:"font-medium text-fg",children:"Locale"},void 0,!1,void 0,this),O.jsxDEV("select",{className:fi,value:m,onChange:(T)=>b(T.target.value),children:[l.includes(m)?null:O.jsxDEV("option",{value:m,children:[m||"(unset)"," — not a declared locale"]},void 0,!0,void 0,this),l.map((T)=>O.jsxDEV("option",{value:T,children:T},T,!1,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null,O.jsxDEV(we,{onPress:E,isDisabled:S||!c.trim()||!f.trim(),children:S?"Saving…":"Save"},void 0,!1,void 0,this),O.jsxDEV(yS,{children:[O.jsxDEV("span",{children:"Status"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function ile({api:e,page:t,schema:n,initialFields:a,onDirtyChange:i,onError:l}){let[c,u]=ce.useState(a),[f,h]=ce.useState(!1),[m,b]=ce.useState(!1),y=ce.useRef(JSON.stringify(a)),v=JSON.stringify(c)!==y.current,S=ce.useRef(t.id);return ce.useEffect(()=>{if(S.current===t.id)return;S.current=t.id,u(a),y.current=JSON.stringify(a)},[t.id,a]),ce.useEffect(()=>{i("page",v)},[v,i]),ce.useEffect(()=>()=>{i("page",!1)},[i]),O.jsxDEV("div",{className:"mb-10",children:[O.jsxDEV("div",{className:"mb-1 flex items-center gap-2",children:[O.jsxDEV("span",{className:"text-caption font-medium uppercase tracking-wide text-fg-subtle",children:"Content"},void 0,!1,void 0,this),v?O.jsxDEV("span",{className:"text-[11px] text-accent-strong",children:"● unsaved"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),f?O.jsxDEV(mh,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,O.jsxDEV(ph,{schema:n,value:c,onChange:u,api:e},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-3",children:O.jsxDEV(we,{onPress:async()=>{let E=JSON.stringify(c);b(!0);try{await e.call("updatePage",{pageId:t.id,fields:c}),y.current=E,h(!0),setTimeout(()=>h(!1),1500)}catch(T){l(ut(T))}finally{b(!1)}},isDisabled:m,children:m?"Saving…":"Save"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function sle({api:e,page:t,onError:n}){let[a,i]=ce.useState({metaTitle:t.metaTitle??"",metaDescription:t.metaDescription??"",canonicalUrl:t.canonicalUrl??"",robots:t.robots??"",ogTitle:t.ogTitle??"",ogDescription:t.ogDescription??""}),[l,c]=ce.useState(!1),u=async()=>{try{await e.call("updatePageSeo",{pageId:t.id,...a}),c(!0),setTimeout(()=>c(!1),1500)}catch(h){n(ut(h))}},f=(h,m,b=!1)=>b?O.jsxDEV(Fx,{label:m,value:a[h],onChange:(y)=>i({...a,[h]:y})},void 0,!1,void 0,this):O.jsxDEV(On,{label:m,value:a[h],onChange:(y)=>i({...a,[h]:y})},void 0,!1,void 0,this);return O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(bl,{children:"SEO"},void 0,!1,void 0,this),l?O.jsxDEV(mh,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,f("metaTitle","Meta title"),f("metaDescription","Meta description",!0),f("canonicalUrl","Canonical URL"),f("robots","Robots (e.g. noindex)"),f("ogTitle","OG title"),f("ogDescription","OG description",!0),O.jsxDEV(we,{className:"w-full",onPress:u,children:"Save SEO"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function lle({api:e,page:t,onChanged:n,onError:a}){let i=async(u,f)=>{try{let h=await e.call(u,{pageId:t.id,...f});if(h?.page)n(h.page)}catch(h){a(ut(h))}},l=String(t.status),c=l==="review"?[{label:"Approve (publish)",action:"approve"},{label:"Reject",action:"reject",variant:"secondary"},{label:"Publish directly",action:"publishPage",variant:"secondary"}]:l==="published"?[{label:"Unpublish",action:"unpublishPage",variant:"secondary"}]:[{label:"Publish",action:"publishPage"},{label:"Submit for review",action:"submitForReview",variant:"secondary"}];return O.jsxDEV("div",{children:[O.jsxDEV(bl,{children:"Workflow"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mb-3 flex items-center gap-2 text-[13px] text-fg-muted",children:[O.jsxDEV("span",{className:"text-fg-subtle",children:"Status"},void 0,!1,void 0,this),O.jsxDEV(yl,{status:t.status,children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-2",children:c.map((u)=>O.jsxDEV(we,{variant:u.variant,onPress:()=>i(u.action),children:u.label},u.action,!1,void 0,this))},void 0,!1,void 0,this),O.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 cle({api:e,page:t,onError:n}){let[a,i]=ce.useState([]),[l,c]=ce.useState(""),u=ce.useCallback(()=>e.call("listTranslations",{pageId:t.id}).then(i).catch((h)=>n(ut(h))),[e,t.id,n]);ce.useEffect(()=>{u()},[u]);let f=async()=>{try{await e.call("createTranslation",{pageId:t.id,locale:l}),c(""),u()}catch(h){n(ut(h))}};return O.jsxDEV("div",{children:[O.jsxDEV(bl,{children:"Translations"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-2",children:a.map((h)=>O.jsxDEV("div",{className:Yc,children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:h.locale},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:["/",h.slug]},void 0,!0,void 0,this),O.jsxDEV(yl,{status:h.status,children:h.status},void 0,!1,void 0,this)]},h.id,!0,void 0,this))},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex items-end gap-1.5",children:[O.jsxDEV(On,{label:"",value:l,onChange:c,placeholder:"locale (e.g. cs)"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"secondary",onPress:f,isDisabled:!l,children:"add"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function ule({api:e,pageId:t,onError:n}){let[a,i]=ce.useState([]);return ce.useEffect(()=>{e.listPageAudit(t).then(i).catch((l)=>n(ut(l)))},[e,t,n]),O.jsxDEV("div",{children:[O.jsxDEV(bl,{children:"Audit trail"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-2",children:[a.map((l)=>O.jsxDEV("div",{className:`${Yc} text-xs`,children:[O.jsxDEV("span",{className:"rounded-full bg-surface-muted px-2 py-0.5 font-mono text-xs text-fg-muted",children:l.action},void 0,!1,void 0,this),O.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:[l.fromStatus," → ",l.toStatus]},void 0,!0,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:l.actor??"system"},void 0,!1,void 0,this)]},l.id,!0,void 0,this)),a.length===0?O.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 Jj({api:e,onError:t}){let[n,a]=ce.useState([]),[i,l]=ce.useState(0),[c,u]=ce.useState(!1),[f,h]=ce.useState(null),[m,b]=ce.useState(!1),[y,v]=ce.useState([]),[S,w]=ce.useState(!1),E=ce.useCallback((L)=>{e.listMedia(jj,L).then((J)=>{a((V)=>L===0?J:[...V,...J]),u(J.length===jj),l(L+J.length)}).catch((J)=>t(ut(J)))},[e,t]),T=ce.useCallback(()=>{e.listTrash().then((L)=>v(L.media??[])).catch((L)=>t(ut(L)))},[e,t]);ce.useEffect(()=>{E(0)},[E]),ce.useEffect(()=>{T()},[T]);let D=async(L)=>{try{await e.restoreMedia(L),T(),E(0)}catch(J){t(ut(J))}},H=async(L)=>{if(!confirm("Delete this file permanently? The file itself is removed and cannot be recovered."))return;try{await e.purgeMedia(L),T()}catch(J){t(ut(J))}},z=async(L)=>{if(!L?.length)return;b(!0),t("");try{for(let J of Array.from(L))await e.uploadMedia(J);E(0)}catch(J){t(ut(J))}finally{b(!1)}};return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Fb,{lead:"Media",em:n.length===0?"None yet":n.length===1?"1 file":`${n.length}${c?"+":""} files`,children:O.jsxDEV(bS,{text:"Let's",em:"upload something",children:O.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",O.jsxDEV("input",{type:"file",multiple:!0,hidden:!0,disabled:m,onChange:(L)=>{z(L.target.files),L.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),O.jsxDEV("div",{className:hh,children:[n.length===0?O.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):O.jsxDEV("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5",children:n.map((L)=>O.jsxDEV("div",{className:`cursor-pointer overflow-hidden rounded-lg border bg-surface-card ${f?.id===L.id?"border-fg":"border-border"}`,onClick:()=>h(L),children:[Zj(L)?O.jsxDEV("img",{className:"block h-[130px] w-full object-cover",src:e.resolve(`/media/${L.file.key}`),alt:L.alt??""},void 0,!1,void 0,this):O.jsxDEV("div",{className:"flex h-[130px] items-center justify-center bg-surface-muted font-mono text-xs text-fg-subtle",children:eK(L)},void 0,!1,void 0,this),O.jsxDEV("div",{className:"truncate px-2 py-1.5 text-[11px] text-fg-muted",children:L.file.filename??L.id},void 0,!1,void 0,this)]},L.id,!0,void 0,this))},void 0,!1,void 0,this),c?O.jsxDEV("div",{className:"mt-3.5 text-center",children:O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>E(i),children:"Load more"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,y.length>0?O.jsxDEV("div",{className:"mt-6 border-t border-border pt-4",children:[O.jsxDEV("button",{type:"button",className:"text-small text-fg-muted underline",onClick:()=>w((L)=>!L),children:[S?"Hide":"Show"," trash (",y.length,")"]},void 0,!0,void 0,this),S?O.jsxDEV(O.Fragment,{children:[O.jsxDEV("p",{className:"mt-2 text-small text-fg-subtle",children:"Trashed files are hidden from the library but the file itself still exists — a page published while it was in use keeps showing it. Delete permanently to remove the file."},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2.5 flex flex-col gap-1.5",children:y.map((L)=>O.jsxDEV("div",{className:"flex items-center gap-2.5 rounded-lg border border-border bg-surface-muted px-3 py-2",children:[O.jsxDEV("span",{className:"flex-1 truncate text-small text-fg-muted",children:L.file?.filename??L.id},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>D(L.id),children:"Restore"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>H(L.id),children:"Delete permanently"},void 0,!1,void 0,this)]},L.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this):null,f?O.jsxDEV(dle,{api:e,media:f,onClose:()=>h(null),onSaved:(L)=>{h(L),a((J)=>J.map((V)=>V.id===L.id?L:V))},onDeleted:(L)=>{h(null),a((J)=>J.filter((V)=>V.id!==L)),T()},onError:t},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function dle({api:e,media:t,onClose:n,onSaved:a,onDeleted:i,onError:l}){let[c,u]=ce.useState(t.alt??""),[f,h]=ce.useState(!1);ce.useEffect(()=>u(t.alt??""),[t]);let m=e.resolve(`/media/${t.file.key}`),b=async()=>{h(!0);try{a(await e.updateMedia(t.id,c||null))}catch(v){l(ut(v))}finally{h(!1)}},y=async()=>{if(!confirm("Move this file to the trash? It disappears from the library, but a page published while it was in use keeps showing it — delete it permanently from the trash to remove the file itself."))return;h(!0);try{await e.deleteMedia(t.id),i(t.id)}catch(v){l(ut(v))}finally{h(!1)}};return O.jsxDEV(J4,{onClose:n,wide:!0,children:[O.jsxDEV(X4,{children:[O.jsxDEV(Hb,{children:"Media"},void 0,!1,void 0,this)," ",t.file.filename??""]},void 0,!0,void 0,this),Zj(t)?O.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:t.alt??""},void 0,!1,void 0,this):O.jsxDEV("div",{className:"mb-3.5 flex h-[200px] items-center justify-center rounded-lg bg-surface-muted font-mono text-fg-subtle",children:eK(t)},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mb-4",children:O.jsxDEV(On,{label:"Alt text (for accessibility & SEO)",value:c,onChange:u,placeholder:"Describe the image…"},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV(yS,{children:[O.jsxDEV("span",{children:"Type"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t.file.contentType??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Size"},void 0,!1,void 0,this),O.jsxDEV("span",{children:ble(t.file.size)},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Uploaded"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t.file.uploadedAt?new Date(t.file.uploadedAt).toLocaleString():t.createdAt??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"URL"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"break-all",children:O.jsxDEV("a",{className:"underline underline-offset-2",href:m,target:"_blank",rel:"noreferrer",children:["/media/",t.file.key]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"mt-3.5 flex items-center gap-2",children:[O.jsxDEV(we,{onPress:b,isDisabled:f||c===(t.alt??""),children:"Save"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>navigator.clipboard?.writeText(m),children:"Copy URL"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",className:"text-danger",onPress:y,isDisabled:f,children:"Delete"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",onPress:n,children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function fle(e){let t=e.roles;if(Array.isArray(t))return t.filter((n)=>typeof n==="string");if(typeof t==="string")try{let n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}return[]}function Xj({api:e,me:t,onError:n}){let[a,i]=ce.useState([]),[l,c]=ce.useState(!1),[u,f]=ce.useState(""),h=ce.useCallback(()=>{e.call("listUsers",{limit:200}).then(i).catch((v)=>n(ut(v)))},[e,n]);ce.useEffect(()=>{h()},[h]);let m=async(v,S)=>{f(v.username);try{await e.call("setUserRoles",{username:v.username,roles:S}),h()}catch(w){n(ut(w))}finally{f("")}},b=async(v,S)=>{f(v.username);try{await e.call("setUserActive",{username:v.username,active:S}),h()}catch(w){n(ut(w))}finally{f("")}},y=async(v)=>{if(!confirm(`Delete user ${v.username}? This cannot be undone.`))return;f(v.username);try{await e.call("deleteUser",{username:v.username}),h()}catch(S){n(ut(S))}finally{f("")}};return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Fb,{lead:"Users",em:a.length===0?"None yet":a.length===1?"1 account":`${a.length} accounts`,children:O.jsxDEV(bS,{text:"Let's",em:"invite someone",children:O.jsxDEV(we,{className:"shrink-0",onPress:()=>c(!0),children:"+ Invite"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:hh,children:O.jsxDEV("div",{className:"flex flex-col gap-2",children:[a.map((v)=>{let S=fle(v),w=t?.userId===v.username,E=v.active===void 0||v.active===null?!0:Boolean(Number(v.active));return O.jsxDEV("div",{className:`${Yc} flex-wrap items-start`,children:[O.jsxDEV("div",{className:"flex min-w-[200px] flex-1 flex-col gap-0.5",children:[O.jsxDEV("span",{className:"font-semibold",children:[v.username,w?O.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),v.email&&v.email!==v.username?O.jsxDEV("span",{className:"text-xs text-fg-subtle",children:v.email},void 0,!1,void 0,this):null,v.createdAt?O.jsxDEV("span",{className:"text-[11px] text-fg-subtle",children:["joined ",new Date(Number(v.createdAt)).toLocaleDateString()]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),O.jsxDEV(ple,{value:S,disabled:u===v.username,onSave:(T)=>m(v,T)},void 0,!1,void 0,this),O.jsxDEV(yl,{status:E?"active":"inactive",children:E?"active":"inactive"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:u===v.username||w,onPress:()=>b(v,!E),children:E?"Deactivate":"Activate"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",className:"text-danger",isDisabled:u===v.username||w,onPress:()=>y(v),children:"Delete"},void 0,!1,void 0,this)]},v.username,!0,void 0,this)}),a.length===0?O.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),l?O.jsxDEV(hle,{api:e,onClose:()=>c(!1),onInvited:()=>{c(!1),h()},onError:n},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function ple({value:e,disabled:t,onSave:n}){let[a,i]=ce.useState(e.join(", ")),[l,c]=ce.useState(!1);ce.useEffect(()=>{i(e.join(", "))},[e]);let u=()=>{c(!1);let f=a.split(",").map((h)=>h.trim()).filter(Boolean);if(f.length===0){i(e.join(", "));return}if(f.length===e.length&&f.every((h,m)=>h===e[m]))return;n(f)};if(l)return O.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:a,disabled:t,onChange:(f)=>i(f.target.value),onBlur:u,onKeyDown:(f)=>{if(f.key==="Enter")u();if(f.key==="Escape")i(e.join(", ")),c(!1)}},void 0,!1,void 0,this);return O.jsxDEV("span",{className:"flex cursor-pointer flex-wrap gap-1",onClick:()=>c(!0),title:"Click to edit",children:e.length===0?O.jsxDEV(yl,{children:"no roles"},void 0,!1,void 0,this):e.map((f)=>O.jsxDEV(yl,{status:f==="admin"?"published":void 0,children:f},f,!1,void 0,this))},void 0,!1,void 0,this)}function hle({api:e,onClose:t,onInvited:n,onError:a}){let[i,l]=ce.useState(""),[c,u]=ce.useState("editor"),[f,h]=ce.useState(!1);return O.jsxDEV(J4,{onClose:t,children:[O.jsxDEV(X4,{children:["Invite an ",O.jsxDEV(Hb,{children:"editor"},void 0,!1,void 0,this)," or teammate"]},void 0,!0,void 0,this),O.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),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(On,{label:"Email",type:"email",autoFocus:!0,value:i,onChange:l,placeholder:"them@example.com"},void 0,!1,void 0,this),O.jsxDEV(On,{label:"Roles (comma-separated — e.g. editor, reviewer, admin)",value:c,onChange:u,placeholder:"editor"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex justify-end gap-2",children:[O.jsxDEV(we,{variant:"ghost",onPress:t,children:"Cancel"},void 0,!1,void 0,this),O.jsxDEV(we,{onPress:async()=>{h(!0);try{let b=c.split(",").map((y)=>y.trim()).filter(Boolean);await e.call("inviteUser",{email:i,roles:b}),n()}catch(b){a(ut(b))}finally{h(!1)}},isDisabled:f||!i,children:f?"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 Qj({api:e,cfg:t,me:n,onSignOut:a,onError:i}){return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Fb,{lead:"Settings",em:n?.userId??"your account"},void 0,!1,void 0,this),O.jsxDEV("div",{className:`${hh} grid grid-cols-2 gap-5 max-[820px]:grid-cols-1`,children:[O.jsxDEV(mle,{api:e,me:n,onError:i,onSignOut:a},void 0,!1,void 0,this),O.jsxDEV(gle,{cfg:t,me:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function mle({api:e,me:t,onError:n,onSignOut:a}){let[i,l]=ce.useState(""),[c,u]=ce.useState(""),[f,h]=ce.useState(""),[m,b]=ce.useState(""),[y,v]=ce.useState(!1),S=(T)=>{b(T),setTimeout(()=>b(""),1800)},w=async()=>{v(!0);try{await e.call("changeEmail",{email:i}),l(""),S("Contact email updated")}catch(T){n(ut(T))}finally{v(!1)}},E=async()=>{v(!0);try{await e.call("changePassword",{currentPassword:c,newPassword:f}),u(""),h(""),S("Password updated")}catch(T){n(ut(T))}finally{v(!1)}};return O.jsxDEV(Kj,{children:[O.jsxDEV(bl,{children:"My account"},void 0,!1,void 0,this),m?O.jsxDEV(mh,{ok:!0,children:m},void 0,!1,void 0,this):null,O.jsxDEV(yS,{className:"mb-4",children:[O.jsxDEV("span",{children:"Username"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t?.userId??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Roles"},void 0,!1,void 0,this),O.jsxDEV("span",{children:(t?.roles??[]).join(", ")||"—"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(On,{label:"Change contact email",type:"email",value:i,onChange:l,placeholder:"you@example.com"},void 0,!1,void 0,this),O.jsxDEV(we,{className:"w-full",onPress:w,isDisabled:y||!i,children:"Save email"},void 0,!1,void 0,this),O.jsxDEV(On,{label:"Current password",type:"password",value:c,onChange:u,autoComplete:"current-password"},void 0,!1,void 0,this),O.jsxDEV(On,{label:"New password (at least 8 characters)",type:"password",value:f,onChange:h,autoComplete:"new-password"},void 0,!1,void 0,this),O.jsxDEV(we,{className:"w-full",onPress:E,isDisabled:y||f.length<8||c.length===0,children:"Change password"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",className:"mt-2 w-full text-danger",onPress:a,children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function gle({cfg:e,me:t}){return O.jsxDEV(Kj,{children:[O.jsxDEV(bl,{children:"About"},void 0,!1,void 0,this),O.jsxDEV(yS,{children:[O.jsxDEV("span",{children:"Tenant"},void 0,!1,void 0,this),O.jsxDEV("span",{children:e.tenant||"main"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"API"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"break-all",children:e.baseUrl},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Signed in as"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t?.userId??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Editor"},void 0,!1,void 0,this),O.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 Zj(e){return(e.file.contentType??"").startsWith("image/")}function eK(e){let t=(e.file.contentType??"").split("/")[1];return(e.file.filename?.split(".").pop()??t??"file").slice(0,5).toUpperCase()}function ble(e){if(!e||e<=0)return"—";let t=["B","KB","MB","GB"],n=0,a=e;while(a>=1024&&n<t.length-1)a/=1024,n++;return`${a<10&&n>0?a.toFixed(1):Math.round(a)} ${t[n]}`}function ut(e){if(e instanceof Hp)return e.message;return e instanceof Error?e.message:String(e)}function yle(e){return e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\s+/g," ").trim()}function vle(e){if(typeof e==="string")return yle(e);if(dh(e))return zb(e).replace(/\s+/g," ").trim();return""}function xle(e){let t="";for(let n of Object.values(e))if(t=vle(n),t)break;if(!t)return"";return t.length>90?t.slice(0,90)+"…":t}function $le(e,t,n,a,i){let l=n+a;if(l<0||l>=e.length)return;let c=e.map((u)=>u.id);[c[n],c[l]]=[c[l],c[n]],i(t,c)}var ce,O,Hj,Yc="flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",hh="mx-auto max-w-[1200px] px-7 pb-8 pt-2",Hb=({children:e})=>O.jsxDEV("span",{className:"text-fg-subtle",children:e},void 0,!1,void 0,this),Uj=50,jj=60;var Jc=N(()=>{Zi();i3();zj();ri();W4();ce=K(ae(),1),O=K(Rt(),1),Hj=["settings","seo","workflow","i18n","audit"]});var tK={};cc(tK,{default:()=>Sle});var Ub,Sle;var nK=N(()=>{fa();Zi();ri();Jc();Ub=K(Rt(),1),Sle=fr().params({slug:"string",id:"string"}).route("/collections/:slug/:id").render(function({params:t}){let{api:n,collections:a,setError:i}=Kn(),l=kr(),c=a.find((f)=>f.slug===t.slug),u=()=>l("collection",{params:{slug:t.slug}});if(!c)return Ub.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Ub.jsxDEV("p",{className:"text-fg-subtle",children:a.length===0?"Loading…":`Unknown collection: ${t.slug}`},void 0,!1,void 0,this),a.length>0?Ub.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← Pages"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return Ub.jsxDEV(Wj,{api:n,def:c,id:t.id==="new"?null:t.id,onSaved:u,onDeleted:u,onBack:u,onError:i},void 0,!1,void 0,this)})});var rK={};cc(rK,{default:()=>Cle});var Vb,Cle;var oK=N(()=>{fa();Zi();ri();Jc();Vb=K(Rt(),1),Cle=fr().params({slug:"string"}).route("/collections/:slug").render(function({params:t}){let{api:n,collections:a,setError:i}=Kn(),l=kr(),c=a.find((u)=>u.slug===t.slug);if(!c)return Vb.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Vb.jsxDEV("p",{className:"text-fg-subtle",children:a.length===0?"Loading…":`Unknown collection: ${t.slug}`},void 0,!1,void 0,this),a.length>0?Vb.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← Pages"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return Vb.jsxDEV(Gj,{api:n,def:c,onOpen:(u)=>l("collection-item",{params:{slug:c.slug,id:u}}),onNew:()=>l("collection-item",{params:{slug:c.slug,id:"new"}}),onError:i},void 0,!1,void 0,this)})});var aK={};cc(aK,{default:()=>wle});var gh,iK,wle;var sK=N(()=>{fa();ri();Jc();gh=K(ae(),1),iK=K(Rt(),1),wle=fr().route("/").render(function(){let{api:t,setError:n,collections:a}=Kn(),i=kr(),[l,c]=gh.useState([]),[u,f]=gh.useState([]),h=typeof window<"u"&&window.PRAMEN_CMS_EDITOR?.hidePages===!0,m=a[0]?.slug;gh.useEffect(()=>{if(h&&m)i("collection",{params:{slug:m},replace:!0})},[h,m,i]);let b=()=>t.listPages().then(c).catch((y)=>n(ut(y)));if(gh.useEffect(()=>{if(h)return;b(),t.listBlockTypes().then(f).catch((y)=>n(ut(y)))},[t,h]),h&&m)return null;return iK.jsxDEV(qj,{api:t,pages:l,blockTypes:u,onOpen:(y)=>i("page",{params:{pageId:y.id}}),onCreated:b,onError:n},void 0,!1,void 0,this)})});var lK={};cc(lK,{default:()=>Ele});var cK,Ele;var uK=N(()=>{fa();ri();Jc();cK=K(Rt(),1),Ele=fr().route("/media").render(function(){let{api:t,setError:n}=Kn();return cK.jsxDEV(Jj,{api:t,onError:n},void 0,!1,void 0,this)})});var dK={};cc(dK,{default:()=>Tle});var jd,Vd,Tle;var fK=N(()=>{fa();Zi();ri();Jc();jd=K(ae(),1),Vd=K(Rt(),1),Tle=fr().params({pageId:"string",tab:"?string"}).route("/pages/:pageId").render(function({params:t}){let{api:n,cms:a,setError:i,setNavGuard:l}=Kn(),c=kr(),[u,f]=jd.useState(null),[h,m]=jd.useState([]),[b,y]=jd.useState(!1);jd.useEffect(()=>{let E=!0;return y(!1),n.listPages().then((T)=>{if(!E)return;let D=T.find((H)=>H.id===t.pageId)??null;f(D),y(!D)}).catch((T)=>i(ut(T))),n.listBlockTypes().then((T)=>E&&m(T)).catch((T)=>i(ut(T))),()=>{E=!1}},[n,t.pageId,i]);let S=Y4(a.multilingual).includes(t.tab)?t.tab:"settings",w=(E)=>c("page",{params:{pageId:t.pageId,tab:E},replace:!0});if(jd.useEffect(()=>{if(t.tab!==void 0&&t.tab!==S)w(S)},[t.tab,S]),b)return Vd.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Vd.jsxDEV("p",{className:"text-fg-subtle",children:"Page not found."},void 0,!1,void 0,this),Vd.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>c("home"),children:"← all pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(!u)return Vd.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:Vd.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);return Vd.jsxDEV(Yj,{api:n,page:u,blockTypes:h,tab:S,onTab:w,onBack:()=>c("home"),onChange:f,registerGuard:l},void 0,!1,void 0,this)})});var pK={};cc(pK,{default:()=>Rle});var hK,Rle;var mK=N(()=>{fa();ri();Jc();hK=K(Rt(),1),Rle=fr().route("/settings").render(function(){let{api:t,cfg:n,me:a,setError:i,reconfigure:l}=Kn();return hK.jsxDEV(Qj,{api:t,cfg:n,me:a,onSignOut:l,onError:i},void 0,!1,void 0,this)})});var gK={};cc(gK,{default:()=>kle});var Kd,kle;var bK=N(()=>{fa();Zi();ri();Jc();Kd=K(Rt(),1),kle=fr().route("/users").render(function(){let{api:t,me:n,isAdmin:a,setError:i}=Kn(),l=kr();if(n===null)return Kd.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:Kd.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!a)return Kd.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Kd.jsxDEV("p",{className:"text-fg-subtle",children:"Admins only."},void 0,!1,void 0,this),Kd.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← back to pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return Kd.jsxDEV(Xj,{api:t,me:n,onError:i},void 0,!1,void 0,this)})});var yK={};cc(yK,{default:()=>Ale});var Xc,Ale;var vK=N(()=>{fa();Zi();Xc=K(Rt(),1),Ale=fr().render(function(){let t=kr();return Xc.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:[Xc.jsxDEV("h1",{className:"m-0 text-[56px] font-normal leading-[1.05] tracking-[-0.01em] max-[820px]:text-[40px]",children:[Xc.jsxDEV("span",{className:"block text-fg-subtle",children:"Not found"},void 0,!1,void 0,this),Xc.jsxDEV("span",{className:"block text-fg",children:"Nothing lives here"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Xc.jsxDEV("div",{className:"mt-4 flex items-center gap-2",children:[Xc.jsxDEV("p",{className:"text-fg-subtle",children:"That page doesn't exist."},void 0,!1,void 0,this),Xc.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>t("home"),children:"← back to pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)})});fa();var AK=K(ae(),1),MK=K(t6(),1);fa();var vl=K(ae(),1);fa();Zi();ri();Qx();var Zx=K(ae(),1),Cn=K(Rt(),1),YI="pramen.cms.theme";function c3(){let{isAdmin:e,collections:t,error:n,reconfigure:a,confirmNavigation:i}=Kn(),l=kr(),{pathname:c}=hv(),u=(w)=>()=>{if(i())w()},[f,h]=Zx.useState(()=>typeof localStorage<"u"?localStorage.getItem(YI)??"light":"light");Zx.useEffect(()=>{document.documentElement.dataset.theme=f==="dark"?"dark":"light",localStorage.setItem(YI,f)},[f]);let m=c.startsWith("/collections/")?c.split("/")[2]:void 0,b=m?`col:${m}`:c.startsWith("/pages")||c==="/"?"pages":c.startsWith("/media")?"media":c.startsWith("/users")?"users":c.startsWith("/settings")?"settings":"",y=(w)=>b===w?"bg-surface-muted text-fg":"text-fg-muted",v=typeof window<"u"?window.PRAMEN_CMS_EDITOR?.extraNav??[]:[],S=typeof window<"u"?window.PRAMEN_CMS_EDITOR?.hidePages===!0:!1;return Cn.jsxDEV("div",{className:"min-h-screen bg-surface text-fg",children:[Cn.jsxDEV(zg,{className:"sticky top-0 z-10 bg-surface px-7",children:[Cn.jsxDEV(zg.Brand,{children:Cn.jsxDEV("button",{type:"button",onClick:u(()=>l("home")),"aria-label":`${Ko.spoken} — home`,className:"flex items-baseline gap-1 rounded-md px-1 py-0.5 transition-colors hover:bg-surface-muted",children:[Cn.jsxDEV("span",{className:"text-callout font-bold tracking-[0.01em] text-fg",children:Ko.name},void 0,!1,void 0,this),Ko.suffix?Cn.jsxDEV("span",{className:"text-fg-subtle",children:["· ",Ko.suffix]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Cn.jsxDEV(zg.Nav,{"aria-label":"Primary",children:[S?null:Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y("pages"),onPress:u(()=>l("home")),children:"Pages"},void 0,!1,void 0,this),t.map((w)=>Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y(`col:${w.slug}`),onPress:u(()=>l("collection",{params:{slug:w.slug}})),children:[w.icon?`${w.icon} `:"",w.pluralLabel]},w.slug,!0,void 0,this)),Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y("media"),onPress:u(()=>l("media")),children:"Media"},void 0,!1,void 0,this),e?Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y("users"),onPress:u(()=>l("users")),children:"Users"},void 0,!1,void 0,this):null,Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y("settings"),onPress:u(()=>l("settings")),children:"Settings"},void 0,!1,void 0,this),v.map((w)=>Cn.jsxDEV("a",{href:w.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:w.label},w.href,!1,void 0,this))]},void 0,!0,void 0,this),Cn.jsxDEV(zg.Actions,{children:[Cn.jsxDEV(we,{variant:"ghost",size:"sm","aria-label":f==="dark"?"Switch to light theme":"Switch to dark theme",onPress:()=>h(f==="dark"?"light":"dark"),children:f==="dark"?Cn.jsxDEV(CI,{className:"h-4 w-4"},void 0,!1,void 0,this):Cn.jsxDEV(wI,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Cn.jsxDEV(we,{variant:"ghost",size:"sm",onPress:u(a),children:"sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n?Cn.jsxDEV(cI,{variant:"outlined",padding:"none",className:"mx-7 mt-2 border-danger px-4 py-2.5",children:Cn.jsxDEV(qx,{size:"small",className:"text-danger",children:n},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,Cn.jsxDEV(ep,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var xK=()=>Promise.resolve().then(() => (nK(),tK)).then((e)=>({default:e.default.component})),$K=()=>Promise.resolve().then(() => (oK(),rK)).then((e)=>({default:e.default.component})),SK=()=>Promise.resolve().then(() => (sK(),aK)).then((e)=>({default:e.default.component})),CK=()=>Promise.resolve().then(() => (uK(),lK)).then((e)=>({default:e.default.component})),wK=()=>Promise.resolve().then(() => (fK(),dK)).then((e)=>({default:e.default.component})),EK=()=>Promise.resolve().then(() => (mK(),pK)).then((e)=>({default:e.default.component})),TK=()=>Promise.resolve().then(() => (bK(),gK)).then((e)=>({default:e.default.component})),RK=()=>Promise.resolve().then(() => (vK(),yK)).then((e)=>({default:e.default.component})),Q4={"collection-item":"/collections/:slug/:id",collection:"/collections/:slug",home:"/",media:"/media",page:"/pages/:pageId",settings:"/settings",users:"/users"},Mle=[{path:"/",component:c3,isLayout:!0,children:[{path:"/collection-item",matchPath:"/collections/:slug/:id",component:vl.lazy(xK),preload:xK},{path:"/collection",matchPath:"/collections/:slug",component:vl.lazy($K),preload:$K},{path:"/home",matchPath:"/",component:vl.lazy(SK),preload:SK},{path:"/media",component:vl.lazy(CK),preload:CK},{path:"/page",matchPath:"/pages/:pageId",component:vl.lazy(wK),preload:wK},{path:"/settings",component:vl.lazy(EK),preload:EK},{path:"/users",component:vl.lazy(TK),preload:TK},{path:"/:__notFound+",component:vl.lazy(RK),preload:RK}]}],Z4=iE(Mle);ri();Qx();var vS=K(Rt(),1);document.title=jI;var kK=document.getElementById("app");if(kK)MK.createRoot(kK).render(vS.jsxDEV(AK.StrictMode,{children:vS.jsxDEV(WI,{children:vS.jsxDEV(pv,{routes:Z4,pageRegistry:Q4},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this));
|