@isardsat/editorial-admin 6.18.0 → 6.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{dashboard-CcD0GUvM.js → dashboard-DOB6LY1b.js} +1 -1
- package/build/client/assets/{dashboard._collection._document-BJglB3FV.js → dashboard._collection._document-B29gnD6-.js} +1 -1
- package/build/client/assets/{dashboard._collection.new-CLZpPLZh.js → dashboard._collection.new-BAgCKtvj.js} +1 -1
- package/build/client/assets/{dashboard._layout-AERXOZd8.js → dashboard._layout-DF619pFj.js} +1 -1
- package/build/client/assets/{itemForm-qGKIiDrR.js → itemForm-BR_x2kdj.js} +2 -2
- package/build/client/assets/{manifest-973b562e.js → manifest-6f70b5eb.js} +1 -1
- package/build/client/assets/{markdownEditor-DkA1HBSZ.js → markdownEditor-DfaF8kYY.js} +1 -1
- package/build/client/assets/{schemas-s9RvXvzH.js → schemas-CsWpUuhN.js} +1 -1
- package/build/client/index.html +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as R,R as C,p as G,C as nw,D as u0}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{c as a9,e as c9}from"./authSlice-BI_rlf3v.js";import{_ as h0,D as u9,b as uc}from"./utils-CCKKso3e.js";import{a as fp}from"./index-DLIEpuwL.js";import{u as h9,c as f9,R as d9,P as p9,O as g9,C as m9,T as O9,a as x9}from"./index-cCny74f5.js";import{i as b9,u as rw}from"./zod-BFfp0fV9.js";import{R as y9,A as k9,P as S9,C as w9,a as v9}from"./index-B0u0hYGX.js";import{P as iw,R as sw,T as ow,a as lw,C as aw,A as C9}from"./index-B3bJjaCJ.js";import{c as Pm,P as ri,a as vi,u as Rh}from"./index-BhARCKRr.js";import{c as T9,u as Qm,R as _9,S as P9,T as Q9,V as $9,a as E9,P as A9,C as M9,b as L9,d as I9,e as R9}from"./itemForm-qGKIiDrR.js";import{u as N9}from"./index-CtLWaleL.js";import{c as cw}from"./createLucideIcon-BvSqmaUO.js";import"./index-CHzEoQKp.js";import"./check-DF0ucE8d.js";import"./schemas-CPJfa6mm.js";import"./index-B2dzkZu5.js";import"./badge-gLcN3Bjg.js";import"./input-Bk91TMQj.js";import"./x-BVtfHpQX.js";import"./alert-dialog-CN-uuUVp.js";import"./schemas-s9RvXvzH.js";import"./loader-circle-BDUbeTTe.js";const D9=[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16.2V21h-4.8",key:"1hrera"}],["path",{d:"M21 7.8V3h-4.8",key:"ul1q53"}],["path",{d:"M3 16.2V21h4.8",key:"1x04uo"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 7.8V3h4.8",key:"1ijppm"}],["path",{d:"M9 9 3 3",key:"v551iv"}]],Z9=cw("expand",D9);const B9=[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]],z9=cw("shrink",B9);var V9=Object.defineProperty,F9=(n,e,t)=>e in n?V9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qr=(n,e,t)=>F9(n,typeof e!="symbol"?e+"":e,t);let X9=class uw{constructor(e=new Map){this.map=e}clone(){return new uw(new Map(this.map))}increment(e){const t=this.map.get(e)??0;this.map.set(e,t+1)}decrement(e,t){let r=this.map.get(e);r!==void 0&&(r-=1,this.map.set(e,r),r===0&&t())}},hc=class{constructor(){qr(this,"map",new Map)}getOrCreate(e){let t=this.map.get(e);return t===void 0&&(t=new Set,this.map.set(e,t)),t}get(e){return this.map.get(e)}use(e,t){const r=this.get(e);r!==void 0&&t(r)}delete(e){return this.map.delete(e)}};function qs(n,e){return e(n),n}function $m(){}const hw="cell";function f0(n,e){return n===e}const Nh=new Map;let W9=class{constructor(e={}){qr(this,"subscriptions",new hc),qr(this,"singletonSubscriptions",new Map),qr(this,"graph",new hc),qr(this,"state",new Map),qr(this,"distinctNodes",new Map),qr(this,"executionMaps",new Map),qr(this,"definitionRegistry",new Set),qr(this,"combinedCells",[]);for(const t of Object.getOwnPropertySymbols(e))this.state.set(t,e[t])}cellInstance(e,t=!0,r=Symbol()){return this.state.has(r)||this.state.set(r,e),t!==!1&&!this.distinctNodes.has(r)&&this.distinctNodes.set(r,t===!0?f0:t),r}signalInstance(e=!0,t=Symbol()){return e!==!1&&this.distinctNodes.set(t,e===!0?f0:e),t}sub(e,t){this.register(e);const r=this.subscriptions.getOrCreate(e);return r.add(t),()=>r.delete(t)}singletonSub(e,t){return this.register(e),t===void 0?this.singletonSubscriptions.delete(e):this.singletonSubscriptions.set(e,t),()=>this.singletonSubscriptions.delete(e)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(e,t){const r=this.signalInstance();return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:e}),this.sub(r,t)}pubIn(e){var t;const r=Reflect.ownKeys(e),i=this.getExecutionMap(r),s=i.refCount.clone(),o=i.participatingNodes.slice(),l=new Map(this.state),a=c=>{this.graph.use(c,u=>{for(const{sources:h,sink:f}of u)h.has(c)&&s.decrement(f,()=>{o.splice(o.indexOf(f),1),a(f)})})};for(;;){const c=o.shift();if(c===void 0)break;const u=c;let h=!1;const f=d=>{const p=this.distinctNodes.get(u);if(p!=null&&p(l.get(u),d)){h=!1;return}h=!0,l.set(u,d),this.state.has(u)&&this.state.set(u,d)};if(Object.prototype.hasOwnProperty.call(e,u)?f(e[u]):i.projections.use(u,d=>{for(const p of d){const g=[...Array.from(p.sources),...Array.from(p.pulls)].map(m=>l.get(m));p.map(f)(...g)}}),h){const d=l.get(u);this.inContext(()=>{this.subscriptions.use(u,p=>{for(const g of p)g(d)})}),(t=this.singletonSubscriptions.get(u))==null||t(d)}else a(u)}}connect({sources:e,pulls:t=[],map:r,sink:i}){const s={map:r,pulls:new Set(t),sink:this.register(i),sources:new Set(e)};for(const o of[...e,...t])this.register(o),this.graph.getOrCreate(o).add(s);this.executionMaps.clear()}pub(e,t){this.pubIn({[e]:t})}pipe(e,...t){return this.combineOperators(...t)(e)}transformer(...e){return t=>qs(this.signalInstance(),r=>(this.link(this.pipe(r,...e),t),r))}link(e,t){this.connect({map:r=>i=>{r(i)},sink:t,sources:[e]})}combine(...e){return qs(this.signalInstance(),t=>{this.connect({map:r=>(...i)=>{r(i)},sink:t,sources:e})})}combineCells(...e){const t=this.combinedCells.find(i=>e.length===i.sources.length&&e.every((s,o)=>s===i.sources[o]));if(t)return t.cell;const r=this.cellInstance(e.map(i=>this.getValue(i)),!0);return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:e}),this.combinedCells.push({sources:e,cell:r}),r}getValue(e){return this.register(e),this.state.get(e)}getValues(e){return e.map(t=>this.getValue(t))}register(e){const t=Nh.get(e);return t===void 0||this.definitionRegistry.has(e)?e:(this.definitionRegistry.add(e),qs(t.type===hw?this.cellInstance(t.initial,t.distinct,e):this.signalInstance(t.distinct,e),r=>{this.inContext(()=>{t.init(this,r)})}))}inContext(e){return e()}changeWith(e,t,r){this.connect({sources:[t],pulls:[e],sink:e,map:i=>(s,o)=>{i(r(o,s))}})}calculateExecutionMap(e){const t=[],r=new Set,i=new hc,s=new X9,o=new hc,l=(a,c=0)=>{s.increment(a),!r.has(a)&&(this.register(a),i.use(a,u=>{c=Math.max(...Array.from(u).map(h=>t.indexOf(h)))+1}),this.graph.use(a,u=>{for(const h of u)h.sources.has(a)?(o.getOrCreate(h.sink).add(h),l(h.sink,c)):i.getOrCreate(h.sink).add(a)}),r.add(a),t.splice(c,0,a))};return e.forEach(l),{participatingNodes:t,pendingPulls:i,projections:o,refCount:s}}getExecutionMap(e){let t=e;if(e.length===1){t=e[0];const i=this.executionMaps.get(t);if(i!==void 0)return i}else for(const[i,s]of this.executionMaps.entries())if(Array.isArray(i)&&i.length===e.length&&i.every(o=>e.includes(o)))return s;const r=this.calculateExecutionMap(e);return this.executionMaps.set(t,r),r}combineOperators(...e){return t=>{for(const r of e)t=r(t,this);return t}}};function oe(n,e=$m,t=!0){return qs(Symbol(),r=>{Nh.set(r,{type:hw,distinct:t,initial:n,init:e})})}function bt(n=$m,e=!1){return qs(Symbol(),t=>{Nh.set(t,{type:"signal",distinct:e,init:n})})}function Ni(n=$m){return qs(Symbol(),e=>{Nh.set(e,{type:"signal",distinct:!1,init:n})})}const fw=R.createContext(null);function $a(){const n=R.useContext(fw);if(n===null)throw new Error("useRealm must be used within a RealmContextProvider");return n}function nn(n){const e=$a();e.register(n);const t=R.useCallback(r=>e.sub(n,r),[e,n]);return R.useSyncExternalStore(t,()=>e.getValue(n),()=>e.getValue(n))}function Wt(...n){const e=$a(),t=R.useMemo(()=>e.combineCells.apply(e,n),[e,...n]);return nn(t)}function ut(n){const e=$a();return e.register(n),R.useCallback(t=>{e.pub(n,t)},[e,n])}function js(n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>s=>{i(n(s))},sink:r,sources:[e]}),r}}function Je(...n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>(...s)=>{i(s)},pulls:n,sink:r,sources:[e]}),r}}function dw(n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>()=>{i(n)},sink:r,sources:[e]}),r}}function Ea(n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>s=>{n(s)&&i(s)},sink:r,sources:[e]}),r}}function pw(n,e){return(t,r)=>{const i=r.signalInstance();return r.connect({map:s=>o=>{s(e=n(e,o))},sink:i,sources:[t]}),i}}function q9(n,e){return e(n),n}function Ys(){}function Ln(n){return function(e){return{init:t=>{var r;return(r=n.init)==null?void 0:r.call(n,t,e)},postInit:t=>{var r;return(r=n.postInit)==null?void 0:r.call(n,t,e)},update:t=>{var r;return(r=n.update)==null?void 0:r.call(n,t,e)}}}}function j9({children:n,plugins:e}){const t=C.useMemo(()=>q9(new W9,r=>{var i,s;for(const o of e)(i=o.init)==null||i.call(o,r);for(const o of e)(s=o.postInit)==null||s.call(o,r)}),[]);return C.useEffect(()=>{var r;for(const i of e)(r=i.update)==null||r.call(i,t)}),C.createElement(fw.Provider,{value:t},n)}const gw=R.createContext(null);function Y9(n,e){return{getTheme:function(){return e??null}}}function Nt(){const n=R.useContext(gw);return n==null&&(function(e,...t){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",e);for(const s of t)i.append("v",s);throw r.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),n}function F(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const tr=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,H9=tr&&"documentMode"in document?document.documentMode:null,Vn=tr&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ci=tr&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),_u=!(!tr||!("InputEvent"in window)||H9)&&"getTargetRanges"in new window.InputEvent("input"),jl=tr&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),co=tr&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,U9=tr&&/Android/.test(navigator.userAgent),mw=tr&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d0=tr&&U9&&mw,Pu=tr&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!mw;function Qu(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const G9=1,K9=3,J9=9,eQ=11,ds=0,Ow=1,uo=2,tQ=0,nQ=1,rQ=2,$u=4,Eu=8,Em=128,iQ=1792|(112|(3|$u|Eu)|Em),Am=1,Mm=2,Lm=3,Im=4,Rm=5,Nm=6,Dh=jl||co||Pu?" ":"",ii=`
|
|
1
|
+
import{a as R,R as C,p as G,C as nw,D as u0}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{c as a9,e as c9}from"./authSlice-BI_rlf3v.js";import{_ as h0,D as u9,b as uc}from"./utils-CCKKso3e.js";import{a as fp}from"./index-DLIEpuwL.js";import{u as h9,c as f9,R as d9,P as p9,O as g9,C as m9,T as O9,a as x9}from"./index-cCny74f5.js";import{i as b9,u as rw}from"./zod-BFfp0fV9.js";import{R as y9,A as k9,P as S9,C as w9,a as v9}from"./index-B0u0hYGX.js";import{P as iw,R as sw,T as ow,a as lw,C as aw,A as C9}from"./index-B3bJjaCJ.js";import{c as Pm,P as ri,a as vi,u as Rh}from"./index-BhARCKRr.js";import{c as T9,u as Qm,R as _9,S as P9,T as Q9,V as $9,a as E9,P as A9,C as M9,b as L9,d as I9,e as R9}from"./itemForm-BR_x2kdj.js";import{u as N9}from"./index-CtLWaleL.js";import{c as cw}from"./createLucideIcon-BvSqmaUO.js";import"./index-CHzEoQKp.js";import"./check-DF0ucE8d.js";import"./schemas-CPJfa6mm.js";import"./index-B2dzkZu5.js";import"./badge-gLcN3Bjg.js";import"./input-Bk91TMQj.js";import"./x-BVtfHpQX.js";import"./alert-dialog-CN-uuUVp.js";import"./schemas-CsWpUuhN.js";import"./loader-circle-BDUbeTTe.js";const D9=[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16.2V21h-4.8",key:"1hrera"}],["path",{d:"M21 7.8V3h-4.8",key:"ul1q53"}],["path",{d:"M3 16.2V21h4.8",key:"1x04uo"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 7.8V3h4.8",key:"1ijppm"}],["path",{d:"M9 9 3 3",key:"v551iv"}]],Z9=cw("expand",D9);const B9=[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]],z9=cw("shrink",B9);var V9=Object.defineProperty,F9=(n,e,t)=>e in n?V9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qr=(n,e,t)=>F9(n,typeof e!="symbol"?e+"":e,t);let X9=class uw{constructor(e=new Map){this.map=e}clone(){return new uw(new Map(this.map))}increment(e){const t=this.map.get(e)??0;this.map.set(e,t+1)}decrement(e,t){let r=this.map.get(e);r!==void 0&&(r-=1,this.map.set(e,r),r===0&&t())}},hc=class{constructor(){qr(this,"map",new Map)}getOrCreate(e){let t=this.map.get(e);return t===void 0&&(t=new Set,this.map.set(e,t)),t}get(e){return this.map.get(e)}use(e,t){const r=this.get(e);r!==void 0&&t(r)}delete(e){return this.map.delete(e)}};function qs(n,e){return e(n),n}function $m(){}const hw="cell";function f0(n,e){return n===e}const Nh=new Map;let W9=class{constructor(e={}){qr(this,"subscriptions",new hc),qr(this,"singletonSubscriptions",new Map),qr(this,"graph",new hc),qr(this,"state",new Map),qr(this,"distinctNodes",new Map),qr(this,"executionMaps",new Map),qr(this,"definitionRegistry",new Set),qr(this,"combinedCells",[]);for(const t of Object.getOwnPropertySymbols(e))this.state.set(t,e[t])}cellInstance(e,t=!0,r=Symbol()){return this.state.has(r)||this.state.set(r,e),t!==!1&&!this.distinctNodes.has(r)&&this.distinctNodes.set(r,t===!0?f0:t),r}signalInstance(e=!0,t=Symbol()){return e!==!1&&this.distinctNodes.set(t,e===!0?f0:e),t}sub(e,t){this.register(e);const r=this.subscriptions.getOrCreate(e);return r.add(t),()=>r.delete(t)}singletonSub(e,t){return this.register(e),t===void 0?this.singletonSubscriptions.delete(e):this.singletonSubscriptions.set(e,t),()=>this.singletonSubscriptions.delete(e)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(e,t){const r=this.signalInstance();return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:e}),this.sub(r,t)}pubIn(e){var t;const r=Reflect.ownKeys(e),i=this.getExecutionMap(r),s=i.refCount.clone(),o=i.participatingNodes.slice(),l=new Map(this.state),a=c=>{this.graph.use(c,u=>{for(const{sources:h,sink:f}of u)h.has(c)&&s.decrement(f,()=>{o.splice(o.indexOf(f),1),a(f)})})};for(;;){const c=o.shift();if(c===void 0)break;const u=c;let h=!1;const f=d=>{const p=this.distinctNodes.get(u);if(p!=null&&p(l.get(u),d)){h=!1;return}h=!0,l.set(u,d),this.state.has(u)&&this.state.set(u,d)};if(Object.prototype.hasOwnProperty.call(e,u)?f(e[u]):i.projections.use(u,d=>{for(const p of d){const g=[...Array.from(p.sources),...Array.from(p.pulls)].map(m=>l.get(m));p.map(f)(...g)}}),h){const d=l.get(u);this.inContext(()=>{this.subscriptions.use(u,p=>{for(const g of p)g(d)})}),(t=this.singletonSubscriptions.get(u))==null||t(d)}else a(u)}}connect({sources:e,pulls:t=[],map:r,sink:i}){const s={map:r,pulls:new Set(t),sink:this.register(i),sources:new Set(e)};for(const o of[...e,...t])this.register(o),this.graph.getOrCreate(o).add(s);this.executionMaps.clear()}pub(e,t){this.pubIn({[e]:t})}pipe(e,...t){return this.combineOperators(...t)(e)}transformer(...e){return t=>qs(this.signalInstance(),r=>(this.link(this.pipe(r,...e),t),r))}link(e,t){this.connect({map:r=>i=>{r(i)},sink:t,sources:[e]})}combine(...e){return qs(this.signalInstance(),t=>{this.connect({map:r=>(...i)=>{r(i)},sink:t,sources:e})})}combineCells(...e){const t=this.combinedCells.find(i=>e.length===i.sources.length&&e.every((s,o)=>s===i.sources[o]));if(t)return t.cell;const r=this.cellInstance(e.map(i=>this.getValue(i)),!0);return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:e}),this.combinedCells.push({sources:e,cell:r}),r}getValue(e){return this.register(e),this.state.get(e)}getValues(e){return e.map(t=>this.getValue(t))}register(e){const t=Nh.get(e);return t===void 0||this.definitionRegistry.has(e)?e:(this.definitionRegistry.add(e),qs(t.type===hw?this.cellInstance(t.initial,t.distinct,e):this.signalInstance(t.distinct,e),r=>{this.inContext(()=>{t.init(this,r)})}))}inContext(e){return e()}changeWith(e,t,r){this.connect({sources:[t],pulls:[e],sink:e,map:i=>(s,o)=>{i(r(o,s))}})}calculateExecutionMap(e){const t=[],r=new Set,i=new hc,s=new X9,o=new hc,l=(a,c=0)=>{s.increment(a),!r.has(a)&&(this.register(a),i.use(a,u=>{c=Math.max(...Array.from(u).map(h=>t.indexOf(h)))+1}),this.graph.use(a,u=>{for(const h of u)h.sources.has(a)?(o.getOrCreate(h.sink).add(h),l(h.sink,c)):i.getOrCreate(h.sink).add(a)}),r.add(a),t.splice(c,0,a))};return e.forEach(l),{participatingNodes:t,pendingPulls:i,projections:o,refCount:s}}getExecutionMap(e){let t=e;if(e.length===1){t=e[0];const i=this.executionMaps.get(t);if(i!==void 0)return i}else for(const[i,s]of this.executionMaps.entries())if(Array.isArray(i)&&i.length===e.length&&i.every(o=>e.includes(o)))return s;const r=this.calculateExecutionMap(e);return this.executionMaps.set(t,r),r}combineOperators(...e){return t=>{for(const r of e)t=r(t,this);return t}}};function oe(n,e=$m,t=!0){return qs(Symbol(),r=>{Nh.set(r,{type:hw,distinct:t,initial:n,init:e})})}function bt(n=$m,e=!1){return qs(Symbol(),t=>{Nh.set(t,{type:"signal",distinct:e,init:n})})}function Ni(n=$m){return qs(Symbol(),e=>{Nh.set(e,{type:"signal",distinct:!1,init:n})})}const fw=R.createContext(null);function $a(){const n=R.useContext(fw);if(n===null)throw new Error("useRealm must be used within a RealmContextProvider");return n}function nn(n){const e=$a();e.register(n);const t=R.useCallback(r=>e.sub(n,r),[e,n]);return R.useSyncExternalStore(t,()=>e.getValue(n),()=>e.getValue(n))}function Wt(...n){const e=$a(),t=R.useMemo(()=>e.combineCells.apply(e,n),[e,...n]);return nn(t)}function ut(n){const e=$a();return e.register(n),R.useCallback(t=>{e.pub(n,t)},[e,n])}function js(n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>s=>{i(n(s))},sink:r,sources:[e]}),r}}function Je(...n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>(...s)=>{i(s)},pulls:n,sink:r,sources:[e]}),r}}function dw(n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>()=>{i(n)},sink:r,sources:[e]}),r}}function Ea(n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>s=>{n(s)&&i(s)},sink:r,sources:[e]}),r}}function pw(n,e){return(t,r)=>{const i=r.signalInstance();return r.connect({map:s=>o=>{s(e=n(e,o))},sink:i,sources:[t]}),i}}function q9(n,e){return e(n),n}function Ys(){}function Ln(n){return function(e){return{init:t=>{var r;return(r=n.init)==null?void 0:r.call(n,t,e)},postInit:t=>{var r;return(r=n.postInit)==null?void 0:r.call(n,t,e)},update:t=>{var r;return(r=n.update)==null?void 0:r.call(n,t,e)}}}}function j9({children:n,plugins:e}){const t=C.useMemo(()=>q9(new W9,r=>{var i,s;for(const o of e)(i=o.init)==null||i.call(o,r);for(const o of e)(s=o.postInit)==null||s.call(o,r)}),[]);return C.useEffect(()=>{var r;for(const i of e)(r=i.update)==null||r.call(i,t)}),C.createElement(fw.Provider,{value:t},n)}const gw=R.createContext(null);function Y9(n,e){return{getTheme:function(){return e??null}}}function Nt(){const n=R.useContext(gw);return n==null&&(function(e,...t){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",e);for(const s of t)i.append("v",s);throw r.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),n}function F(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const tr=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,H9=tr&&"documentMode"in document?document.documentMode:null,Vn=tr&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ci=tr&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),_u=!(!tr||!("InputEvent"in window)||H9)&&"getTargetRanges"in new window.InputEvent("input"),jl=tr&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),co=tr&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,U9=tr&&/Android/.test(navigator.userAgent),mw=tr&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d0=tr&&U9&&mw,Pu=tr&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!mw;function Qu(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const G9=1,K9=3,J9=9,eQ=11,ds=0,Ow=1,uo=2,tQ=0,nQ=1,rQ=2,$u=4,Eu=8,Em=128,iQ=1792|(112|(3|$u|Eu)|Em),Am=1,Mm=2,Lm=3,Im=4,Rm=5,Nm=6,Dh=jl||co||Pu?" ":"",ii=`
|
|
2
2
|
|
|
3
3
|
`,sQ=Ci?" ":Dh,xw="֑-߿יִ-﷽ﹰ-ﻼ",bw="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",oQ=new RegExp("^[^"+bw+"]*["+xw+"]"),lQ=new RegExp("^[^"+xw+"]*["+bw+"]"),ps={bold:1,capitalize:1024,code:16,highlight:Em,italic:2,lowercase:256,strikethrough:$u,subscript:32,superscript:64,underline:Eu,uppercase:512},aQ={directionless:1,unmergeable:2},p0={center:Mm,end:Nm,justify:Im,left:Am,right:Lm,start:Rm},cQ={[Mm]:"center",[Nm]:"end",[Im]:"justify",[Am]:"left",[Lm]:"right",[Rm]:"start"},uQ={normal:0,segmented:2,token:1},hQ={[tQ]:"normal",[rQ]:"segmented",[nQ]:"token"},fQ="$";function yw(n,e,t,r,i,s){let o=n.getFirstChild();for(;o!==null;){const l=o.__key;o.__parent===e&&(I(o)&&yw(o,l,t,r,i,s),t.has(l)||s.delete(l),i.push(l)),o=o.getNextSibling()}}const dQ=100;let dp=!1,Dm=0;function pQ(n){Dm=n.timeStamp}function Ef(n,e,t){const r=n.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(n===i||r&&n.previousSibling===i)||r&&Jh(n,t)!==void 0}function gQ(n,e,t){const r=Gn(An(t));let i=null,s=null;r!==null&&r.anchorNode===n&&(i=r.anchorOffset,s=r.focusOffset);const o=n.nodeValue;o!==null&&lO(e,o,i,s,!1)}function mQ(n,e,t){if(z(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return ui(e)&&t.isAttached()}function OQ(n,e,t,r){for(let i=n;i&&!i$(i);i=za(i)){const s=Jh(i,e);if(s!==void 0){const o=Ke(s,t);if(o)return Qe(o)||!nt(i)?void 0:[i,o]}else if(i===r)return[r,l2(t)]}}function kw(n,e,t){dp=!0;const r=performance.now()-Dm>dQ;try{vn(n,(()=>{const i=X()||(function(f){return f.getEditorState().read((()=>{const d=X();return d!==null?d.clone():null}))})(n),s=new Map,o=n.getRootElement(),l=n._editorState,a=n._blockCursorElement;let c=!1,u="";for(let f=0;f<e.length;f++){const d=e[f],p=d.type,g=d.target,m=OQ(g,n,l,o);if(!m)continue;const[O,b]=m;if(p==="characterData")r&&q(b)&&ui(g)&&mQ(i,g,b)&&gQ(g,b,n);else if(p==="childList"){c=!0;const x=d.addedNodes;for(let k=0;k<x.length;k++){const S=x[k],v=s2(S),T=S.parentNode;if(T!=null&&S!==a&&v===null&&!Ef(S,T,n)){if(Ci){const A=(nt(S)?S.innerText:null)||S.nodeValue;A&&(u+=A)}T.removeChild(S)}}const y=d.removedNodes,w=y.length;if(w>0){let k=0;for(let S=0;S<w;S++){const v=y[S];(Ef(v,g,n)||a===v)&&(g.appendChild(v),k++)}w!==k&&s.set(O,b)}}}if(s.size>0)for(const[f,d]of s)d.reconcileObservedMutation(f,n);const h=t.takeRecords();if(h.length>0){for(let f=0;f<h.length;f++){const d=h[f],p=d.addedNodes,g=d.target;for(let m=0;m<p.length;m++){const O=p[m],b=O.parentNode;b==null||O.nodeName!=="BR"||Ef(O,g,n)||b.removeChild(O)}}t.takeRecords()}i!==null&&(c&&dt(i),Ci&&h2(n)&&i.insertRawText(u))}))}finally{dp=!1}}function Sw(n){const e=n._observer;e!==null&&kw(n,e.takeRecords(),e)}function ww(n){(function(e){Dm===0&&An(e).addEventListener("textInput",pQ,!0)})(n),n._observer=new MutationObserver(((e,t)=>{kw(n,e,t)}))}let xQ=class vw{constructor(e,t=new Map,r=void 0,i=new Map,s=void 0){this.node=e,this.sharedConfigMap=t,this.unknownState=r,this.knownState=i;const o=s!==void 0?s:(function(l,a,c){let u=c.size;if(a)for(const h in a){const f=l.get(h);f&&c.has(f)||u++}return u})(t,r,i);this.size=o}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState};for(const[t,r]of this.knownState)t.isEqual(r,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(r);return fc(e)?{[fQ]:e}:{}}getWritable(e){if(this.node===e)return this;const t=new Map(this.knownState),r=fc(i=this.unknownState)&&{...i};var i;if(r)for(const s of t.keys())delete r[s.key];return new vw(e,this.sharedConfigMap,fc(r),t,this.size)}updateFromKnown(e,t){const r=e.key;this.sharedConfigMap.set(r,e);const{knownState:i,unknownState:s}=this;i.has(e)||s&&r in s||this.size++,i.set(e,t)}updateFromUnknown(e,t){const r=this.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState={},e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i);this.unknownState=fc(this.unknownState)}};function fc(n){if(n)for(const e in n)return n}function bQ(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new xQ(e);return e.__state=t,t}function g0(n,e){const t=n.__mode,r=n.__format,i=n.__style,s=e.__mode,o=e.__format,l=e.__style,a=n.__state,c=e.__state;return(t===null||t===s)&&(r===null||r===o)&&(i===null||i===l)&&(n.__state===null||a===c||(function(u,h){if(u===h)return!0;if(u&&h&&u.size!==h.size)return!1;const f=new Set,d=(g,m)=>{for(const[O,b]of g.knownState){if(f.has(O.key))continue;f.add(O.key);const x=m?m.getValue(O):O.defaultValue;if(x!==b&&!O.isEqual(x,b))return!0}return!1},p=(g,m)=>{const{unknownState:O}=g,b=m?m.unknownState:void 0;if(O){for(const[x,y]of Object.entries(O))if(!f.has(x)&&(f.add(x),y!==(b?b[x]:void 0)))return!0}return!1};return!(u&&d(u,h)||h&&d(h,u)||u&&p(u,h)||h&&p(h,u))})(a,c))}function m0(n,e){const t=n.mergeWithSibling(e),r=tt()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function O0(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&q(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(g0(e,r)){r=m0(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&q(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(g0(r,t)){r=m0(r,t);break}break}t.remove()}}else r.remove()}function gs(n){return x0(n.anchor),x0(n.focus),n}function x0(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,i;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),i=!0):(r=e.getChildAtIndex(t),i=!1),q(r)){n.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!I(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Pi,Ft,Yl,Zh,pp,gp,ms,Yn,mp,Hl,gt="",Vt="",dr=null,pr="",Yr="",Cw=!1,Ul=!1,su=null;function Au(n,e){const t=ms.get(n);if(e!==null){const r=bp(n);r.parentNode===e&&e.removeChild(r)}if(Yn.has(n)||Ft._keyToDOMMap.delete(n),I(t)){const r=Lu(t,ms);Op(r,0,r.length-1,null)}t!==void 0&&aO(Hl,Yl,Zh,t,"destroyed")}function Op(n,e,t,r){let i=e;for(;i<=t;++i){const s=n[i];s!==void 0&&Au(s,r)}}function ji(n,e){n.setProperty("text-align",e)}const yQ="40px";function Tw(n,e){const t=Pi.theme.indent;if(typeof t=="string"){const i=n.classList.contains(t);e>0&&!i?n.classList.add(t):e<1&&i&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||yQ;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function _w(n,e){const t=n.style;e===0?ji(t,""):e===Am?ji(t,"left"):e===Mm?ji(t,"center"):e===Lm?ji(t,"right"):e===Im?ji(t,"justify"):e===Rm?ji(t,"start"):e===Nm&&ji(t,"end")}function Mu(n,e){const t=Yn.get(n);t===void 0&&F(60);const r=t.createDOM(Pi,Ft);if((function(i,s,o){const l=o._keyToDOMMap;(function(a,c,u){const h=`__lexicalKey_${c._key}`;a[h]=u})(s,o,i),l.set(i,s)})(n,r,Ft),q(t)?r.setAttribute("data-lexical-text","true"):Qe(t)&&r.setAttribute("data-lexical-decorator","true"),I(t)){const i=t.__indent,s=t.__size;if(i!==0&&Tw(r,i),s!==0){const l=s-1;(function(a,c,u,h){const f=Vt;Vt="",xp(a,u,0,c,u.getDOMSlot(h)),Qw(u,h),Vt=f})(Lu(t,Yn),l,t,r)}const o=t.__format;o!==0&&_w(r,o),t.isInline()||Pw(null,t,r),ef(t)&&(gt+=ii,Yr+=ii)}else{const i=t.getTextContent();if(Qe(t)){const s=t.decorate(Ft,Pi);s!==null&&$w(n,s),r.contentEditable="false"}else q(t)&&(t.isDirectionless()||(Vt+=i));gt+=i,Yr+=i}return e!==null&&e.insertChild(r),aO(Hl,Yl,Zh,t,"created"),r}function xp(n,e,t,r,i){const s=gt;gt="";let o=t;for(;o<=r;++o){Mu(n[o],i);const l=Yn.get(n[o]);l!==null&&q(l)&&(dr===null&&(dr=l.getFormat()),pr===""&&(pr=l.getStyle()))}ef(e)&&(gt+=ii),i.element.__lexicalTextContent=gt,gt=s+gt}function b0(n,e){if(n){const t=n.__last;if(t){const r=e.get(t);if(r)return Hn(r)?"line-break":Qe(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Pw(n,e,t){const r=b0(n,ms),i=b0(e,Yn);r!==i&&e.getDOMSlot(t).setManagedLineBreak(i)}function Qw(n,e){const t=e.__lexicalDirTextContent||"",r=e.__lexicalDir||"";if(t!==Vt||r!==su){const i=Vt==="",s=i?su:(function(o){return oQ.test(o)?"rtl":lQ.test(o)?"ltr":null})(Vt);if(s!==r){const o=e.classList,l=Pi.theme;let a=r!==null?l[r]:void 0,c=s!==null?l[s]:void 0;if(a!==void 0){if(typeof a=="string"){const u=Qu(a);a=l[r]=u}o.remove(...a)}if(s===null||i&&s==="ltr")e.removeAttribute("dir");else{if(c!==void 0){if(typeof c=="string"){const u=Qu(c);c=l[s]=u}c!==void 0&&o.add(...c)}e.dir=s}Ul||(n.getWritable().__dir=s)}su=s,e.__lexicalDirTextContent=Vt,e.__lexicalDir=s}}function kQ(n,e,t){const r=Vt;var i;Vt="",dr=null,pr="",(function(s,o,l){const a=gt,c=s.__size,u=o.__size;gt="";const h=l.element;if(c===1&&u===1){const f=s.__first,d=o.__first;if(f===d)gl(f,h);else{const g=bp(f),m=Mu(d,null);try{h.replaceChild(m,g)}catch(O){if(typeof O=="object"&&O!=null){const b=`${O.toString()} Parent: ${h.tagName}, new child: {tag: ${m.tagName} key: ${d}}, old child: {tag: ${g.tagName}, key: ${f}}.`;throw new Error(b)}throw O}Au(f,null)}const p=Yn.get(d);q(p)&&(dr===null&&(dr=p.getFormat()),pr===""&&(pr=p.getStyle()))}else{const f=Lu(s,ms),d=Lu(o,Yn);if(f.length!==c&&F(227),d.length!==u&&F(228),c===0)u!==0&&xp(d,o,0,u-1,l);else if(u===0){if(c!==0){const p=l.after==null&&l.before==null&&l.element.__lexicalLineBreak==null;Op(f,0,c-1,p?null:h),p&&(h.textContent="")}}else(function(p,g,m,O,b,x){const y=O-1,w=b-1;let k,S,v=x.getFirstChild(),T=0,A=0;for(;T<=y&&A<=w;){const E=g[T],D=m[A];if(E===D)v=Af(gl(D,x.element)),T++,A++;else{k===void 0&&(k=new Set(g)),S===void 0&&(S=new Set(m));const J=S.has(E),U=k.has(D);if(J)if(U){const le=fo(Ft,D);le===v?v=Af(gl(D,x.element)):(x.withBefore(v).insertChild(le),gl(D,x.element)),T++,A++}else Mu(D,x.withBefore(v)),A++;else v=Af(bp(E)),Au(E,x.element),T++}const B=Yn.get(D);B!==null&&q(B)&&(dr===null&&(dr=B.getFormat()),pr===""&&(pr=B.getStyle()))}const M=T>y,L=A>w;if(M&&!L){const E=m[w+1],D=E===void 0?null:Ft.getElementByKey(E);xp(m,p,A,w,x.withBefore(D))}else L&&!M&&Op(g,T,y,x.element)})(o,f,d,c,u,l)}ef(o)&&(gt+=ii),h.__lexicalTextContent=gt,gt=a+gt})(n,e,e.getDOMSlot(t)),Qw(e,t),i=e,dr==null||dr===i.__textFormat||Ul||i.setTextFormat(dr),(function(s){pr===""||pr===s.__textStyle||Ul||s.setTextStyle(pr)})(e),Vt=r}function Lu(n,e){const t=[];let r=n.__first;for(;r!==null;){const i=e.get(r);i===void 0&&F(101),t.push(r),r=i.__next}return t}function gl(n,e){const t=ms.get(n);let r=Yn.get(n);t!==void 0&&r!==void 0||F(61);const i=Cw||gp.has(n)||pp.has(n),s=fo(Ft,n);if(t===r&&!i){if(I(t)){const o=s.__lexicalTextContent;o!==void 0&&(gt+=o,Yr+=o);const l=s.__lexicalDirTextContent;l!==void 0&&(Vt+=l)}else{const o=t.getTextContent();q(t)&&!t.isDirectionless()&&(Vt+=o),Yr+=o,gt+=o}return s}if(t!==r&&i&&aO(Hl,Yl,Zh,r,"updated"),r.updateDOM(t,s,Pi)){const o=Mu(n,null);return e===null&&F(62),e.replaceChild(o,s),Au(n,null),o}if(I(t)&&I(r)){const o=r.__indent;o!==t.__indent&&Tw(s,o);const l=r.__format;l!==t.__format&&_w(s,l),i&&(kQ(t,r,s),Qt(r)||r.isInline()||Pw(t,r,s)),ef(r)&&(gt+=ii,Yr+=ii)}else{const o=r.getTextContent();if(Qe(r)){const l=r.decorate(Ft,Pi);l!==null&&$w(n,l)}else q(r)&&!r.isDirectionless()&&(Vt+=o);gt+=o,Yr+=o}if(!Ul&&Qt(r)&&r.__cachedText!==Yr){const o=r.getWritable();o.__cachedText=Yr,r=o}return s}function $w(n,e){let t=Ft._pendingDecorators;const r=Ft._decorators;if(t===null){if(r[n]===e)return;t=o2(Ft)}t[n]=e}function Af(n){let e=n.nextSibling;return e!==null&&e===Ft._blockCursorElement&&(e=e.nextSibling),e}function SQ(n,e,t,r,i,s){gt="",Yr="",Vt="",Cw=r===uo,su=null,Ft=t,Pi=t._config,Yl=t._nodes,Zh=Ft._listeners.mutation,pp=i,gp=s,ms=n._nodeMap,Yn=e._nodeMap,Ul=e._readOnly,mp=new Map(t._keyToDOMMap);const o=new Map;return Hl=o,gl("root",null),Ft=void 0,Yl=void 0,pp=void 0,gp=void 0,ms=void 0,Yn=void 0,Pi=void 0,mp=void 0,Hl=void 0,o}function bp(n){const e=mp.get(n);return e===void 0&&F(75,n),e}function ci(n){return{}}const Bh={},wQ={},zh={},ls={},Hs={},Gl={},Us={},Aa={},yp={},Kl={},Jl={},Kr={},Vh={},Fh={},Ew={},Aw={},vQ={},Zm={},CQ={},Bm={},zm={},ea={},Vm={},Xh={},Ma={},Wh={},Fm={},Mw={},Iu={},kp={},Xm={},TQ={},qh={},Wm={},_Q={},jh={},qm={},Sp={},PQ={},QQ={},ml={},Ol={},Lw={},Iw={},Rw={},Vr=Object.freeze({}),wp=30,vp=[["keydown",function(n,e){if(Ql=n.timeStamp,Cp=n.key,e.isComposing())return;const{key:t,shiftKey:r,ctrlKey:i,metaKey:s,altKey:o}=n;if(!re(e,Ew,n)&&t!=null){if(Mf&&As(Cp))return vn(e,(()=>{dc(e,Lf)})),Mf=!1,void(Lf="");if((function(l,a,c,u){return q0(l)&&!a&&!u&&!c})(t,i,o,s))re(e,Aw,n);else if((function(l,a,c,u,h){return q0(l)&&!u&&!c&&(a||h)})(t,i,r,o,s))re(e,vQ,n);else if((function(l,a,c,u){return W0(l)&&!a&&!u&&!c})(t,i,o,s))re(e,Zm,n);else if((function(l,a,c,u,h){return W0(l)&&!u&&!c&&(a||h)})(t,i,r,o,s))re(e,CQ,n);else if((function(l,a,c){return(function(u){return u==="ArrowUp"})(l)&&!a&&!c})(t,i,s))re(e,Bm,n);else if((function(l,a,c){return(function(u){return u==="ArrowDown"})(l)&&!a&&!c})(t,i,s))re(e,zm,n);else if((function(l,a){return j0(l)&&a})(t,r))$l=!0,re(e,ea,n);else if((function(l){return l===" "})(t))re(e,Vm,n);else if((function(l,a){return Vn&&a&&l.toLowerCase()==="o"})(t,i))n.preventDefault(),$l=!0,re(e,Hs,!0);else if((function(l,a){return j0(l)&&!a})(t,r))$l=!1,re(e,ea,n);else if((function(l,a,c,u){return Vn?!a&&!c&&(As(l)||l.toLowerCase()==="h"&&u):u||a||c?!1:As(l)})(t,o,s,i))As(t)?re(e,Xh,n):(n.preventDefault(),re(e,ls,!0));else if((function(l){return l==="Escape"})(t))re(e,Ma,n);else if((function(l,a,c,u,h){return Vn?!(c||u||h)&&(nl(l)||l.toLowerCase()==="d"&&a):a||u||h?!1:nl(l)})(t,i,r,o,s))nl(t)?re(e,Wh,n):(n.preventDefault(),re(e,ls,!1));else if((function(l,a,c){return As(l)&&(Vn?a:c)})(t,o,i))n.preventDefault(),re(e,Kl,!0);else if((function(l,a,c){return nl(l)&&(Vn?a:c)})(t,o,i))n.preventDefault(),re(e,Kl,!1);else if((function(l,a){return Vn&&a&&As(l)})(t,s))n.preventDefault(),re(e,Jl,!0);else if((function(l,a){return Vn&&a&&nl(l)})(t,s))n.preventDefault(),re(e,Jl,!1);else if((function(l,a,c,u){return l.toLowerCase()==="b"&&!a&&xl(c,u)})(t,o,s,i))n.preventDefault(),re(e,Kr,"bold");else if((function(l,a,c,u){return l.toLowerCase()==="u"&&!a&&xl(c,u)})(t,o,s,i))n.preventDefault(),re(e,Kr,"underline");else if((function(l,a,c,u){return l.toLowerCase()==="i"&&!a&&xl(c,u)})(t,o,s,i))n.preventDefault(),re(e,Kr,"italic");else if((function(l,a,c,u){return l==="Tab"&&!a&&!c&&!u})(t,o,i,s))re(e,Fm,n);else if((function(l,a,c,u){return l.toLowerCase()==="z"&&!a&&xl(c,u)})(t,r,s,i))n.preventDefault(),re(e,Vh,void 0);else if((function(l,a,c,u){return Vn?l.toLowerCase()==="z"&&c&&a:l.toLowerCase()==="y"&&u||l.toLowerCase()==="z"&&u&&a})(t,r,s,i))n.preventDefault(),re(e,Fh,void 0);else{const l=e._editorState._selection;l===null||z(l)?!Ci&&Y0(t,s,i)&&(n.preventDefault(),re(e,Sp,n)):(function(a,c,u,h){return c?!1:a.toLowerCase()==="c"?Vn?u:h:!1})(t,r,s,i)?(n.preventDefault(),re(e,jh,n)):(function(a,c,u,h){return c?!1:a.toLowerCase()==="x"?Vn?u:h:!1})(t,r,s,i)?(n.preventDefault(),re(e,qm,n)):Y0(t,s,i)&&(n.preventDefault(),re(e,Sp,n))}(function(l,a,c,u){return l||a||c||u})(i,r,o,s)&&re(e,Rw,n)}}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;Bo(t)&&r!=="touch"&&n.button===0&&vn(e,(()=>{Qe(Ar(t))||(_p=!0)}))}],["compositionstart",function(n,e){vn(e,(()=>{const t=X();if(z(t)&&!e.isComposing()){const r=t.anchor,i=t.anchor.getNode();Tt(r.key),(n.timeStamp<Ql+wp||r.type==="element"||!t.isCollapsed()||i.getFormat()!==t.format||q(i)&&i.getStyle()!==t.style)&&re(e,Us,sQ)}}))}],["compositionend",function(n,e){Ci?tl=!0:co||!jl&&!Pu?vn(e,(()=>{dc(e,n.data)})):(Mf=!0,Lf=n.data)}],["input",function(n,e){n.stopPropagation(),vn(e,(()=>{const t=X(),r=n.data,i=zw(n);if(r!=null&&z(t)&&Zw(t,i,r,n.timeStamp,!1)){tl&&(dc(e,r),tl=!1);const s=t.anchor.getNode(),o=Gn(An(e));if(o===null)return;const l=t.isBackward(),a=l?t.anchor.offset:t.focus.offset,c=l?t.focus.offset:t.anchor.offset;_u&&!t.isCollapsed()&&q(s)&&o.anchorNode!==null&&s.getTextContent().slice(0,a)+r+s.getTextContent().slice(a+c)===u2(o.anchorNode)||re(e,Us,r);const u=r.length;Ci&&u>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=u),jl||co||Pu||!e.isComposing()||(Ql=0,Tt(null))}else oO(!1,e,r!==null?r:void 0),tl&&(dc(e,r||void 0),tl=!1);(function(){At();const s=tt();Sw(s)})()}),{event:n}),Ns=null}],["click",function(n,e){vn(e,(()=>{const t=X(),r=Gn(An(e)),i=No();if(r){if(z(t)){const s=t.anchor,o=s.getNode();if(s.type==="element"&&s.offset===0&&t.isCollapsed()&&!Qt(o)&&Fe().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&t.is(i))r.removeAllRanges(),t.dirty=!0;else if(n.detail===3&&!t.isCollapsed()&&o!==t.focus.getNode()){const l=(function(a,c){let u=a;for(;u!==Fe()&&u!=null;){if(c(u))return u;u=u.getParent()}return null})(o,(a=>I(a)&&!a.isInline()));I(l)&&l.select(0)}}else if(n.pointerType==="touch"){const s=r.anchorNode;(nt(s)||ui(s))&&dt(Um(i,r,e,n))}}re(e,zh,n)}))}],["cut",Vr],["copy",Vr],["dragstart",Vr],["dragover",Vr],["dragend",Vr],["paste",Vr],["focus",Vr],["blur",Vr],["drop",Vr]];_u&&vp.push(["beforeinput",(n,e)=>(function(t,r){const i=t.inputType,s=zw(t);i==="deleteCompositionText"||Ci&&h2(r)||i!=="insertCompositionText"&&vn(r,(()=>{const o=X();if(i==="deleteContentBackward"){if(o===null){const d=No();if(!z(d))return;dt(d.clone())}if(z(o)){const d=o.anchor.key===o.focus.key;if(l=t.timeStamp,Cp==="MediaLast"&&l<Ql+wp&&r.isComposing()&&d){if(Tt(null),Ql=0,setTimeout((()=>{vn(r,(()=>{Tt(null)}))}),wp),z(o)){const p=o.anchor.getNode();p.markDirty(),q(p)||F(142),Bw(o,p)}}else{Tt(null),t.preventDefault();const p=o.anchor.getNode(),g=p.getTextContent(),m=p.canInsertTextAfter(),O=o.anchor.offset===0&&o.focus.offset===g.length;let b=d0&&d&&!O&&m;if(b&&o.isCollapsed()&&(b=!Qe(Ep(o.anchor,!0))),!b){re(r,ls,!0);const x=X();d0&&z(x)&&x.isCollapsed()&&(Ki=x,setTimeout((()=>Ki=null)))}}return}}var l;if(!z(o))return;const a=t.data;Ns!==null&&oO(!1,r,Ns),o.dirty&&Ns===null||!o.isCollapsed()||Qt(o.anchor.getNode())||s===null||o.applyDOMRange(s),Ns=null;const c=o.anchor,u=o.focus,h=c.getNode(),f=u.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(t.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":re(r,Us,t);break;case"insertFromComposition":Tt(null),re(r,Us,t);break;case"insertLineBreak":Tt(null),re(r,Hs,!1);break;case"insertParagraph":Tt(null),$l&&!co?($l=!1,re(r,Hs,!1)):re(r,Gl,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":re(r,Aa,t);break;case"deleteByComposition":(function(d,p){return d!==p||I(d)||I(p)||!d.isToken()||!p.isToken()})(h,f)&&re(r,yp,t);break;case"deleteByDrag":case"deleteByCut":re(r,yp,t);break;case"deleteContent":re(r,ls,!1);break;case"deleteWordBackward":re(r,Kl,!0);break;case"deleteWordForward":re(r,Kl,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":re(r,Jl,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":re(r,Jl,!1);break;case"formatStrikeThrough":re(r,Kr,"strikethrough");break;case"formatBold":re(r,Kr,"bold");break;case"formatItalic":re(r,Kr,"italic");break;case"formatUnderline":re(r,Kr,"underline");break;case"historyUndo":re(r,Vh,void 0);break;case"historyRedo":re(r,Fh,void 0)}else{if(a===`
|
|
4
4
|
`)t.preventDefault(),re(r,Hs,!1);else if(a===ii)t.preventDefault(),re(r,Gl,void 0);else if(a==null&&t.dataTransfer){const d=t.dataTransfer.getData("text/plain");t.preventDefault(),o.insertRawText(d)}else a!=null&&Zw(o,s,a,t.timeStamp,!0)?(t.preventDefault(),re(r,Us,a)):Ns=a;Nw=t.timeStamp}}))})(n,e)]);let Ql=0,Cp=null,Nw=0,Ns=null;const Ru=new WeakMap;let Tp=!1,_p=!1,$l=!1,tl=!1,Mf=!1,Lf="",Ki=null,Dw=[0,"",0,"root",0];function Zw(n,e,t,r,i){const s=n.anchor,o=n.focus,l=s.getNode(),a=tt(),c=Gn(An(a)),u=c!==null?c.anchorNode:null,h=s.key,f=a.getElementByKey(h),d=t.length;return h!==o.key||!q(l)||(!i&&(!_u||Nw<r+50)||l.isDirty()&&d<2||a2(t))&&s.offset!==o.offset&&!l.isComposing()||Ds(l)||l.isDirty()&&d>1||(i||!_u)&&f!==null&&!l.isComposing()&&u!==ho(f)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||l.getFormat()!==n.format||l.getStyle()!==n.style||(function(p,g){if(g.isSegmented())return!0;if(!p.isCollapsed())return!1;const m=p.anchor.offset,O=g.getParentOrThrow(),b=g.isToken();return m===0?!g.canInsertTextBefore()||!O.canInsertTextBefore()&&!g.isComposing()||b||(function(x){const y=x.getPreviousSibling();return(q(y)||I(y)&&y.isInline())&&!y.canInsertTextAfter()})(g):m===g.getTextContentSize()&&(!g.canInsertTextAfter()||!O.canInsertTextAfter()&&!g.isComposing()||b)})(n,l)}function y0(n,e){return ui(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function k0(n,e,t){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}=n;Tp&&(Tp=!1,y0(r,i)&&y0(s,o)&&!Ki)||vn(e,(()=>{if(!t)return void dt(null);if(!Ba(e,r,s))return;let l=X();if(Ki&&z(l)&&l.isCollapsed()){const a=l.anchor,c=Ki.anchor;(a.key===c.key&&a.offset===c.offset+1||a.offset===1&&c.getNode().is(a.getNode().getPreviousSibling()))&&(l=Ki.clone(),dt(l))}if(Ki=null,z(l)){const a=l.anchor,c=a.getNode();if(l.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(l.dirty=!0);const u=An(e).event,h=u?u.timeStamp:performance.now(),[f,d,p,g,m]=Dw,O=Fe(),b=e.isComposing()===!1&&O.getTextContent()==="";if(h<m+200&&a.offset===p&&a.key===g)ou(l,f,d);else if(a.type==="text")q(c)||F(141),Bw(l,c);else if(a.type==="element"&&!b){I(c)||F(259);const x=a.getNode();x.isEmpty()?(function(y,w){const k=w.getTextFormat(),S=w.getTextStyle();ou(y,k,S)})(l,x):ou(l,0,"")}}else{const u=a.key,h=l.focus.key,f=l.getNodes(),d=f.length,p=l.isBackward(),g=p?o:i,m=p?i:o,O=p?h:u,b=p?u:h;let x=iQ,y=!1;for(let w=0;w<d;w++){const k=f[w],S=k.getTextContentSize();if(q(k)&&S!==0&&!(w===0&&k.__key===O&&g===S||w===d-1&&k.__key===b&&m===0)&&(y=!0,x&=k.getFormat(),x===0))break}l.format=y?x:0}}re(e,Bh,void 0)}))}function ou(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function Bw(n,e){ou(n,e.getFormat(),e.getStyle())}function zw(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function dc(n,e){const t=n._compositionKey;if(Tt(null),t!==null&&e!=null){if(e===""){const r=Ke(t),i=ho(n.getElementByKey(t));return void(i!==null&&i.nodeValue!==null&&q(r)&&lO(r,i.nodeValue,null,null,!0))}if(e[e.length-1]===`
|