PageSourceSearch

https://cantina.com/luke-assets/capCastMentions-BzoalIm1.js

js cantina.com collected 2026-09-24 21:43:16 UTC 130,411 bytes, 13 lines download raw bytes

1import{j as Jt}from"./jsx-runtime-u17CrQMm.js";import{a as Ki}from"./chunk-LFPYN7LY-3HAXvZlX.js";import{A as io}from"./Avatar-CtX12pUt.js";import"./message-Dmjd5BUk.js";import"./validate_pb-CUY5UUaI.js";import"./getCommentTimeDisplay-CypeQIKc.js";const so=Ki.createContext(null);function ga(n,e){return{getTheme:function(){return e??null}}}function oo(){const n=Ki.useContext(so);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 N(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.`)}function Ri(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);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const oe=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,lo=oe&&"documentMode"in document?document.documentMode:null,re=oe&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ee=oe&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),en=!(!oe||!("InputEvent"in window)||lo)&&"getTargetRanges"in new window.InputEvent("input"),Mt=oe&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Bi=oe&&/Android/.test(navigator.userAgent),mn=oe&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!Bi,zi=oe&&/^(?=.*Chrome).*/i.test(navigator.userAgent),jn=oe&&Bi&&zi,yn=oe&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&re&&!zi,ao=0,co=1,uo=2,Wi=128,fo=1,ho=2,go=3,_o=4,po=5,mo=6,vt=mn||Mt||yn?" ":"​",xn=`
2
3`,hr=Ee?" ":vt,Be={bold:1,capitalize:1024,code:16,highlight:Wi,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},yo={directionless:1,unmergeable:2},Vn={center:2,end:6,justify:4,left:1,right:3,start:5},xo={[ho]:"center",[mo]:"end",[_o]:"justify",[fo]:"left",[go]:"right",[po]:"start"},Co={normal:0,segmented:2,token:1},So={[ao]:"normal",[uo]:"segmented",[co]:"token"},Kr="$config";function Ui(n,e,t,r,i,s){let o=n.getFirstChild();for(;o!==null;){const l=o.__key;o.__parent===e&&(S(o)&&Ui(o,l,t,r,i,s),t.has(l)||s.delete(l),i.push(l)),o=o.getNextSibling()}}let Hn=!1,gr=0;function vo(n){gr=n.timeStamp}function Fn(n,e,t){const r=n.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(n===i||r&&n.previousSibling===i)||r&&bn(n,t)!==void 0}function ko(n,e,t){const r=he(te(t));let i=null,s=null;r!==null&&r.anchorNode===n&&(i=r.anchorOffset,s=r.focusOffset);const o=n.nodeValue;o!==null&&br(e,o,i,s,!1)}function No(n,e,t){if(A(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return Se(e)&&t.isAttached()}function To(n,e,t,r){for(let i=n;i&&!zl(i);i=Rt(i)){const s=bn(i,e);if(s!==void 0){const o=$(s,t);if(o)return z(o)||!ne(i)?void 0:[i,o]}else if(i===r)return[r,Ws(t)]}}function $i(n,e,t){Hn=!0;const r=performance.now()-gr>100;try{fe(n,()=>{const i=K()||(function(f){return f.getEditorState().read(()=>{const _=K();return _!==null?_.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 _=e[f],h=_.type,p=_.target,g=To(p,n,l,o);if(!g)continue;const[m,y]=g;if(h==="characterData")r&&M(y)&&Se(p)&&No(i,p,y)&&ko(p,y,n);else if(h==="childList"){c=!0;const x=_.addedNodes;for(let v=0;v<x.length;v++){const w=x[v],k=Bs(w),C=w.parentNode;if(C!=null&&w!==a&&k===null&&!Fn(w,C,n)){if(Ee){const O=(ne(w)?w.innerText:null)||w.nodeValue;O&&(u+=O)}C.removeChild(w)}}const T=_.removedNodes,b=T.length;if(b>0){let v=0;for(let w=0;w<b;w++){const k=T[w];(Fn(k,p,n)||a===k)&&(p.appendChild(k),v++)}b!==v&&s.set(m,y)}}}if(s.size>0)for(const[f,_]of s)_.reconcileObservedMutation(f,n);const d=t.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const _=d[f],h=_.addedNodes,p=_.target;for(let g=0;g<h.length;g++){const m=h[g],y=m.parentNode;y==null||m.nodeName!=="BR"||Fn(m,p,n)||y.removeChild(m)}}t.takeRecords()}i!==null&&(c&&ee(i),Ee&&js(n)&&i.insertRawText(u))})}finally{Hn=!1}}function Ji(n){const e=n._observer;e!==null&&$i(n,e.takeRecords(),e)}function ji(n){(function(e){gr===0&&te(e).addEventListener("textInput",vo,!0)})(n),n._observer=new MutationObserver((e,t)=>
3{$i(n,e,t)})}class bo{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Mo).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}}function _a(n,e){return new bo(n,e)}function wo(n){const e=new Map,t=new Set;for(let r=typeof n=="function"?n:n.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=En(r);if(i&&i.stateConfigs)for(const s of i.stateConfigs){let o;"stateConfig"in s?(o=s.stateConfig,s.flat&&t.add(o.key)):o=s,e.set(o.key,o)}}return{flatKeys:t,sharedConfigMap:e}}class _r{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,r=void 0,i=new Map,s=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=i;const{sharedConfigMap:o}=this.sharedNodeState,l=s!==void 0?s:(function(a,c,u){let d=u.size;if(c)for(const f in c){const _=a.get(f);_&&u.has(_)||d++}return d})(o,r,i);this.size=l}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.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},t={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return Rr(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,i=new Map(this.knownState);return new _r(e,t,(function(s,o,l){let a;if(l)for(const[c,u]of Object.entries(l)){const d=s.get(c);d?o.has(d)||o.set(d,d.parse(u)):(a=a||{},a[c]=u)}return a})(t.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(const e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:s}=this;i.has(e)||s&&r in s||(s&&(delete s[r],this.unknownState=Rr(s)),this.size++),i.set(e,t)}updateFromUnknown(e,t){const r=this.sharedNodeState.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=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}}function Eo(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new _r(e,Vi(e));return e.__state=t,t}function Vi(n){return n.__state?n.__state.sharedNodeState:Fs(Kl(),n.getType()).sharedNodeState}function Rr(n){if(n)for(const e in n)return n}function Mo(n){return n}function Br(n,e,t){for(const[r,i]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const s=t?t.getValue(r):r.defaultValue;if(s!==i&&!r.isEqual(s,i))return!0}return!1}function zr(n,e,t){const{unknownState:r}=e,i=t?t.unknownState:void 0;if(r){for(const[s,o]of Object.entries(r))if(!n.has(s)&&(n.add(s),o!==(i?i[s]:void 0)))return!0}return!1}function Wr(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function Ur(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,d){if(u===d)return!0;const f=new Set;return!(u&&Br(f,u,d)||d&&Br(f,d,u)||u&&zr(f,u,d)||d&&zr(f,d,u))})(a,c))}function $r(n,e){const t=n.mergeWithSibling(e),r=B()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function Jr(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&M(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Ur(e,r)){r=$r(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&M(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Ur(r,t)){r=$r(r,t);break}break}t.remove()}}else r.remove()}function Yn(n){return jr(n.anchor),jr(n.focus),n}function jr(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),M(r)){n.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!S(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let ze,Y,kt,Cn,qn,Xn,We,ie,Gn,Nt,U="",ae=null,Pe=null,Ge=!1,tn=!1;function nn(n,e){const t=We.get(n);if(e!==null){const r=tr(n);r.parentNode===e&&e.removeChild(r)}if(ie.has(n)||Y._keyToDOMMap.delete(n),S(t)){const r=sn(t,We);Qn(r,0,r.length-1,null)}t!==void 0&&wr(Nt,kt,Cn,t,"destroyed")}function Qn(n,e,t,r){for(let i=e;i<=t;++i){const s=n[i];s!==void 0&&nn(s,r)}}function De(n,e){n.setProperty("text-align",e)}const Oo="40px";function Hi(n,e){const t=ze.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)}if(e===0)return void n.style.setProperty("padding-inline-start","");const r=getComputedStyle(Y._rootElement||n).getPropertyValue("--lexical-indent-base-value")||Oo;n.style.setProperty("padding-inline-start",`calc(${e} * ${r})`)}function Yi(n,e){const t=n.style;e===0?De(t,""):e===1?De(t,"left"):e===2?De(t,"center"):e===3?De(t,"right"):e===4?De(t,"justify"):e===5?De(t,"start"):e===6&&De(t,"end")}function Zn(n,e){const t=(function(r){const i=r.__dir;if(i!==null)return i;if(X(r))return null;const s=r.getParentOrThrow();return X(s)&&s.__dir===null?"auto":null})(e);t!==null?n.dir=t:n.removeAttribute("dir")}function rn(n,e){const t=ie.get(n);t===void 0&&N(60);const r=t.createDOM(ze,Y);if((function(i,s,o){const l=o._keyToDOMMap;(function(a,c,u){const d=`__lexicalKey_${c._key}`;a[d]=u})(s,o,i),l.set(i,s)})(n,r,Y),M(t)?r.setAttribute("data-lexical-text","true"):z(t)&&r.setAttribute("data-lexical-decorator","true"),S(t)){const i=t.__indent,s=t.__size;if(Zn(r,t),i!==0&&Hi(r,i),s!==0){const l=s-1;er(sn(t,ie),t,0,l,t.getDOMSlot(r))}const o=t.__format;o!==0&&Yi(r,o),t.isInline()||qi(null,t,r)}else{const i=t.getTextContent();if(z(t)){const s=t.decorate(Y,ze);s!==null&&Xi(n,s),r.contentEditable="false"}U+=i}return e!==null&&e.insertChild(r),wr(Nt,kt,Cn,t,"created"),r}function er(n,e,t,r,i){const s=U;U="";let o=t;for(;o<=r;++o){rn(n[o],i);
3const l=ie.get(n[o]);l!==null&&M(l)?ae===null&&(ae=l.getFormat(),Pe=l.getStyle()):S(l)&&o<r&&!l.isInline()&&(U+=xn)}i.element.__lexicalTextContent=U,U=s+U}function Vr(n,e){if(n){const t=n.__last;if(t){const r=e.get(t);if(r)return xt(r)?"line-break":z(r)&&r.isInline()?"decorator":null}return"empty"}return null}function qi(n,e,t){const r=Vr(n,We),i=Vr(e,ie);r!==i&&e.getDOMSlot(t).setManagedLineBreak(i)}function Ao(n,e,t){var r;ae=null,Pe=null,(function(i,s,o){const l=U,a=i.__size,c=s.__size;U="";const u=o.element;if(a===1&&c===1){const d=i.__first,f=s.__first;if(d===f)jt(d,u);else{const h=tr(d),p=rn(f,null);try{u.replaceChild(p,h)}catch(g){if(typeof g=="object"&&g!=null){const m=`${g.toString()} Parent: ${u.tagName}, new child: {tag: ${p.tagName} key: ${f}}, old child: {tag: ${h.tagName}, key: ${d}}.`;throw new Error(m)}throw g}nn(d,null)}const _=ie.get(f);M(_)&&ae===null&&(ae=_.getFormat(),Pe=_.getStyle())}else{const d=sn(i,We),f=sn(s,ie);if(d.length!==a&&N(227),f.length!==c&&N(228),a===0)c!==0&&er(f,0,0,c-1,o);else if(c===0){if(a!==0){const _=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;Qn(d,0,a-1,_?null:u),_&&(u.textContent="")}}else(function(_,h,p,g,m,y){const x=g-1,T=m-1;let b,v,w=y.getFirstChild(),k=0,C=0;for(;k<=x&&C<=T;){const R=h[k],I=p[C];if(R===I)w=In(jt(I,y.element)),k++,C++;else{if(v===void 0&&(v=Hr(p,C)),b===void 0)b=Hr(h,k);else if(!b.has(R)){k++;continue}if(!v.has(R)){w=In(tr(R)),nn(R,y.element),k++,b.delete(R);continue}if(b.has(I)){const W=it(Y,I);W!==w&&y.withBefore(w).insertChild(W),w=In(jt(I,y.element)),k++,C++}else rn(I,y.withBefore(w)),C++}const F=ie.get(I);F!==null&&M(F)?ae===null&&(ae=F.getFormat(),Pe=F.getStyle()):S(F)&&C<=T&&!F.isInline()&&(U+=xn)}const O=k>x,P=C>T;if(O&&!P){const R=p[T+1],I=R===void 0?null:Y.getElementByKey(R);er(p,0,C,T,y.withBefore(I))}else P&&!O&&Qn(h,k,x,y.element)})(0,d,f,a,c,o)}u.__lexicalTextContent=U,U=l+U})(n,e,e.getDOMSlot(t)),r=e,ae==null||ae===r.__textFormat||tn||r.setTextFormat(ae),(function(i){Pe==null||Pe===i.__textStyle||tn||i.setTextStyle(Pe)})(e)}function sn(n,e){const t=[];let r=n.__first;for(;r!==null;){const i=e.get(r);i===void 0&&N(101),t.push(r),r=i.__next}return t}function jt(n,e){const t=We.get(n);let r=ie.get(n);t!==void 0&&r!==void 0||N(61);const i=Ge||Xn.has(n)||qn.has(n),s=it(Y,n);if(t===r&&!i){let o;if(S(t)){const l=s.__lexicalTextContent;typeof l=="string"?o=l:(o=t.getTextContent(),s.__lexicalTextContent=o)}else o=t.getTextContent();return U+=o,s}if(t!==r&&i&&wr(Nt,kt,Cn,r,"updated"),r.updateDOM(t,s,ze)){const o=rn(n,null);return e===null&&N(62),e.replaceChild(o,s),nn(n,null),o}if(S(t)){S(r)||N(334,n);const o=r.__indent;(Ge||o!==t.__indent)&&Hi(s,o);const l=r.__format;if((Ge||l!==t.__format)&&Yi(s,l),i)Ao(t,r,s),X(r)||r.isInline()||qi(t,r,s);else{const a=s.__lexicalTextContent;let c;typeof a=="string"?c=a:(c=t.getTextContent(),s.__lexicalTextContent=c),U+=c}if((Ge||r.__dir!==t.__dir)&&(Zn(s,r),X(r)&&!Ge))for(const a of r.getChildren())S(a)&&Zn(it(Y,a.getKey()),a)}else{const o=r.getTextContent();if(z(r)){const l=r.decorate(Y,ze);l!==null&&Xi(n,l)}U+=o}if(!tn&&X(r)&&r.__cachedText!==U){const o=r.getWritable();o.__cachedText=U,r=o}return s}function Xi(n,e){let t=Y._pendingDecorators;const r=Y._decorators;if(t===null){if(r[n]===e)return;t=zs(Y)}t[n]=e}function In(n){let e=n.nextSibling;return e!==null&&e===Y._blockCursorElement&&(e=e.nextSibling),e}function Hr(n,e){const t=new Set;for(let r=e;r<n.length;r++)t.add(n[r]);return t}function Do(n,e,t,r,i,s){U="",Ge=r===2,Y=t,ze=t._config,kt=t._nodes,Cn=Y._listeners.mutation,qn=i,Xn=s,We=n._nodeMap,ie=e._nodeMap,tn=e._readOnly,Gn=new Map(t._keyToDOMMap);const o=new Map;return Nt=o,jt("root",null),Y=void 0,kt=void 0,qn=void 0,Xn=void 0,We=void 0,ie=void 0,ze=void 0,Gn=void 0,Nt=void 0,o}function tr(n){const e=Gn.get(n);return e===void 0&&N(75,n),e}function D(n){return{type:n}}const Gi=D("SELECTION_CHANGE_COMMAND"),Po=D("CLICK_COMMAND"),Qi=D("BEFORE_INPUT_COMMAND"),Zi=D("INPUT_COMMAND"),es=D("COMPOSITION_START_COMMAND"),ts=D("COMPOSITION_END_COMMAND"),on=D("DELETE_CHARACTER_COMMAND"),Vt=D("INSERT_LINE_BREAK_COMMAND"),Yr=D("INSERT_PARAGRAPH_COMMAND"),mt=D("CONTROLLED_TEXT_INSERTION_COMMAND"),ns=D("PASTE_COMMAND"),qr=D("REMOVE_TEXT_COMMAND"),ln=D("DELETE_WORD_COMMAND"),an=D("DELETE_LINE_COMMAND"),Ie=D("FORMAT_TEXT_COMMAND"),rs=D("UNDO_COMMAND"),is=D("REDO_COMMAND"),ss=D("KEYDOWN_COMMAND"),Fo=D("KEY_ARROW_RIGHT_COMMAND"),Io=D("MOVE_TO_END"),Lo=D("KEY_ARROW_LEFT_COMMAND"),Ko=D("MOVE_TO_START"),Ro=D("KEY_ARROW_UP_COMMAND"),Bo=D("KEY_ARROW_DOWN_COMMAND"),nr=D("KEY_ENTER_COMMAND"),zo=D("KEY_SPACE_COMMAND"),Wo=D("KEY_BACKSPACE_COMMAND"),Uo=D("KEY_ESCAPE_COMMAND"),$o=D("KEY_DELETE_COMMAND"),Jo=D("KEY_TAB_COMMAND"),jo=D("DROP_COMMAND"),Vo=D("DRAGSTART_COMMAND"),Ho=D("DRAGOVER_COMMAND"),Yo=D("DRAGEND_COMMAND"),os=D("COPY_COMMAND"),ls=D("CUT_COMMAND"),Xr=D("SELECT_ALL_COMMAND"),pa=D("CLEAR_EDITOR_COMMAND"),ma=D("CLEAR_HISTORY_COMMAND"),ya=D("CAN_REDO_COMMAND"),xa=D("CAN_UNDO_COMMAND"),qo=D("FOCUS_COMMAND"),Xo=D("BLUR_COMMAND"),Go=D("KEY_MODIFIER_COMMAND"),_e=Object.freeze({}),rr=[["keydown",function(n,e){Tt=n.timeStamp,as=n.key,!e.isComposing()&&E(e,ss,n)}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;Bt(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&fe(e,()=>{Ls(t)||(or=!0)})}],["compositionstart",function(n,e){E(e,es,n)}],["compositionend",function(n,e){Ee?pt=!0:Mt||!mn&&!yn?E(e,ts,n):(Ht=!0,Yt=n.data)}],["input",function(n,e){n.stopPropagation(),fe(e,()=>{e.dispatchCommand(Zi,n)},{event:n}),Qe=null}],["click",function(n,e){fe(e,()=>{const t=K(),r=he(te(e)),i=Dt();if(r){if(A(t)){const s=t.anchor,o=s.getNode();if(s.type==="element"&&s.offset===0&&t.isCollapsed()&&!X(o)&&se().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=Gt(o,a=>S(a)&&!a.isInline());S(l)&&l.select(0)}}else if(n.pointerType==="touch"||n.pointerType==="pen"){const s=r.anchorNode;(ne(s)||Se(s))&&ee(yr(i,r,e,n))}}E(e,Po,n)})}],["cut",_e],["copy",_e],["dragstart",_e],["dragover",_e],["dragend",_e],["paste",_e],["focus",_e],["blur",_e],["drop",_e]];en&&rr.push(["beforeinput",(n,e)=>(function(t,r){const i=t.inputType;i==="deleteCompositionText"||Ee&&js(r)||i!=="insertCompositionText"&&E(r,Qi,t)})(n,e)]);let Tt=0,as=null,cs=0,Qe=null;const ir=new WeakMap,cn=new WeakMap;let sr=!1,or=!1,yt=!1,pt=!1,Ht=!1,Yt="",Fe=null,us=[0,"",0,"root",0];function fs(n,e,t,r,i){const s=n.anchor,o=n.focus,l=s.getNode(),a=B(),c=he(te(a)),u=c!==null?c.anchorNode:null,d=s.key,f=a.getElementByKey(d),_=t.length;return d!==o.key||!M(l)||(!i&&(!en||cs<r+50)||l.isDirty()&&_<2||Us(t))&&s.offset!==o.offset&&!l.isComposing()||ke(l)||l.isDirty()&&_>1||(i||!en)&&f!==null&&!l.isComposing()&&u!==rt(f)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anch
3orNode||e.startOffset!==c.anchorOffset)||!l.isComposing()&&(l.getFormat()!==n.format||l.getStyle()!==n.style)||(function(h,p){if(p.isSegmented())return!0;if(!h.isCollapsed())return!1;const g=h.anchor.offset,m=p.getParentOrThrow(),y=Le(p);return g===0?!p.canInsertTextBefore()||!m.canInsertTextBefore()&&!p.isComposing()||y||(function(x){const T=x.getPreviousSibling();return(M(T)||S(T)&&T.isInline())&&!T.canInsertTextAfter()})(p):g===p.getTextContentSize()&&(!p.canInsertTextAfter()||!m.canInsertTextAfter()&&!p.isComposing()||y)})(n,l)}function Gr(n,e){return Se(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function Qr(n,e,t){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}=n;sr&&(sr=!1,Gr(r,i)&&Gr(s,o)&&!Fe)||fe(e,()=>{if(!t)return void ee(null);if(!Nn(e,r,s))return;let l=K();if(Fe&&A(l)&&l.isCollapsed()){const a=l.anchor,c=Fe.anchor;(a.key===c.key&&a.offset===c.offset+1||a.offset===1&&c.getNode().is(a.getNode().getPreviousSibling()))&&(l=Fe.clone(),ee(l))}if(Fe=null,A(l)){const a=l.anchor,c=a.getNode();if(l.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(l.dirty=!0);const u=te(e).event,d=u?u.timeStamp:performance.now(),[f,_,h,p,g]=us,m=se(),y=e.isComposing()===!1&&m.getTextContent()==="";if(d<g+200&&a.offset===h&&a.key===p)qt(l,f,_);else if(a.type==="text")M(c)||N(141),ds(l,c);else if(a.type==="element"&&!y){S(c)||N(259);const x=a.getNode();x.isEmpty()?(function(T,b){const v=b.getTextFormat(),w=b.getTextStyle();qt(T,v,w)})(l,x):qt(l,l.format,"")}}else{const u=a.key,d=l.focus.key,f=l.getNodes(),_=f.length,h=l.isBackward(),p=h?o:i,g=h?i:o,m=h?d:u,y=h?u:d;let x=2047,T=!1;for(let b=0;b<_;b++){const v=f[b],w=v.getTextContentSize();if(M(v)&&w!==0&&!(b===0&&v.__key===m&&p===w||b===_-1&&v.__key===y&&g===0)&&(T=!0,x&=v.getFormat(),x===0))break}l.format=T?x:0}}E(e,Gi,void 0)})}function qt(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function ds(n,e){qt(n,e.getFormat(),e.getStyle())}function hs(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Qo(n){const e=n.inputType,t=hs(n),r=B(),i=K();if(e==="deleteContentBackward"){if(i===null){const d=Dt();if(!A(d))return!0;ee(d.clone())}if(A(i)){const d=i.anchor.key===i.focus.key;if(s=n.timeStamp,as==="MediaLast"&&s<Tt+30&&r.isComposing()&&d){if(H(null),Tt=0,setTimeout(()=>{fe(r,()=>{H(null)})},30),A(i)){const f=i.anchor.getNode();f.markDirty(),M(f)||N(142),ds(i,f)}}else{H(null),n.preventDefault();const f=i.anchor.getNode(),_=f.getTextContent(),h=f.canInsertTextAfter(),p=i.anchor.offset===0&&i.focus.offset===_.length;let g=jn&&d&&!p&&h;if(g&&i.isCollapsed()&&(g=!z(Ol(i.anchor,!0))),!g){E(r,on,!0);const m=K();jn&&A(m)&&m.isCollapsed()&&(Fe=m,setTimeout(()=>Fe=null))}}return!0}}var s;if(!A(i))return!0;const o=n.data;Qe!==null&&Tr(!1,r,Qe),i.dirty&&Qe===null||!i.isCollapsed()||X(i.anchor.getNode())||t===null||i.applyDOMRange(t),Qe=null;const l=i.anchor,a=i.focus,c=l.getNode(),u=a.getNode();if(e==="insertText"||e==="insertTranspose"){if(o===`
4`)n.preventDefault(),E(r,Vt,!1);else if(o===xn)n.preventDefault(),E(r,Yr,void 0);else if(o==null&&n.dataTransfer){const d=n.dataTransfer.getData("text/plain");n.preventDefault(),i.insertRawText(d)}else o!=null&&fs(i,t,o,n.timeStamp,!0)?(n.preventDefault(),E(r,mt,o)):Qe=o;return cs=n.timeStamp,!0}switch(n.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":E(r,mt,n);break;case"insertFromComposition":H(null),E(r,mt,n);break;case"insertLineBreak":H(null),E(r,Vt,!1);break;case"insertParagraph":H(null),yt&&!Mt?(yt=!1,E(r,Vt,!1)):E(r,Yr,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":E(r,ns,n);break;case"deleteByComposition":(function(d,f){return d!==f||S(d)||S(f)||!Le(d)||!Le(f)})(c,u)&&E(r,qr,n);break;case"deleteByDrag":case"deleteByCut":E(r,qr,n);break;case"deleteContent":E(r,on,!1);break;case"deleteWordBackward":E(r,ln,!0);break;
4case"deleteWordForward":E(r,ln,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":E(r,an,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":E(r,an,!1);break;case"formatStrikeThrough":E(r,Ie,"strikethrough");break;case"formatBold":E(r,Ie,"bold");break;case"formatItalic":E(r,Ie,"italic");break;case"formatUnderline":E(r,Ie,"underline");break;case"historyUndo":E(r,rs,void 0);break;case"historyRedo":E(r,is,void 0)}return!0}function Zo(n){if(ne(n.target)&&Ls(n.target))return!0;const e=B(),t=K(),r=n.data,i=hs(n);if(r!=null&&A(t)&&fs(t,i,r,n.timeStamp,!1)){pt&&(un(e,r),pt=!1);const s=t.anchor.getNode(),o=he(te(e));if(o===null)return!0;const l=t.isBackward(),a=l?t.anchor.offset:t.focus.offset,c=l?t.focus.offset:t.anchor.offset;en&&!t.isCollapsed()&&M(s)&&o.anchorNode!==null&&s.getTextContent().slice(0,a)+r+s.getTextContent().slice(a+c)===Js(o.anchorNode)||E(e,mt,r);const u=r.length;Ee&&u>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=u),jn&&e.isComposing()&&(Tt=0,H(null))}else Tr(!1,e,r!==null?r:void 0),pt&&(un(e,r||void 0),pt=!1);return(function(){q();const s=B();Ji(s)})(),!0}function el(n){const e=B(),t=K();if(A(t)&&!e.isComposing()){const r=t.anchor,i=t.anchor.getNode();H(r.key),Er(ll),(n.timeStamp<Tt+30||r.type==="element"||!t.isCollapsed()||i.getFormat()!==t.format||M(i)&&i.getStyle()!==t.style)&&E(e,mt,hr)}return!0}function tl(n){return un(B(),n.data),Er(al),!0}function un(n,e){const t=n._compositionKey;if(H(null),t!==null&&e!=null){if(e===""){const r=$(t),i=rt(n.getElementByKey(t));if(i!==null&&i.nodeValue!==null&&M(r)){const s=he(te(n));let o=null,l=null;s!==null&&s.anchorNode===i&&(o=s.anchorOffset,l=s.focusOffset),br(r,i.nodeValue,o,l,!0)}return}if(e[e.length-1]===`
5`){const r=K();if(A(r)||vn(r)){if(A(r)){const i=r.focus;r.anchor.set(i.key,i.offset,i.type)}return void E(n,nr,null)}}}Tr(!0,n,e)}function nl(n){const e=B();if(n.key==null)return!0;if(Ht){if(bi(n))return fe(e,()=>{un(e,Yt)}),Ht=!1,Yt="",!0;Ht=!1,Yt=""}if((function(t){return L(t,"ArrowRight",{shiftKey:"any"})})(n))E(e,Fo,n);else if((function(t){return L(t,"ArrowRight",me)})(n))E(e,Io,n);else if((function(t){return L(t,"ArrowLeft",{shiftKey:"any"})})(n))E(e,Lo,n);else if((function(t){return L(t,"ArrowLeft",me)})(n))E(e,Ko,n);else if((function(t){return L(t,"ArrowUp",{altKey:"any",shiftKey:"any"})})(n))E(e,Ro,n);else if((function(t){return L(t,"ArrowDown",{altKey:"any",shiftKey:"any"})})(n))E(e,Bo,n);else if((function(t){return L(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(n))yt=!0,E(e,nr,n);else if((function(t){return t.key===" "})(n))E(e,zo,n);else if((function(t){return re&&L(t,"o",{ctrlKey:!0})})(n))n.preventDefault(),yt=!0,E(e,Vt,!0);else if((function(t){return L(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(n))yt=!1,E(e,nr,n);else if((function(t){return L(t,"Backspace",{shiftKey:"any"})||re&&L(t,"h",{ctrlKey:!0})})(n))bi(n)?E(e,Wo,n):(n.preventDefault(),E(e,on,!0));else if((function(t){return t.key==="Escape"})(n))E(e,Uo,n);else if((function(t){return L(t,"Delete",{})||re&&L(t,"d",{ctrlKey:!0})})(n))(function(t){return t.key==="Delete"})(n)?E(e,$o,n):(n.preventDefault(),E(e,on,!1));else if((function(t){return L(t,"Backspace",Ti)})(n))n.preventDefault(),E(e,ln,!0);else if((function(t){return L(t,"Delete",Ti)})(n))n.preventDefault(),E(e,ln,!1);else if((function(t){return re&&L(t,"Backspace",{metaKey:!0})})(n))n.preventDefault(),E(e,an,!0);else if((function(t){return re&&(L(t,"Delete",{metaKey:!0})||L(t,"k",{ctrlKey:!0}))})(n))n.preventDefault(),E(e,an,!1);else if((function(t){return L(t,"b",me)})(n))n.preventDefault(),E(e,Ie,"bold");else if((function(t){return L(t,"u",me)})(n))n.preventDefault(),E(e,Ie,"underline");else if((function(t){return L(t,"i",me)})(n))n.preventDefault(),E(e,Ie,"italic");else if((function(t){return L(t,"Tab",{shiftKey:"any"})})(n))E(e,Jo,n);else if((function(t){return L(t,"z",me)})(n))n.preventDefault(),E(e,rs,void 0);else if((function(t){return re?L(t,"z",{metaKey:!0,shiftKey:!0}):L(t,"y",{ctrlKey:!0})||L(t,"z",{ctrlKey:!0,shiftKey:!0})})(n))n.preventDefault(),E(e,is,void 0);else{const t=e._editorState._selection;t===null||A(t)?wi(n)&&(n.preventDefault(),E(e,Xr,n)):(function(r){return L(r,"c",me)})(n)?(n.preventDefault(),E(e,os,n)):(function(r){return L(r,"x",me)})(n)?(n.preventDefault(),E(e,ls,n)):wi(n)&&(n.preventDefault(),E(e,Xr,n))}return(function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey})(n)&&e.dispatchCommand(Go,n),!0}function gs(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const et=new Map;function _s(n){const e=Fl(n.target);if(e===null)return;const t=Rs(e.anchorNode);
5if(t===null)return;or&&(or=!1,fe(t,()=>{const a=Dt(),c=e.anchorNode;(ne(c)||Se(c))&&ee(yr(a,e,t,n))}));const r=Nr(t),i=r[r.length-1],s=i._key,o=et.get(s),l=o||i;l!==t&&Qr(e,l,!1),Qr(e,t,!0),t!==i?et.set(s,t):o&&et.delete(s)}function Zr(n){n._lexicalHandled=!0}function ei(n){return n._lexicalHandled===!0}function rl(n){const e=ir.get(n);if(e===void 0)return;const t=cn.get(e);if(t===void 0)return;const r=t-1;r>=0||N(164),ir.delete(n),cn.set(e,r),r===0&&e.removeEventListener("selectionchange",_s);const i=Tn(n);vr(i)?((function(o){if(o._parentEditor!==null){const l=Nr(o),a=l[l.length-1]._key;et.get(a)===o&&et.delete(a)}else et.delete(o._key)})(i),n.__lexicalEditor=null):i&&N(198);const s=gs(n);for(let o=0;o<s.length;o++)s[o]();n.__lexicalEventHandles=[]}function lr(n,e,t){q();const r=n.__key,i=n.getParent();if(i===null)return;const s=(function(l){const a=K();if(!A(a)||!S(l))return a;const{anchor:c,focus:u}=a,d=c.getNode(),f=u.getNode();return cr(d,l)&&c.set(l.__key,0,"element"),cr(f,l)&&u.set(l.__key,0,"element"),a})(n);let o=!1;if(A(s)&&e){const l=s.anchor,a=s.focus;l.key===r&&(hn(l,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0),a.key===r&&(hn(a,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0)}else vn(s)&&e&&n.isSelected()&&n.selectPrevious();if(A(s)&&e&&!o){const l=n.getIndexWithinParent();Ke(n),dn(s,i,l,-1)}else Ke(n);t||Ce(i)||i.canBeEmpty()||!i.isEmpty()||lr(i,e),e&&s&&X(i)&&i.isEmpty()&&i.selectEnd()}const ps=Symbol.for("ephemeral");function fn(n){return n[ps]||!1}class ue{__type;__key;__parent;__prev;__next;__state;static getType(){const{ownNodeType:e}=En(this);return e===void 0&&N(64,this.name),e}static clone(e){N(65,this.name)}$config(){return{}}config(e,t){const r=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:r,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),El(this,e)}getType(){return this.__type}isInline(){N(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=$(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){const t=e||K();if(t==null)return!1;const r=t.getNodes().some(i=>i.__key===this.__key);if(M(this))return r;if(A(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const i=this.getParent();if(z(this)&&this.isInline()&&i){const s=t.isBackward()?t.focus:t.anchor;if(i.is(s.getNode())&&s.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),r=0;for(;t!==null;){if(this.is(t))return r;r++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:$(e)}getParentOrThrow(){const e=this.getParent();return e===null&&N(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(Ce(t))return S(e)||e===this&&z(e)||N(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&N(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:$(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(t===null)return e;let r=t.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:$(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=S(this)?this:this.getParent(),r=S(e)?e:e.getParent(),i=t&&r?Qt(t,r):null;return i?i.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=Qt(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?Gs(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&N(279),!1)))}isParentOf(e){const t=Qt(this,e);return t!==null&&t.type==="ancestor"}getNodesBetween(e){const t=this.isBefore(e),r=[],i=new Set;let s=this;for(;s!==null;){const o=s.__key;
5if(i.has(o)||(i.add(o),r.push(s)),s===e)break;const l=S(s)?t?s.getFirstChild():s.getLastChild():null;if(l!==null){s=l;continue}const a=t?s.getNextSibling():s.getPreviousSibling();if(a!==null){s=a;continue}const c=s.getParentOrThrow();if(i.has(c.__key)||r.push(c),c===e)break;let u=null,d=c;do{if(d===null&&N(68),u=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||i.has(d.__key)||r.push(d)}while(u===null);s=u}return t||r.reverse(),r}isDirty(){const e=B()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(fn(this))return this;const e=$(this.__key);return e===null&&N(113),e}getWritable(){if(fn(this))return this;q();const e=Oe(),t=B(),r=e._nodeMap,i=this.__key,s=this.getLatest(),o=t._cloneNotNeeded,l=K();if(l!==null&&l.setCachedNodes(null),o.has(i))return _n(s),s;const a=Hs(s);return o.add(i),_n(a),r.set(i,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){N(70)}updateDOM(e,t,r){N(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){N(18,this.name)}updateFromJSON(e){return(function(t,r){const i=t.getWritable(),s=r.$;let o=s;for(const l of Vi(i).flatKeys)l in r&&(o!==void 0&&o!==s||(o={...s}),o[l]=r[l]);return(i.__state||o)&&Eo(t).updateFromJSON(o),i})(this,e)}static transform(){return null}remove(e){lr(this,!0,e)}replace(e,t){q();let r=K();r!==null&&(r=r.clone()),Un(this,e);const i=this.getLatest(),s=this.__key,o=e.__key,l=e.getWritable(),a=this.getParentOrThrow().getWritable(),c=a.__size;Ke(l);const u=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,_=i.__next,h=i.__parent;if(lr(i,!1,!0),u===null?a.__first=o:u.getWritable().__next=o,l.__prev=f,d===null?a.__last=o:d.getWritable().__prev=o,l.__next=_,l.__parent=h,a.__size=c,t&&(S(this)&&S(l)||N(139),this.getChildren().forEac
5h(p=>{l.append(p)})),A(r)){ee(r);const p=r.anchor,g=r.focus;p.key===s&&si(p,l),g.key===s&&si(g,l)}return Te()===s&&H(o),l}insertAfter(e,t=!0){q(),Un(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.getParent(),o=K();let l=!1,a=!1;if(s!==null){const _=e.getIndexWithinParent();if(Ke(i),A(o)){const h=s.__key,p=o.anchor,g=o.focus;l=p.type==="element"&&p.key===h&&p.offset===_+1,a=g.type==="element"&&g.key===h&&g.offset===_+1}}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(c===null?u.__last=d:c.getWritable().__prev=d,u.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,t&&A(o)){const _=this.getIndexWithinParent();dn(o,u,_+1);const h=u.__key;l&&o.anchor.set(h,_+2,"element"),a&&o.focus.set(h,_+2,"element")}return e}insertBefore(e,t=!0){q(),Un(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.__key;Ke(i);const o=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,c=this.getIndexWithinParent();o===null?l.__first=s:o.getWritable().__next=s,l.__size++,r.__prev=s,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent;const u=K();return t&&A(u)&&dn(u,this.getParentOrThrow(),c),e}isParentRequired(){return!1}createParentElementNode(){return be()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){q();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(S(r))return r.select();if(!M(r)){const s=r.getIndexWithinParent()+1;return i.select(s,s)}return r.select(e,t)}selectNext(e,t){q();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(S(r))return r.select(0,0);if(!M(r)){const s=r.getIndexWithinParent();return i.select(s,s)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}const Ca="historic",Sa="history-push",Ln="history-merge",va="paste",il="collaboration",sl="skip-scroll-into-view",ol="skip-dom-selection",ti="skip-selection-focus",ll="composition-start",al="composition-end";class Ot extends ue{static getType(){return"linebreak"}static clone(e){return new Ot(e.__key)}constructor(e){super(e)}getTextContent(){return`
6`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(t){const r=t.parentElement;if(r!==null&&Mi(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&zt(i)){const s=r.lastChild;if(s===t||s.previousSibling===t&&zt(s))return!0}}return!1})(e)||(function(t){const r=t.parentElement;if(r!==null&&Mi(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&zt(i))return!1;const s=r.lastChild;if(s===t||s.previousSibling===t&&zt(s))return!0}return!1})(e)?null:{conversion:cl,priority:0}}}static importJSON(e){return bt().updateFromJSON(e)}}function cl(n){return{node:bt()}}function bt(){return wn(new Ot)}function xt(n){return n instanceof Ot}function zt(n){return Se(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function Kn(n,e){return 16&e?"code":e&Wi?"mark":32&e?"sub":64&e?"sup":null}function Rn(n,e){return 1&e?"strong":2&e?"em":"span"}function ms(n,e,t,r,i){const s=r.classList;let o=tt(i,"base");o!==void 0&&s.add(...o),o=tt(i,"underlineStrikethrough");let l=!1;const a=8&e&&4&e;o!==void 0&&(8&t&&4&t?(l=!0,a||s.add(...o)):a&&s.remove(...o));for(const c in Be){const u=Be[c];if(o=tt(i,c),o!==void 0)if(t&u){if(l&&(c==="underline"||c==="str
6ikethrough")){e&u&&s.remove(...o);continue}((e&u)===0||a&&c==="underline"||c==="strikethrough")&&s.add(...o)}else e&u&&s.remove(...o)}}function ys(n,e,t){const r=e.firstChild,i=t.isComposing(),s=n+(i?vt:"");if(r==null)e.textContent=s;else{const o=r.nodeValue;if(o!==s)if(i||Ee){const[l,a,c]=(function(u,d){const f=u.length,_=d.length;let h=0,p=0;for(;h<f&&h<_&&u[h]===d[h];)h++;for(;p+h<f&&p+h<_&&u[f-p-1]===d[_-p-1];)p++;return[h,f-h-p,d.slice(h,_-p)]})(o,s);a!==0&&r.deleteData(l,a),r.insertData(l,c)}else r.nodeValue=s}}function ni(n,e,t,r,i,s){ys(i,n,e);const o=s.theme.text;o!==void 0&&ms(0,0,r,n,o)}function Wt(n,e){const t=document.createElement(e);return t.appendChild(n),t}class lt extends ue{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new lt(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return So[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Te()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=Be[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return gn(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){const r=this.__format,i=Kn(0,r),s=Rn(0,r),o=i===null?s:i,l=document.createElement(o);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),i!==null&&(a=document.createElement(s),l.appendChild(a)),ni(a,this,0,r,this.__text,e);const c=this.__style;return c!==""&&(l.style.cssText=c),l}updateDOM(e,t,r){const i=this.__text,s=e.__format,o=this.__format,l=Kn(0,s),a=Kn(0,o),c=Rn(0,s),u=Rn(0,o);if((l===null?c:l)!==(a===null?u:a))return!0;if(l===a&&c!==u){const p=t.firstChild;p==null&&N(48);const g=document.createElement(u);return ni(g,this,0,o,i,r),t.replaceChild(g,p),!1}let d=t;a!==null&&l!==null&&(d=t.firstChild,d==null&&N(49)),ys(i,d,this);const f=r.theme.text;f!==void 0&&s!==o&&ms(0,s,o,d,f);const _=e.__style,h=this.__style;return _!==h&&(t.style.cssText=h),!1}static importDOM(){return{"#text":()=>({conversion:hl,priority:0}),b:()=>({conversion:fl,priority:0}),code:()=>({conversion:pe,priority:0}),em:()=>({conversion:pe,priority:0}),i:()=>({conversion:pe,priority:0}),mark:()=>({conversion:pe,priority:0}),s:()=>({conversion:pe,priority:0}),span:()=>({conversion:ul,priority:0}),strong:()=>({conversion:pe,priority:0}),sub:()=>({conversion:pe,priority:0}),sup:()=>({conversion:pe,priority:0}),u:()=>({conversion:pe,priority:0})}}static importJSON(e){return V().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}
6exportDOM(e){let{element:t}=super.exportDOM(e);return ne(t)||N(132),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=Wt(t,"b")),this.hasFormat("italic")&&(t=Wt(t,"i")),this.hasFormat("strikethrough")&&(t=Wt(t,"s")),this.hasFormat("underline")&&(t=Wt(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format=typeof e=="string"?Be[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail=typeof e=="string"?yo[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=gn(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=Co[e];if(this.__mode===t)return this;const r=this.getWritable();return r.__mode=t,r}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){q();let r=e,i=t;const s=K(),o=this.getTextContent(),l=this.__key;if(typeof o=="string"){const a=o.length;r===void 0&&(r=a),i===void 0&&(i=a)}else r=0,i=0;if(!A(s))return vs(l,r,l,i,"text","text");{const a=Te();a!==s.anchor.key&&a!==s.focus.key||H(l),s.setTextNodeRange(this,r,this,i)}return s}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,i){const s=this.getWritable(),o=s.__text,l=r.length;let a=e;a<0&&(a=l+a,a<0&&(a=0));const c=K();if(i&&A(c)){const d=e+l;c.setTextNodeRange(s,d,s,d)}const u=o.slice(0,a)+r+o.slice(a+t);return s.__text=u,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){q();const t=this.getLatest(),r=t.getTextContent();if(r==="")return[];const i=t.__key,s=Te(),o=r.length;e.sort((k,C)=>k-C),e.push(o);const l=[],a=e.length;for(let k=0,C=0;k<o&&C<=a;C++){const O=e[C];O>k&&(l.push(r.slice(k,O)),k=O)}const c=l.length;if(c===1)return[t];const u=l[0],d=t.getParent();let f;const _=t.getFormat(),h=t.getStyle(),p=t.__detail;let g=!1,m=null,y=null;const x=K();if(A(x)){const[k,C]=x.isBackward()?[x.focus,x.anchor]:[x.anchor,x.focus];k.type==="text"&&k.key===i&&(m=k),C.type==="text"&&C.key===i&&(y=C)}t.isSegmented()?(f=V(u),f.__format=_,f.__style=h,f.__detail=p,f.__state=Wr(t,f),g=!0):f=t.setTextContent(u);const T=[f];for(let k=1;k<c;k++){const C=V(l[k]);C.__format=_,C.__style=h,C.__detail=p,C.__state=Wr(t,C);const O=C.__key;s===i&&H(O),T.push(C)}const b=m?m.offset:null,v=y?y.offset:null;let w=0;for(const k of T){if(!m&&!y)break;const C=w+k.getTextContentSize();if(m!==null&&b!==null&&b<=C&&b>=w&&(m.set(k.getKey(),b-w,"text"),b<C&&(m=null)),y!==null&&v!==null&&v<=C&&v>=w){y.set(k.getKey(),v-w,"text");break}w=C}if(d!==null){(function(O){const P=O.getPreviousSibling(),R=O.getNextSibling();P!==null&&_n(P),R!==null&&_n(R)})(this);const k=d.getWritable(),C=this.getIndexWithinParent();g?(k.splice(C,0,T),this.remove()):k.splice(C,1,T),A(x)&&dn(x,d,C,c-1)}return T}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||N(50);const r=this.__key,i=e.__key,s=this.__text,o=s.length;Te()===i&&H(r);const l=K();if(A(l)){const d=l.anchor,f=l.focus;d!==null&&d.key===i&&hi(d,t,r,e,o),f!==null&&f.key===i&&hi(f,t,r,e,o)}const a=e.__text,c=t?a+s:s+a;this.setTextContent(c);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function ul(n){return{forChild:pr(n.style),node:null}}function fl(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:pr(e.style,t?void 0:"bold"),node:null}}const ri=new WeakMap;function dl(n){if(!ne(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function hl(n){const e=n;n.parentElement===null&&N(129);let t=e.textContent||"";if((function(r){let i,s=r.parentNode;const o=[r];for(;s!==null&&(i=ri.get(s))===void 0&&!dl(s);)o.push(s),s=s.parentNode;const l=i===void 0?s:i;for(let a=0;a<o.length;a++)ri.set(o[a],l);return l})(e)!==null){const r=t.split(/(\r?\n|\t)/),i=[],s=r.length;for(let o=0;o<s;
6o++){const l=r[o];l===`
7`||l===`\r
8`?i.push(bt()):l==="	"?i.push(mr()):l!==""&&i.push(V(l))}return{node:i}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,i=!0;for(;r!==null&&(r=ii(r,!1))!==null;){const s=r.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(t=t.slice(1)),i=!1;break}}i&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=ii(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:V(t)}}function ii(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const s=t.parentElement;if(s===null)return null;t=s}if(t=r,ne(t)){const s=t.style.display;if(s===""&&!Ll(t)||s!==""&&!s.startsWith("inline"))return null}let i=t;for(;(i=e?t.firstChild:t.lastChild)!==null;)t=i;if(Se(t))return t;if(t.nodeName==="BR")return null}}const gl={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function pe(n){const e=gl[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:pr(n.style,e),node:null}}function V(n=""){return wn(new lt(n))}function M(n){return n instanceof lt}function pr(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),i=t==="700"||t==="bold",s=r.includes("line-through"),o=n.fontStyle==="italic",l=r.includes("underline"),a=n.verticalAlign;return c=>(M(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),s&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),o&&!c.hasFormat("italic")&&c.toggleFormat("italic"),l&&!c.hasFormat("underline")&&c.toggleFormat("underline"),a!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),a!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),e&&!c.hasFormat(e)&&c.toggleFormat(e)),c)}class At extends lt{static getType(){return"tab"}static clone(e){return new At(e.__key)}constructor(e){super("	",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),r=tt(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}static importJSON(e){return mr().updateFromJSON(e)}setTextContent(e){return e!=="	"&&e!==""&&Ri(126),super.setTextContent("	")}spliceText(e,t,r,i){return r===""&&t===0||r==="	"&&t===1||N(286),this}setDetail(e){return e!==2&&N(127),this}setMode(e){return e!=="normal"&&N(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function mr(){return wn(new At)}function xs(n){return n instanceof At}class _l{key;offset;type;_selection;constructor(e,t,r){this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:Xs(ce(Ve(this,"next")),ce(Ve(e,"next")))<0}getNode(){const e=$(this.key);return e===null&&N(20),e}set(e,t,r,i){const s=this._selection,o=this.key;i&&this.key===e&&this.offset===t&&this.type===r||(this.key=e,this.offset=t,this.type=r,Pt()||(Te()===o&&H(e),s!==null&&(s.setCachedNodes(null),s.dirty=!0)))}}function de(n,e,t){return new _l(n,e,t)}function Bn(n,e){let t=e.__key,r=n.offset,i="element";if(M(e)){i="text";const s=e.getTextContentSize();r>s&&(r=s)}else if(!S(e)){const s=e.getNextSibling();if(M(s))t=s.__key,r=0,i="text";else{const o=e.getParent();o&&(t=o.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,i)}function si(n,e){if(S(e)){const t=e.getLastDescendant();S(t)||M(t)?Bn(n,t):Bn(n,e)}else Bn(n,e)}class Sn{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!vn(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Sn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),r=t.length,i=t[r-1];let s;if(M(i))s=i.select();else{const o=i.getIndexWithinParent()+1;s=i.getParentOrThrow().select(o,o)}s.insertNodes(e);for(let o=0;o<r;o++)t[o].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=this._nodes,r=[];for(const i of t){const s=$(i);s!==null&&r.push(s)}return Pt()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let t="";for(let r=0;r<e.length;r++)t+=e[r].getTextContent();return t}deleteNodes(){const e=this.getNodes();if((K()||Dt())===this&&e[0]){const t=G(e[0],"next");ql(je(t,t))}for(const t of e)t.remove()}}function A(n){return n instanceof He}class He{format;style;anchor;focus;_cachedNodes;dirty;
8constructor(e,t,r,i){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!A(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=(function(r){const i=[],[s,o]=r.getTextSlices();s&&i.push(s.caret.origin);const l=new Set,a=new Set;for(const c of r)if(xe(c)){const{origin:u}=c;i.length===0?l.add(u):(a.add(u),i.push(u))}else{const{origin:u}=c;S(u)&&a.has(u)||i.push(u)}if(o&&i.push(o.caret.origin),st(r.focus)&&S(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let c=Me(r.focus.origin,"previous");xe(c)&&l.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(i[i.length-1]);c=Dr(c))l.delete(c.origin),i.pop();for(;i.length>1;){const c=i[i.length-1];if(!S(c)||a.has(c)||c.isEmpty()||l.has(c))break;i.pop()}if(i.length===0&&r.isCollapsed()){const c=ce(r.anchor),u=ce(r.anchor.getFlipped()),d=_=>Re(_)?_.origin:_.getNodeAtCaret(),f=d(c)||d(u)||(r.anchor.getNodeAtCaret()?c.origin:u.origin);i.push(f)}return i})(Qs(Fi(this),"next"));return Pt()||(this._cachedNodes=t),t}setTextNodeRange(e,t,r,i){this.anchor.set(e.__key,t,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],i=this.anchor,s=this.focus,o=i.isBefore(s),[l,a]=li(this);let c="",u=!0;for(let d=0;d<e.length;d++){const f=e[d];if(S(f)&&!f.isInline())u||(c+=`
9`),u=!f.isEmpty();else if(u=!1,M(f)){let _=f.getTextContent();f===t?f===r?i.type==="element"&&s.type==="element"&&s.offset!==i.offset||(_=l<a?_.slice(l,a):_.slice(a,l)):_=o?_.slice(l):_.slice(a):f===r&&(_=o?_.slice(0,a):_.slice(0,l)),c+=_}else!z(f)&&!xt(f)||f===r&&this.isCollapsed()||(c+=f.getTextContent())}return c}applyDOMRange(e){const t=B(),r=t.getEditorState()._selection,i=Ss(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(i===null)return;const[s,o]=i;this.anchor.set(s.key,s.offset,s.type,!0),this.focus.set(o.key,o.offset,o.type,!0),Yn(this)}clone(){const e=this.anchor,t=this.focus;return new He(de(e.key,e.offset,e.type),de(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=gn(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=Be[e];return(this.format&t)!==0}insertRawText(e){const t=e.split(/(\r?\n|\t)/),r=[],i=t.length;for(let s=0;s<i;s++){const o=t[s];o===`
10`||o===`\r
11`?r.push(bt()):o==="	"?r.push(mr()):r.push(V(o))}this.insertNodes(r)}insertText(e){const t=this.anchor,r=this.focus,i=this.format,s=this.style;let o=t,l=r;!this.isCollapsed()&&r.isBefore(t)&&(o=r,l=t),o.type==="element"&&(function(g,m,y,x){const T=g.getNode(),b=T.getChildAtIndex(g.offset),v=V();if(v.setFormat(y),v.setStyle(x),vl(b))b.splice(0,0,[v]);else{const w=X(T)?be().append(v):v;b===null?T.append(w):b.insertBefore(w)}g.is(m)&&m.set(v.__key,0,"text"),g.set(v.__key,0,"text")})(o,l,i,s),l.type==="element"&&Et(l,ce(Ve(l,"next")));const a=o.offset;let c=l.offset;const u=this.getNodes(),d=u.length;let f=u[0];M(f)||N(26);const _=f.getTextContent().length,h=f.getParentOrThrow();let p=u[d-1];if(d===1&&l.type==="element"&&(c=_,l.set(o.key,c,"text")),this.isCollapsed()&&a===_&&(ke(f)||!f.canInsertTextAfter()||!h.canInsertTextAfter()&&f.getNextSibling()===null)){let g=f.getNextSibling();if(M(g)&&g.canInsertTextBefore()&&!ke(g)||(g=V(),g.setFormat(i),g.setStyle(s),h.canInsertTextAfter()?f.insertAfter(g):h.insertAfter(g)),g.select(0,0),f=g,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&a===0&&(ke(f)||!f.canInsertTextBefore()||!h.canInsertTextBefore()&&f.getPreviousSibling()===null)){let g=f.getPreviousSibling();if(M(g)&&!ke(g)||(g=V(),g.setFormat(i),h.canInsertTextBefore()?f.insertBefore(g):h.insertBefore(g)),g.select(),f=g,e!=="")return void this.insertText(e)}else if(f.isSegmented()&&a!==_){const g=V(f.getTextContent());g.setFormat(i),f.replace(g),f=g}else if(!this.isCollapsed()&&e!==""){const g=p.getParent();if(!h.canInsertTextBefore()||!h.canInsertTextAfter()||S(g)&&(!g.canInsertTextBefore()||!g.canInsertTextAfter()))return this.insertText(""),Cs(this.anchor,this.focus),void this.insertText(e)}if(d===1){if(Le(f)){const x=V(e);return x.select(),void f.replace(x)}const g=f.getFormat(),m=f.getStyle();if(a!==c||g===i&&m===s){if(xs(f)){const x=V(e);return x.setFormat(i),x.setStyle(s),x.select(),void f.replace(x)}}else{if(f.getTextContent()!==""){const x=V(e);if(x.setFormat(i),x.setStyle(s),x.select(),a===0)f.insertBefore(x,!1);else{const[T]=f.splitText(a);T.insertAfter(x,!1)}return void(x.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}f.setFormat(i),f.setStyle(s)}const y=c-a;f=f.spliceText(a,y,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=g,this.style=m,f.isComposing()&&(this.anchor.offset-=e.length))}else{const g=new Set([...f.getParentKeys(),...p.getParentKeys()]),m=S(f)?f:f.getParentOrThrow();let y=S(p)?p:p.getParentOrThrow(),x=p;if(!m.is(y)&&y.isInline())do x=y,y=y.getParentOrThrow();while(y.isInline());if(l.type==="text"&&(c!==0||p.getTextContent()==="")||l.type==="element"&&p.getIndexWithinParent()<c)if(M(p)&&!Le(p)&&c!==p.getTextContentSize()){if(p.isSegmented()){const k=V(p.getTextContent());p.replace(k),p=k}X(l.getNode())||l.type!=="text"||(p=p.spliceText(0,c,"")),g.add(p.__key)}
11else{const k=p.getParentOrThrow();k.canBeEmpty()||k.getChildrenSize()!==1?p.remove():k.remove()}else g.add(p.__key);const T=y.getChildren(),b=new Set(u),v=m.is(y),w=m.isInline()&&f.getNextSibling()===null?m:f;for(let k=T.length-1;k>=0;k--){const C=T[k];if(C.is(f)||S(C)&&C.isParentOf(f))break;C.isAttached()&&(!b.has(C)||C.is(x)?v||w.insertAfter(C,!1):C.remove())}if(!v){let k=y,C=null;for(;k!==null;){const O=k.getChildren(),P=O.length;(P===0||O[P-1].is(C))&&(g.delete(k.__key),C=k),k=k.getParent()}}if(Le(f))if(a===_)f.select();else{const k=V(e);k.select(),f.replace(k)}else f=f.spliceText(a,_-a,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=f.getFormat(),this.style=f.getStyle(),f.isComposing()&&(this.anchor.offset-=e.length));for(let k=1;k<d;k++){const C=u[k],O=C.__key;g.has(O)||C.remove()}}}removeText(){const e=K()===this;Zt(this,Xl(Fi(this))),e&&K()!==this&&ee(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void H(null);const r=this.getNodes(),i=[];for(const T of r)M(T)&&i.push(T);const s=T=>{r.forEach(b=>{if(S(b)){const v=b.getFormatFlags(e,T);b.setTextFormat(v)}})},o=i.length;if(o===0)return this.toggleFormat(e),H(null),void s(t);const l=this.anchor,a=this.focus,c=this.isBackward(),u=c?a:l,d=c?l:a;let f=0,_=i[0],h=u.type==="element"?0:u.offset;if(u.type==="text"&&h===_.getTextContentSize()&&(f=1,_=i[1],h=0),_==null)return;const p=_.getFormatFlags(e,t);s(p);const g=o-1;let m=i[g];const y=d.type==="text"?d.offset:m.getTextContentSize();if(_.is(m)){if(h===y)return;if(ke(_)||h===0&&y===_.getTextContentSize())_.setFormat(p);else{const T=_.splitText(h,y),b=h===0?T[0]:T[1];b.setFormat(p),u.type==="text"&&u.set(b.__key,0,"text"),d.type==="text"&&d.set(b.__key,y-h,"text")}return void(this.format=p)}h===0||ke(_)||([,_]=_.splitText(h),h=0),_.setFormat(p);const x=m.getFormatFlags(e,p);y>0&&(y===m.getTextContentSize()||ke(m)||([m]=m.splitText(y)),m.setFormat(x));for(let T=f+1;T<g;T++){const b=i[T],v=b.getFormatFlags(e,x);b.setFormat(v)}u.type==="text"&&u.set(_.__key,h,"text"),d.type==="text"&&d.set(m.__key,y,"text"),this.format=p|x}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const h=K();return A(h)||N(134),h.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),r=Gt(t,Ne),i=e[e.length-1];if(S(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const h=zn(this);r.splice(h,0,e),i.selectEnd()}return}if(!e.some(h=>(S(h)||z(h))&&!h.isInline())){S(r)||N(211,t.constructor.name,t.getType());const h=zn(this);return r.splice(h,0,e),void i.selectEnd()}const s=(function(h){const p=be();let g=null;for(let m=0;m<h.length;m++){const y=h[m],x=xt(y);if(x||z(y)&&y.isInline()||S(y)&&y.isInline()||M(y)||y.isParentRequired()){if(g===null&&(g=y.createParentElementNode(),p.append(g),x))continue;g!==null&&g.append(y)}else p.append(y),g=null}return p})(e),o=s.getLastDescendant(),l=s.getChildren(),a=!S(r)||!r.isEmpty()?this.insertParagraph():null,c=l[l.length-1];let u=l[0];var d;S(d=u)&&Ne(d)&&!d.isEmpty()&&S(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(S(r)||N(211,t.constructor.name,t.getType()),r.append(...u.getChildren()),u=l[1]),u&&(r===null&&N(212,t.constructor.name,t.getType()),(function(h,p){const g=p.getParentOrThrow().getLastChild();let m=p;const y=[p];for(;m!==g;)m.getNextSibling()||N(140),m=m.getNextSibling(),y.push(m);let x=h;for(const T of y)x=x.insertAfter(T)})(r,u));const f=Gt(o,Ne);a&&S(f)&&(a.canMergeWhenEmpty()||Ne(c))&&(f.append(...a.getChildren()),a.remove()),S(r)&&r.isEmpty()&&r.remove(),o.selectEnd();const _=S(r)?r.getLastChild():null;xt(_)&&f!==r&&_.remove()}insertParagraph(){if(this.anchor.key==="root"){const o=be();return se().splice(this.anchor.offset,0,[o]),o.select(),o}const e=zn(this),t=Gt(this.anchor.getNode(),Ne);S(t)||N(213);const r=t.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],s=t.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(e){const t=bt();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),i=t.getIndexWithinParent();r.select(i,i)}}extract(){const e=[...this.getNodes()],t=e.length;let r=e[0],i=e[t-1];const[s,o]=li(this),l=this.isBackward(),[a,c]=l?[this.focus,this.anchor]:[this.anchor,this.focus],[u,d]=l?[o,s]:[s,o];if(t===0)return[];if(t===1){if(M(r)&&!this.isCollapsed()){const f=r.splitText(u,d),_=u===0?f[0]:f[1];return _?(a.set(_.getKey(),0,"text"),c.set(_.getKey(),_.getTextContentSize(),"text"),[_]):[]}return[r]}if(M(r)&&(u===r.getTextContentSize()?e.shift():u!==0&&([,r]=r.splitText(u),e[0]=r,a.set(r.getKey(),0,"text"))),M(i)){const f=i.getTextContent().length;d===0?e.pop():d!==f&&([i]=i.splitText(d),e[e.length-1]=i,c.set(i.getKey(),i.getTextContentSize(),"text"))}return e}modify(e,t,r){if(_i(this,e,t,r))return;const i=e==="move",s=B(),o=he(te(s));if(!o)return;const l=s._blockCursorElement,a=s._rootElement,c=this.focus.getNode();if(a===null||l===null||!S(c)||c.isInline()||c.canBeEmpty()||ur(l,s,a),this.dirty){let u=it(s,this.anchor.key),d=it(s,this.focus.key);this.anchor.type==="text"&&(u=rt(u)),this.focus.type==="text"&&(d=rt(d)),u&&d&&Ts(o,u,this.anchor.offset,d,this.focus.offset)}if((function(u,d,f,_){u.modify(d,f,_)})(o,e,t?"backward":"forward",r),o.rangeCount>0){const u=o.getRangeAt(0),d=this.anchor.getNode(),f=X(d)?d:Dl(d);if(this.applyDOMRange(u),this.dirty=!0,!i){const _=this.getNodes(),h=[];let p=!1;for(let g=0;g<_.length;g++){const m=_[g];cr(m,f)?h.push(m):p=!0}if(p&&h.length>0)if(t){const g=h[0];S(g)?g.selectStart():g.getParentOrThrow().selectStart()}else{const g=h[h.length-1];S(g)?g.selectEnd():g.getParentOrThrow().selectEnd()}
11o.anchorNode===u.startContainer&&o.anchorOffset===u.startOffset||(function(g){const m=g.focus,y=g.anchor,x=y.key,T=y.offset,b=y.type;y.set(m.key,m.offset,m.type,!0),m.set(x,T,b,!0)})(this)}}r==="lineboundary"&&_i(this,e,t,r,"decorators")}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&S(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const i=t.getParent(),s=t.getNextSibling()||(i===null?null:i.getNextSibling());if(S(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const s=Ys(Ve(r,e?"previous":"next"));if(s.getTextSlices().every(l=>l===null||l.distance===0)){let l={type:"initial"};for(const a of s.iterNodeCarets("shadowRoot"))if(xe(a)){if(!a.origin.isInline()){if(a.origin.isShadowRoot()){if(l.type==="merge-block")break;if(S(s.anchor.origin)&&s.anchor.origin.isEmpty()){const c=ce(a);Zt(this,je(c,c)),s.anchor.origin.remove()}return}l.type!=="merge-next-block"&&l.type!=="merge-block"||(l={block:l.block,caret:a,type:"merge-block"})}}else{if(l.type==="merge-block")break;if(st(a)){if(S(a.origin)){if(a.origin.isInline()){if(!a.origin.isParentOf(s.anchor.origin))break}else l={block:a.origin,type:"merge-next-block"};continue}if(z(a.origin)){if(!a.origin.isIsolated())if(l.type==="merge-next-block"&&(a.origin.isKeyboardSelectable()||!a.origin.isInline())&&S(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();const c=Ns();c.add(a.origin.getKey()),ee(c)}else a.origin.remove();return}break}}if(l.type==="merge-block"){const{caret:a,block:c}=l;return Zt(this,je(!a.origin.isEmpty()&&c.isEmpty()?Fr(G(c,a.direction)):s.anchor,a)),this.removeText()}}const o=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&ai(this,r.getNode()))return}else{const l=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){const a=o.offset,c=l.getTextContentSize();if(l.is(i)||e&&a!==c||!e&&a!==0)return void ci(l,e,a)}else if(i!==null&&i.isSegmented()){const a=r.offset,c=i.getTextContentSize();if(i.is(l)||e&&a!==0||!e&&a!==c)return void ci(i,e,a)}(function(a,c){const u=a.anchor,d=a.focus,f=u.getNode(),_=d.getNode();if(f===_&&u.type==="text"&&d.type==="text"){const h=u.offset,p=d.offset,g=h<p,m=g?h:p,y=g?p:h,x=y-1;m!==x&&(function(T){return!(Us(T)||pl(T))})(f.getTextContent().slice(m,y))&&(c?d.set(d.key,x,d.type):u.set(u.key,x,u.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&X(r.getParent())&&r.getPreviousSibling()===null&&ai(this,r)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,r=t.getNode();if(this.forwardDeletion(t,r,e))return;this.modify("extend",e,"word")}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function vn(n){return n instanceof Sn}function oi(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function li(n){const e=n.getStartEndPoints();if(e===null)return[0,0];const[t,r]=e;return t.type==="element"&&r.type==="element"&&t.key===r.key&&t.offset===r.offset?[0,0]:[oi(t),oi(r)]}function ai(n,e){for(let t=e;t;t=t.getParent()){if(S(t)){if(t.collapseAtStart(n))return!0;if(Ce(t))break}if(t.getPreviousSibling())break}return!1}const pl=(()=>{try{const n=new RegExp("\\p{Emoji}","u"),e=n.test.bind(n);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function ci(n,e,t){const r=n,i=r.getTextContent().split(/(?=\s)/g),s=i.length;let o=0,l=0;for(let c=0;c<s;c++){const u=c===s-1;if(l=o,o+=i[c].length,e&&o===t||o>t||u){i.splice(c,1),u&&(l=void 0);break}}const a=i.join("").trim();a===""?r.remove():(r.setTextContent(a),r.select(l,l))}function ui(n,e,t,r){let i,s=e;if(ne(n)){let o=!1;const l=n.childNodes,a=l.length,c=r._blockCursorElement;s===a&&(o=!0,s=a-1);let u=l[s],d=!1;if(u===c)u=l[s+1],d=!0;else if(c!==null){const f=c.parentNode;n===f&&e>Array.prototype.indexOf.call(f.children,c)&&s--}if(i=Ze(u),M(i))s=we(i,o?"next":"previous");else{let f=Ze(n);if(f===null)return null;if(S(f)){const _=r.getElementByKey(f.getKey());_===null&&N(214),[f,s]=f.getDOMSlot(_).resolveChildIndex(f,_,n,e),S(f)||N(215),o&&s>=f.getChildrenSize()&&(s=Math.max(0,f.getChildrenSize()-1));let p=f.getChildAtIndex(s);if(S(p)&&(function(g,m,y){const x=g.getParent();return y===null||x===null||!x.canBeEmpty()||x!==y.getNode()})(p,0,t)){const g=o?p.getLastDescendant():p.getFirstDescendant();g===null?f=p:(p=g,f=S(p)?p:p.getParentOrThrow()),s=0}M(p)?(i=p,f=null,s=we(p,o?"next":"previous")):p!==f&&o&&!d&&(S(f)||N(216),s=Math.min(f.getChildrenSize(),s+1))}else{const _=f.getIndexWithinParent();s=e===0&&z(f)&&Ze(n)===f?_:_+1,f=f.getParentOrThrow()}if(S(f))return de(f.__key,s,"element")}}else i=Ze(n);return M(i)?de(i.__key,we(i,s,"clamp"),"text"):null}function fi(n,e,t){const r=n.offset,i=n.getNode();if(r===0){const s=i.getPreviousSibling(),o=i.getParent();if(e){if((t||!e)&&s===null&&S(o)&&o.isInline()){const l=o.getPreviousSibling();M(l)&&n.set(l.__key,l.getTextContent().length,"text")}}else S(s)&&!t&&s.isInline()?n.set(s.__key,s.getChildrenSize(),"element"):M(s)&&n.set(s.__key,s.getTextContent().length,"text")}else if(r===i.getTextContent().length){const s=i.getNextSibling(),o=i.getParent();if(e&&S(s)&&s.isInline())n.set(s.__key,0,"element");else if((t||e)&&s===null&&S(o)&&o.isInline()&&!o.canInsertTextAfter()){const l=o.getNextSibling();M(l)&&n.set(l.__key,0,"text")}}}function Cs(n,e,t){if(n.type==="text"&&e.type==="text"){const r=n.isBefore(e),i=n.is(e);fi(n,r,i),fi(e,!r,i),i&&e.set(n.key,n.offset,n.type)}}function Ss(n,e,t,r,i,s){if(n===null||t===null||!Nn(i,n,t))return null;const o=ui(n,e,A(s)?s.anchor:null,i);if(o===null)return null;const l=ui(t,r,A(s)?s.focus:null,i);if(l===null)return null;if(o.type==="element"&&l.type==="element"){const a=Ze(n),c=Ze(t);if(z(a)&&z(c))return null}return Cs(o,l),[o,l]}function vs(n,e,t,r,i,s){const o=Oe(),l=new He(de(n,e,i),de(t,r,s),0,"");return l.dirty=!0,o._selection=l,l}function ks(){const n=de("root",0,"element"),e=de("root",0,"element");return new He(n,e,0,"")}function Ns(){return new Sn(new Set)}function yr(n,e,t,r){const i=t._window;if(i===null)return null;const s=r||i.event,o=s?s.type:void 0,l=o==="selectionchange",a=!Hn&&(l||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&s&&s.detail===3||o==="drop"||o===void 0);let c,u,d,f;if(A(n)&&!a)return n.clone();if(e===null)return null;
11if(c=e.anchorNode,u=e.focusNode,d=e.anchorOffset,f=e.focusOffset,(l||o===void 0)&&A(n)&&!Nn(t,c,u))return n.clone();const _=Ss(c,d,u,f,t,n);if(_===null)return null;const[h,p]=_;let g=0,m="";if(A(n)){const y=n.anchor;if(h.key===y.key)g=n.format,m=n.style;else{const x=h.getNode();M(x)?(g=x.getFormat(),m=x.getStyle()):S(x)&&(g=x.getTextFormat(),m=x.getTextStyle())}}return new He(h,p,g,m)}function K(){return Oe()._selection}function Dt(){return B()._editorState._selection}function dn(n,e,t,r=1){const i=n.anchor,s=n.focus,o=i.getNode(),l=s.getNode();if(!e.is(o)&&!e.is(l))return;const a=e.__key;if(n.isCollapsed()){const c=i.offset;if(t<=c&&r>0||t<c&&r<0){const u=Math.max(0,c+r);i.set(a,u,"element"),s.set(a,u,"element"),di(n)}}else{const c=n.isBackward(),u=c?s:i,d=u.getNode(),f=c?i:s,_=f.getNode();if(e.is(d)){const h=u.offset;(t<=h&&r>0||t<h&&r<0)&&u.set(a,Math.max(0,h+r),"element")}if(e.is(_)){const h=f.offset;(t<=h&&r>0||t<h&&r<0)&&f.set(a,Math.max(0,h+r),"element")}}di(n)}function di(n){const e=n.anchor,t=e.offset,r=n.focus,i=r.offset,s=e.getNode(),o=r.getNode();if(n.isCollapsed()){if(!S(s))return;const l=s.getChildrenSize(),a=t>=l,c=a?s.getChildAtIndex(l-1):s.getChildAtIndex(t);if(M(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text"),r.set(c.__key,u,"text")}return}if(S(s)){const l=s.getChildrenSize(),a=t>=l,c=a?s.getChildAtIndex(l-1):s.getChildAtIndex(t);if(M(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text")}}if(S(o)){const l=o.getChildrenSize(),a=i>=l,c=a?o.getChildAtIndex(l-1):o.getChildAtIndex(i);if(M(c)){let u=0;a&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}function hn(n,e,t,r,i){let s=null,o=0,l=null;r!==null?(s=r.__key,M(r)?(o=r.getTextContentSize(),l="text"):S(r)&&(o=r.getChildrenSize(),l="element")):i!==null&&(s=i.__key,M(i)?l="text":S(i)&&(l="element")),s!==null&&l!==null?n.set(s,o,l):(o=e.getIndexWithinParent(),o===-1&&(o=t.getChildrenSize()),n.set(t.__key,o,"element"))}function hi(n,e,t,r,i){n.type==="text"?n.set(t,n.offset+(e?0:i),"text"):n.offset>r.getIndexWithinParent()&&n.set(n.key,n.offset-1,"element")}function Ts(n,e,t,r,i){try{n.setBaseAndExtent(e,t,r,i)}catch{}}function gi(n,e,t){const r=it(n,e.getKey());if(S(e)){const i=e.getDOMSlot(r);return[i.element,t+i.getFirstChildOffset()]}return[r,t]}function ml(n,e,t,r,i,s,o){const l=r.anchorNode,a=r.focusNode,c=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(i.has(il)&&d!==s||d!==null&&Ks(d))return;if(!A(e))return void(n!==null&&Nn(t,l,a)&&r.removeAllRanges());const f=e.anchor,_=e.focus,h=f.getNode(),p=_.getNode(),[g,m]=gi(t,h,f.offset),[y,x]=gi(t,p,_.offset),T=e.format,b=e.style,v=e.isCollapsed();let w=g,k=y,C=!1;var O,P,R,I,F;if(f.type==="text"?(w=rt(g),C=h.getFormat()!==T||h.getStyle()!==b):A(n)&&n.anchor.type==="text"&&(C=!0),_.type==="text"&&(k=rt(y)),w!==null&&k!==null&&(v&&(n===null||C||A(n)&&(n.format!==T||n.style!==b))&&(O=T,P=b,R=m,I=f.key,F=performance.now(),us=[O,P,R,I,F]),c!==m||u!==x||l!==w||a!==k||r.type==="Range"&&v||(d!==null&&s.contains(d)||i.has(ti)||s.focus({preventScroll:!0}),f.type==="element"))){if(Ts(r,w,m,k,x),!Ee||!e.isCollapsed()||s===null||i.has(ti)||document.activeElement!==null&&s.contains(document.activeElement)||s.focus({preventScroll:!0}),!i.has(sl)&&e.isCollapsed()&&s!==null&&s===document.activeElement){const W=A(e)&&e.anchor.type==="element"?w.childNodes[m]||null:r.rangeCount>0?r.getRangeAt(0):null;if(W!==null){let Q;if(W instanceof Text){const le=document.createRange();le.selectNode(W),Q=le.getBoundingClientRect()}else Q=W.getBoundingClientRect();(function(le,Ye,ge){const qe=Vs(ge),On=Mr(qe);if(qe===null||On===null)return;let{top:An,bottom:Dn}=Ye,ct=0,ut=0,ve=ge;for(;ve!==null;){const Pn=ve===qe.body;if(Pn){ct=0,ut=te(le).innerHeight;const Ae=On.getComputedStyle(qe.documentElement),dt=parseFloat(Ae.scrollPaddingTop),Lr=parseFloat(Ae.scrollPaddingBottom);isFinite(dt)&&(ct+=dt),isFinite(Lr)&&(ut-=Lr)}else{const Ae=ve.getBoundingClientRect();ct=Ae.top,ut=Ae.bottom}let ft=0;if(An<ct?ft=-(ct-An):Dn>ut&&(ft=Dn-ut),ft!==0)if(Pn)On.scrollBy(0,ft);else{const Ae=ve.scrollTop;ve.scrollTop+=ft;const dt=ve.scrollTop-Ae;An-=dt,Dn-=dt}if(Pn)break;ve=Rt(ve)}})(t,Q,s)}}sr=!0}}function zn(n){let e=n;n.isCollapsed()||e.removeText();const t=K();A(t)&&(e=t),A(e)||N(161);const r=e.anchor;let i=r.getNode(),s=r.offset;for(;!Ne(i);){const o=i;if([i,s]=yl(i,s),o.is(i))break}return s}function yl(n,e){const t=n.getParent();if(!t){const i=be();return se().append(i),i.select(),[se(),0]}if(M(n)){const i=n.splitText(e);if(i.length===0)return[t,n.getIndexWithinParent()];const s=e===0?0:1;return[t,i[0].getIndexWithinParent()+s]}if(!S(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const i=new He(de(n.__key,e,"element"),de(n.__key,e,"element"),0,""),s=n.insertNewAfter(i);s&&s.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}function _i(n,e,t,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!n.isCollapsed()){const[u,d]=t===n.isBackward()?[n.focus,n.anchor]:[n.anchor,
11n.focus];return d.set(u.key,u.offset,u.type),!0}const s=Ve(n.focus,t?"previous":"next"),o=r==="lineboundary",l=e==="move";let a=s,c=i==="decorators-and-blocks";if(!Gl(a)){for(const u of a){c=!1;const{origin:d}=u;if(!z(d)||d.isIsolated()||(a=u,!o||!d.isInline()))break}if(c)for(const u of Ys(s).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(xe(u))u.origin.isInline()||(a=u);else{if(S(u.origin))continue;z(u.origin)&&!u.origin.isInline()&&(a=u)}break}}if(a===s)return!1;if(l&&!o&&z(a.origin)&&a.origin.isKeyboardSelectable()){const u=Ns();return u.add(a.origin.getKey()),ee(u),!0}return a=ce(a),l&&Et(n.anchor,a),Et(n.focus,a),c||!o}let J=null,j=null,Z=!1,Wn=!1,Xt=0;const pi={characterData:!0,childList:!0,subtree:!0};function Pt(){return Z||J!==null&&J._readOnly}function q(){Z&&N(13)}function bs(){Xt>99&&N(14)}function Oe(){return J===null&&N(195,ws()),J}function B(){return j===null&&N(196,ws()),j}function ws(){let n=0;const e=new Set,t=nt.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const s=Tn(i);if(vr(s))n++;else if(s){let o=String(s.constructor.version||"<0.17.1");o===t&&(o+=" (separately built, likely a bundler configuration issue)"),e.add(o)}}let r=` Detected on the page: ${n} compatible editor(s) with version ${t}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function xl(){return j}function mi(n,e,t){const r=e.__type,i=Fs(n,r);let s=t.get(r);s===void 0&&(s=Array.from(i.transforms),t.set(r,s));const o=s.length;for(let l=0;l<o&&(s[l](e),e.isAttached());l++);}function yi(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function Es(n,e){if(!e)return;const t=n._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)t.add(i)}function Ms(n,e){const t=n.type,r=e.get(t);r===void 0&&N(17,t);const i=r.klass;n.type!==i.getType()&&N(18,i.name);const s=i.importJSON(n),o=n.children;if(S(s)&&Array.isArray(o))for(let l=0;l<o.length;l++){const a=Ms(o[l],e);s.append(a)}return s}function xi(n,e,t){const r=J,i=Z,s=j;J=e,Z=!0,j=n;try{return t()}finally{J=r,Z=i,j=s}}function ye(n,e){const t=n._pendingEditorState,r=n._rootElement,i=n._headless||r===null;if(t===null)return;const s=n._editorState,o=s._selection,l=t._selection,a=n._dirtyType!==0,c=J,u=Z,d=j,f=n._updating,_=n._observer;let h=null;if(n._pendingEditorState=null,n._editorState=t,!i&&a&&_!==null){j=n,J=t,Z=!1,n._updating=!0;try{const v=n._dirtyType,w=n._dirtyElements,k=n._dirtyLeaves;_.disconnect(),h=Do(s,t,n,v,w,k)}catch(v){if(v instanceof Error&&n._onError(v),Wn)throw v;return Ps(n,null,r,t),ji(n),n._dirtyType=2,Wn=!0,ye(n,s),void(Wn=!1)}finally{_.observe(r,pi),n._updating=f,J=c,Z=u,j=d}}t._readOnly||(t._readOnly=!0);const p=n._dirtyLeaves,g=n._dirtyElements,m=n._normalizedNodes,y=n._updateTags,x=n._deferred;a&&(n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set,n._updateTags=new Set),(function(v,w){const k=v._decorators;let C=v._pendingDecorators||k;const O=w._nodeMap;let P;for(P in C)O.has(P)||(C===k&&(C=zs(v)),delete C[P])})(n,t);const T=i?null:he(te(n));if(n._editable&&T!==null&&(a||l===null||l.dirty||!l.is(o))&&r!==null&&!y.has(ol)){j=n,J=t;try{if(_!==null&&_.disconnect(),a||l===null||l.dirty){const v=n._blockCursorElement;v!==null&&ur(v,n,r),ml(o,l,n,T,y,r)}(function(v,w,k){let C=v._blockCursorElement;if(A(k)&&k.isCollapsed()&&k.anchor.type==="element"&&w.contains(document.activeElement)){const O=k.anchor,P=O.getNode(),R=O.offset;let I=!1,F=null;if(R===P.getChildrenSize())$n(P.getChildAtIndex(R-1))&&(I=!0);else{const W=P.getChildAtIndex(R);if(W!==null&&$n(W)){const Q=W.getPreviousSibling();(Q===null||$n(Q))&&(I=!0,F=v.getElementByKey(W.__key))}}if(I){const W=v.getElementByKey(P.__key);return C===null&&(v._blockCursorElement=C=(function(Q){const le=Q.theme,Ye=document.createElement("div");Ye.contentEditable="false",Ye.setAttribute("data-lexical-cursor","true");let ge=le.blockCursor;if(ge!==void 0){if(typeof ge=="string"){const qe=Zs(ge);ge=le.blockCursor=qe}ge!==void 0&&Ye.classList.add(...ge)}return Ye})(v._config)),w.style.caretColor="transparent",void(F===null?W.appendChild(C):W.insertBefore(C,F))}}C!==null&&ur(C,v,w)})(n,r,l)}finally{_!==null&&_.observe(r,pi),j=d,J=c}}h!==null&&(function(v,w,k,C,O){const P=Array.from(v._listeners.mutation),R=P.length;for(let I=0;I<R;I++){const[F,W]=P[I];for(const Q of W){const le=w.get(Q);le!==void 0&&F(le,{dirtyLeaves:C,prevEditorState:O,updateTags:k})}}})(n,h,y,p,s),A(l)||l===null||o!==null&&o.is(l)||n.dispatchCommand(Gi,void 0);const b=n._pendingDecorators;b!==null&&(n._decorators=b,n._pendingDecorators=null,Ct("decorator",n,!0,b)),(function(v,w,k){const C=ki(w),O=ki(k);C!==O&&Ct("textcontent",v,!0,O)})(n,e||s,t),Ct("update",n,!0,{dirtyElements:g,dirtyLeaves:p,editorState:t,mutatedNodes:h,normalizedNodes:m,prevEditorState:e||s,tags:y}),(function(v,w){if(v._deferred=[],w.length!==0){const k=v._updating;v._updating=!0;try{for(let C=0;C<w.length;C++)w[C]()}finally{v._updating=k}}})(n,x),(function(v){const w=v._updates;if(w.length!==0){const k=w.shift();if(k){const[C,O]=k;kn(v,C,O)}}})(n)}function Ct(n,e,t,...r){const i=e._updating;e._updating=t;try{const s=e._listeners[n],o=Array.from(s);for(const[l,a]of o){a&&a();const c=l(...r);s.has(l)?s.set(l,c):c&&c()}}finally{e._updating=i}}function Os(n,e,t,r){const i=Nr(n);let s;for(let o=4;o>=0;o--)for(let l=0;l<i.length;l++){const a=i[l];if(l>0&&a._updating){s=a;break}const c=a._commands.get(e);if(c!==void 0){const u=c[o];if(u!==void 0){const d=Array.from(u),f=d.length;let _=!1;if(fe(a,()=>{for(let h=0;h<f;h++)if(d[h](t,r))return void(_=!0)}),_)return _}}}return s&&s.update(()=>{Os(s,e,t,r)}),!1}function Ci(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const i=t.shift();if(i){const[s,o]=i,l=n._pendingEditorState;let a;
11o!==void 0&&(a=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(l===null&&N(191),l._flushSync=!0),a&&n._deferred.push(a),Es(n,o.tag)),l==null?kn(n,s,o):s()}}return r}function kn(n,e,t){const r=n._updateTags;let i,s=!1,o=!1;t!==void 0&&(i=t.onUpdate,Es(n,t.tag),s=t.skipTransforms||!1,o=t.discrete||!1),i&&n._deferred.push(i);const l=n._editorState;let a=n._pendingEditorState,c=!1;(a===null||a._readOnly)&&(a=n._pendingEditorState=As(a||l),c=!0),a._flushSync=o;const u=J,d=Z,f=j,_=n._updating;J=a,Z=!1,n._updating=!0,j=n;const h=n._headless||n.getRootElement()===null;Sr(null);try{c&&(h?l._selection!==null&&(a._selection=l._selection.clone()):a._selection=(function(y,x){const T=y.getEditorState()._selection,b=he(te(y));return A(T)||T==null?yr(T,b,y,x):T.clone()})(n,t&&t.event||null));const g=n._compositionKey;e(),s=Ci(n,s),(function(y,x){const T=x.getEditorState()._selection,b=y._selection;if(A(b)){const v=b.anchor,w=b.focus;let k;if(v.type==="text"&&(k=v.getNode(),k.selectionTransform(T,b)),w.type==="text"){const C=w.getNode();k!==C&&C.selectionTransform(T,b)}}})(a,n),n._dirtyType!==0&&(s?(function(y,x){const T=x._dirtyLeaves,b=y._nodeMap;for(const v of T){const w=b.get(v);M(w)&&w.isAttached()&&w.isSimpleText()&&!w.isUnmergeable()&&Jr(w)}})(a,n):(function(y,x){const T=x._dirtyLeaves,b=x._dirtyElements,v=y._nodeMap,w=Te(),k=new Map;let C=T,O=C.size,P=b,R=P.size;for(;O>0||R>0;){if(O>0){x._dirtyLeaves=new Set;for(const I of C){const F=v.get(I);M(F)&&F.isAttached()&&F.isSimpleText()&&!F.isUnmergeable()&&Jr(F),F!==void 0&&yi(F,w)&&mi(x,F,k),T.add(I)}if(C=x._dirtyLeaves,O=C.size,O>0){Xt++;continue}}x._dirtyLeaves=new Set,x._dirtyElements=new Map,P.delete("root")&&P.set("root",!0);for(const I of P){const F=I[0],W=I[1];if(b.set(F,W),!W)continue;const Q=v.get(F);Q!==void 0&&yi(Q,w)&&mi(x,Q,k)}C=x._dirtyLeaves,O=C.size,P=x._dirtyElements,R=P.size,Xt++}x._dirtyLeaves=T,x._dirtyElements=b})(a,n),Ci(n),(function(y,x,T,b){const v=y._nodeMap,w=x._nodeMap,k=[];for(const[C]of b){const O=w.get(C);O!==void 0&&(O.isAttached()||(S(O)&&Ui(O,C,v,w,k,b),v.has(C)||b.delete(C),k.push(C)))}for(const C of k)w.delete(C);for(const C of T){const O=w.get(C);O===void 0||O.isAttached()||(v.has(C)||T.delete(C),w.delete(C))}})(l,a,n._dirtyLeaves,n._dirtyElements)),g!==n._compositionKey&&(a._flushSync=!0);const m=a._selection;if(A(m)){const y=a._nodeMap,x=m.anchor.key,T=m.focus.key;y.get(x)!==void 0&&y.get(T)!==void 0||N(19)}else vn(m)&&m._nodes.size===0&&(a._selection=null)}catch(g){return g instanceof Error&&n._onError(g),n._pendingEditorState=l,n._dirtyType=2,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void ye(n)}finally{J=u,Z=d,j=f,n._updating=_,Xt=0}n._dirtyType!==0||n._deferred.length>0||(function(g,m){const y=m.getEditorState()._selection,x=g._selection;if(x!==null){if(x.dirty||!x.is(y))return!0}else if(y!==null)return!0;return!1})(a,n)?a._flushSync?(a._flushSync=!1,ye(n)):c&&bl(()=>{ye(n)}):(a._flushSync=!1,c&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function fe(n,e,t){j===n&&t===void 0?e():kn(n,e,t)}class St{element;before;after;constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new St(this.element,e,this.after)}withAfter(e){return new St(this.element,this.before,e)}withElement(e){return this.element===e?this:new St(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return t!==null&&t.parentElement!==this.element&&N(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&N(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&N(224),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(yn||Mt||mn);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&t.removeChild(r),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===(t.nodeName==="IMG"))return;this.removeManagedLineBreak()}
11const r=this.element,i=this.before,s=document.createElement("br");if(r.insertBefore(s,i),e){const o=document.createElement("img");o.setAttribute("data-lexical-linebreak","true"),o.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",o.alt="",r.insertBefore(o,s),r.__lexicalLineBreak=o}else r.__lexicalLineBreak=s}getFirstChildOffset(){let e=0;for(let t=this.after;t!==null;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,r,i){if(r===this.element){const a=this.getFirstChildOffset();return[e,Math.min(a+e.getChildrenSize(),Math.max(a,i))]}const s=Si(t,r);s.push(i);const o=Si(t,this.element);let l=e.getIndexWithinParent();for(let a=0;a<o.length;a++){const c=s[a],u=o[a];if(c===void 0||c<u)break;if(c>u){l+=1;break}}return[e.getParentOrThrow(),l]}}function Si(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let i=0;for(let s=r.previousSibling;s!==null;s=s.previousSibling)i++;t.push(i)}return r!==n&&N(225),t.reverse()}class Ft extends ue{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return xo[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=B()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;t!==null;){if(M(t)&&e.push(t),S(t)){const r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;S(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;S(e);){const t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),r=t.length;if(e>=r){const s=t[r-1];return S(s)&&s.getLastDescendant()||s||null}const i=t[e];return S(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:$(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&N(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:$(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&N(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let r,i;if(e<t/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=t-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const s=t[i];e+=s.getTextContent(),S(s)&&i!==r-1&&!s.isInline()&&(e+=xn)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const s=t[i];e+=s.getTextContentSize(),S(s)&&i!==r-1&&!s.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const t=Vn[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){const t=Be[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return gn(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){q();const r=K();let i=e,s=t;const o=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const a=this.getFirstChild();
11if(M(a)||S(a))return a.select(0,0)}else if(!(e!==void 0&&e!==o||t!==void 0&&t!==o)){const a=this.getLastChild();if(M(a)||S(a))return a.select()}}i===void 0&&(i=o),s===void 0&&(s=o);const l=this.__key;return A(r)?(r.anchor.set(l,i,"element"),r.focus.set(l,s,"element"),r.dirty=!0,r):vs(l,i,l,s,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(t=>t.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==""?Vn[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){fn(this)&&N(324,this.__key,this.__type);const i=this.getChildrenSize(),s=this.getWritable();e+t<=i||N(226,String(e),String(t),String(i));const o=s.__key,l=[],a=[],c=this.getChildAtIndex(e+t);let u=null,d=i-t+r.length;if(e!==0)if(e===i)u=this.getLastChild();else{const _=this.getChildAtIndex(e);_!==null&&(u=_.getPreviousSibling())}if(t>0){let _=u===null?this.getFirstChild():u.getNextSibling();for(let h=0;h<t;h++){_===null&&N(100);const p=_.getNextSibling(),g=_.__key;Ke(_.getWritable()),a.push(g),_=p}}let f=u;for(const _ of r){f!==null&&_.is(f)&&(u=f=f.getPreviousSibling());const h=_.getWritable();h.__parent===o&&d--,Ke(h);const p=_.__key;if(f===null)s.__first=p,h.__prev=null;else{const g=f.getWritable();g.__next=p,h.__prev=g.__key}_.__key===o&&N(76),h.__parent=o,l.push(p),f=_}if(e+t===i)f!==null&&(f.getWritable().__next=null,s.__last=f.__key);else if(c!==null){const _=c.getWritable();if(f!==null){const h=f.getWritable();_.__prev=f.__key,h.__next=c.__key}else _.__prev=null}if(s.__size=d,a.length){const _=K();if(A(_)){const h=new Set(a),p=new Set(l),{anchor:g,focus:m}=_;vi(g,h,p)&&hn(g,g.getNode(),this,u,c),vi(m,h,p)&&hn(m,m.getNode(),this,u,c),d!==0||this.canBeEmpty()||Ce(this)||this.remove()}}return s}getDOMSlot(e){return new St(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(ne(t)){const r=this.getIndent();r>0&&(t.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(t.dir=i)}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),r=this.getTextStyle();return t===0&&r===""||Ce(this)||this.getChildren().some(M)||(t!==0&&(e.textFormat=t),r!==""&&(e.textStyle=r)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const r=this.getDOMSlot(e);let i=r.getFirstChild();for(let s=this.getFirstChild();s;s=s.getNextSibling()){const o=t.getElementByKey(s.getKey());o!==null&&(i==null?(r.insertChild(o),i=o):i!==o&&r.replaceChild(o,i),i=i.nextSibling)}}}function S(n){return n instanceof Ft}function vi(n,e,t){let r=n.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!t.has(i))return!0;r=r.getParent()}return!1}class xr extends ue{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function z(n){return n instanceof xr}class It extends Ft{__cachedText;static getType(){return"root"}static clone(){return new It}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){N(51)}getTextContent(){const e=this.__cachedText;return!Pt()&&B()._dirtyType!==0||e===null?super.getTextContent():e}remove(){N(52)}replace(e){N(53)}insertBefore(e){N(54)}insertAfter(e){N(55)}updateDOM(e,t){return!1}splice(e,t,r){for(const i of r)S(i)||z(i)||N(282);return super.splice(e,t,r)}static importJSON(e){return se().updateFromJSON(e)}collapseAtStart(){return!0}}function X(n){return n instanceof It}function As(n){return new Lt(new Map(n._nodeMap))}function Cr(){return new Lt(new Map([["root",new It]]))}function Ds(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&N(130,t.name),S(n)){const r=e.children;Array.isArray(r)||N(59,t.name);const i=n.getChildren();for(let s=0;s<i.length;s++){const o=Ds(i[s]);r.push(o)}}return e}function ka(n){return n instanceof Lt}class Lt{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return xi(t&&t.editor||null,this,e)}clone(e){const t=new Lt(this._nodeMap,e===void 0?this._selection:e);return t._readOnly=!0,t}toJSON(){return xi(null,this,()=>({root:Ds(se())}))}}class Cl extends Ft{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Kt extends Ft{static getType(){return"paragraph"}static clone(e){return new Kt(e.__key)}createDOM(e){const t=document.createElement("p"),r=tt(e.theme,"paragraph");return r!==void 0&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}static importDOM(){return{p:e=>({conversion:Sl,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(ne(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r)}return{element:t}}static importJSON(e){return be().updateFromJSON(e)}exportJSON(){const e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){const t=this.getChildren().find(M);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){const r=be();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||M(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}
11function Sl(n){const e=be();if(n.style&&(e.setFormat(n.style.textAlign),Bl(n,e)),e.getFormatType()===""){const t=n.getAttribute("align");t&&t&&t in Vn&&e.setFormat(t)}return{node:e}}function be(){return wn(new Kt)}function vl(n){return n instanceof Kt}const ht=0,Na=1,Ta=3,ba=4;function Ps(n,e,t,r){const i=n._keyToDOMMap;i.clear(),n._editorState=Cr(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,n._updateTags=new Set,n._updates=[],n._blockCursorElement=null;const s=n._observer;s!==null&&(s.disconnect(),n._observer=null),e!==null&&(e.textContent=""),t!==null&&(t.textContent="",i.set("root",t))}function kl(n){const e=new Set,t=new Set;let r=n;for(;r;){const{ownNodeConfig:i}=En(r),s=r.transform;if(!t.has(s)){t.add(s);const o=r.transform();o&&e.add(o)}if(i){const o=i.$transform;o&&e.add(o),r=i.extends}else{const o=Object.getPrototypeOf(r);r=o.prototype instanceof ue&&o!==ue?o:void 0}}return e}function wa(n){const e=n||{},t=xl(),r=e.theme||{},i=n===void 0?t:e.parentEditor||null,s=e.disableEvents||!1,o=Cr(),l=e.namespace||(i!==null?i._config.namespace:$s()),a=e.editorState,c=[It,lt,Ot,At,Kt,Cl,...e.nodes||[]],{onError:u,html:d}=e,f=e.editable===void 0||e.editable;let _;if(n===void 0&&t!==null)_=t._nodes;else{_=new Map;for(let p=0;p<c.length;p++){let g=c[p],m=null,y=null;if(typeof g!="function"){const b=g;g=b.replace,m=b.with,y=b.withKlass||null}En(g);const x=g.getType(),T=kl(g);_.set(x,{exportDOM:d&&d.export?d.export.get(g):void 0,klass:g,replace:m,replaceWithKlass:y,sharedNodeState:wo(c[p]),transforms:T})}}const h=new nt(o,i,_,{disableEvents:s,namespace:l,theme:r},u||console.error,(function(p,g){const m=new Map,y=new Set,x=T=>{Object.keys(T).forEach(b=>{let v=m.get(b);v===void 0&&(v=[],m.set(b,v)),v.push(T[b])})};return p.forEach(T=>{const b=T.klass.importDOM;if(b==null||y.has(b))return;y.add(b);const v=b.call(T.klass);v!==null&&x(v)}),g&&x(g),m})(_,d?d.import:void 0),f,n);return a!==void 0&&(h._pendingEditorState=a,h._dirtyType=2),(function(p){p.registerCommand(Qi,Qo,ht),p.registerCommand(Zi,Zo,ht),p.registerCommand(es,el,ht),p.registerCommand(ts,tl,ht),p.registerCommand(ss,nl,ht)})(h),h}function Nl(n,e){const t=n.get(e);n.delete(e),t&&t()}function gt(n,e,t){return n.set(e,t),Nl.bind(null,n,e)}class nt{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,r,i,s,o,l,a){this._createEditorArgs=a,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=$s(),this._onError=s,this._htmlConversions=o,this._editable=l,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return gt(this._listeners.update,e)}registerEditableListener(e){return gt(this._listeners.editable,e)}registerDecoratorListener(e){return gt(this._listeners.decorator,e)}registerTextContentListener(e){return gt(this._listeners.textcontent,e)}registerRootListener(e){const t=this._listeners.root;return Zl(gt(t,e,e(this._rootElement,null)||void 0),()=>(function(r,i,s){const o=r.get(i);o&&o(),r.set(i,i(...s)||void 0)})(t,e,[null,this._rootElement]))}registerCommand(e,t,r){r===void 0&&N(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const s=i.get(e);s===void 0&&N(36,String(e));const o=s[r];return o.add(t),()=>{o.delete(t),s.every(l=>l.size===0)&&i.delete(e)}}registerMutationListener(e,t,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,s=this._listeners.mutation;let o=s.get(t);o===void 0&&(o=new Set,s.set(t,o)),o.add(i);const l=r&&r.skipInitialization;return l!==void 0&&l||this.initializeMutationListener(t,i),()=>{o.delete(i),o.size===0&&s.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&N(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,i=Ai(r).get(t.getType());if(!i)return;const s=new Map;for(const o of i.keys())s.set(o,"created");s.size>0&&e(s,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){const r=this.registerNodeTransformToKlass(e,t),i=[r],s=r.replaceWithKlass;if(s!=null){const o=this.registerNodeTransformToKlass(s,t);i.push(o)}return(function(o,l){const a=Ai(o.getEditorState()),c=[];for(const u of l){const d=a.get(u);d&&c.push(d)}c.length!==0&&o.update(()=>{for(const u of c)for(const d of u.keys()){const f=$(d);f&&f.markDirty()}},o._pendingEditorState===null?{tag:Ln}:void 0)})(this,i.map(o=>o.klass.getType())),()=>
11{i.forEach(o=>o.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return E(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const r=tt(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,Ps(this,t,e,i),t!==null&&(this._config.disableEvents||rl(t),r!=null&&t.classList.remove(...r)),e!==null){const s=Mr(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=2,ji(this),this._updateTags.add(Ln),ye(this),this._config.disableEvents||(function(l,a){const c=l.ownerDocument;ir.set(l,c);const u=cn.get(c)??0;u<1&&c.addEventListener("selectionchange",_s),cn.set(c,u+1),l.__lexicalEditor=a;const d=gs(l);for(let f=0;f<rr.length;f++){const[_,h]=rr[f],p=typeof h=="function"?g=>{ei(g)||(Zr(g),(a.isEditable()||_==="click")&&h(g,a))}:g=>{if(ei(g))return;Zr(g);const m=a.isEditable();switch(_){case"cut":return m&&E(a,ls,g);case"copy":return E(a,os,g);case"paste":return m&&E(a,ns,g);case"dragstart":return m&&E(a,Vo,g);case"dragover":return m&&E(a,Ho,g);case"dragend":return m&&E(a,Yo,g);case"focus":return m&&E(a,qo,g);case"blur":return m&&E(a,Xo,g);case"drop":return m&&E(a,jo,g)}};l.addEventListener(_,p),d.push(()=>{l.removeEventListener(_,p)})}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(Ln),ye(this);Ct("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&N(38);let r=e;r._readOnly&&(r=As(e),r._selection=e._selection?e._selection.clone():null),Ji(this);const i=this._pendingEditorState,s=this._updateTags,o=t!==void 0?t.tag:null;i===null||i.isEmpty()||(o!=null&&s.add(o),ye(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&s.add(o),this._updating||ye(this)}parseEditorState(e,t){return(function(r,i,s){const o=Cr(),l=J,a=Z,c=j,u=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,_=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,J=o,Z=!1,j=i,Sr(null);try{const h=i._nodes;Ms(r.root,h),s&&s(),o._readOnly=!0}catch(h){h instanceof Error&&i._onError(h)}finally{i._dirtyElements=u,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=_,J=l,Z=a,j=c}return o})(typeof e=="string"?JSON.parse(e):e,this,t)}read(e){return ye(this),this.getEditorState().read(e,{editor:this})}update(e,t){(function(r,i,s){r._updating?r._updates.push([i,s]):kn(r,i,s)})(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),fe(this,()=>{const i=K(),s=se();i!==null?i.dirty||ee(i.clone()):s.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?s.selectStart():s.selectEnd()),Er("focus"),Al(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=he(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Ct("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}nt.version="0.43.0+prod.esm";let ar=null;function Sr(n){ar=n}let Tl=1;function Fs(n,e){const t=Is(n,e);return t===void 0&&N(30,e),t}function Is(n,e){return n._nodes.get(e)}const bl=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function Ls(n){return z(kr(n))}function Ks(n){const e=document.activeElement;if(!ne(e))return!1;const t=e.nodeName;return z(kr(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&Tn(e)==null)}function Nn(n,e,t){const r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!Ks(e)&&Rs(e)===n}catch{return!1}}function vr(n){return n instanceof nt}function Rs(n){let e=n;for(;e!=null;){const t=Tn(e);if(vr(t))return t;e=Rt(e)}return null}function Tn(n){return n?n.__lexicalEditor:null}function Le(n){return xs(n)||n.isToken()}function ke(n){return Le(n)||n.isSegmented()}function Se(n){return Bt(n)&&n.nodeType===3}function wl(n){return Bt(n)&&n.nodeType===9}function rt(n){let e=n;for(;e!=null;){if(Se(e))return e;e=e.firstChild}return null}function gn(n,e,t){const r=Be[e];if(t!==null&&(n&r)===(t&r))return n;let i=n^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function El(n,e){const t=(function(){const o=ar;return ar=null,o})();if((e=e||t&&t.__key)!=null)return void(n.__key=e);q(),bs();const r=B(),i=Oe(),s=""+Tl++;i._nodeMap.set(s,n),S(n)?r._dirtyElements.set(s,!0):r._dirtyLeaves.add(s),r._cloneNotNeeded.add(s),r._dirtyType=1,n.__key=s}function Ke(n){const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),i=n.getPreviousSibling(),s=n.getNextSibling(),o=s!==null?s.__key:null,l=i!==null?i.__key:null,a=i!==null?i.getWritable():null,c=s!==null?s.getWritable():null;i===null&&(r.__first=o),s===null&&(r.__last=l),a!==null&&(a.__next=o),c!==null&&(c.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,r.__size--}}function _n(n){bs(),fn(n)&&N(323,n.__key,n.__type);const e=n.getLatest(),t=e.__parent,r=Oe(),i=B(),s=r._nodeMap,o=i._dirtyElements;t!==null&&(function(a,c,u){let d=a;for(;d!==null;){if(u.has(d))return;const f=c.get(d);if(f===void 0)break;u.set(d,!1),d=f.__parent}})(t,s,o);const l=e.__key;i._dirtyType=1,S(n)?o.set(l,!0):i._dirtyLeaves.add(l)}function H(n){q();const e=B(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=$(t);r!==null&&r.getWritable()}if(n!==null){const r=$(n);r!==null&&r.getWritable()}}}function Te(){return Pt()?null:B()._compositionKey}function $(n,e){const t=(e||Oe())._nodeMap.get(n);return t===void 0?null:t}function Bs(n,e){const t=bn(n,B());return t!==void 0?$(t,e):null}function bn(n,e){return n[`__lexicalKey_${e._key}`]}function kr(n,e){let t=n;for(;t!=null;){const r=Bs(t,e);if(r!==null)return r;t=Rt(t)}return null}function zs(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function ki(n){return n.read(()=>se().getTextContent())}function se(){return Ws(Oe())}function Ws(n){return n._nodeMap.get("root")}function ee(n){q();const e=Oe();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function Ze(n){const e=B(),t=(function(r,i){let s=r;for(;s!=null;){const o=bn(s,i);if(o!==void 0)return o;s=Rt(s)}return null})(n,e);return t===null?n===e.getRootElement()?$("root"):null:$(t)}function Us(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function Nr(n){const e=[];for(let t=n;t!==null;t=t._parentEditor)e.push(t);return e}function $s(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Js(n){return Se(n)?n.nodeValue:null}function Tr(n,e,t){const r=he(te(e));if(r===null)return;const i=r.anchorNode;let{anchorOffset:s,focusOffset:o}=r;if(i!==null){let l=Js(i);const a=kr(i);if(l!==null&&M(a)){if((l===vt||l===hr)&&t){const c=t.length;l=t,s=c,o=c}l!==null&&br(a,l,s,o,n)}}}function br(n,e,t,r,i){let s=n;if(s.isAttached()&&(i||!s.isDirty())){const o=s.isComposing();let l=e;if((o||i)&&(e.endsWith(vt)&&(l=e.slice(0,-vt.length)),i)){const c=hr;let u;for(;(u=l.indexOf(c))!==-1;)l=l.slice(0,u)+l.slice(u+c.length),t!==null&&t>u&&(t=Math.max(u,t-c.length)),r!==null&&r>
11u&&(r=Math.max(u,r-c.length))}const a=s.getTextContent();if(i||l!==a){if(l===""){if(H(null),mn||Mt||yn)s.remove();else{const p=B();setTimeout(()=>{p.update(()=>{s.isAttached()&&s.remove()})},20)}return}const c=s.getParent(),u=Dt(),d=s.getTextContentSize(),f=Te(),_=s.getKey();if(s.isToken()||f!==null&&_===f&&!o||A(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===n.__key&&u.anchor.offset===0&&!s.canInsertTextBefore()&&!o||u.focus.key===n.__key&&u.focus.offset===d&&!s.canInsertTextAfter()&&!o))return void s.markDirty();const h=K();if(!A(h)||t===null||r===null)return void Ni(s,l,h);if(h.setTextNodeRange(s,t,s,r),s.isSegmented()){const p=V(s.getTextContent());s.replace(p),s=p}Ni(s,l,h)}}}function Ni(n,e,t){if(n.setTextContent(e),A(t)){const r=n.getKey();for(const i of["anchor","focus"]){const s=t[i];s.type==="text"&&s.key===r&&(s.offset=we(n,s.offset,"clamp"))}}}function Ut(n,e,t){const r=e[t]||!1;return r==="any"||r===n[t]}function Ml(n,e){return Ut(n,e,"altKey")&&Ut(n,e,"ctrlKey")&&Ut(n,e,"shiftKey")&&Ut(n,e,"metaKey")}function L(n,e,t){if(!Ml(n,t))return!1;if(n.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>
111||n.key.length===1&&n.key.charCodeAt(0)<=127)return!1;const r="Key"+e.toUpperCase();return n.code===r}const me={ctrlKey:!re,metaKey:re},Ti={altKey:re,ctrlKey:!re};function bi(n){return n.key==="Backspace"}function wi(n){return L(n,"a",me)}function Ea(n){const e=se();if(A(n)){const t=n.anchor,r=n.focus,i=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Yn(n),n}{const t=e.select(0,e.getChildrenSize());return ee(Yn(t)),t}}function tt(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const i=n[e];if(typeof i=="string"){const s=Zs(i);return t[e]=s,s}return i}function wr(n,e,t,r,i){if(t.size===0)return;const s=r.__type,o=r.__key,l=e.get(s);l===void 0&&N(33,s);const a=l.klass;let c=n.get(a);c===void 0&&(c=new Map,n.set(a,c));const u=c.get(o),d=u==="destroyed"&&i==="created";(u===void 0||d)&&c.set(o,d?"updated":i)}function Ei(n,e,t){const r=n.getParent();let i=t,s=n;return r!==null&&(t===0&&(i=s.getIndexWithinParent(),s=r)),s.getChildAtIndex(i-1)}function Ol(n,e){const t=n.offset;if(n.type==="element")return Ei(n.getNode(),e,t);{const r=n.getNode();if(t===0||!e){const i=r.getPreviousSibling();return i===null?Ei(r.getParentOrThrow(),e,r.getIndexWithinParent()+0):i}}return null}function js(n){const e=te(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function E(n,e,t){return Os(n,e,t,n)}function it(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&N(75,e),t}function Rt(n){const e=n.assignedSlot||n.parentElement;return Il(e)?e.host:e}function Vs(n){return wl(n)?n:ne(n)?n.ownerDocument:null}function Er(n){q(),B()._updateTags.add(n)}function Al(n){q(),B()._deferred.push(n)}function cr(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function Mr(n){const e=Vs(n);return e?e.defaultView:null}function te(n){const e=n._window;return e===null&&N(78),e}function Dl(n){let e=n.getParentOrThrow();for(;e!==null;){if(Ce(e))return e;e=e.getParentOrThrow()}return e}function Ce(n){return X(n)||S(n)&&n.isShadowRoot()}function wn(n){const e=B(),t=n.getType(),r=Is(e,t);r===void 0&&N(200,n.constructor.name,t);const{replace:i,replaceWithKlass:s}=r;if(i!==null){const o=i(n),l=o.constructor;return s!==null?o instanceof s||N(201,s.name,s.getType(),l.name,l.getType(),n.constructor.name,t):o instanceof n.constructor&&l!==n.constructor||N(202,l.name,l.getType(),n.constructor.name,t),o.__key===n.__key&&N(203,n.constructor.name,t,l.name,l.getType()),o}return n}function Un(n,e){!X(n.getParent())||S(e)||z(e)||N(99)}function Pl(n){const e=$(n);return e===null&&N(63,n),e}function $n(n){return(z(n)||S(n)&&!n.canBeEmpty())&&!n.isInline()}function ur(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function he(n){return oe?(n||window).getSelection():null}function Fl(n){const e=Mr(n);return e?e.getSelection():null}function ne(n){return Bt(n)&&n.nodeType===1}function Bt(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function Il(n){return Bt(n)&&n.nodeType===11}function Ll(n){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function Mi(n){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(e)!==null}function Ne(n){if(z(n)&&!n.isInline())return!0;if(!S(n)||Ce(n))return!1;const e=n.getFirstChild(),t=e===null||xt(e)||M(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function Kl(){return B()}const Oi=new WeakMap,Rl=new Map;function Ai(n){if(!n._readOnly&&n.isEmpty())return Rl;n._readOnly||N(192);let e=Oi.get(n);return e||(e=(function(t){const r=new Map;for(const[i,s]of t._nodeMap){const o=s.__type;let l=r.get(o);l||(l=new Map,r.set(o,l)),l.set(i,s)}return r})(n),Oi.set(n,e)),e}function Hs(n){const e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function Ma(n){return(e=Hs(n))[ps]=!0,e;var e}function Bl(n,e){const t=parseInt(n.style.paddingInlineStart,10)||0,r=Math.round(t/40);e.setIndent(r)}function zl(n){return n.__lexicalUnmanaged===!0}function _t(n,e){return(function(t,r){return Object.prototype.hasOwnProperty.call(t,r)})(n,e)&&n[e]!==ue[e]}function En(n){const e=Kr in n.prototype?n.prototype[Kr]():void 0,t=(function(o){if
11(!(o===ue||o.prototype instanceof ue)){let l="<unknown>",a="<unknown>";try{l=o.getType()}catch{}try{nt.version&&(a=JSON.parse(nt.version))}catch{}N(290,o.name,l,a)}return o===xr||o===Ft||o===ue})(n),r=!t&&_t(n,"getType")?n.getType():void 0;let i,s=r;if(e)if(r)i=e[r];else for(const[o,l]of Object.entries(e))s=o,i=l;if(!t&&s&&(_t(n,"getType")||(n.getType=()=>s),_t(n,"clone")||(n.clone=o=>(Sr(o),new n)),_t(n,"importJSON")||(n.importJSON=i&&i.$importJSON||(o=>new n().updateFromJSON(o))),!_t(n,"importDOM")&&i)){const{importDOM:o}=i;o&&(n.importDOM=()=>o)}return{ownNodeConfig:i,ownNodeType:s}}const Gt=(n,e)=>{let t=n;for(;t!=null&&!X(t);){if(e(t))return t;t=t.getParent()}return null},Wl={next:"previous",previous:"next"};class Or{origin;constructor(e){this.origin=e}[Symbol.iterator](){return qs({hasNext:st,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return G(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return G(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,t)),this}splice(e,t,r="next"){const i=r===this.direction?t:Array.from(t).reverse();let s=this;const o=this.getParentAtCaret(),l=new Map;for(let a=s.getAdjacentCaret();a!==null&&l.size<e;a=a.getAdjacentCaret()){const c=a.origin.getWritable();l.set(c.getKey(),c)}for(const a of i){if(l.size>0){const c=s.getNodeAtCaret();if(c){if(l.delete(c.getKey()),l.delete(a.getKey()),!(c.is(a)||s.origin.is(a))){const u=a.getParent();u&&u.is(o)&&a.remove(),c.replace(a)}}else c===null&&N(263,Array.from(l).join(" "))}else s.insert(a);s=G(a,this.direction)}for(const a of l.values())a.remove();return this}}class wt extends Or{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Me(e,this.direction)}getParentCaret(e="root"){return G(Ar(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=at(this.direction);return G(this.getNodeAtCaret(),e)||Me(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof wt&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const Ul={root:X,shadowRoot:Ce};function at(n){return Wl[n]}function Ar(n,e="root"){return Ul[e](n)?null:n}class Ue extends Or{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:G(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return S(this.origin)?Me(this.origin,this.direction):null}getParentCaret(e="root"){return G(Ar(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=at(this.direction);return G(this.getNodeAtCaret(),e)||Me(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Ue&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Ue||e instanceof $e)&&this.direction===e.direction&&this.origin.is(e.origin)}}class $e extends Or{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Je(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return G(Ar(this.getParentAtCaret(),e),this.direction)}getFlipped(){return Je(this.origin,at(this.direction),this.offset)}isSamePointCaret(e){return e instanceof $e&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Ue||e instanceof $e)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return G(this.origin,this.direction)}}function Re(n){return n instanceof $e}function st(n){return n instanceof Ue}function xe(n){return n instanceof wt}const $l={next:class extends $e{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends $e{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},Jl={next:class extends Ue{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Ue{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},jl={next:class extends wt{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(n){return this.origin.splice(0,0,[n]),this}},previous:class extends wt{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(n){return this.origin.splice(this.origin.getChildrenSize(),0,[n]),this}}};function G(n,e){return n?new Jl[e](n):null}function Je(n,e,t){return n?new $l[e](n,we(n,t)):null}function we(n,e,t="error"){const r=n.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(t!=="clamp"&&Ri(284,String(e),String(r),n.getKey()),i=i<0?0:r),i}function Di(n,e){return new Hl(n,e)}function Me(n,e){return S(n)?new jl[e](n):null}function Vl(n){return n&&n.getChildCaret()||n}function Dr(n){return n&&Vl(n.getAdjacentCaret())}class Pr{type="node-caret-range";direction;anchor;focus;constructor(e,t,r){this.anchor=e,this.focus=t,this.direction=r}getLatest(){const e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new Pr(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const s=this[i].getLatest();return Re(s)?(function(o,l){const{direction:a,origin:c}=o,u=we(c,l==="focus"?at(a):a);return Di(o,u-o.offset)})(s,i):null},t=e("anchor"),r=e("focus");if(t&&r){const{caret:i}=t,{caret:s}=r;if(i.isSameNodeCaret(s))return[Di(i,s.offset-i.offset),null]}return[t,r]}iterNodeCarets(e="root"){const t=Re(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=Re(r),s=o=>o.isSameNodeCaret(r)?null:Dr(o)||o.getParentCaret(e);return qs({hasNext:o=>o!==null&&!(i&&r.isSameNodeCaret(o)),initial:t.isSameNodeCaret(r)?null:s(t),map:o=>o,step:s})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Hl{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,r=t+e;return r<t?[r,t]:[t,r]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[r,i]=this.getSliceIndices(),s=e.getTextContent();return Je(e.setTextContent(s.slice(0,r)+s.slice(i)),t,r)}}function Ys(n){return je(n,G(se(),n.direction))}function Yl(n){return je(n,n)}function je(n,e){return n.direction!==e.direction&&N(265),new Pr(n,e,n.direction)}function qs(n){const{initial:e,hasNext:t,step:r,map:i}=n;let s=e;return{[Symbol.iterator](){return this},next(){if(!t(s))return{done:!0,value:void 0};const o={done:!1,value:i(s)};return s=r(s),o}}}function Xs(n,e){const t=Qt(n.origin,e.origin);switch(t===null&&N(275,n.origin.getKey(),e.origin.getKey()),t.type){case"same":{const r=n.type==="text",i=e.type==="text";return r&&i?(function(s,o){return Math.sign(s-o)}
11)(n.offset,e.offset):n.type===e.type?0:r?-1:i?1:n.type==="child"?-1:1}case"ancestor":return n.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return Gs(t)}}function Gs(n){const{a:e,b:t}=n,r=e.__key,i=t.__key;let s=e,o=t;for(;s&&o;s=s.getNextSibling(),o=o.getNextSibling()){if(s.__key===i)return-1;if(o.__key===r)return 1}return s===null?1:-1}function $t(n,e){return e.is(n)}function Pi(n){return S(n)?[n.getLatest(),null]:[n.getParent(),n.getLatest()]}function Qt(n,e){if(n.is(e))return{commonAncestor:n,type:"same"};const t=new Map;for(let[r,i]=Pi(n);r;i=r,r=r.getParent())t.set(r,i);for(let[r,i]=Pi(e);r;i=r,r=r.getParent()){const s=t.get(r);if(s!==void 0)return s===null?($t(n,r)||N(276),{commonAncestor:r,type:"ancestor"}):i===null?($t(e,r)||N(277),{commonAncestor:r,type:"descendant"}):((S(s)||$t(n,s))&&(S(i)||$t(e,i))&&r.is(s.getParent())&&r.is(i.getParent())||N(278),{a:s,b:i,commonAncestor:r,type:"branch"})}return null}function Ve(n,e){const{type:t,key:r,offset:i}=n,s=Pl(n.key);return t==="text"?(M(s)||N(266,s.getType(),r),Je(s,e,i)):(S(s)||N(267,s.getType(),r),Ql(s,n.offset,e))}function Et(n,e){const{origin:t,direction:r}=e,i=r==="next";Re(e)?n.set(t.getKey(),e.offset,"text"):st(e)?M(t)?n.set(t.getKey(),we(t,r),"text"):n.set(t.getParentOrThrow().getKey(),t.getIndexWithinParent()+(i?1:0),"element"):(xe(e)&&S(t)||N(268),n.set(t.getKey(),i?0:t.getChildrenSize(),"element"))}function ql(n){const e=K(),t=A(e)?e:ks();return Zt(t,n),ee(t),t}function Zt(n,e){Et(n.anchor,e.anchor),Et(n.focus,e.focus)}function Fi(n){const{anchor:e,focus:t}=n,r=Ve(e,"next"),i=Ve(t,"next"),s=Xs(r,i)<=0?"next":"previous";return je(ot(r,s),ot(i,s))}function Fr(n){const{direction:e,origin:t}=n,r=G(t,at(e)).getNodeAtCaret();return r?G(r,e):Me(t.getParentOrThrow(),e)}function Ii(n,e="root"){const t=[n];for(let r=xe(n)?n.getParentCaret(e):n.getSiblingCaret();r!==null;r=r.getParentCaret(e))t.push(Fr(r));return t}function Jn(n){return!!n&&n.origin.isAttached()}function Xl(n,e="removeEmptySlices"){if(n.isCollapsed())return n;const t="root",r="next";let i=e;const s=Qs(n,r),o=Ii(s.anchor,t),l=Ii(s.focus.getFlipped(),t),a=new Set,c=[];for(const h of s.iterNodeCarets(t))if(xe(h))a.add(h.origin.getKey());else if(st(h)){const{origin:p}=h;S(p)&&!a.has(p.getKey())||c.push(p)}for(const h of c)h.remove();for(const h of s.getTextSlices()){if(!h)continue;const{origin:p}=h.caret,g=p.getTextContentSize(),m=Fr(G(p,r)),y=p.getMode();if(Math.abs(h.distance)===g&&i==="removeEmptySlices"||y==="token"&&h.distance!==0)m.remove();else if(h.distance!==0){i="removeEmptySlices";let x=h.removeTextSlice();const T=h.caret.origin;if(y==="segmented"){const b=x.origin,v=V(b.getTextContent()).setStyle(b.getStyle()).setFormat(b.getFormat());m.replaceOrInsert(v),x=Je(v,r,x.offset)}T.is(o[0].origin)&&(o[0]=x),T.is(l[0].origin)&&(l[0]=x.getFlipped())}}let u,d;for(const h of o)if(Jn(h)){u=ce(h);break}for(const h of l)if(Jn(h)){d=ce(h);break}const f=(function(h,p,g){if(!h||!p)return null;const m=h.getParentAtCaret(),y=p.getParentAtCaret();if(!m||!y)return null;const x=m.getParents().reverse();x.push(m);const T=y.getParents().reverse();T.push(y);const b=Math.min(x.length,T.length);let v;for(v=0;v<b&&x[v]===T[v];v++);const w=(O,P)=>{let R;for(let I=v;I<O.length;I++){const F=O[I];if(Ce(F))return;!R&&P(F)&&(R=F)}return R},k=w(x,Ne),C=k&&w(T,O=>g.has(O.getKey())&&Ne(O));return k&&C?[k,C]:null})(u,d,a);if(f){const[h,p]=f;Me(h,"previous").splice(0,p.getChildren());let g=p.getParent();for(p.remove(!0);g&&g.isEmpty();){const m=g;g=g.getParent(),m.remove(!0)}}const _=[u,d,...o,...l].find(Jn);if(_)return Yl(ot(ce(_),n.direction));N(269,JSON.stringify(o.map(h=>h.origin.__key)))}function ce(n){const e=(function(i){let s=i;for(;xe(s);){const o=Dr(s);if(!xe(o))break;s=o}return s})(n.getLatest()),{direction:t}=e;if(M(e.origin))return Re(e)?e:Je(e.origin,t,t);const r=e.getAdjacentCaret();return st(r)&&M(r.origin)?Je(r.origin,t,at(t)):e}function Gl(n){return Re(n)&&n.offset!==we(n.origin,n.direction)}function ot(n,e){return n.direction===e?n:n.getFlipped()}function Qs(n,e){return n.direction===e?n:je(ot(n.focus,e),ot(n.anchor,e))}function Ql(n,e,t){let r=Me(n,"next");for(let i=0;i<e;i++){const s=r.getAdjacentCaret();if(s===null)break;r=s}return ot(r,t)}function Oa(n){return n}function Aa(...n){return n}function Da(n){return n}function Pa(n,e){if(!e||n===e)return n;for(const t in e)if(n[t]!==e[t])return{...n,...e};return n}function Zs(...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}function Zl(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}const pn="data-lexical-mention-id",eo="data-lexical-mention-username",fr="data-lexical-mention-name",dr="data-lexical-mention-avatar",to="data-lexical-mention-kind",no="data-lexical-mention-reference-kind",ea=n=>
11n===void 0||n==="character"||n==="object",Ir=n=>n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),Xe=(n,e)=>e?` ${n}="${Ir(e)}"`:"",ro=n=>`<span${Xe(pn,n.id)}${Xe(eo,n.username)}${Xe(fr,n.displayName)}${Xe(dr,n.avatarUrl)}${Xe(to,n.kind)}${Xe(no,n.referenceKind)}>${Ir(`@${n.displayName??n.username}`)}</span>`,Fa=n=>n.map(e=>e.kind==="mention"?ro(e.mention):Ir(e.text).replace(/\n/g,"<br>")).join(""),ta=["person","bot","character","reference"],na=["character","location","object","prop","wardrobe"],ra=n=>ta.some(e=>e===n),ia=n=>na.some(e=>e===n),sa=n=>{const e=n.getAttribute(pn),t=n.getAttribute(eo);if(!e||!t)return null;const r=n.getAttribute(to),i=n.getAttribute(no);return{id:e,username:t,...n.getAttribute(fr)?{displayName:n.getAttribute(fr)??void 0}:{},...n.getAttribute(dr)?{avatarUrl:n.getAttribute(dr)??void 0}:{},...ra(r)?{kind:r}:{},...ia(i)?{referenceKind:i}:{}}},Ia=n=>{if(!n.includes(pn))return null;const e=new DOMParser().parseFromString(n,"text/html").body,t=[],r=s=>{if(!s)return;const o=t[t.length-1];o?.kind==="text"?o.text+=s:t.push({kind:"text",text:s})},i=s=>{for(const o of s.childNodes){if(o.nodeType===Node.TEXT_NODE){r(o.textContent??"");continue}if(!(o instanceof Element))continue;if(o.tagName==="BR"){r(`
12`);continue}const l=o.hasAttribute(pn)?sa(o):null;if(l){t.push({kind:"mention",mention:l});continue}i(o)}};return i(e),t.some(s=>s.kind==="mention")?t:null};class Mn extends xr{__mentionAvatarUrl;__mentionDisplayName;__mentionId;__mentionImageSource;__mentionKind;__mentionReferenceKind;__mentionUsername;static getType(){return"mention"}static clone(e){return new Mn(e.__mentionId,e.__mentionUsername,e.__mentionDisplayName,e.__mentionAvatarUrl,e.__mentionKind,e.__mentionReferenceKind,e.__mentionImageSource,e.__key)}constructor(e,t,r,i,s,o,l,a){super(a),this.__mentionId=e,this.__mentionUsername=t,this.__mentionDisplayName=r,this.__mentionAvatarUrl=i,this.__mentionKind=s,this.__mentionReferenceKind=o,this.__mentionImageSource=l}getMentionAvatarUrl(){return this.__mentionAvatarUrl}getMentionDisplayName(){return this.__mentionDisplayName}getMentionId(){return this.__mentionId}getMentionImageSource(){return this.__mentionImageSource}getMentionKind(){return this.__mentionKind}getMentionReferenceKind(){return this.__mentionReferenceKind}getMentionUsername(){return this.__mentionUsername}getTextContent(){return`@${this.__mentionUsername}`}isInline(){return!0}isIsolated(){return!0}createDOM(){const e=document.createElement("span");return e.style.display="inline-block",e}updateDOM(){return!1}exportDOM(){const e=document.createElement("template");e.innerHTML=ro({avatarUrl:this.__mentionAvatarUrl,displayName:this.__mentionDisplayName,id:this.__mentionId,kind:this.__mentionKind,referenceKind:this.__mentionReferenceKind,username:this.__mentionUsername});const t=e.content.firstElementChild;return{element:t instanceof HTMLElement?t:null}}static importDOM(){return null}static importJSON(e){return la(e.mentionUsername,e.mentionId,e.mentionDisplayName,e.mentionAvatarUrl,e.mentionKind,e.mentionReferenceKind,e.mentionImageSource)}exportJSON(){return{mentionAvatarUrl:this.__mentionAvatarUrl,mentionDisplayName:this.__mentionDisplayName,mentionId:this.__mentionId,mentionImageSource:this.__mentionImageSource,mentionKind:this.__mentionKind,mentionReferenceKind:this.__mentionReferenceKind,mentionUsername:this.__mentionUsername,type:"mention",version:1}}decorate(e,t){return Jt.jsx(oa,{avatarUrl:this.__mentionAvatarUrl,displayName:this.__mentionDisplayName,kind:this.__mentionKind,nodeKey:this.getKey(),username:this.__mentionUsername})}}const oa=({avatarUrl:n,displayName:e,kind:t,nodeKey:r,username:i})=>{const[s]=oo(),o=e??`@${i}`,l=()=>{s.focus(),s.update(()=>{const a=$(r),c=a?.getParent();if(!a||!c)return;const u=a.getIndexWithinParent(),d=ks();d.anchor.set(c.getKey(),u+1,"element"),d.focus.set(c.getKey(),u+1,"element"),ee(d)})};return Jt.jsxs("span",{className:Li.pill,"data-slot":"mention-pill","data-username":i,onClick:l,children:[Jt.jsx(io,{shape:t==="reference"?"rectangle":"circle",size:"XXXS",src:n,text:o}),Jt.jsx("span",{className:Li.pillLabel,children:o})]})},la=(n,e,t,r,i,s,o)=>new Mn(e,n,t,r,i,s,o),La=n=>n instanceof Mn,Li={pill:"inline-flex h-[20px] items-center gap-4 roun
12ded-full bg-themes-brand-semi-transparent pl-2 pr-8 text-themes-brand-primary font-body align-middle max-w-[200px]",pillLabel:"truncate"},Ka=(n,e,t=new Set)=>{const r=new Set(t);let i=0;const s=n.filter(o=>o.kind!=="mention"||!ea(o.mention.referenceKind)||r.has(o.mention.id)?!0:r.size>=e?(i+=1,!1):(r.add(o.mention.id),!0));return{droppedCount:i,segments:s}};export{K as $,li as A,ls as B,os as C,S as D,Xr as E,Ea as F,Oa as G,ht as H,z as I,Gl as J,It as K,Il as L,nr as M,Vt as N,$o as O,Ve as P,on as Q,se as R,Wo as S,Fo as T,Ma as U,Lo as V,Ln as W,Yr as X,be as Y,Da as Z,qr as _,xe as a,mt as a0,an as a1,ln as a2,ya as a3,xa as a4,ma as a5,pa as a6,is as a7,Ca as a8,rs as a9,ll as aa,al as ab,Sa as ac,Aa as ad,xr as ae,$ as af,V as ag,la as ah,La as ai,Ia as aj,Ka as ak,Ta as al,he as am,Na as an,Jo as ao,Uo as ap,Ro as aq,Bo as ar,D as as,ba as at,Po as au,kr as av,ks as aw,ee as ax,Mn as ay,Fa as az,Kl as b,Pa as c,_a as d,Ot as e,Kt as f,ka as g,Is as h,Zl as i,ne as j,Ys as k,lt as l,Vo as m,wa as n,oo as o,jo as p,vl as q,so as r,ns as s,ga as t,va as u,ke as v,A as w,At as x,M as y,X as z};
13//# sourceMappingURL=capCastMentions-BzoalIm1.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.