PageSourceSearch

https://portals.noloco.io/assets/RichTextEditor-CKJqdpFj.js

js noloco.io collected 2026-09-25 18:42:02 UTC 261,051 bytes, 35 lines download raw bytes

1var Eu=Object.defineProperty;var wu=(n,e,t)=>e in n?Eu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Cn=(n,e,t)=>wu(n,typeof e!="symbol"?e+"":e,t);import{j as F}from"./jsx-runtime-esm-DgZK9P7c.js";import{c as Ii}from"./_commonjsHelpers-CxYHiaSM.js";import{a as k}from"./index-Dhy1axWM.js";import{r as Un}from"./index-AmsYr5ik.js";import{w as pl,x as Cu,u as ml,L as zr,b as At,N as Tu,d as ku,I as Nu,a as Au,g as Br}from"./tabs-CHHObJJW.js";import{bJ as Fu,bX as $u,c1 as _l,ac as Iu,E as Lu,d5 as Pu,aa as Ou,d6 as Ru,ck as Du,cz as Mu,e as yl,d7 as zu,d8 as Bu,m as Ur}from"./app-vP2jhQjT.js";import{C as ht}from"./comments-CesF0rrC.js";import{ci as ur,d_ as Uu,aS as Wu,h as ju,g as Ku}from"./Icon-Ime4wSjK.js";import{I as Hu,a as Ju,b as Gu,c as qu}from"./IconListNumbers-BivK6prr.js";import"./index-CJZQOLKR.js";import"./index-B8ov4xfp.js";import"./project-wd5IloI0.js";import"./with-selector-Ce4EAgKw.js";import"./react-redux-Bz8azxLH.js";import"./isEqual-BiqEbpPg.js";import"./useAuthWrapper-CWXjgmIl.js";import"./user-avatar-Zw71S5uB.js";import"./normalizeDates-p6XmbZym.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"967abcd"},n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[new n.Error().stack]=(function(t){for(var r=1;r<arguments.length;r++){var s=arguments[r];if(s!=null)for(var i in s)s.hasOwnProperty(i)&&(t[i]=s[i])}return t})({},n._sentryModuleMetadata[new n.Error().stack],{"_sentryBundlerPluginAppKey:noloco-ui":!0});var e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="15df57e6-c24b-4d91-bd48-75168a60de0c",n._sentryDebugIdIdentifier="sentry-dbid-15df57e6-c24b-4d91-bd48-75168a60de0c")}catch{}})();function Mt(n){return{}}const hn={},Vu={},Ws={},pt={},Ft={},on={},$t={},cr={},us={},ln={},an={},je={},js={},Ks={},Zu={},xl={},Yu={},Hs={},Xu={},dr={},fr={},Ot={},Js={},Gs={},gr={},qs={},hr={},bl={},vl={},cs={},Sl={},Qu={},El={},wl={},ec={},pr={},Vs={},ds={},Zs={},tc={},Tn={},kn={},nc={},rc={},sc={},Fe=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,ic=Fe&&"documentMode"in document?document.documentMode:null,we=Fe&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),tt=Fe&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Wn=!(!Fe||!("InputEvent"in window)||ic)&&"getTargetRanges"in new window.InputEvent("input"),mr=Fe&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),pn=Fe&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,oc=Fe&&/Android/.test(navigator.userAgent),Cl=Fe&&/^(?=.*Chrome).*/i.test(navigator.userAgent),lc=Fe&&oc&&Cl,Ys=Fe&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Cl,mn=1,rt=3,_t=0,Tl=1,Rt=2,ac=0,uc=1,cc=2,jn=4,Kn=8,Xs=128,dc=1792|(112|(3|jn|Kn)|Xs),Qs=1,ei=2,ti=3,ni=4,ri=5,si=6,_r=mr||pn||Ys?" ":"​",He=`
2
3`,fc=tt?" ":_r,kl="֑-߿יִ-﷽ﹰ-ﻼ",Nl="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",gc=new RegExp("^[^"+Nl+"]*["+kl+"]"),hc=new RegExp("^[^"+kl+"]*["+Nl+"]"),yt={bold:1,capitalize:1024,code:16,highlight:Xs,italic:2,lowercase:256,strikethrough:jn,subscript:32,superscript:64,underline:Kn,uppercase:512},pc={directionless:1,unmergeable:2},Li={center:ei,end:si,justify:ni,left:Qs,right:ti,start:ri},mc={[ei]:"center",[si]:"end",[ni]:"justify",[Qs]:"left",[ti]:"right",[ri]:"start"},_c={normal:0,segmented:2,token:1},yc={[ac]:"normal",[cc]:"segmented",[uc]:"token"};function xc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var I=xc((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function Hn(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const bc=100;let fs=!1,ii=0;
3function vc(n){ii=n.timeStamp}function Wr(n,e,t){const r=n.nodeName==="BR",s=e.__lexicalLineBreak;return s&&(n===s||r&&n.previousSibling===s)||r&&xr(n,t)!==void 0}function Sc(n,e,t){const r=Ee(t._window);let s=null,i=null;r!==null&&r.anchorNode===n&&(s=r.anchorOffset,i=r.focusOffset);const o=n.nodeValue;o!==null&&fi(e,o,s,i,!1)}function Ec(n,e,t){if(N(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return e.nodeType===rt&&t.isAttached()}function wc(n,e,t,r){for(let s=n;s&&!Oc(s);s=yn(s)){const i=xr(s,e);if(i!==void 0){const o=ee(i,t);if(o)return W(o)||!se(s)?void 0:[s,o]}else if(s===r)return[r,Pl(t)]}}function Al(n,e,t){fs=!0;const r=performance.now()-ii>bc;try{Se(n,(()=>{const s=$()||(function(d){return d.getEditorState().read((()=>{const h=$();return h!==null?h.clone():null}))})(n),i=new Map,o=n.getRootElement(),l=n._editorState,a=n._blockCursorElement;let u=!1,c="";for(let d=0;d<e.length;d++){const h=e[d],p=h.type,_=h.target,m=wc(_,n,l,o);if(!m)continue;const[x,g]=m;if(p==="characterData")r&&A(g)&&Ec(s,_,g)&&Sc(_,g,n);else if(p==="childList"){u=!0;const y=h.addedNodes;for(let v=0;v<y.length;v++){const E=y[v],w=Il(E),C=E.parentNode;if(C!=null&&E!==a&&w===null&&!Wr(E,C,n)){if(tt){const P=(se(E)?E.innerText:null)||E.nodeValue;P&&(c+=P)}C.removeChild(E)}}const b=h.removedNodes,S=b.length;if(S>0){let v=0;for(let E=0;E<S;E++){const w=b[E];(Wr(w,_,n)||a===w)&&(_.appendChild(w),v++)}S!==v&&i.set(x,g)}}}if(i.size>0)for(const[d,h]of i)h.reconcileObservedMutation(d,n);const f=t.takeRecords();if(f.length>0){for(let d=0;d<f.length;d++){const h=f[d],p=h.addedNodes,_=h.target;for(let m=0;m<p.length;m++){const x=p[m],g=x.parentNode;g==null||x.nodeName!=="BR"||Wr(x,_,n)||g.removeChild(x)}}t.takeRecords()}s!==null&&(u&&(s.dirty=!0,J(s)),tt&&Ml(n)&&s.insertRawText(c))}))}finally{fs=!1}}function Fl(n){const e=n._observer;e!==null&&Al(n,e.takeRecords(),e)}function $l(n){(function(e){ii===0&&vr(e).addEventListener("textInput",vc,!0)})(n),n._observer=new MutationObserver(((e,t)=>{Al(n,e,t)}))}function Pi(n,e){const t=n.__mode,r=n.__format,s=n.__style,i=e.__mode,o=e.__format,l=e.__style;return!(t!==null&&t!==i||r!==null&&r!==o||s!==null&&s!==l)}function Oi(n,e){const t=n.mergeWithSibling(e),r=G()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function Ri(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&A(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Pi(e,r)){r=Oi(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&A(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Pi(r,t)){r=Oi(r,t);break}break}t.remove()}}else r.remove()}function Dt(n){return Di(n.anchor),Di(n.focus),n}function Di(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,s;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),s=!0):(r=e.getChildAtIndex(t),s=!1),A(r)){n.set(r.__key,s?r.getTextContentSize():0,"text");break}if(!T(r))break;n.set(r.__key,s?r.getChildrenSize():0,"element")}}let Cc=1;const Tc=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function oi(n){const e=document.activeElement;if(!se(e))return!1;const t=e.nodeName;return W(Je(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&yr(e)==null)}function _n(n,e,t){const r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!oi(e)&&ai(e)===n}catch{return!1}}function li(n){return n instanceof Nr}function ai(n){let e=n;for(;e!=null;){const t=yr(e);if(li(t))return t;e=yn(e)}return null}function yr(n){return n?n.__lexicalEditor:null}function ft(n){return n.isToken()||n.isSegmented()}function kc(n){return n.nodeType===rt}function Jn(n){let e=n;for(;e!=null;){if(kc(e))return e;e=e.firstChild}return null}function Gn(n,e,t){const r=yt[e];if(t!==null&&(n&r)==(t&r))return n;let s=n^r;return e==="subscript"?s&=-65:e==="superscript"?s&=-33:e==="lowercase"?(s&=-513,s&=-1025):e==="uppercase"?(s&=-257,s&=-1025):e==="capitalize"&&(s&=-257,s&=-513),s}function ui(n){return A(n)||Re(n)||W(n)}function Nc(n,e){if(e!=null)return void(n.__key=e);fe(),ia();const t=G(),r=ot(),s=""+Cc++;r._nodeMap.set(s,n),T(n)?t._dirtyElements.set(s,!0):t._dirtyLeaves.add(s),t._cloneNotNeeded.add(s),t._dirtyType=Tl,n.__key=s}function mt(n){const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),s=n.getPreviousSibling(),i=n.getNextSibling();if(s===null)if(i!==null){const o=i.getWritable();r.__first=i.__key,o.__prev=null}else r.__first=null;else{const o=s.getWritable();if(i!==null){const l=i.getWritable();l.__prev=o.__key,o.__next=l.__key}else o.__next=null;t.__prev=null}if(i===null)if(s!==null){const o=s.getWritable();r.__last=s.__key,o.__next=null}else r.__last=null;else{const o=i.getWritable();if(s!==null){const l=s.getWritable();l.__next=o.__key,o.__prev=l.__key}else o.__prev=null;t.__next=null}r.__size--,t.__parent=null}}function qn(n){ia();const e=n.getLatest(),t=e.__parent,r=ot(),s=G(),i=r._nodeMap,o=s._dirtyElements;t!==null&&(function(a,u,c){let f=a;for(;f!==null;){if(c.has(f))return;const d=u.get(f);if(d===void 0)break;c.set(f,!1),f=d.__parent}})(t,i,o);const l=e.__key;s._dirtyType=Tl,T(n)?o.set(l,!0):s._dirtyLeaves.add(l)}function re(n){fe();const e=G(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=ee(t);r!==null&&r.getWritable()}if(n!==null){const r=ee(n);r!==null&&r.getWritable()}}}function Xe(){return vn()?null:G()._compositionKey}function ee(n,e){const t=(e||ot())._nodeMap.get(n);return t===void 0?null:t}function Il(n,e){const t=xr(n,G());return t!==void 0?ee(t,e):null}function xr(n,e){return n[`__lexicalKey_${e._key}`]}function Je(n,e){let t=n;for(;t!=null;){const r=Il(t,e);if(r!==null)return r;t=yn(t)}return null}function Ll(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function Mi(n){return n.read((()=>H().getTextContent()))}function H(){return Pl(ot())}function Pl(n){return n._nodeMap.get("root")}function J(n){fe();const e=ot();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function kt(n){const e=G(),t=(function(r,s){let i=r;for(;i!=null;){const o=xr(i,s);if(o!==void 0)return o;i=yn(i)}return null})(n,e);return t===null?n===e.getRootElement()?ee("root"):null:ee(t)}function zi(n,e){return e?n.getTextContentSize():0}function Ol(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function ci(n){const e=[];let t=n;for(;t!==null;)e.push(t),t=t._parentEditor;return e}function Rl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Dl(n){return n.nodeType===rt?n.nodeValue:null}function di(n,e,t){const r=Ee(e._window);if(r===null)return;const s=r.anchorNode;let{anchorOffset:i,focusOffset:o}=r;if(s!==null){let l=Dl(s);const a=Je(s);if(l!==null&&A(a)){if(l===_r&&t){const u=t.length;l=t,i=u,o=u}l!==null&&fi(a,l,i,o,n)}}}function fi(n,e,t,r,s){let i=n;if(i.isAttached()&&(s||!i.isDirty())){const o=i.isComposing();let l=e;(o||s)&&e[e.length-1]===_r&&(l=e.slice(0,-1));const a=i.getTextContent();if(s||l!==a){if(l===""){if(re(null),mr||pn||Ys)i.remove();else{const _=G();setTimeout((()=>{_.update((()=>{i.isAttached()&&i.remove()}))}),20)}return}const u=i.getParent(),c=Bt(),f=i.getTextContentSize(),d=Xe(),h=i.getKey();if(i.isToken()||d!==null&&h===d&&!o||N(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===n.__key&&c.anchor.offset===0&&!i.canInsertTextBefore()&&!o||c.focus.key===n.__key&&c.focus.offset===f&&!i.canInsertTextAfter()&&!o))return void i.markDirty();const p=$();if(!N(p)||t===null||r===null)return void i.setTextContent(l);
3if(p.setTextNodeRange(i,t,i,r),i.isSegmented()){const _=K(i.getTextContent());i.replace(_),i=_}i.setTextContent(l)}}}function Ac(n,e){if(e.isSegmented())return!0;if(!n.isCollapsed())return!1;const t=n.anchor.offset,r=e.getParentOrThrow(),s=e.isToken();return t===0?!e.canInsertTextBefore()||!r.canInsertTextBefore()&&!e.isComposing()||s||(function(i){const o=i.getPreviousSibling();return(A(o)||T(o)&&o.isInline())&&!o.canInsertTextAfter()})(e):t===e.getTextContentSize()&&(!e.canInsertTextAfter()||!r.canInsertTextAfter()&&!e.isComposing()||s)}function Bi(n){return n==="ArrowLeft"}function Ui(n){return n==="ArrowRight"}function Xt(n,e){return we?n:e}function Wi(n){return n==="Enter"}function Gt(n){return n==="Backspace"}function qt(n){return n==="Delete"}function ji(n,e,t){return n.toLowerCase()==="a"&&Xt(e,t)}function Fc(n){const e=H();if(N(n)){const t=n.anchor,r=n.focus,s=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(s.getKey(),0,"element"),r.set(s.getKey(),s.getChildrenSize(),"element"),Dt(n),n}{const t=e.select(0,e.getChildrenSize());return J(Dt(t)),t}}function It(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const s=n[e];if(typeof s=="string"){const i=Hn(s);return t[e]=i,i}return s}function gi(n,e,t,r,s){if(t.size===0)return;const i=r.__type,o=r.__key,l=e.get(i);l===void 0&&I(33,i);const a=l.klass;let u=n.get(a);u===void 0&&(u=new Map,n.set(a,u));const c=u.get(o),f=c==="destroyed"&&s==="created";(c===void 0||f)&&u.set(o,f?"updated":s)}function Ki(n,e,t){const r=n.getParent();let s=t,i=n;return r!==null&&(e&&t===0?(s=i.getIndexWithinParent(),i=r):e||t!==i.getChildrenSize()||(s=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(e?s-1:s)}function un(n,e){const t=n.offset;if(n.type==="element")return Ki(n.getNode(),e,t);{const r=n.getNode();if(e&&t===0||!e&&t===r.getTextContentSize()){const s=e?r.getPreviousSibling():r.getNextSibling();return s===null?Ki(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):s}}return null}function Ml(n){const e=vr(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function L(n,e,t){return aa(n,e,t)}function br(n){return!ae(n)&&!n.isLastChild()&&!n.isInline()}function Vn(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&I(75,e),t}function yn(n){const e=n.assignedSlot||n.parentElement;return gs(e)?e.host:e}function Lt(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function vr(n){const e=n._window;return e===null&&I(78),e}function $c(n){let e=n.getParentOrThrow();for(;e!==null;){if(de(e))return e;e=e.getParentOrThrow()}return e}function de(n){return ae(n)||T(n)&&n.isShadowRoot()}function xe(n){const e=G(),t=n.constructor.getType(),r=e._nodes.get(t);r===void 0&&I(200,n.constructor.name,t);const{replace:s,replaceWithKlass:i}=r;if(s!==null){const o=s(n),l=o.constructor;return i!==null?o instanceof i||I(201,i.name,i.getType(),l.name,l.getType(),n.constructor.name,t):o instanceof n.constructor&&l!==n.constructor||I(202,l.name,l.getType(),n.constructor.name,t),o.__key===n.__key&&I(203,n.constructor.name,t,l.name,l.getType()),o}return n}function jr(n,e){!ae(n.getParent())||T(e)||W(e)||I(99)}function Kr(n){return(W(n)||T(n)&&!n.canBeEmpty())&&!n.isInline()}function hi(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function Ic(n,e,t){let r=n._blockCursorElement;if(N(t)&&t.isCollapsed()&&t.anchor.type==="element"&&e.contains(document.activeElement)){const s=t.anchor,i=s.getNode(),o=s.offset;let l=!1,a=null;if(o===i.getChildrenSize())Kr(i.getChildAtIndex(o-1))&&(l=!0);else{const u=i.getChildAtIndex(o);if(u!==null&&Kr(u)){const c=u.getPreviousSibling();(c===null||Kr(c))&&(l=!0,a=n.getElementByKey(u.__key))}}if(l){const u=n.getElementByKey(i.__key);return r===null&&(n._blockCursorElement=r=(function(c){const f=c.theme,d=document.createElement("div");d.contentEditable="false",d.setAttribute("data-lexical-cursor","true");let h=f.blockCursor;if(h!==void 0){if(typeof h=="string"){const p=Hn(h);h=f.blockCursor=p}h!==void 0&&d.classList.add(...h)}return d})(n._config)),e.style.caretColor="transparent",void(a===null?u.appendChild(r):u.insertBefore(r,a))}}r!==null&&hi(r,n,e)}function Ee(n){return Fe?(n||window).getSelection():null}function zl(n){return se(n)&&n.tagName==="A"}function se(n){return Sr(n)&&n.nodeType===1}function Sr(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function gs(n){return Sr(n)&&n.nodeType===11}function hs(n){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function Zn(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 Ze(n){if(W(n)&&!n.isInline())return!0;
3if(!T(n)||de(n))return!1;const e=n.getFirstChild(),t=e===null||Re(e)||A(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function Vt(n,e){let t=n;for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}function Lc(){return G()}const Hi=new WeakMap,Pc=new Map;function Ji(n){if(!n._readOnly&&n.isEmpty())return Pc;n._readOnly||I(192);let e=Hi.get(n);return e||(e=(function(t){const r=new Map;for(const[s,i]of t._nodeMap){const o=i.__type;let l=r.get(o);l||(l=new Map,r.set(o,l)),l.set(s,i)}return r})(n),Hi.set(n,e)),e}function pi(n){const e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function mi(n,e){const t=(parseInt(n.style.paddingInlineStart,10)||0)/40;e.setIndent(t)}function Oc(n){return n.__lexicalUnmanaged===!0}function Bl(n,e,t,r,s,i){let o=n.getFirstChild();for(;o!==null;){const l=o.__key;o.__parent===e&&(T(o)&&Bl(o,l,t,r,s,i),t.has(l)||i.delete(l),s.push(l)),o=o.getNextSibling()}}let nt,ue,cn,Er,ps,ms,xt,ke,_s,dn,X="",le="",Ie=null,Ce="",We="",Ul=!1,fn=!1,On=null;function Yn(n,e){const t=xt.get(n);if(e!==null){const r=bs(n);r.parentNode===e&&e.removeChild(r)}if(ke.has(n)||ue._keyToDOMMap.delete(n),T(t)){const r=Qn(t,xt);ys(r,0,r.length-1,null)}t!==void 0&&gi(dn,cn,Er,t,"destroyed")}function ys(n,e,t,r){let s=e;for(;s<=t;++s){const i=n[s];i!==void 0&&Yn(i,r)}}function dt(n,e){n.setProperty("text-align",e)}const Rc="40px";function Wl(n,e){const t=nt.theme.indent;if(typeof t=="string"){const s=n.classList.contains(t);e>0&&!s?n.classList.add(t):e<1&&s&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||Rc;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function jl(n,e){const t=n.style;e===0?dt(t,""):e===Qs?dt(t,"left"):e===ei?dt(t,"center"):e===ti?dt(t,"right"):e===ni?dt(t,"justify"):e===ri?dt(t,"start"):e===si&&dt(t,"end")}function Xn(n,e){const t=ke.get(n);t===void 0&&I(60);const r=t.createDOM(nt,ue);if((function(s,i,o){const l=o._keyToDOMMap;(function(a,u,c){a[`__lexicalKey_${u._key}`]=c})(i,o,s),l.set(s,i)})(n,r,ue),A(t)?r.setAttribute("data-lexical-text","true"):W(t)&&r.setAttribute("data-lexical-decorator","true"),T(t)){const s=t.__indent,i=t.__size;if(s!==0&&Wl(r,s),i!==0){const l=i-1;(function(a,u,c,f){const d=le;le="",xs(a,c,0,u,c.getDOMSlot(f)),Hl(c,f),le=d})(Qn(t,ke),l,t,r)}const o=t.__format;o!==0&&jl(r,o),t.isInline()||Kl(null,t,r),br(t)&&(X+=He,We+=He)}else{const s=t.getTextContent();if(W(t)){const i=t.decorate(ue,nt);i!==null&&Jl(n,i),r.contentEditable="false"}else A(t)&&(t.isDirectionless()||(le+=s));X+=s,We+=s}return e!==null&&e.insertChild(r),gi(dn,cn,Er,t,"created"),r}function xs(n,e,t,r,s){const i=X;X="";let o=t;for(;o<=r;++o){Xn(n[o],s);const l=ke.get(n[o]);l!==null&&A(l)&&(Ie===null&&(Ie=l.getFormat()),Ce===""&&(Ce=l.getStyle()))}br(e)&&(X+=He),s.element.__lexicalTextContent=X,X=i+X}function Gi(n,e){if(n){const t=n.__last;if(t){const r=e.get(t);if(r)return Re(r)?"line-break":W(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Kl(n,e,t){const r=Gi(n,xt),s=Gi(e,ke);r!==s&&e.getDOMSlot(t).setManagedLineBreak(s)}function Hl(n,e){const t=e.__lexicalDirTextContent||"",r=e.__lexicalDir||"";if(t!==le||r!==On){const i=le==="",o=i?On:(s=le,gc.test(s)?"rtl":hc.test(s)?"ltr":null);if(o!==r){const l=e.classList,a=nt.theme;let u=r!==null?a[r]:void 0,c=o!==null?a[o]:void 0;if(u!==void 0){if(typeof u=="string"){const f=Hn(u);u=a[r]=f}l.remove(...u)}if(o===null||i&&o==="ltr")e.removeAttribute("dir");else{if(c!==void 0){if(typeof c=="string"){const f=Hn(c);c=a[o]=f}c!==void 0&&l.add(...c)}e.dir=o}fn||(n.getWritable().__dir=o)}On=o,e.__lexicalDirTextContent=le,e.__lexicalDir=o}var s}function Dc(n,e,t){const r=le;var s;le="",Ie=null,Ce="",(function(i,o,l){const a=X,u=i.__size,c=o.__size;X="";const f=l.element;if(u===1&&c===1){const d=i.__first,h=o.__first;if(d===h)Qt(d,f);else{const _=bs(d),m=Xn(h,null);try{f.replaceChild(m,_)}catch(x){if(typeof x=="object"&&x!=null){const g=`${x.toString()} Parent: ${f.tagName}, new child: {tag: ${m.tagName} key: ${h}}, old child: {tag: ${_.tagName}, key: ${d}}.`;throw new Error(g)}throw x}Yn(d,null)}const p=ke.get(h);A(p)&&(Ie===null&&(Ie=p.getFormat()),Ce===""&&(Ce=p.getStyle()))}else{const d=Qn(i,xt),h=Qn(o,ke);
3if(d.length!==u&&I(227),h.length!==c&&I(228),u===0)c!==0&&xs(h,o,0,c-1,l);else if(c===0){if(u!==0){const p=l.after==null&&l.before==null&&l.element.__lexicalLineBreak==null;ys(d,0,u-1,p?null:f),p&&(f.textContent="")}}else(function(p,_,m,x,g,y){const b=x-1,S=g-1;let v,E,w=y.getFirstChild(),C=0,P=0;for(;C<=b&&P<=S;){const R=_[C],j=m[P];if(R===j)w=Hr(Qt(j,y.element)),C++,P++;else{v===void 0&&(v=new Set(_)),E===void 0&&(E=new Set(m));const ve=E.has(R),Q=v.has(j);if(ve)if(Q){const V=Vn(ue,j);V===w?w=Hr(Qt(j,y.element)):(y.withBefore(w).insertChild(V),Qt(j,y.element)),C++,P++}else Xn(j,y.withBefore(w)),P++;else w=Hr(bs(R)),Yn(R,y.element),C++}const B=ke.get(j);B!==null&&A(B)&&(Ie===null&&(Ie=B.getFormat()),Ce===""&&(Ce=B.getStyle()))}const O=C>b,M=P>S;if(O&&!M){const R=m[S+1],j=R===void 0?null:ue.getElementByKey(R);xs(m,p,P,S,y.withBefore(j))}else M&&!O&&ys(_,C,b,y.element)})(o,d,h,u,c,l)}br(o)&&(X+=He),f.__lexicalTextContent=X,X=a+X})(n,e,e.getDOMSlot(t)),Hl(e,t),bt(s=e)&&Ie!=null&&Ie!==s.__textFormat&&!fn&&(s.setTextFormat(Ie),s.setTextStyle(Ce)),(function(i){bt(i)&&Ce!==""&&Ce!==i.__textStyle&&!fn&&i.setTextStyle(Ce)})(e),le=r}function Qn(n,e){const t=[];let r=n.__first;for(;r!==null;){const s=e.get(r);s===void 0&&I(101),t.push(r),r=s.__next}return t}function Qt(n,e){const t=xt.get(n);let r=ke.get(n);t!==void 0&&r!==void 0||I(61);const s=Ul||ms.has(n)||ps.has(n),i=Vn(ue,n);if(t===r&&!s){if(T(t)){const o=i.__lexicalTextContent;o!==void 0&&(X+=o,We+=o);const l=i.__lexicalDirTextContent;l!==void 0&&(le+=l)}else{const o=t.getTextContent();A(t)&&!t.isDirectionless()&&(le+=o),We+=o,X+=o}return i}if(t!==r&&s&&gi(dn,cn,Er,r,"updated"),r.updateDOM(t,i,nt)){const o=Xn(n,null);return e===null&&I(62),e.replaceChild(o,i),Yn(n,null),o}if(T(t)&&T(r)){const o=r.__indent;o!==t.__indent&&Wl(i,o);const l=r.__format;l!==t.__format&&jl(i,l),s&&(Dc(t,r,i),ae(r)||r.isInline()||Kl(t,r,i)),br(r)&&(X+=He,We+=He)}else{const o=r.getTextContent();if(W(r)){const l=r.decorate(ue,nt);l!==null&&Jl(n,l)}else A(r)&&!r.isDirectionless()&&(le+=o);X+=o,We+=o}if(!fn&&ae(r)&&r.__cachedText!==We){const o=r.getWritable();o.__cachedText=We,r=o}return i}function Jl(n,e){let t=ue._pendingDecorators;const r=ue._decorators;if(t===null){if(r[n]===e)return;t=Ll(ue)}t[n]=e}function Hr(n){let e=n.nextSibling;return e!==null&&e===ue._blockCursorElement&&(e=e.nextSibling),e}function Mc(n,e,t,r,s,i){X="",We="",le="",Ul=r===Rt,On=null,ue=t,nt=t._config,cn=t._nodes,Er=ue._listeners.mutation,ps=s,ms=i,xt=n._nodeMap,ke=e._nodeMap,fn=e._readOnly,_s=new Map(t._keyToDOMMap);const o=new Map;return dn=o,Qt("root",null),ue=void 0,cn=void 0,ps=void 0,ms=void 0,xt=void 0,ke=void 0,nt=void 0,_s=void 0,dn=void 0,o}function bs(n){const e=_s.get(n);return e===void 0&&I(75,n),e}const Ue=Object.freeze({}),vs=30,Ss=[["keydown",function(n,e){if(tn=n.timeStamp,Gl=n.key,e.isComposing())return;const{key:t,shiftKey:r,ctrlKey:s,metaKey:i,altKey:o}=n;if(!L(e,Zu,n)&&t!=null){if((function(l,a,u,c){return Ui(l)&&!a&&!c&&!u})(t,s,o,i))L(e,xl,n);else if((function(l,a,u,c,f){return Ui(l)&&!c&&!u&&(a||f)})(t,s,r,o,i))L(e,Yu,n);else if((function(l,a,u,c){return Bi(l)&&!a&&!c&&!u})(t,s,o,i))L(e,Hs,n);else if((function(l,a,u,c,f){return Bi(l)&&!c&&!u&&(a||f)})(t,s,r,o,i))L(e,Xu,n);else if((function(l,a,u){return(function(c){return c==="ArrowUp"})(l)&&!a&&!u})(t,s,i))L(e,dr,n);else if((function(l,a,u){return(function(c){return c==="ArrowDown"})(l)&&!a&&!u})(t,s,i))L(e,fr,n);else if((function(l,a){return Wi(l)&&a})(t,r))nn=!0,L(e,Ot,n);else if((function(l){return l===" "})(t))L(e,Js,n);else if((function(l,a){return we&&a&&l.toLowerCase()==="o"})(t,s))n.preventDefault(),nn=!0,L(e,Ft,!0);else if((function(l,a){return Wi(l)&&!a})(t,r))nn=!1,L(e,Ot,n);else if((function(l,a,u,c){return we?!a&&!u&&(Gt(l)||l.toLowerCase()==="h"&&c):!(c||a||u)&&Gt(l)})(t,o,i,s))Gt(t)?L(e,Gs,n):(n.preventDefault(),L(e,pt,!0));else if((function(l){return l==="Escape"})(t))L(e,gr,n);else if((function(l,a,u,c,f){return we?!(u||c||f)&&(qt(l)||l.toLowerCase()==="d"&&a):!(a||c||f)&&qt(l)})(t,s,r,o,i))qt(t)?L(e,qs,n):(n.preventDefault(),L(e,pt,!1));else if((function(l,a,u){return Gt(l)&&(we?a:u)})(t,o,s))n.preventDefault(),L(e,ln,!0);else if((function(l,a,u){return qt(l)&&(we?a:u)})(t,o,s))n.preventDefault(),L(e,ln,!1);else if((function(l,a){return we&&a&&Gt(l)})(t,i))n.preventDefault(),L(e,an,!0);else if((function(l,a){return we&&a&&qt(l)})(t,i))n.preventDefault(),L(e,an,!1);else if((function(l,a,u,c){return l.toLowerCase()==="b"&&!a&&Xt(u,c)})(t,o,i,s))n.preventDefault(),L(e,je,"bold");else if((function(l,a,u,c){return l.toLowerCase()==="u"&&!a&&Xt(u,c)})(t,o,i,s))n.preventDefault(),L(e,je,"underline");else if((function(l,a,u,c){return l.toLowerCase()==="i"&&!a&&Xt(u,c)})(t,o,i,s))n.preventDefault(),L(e,je,"italic");else if((function(l,a,u,c){return l==="Tab"&&!a&&!u&&!c})(t,o,s,i))L(e,hr,n);else if((function(l,a,u,c){return l.toLowerCase()==="z"&&!a&&Xt(u,c)})(t,r,i,s))n.preventDefault(),L(e,js,void 0);else if((function(l,a,u,c){return we?l.toLowerCase()==="z"&&u&&a:l.toLowerCase()==="y"&&c||l.toLowerCase()==="z"&&c&&a})(t,r,i,s))n.preventDefault(),L(e,Ks,void 0);else{const l=e._editorState._selection;l===null||N(l)?!tt&&ji(t,i,s)&&(n.preventDefault(),L(e,ds,n)):(function(a,u,c,f){return!u&&a.toLowerCase()==="c"&&(we?c:f)})(t,r,i,s)?(n.preventDefault(),L(e,pr,n)):(function(a,u,c,f){return!u&&a.toLowerCase()==="x"&&(we?c:f)})(t,r,i,s)?(n.preventDefault(),L(e,Vs,n)):ji(t,i,s)&&(n.preventDefault(),L(e,ds,n))}(function(l,a,u,c){return l||a||u||c})(s,r,o,i)&&L(e,sc,n)}}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;Sr(t)&&r!=="touch"&&n.button===0&&Se(e,(()=>{W(Je(t))||(ws=!0)}))}],["compositionstart",function(n,e){Se(e,(()=>{const t=$();if(N(t)&&!e.isComposing()){const r=t.anchor,s=t.anchor.getNode();re(r.key),(n.timeStamp<tn+vs||r.type==="element"||!t.isCollapsed()||s.getFormat()!==t.format||A(s)&&s.getStyle()!==t.style)&&L(e,$t,fc)}}))}],["compositionend",function(n,e){tt?Zt=!0:Se(e,(()=>{Jr(e,n.data)}))}],["input",function(n,e){n.stopPropagation(),Se(e,(()=>{const t=$(),r=n.data,s=Yl(n);if(r!=null&&N(t)&&Zl(t,s,r,n.timeStamp,!1)){Zt&&(Jr(e,r),Zt=!1);const i=t.anchor.getNode(),o=Ee(e._window);if(o===null)return;const l=t.isBackward(),a=l?t.anchor.offset:t.focus.offset,u=l?t.focu
3s.offset:t.anchor.offset;Wn&&!t.isCollapsed()&&A(i)&&o.anchorNode!==null&&i.getTextContent().slice(0,a)+r+i.getTextContent().slice(a+u)===Dl(o.anchorNode)||L(e,$t,r);const c=r.length;tt&&c>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=c),mr||pn||Ys||!e.isComposing()||(tn=0,re(null))}else di(!1,e,r!==null?r:void 0),Zt&&(Jr(e,r||void 0),Zt=!1);fe(),Fl(G())})),Tt=null}],["click",function(n,e){Se(e,(()=>{const t=$(),r=Ee(e._window),s=Bt();if(r){if(N(t)){const i=t.anchor,o=i.getNode();i.type==="element"&&i.offset===0&&t.isCollapsed()&&!ae(o)&&H().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&s!==null&&t.is(s)?(r.removeAllRanges(),t.dirty=!0):n.detail===3&&!t.isCollapsed()&&o!==t.focus.getNode()&&(T(o)?o.select(0):o.getParentOrThrow().select(0))}else if(n.pointerType==="touch"){const i=r.anchorNode;if(i!==null){const o=i.nodeType;(o===mn||o===rt)&&J(xi(s,r,e,n))}}}L(e,Ws,n)}))}],["cut",Ue],["copy",Ue],["dragstart",Ue],["dragover",Ue],["dragend",Ue],["paste",Ue],["focus",Ue],["blur",Ue],["drop",Ue]];Wn&&Ss.push(["beforeinput",(n,e)=>(function(t,r){const s=t.inputType,i=Yl(t);s==="deleteCompositionText"||tt&&Ml(r)||s!=="insertCompositionText"&&Se(r,(()=>{const o=$();if(s==="deleteContentBackward"){if(o===null){const h=Bt();if(!N(h))return;J(h.clone())}if(N(o)){const h=o.anchor.key===o.focus.key;if(l=t.timeStamp,Gl==="MediaLast"&&l<tn+vs&&r.isComposing()&&h){if(re(null),tn=0,setTimeout((()=>{Se(r,(()=>{re(null)}))}),vs),N(o)){const p=o.anchor.getNode();p.markDirty(),o.format=p.getFormat(),A(p)||I(142),o.style=p.getStyle()}}else{re(null),t.preventDefault();const p=o.anchor.getNode(),_=p.getTextContent(),m=p.canInsertTextAfter(),x=o.anchor.offset===0&&o.focus.offset===_.length;lc&&h&&!x&&m||L(r,pt,!0)}return}}var l;if(!N(o))return;const a=t.data;Tt!==null&&di(!1,r,Tt),o.dirty&&Tt===null||!o.isCollapsed()||ae(o.anchor.getNode())||i===null||o.applyDOMRange(i),Tt=null;const u=o.anchor,c=o.focus,f=u.getNode(),d=c.getNode();if(s!=="insertText"&&s!=="insertTranspose")switch(t.preventDefault(),s){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":L(r,$t,t);break;case"insertFromComposition":re(null),L(r,$t,t);break;case"insertLineBreak":re(null),L(r,Ft,!1);break;case"insertParagraph":re(null),nn&&!pn?(nn=!1,L(r,Ft,!1)):L(r,on,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":L(r,cr,t);break;case"deleteByComposition":(function(h,p){return h!==p||T(h)||T(p)||!h.isToken()||!p.isToken()})(f,d)&&L(r,us,t);break;case"deleteByDrag":case"deleteByCut":L(r,us,t);break;case"deleteContent":L(r,pt,!1);break;case"deleteWordBackward":L(r,ln,!0);break;
3case"deleteWordForward":L(r,ln,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":L(r,an,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":L(r,an,!1);break;case"formatStrikeThrough":L(r,je,"strikethrough");break;case"formatBold":L(r,je,"bold");break;case"formatItalic":L(r,je,"italic");break;case"formatUnderline":L(r,je,"underline");break;case"historyUndo":L(r,js,void 0);break;case"historyRedo":L(r,Ks,void 0)}else{if(a===`
4`)t.preventDefault(),L(r,Ft,!1);else if(a===He)t.preventDefault(),L(r,on,void 0);else if(a==null&&t.dataTransfer){const h=t.dataTransfer.getData("text/plain");t.preventDefault(),o.insertRawText(h)}else a!=null&&Zl(o,i,a,t.timeStamp,!0)?(t.preventDefault(),L(r,$t,a)):Tt=a;ql=t.timeStamp}}))})(n,e)]);let tn=0,Gl=null,ql=0,Tt=null;const er=new WeakMap;let Es=!1,ws=!1,nn=!1,Zt=!1,Vl=[0,"",0,"root",0];function Zl(n,e,t,r,s){const i=n.anchor,o=n.focus,l=i.getNode(),a=G(),u=Ee(a._window),c=u!==null?u.anchorNode:null,f=i.key,d=a.getElementByKey(f),h=t.length;return f!==o.key||!A(l)||(!s&&(!Wn||ql<r+50)||l.isDirty()&&h<2||Ol(t))&&i.offset!==o.offset&&!l.isComposing()||ft(l)||l.isDirty()&&h>1||(s||!Wn)&&d!==null&&!l.isComposing()&&c!==Jn(d)||u!==null&&e!==null&&(!e.collapsed||e.startContainer!==u.anchorNode||e.startOffset!==u.anchorOffset)||l.getFormat()!==n.format||l.getStyle()!==n.style||Ac(n,l)}function qi(n,e){return n!==null&&n.nodeValue!==null&&n.nodeType===rt&&e!==0&&e!==n.nodeValue.length}function Vi(n,e,t){const{anchorNode:r,anchorOffset:s,focusNode:i,focusOffset:o}=n;Es&&(Es=!1,qi(r,s)&&qi(i,o))||Se(e,(()=>{if(!t)return void J(null);if(!_n(e,r,i))return;const l=$();if(N(l)){const a=l.anchor,u=a.getNode();if(l.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(l.dirty=!0);const c=vr(e).event,f=c?c.timeStamp:performance.now(),[d,h,p,_,m]=Vl,x=H(),g=e.isComposing()===!1&&x.getTextContent()==="";if(f<m+200&&a.offset===p&&a.key===_)l.format=d,l.style=h;else if(a.type==="text")A(u)||I(141),l.format=u.getFormat(),l.style=u.getStyle();else if(a.type==="element"&&!g){const y=a.getNode();l.style="",y instanceof Ut&&y.getChildrenSize()===0?(l.format=y.getTextFormat(),l.style=y.getTextStyle()):l.format=0}}else{const c=a.key,f=l.focus.key,d=l.getNodes(),h=d.length,p=l.isBackward(),_=p?o:s,m=p?s:o,x=p?f:c,g=p?c:f;let y=dc,b=!1;for(let S=0;S<h;S++){const v=d[S],E=v.getTextContentSize();if(A(v)&&E!==0&&!(S===0&&v.__key===x&&_===E||S===h-1&&v.__key===g&&m===0)&&(b=!0,y&=v.getFormat(),y===0))break}l.format=b?y:0}}L(e,hn,void 0)}))}function Yl(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Jr(n,e){const t=n._compositionKey;if(re(null),t!==null&&e!=null){if(e===""){const r=ee(t),s=Jn(n.getElementByKey(t));return void(s!==null&&s.nodeValue!==null&&A(r)&&fi(r,s.nodeValue,null,null,!0))}if(e[e.length-1]===`
5`){const r=$();if(N(r)){const s=r.focus;return r.anchor.set(s.key,s.offset,s.type),void L(n,Ot,null)}}}di(!0,n,e)}function Xl(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const Pt=new Map;function Ql(n){const e=n.target,t=Ee(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(t===null)return;const r=ai(t.anchorNode);if(r===null)return;ws&&(ws=!1,Se(r,(()=>{const u=Bt(),c=t.anchorNode;if(c===null)return;const f=c.nodeType;f!==mn&&f!==rt||J(xi(u,t,r,n))})));const s=ci(r),i=s[s.length-1],o=i._key,l=Pt.get(o),a=l||i;a!==r&&Vi(t,a,!1),Vi(t,r,!0),r!==i?Pt.set(o,r):l&&Pt.delete(o)}function Zi(n){n._lexicalHandled=!0}function Yi(n){return n._lexicalHandled===!0}function zc(n){const e=n.ownerDocument,t=er.get(e);t===void 0&&I(162);const r=t-1;r>=0||I(164),er.set(e,r),r===0&&e.removeEventListener("selectionchange",Ql);const s=yr(n);li(s)?((function(o){if(o._parentEditor!==null){const l=ci(o),a=l[l.length-1]._key;Pt.get(a)===o&&Pt.delete(a)}else Pt.delete(o._key)})(s),n.__lexicalEditor=null):s&&I(198);const i=Xl(n);for(let o=0;o<i.length;o++)i[o]();n.__lexicalEventHandles=[]}function Cs(n,e,t){fe();const r=n.__key,s=n.getParent();if(s===null)return;const i=(function(l){const a=$();if(!N(a)||!T(l))return a;const{anchor:u,focus:c}=a,f=u.getNode(),d=c.getNode();return Lt(f,l)&&u.set(l.__key,0,"element"),Lt(d,l)&&c.set(l.__key,0,"element"),a})(n);let o=!1;
5if(N(i)&&e){const l=i.anchor,a=i.focus;l.key===r&&(rr(l,n,s,n.getPreviousSibling(),n.getNextSibling()),o=!0),a.key===r&&(rr(a,n,s,n.getPreviousSibling(),n.getNextSibling()),o=!0)}else oe(i)&&e&&n.isSelected()&&n.selectPrevious();if(N(i)&&e&&!o){const l=n.getIndexWithinParent();mt(n),nr(i,s,l,-1)}else mt(n);t||de(s)||s.canBeEmpty()||!s.isEmpty()||Cs(s,e),e&&ae(s)&&s.isEmpty()&&s.selectEnd()}class wr{static getType(){I(64,this.name)}static clone(e){I(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Nc(this,e)}getType(){return this.__type}isInline(){I(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=ee(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){const t=e||$();if(t==null)return!1;const r=t.getNodes().some((s=>s.__key===this.__key));if(A(this))return r;if(N(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const s=this.getParent();if(W(this)&&this.isInline()&&s){const i=t.isBackward()?t.focus:t.anchor,o=i.getNode();if(i.offset===o.getChildrenSize()&&o.is(s)&&o.getLastChildOrThrow().is(this))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:ee(e)}getParentOrThrow(){const e=this.getParent();return e===null&&I(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(de(t))return T(e)||e===this&&W(e)||I(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&I(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:ee(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:ee(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),r=e.getParents();T(this)&&t.unshift(this),T(e)&&r.unshift(e);const s=t.length,i=r.length;if(s===0||i===0||t[s-1]!==r[i-1])return null;const o=new Set(r);for(let l=0;l<s;l++){const a=t[l];if(o.has(a))return a}return null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let r=0,s=0,i=this;for(;;){const o=i.getParentOrThrow();if(o===t){r=i.getIndexWithinParent();break}i=o}for(i=e;;){const o=i.getParentOrThrow();if(o===t){s=i.getIndexWithinParent();break}i=o}return r<s}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let r=e;for(;r!==null;){if(r.__key===t)return!0;r=r.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),r=[],s=new Set;let i=this;for(;i!==null;){const o=i.__key;if(s.has(o)||(s.add(o),r.push(i)),i===e)break;const l=T(i)?t?i.getFirstChild():i.getLastChild():null;if(l!==null){i=l;continue}const a=t?i.getNextSibling():i.getPreviousSibling();if(a!==null){i=a;continue}const u=i.getParentOrThrow();if(s.has(u.__key)||r.push(u),u===e)break;let c=null,f=u;do{if(f===null&&I(68),c=t?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;c!==null||s.has(f.__key)||r.push(f)}while(c===null);i=c}return t||r.reverse(),r}isDirty(){const e=G()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){const e=ee(this.__key);return e===null&&I(113),e}getWritable(){fe();const e=ot(),t=G(),r=e._nodeMap,s=this.__key,i=this.getLatest(),o=t._cloneNotNeeded,l=$();
5if(l!==null&&l.setCachedNodes(null),o.has(s))return qn(i),i;const a=pi(i);return o.add(s),qn(a),r.set(s,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){I(70)}updateDOM(e,t,r){I(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){return{type:this.__type,version:1}}static importJSON(e){I(18,this.name)}static transform(){return null}remove(e){Cs(this,!0,e)}replace(e,t){fe();let r=$();r!==null&&(r=r.clone()),jr(this,e);const s=this.getLatest(),i=this.__key,o=e.__key,l=e.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size;mt(l);const c=s.getPreviousSibling(),f=s.getNextSibling(),d=s.__prev,h=s.__next,p=s.__parent;if(Cs(s,!1,!0),c===null?a.__first=o:c.getWritable().__next=o,l.__prev=d,f===null?a.__last=o:f.getWritable().__prev=o,l.__next=h,l.__parent=p,a.__size=u,t&&(T(this)&&T(l)||I(139),this.getChildren().forEach((_=>{l.append(_)}))),N(r)){J(r);const _=r.anchor,m=r.focus;_.key===i&&to(_,l),m.key===i&&to(m,l)}return Xe()===i&&re(o),l}insertAfter(e,t=!0){fe(),jr(this,e);const r=this.getWritable(),s=e.getWritable(),i=s.getParent(),o=$();let l=!1,a=!1;if(i!==null){const h=e.getIndexWithinParent();if(mt(s),N(o)){const p=i.__key,_=o.anchor,m=o.focus;l=_.type==="element"&&_.key===p&&_.offset===h+1,a=m.type==="element"&&m.key===p&&m.offset===h+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),f=s.__key,d=r.__next;if(u===null?c.__last=f:u.getWritable().__prev=f,c.__size++,r.__next=f,s.__next=d,s.__prev=r.__key,s.__parent=r.__parent,t&&N(o)){const h=this.getIndexWithinParent();nr(o,c,h+1);const p=c.__key;l&&o.anchor.set(p,h+2,"element"),a&&o.focus.set(p,h+2,"element")}return e}insertBefore(e,t=!0){fe(),jr(this,e);const r=this.getWritable(),s=e.getWritable(),i=s.__key;mt(s);const o=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();o===null?l.__first=i:o.getWritable().__next=i,l.__size++,r.__prev=i,s.__prev=a,s.__next=r.__key,s.__parent=r.__parent;const c=$();return t&&N(c)&&nr(c,this.getParentOrThrow(),u),e}isParentRequired(){return!1}createParentElementNode(){return q()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){fe();const r=this.getPreviousSibling(),s=this.getParentOrThrow();if(r===null)return s.select(0,0);if(T(r))return r.select();if(!A(r)){const i=r.getIndexWithinParent()+1;return s.select(i,i)}return r.select(e,t)}selectNext(e,t){fe();const r=this.getNextSibling(),s=this.getParentOrThrow();if(r===null)return s.select();if(T(r))return r.select(0,0);if(!A(r)){const i=r.getIndexWithinParent();return s.select(i,i)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}class xn extends wr{static getType(){return"linebreak"}static clone(e){return new xn(e.__key)}constructor(e){super(e)}getTextContent(){return`
6`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>(function(t){const r=t.parentElement;if(r!==null&&Zn(r)){const s=r.firstChild;if(s===t||s.nextSibling===t&&Nn(s)){const i=r.lastChild;if(i===t||i.previousSibling===t&&Nn(i))return!0}}return!1})(e)||(function(t){const r=t.parentElement;if(r!==null&&Zn(r)){const s=r.firstChild;if(s===t||s.nextSibling===t&&Nn(s))return!1;const i=r.lastChild;if(i===t||i.previousSibling===t&&Nn(i))return!0}return!1})(e)?null:{conversion:Bc,priority:0}}}static importJSON(e){return Ne()}}function Bc(n){return{node:Ne()}}function Ne(){return xe(new xn)}function Re(n){return n instanceof xn}function Nn(n){return n.nodeType===rt&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function Gr(n,e){return 16&e?"code":e&Xs?"mark":32&e?"sub":64&e?"sup":null}function qr(n,e){return 1&e?"strong":2&e?"em":"span"}function ea(n,e,t,r,s){const i=r.classList;let o=It(s,"base");o!==void 0&&i.add(...o),o=It(s,"underlineStrikethrough");let l=!1;const a=e&Kn&&e&jn;o!==void 0&&(t&Kn&&t&jn?(l=!0,a||i.add(...o)):a&&i.remove(...o));for(const u in yt){const c=yt[u];if(o=It(s,u),o!==void 0)if(t&c){if(l&&(u==="underline"||u==="strikethrough")){e&c&&i.remove(...o);continue}e&c&&(!a||u!=="underline")&&u!=="strikethrough"||i.add(...o)}else e&c&&i.remove(...o)}}function ta(n,e,t){const r=e.firstChild,s=t.isComposing(),i=n+(s?_r:"");
6if(r==null)e.textContent=i;else{const o=r.nodeValue;if(o!==i)if(s||tt){const[l,a,u]=(function(c,f){const d=c.length,h=f.length;let p=0,_=0;for(;p<d&&p<h&&c[p]===f[p];)p++;for(;_+p<d&&_+p<h&&c[d-_-1]===f[h-_-1];)_++;return[p,d-p-_,f.slice(p,h-_)]})(o,i);a!==0&&r.deleteData(l,a),r.insertData(l,u)}else r.nodeValue=i}}function Xi(n,e,t,r,s,i){ta(s,n,e);const o=i.theme.text;o!==void 0&&ea(0,0,r,n,o)}function An(n,e){const t=document.createElement(e);return t.appendChild(n),t}class st extends wr{static getType(){return"text"}static clone(e){return new st(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),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 yc[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Xe()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=yt[e];return!!(this.getFormat()&t)}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}createDOM(e,t){const r=this.__format,s=Gr(0,r),i=qr(0,r),o=s===null?i:s,l=document.createElement(o);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),s!==null&&(a=document.createElement(i),l.appendChild(a)),Xi(a,this,0,r,this.__text,e);const u=this.__style;return u!==""&&(l.style.cssText=u),l}updateDOM(e,t,r){const s=this.__text,i=e.__format,o=this.__format,l=Gr(0,i),a=Gr(0,o),u=qr(0,i),c=qr(0,o);if((l===null?u:l)!==(a===null?c:a))return!0;if(l===a&&u!==c){const _=t.firstChild;_==null&&I(48);const m=document.createElement(c);return Xi(m,this,0,o,s,r),t.replaceChild(m,_),!1}let f=t;a!==null&&l!==null&&(f=t.firstChild,f==null&&I(49)),ta(s,f,this);const d=r.theme.text;d!==void 0&&i!==o&&ea(0,i,o,f,d);const h=e.__style,p=this.__style;return h!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:Kc,priority:0}),b:()=>({conversion:Wc,priority:0}),code:()=>({conversion:qe,priority:0}),em:()=>({conversion:qe,priority:0}),i:()=>({conversion:qe,priority:0}),s:()=>({conversion:qe,priority:0}),span:()=>({conversion:Uc,priority:0}),strong:()=>({conversion:qe,priority:0}),sub:()=>({conversion:qe,priority:0}),sup:()=>({conversion:qe,priority:0}),u:()=>({conversion:qe,priority:0})}}static importJSON(e){const t=K(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){let{element:t}=super.exportDOM(e);return se(t)||I(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=An(t,"b")),this.hasFormat("italic")&&(t=An(t,"i")),this.hasFormat("strikethrough")&&(t=An(t,"s")),this.hasFormat("underline")&&(t=An(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"?yt[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail=typeof e=="string"?pc[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=_c[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){fe();let r=e,s=t;const i=$(),o=this.getTextContent(),l=this.__key;if(typeof o=="string"){const a=o.length;r===void 0&&(r=a),s===void 0&&(s=a)}else r=0,s=0;if(!N(i))return sa(l,r,l,s,"text","text");{const a=Xe();a!==i.anchor.key&&a!==i.focus.key||re(l),i.setTextNodeRange(this,r,this,s)}return i}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,s){const i=this.getWritable(),o=i.__text,l=r.length;let a=e;a<0&&(a=l+a,a<0&&(a=0));const u=$();if(s&&N(u)){const f=e+l;u.setTextNodeRange(i,f,i,f)}const c=o.slice(0,a)+r+o.slice(a+t);return i.__text=c,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){fe();const t=this.getLatest(),r=t.getTextContent(),s=t.__key,i=Xe(),o=new Set(e),l=[],a=r.length;let u="";for(let S=0;S<a;S++)u!==""&&o.has(S)&&(l.push(u),u=""),u+=r[S];u!==""&&l.push(u);const c=l.length;if(c===0)return[];if(l[0]===r)return[t];const f=l[0],d=t.getParent();let h;const p=t.getFormat(),_=t.getStyle(),m=t.__detail;let x=!1;t.isSegmented()?(h=K(f),h.__format=p,h.__style=_,h.__detail=m,x=!0):(h=t.getWritable(),h.__text=f);const g=$(),y=[h];let b=f.length;for(let S=1;S<c;S++){const v=l[S],E=v.length,w=K(v).getWritable();w.__format=p,w.__style=_,w.__detail=m;const C=w.__key,P=b+E;if(N(g)){const O=g.anchor,M=g.focus;O.key===s&&O.type==="text"&&O.offset>b&&O.offset<=P&&(O.key=C,O.offset-=b,g.dirty=!0),M.key===s&&M.type==="text"&&M.offset>b&&M.offset<=P&&(M.key=C,M.offset-=b,g.dirty=!0)}i===s&&re(C),b=P,y.push(w)}if(d!==null){(function(E){const w=E.getPreviousSibling(),C=E.getNextSibling();w!==null&&qn(w),C!==null&&qn(C)})(this);const S=d.getWritable(),v=this.getIndexWithinParent();x?(S.splice(v,0,y),this.remove()):S.splice(v,1,y),N(g)&&nr(g,d,v,c-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||I(50);const r=this.__key,s=e.__key,i=this.__text,o=i.length;Xe()===s&&re(r);const l=$();if(N(l)){const f=l.anchor,d=l.focus;f!==null&&f.key===s&&(lo(f,t,r,e,o),l.dirty=!0),d!==null&&d.key===s&&(lo(d,t,r,e,o),l.dirty=!0)}const a=e.__text,u=t?a+i:i+a;this.setTextContent(u);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function Uc(n){return{forChild:_i(n.style),node:null}}function Wc(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:_i(e.style,t?void 0:"bold"),node:null}}const Qi=new WeakMap;function jc(n){return n.nodeName==="PRE"||n.nodeType===mn&&n.style!==void 0&&n.style.whiteSpace!==void 0&&n.style.whiteSpace.startsWith("pre")}function Kc(n){const e=n;n.parentElement===null&&I(129);let t=e.textContent||"";if((function(r){let s,i=r.parentNode;const o=[r];for(;i!==null&&(s=Qi.get(i))===void 0&&!jc(i);)o.push(i),i=i.parentNode;const l=s===void 0?i:s;for(let a=0;a<o.length;a++)Qi.set(o[a],l);return l})(e)!==null){const r=t.split(/(\r?\n|\t)/),s=[],i=r.length;for(let o=0;o<i;
6o++){const l=r[o];l===`
7`||l===`\r
8`?s.push(Ne()):l==="	"?s.push(zt()):l!==""&&s.push(K(l))}return{node:s}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,s=!0;for(;r!==null&&(r=eo(r,!1))!==null;){const i=r.textContent||"";if(i.length>0){/[ \t\n]$/.test(i)&&(t=t.slice(1)),s=!1;break}}s&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,s=!0;for(;r!==null&&(r=eo(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){s=!1;break}s&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:K(t)}}function eo(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const i=t.parentElement;if(i===null)return null;t=i}if(t=r,t.nodeType===mn){const i=t.style.display;if(i===""&&!hs(t)||i!==""&&!i.startsWith("inline"))return null}let s=t;for(;(s=e?t.firstChild:t.lastChild)!==null;)t=s;if(t.nodeType===rt)return t;if(t.nodeName==="BR")return null}}const Hc={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function qe(n){const e=Hc[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:_i(n.style,e),node:null}}function K(n=""){return xe(new st(n))}function A(n){return n instanceof st}function _i(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),s=t==="700"||t==="bold",i=r.includes("line-through"),o=n.fontStyle==="italic",l=r.includes("underline"),a=n.verticalAlign;return u=>(A(u)&&(s&&!u.hasFormat("bold")&&u.toggleFormat("bold"),i&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),o&&!u.hasFormat("italic")&&u.toggleFormat("italic"),l&&!u.hasFormat("underline")&&u.toggleFormat("underline"),a!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),a!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),e&&!u.hasFormat(e)&&u.toggleFormat(e)),u)}class bn extends st{static getType(){return"tab"}static clone(e){return new bn(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text}constructor(e){super("	",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),r=It(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}static importJSON(e){const t=zt();return t.setFormat(e.format),t.setStyle(e.style),t}setTextContent(e){I(126)}setDetail(e){I(127)}setMode(e){I(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function zt(){return xe(new bn)}function yi(n){return n instanceof bn}class Jc{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){let t=this.getNode(),r=e.getNode();const s=this.offset,i=e.offset;if(T(t)){const o=t.getDescendantByIndex(s);t=o??t}if(T(r)){const o=r.getDescendantByIndex(i);r=o??r}return t===r?s<i:t.isBefore(r)}getNode(){const e=ee(this.key);return e===null&&I(20),e}set(e,t,r){const s=this._selection,i=this.key;this.key=e,this.offset=t,this.type=r,vn()||(Xe()===i&&re(e),s!==null&&(s.setCachedNodes(null),s.dirty=!0))}}function De(n,e,t){return new Jc(n,e,t)}function Vr(n,e){let t=e.__key,r=n.offset,s="element";if(A(e)){s="text";const i=e.getTextContentSize();r>i&&(r=i)}else if(!T(e)){const i=e.getNextSibling();if(A(i))t=i.__key,r=0,s="text";else{const o=e.getParent();o&&(t=o.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,s)}function to(n,e){if(T(e)){const t=e.getLastDescendant();T(t)||A(t)?Vr(n,t):Vr(n,e)}else Vr(n,e)}function Ye(n,e,t,r){n.key=e,n.offset=t,n.type=r}class Cr{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!oe(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every((s=>r.has(s)))}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 Cr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),r=t.length,s=t[r-1];let i;if(A(s))i=s.select();else{const o=s.getIndexWithinParent()+1;i=s.getParentOrThrow().select(o,o)}i.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 s of t){const i=ee(s);i!==null&&r.push(i)}return vn()||(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}}function N(n){return n instanceof it}class it{constructor(e,t,r,s){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=r,this.style=s,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!N(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=this.anchor,r=this.focus,s=t.isBefore(r),i=s?t:r,o=s?r:t;let l=i.getNode(),a=o.getNode();const u=i.offset,c=o.offset;if(T(l)){const d=l.getDescendantByIndex(u);l=d??l}if(T(a)){let d=a.getDescendantByIndex(c);d!==null&&d!==l&&a.getChildAtIndex(c)===d&&(d=d.getPreviousSibling()),a=d??a}let f;return f=l.is(a)?T(l)&&l.getChildrenSize()>0?[]:[l]:l.getNodesBetween(a),vn()||(this._cachedNodes=f),f}setTextNodeRange(e,t,r,s){Ye(this.anchor,e.__key,t,"text"),Ye(this.focus,r.__key,s,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],s=this.anchor,i=this.focus,o=s.isBefore(i),[l,a]=Ts(this);let u="",c=!0;for(let f=0;f<e.length;f++){const d=e[f];if(T(d)&&!d.isInline())c||(u+=`
9`),c=!d.isEmpty();else if(c=!1,A(d)){let h=d.getTextContent();d===t?d===r?s.type==="element"&&i.type==="element"&&i.offset!==s.offset||(h=l<a?h.slice(l,a):h.slice(a,l)):h=o?h.slice(l):h.slice(a):d===r&&(h=o?h.slice(0,a):h.slice(0,l)),u+=h}else!W(d)&&!Re(d)||d===r&&this.isCollapsed()||(u+=d.getTextContent())}return u}applyDOMRange(e){const t=G(),r=t.getEditorState()._selection,s=ra(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(s===null)return;const[i,o]=s;Ye(this.anchor,i.key,i.offset,i.type),Ye(this.focus,o.key,o.offset,o.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new it(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}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=yt[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),r=[],s=t.length;for(let i=0;i<s;i++){const o=t[i];o===`
10`||o===`\r
11`?r.push(Ne()):o==="	"?r.push(zt()):r.push(K(o))}this.insertNodes(r)}insertText(e){const t=this.anchor,r=this.focus,s=this.format,i=this.style;let o=t,l=r;!this.isCollapsed()&&r.isBefore(t)&&(o=r,l=t),o.type==="element"&&(function(m,x,g,y){const b=m.getNode(),S=b.getChildAtIndex(m.offset),v=K(),E=ae(b)?q().append(v):v;v.setFormat(g),v.setStyle(y),S===null?b.append(E):S.insertBefore(E),m.is(x)&&x.set(v.__key,0,"text"),m.set(v.__key,0,"text")})(o,l,s,i);const a=o.offset;let u=l.offset;const c=this.getNodes(),f=c.length;let d=c[0];A(d)||I(26);const h=d.getTextContent().length,p=d.getParentOrThrow();let _=c[f-1];if(f===1&&l.type==="element"&&(u=h,l.set(o.key,u,"text")),this.isCollapsed()&&a===h&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&d.getNextSibling()===null)){let m=d.getNextSibling();if(A(m)&&m.canInsertTextBefore()&&!ft(m)||(m=K(),m.setFormat(s),m.setStyle(i),p.canInsertTextAfter()?d.insertAfter(m):p.insertAfter(m)),m.select(0,0),d=m,e!=="")return void this.insertText(e)}
11else if(this.isCollapsed()&&a===0&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&d.getPreviousSibling()===null)){let m=d.getPreviousSibling();if(A(m)&&!ft(m)||(m=K(),m.setFormat(s),p.canInsertTextBefore()?d.insertBefore(m):p.insertBefore(m)),m.select(),d=m,e!=="")return void this.insertText(e)}else if(d.isSegmented()&&a!==h){const m=K(d.getTextContent());m.setFormat(s),d.replace(m),d=m}else if(!this.isCollapsed()&&e!==""){const m=_.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||T(m)&&(!m.canInsertTextBefore()||!m.canInsertTextAfter()))return this.insertText(""),na(this.anchor,this.focus,null),void this.insertText(e)}if(f===1){if(d.isToken()){const y=K(e);return y.select(),void d.replace(y)}const m=d.getFormat(),x=d.getStyle();if(a!==u||m===s&&x===i){if(yi(d)){const y=K(e);return y.setFormat(s),y.setStyle(i),y.select(),void d.replace(y)}}else{if(d.getTextContent()!==""){const y=K(e);if(y.setFormat(s),y.setStyle(i),y.select(),a===0)d.insertBefore(y,!1);else{const[b]=d.splitText(a);b.insertAfter(y,!1)}return void(y.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}d.setFormat(s),d.setStyle(i)}const g=u-a;d=d.spliceText(a,g,e,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=m,this.style=x))}else{const m=new Set([...d.getParentKeys(),..._.getParentKeys()]),x=T(d)?d:d.getParentOrThrow();let g=T(_)?_:_.getParentOrThrow(),y=_;if(!x.is(g)&&g.isInline())do y=g,g=g.getParentOrThrow();while(g.isInline());if(l.type==="text"&&(u!==0||_.getTextContent()==="")||l.type==="element"&&_.getIndexWithinParent()<u)if(A(_)&&!_.isToken()&&u!==_.getTextContentSize()){if(_.isSegmented()){const w=K(_.getTextContent());_.replace(w),_=w}ae(l.getNode())||l.type!=="text"||(_=_.spliceText(0,u,"")),m.add(_.__key)}else{const w=_.getParentOrThrow();w.canBeEmpty()||w.getChildrenSize()!==1?_.remove():w.remove()}else m.add(_.__key);const b=g.getChildren(),S=new Set(c),v=x.is(g),E=x.isInline()&&d.getNextSibling()===null?x:d;for(let w=b.length-1;w>=0;w--){const C=b[w];if(C.is(d)||T(C)&&C.isParentOf(d))break;C.isAttached()&&(!S.has(C)||C.is(y)?v||E.insertAfter(C,!1):C.remove())}if(!v){let w=g,C=null;for(;w!==null;){const P=w.getChildren(),O=P.length;(O===0||P[O-1].is(C))&&(m.delete(w.__key),C=w),w=w.getParent()}}if(d.isToken())if(a===h)d.select();else{const w=K(e);w.select(),d.replace(w)}else d=d.spliceText(a,h-a,e,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let w=1;w<f;w++){const C=c[w],P=C.__key;m.has(P)||C.remove()}}}removeText(){if(this.isCollapsed())return;const{anchor:e,focus:t}=this,r=this.getNodes(),s=this.isBackward()?t:e,i=this.isBackward()?e:t;let o=s.getNode(),l=i.getNode();const a=Vt(o,Ze),u=Vt(l,Ze);A(o)&&o.isToken()&&s.offset<o.getTextContentSize()&&(s.offset=0),i.offset>0&&A(l)&&l.isToken()&&(i.offset=l.getTextContentSize()),r.forEach((f=>{Lt(o,f)||Lt(l,f)||f.getKey()===o.getKey()||f.getKey()===l.getKey()||f.remove()}));const c=(f,d)=>{if(f.getTextContent()==="")f.remove();else if(d!==0&&ft(f)){const h=K(f.getTextContent());return h.setFormat(f.getFormat()),h.setStyle(f.getStyle()),f.replace(h)}};if(o===l&&A(o)){const f=Math.abs(t.offset-e.offset);return o.spliceText(s.offset,f,"",!0),void c(o,f)}if(A(o)){const f=o.getTextContentSize()-s.offset;o.spliceText(s.offset,f,""),o=c(o,f)||o}A(l)&&(l.spliceText(0,i.offset,""),l=c(l,i.offset)||l),o.isAttached()&&A(o)?o.selectEnd():l.isAttached()&&A(l)&&l.selectStart(),T(a)&&T(u)&&a!==u&&(a.append(...u.getChildren()),u.remove(),i.set(s.key,s.offset,s.type))}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void re(null);const r=this.getNodes(),s=[];for(const b of r)A(b)&&s.push(b);const i=b=>{r.forEach((S=>{if(bt(S)){const v=S.getFormatFlags(e,b);S.setTextFormat(v)}}))},o=s.length;if(o===0)return this.toggleFormat(e),re(null),void i(t);const l=this.anchor,a=this.focus,u=this.isBackward(),c=u?a:l,f=u?l:a;let d=0,h=s[0],p=c.type==="element"?0:c.offset;if(c.type==="text"&&p===h.getTextContentSize()&&(d=1,h=s[1],p=0),h==null)return;const _=h.getFormatFlags(e,t);i(_);const m=o-1;let x=s[m];const g=f.type==="text"?f.offset:x.getTextContentSize();if(h.is(x)){if(p===g)return;if(ft(h)||p===0&&g===h.getTextContentSize())h.setFormat(_);else{const b=h.splitText(p,g),S=p===0?b[0]:b[1];
11S.setFormat(_),c.type==="text"&&c.set(S.__key,0,"text"),f.type==="text"&&f.set(S.__key,g-p,"text")}return void(this.format=_)}p===0||ft(h)||([,h]=h.splitText(p),p=0),h.setFormat(_);const y=x.getFormatFlags(e,_);g>0&&(g===x.getTextContentSize()||ft(x)||([x]=x.splitText(g)),x.setFormat(y));for(let b=d+1;b<m;b++){const S=s[b],v=S.getFormatFlags(e,y);S.setFormat(v)}c.type==="text"&&c.set(h.__key,p,"text"),f.type==="text"&&f.set(x.__key,g,"text"),this.format=_|y}insertNodes(e){if(e.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const p=$();return N(p)||I(134),p.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),r=Vt(t,Ze),s=e[e.length-1];if(T(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const p=Zr(this);r.splice(p,0,e),s.selectEnd()}return}if(!e.some((p=>(T(p)||W(p))&&!p.isInline()))){T(r)||I(211,t.constructor.name,t.getType());const p=Zr(this);return r.splice(p,0,e),void s.selectEnd()}const i=(function(p){const _=q();let m=null;for(let x=0;x<p.length;x++){const g=p[x],y=Re(g);if(y||W(g)&&g.isInline()||T(g)&&g.isInline()||A(g)||g.isParentRequired()){if(m===null&&(m=g.createParentElementNode(),_.append(m),y))continue;m!==null&&m.append(g)}else _.append(g),m=null}return _})(e),o=i.getLastDescendant(),l=i.getChildren(),a=!T(r)||!r.isEmpty()?this.insertParagraph():null,u=l[l.length-1];let c=l[0];var f;T(f=c)&&Ze(f)&&!f.isEmpty()&&T(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(T(r)||I(211,t.constructor.name,t.getType()),r.append(...c.getChildren()),c=l[1]),c&&(r===null&&I(212,t.constructor.name,t.getType()),(function(p,_,m){const x=_.getParentOrThrow().getLastChild();let g=_;const y=[_];for(;g!==x;)g.getNextSibling()||I(140),g=g.getNextSibling(),y.push(g);let b=p;for(const S of y)b=b.insertAfter(S)})(r,c));const d=Vt(o,Ze);a&&T(d)&&(a.canMergeWhenEmpty()||Ze(u))&&(d.append(...a.getChildren()),a.remove()),T(r)&&r.isEmpty()&&r.remove(),o.selectEnd();const h=T(r)?r.getLastChild():null;Re(h)&&d!==r&&h.remove()}insertParagraph(){if(this.anchor.key==="root"){const o=q();return H().splice(this.anchor.offset,0,[o]),o.select(),o}const e=Zr(this),t=Vt(this.anchor.getNode(),Ze);T(t)||I(213);const r=t.getChildAtIndex(e),s=r?[r,...r.getNextSiblings()]:[],i=t.insertNewAfter(this,!1);return i?(i.append(...s),i.selectStart(),i):null}insertLineBreak(e){const t=Ne();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),s=t.getIndexWithinParent();r.select(s,s)}}extract(){const e=this.getNodes(),t=e.length,r=t-1,s=this.anchor,i=this.focus;let o=e[0],l=e[r];const[a,u]=Ts(this);if(t===0)return[];if(t===1){if(A(o)&&!this.isCollapsed()){const f=a>u?u:a,d=a>u?a:u,h=o.splitText(f,d),p=f===0?h[0]:h[1];return p!=null?[p]:[]}return[o]}const c=s.isBefore(i);if(A(o)){const f=c?a:u;f===o.getTextContentSize()?e.shift():f!==0&&([,o]=o.splitText(f),e[0]=o)}if(A(l)){const f=l.getTextContent().length,d=c?u:a;d===0?e.pop():d!==f&&([l]=l.splitText(d),e[r]=l)}return e}modify(e,t,r){const s=this.focus,i=this.anchor,o=e==="move",l=un(s,t);if(W(l)&&!l.isIsolated()){if(o&&l.isKeyboardSelectable()){const h=ks();return h.add(l.__key),void J(h)}const d=t?l.getPreviousSibling():l.getNextSibling();if(A(d)){const h=d.__key,p=t?d.getTextContent().length:0;return s.set(h,p,"text"),void(o&&i.set(h,p,"text"))}{const h=l.getParentOrThrow();let p,_;return T(d)?(_=d.__key,p=t?d.getChildrenSize():0):(p=l.getIndexWithinParent(),_=h.__key,t||p++),s.set(_,p,"element"),void(o&&i.set(_,p,"element"))}}const a=G(),u=Ee(a._window);if(!u)return;const c=a._blockCursorElement,f=a._rootElement;if(f===null||c===null||!T(l)||l.isInline()||l.canBeEmpty()||hi(c,a,f),(function(d,h,p,_){d.modify(h,p,_)})(u,e,t?"backward":"forward",r),u.rangeCount>0){const d=u.getRangeAt(0),h=this.anchor.getNode(),p=ae(h)?h:$c(h);if(this.applyDOMRange(d),this.dirty=!0,!o){const _=this.getNodes(),m=[];let x=!1;for(let g=0;g<_.length;g++){const y=_[g];Lt(y,p)?m.push(y):x=!0}if(x&&m.length>0)if(t){const g=m[0];T(g)?g.selectStart():g.getParentOrThrow().selectStart()}else{const g=m[m.length-1];T(g)?g.selectEnd():g.getParentOrThrow().selectEnd()}u.anchorNode===d.startContainer&&u.anchorOffset===d.startOffset||(function(g){const y=g.focus,b=g.anchor,S=b.key,v=b.offset,E=b.type;Ye(b,y.key,y.offset,y.type),Ye(y,S,v,E),g._cachedNodes=null})(this)}}}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&T(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const s=t.getParent(),i=t.getNextSibling()||(s===null?null:s.getNextSibling());if(T(i)&&i.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let s=r.getNode();if(this.forwardDeletion(r,s,e))return;const i=this.focus,o=un(i,e);
11if(W(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&T(s)&&s.getChildrenSize()===0){s.remove();const l=ks();l.add(o.__key),J(l)}else o.remove(),G().dispatchCommand(hn,void 0);return}if(!e&&T(o)&&T(s)&&s.isEmpty())return s.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const l=i.type==="text"?i.getNode():null;if(s=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){const a=i.offset,u=l.getTextContentSize();if(l.is(s)||e&&a!==u||!e&&a!==0)return void ro(l,e,a)}else if(s!==null&&s.isSegmented()){const a=r.offset,u=s.getTextContentSize();if(s.is(l)||e&&a!==0||!e&&a!==u)return void ro(s,e,a)}(function(a,u){const c=a.anchor,f=a.focus,d=c.getNode(),h=f.getNode();if(d===h&&c.type==="text"&&f.type==="text"){const p=c.offset,_=f.offset,m=p<_,x=m?p:_,g=m?_:p,y=g-1;x!==y&&(Ol(d.getTextContent().slice(x,g))||(u?f.offset=y:c.offset=y))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&ae(r.getParent())&&r.getIndexWithinParent()===0&&r.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t=this.anchor.type==="element";if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),this.isCollapsed()&&this.anchor.offset===0&&this.modify("extend",e,"character"),t){const r=e?this.anchor:this.focus;r.set(r.key,r.offset+1,r.type)}}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.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function oe(n){return n instanceof Cr}function no(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function Ts(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]:[no(t),no(r)]}function ro(n,e,t){const r=n,s=r.getTextContent().split(/(?=\s)/g),i=s.length;let o=0,l=0;for(let u=0;u<i;u++){const c=u===i-1;if(l=o,o+=s[u].length,e&&o===t||o>t||c){s.splice(u,1),c&&(l=void 0);break}}const a=s.join("").trim();a===""?r.remove():(r.setTextContent(a),r.select(l,l))}function so(n,e,t,r){let s,i=e;if(n.nodeType===mn){let o=!1;const l=n.childNodes,a=l.length,u=r._blockCursorElement;i===a&&(o=!0,i=a-1);let c=l[i],f=!1;if(c===u)c=l[i+1],f=!0;else if(u!==null){const d=u.parentNode;n===d&&e>Array.prototype.indexOf.call(d.children,u)&&i--}if(s=kt(c),A(s))i=zi(s,o);else{let d=kt(n);if(d===null)return null;if(T(d)){const h=r.getElementByKey(d.getKey());h===null&&I(214),[d,i]=d.getDOMSlot(h).resolveChildIndex(d,h,n,e),T(d)||I(215),o&&i>=d.getChildrenSize()&&(i=Math.max(0,d.getChildrenSize()-1));let _=d.getChildAtIndex(i);if(T(_)&&(function(m,x,g){const y=m.getParent();return g===null||y===null||!y.canBeEmpty()||y!==g.getNode()})(_,0,t)){const m=o?_.getLastDescendant():_.getFirstDescendant();m===null?d=_:(_=m,d=T(_)?_:_.getParentOrThrow()),i=0}A(_)?(s=_,d=null,i=zi(_,o)):_!==d&&o&&!f&&(T(d)||I(216),i=Math.min(d.getChildrenSize(),i+1))}else{const h=d.getIndexWithinParent();i=e===0&&W(d)&&kt(n)===d?h:h+1,d=d.getParentOrThrow()}if(T(d))return De(d.__key,i,"element")}}else s=kt(n);return A(s)?De(s.__key,i,"text"):null}function io(n,e,t){const r=n.offset,s=n.getNode();if(r===0){const i=s.getPreviousSibling(),o=s.getParent();if(e){if((t||!e)&&i===null&&T(o)&&o.isInline()){const l=o.getPreviousSibling();A(l)&&(n.key=l.__key,n.offset=l.getTextContent().length)}}else T(i)&&!t&&i.isInline()?(n.key=i.__key,n.offset=i.getChildrenSize(),n.type="element"):A(i)&&(n.key=i.__key,n.offset=i.getTextContent().length)}else if(r===s.getTextContent().length){const i=s.getNextSibling(),o=s.getParent();if(e&&T(i)&&i.isInline())n.key=i.__key,n.offset=0,n.type="element";else if((t||e)&&i===null&&T(o)&&o.isInline()&&!o.canInsertTextAfter()){const l=o.getNextSibling();A(l)&&(n.key=l.__key,n.offset=0)}}}function na(n,e,t){if(n.type==="text"&&e.type==="text"){const r=n.isBefore(e),s=n.is(e);io(n,r,s),io(e,!r,s),s&&(e.key=n.key,e.offset=n.offset,e.type=n.type);const i=G();if(i.isComposing()&&i._compositionKey!==n.key&&N(t)){const o=t.anchor,l=t.focus;Ye(n,o.key,o.offset,o.type),Ye(e,l.key,l.offset,l.type)}}}function ra(n,e,t,r,s,i){if(n===null||t===null||!_n(s,n,t))return null;const o=so(n,e,N(i)?i.anchor:null,s);if(o===null)return null;
11const l=so(t,r,N(i)?i.focus:null,s);if(l===null)return null;if(o.type==="element"&&l.type==="element"){const a=kt(n),u=kt(t);if(W(a)&&W(u))return null}return na(o,l,i),[o,l]}function tr(n){return T(n)&&!n.isInline()}function sa(n,e,t,r,s,i){const o=ot(),l=new it(De(n,e,s),De(t,r,i),0,"");return l.dirty=!0,o._selection=l,l}function Tr(){const n=De("root",0,"element"),e=De("root",0,"element");return new it(n,e,0,"")}function ks(){return new Cr(new Set)}function xi(n,e,t,r){const s=t._window;if(s===null)return null;const i=r||s.event,o=i?i.type:void 0,l=o==="selectionchange",a=!fs&&(l||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&i&&i.detail===3||o==="drop"||o===void 0);let u,c,f,d;if(N(n)&&!a)return n.clone();if(e===null)return null;if(u=e.anchorNode,c=e.focusNode,f=e.anchorOffset,d=e.focusOffset,l&&N(n)&&!_n(t,u,c))return n.clone();const h=ra(u,f,c,d,t,n);if(h===null)return null;const[p,_]=h;return new it(p,_,N(n)?n.format:0,N(n)?n.style:"")}function $(){return ot()._selection}function Bt(){return G()._editorState._selection}function nr(n,e,t,r=1){const s=n.anchor,i=n.focus,o=s.getNode(),l=i.getNode();if(!e.is(o)&&!e.is(l))return;const a=e.__key;if(n.isCollapsed()){const u=s.offset;if(t<=u&&r>0||t<u&&r<0){const c=Math.max(0,u+r);s.set(a,c,"element"),i.set(a,c,"element"),oo(n)}}else{const u=n.isBackward(),c=u?i:s,f=c.getNode(),d=u?s:i,h=d.getNode();if(e.is(f)){const p=c.offset;(t<=p&&r>0||t<p&&r<0)&&c.set(a,Math.max(0,p+r),"element")}if(e.is(h)){const p=d.offset;(t<=p&&r>0||t<p&&r<0)&&d.set(a,Math.max(0,p+r),"element")}}oo(n)}function oo(n){const e=n.anchor,t=e.offset,r=n.focus,s=r.offset,i=e.getNode(),o=r.getNode();if(n.isCollapsed()){if(!T(i))return;const l=i.getChildrenSize(),a=t>=l,u=a?i.getChildAtIndex(l-1):i.getChildAtIndex(t);if(A(u)){let c=0;a&&(c=u.getTextContentSize()),e.set(u.__key,c,"text"),r.set(u.__key,c,"text")}}else{if(T(i)){const l=i.getChildrenSize(),a=t>=l,u=a?i.getChildAtIndex(l-1):i.getChildAtIndex(t);if(A(u)){let c=0;a&&(c=u.getTextContentSize()),e.set(u.__key,c,"text")}}if(T(o)){const l=o.getChildrenSize(),a=s>=l,u=a?o.getChildAtIndex(l-1):o.getChildAtIndex(s);if(A(u)){let c=0;a&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}}function rr(n,e,t,r,s){let i=null,o=0,l=null;r!==null?(i=r.__key,A(r)?(o=r.getTextContentSize(),l="text"):T(r)&&(o=r.getChildrenSize(),l="element")):s!==null&&(i=s.__key,A(s)?l="text":T(s)&&(l="element")),i!==null&&l!==null?n.set(i,o,l):(o=e.getIndexWithinParent(),o===-1&&(o=t.getChildrenSize()),n.set(t.__key,o,"element"))}function lo(n,e,t,r,s){n.type==="text"?(n.key=t,e||(n.offset+=s)):n.offset>r.getIndexWithinParent()&&(n.offset-=1)}function Gc(n,e,t,r,s,i,o){const l=r.anchorNode,a=r.focusNode,u=r.anchorOffset,c=r.focusOffset,f=document.activeElement;if(s.has("collaboration")&&f!==i||f!==null&&oi(f))return;if(!N(e))return void(n!==null&&_n(t,l,a)&&r.removeAllRanges());const d=e.anchor,h=e.focus,p=d.key,_=h.key,m=Vn(t,p),x=Vn(t,_),g=d.offset,y=h.offset,b=e.format,S=e.style,v=e.isCollapsed();let E=m,w=x,C=!1;if(d.type==="text"){E=Jn(m);const B=d.getNode();C=B.getFormat()!==b||B.getStyle()!==S}else N(n)&&n.anchor.type==="text"&&(C=!0);var P,O,M,R,j;if(h.type==="text"&&(w=Jn(x)),E!==null&&w!==null&&(v&&(n===null||C||N(n)&&(n.format!==b||n.style!==S))&&(P=b,O=S,M=g,R=p,j=performance.now(),Vl=[P,O,M,R,j]),u!==g||c!==y||l!==E||a!==w||r.type==="Range"&&v||(f!==null&&i.contains(f)||i.focus({preventScroll:!0}),d.type==="element"))){try{r.setBaseAndExtent(E,g,w,y)}catch{}if(!s.has("skip-scroll-into-view")&&e.isCollapsed()&&i!==null&&i===document.activeElement){const B=e instanceof it&&e.anchor.type==="element"?E.childNodes[g]||null:r.rangeCount>0?r.getRangeAt(0):null;if(B!==null){let ve;if(B instanceof Text){const Q=document.createRange();Q.selectNode(B),ve=Q.getBoundingClientRect()}else ve=B.getBoundingClientRect();(function(Q,V,pe){const ze=pe.ownerDocument,ut=ze.defaultView;if(ut===null)return;let{top:ie,bottom:Jt}=V,me=0,$e=0,_e=pe;for(;_e!==null;){const Ge=_e===ze.body;if(Ge)me=0,$e=vr(Q).innerHeight;else{const ct=_e.getBoundingClientRect();
11me=ct.top,$e=ct.bottom}let Be=0;if(ie<me?Be=-(me-ie):Jt>$e&&(Be=Jt-$e),Be!==0)if(Ge)ut.scrollBy(0,Be);else{const ct=_e.scrollTop;_e.scrollTop+=Be;const Et=_e.scrollTop-ct;ie-=Et,Jt-=Et}if(Ge)break;_e=yn(_e)}})(t,ve,i)}}Es=!0}}function qc(n){let e=$()||Bt();e===null&&(e=H().selectEnd()),e.insertNodes(n)}function Zr(n){let e=n;n.isCollapsed()||e.removeText();const t=$();N(t)&&(e=t),N(e)||I(161);const r=e.anchor;let s=r.getNode(),i=r.offset;for(;!Ze(s);)[s,i]=Vc(s,i);return i}function Vc(n,e){const t=n.getParent();if(!t){const s=q();return H().append(s),s.select(),[H(),0]}if(A(n)){const s=n.splitText(e);if(s.length===0)return[t,n.getIndexWithinParent()];const i=e===0?0:1;return[t,s[0].getIndexWithinParent()+i]}if(!T(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const s=new it(De(n.__key,e,"element"),De(n.__key,e,"element"),0,""),i=n.insertNewAfter(s);i&&i.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}let te=null,ne=null,ge=!1,Yr=!1,Rn=0;const ao={characterData:!0,childList:!0,subtree:!0};function vn(){return ge||te!==null&&te._readOnly}function fe(){ge&&I(13)}function ia(){Rn>99&&I(14)}function ot(){return te===null&&I(195,oa()),te}function G(){return ne===null&&I(196,oa()),ne}function oa(){let n=0;const e=new Set,t=Nr.version;if(typeof window<"u")for(const s of document.querySelectorAll("[contenteditable]")){const i=yr(s);if(li(i))n++;else if(i){let o=String(i.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 Zc(){return ne}function uo(n,e,t){const r=e.__type,s=(function(l,a){const u=l._nodes.get(a);return u===void 0&&I(30,a),u})(n,r);let i=t.get(r);i===void 0&&(i=Array.from(s.transforms),t.set(r,i));const o=i.length;for(let l=0;l<o&&(i[l](e),e.isAttached());l++);}function co(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function la(n,e){if(!e)return;const t=n._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const s of r)t.add(s)}function Yc(n){return bi(n,G()._nodes)}function bi(n,e){const t=n.type,r=e.get(t);r===void 0&&I(17,t);const s=r.klass;n.type!==s.getType()&&I(18,s.name);const i=s.importJSON(n),o=n.children;if(T(i)&&Array.isArray(o))for(let l=0;l<o.length;l++){const a=bi(o[l],e);i.append(a)}return i}function fo(n,e,t){const r=te,s=ge,i=ne;te=e,ge=!0,ne=n;try{return t()}finally{te=r,ge=s,ne=i}}function Qe(n,e){const t=n._pendingEditorState,r=n._rootElement,s=n._headless||r===null;if(t===null)return;const i=n._editorState,o=i._selection,l=t._selection,a=n._dirtyType!==_t,u=te,c=ge,f=ne,d=n._updating,h=n._observer;let p=null;if(n._pendingEditorState=null,n._editorState=t,!s&&a&&h!==null){ne=n,te=t,ge=!1,n._updating=!0;try{const v=n._dirtyType,E=n._dirtyElements,w=n._dirtyLeaves;h.disconnect(),p=Mc(i,t,n,v,E,w)}catch(v){if(v instanceof Error&&n._onError(v),Yr)throw v;return fa(n,null,r,t),$l(n),n._dirtyType=Rt,Yr=!0,Qe(n,i),void(Yr=!1)}finally{h.observe(r,ao),n._updating=d,te=u,ge=c,ne=f}}t._readOnly||(t._readOnly=!0);const _=n._dirtyLeaves,m=n._dirtyElements,x=n._normalizedNodes,g=n._updateTags,y=n._deferred;a&&(n._dirtyType=_t,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set,n._updateTags=new Set),(function(v,E){const w=v._decorators;let C=v._pendingDecorators||w;const P=E._nodeMap;let O;for(O in C)P.has(O)||(C===w&&(C=Ll(v)),delete C[O])})(n,t);const b=s?null:Ee(n._window);if(n._editable&&b!==null&&(a||l===null||l.dirty)&&r!==null&&!g.has("skip-dom-selection")){ne=n,te=t;try{if(h!==null&&h.disconnect(),a||l===null||l.dirty){const v=n._blockCursorElement;v!==null&&hi(v,n,r),Gc(o,l,n,b,g,r)}Ic(n,r,l),h!==null&&h.observe(r,ao)}finally{ne=f,te=u}}p!==null&&(function(v,E,w,C,P){const O=Array.from(v._listeners.mutation),M=O.length;for(let R=0;R<M;R++){const[j,B]=O[R],ve=E.get(B);ve!==void 0&&j(ve,{dirtyLeaves:C,prevEditorState:P,updateTags:w})}})(n,p,g,_,i),N(l)||l===null||o!==null&&o.is(l)||n.dispatchCommand(hn,void 0);const S=n._pendingDecorators;S!==null&&(n._decorators=S,n._pendingDecorators=null,rn("decorator",n,!0,S)),(function(v,E,w){const C=Mi(E),P=Mi(w);C!==P&&rn("textcontent",v,!0,P)})(n,e||i,t),rn("update",n,!0,{dirtyElements:m,dirtyLeaves:_,editorState:t,normalizedNodes:x,prevEditorState:e||i,tags:g}),(function(v,E){if(v._deferred=[],E.length!==0){const w=v._updating;v._updating=!0;try{for(let C=0;C<E.length;C++)E[C]()}finally{v._updating=w}}})(n,y),(function(v){const E=v._updates;if(E.length!==0){const w=E.shift();if(w){const[C,P]=w;ua(v,C,P)}}})(n)}function rn(n,e,t,...r){const s=e._updating;e._updating=t;try{const i=Array.from(e._listeners[n]);for(let o=0;o<i.length;o++)i[o].apply(null,r)}finally{e._updating=s}}function aa(n,e,t){if(n._updating===!1||ne!==n){let s=!1;return n.update((()=>{s=aa(n,e,t)})),s}const r=ci(n);for(let s=4;s>=0;s--)for(let i=0;i<r.length;i++){const o=r[i]._commands.get(e);if(o!==void 0){const l=o[s];if(l!==void 0){const a=Array.from(l),u=a.length;for(let c=0;c<u;
11c++)if(a[c](t,n)===!0)return!0}}}return!1}function go(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const s=t.shift();if(s){const[i,o]=s;let l;if(o!==void 0){if(l=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete){const a=n._pendingEditorState;a===null&&I(191),a._flushSync=!0}l&&n._deferred.push(l),la(n,o.tag)}i()}}return r}function ua(n,e,t){const r=n._updateTags;let s,i=!1,o=!1;t!==void 0&&(s=t.onUpdate,la(n,t.tag),i=t.skipTransforms||!1,o=t.discrete||!1),s&&n._deferred.push(s);const l=n._editorState;let a=n._pendingEditorState,u=!1;(a===null||a._readOnly)&&(a=n._pendingEditorState=ca(a||l),u=!0),a._flushSync=o;const c=te,f=ge,d=ne,h=n._updating;te=a,ge=!1,n._updating=!0,ne=n;try{u&&(n._headless?l._selection!==null&&(a._selection=l._selection.clone()):a._selection=(function(x){const g=x.getEditorState()._selection,y=Ee(x._window);return N(g)||g==null?xi(g,y,x,null):g.clone()})(n));const _=n._compositionKey;e(),i=go(n,i),(function(x,g){const y=g.getEditorState()._selection,b=x._selection;if(N(b)){const S=b.anchor,v=b.focus;let E;if(S.type==="text"&&(E=S.getNode(),E.selectionTransform(y,b)),v.type==="text"){const w=v.getNode();E!==w&&w.selectionTransform(y,b)}}})(a,n),n._dirtyType!==_t&&(i?(function(x,g){const y=g._dirtyLeaves,b=x._nodeMap;for(const S of y){const v=b.get(S);A(v)&&v.isAttached()&&v.isSimpleText()&&!v.isUnmergeable()&&Ri(v)}})(a,n):(function(x,g){const y=g._dirtyLeaves,b=g._dirtyElements,S=x._nodeMap,v=Xe(),E=new Map;let w=y,C=w.size,P=b,O=P.size;for(;C>0||O>0;){if(C>0){g._dirtyLeaves=new Set;for(const M of w){const R=S.get(M);A(R)&&R.isAttached()&&R.isSimpleText()&&!R.isUnmergeable()&&Ri(R),R!==void 0&&co(R,v)&&uo(g,R,E),y.add(M)}if(w=g._dirtyLeaves,C=w.size,C>0){Rn++;continue}}g._dirtyLeaves=new Set,g._dirtyElements=new Map;for(const M of P){const R=M[0],j=M[1];if(R!=="root"&&!j)continue;const B=S.get(R);B!==void 0&&co(B,v)&&uo(g,B,E),b.set(R,j)}w=g._dirtyLeaves,C=w.size,P=g._dirtyElements,O=P.size,Rn++}g._dirtyLeaves=y,g._dirtyElements=b})(a,n),go(n),(function(x,g,y,b){const S=x._nodeMap,v=g._nodeMap,E=[];for(const[w]of b){const C=v.get(w);C!==void 0&&(C.isAttached()||(T(C)&&Bl(C,w,S,v,E,b),S.has(w)||b.delete(w),E.push(w)))}for(const w of E)v.delete(w);for(const w of y){const C=v.get(w);C===void 0||C.isAttached()||(S.has(w)||y.delete(w),v.delete(w))}})(l,a,n._dirtyLeaves,n._dirtyElements)),_!==n._compositionKey&&(a._flushSync=!0);const m=a._selection;if(N(m)){const x=a._nodeMap,g=m.anchor.key,y=m.focus.key;x.get(g)!==void 0&&x.get(y)!==void 0||I(19)}else oe(m)&&m._nodes.size===0&&(a._selection=null)}catch(_){return _ instanceof Error&&n._onError(_),n._pendingEditorState=l,n._dirtyType=Rt,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void Qe(n)}finally{te=c,ge=f,ne=d,n._updating=h,Rn=0}n._dirtyType!==_t||n._deferred.length>0||(function(_,m){const x=m.getEditorState()._selection,g=_._selection;if(g!==null){if(g.dirty||!g.is(x))return!0}else if(x!==null)return!0;return!1})(a,n)?a._flushSync?(a._flushSync=!1,Qe(n)):u&&Tc((()=>{Qe(n)})):(a._flushSync=!1,u&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function Se(n,e,t){n._updating?n._updates.push([e,t]):ua(n,e,t)}class sn{constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new sn(this.element,e,this.after)}withAfter(e){return new sn(this.element,this.before,e)}withElement(e){return new sn(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return t!==null&&t.parentElement!==this.element&&I(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&I(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&I(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"&&(pn||mr);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()}const r=this.element,s=this.before,i=document.createElement("br");if(r.insertBefore(i,s),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,i),r.__lexicalLineBreak=o}else r.__lexicalLineBreak=i}getFirstChildOffset(){let e=0;for(let t=this.after;t!==null;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,r,s){if(r===this.element){const a=this.getFirstChildOffset();return[e,Math.min(a+e.getChildrenSize(),Math.max(a,s))]}const i=ho(t,r);i.push(s);const o=ho(t,this.element);let l=e.getIndexWithinParent();for(let a=0;a<o.length;a++){const u=i[a],c=o[a];if(u===void 0||u<c)break;if(u>c){l+=1;break}}return[e.getParentOrThrow(),l]}}function ho(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=e.parentNode){let s=0;for(let i=r.previousSibling;i!==null;i=r.previousSibling)s++;t.push(s)}return r!==n&&I(225),t.reverse()}class Me extends wr{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),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}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return mc[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=G()._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(A(t)&&e.push(t),T(t)){const r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;T(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;T(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 i=t[r-1];return T(i)&&i.getLastDescendant()||i||null}const s=t[e];return T(s)&&s.getFirstDescendant()||s||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:ee(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&I(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:ee(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&I(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let r,s;if(e<t/2){for(r=this.getFirstChild(),s=0;r!==null&&s<=e;){if(s===e)return r;r=r.getNextSibling(),s++}return null}for(r=this.getLastChild(),s=t-1;r!==null&&s>=e;){if(s===e)return r;r=r.getPreviousSibling(),s--}return null}getTextContent(){let e="";const t=this.getChildren(),r=t.length;for(let s=0;s<r;s++){const i=t[s];e+=i.getTextContent(),T(i)&&s!==r-1&&!i.isInline()&&(e+=He)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),r=t.length;for(let s=0;s<r;s++){const i=t[s];e+=i.getTextContentSize(),T(i)&&s!==r-1&&!i.isInline()&&(e+=He.length)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(e!==""){const t=Li[e];return!!(this.getFormat()&t)}return!1}select(e,t){fe();const r=$();let s=e,i=t;const o=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const a=this.getFirstChild();if(A(a)||T(a))return a.select(0,0)}else if(!(e!==void 0&&e!==o||t!==void 0&&t!==o)){const a=this.getLastChild();if(A(a)||T(a))return a.select()}}s===void 0&&(s=o),i===void 0&&(i=o);const l=this.__key;return N(r)?(r.anchor.set(l,s,"element"),r.focus.set(l,i,"element"),r.dirty=!0,r):sa(l,s,l,i,"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();
11return 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!==""?Li[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){const s=r.length,i=this.getChildrenSize(),o=this.getWritable();e+t<=i||I(226,String(e),String(t),String(i));const l=o.__key,a=[],u=[],c=this.getChildAtIndex(e+t);let f=null,d=i-t+s;if(e!==0)if(e===i)f=this.getLastChild();else{const p=this.getChildAtIndex(e);p!==null&&(f=p.getPreviousSibling())}if(t>0){let p=f===null?this.getFirstChild():f.getNextSibling();for(let _=0;_<t;_++){p===null&&I(100);const m=p.getNextSibling(),x=p.__key;mt(p.getWritable()),u.push(x),p=m}}let h=f;for(let p=0;p<s;p++){const _=r[p];h!==null&&_.is(h)&&(f=h=h.getPreviousSibling());const m=_.getWritable();m.__parent===l&&d--,mt(m);const x=_.__key;if(h===null)o.__first=x,m.__prev=null;else{const g=h.getWritable();g.__next=x,m.__prev=g.__key}_.__key===l&&I(76),m.__parent=l,a.push(x),h=_}if(e+t===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(c!==null){const p=c.getWritable();if(h!==null){const _=h.getWritable();p.__prev=h.__key,_.__next=c.__key}else p.__prev=null}if(o.__size=d,u.length){const p=$();if(N(p)){const _=new Set(u),m=new Set(a),{anchor:x,focus:g}=p;po(x,_,m)&&rr(x,x.getNode(),this,f,c),po(g,_,m)&&rr(g,g.getNode(),this,f,c),d!==0||this.canBeEmpty()||de(this)||this.remove()}}return o}getDOMSlot(e){return new sn(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(se(t)){const r=this.getIndent();r>0&&(t.style.paddingInlineStart=40*r+"px")}return{element:t}}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()}}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 s=r.getFirstChild();for(let i=this.getFirstChild();i;i=i.getNextSibling()){const o=t.getElementByKey(i.getKey());o!==null&&(s==null?(r.insertChild(o),s=o):s!==o&&r.replaceChild(o,s),s=s.nextSibling)}}}function T(n){return n instanceof Me}function po(n,e,t){let r=n.getNode();for(;r;){const s=r.__key;if(e.has(s)&&!t.has(s))return!0;r=r.getParent()}return!1}class vi extends wr{constructor(e){super(e)}decorate(e,t){I(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function W(n){return n instanceof vi}class Sn extends Me{static getType(){return"root"}static clone(){return new Sn}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){I(51)}getTextContent(){const e=this.__cachedText;return!vn()&&G()._dirtyType!==_t||e===null?super.getTextContent():e}remove(){I(52)}replace(e){I(53)}insertBefore(e){I(54)}insertAfter(e){I(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const r=e[t];T(r)||W(r)||I(56)}return super.append(...e)}static importJSON(e){const t=H();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}collapseAtStart(){return!0}}function ae(n){return n instanceof Sn}function ca(n){return new kr(new Map(n._nodeMap))}function Si(){return new kr(new Map([["root",new Sn]]))}function da(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&I(130,t.name),T(n)){const r=e.children;Array.isArray(r)||I(59,t.name);const s=n.getChildren();for(let i=0;i<s.length;i++){const o=da(s[i]);r.push(o)}}return e}class kr{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 fo(t&&t.editor||null,this,e)}clone(e){const t=new kr(this._nodeMap,e===void 0?this._selection:e);return t._readOnly=!0,t}toJSON(){return fo(null,this,(()=>({root:da(H())})))}}class Ei extends Me{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Ut extends Me{constructor(e){super(e),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}hasTextFormat(e){const t=yt[e];return!!(this.getTextFormat()&t)}getFormatFlags(e,t){return Gn(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}static clone(e){return new Ut(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}createDOM(e){const t=document.createElement("p"),r=It(e.theme,"paragraph");return r!==void 0&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}static importDOM(){return{p:e=>({conversion:Xc,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(se(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();t.style.textAlign=r;const s=this.getDirection();s&&(t.dir=s)}return{element:t}}static importJSON(e){const t=q();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t.setTextFormat(e.textFormat),t}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){const r=q();r.setTextFormat(e.format),r.setTextStyle(e.style);const s=this.getDirection();return r.setDirection(s),r.setFormat(this.getFormatType()),r.setStyle(this.getTextStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||A(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}}function Xc(n){const e=q();return n.style&&(e.setFormat(n.style.textAlign),mi(n,e)),{node:e}}function q(){return xe(new Ut)}function bt(n){return n instanceof Ut}const z=0,Z=1,Qc=2,ed=4;function fa(n,e,t,r){const s=n._keyToDOMMap;s.clear(),n._editorState=Si(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=_t,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,n._updateTags=new Set,n._updates=[],n._blockCursorElement=null;const i=n._observer;i!==null&&(i.disconnect(),n._observer=null),e!==null&&(e.textContent=""),t!==null&&(t.textContent="",s.set("root",t))}function td(n){const e=n||{},t=Zc(),r=e.theme||{},s=n===void 0?t:e.parentEditor||null,i=e.disableEvents||!1,o=Si(),l=e.namespace||(s!==null?s._config.namespace:Rl()),a=e.editorState,u=[Sn,st,xn,bn,Ut,Ei,...e.nodes||[]],{onError:c,html:f}=e,d=e.editable===void 0||e.editable;let h;if(n===void 0&&t!==null)h=t._nodes;else{h=new Map;for(let _=0;_<u.length;_++){let m=u[_],x=null,g=null;if(typeof m!="function"){const v=m;m=v.replace,x=v.with,g=v.withKlass||null}const y=m.getType(),b=m.transform(),S=new Set;b!==null&&S.add(b),h.set(y,{exportDOM:f&&f.export?f.export.get(m):void 0,klass:m,replace:x,replaceWithKlass:g,transforms:S})}}const p=new Nr(o,s,h,{disableEvents:i,namespace:l,theme:r},c||console.error,(function(_,m){const x=new Map,g=new Set,y=b=>{Object.keys(b).forEach((S=>{let v=x.get(S);v===void 0&&(v=[],x.set(S,v)),v.push(b[S])}))};return _.forEach((b=>{const S=b.klass.importDOM;if(S==null||g.has(S))return;g.add(S);const v=S.call(b.klass);v!==null&&y(v)})),m&&y(m),x})(h,f?f.import:void 0),d);return a!==void 0&&(p._pendingEditorState=a,p._dirtyType=Rt),p}class Nr{constructor(e,t,r,s,i,o,l){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 Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=s,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=_t,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=Rl(),this._onError=i,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){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}
11registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,r){r===void 0&&I(35);const s=this._commands;s.has(e)||s.set(e,[new Set,new Set,new Set,new Set,new Set]);const i=s.get(e);i===void 0&&I(36,String(e));const o=i[r];return o.add(t),()=>{o.delete(t),i.every((l=>l.size===0))&&s.delete(e)}}registerMutationListener(e,t,r){const s=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation;i.set(t,s);const o=r&&r.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,s),()=>{i.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&I(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,s=Ji(r).get(t.getType());if(!s)return;const i=new Map;for(const o of s.keys())i.set(o,"created");i.size>0&&e(i,{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),s=[r],i=r.replaceWithKlass;if(i!=null){const o=this.registerNodeTransformToKlass(i,t);s.push(o)}return(function(o,l){const a=Ji(o.getEditorState()),u=[];for(const c of l){const f=a.get(c);f&&u.push(f)}u.length!==0&&o.update((()=>{for(const c of u)for(const f of c.values())f.markDirty()}),o._pendingEditorState===null?{tag:"history-merge"}:void 0)})(this,s.map((o=>o.klass.getType()))),()=>{s.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 L(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=It(this._config.theme,"root"),s=this._pendingEditorState||this._editorState;if(this._rootElement=e,fa(this,t,e,s),t!==null&&(this._config.disableEvents||zc(t),r!=null&&t.classList.remove(...r)),e!==null){const i=(function(l){const a=l.ownerDocument;return a&&a.defaultView||null})(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=Rt,$l(this),this._updateTags.add("history-merge"),Qe(this),this._config.disableEvents||(function(l,a){const u=l.ownerDocument,c=er.get(u);(c===void 0||c<1)&&u.addEventListener("selectionchange",Ql),er.set(u,(c||0)+1),l.__lexicalEditor=a;const f=Xl(l);for(let d=0;d<Ss.length;d++){const[h,p]=Ss[d],_=typeof p=="function"?m=>{Yi(m)||(Zi(m),(a.isEditable()||h==="click")&&p(m,a))}:m=>{if(Yi(m))return;Zi(m);const x=a.isEditable();switch(h){case"cut":return x&&L(a,Vs,m);case"copy":return L(a,pr,m);case"paste":return x&&L(a,cr,m);case"dragstart":return x&&L(a,El,m);case"dragover":return x&&L(a,wl,m);case"dragend":return x&&L(a,ec,m);case"focus":return x&&L(a,nc,m);case"blur":return x&&L(a,rc,m);case"drop":return x&&L(a,Sl,m)}};l.addEventListener(h,_),f.push((()=>{l.removeEventListener(h,_)}))}})(e,this),r!=null&&e.classList.add(...r)}else this._editorState=s,this._pendingEditorState=null,this._window=null;rn("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&I(38);let r=e;r._readOnly&&(r=ca(e),r._selection=e._selection?e._selection.clone():null),Fl(this);const s=this._pendingEditorState,i=this._updateTags,o=t!==void 0?t.tag:null;s===null||s.isEmpty()||(o!=null&&i.add(o),Qe(this)),this._pendingEditorState=r,this._dirtyType=Rt,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&i.add(o),this._updating||Qe(this)}parseEditorState(e,t){return(function(r,s,i){const o=Si(),l=te,a=ge,u=ne,c=s._dirtyElements,f=s._dirtyLeaves,d=s._cloneNotNeeded,h=s._dirtyType;s._dirtyElements=new Map,s._dirtyLeaves=new Set,s._cloneNotNeeded=new Set,s._dirtyType=0,te=o,ge=!1,ne=s;try{const p=s._nodes;bi(r.root,p),i&&i(),o._readOnly=!0}catch(p){p instanceof Error&&s._onError(p)}finally{s._dirtyElements=c,s._dirtyLeaves=f,s._cloneNotNeeded=d,s._dirtyType=h,te=l,ge=a,ne=u}return o}
11)(typeof e=="string"?JSON.parse(e):e,this,t)}read(e){return Qe(this),this.getEditorState().read(e,{editor:this})}update(e,t){Se(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Se(this,(()=>{const s=$(),i=H();s!==null?s.dirty=!0:i.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?i.selectStart():i.selectEnd())}),{onUpdate:()=>{r.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=Ee(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,rn("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Nr.version="0.22.0+prod.esm";function nd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ga=nd((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const rd=new Map;function sd(n){const e={};if(!n)return e;const t=n.split(";");for(const r of t)if(r!==""){const[s,i]=r.split(/:([^]+)/);s&&i&&(e[s.trim()]=i.trim())}return e}function ha(n,e){const t=n.getStartEndPoints();if(e.isSelected(n)&&!e.isSegmented()&&!e.isToken()&&t!==null){const[r,s]=t,i=n.isBackward(),o=r.getNode(),l=s.getNode(),a=e.is(o),u=e.is(l);if(a||u){const[c,f]=Ts(n),d=o.is(l),h=e.is(i?l:o),p=e.is(i?o:l);let _,m=0;return d?(m=c>f?f:c,_=c>f?c:f):h?(m=i?f:c,_=void 0):p&&(m=0,_=i?c:f),e.__text=e.__text.slice(m,_),e}}return e}function mo(n){if(n.type==="text")return n.offset===n.getNode().getTextContentSize();const e=n.getNode();return T(e)||ga(177),n.offset===e.getChildrenSize()}function id(n){const e=n.getStyle(),t=sd(e);rd.set(e,t)}function _o(n){return n.getNode().isAttached()}function od(n){let e=n;for(;e!==null&&!de(e);){const t=e.getLatest(),r=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=r}}function ld(n,e,t=null){const r=n.getStartEndPoints(),s=r?r[0]:null,i=n.getNodes(),o=i.length;if(s!==null&&(o===0||o===1&&s.type==="element"&&s.getNode().getChildrenSize()===0)){const u=s.type==="text"?s.getNode().getParentOrThrow():s.getNode(),c=u.getChildren();let f=e();return f.setFormat(u.getFormatType()),f.setIndent(u.getIndent()),c.forEach((d=>f.append(d))),t&&(f=t.append(f)),void u.replace(f)}let l=null,a=[];for(let u=0;u<o;u++){const c=i[u];de(c)?(Xr(n,a,a.length,e,t),a=[],l=c):l===null||l!==null&&Lt(c,l)?a.push(c):(Xr(n,a,a.length,e,t),a=[c])}Xr(n,a,a.length,e,t)}function Xr(n,e,t,r,s=null){if(e.length===0)return;const i=e[0],o=new Map,l=[];let a=T(i)?i:i.getParentOrThrow();a.isInline()&&(a=a.getParentOrThrow());let u=!1;for(;a!==null;){const p=a.getPreviousSibling();if(p!==null){a=p,u=!0;break}if(a=a.getParentOrThrow(),de(a))break}const c=new Set;for(let p=0;p<t;p++){const _=e[p];T(_)&&_.getChildrenSize()===0&&c.add(_.getKey())}const f=new Set;for(let p=0;p<t;p++){const _=e[p];let m=_.getParent();if(m!==null&&m.isInline()&&(m=m.getParent()),m!==null&&ui(_)&&!f.has(_.getKey())){const x=m.getKey();if(o.get(x)===void 0){const g=r();g.setFormat(m.getFormatType()),g.setIndent(m.getIndent()),l.push(g),o.set(x,g),m.getChildren().forEac
11h((y=>{g.append(y),f.add(y.getKey()),T(y)&&y.getChildrenKeys().forEach((b=>f.add(b)))})),od(m)}}else if(c.has(_.getKey())){T(_)||ga(179);const x=r();x.setFormat(_.getFormatType()),x.setIndent(_.getIndent()),l.push(x),_.remove(!0)}}if(s!==null)for(let p=0;p<l.length;p++){const _=l[p];s.append(_)}let d=null;if(de(a))if(u)if(s!==null)a.insertAfter(s);else for(let p=l.length-1;p>=0;p--){const _=l[p];a.insertAfter(_)}else{const p=a.getFirstChild();if(T(p)&&(a=p),p===null)if(s)a.append(s);else for(let _=0;_<l.length;_++){const m=l[_];a.append(m),d=m}else if(s!==null)p.insertBefore(s);else for(let _=0;_<l.length;_++){const m=l[_];p.insertBefore(m),d=m}}else if(s)a.insertAfter(s);else for(let p=l.length-1;p>=0;p--){const _=l[p];a.insertAfter(_),d=_}const h=Bt();N(h)&&_o(h.anchor)&&_o(h.focus)?J(h.clone()):d!==null?d.selectEnd():n.dirty=!0}function yo(n,e){const t=un(n.focus,e);return W(t)&&!t.isIsolated()||T(t)&&!t.isInline()&&!t.canBeEmpty()}function ad(n,e,t,r){n.modify(e?"extend":"move",t,r)}function ud(n){const e=n.anchor.getNode();return(ae(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}function xo(n,e,t){const r=ud(n);ad(n,e,t?!r:r,"character")}function cd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var dd=cd((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const Ar=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,fd=Ar&&"documentMode"in document?document.documentMode:null,gd=Ar&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);!(!Ar||!("InputEvent"in window)||fd)&&"getTargetRanges"in new window.InputEvent("input");function pa(...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 be(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}const hd=Ar,pd=gd;function Ae(n,...e){const t=pa(...e);t.length>0&&n.classList.add(...t)}function Fr(n,...e){const t=pa(...e);t.length>0&&n.classList.remove(...t)}function ma(n,e){let t=n;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function _a(n){const e=Wt(n,(t=>T(t)&&!t.isInline()));return T(e)||dd(4,n.__key),e}const Wt=(n,e)=>{let t=n;for(;t!==H()&&t!=null;){if(e(t))return t;t=t.getParent()}return null};function et(n,e){return n!==null&&Object.getPrototypeOf(n).constructor.name===e.name}function md(n,e){const t=[];for(let r=0;r<n.length;r++){const s=e(n[r]);s!==null&&t.push(s)}return t}let Qr=!(pd||!hd)&&void 0;function _d(n){let e=1;if((function(){if(Qr===void 0){const t=document.createElement("div");t.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(t);const r=t.getBoundingClientRect();t.style.setProperty("zoom","2"),Qr=t.getBoundingClientRect().width===r.width,document.body.removeChild(t)}return Qr})())for(;n;)e*=Number(window.getComputedStyle(n).getPropertyValue("zoom")),n=n.parentElement;return e}var es={exports:{}},bo;function yd(){return bo||(bo=1,(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
12 * Prism: Lightweight, robust, elegant syntax highlighting
13 *
14 * @license MIT <https://opensource.org/licenses/MIT>
15 * @author Lea Verou <https://lea.verou.me>
16 * @namespace
17 * @public
18 */var t=(function(r){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,o={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function g(y){return y instanceof a?new a(y.type,g(y.content),y.alias):Array.isArray(y)?y.map(g):y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(g){return Object.prototype.toString.call(g).slice(8,-1)},objId:function(g){return g.__id||Object.defineProperty(g,"__id",{value:++i}),g.__id},clone:function g(y,b){b=b||{};var S,v;switch(l.util.type(y)){case"Object":if(v=l.util.objId(y),b[v])return b[v];S={},b[v]=S;for(var E in y)y.hasOwnProperty(E)&&(S[E]=g(y[E],b));return S;case"Array":return v=l.util.objId(y),b[v]?b[v]:(S=[],b[v]=S,y.forEac
vendor: 6,084 bytes, line 18
18h(function(w,C){S[C]=g(w,b)}),S);default:return y}},getLanguage:function(g){for(;g;){var y=s.exec(g.className);if(y)return y[1].toLowerCase();g=g.parentElement}return"none"},setLanguage:function(g,y){g.className=g.className.replace(RegExp(s,"gi"),""),g.classList.add("language-"+y)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(S){var g=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(S.stack)||[])[1];if(g){var y=document.getElementsByTagName("script");for(var b in y)if(y[b].src==g)return y[b]}return null}},isActive:function(g,y,b){for(var S="no-"+y;g;){var v=g.classList;if(v.contains(y))return!0;if(v.contains(S))return!1;g=g.parentElement}return!!b}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(g,y){var b=l.util.clone(l.languages[g]);for(var S in y)b[S]=y[S];return b},insertBefore:function(g,y,b,S){S=S||l.languages;var v=S[g],E={};for(var w in v)if(v.hasOwnProperty(w)){if(w==y)for(var C in b)b.hasOwnProperty(C)&&(E[C]=b[C]);b.hasOwnProperty(w)||(E[w]=v[w])}var P=S[g];return S[g]=E,l.languages.DFS(l.languages,function(O,M){M===P&&O!=g&&(this[O]=E)}),E},DFS:function g(y,b,S,v){v=v||{};var E=l.util.objId;for(var w in y)if(y.hasOwnProperty(w)){b.call(y,w,y[w],S||w);var C=y[w],P=l.util.type(C);P==="Object"&&!v[E(C)]?(v[E(C)]=!0,g(C,b,null,v)):P==="Array"&&!v[E(C)]&&(v[E(C)]=!0,g(C,b,w,v))}}},plugins:{},highlightAll:function(g,y){l.highlightAllUnder(document,g,y)},highlightAllUnder:function(g,y,b){var S={callback:b,container:g,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",S),S.elements=Array.prototype.slice.apply(S.container.querySelectorAll(S.selector)),l.hooks.run("before-all-elements-highlight",S);for(var v=0,E;E=S.elements[v++];)l.highlightElement(E,y===!0,S.callback)},highlightElement:function(g,y,b){var S=l.util.getLanguage(g),v=l.languages[S];l.util.setLanguage(g,S);var E=g.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(E,S);var w=g.textContent,C={element:g,language:S,grammar:v,code:w};function P(M){C.highlightedCode=M,l.hooks.run("before-insert",C),C.element.innerHTML=C.highlightedCode,l.hooks.run("after-highlight",C),l.hooks.run("complete",C),b&&b.call(C.element)}if(l.hooks.run("before-sanity-check",C),E=C.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!C.code){l.hooks.run("complete",C),b&&b.call(C.element);return}if(l.hooks.run("before-highlight",C),!C.grammar){P(l.util.encode(C.code));return}if(y&&r.Worker){var O=new Worker(l.filename);O.onmessage=function(M){P(M.data)},O.postMessage(JSON.stringify({language:C.language,code:C.code,immediateClose:!0}))}else P(l.highlight(C.code,C.grammar,C.language))},highlight:function(g,y,b){var S={code:g,grammar:y,language:b};if(l.hooks.run("before-tokenize",S),!S.grammar)throw new Error('The language "'+S.language+'" has no grammar.');return S.tokens=l.tokenize(S.code,S.grammar),l.hooks.run("after-tokenize",S),a.stringify(l.util.encode(S.tokens),S.language)},tokenize:function(g,y){var b=y.rest;if(b){for(var S in b)y[S]=b[S];delete y.rest}var v=new f;return d(v,v.head,g),c(g,v,y,v.head,0),p(v)},hooks:{all:{},add:function(g,y){var b=l.hooks.all;b[g]=b[g]||[],b[g].push(y)},run:function(g,y){var b=l.hooks.all[g];if(!(!b||!b.length))for(var S=0,v;v=b[S++];)v(y)}},Token:a};r.Prism=l;function a(g,y,b,S){this.type=g,this.content=y,this.alias=b,this.length=(S||"").length|0}a.stringify=function g(y,b){if(typeof y=="string")return y;if(Array.isArray(y)){var S="";return y.forEach(function(P){S+=g(P,b)}),S}var v={type:y.type,content:g(y.content,b),tag:"span",classes:["token",y.type],attributes:{},language:b},E=y.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(v.classes,E):v.classes.push(E)),l.hooks.run("wrap",v);var w="";for(var C in v.attributes)w+=" "+C+'="'+(v.attributes[C]||"").replace(/"/g,"&quot;")+'"';return"<"+v.tag+' class="'+v.classes.join(" ")+'"'+w+">"+v.content+"</"+v.tag+">"};function u(g,y,b,S){g.lastIndex=y;var v=g.exec(b);if(v&&S&&v[1]){var E=v[1].length;v.index+=E,v[0]=v[0].slice(E)}return v}function c(g,y,b,S,v,E){for(var w in b)if(!(!b.hasOwnProperty(w)||!b[w])){var C=b[w];C=Array.isArray(C)?C:[C];for(var P=0;P<C.length;++P){if(E&&E.cause==w+","+P)return;var O=C[P],M=O.inside,R=!!O.lookbehind,j=!!O.greedy,B=O.alias;if(j&&!O.pattern.global){var ve=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,ve+"g")}for(var Q=O.pattern||O,V=S.next,pe=v;V!==y.tail&&!(E&&pe>=E.reach);pe+=V.value.length,V=V.next){var ze=V.value;if(y.length>g.length)return;if(!(ze instanceof a)){var ut=1,ie;if(j){if(ie=u(Q,pe,g,R),!ie||ie.index>=g.length)break;var _e=ie.index,Jt=ie.index+ie[0].length,me=pe;for(me+=V.value.length;_e>=me;)V=V.next,me+=V.value.length;if(me-=V.value.length,pe=me,V.value instanceof a)continue;for(var $e=V;$e!==y.tail&&(me<Jt||typeof $e.value=="string");$e=$e.next)ut++,me+=$e.value.length;ut--,ze=g.slice(pe,me),ie.index-=pe}else if(ie=u(Q,0,ze,R),!ie)continue;var _e=ie.index,Ge=ie[0],Be=ze.slice(0,_e),ct=ze.slice(_e+Ge.length),Et=pe+ze.length;E&&Et>E.reach&&(E.reach=Et);var wn=V.prev;Be&&(wn=d(y,wn,Be),pe+=Be.length),h(y,wn,ut);var Su=new a(w,M?l.tokenize(Ge,M):Ge,B,Ge);if(V=d(y,wn,Su),ct&&d(y,V,ct),ut>1){var Mr={cause:w+","+P,reach:Et};c(g,y,b,V.prev,pe,Mr),E&&Mr.reach>E.reach&&(E.reach=Mr.reach)}}}}}}function f(){var g={value:null,prev:null,next:null},y={value:null,prev:g,next:null};g.next=y,this.head=g,this.tail=y,this.length=0}function d(g,y,b){var S=y.next,v={value:b,prev:y,next:S};return y.next=v,S.prev=v,g.length++,v}function h(g,y,b){for(var S=y.next,v=0;v<b&&S!==g.tail;v++)S=S.next;y.next=S,S.prev=y,g.length-=v}function p(g){for(var y=[],b=g.head.next;b!==g.tail;)y.push(b.value),b=b.next;return y}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(g){var y=JSON.parse(g.data),b=y.language,S=y.co
vendor: 8,943 bytes, line 18
18de,v=y.immediateClose;r.postMessage(l.highlight(S,l.languages[b],b)),v&&r.close()},!1)),l;var _=l.util.currentScript();_&&(l.filename=_.src,_.hasAttribute("data-manual")&&(l.manual=!0));function m(){l.manual||l.highlightAll()}if(!l.manual){var x=document.readyState;x==="loading"||x==="interactive"&&_&&_.defer?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16)}return l})(e);n.exports&&(n.exports=t),typeof Ii<"u"&&(Ii.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,i){var o={};o["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[i]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};l["language-"+i]={pattern:/[\s\S]+/,inside:t.languages[i]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:l},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(r,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,(function(r){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var i=r.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))})(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2}
18)*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,(function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",s=function(_,m){return"✖ Error "+_+" while fetching file: "+m},i="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",u="loaded",c="failed",f="pre[data-src]:not(["+l+'="'+u+'"]):not(['+l+'="'+a+'"])';function d(_,m,x){var g=new XMLHttpRequest;g.open("GET",_,!0),g.onreadystatechange=function(){g.readyState==4&&(g.status<400&&g.responseText?m(g.responseText):g.status>=400?x(s(g.status,g.statusText)):x(i))},g.send(null)}function h(_){var m=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(_||"");if(m){var x=Number(m[1]),g=m[2],y=m[3];return g?y?[x,Number(y)]:[x,void 0]:[x,x]}}t.hooks.add("before-highlightall",function(_){_.selector+=", "+f}),t.hooks.add("before-sanity-check",function(_){var m=_.element;if(m.matches(f)){_.code="",m.setAttribute(l,a);var x=m.appendChild(document.createElement("CODE"));x.textContent=r;var g=m.getAttribute("data-src"),y=_.language;if(y==="none"){var b=(/\.(\w+)$/.exec(g)||[,"none"])[1];y=o[b]||b}t.util.setLanguage(x,y),t.util.setLanguage(m,y);var S=t.plugins.autoloader;S&&S.loadLanguages(y),d(g,function(v){m.setAttribute(l,u);var E=h(m.getAttribute("data-range"));if(E){var w=v.split(/\r\n?|\n/g),C=E[0],P=E[1]==null?w.length:E[1];C<0&&(C+=w.length),C=Math.max(0,Math.min(C-1,w.length)),P<0&&(P+=w.length),P=Math.max(0,Math.min(P,w.length)),v=w.slice(C,P).join(`
19`),m.hasAttribute("data-start")||m.setAttribute("data-start",String(C+1))}x.textContent=v,t.highlightElement(x)},function(v){m.setAttribute(l,c),x.textContent=v})}}),t.plugins.fileHighlight={highlight:function(m){for(var x=(m||document).querySelectorAll(f),g=0,y;y=x[g++];)t.highlightElement(y)}};var p=!1;t.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(es)),es.exports}yd();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?
19:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>
19\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};s["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:s},Prism.languages.insertBefore("markup","cdata",i)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(n,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(n){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function t(c){return c=c.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,s=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+s+i+"(?:"+s+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+s+i+")(?:"+s+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+s+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+s+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"}
19,list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:t(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:t(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:t(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:t(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(f){c!==f&&(n.languages.markdown[c].inside.content.inside[f]=n.languages.markdown[f])})}),n.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function f(d){if(!(!d||typeof d=="string"))for(var h=0,p=d.length;h<p;h++){var _=d[h];if(_.type!=="code"){f(_.content);continue}var m=_.content[1],x=_.content[3];if(m&&x&&m.type==="code-language"&&x.type==="code-block"&&typeof m.content=="string"){var g=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");g=(/[a-z][\w-]*/i.exec(g)||[""])[0].toLowerCase();var y="language-"+g;x.alias?typeof x.alias=="string"?x.alias=[x.alias,y]:x.alias.push(y):x.alias=[y]}}}f(c.tokens)}),n.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var f="",d=0,h=c.classes.length;d<h;d++){var p=c.classes[d],_=/language-(.+)/.exec(p);if(_){f=_[1];break}}var m=n.languages[f];if(m)c.content=n.highlight(u(c.content),m,f);else if(f&&f!=="none"&&n.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=x,n.plugins.autoloader.loadLanguages(f,function(){var g=document.getElementById(x);g&&(g.innerHTML=n.highlight(g.textContent,n.languages[f],f))})}}});var o=RegExp(n.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function u(c){var f=c.replace(o,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(d,h){if(h=h.toLowerCase(),h[0]==="#"){var p;return h[1]==="x"?p=parseInt(h.slice(2),16):p=Number(h.slice(1)),a(p)}else{var _=l[h];return _||d}}),f}n.languages.md=n.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(n){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]
19*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var t=n.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(n){var e=n.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}
vendor: 4,549 bytes, line 19
19],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);var vo={},So;function xd(){return So||(So=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),vo}xd();var Eo={},wo;function bd(){return wo||(wo=1,(function(n){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,t=0;t<2;t++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}
vendor: 6,476 bytes, line 19
19],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(Prism)),Eo}bd();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ 	]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=Prism.languages.swift});var Co={},To;function vd(){return To||(To=1,(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var e=n.languages.extend("typescript",{});delete e["class-name"],n.languages.typescript["class-name"].inside=e,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}
19}}),n.languages.ts=n.languages.typescript})(Prism)),Co}vd();var ko={},No;function Sd(){return No||(No=1,(function(n){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+t+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+t+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+t+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),ko}Sd();var Ao={},Fo;function Ed(){return Fo||(Fo=1,(function(n){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,t=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?
19:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return t})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(Prism)),Ao}Ed();function wd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}wd((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const Cd=globalThis.Prism||window.Prism,$o=n=>{try{return!!n&&Cd.languages.hasOwnProperty(n)}catch{return!1}};function ya(n,e){for(const t of n.childNodes){if(se(t)&&t.tagName===e)return!0;ya(t,e)}return!1}const en="data-language",Fn="data-highlight-language";let $r=class xa extends Me{static getType(){return"code"}static clone(e){return new xa(e.__language,e.__key)}constructor(e,t){super(t),this.__language=e,this.__isSyntaxHighlightSupported=$o(e)}createDOM(e){const t=document.createElement("code");Ae(t,e.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(t.setAttribute(en,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Fn,r)),t}updateDOM(e,t,r){const s=this.__language,i=e.__language;return s?s!==i&&(t.setAttribute(en,s),this.__isSyntaxHighlightSupported&&t.setAttribute(Fn,s)):i&&(t.removeAttribute(en),e.__isSyntaxHighlightSupported&&t.removeAttribute(Fn)),!1}exportDOM(e){const t=document.createElement("pre");Ae(t,e._config.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(t.setAttribute(en,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Fn,r)),{element:t}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||ya(e,"BR"))?{conversion:Io,priority:1}:null,div:()=>({conversion:Td,priority:1}),pre:()=>({conversion:Io,priority:0}),table:e=>ts(e)?{conversion:kd,priority:3}:null,td:e=>{const t=e,r=t.closest("table");return t.classList.contains("js-file-line")||r&&ts(r)?{conversion:Lo,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&ts(t)?{conversion:Lo,priority:3}:null}}}static importJSON(e){const t=Oe(e.language);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),language:this.getLanguage()}}insertNewAfter(e,t=!0){const r=this.getChildren(),s=r.length;if(s>=2&&r[s-1].getTextContent()===`
20`&&r[s-2].getTextContent()===`
21`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===s){r[s-1].remove(),r[s-2].remove();const a=q();return this.insertAfter(a,t),a}const{anchor:i,focus:o}=e,l=(i.isBefore(o)?i:o).getNode();if(A(l)){let a=Nd(l);const u=[];for(;;)if(yi(a))u.push(zt()),a=a.getNextSibling();else{if(!Sa(a))break;{let m=0;const x=a.getTextContent(),g=a.getTextContentSize();for(;m<g&&x[m]===" ";)m++;if(m!==0&&u.push(va(" ".repeat(m))),m!==g)break;a=a.getNextSibling()}}const c=l.splitText(i.offset)[0],f=i.offset===0?0:1,d=c.getIndexWithinParent()+f,h=l.getParentOrThrow(),p=[Ne(),...u];h.splice(d,0,p);const _=u[u.length-1];_?_.select():i.offset===0?c.selectPrevious():c.getNextSibling().selectNext(0,0)}if(wi(l)){const{offset:a}=e.anchor;l.splice(a,0,[Ne()]),l.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const e=q();
21return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}setLanguage(e){const t=this.getWritable();t.__language=e,t.__isSyntaxHighlightSupported=$o(e)}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}};function Oe(n){return xe(new $r(n))}function wi(n){return n instanceof $r}function Io(n){return{node:Oe(n.getAttribute(en))}}function Td(n){const e=n,t=Po(e);return t||(function(r){let s=r.parentElement;for(;s!==null;){if(Po(s))return!0;s=s.parentElement}return!1})(e)?{node:t?Oe():null}:{node:null}}function kd(){return{node:Oe()}}function Lo(){return{node:null}}function Po(n){return n.style.fontFamily.match("monospace")!==null}function ts(n){return n.classList.contains("js-file-line-container")}let Ci=class ba extends st{constructor(e,t,r){super(e,r),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new ba(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}canHaveFormat(){return!1}createDOM(e){const t=super.createDOM(e),r=ns(e.theme,this.__highlightType);return Ae(t,r),t}updateDOM(e,t,r){const s=super.updateDOM(e,t,r),i=ns(r.theme,e.__highlightType),o=ns(r.theme,this.__highlightType);return i!==o&&(i&&Fr(t,i),o&&Ae(t,o)),s}static importJSON(e){const t=va(e.text,e.highlightType);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return Oe()}};function ns(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function va(n,e){return xe(new Ci(n,e))}function Sa(n){return n instanceof Ci}function Nd(n){let e=n,t=n;for(;Sa(t)||yi(t);)e=t,t=t.getPreviousSibling();return e}function Ad(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fd=Ad((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const $d=new Set(["http:","https:","mailto:","sms:","tel:"]);let jt=class Ea extends Me{static getType(){return"link"}static clone(e){return new Ea(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,t={},r){super(r);const{target:s=null,rel:i=null,title:o=null}=t;this.__url=e,this.__target=s,this.__rel=i,this.__title=o}createDOM(e){const t=document.createElement("a");return t.href=this.sanitizeUrl(this.__url),this.__target!==null&&(t.target=this.__target),this.__rel!==null&&(t.rel=this.__rel),this.__title!==null&&(t.title=this.__title),Ae(t,e.theme.link),t}updateDOM(e,t,r){if(zl(t)){const s=this.__url,i=this.__target,o=this.__rel,l=this.__title;s!==e.__url&&(t.href=s),i!==e.__target&&(i?t.target=i:t.removeAttribute("target")),o!==e.__rel&&(o?t.rel=o:t.removeAttribute("rel")),l!==e.__title&&(l?t.title=l:t.removeAttribute("title"))}return!1}static importDOM(){return{a:e=>({conversion:Id,priority:1})}}static importJSON(e){const t=gn(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}sanitizeUrl(e){try{const t=new URL(e);if(!$d.has(t.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,t=!0){const r=gn(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,r){if(!N(t))return!1;const s=t.anchor.getNode(),i=t.focus.getNode();return this.isParentOf(s)&&this.isParentOf(i)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function Id(n){let e=null;if(zl(n)){const t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=gn(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function gn(n,e){return xe(new jt(n,e))}function ye(n){return n instanceof jt}let Ir=class wa extends jt{constructor(e,t={},r){super(e,t,r),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new wa(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,r){return super.updateDOM(e,t,r)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){const t=Ns(e.url,{isUnlinked:e.isUnlinked,rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){const r=this.getParentOrThrow().insertNewAfter(e,t);if(T(r)){const s=Ns(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(s),s}return null}};function Ns(n,e){return xe(new Ir(n,e))}function gt(n){return n instanceof Ir}const Ke=Mt();function Oo(n,e){if(n.type==="element"){const t=n.getNode();return T(t)||Fd(252),t.getChildren()[n.offset+e]||null}return null}function rs(n,e={}){const{target:t,title:r}=e,s=e.rel===void 0?"noreferrer":e.rel,i=$();if(!N(i))return;const o=i.extract();if(n===null)return void o.forEach((u=>{const c=Wt(u,(f=>!gt(f)&&ye(f)));if(c){const f=c.getChildren();for(let d=0;d<f.length;d++)c.insertBefore(f[d]);c.remove()}}));const l=new Set,a=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(n),t!==void 0&&u.setTarget(t),s!==void 0&&u.setRel(s),r!==void 0&&u.setTitle(r))};if(o.length===1){const u=Ro(o[0],ye);if(u!==null)return a(u)}(function(u){const c=$();if(!N(c))return u();const f=Dt(c),d=f.isBackward(),h=Oo(f.anchor,d?-1:0),p=Oo(f.focus,d?0:-1);if(u(),h||p){const _=$();if(N(_)){const m=_.clone();if(h){const x=h.getParent();x&&m.anchor.set(x.getKey(),h.getIndexWithinParent()+(d?1:0),"element")}if(p){const x=p.getParent();x&&m.focus.set(x.getKey(),p.getIndexWithinParent()+(d?0:1),"element")}J(Dt(m))}}})((()=>{let u=null;for(const c of o){if(!c.isAttached())continue;const f=Ro(c,ye);if(f){a(f);continue}if(T(c)){if(!c.isInline())continue;if(ye(c)){if(!(gt(c)||u!==null&&u.getParentOrThrow().isParentOf(c))){a(c),u=c;continue}for(const h of c.getChildren())c.insertBefore(h);c.remove();continue}}const d=c.getPreviousSibling();
21ye(d)&&d.is(u)?d.append(c):(u=gn(n,{rel:s,target:t,title:r}),c.insertAfter(u),u.append(c))}}))}function Ro(n,e){let t=n;for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}function Ld(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Le=Ld((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function Pd(n){let e=1,t=n.getParent();for(;t!=null;){if(U(t)){const r=t.getParent();if(D(r)){e++,t=r.getParent();continue}Le(40)}return e}return e}function As(n){let e=n.getParent();D(e)||Le(40);let t=e;for(;t!==null;)t=t.getParent(),D(t)&&(e=t);return e}function Ca(n){let e=[];const t=n.getChildren().filter(U);for(let r=0;r<t.length;r++){const s=t[r],i=s.getFirstChild();D(i)?e=e.concat(Ca(i)):e.push(s)}return e}function Pe(n){return U(n)&&D(n.getFirstChild())}function Do(n){return he().append(n)}function Ta(n,e){return U(n)&&(e.length===0||e.length===1&&n.is(e[0])&&n.getChildrenSize()===0)}function Fs(n,e){n.update((()=>{const t=$();if(t!==null){const r=t.getNodes();if(N(t)){const i=t.getStartEndPoints();i===null&&Le(143);const[o]=i,l=o.getNode(),a=l.getParent();if(Ta(l,r)){const u=ce(e);if(de(a)){l.replace(u);const c=he();T(l)&&(c.setFormat(l.getFormatType()),c.setIndent(l.getIndent())),u.append(c)}else if(U(l)){const c=l.getParentOrThrow();vt(u,c.getChildren()),c.replace(u)}return}}const s=new Set;for(let i=0;i<r.length;i++){const o=r[i];if(!T(o)||!o.isEmpty()||U(o)||s.has(o.getKey())){if(ui(o)){let l=o.getParent();for(;l!=null;){const a=l.getKey();if(D(l)){if(!s.has(a)){const u=ce(e);vt(u,l.getChildren()),l.replace(u),s.add(a)}break}{const u=l.getParent();if(de(u)&&!s.has(a)){s.add(a),Mo(l,e);break}l=u}}}}else Mo(o,e)}}}))}function vt(n,e){n.splice(n.getChildrenSize(),0,e)}function Mo(n,e){if(D(n))return n;const t=n.getPreviousSibling(),r=n.getNextSibling(),s=he();let i;if(vt(s,n.getChildren()),D(t)&&e===t.getListType())t.append(s),D(r)&&e===r.getListType()&&(vt(t,r.getChildren()),r.remove()),i=t;else if(D(r)&&e===r.getListType())r.getFirstChildOrThrow().insertBefore(s),i=r;else{const o=ce(e);o.append(s),n.replace(o),i=o}return s.setFormat(n.getFormatType()),s.setIndent(n.getIndent()),n.remove(),i}function Ti(n,e){const t=n.getLastChild(),r=e.getFirstChild();t&&r&&Pe(t)&&Pe(r)&&(Ti(t.getFirstChild(),r.getFirstChild()),r.remove());const s=e.getChildren();s.length>0&&n.append(...s),e.remove()}function Od(n){n.update((()=>{const e=$();if(N(e)){const t=new Set,r=e.getNodes(),s=e.anchor.getNode();if(Ta(s,r))t.add(As(s));else for(let i=0;i<r.length;i++){const o=r[i];if(ui(o)){const l=ma(o,lt);l!=null&&t.add(As(l))}}for(const i of t){let o=i;const l=Ca(i);for(const a of l){const u=q();vt(u,a.getChildren()),o.insertAfter(u),o=u,a.__key===e.anchor.key&&e.anchor.set(u.getKey(),0,"element"),a.__key===e.focus.key&&e.focus.set(u.getKey(),0,"element"),a.remove()}i.remove()}}}))}function Rd(n){const e=new Set;if(Pe(n)||e.has(n.getKey()))return;const t=n.getParent(),r=n.getNextSibling(),s=n.getPreviousSibling();if(Pe(r)&&Pe(s)){const i=s.getFirstChild();if(D(i)){i.append(n);const o=r.getFirstChild();D(o)&&(vt(i,o.getChildren()),r.remove(),e.add(r.getKey()))}}else if(Pe(r)){const i=r.getFirstChild();if(D(i)){const o=i.getFirstChild();o!==null&&o.insertBefore(n)}}else if(Pe(s)){const i=s.getFirstChild();D(i)&&i.append(n)}else if(D(t)){const i=he(),o=ce(t.getListType());i.append(o),o.append(n),s?s.insertAfter(i):r?r.insertBefore(i):t.append(i)}}function Dd(n){if(Pe(n))return;const e=n.getParent(),t=e?e.getParent():void 0;if(D(t?t.getParent():void 0)&&U(t)&&D(e)){const r=e?e.getFirstChild():void 0,s=e?e.getLastChild():void 0;if(n.is(r))t.insertBefore(n),e.isEmpty()&&t.remove();else if(n.is(s))t.insertAfter(n),e.isEmpty()&&t.remove();else{const i=e.getListType(),o=he(),l=ce(i);
21o.append(l),n.getPreviousSiblings().forEach((c=>l.append(c)));const a=he(),u=ce(i);a.append(u),vt(u,n.getNextSiblings()),t.insertBefore(o),t.insertAfter(a),t.replace(n)}}}function Md(){const n=$();if(!N(n)||!n.isCollapsed())return!1;const e=n.anchor.getNode();if(!U(e)||e.getChildrenSize()!==0)return!1;const t=As(e),r=e.getParent();D(r)||Le(40);const s=r.getParent();let i;if(de(s))i=q(),i.setTextStyle(n.style),i.setTextFormat(n.format),t.insertAfter(i);else{if(!U(s))return!1;i=he(),s.insertAfter(i)}i.select();const o=e.getNextSiblings();if(o.length>0){const l=ce(r.getListType());if(U(i)){const a=he();a.append(l),i.insertAfter(a)}else i.insertAfter(l);l.append(...o)}return(function(l){let a=l;for(;a.getNextSibling()==null&&a.getPreviousSibling()==null;){const u=a.getParent();if(u==null||!U(a)&&!D(a))break;a=u}a.remove()})(e),!0}function sr(...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}let lt=class ka extends Me{static getType(){return"listitem"}static clone(e){return new ka(e.__value,e.__checked,e.__key)}constructor(e,t,r){super(r),this.__value=e===void 0?1:e,this.__checked=t}createDOM(e){const t=document.createElement("li"),r=this.getParent();return D(r)&&r.getListType()==="check"&&Bo(t,this,null),t.value=this.__value,zo(t,e.theme,this),t}updateDOM(e,t,r){const s=this.getParent();return D(s)&&s.getListType()==="check"&&Bo(t,this,e),t.value=this.__value,zo(t,r.theme,this),!1}static transform(){return e=>{if(U(e)||Le(144),e.__checked==null)return;const t=e.getParent();D(t)&&t.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:zd,priority:0})}}static importJSON(e){const t=he();return t.setChecked(e.checked),t.setValue(e.value),t.setFormat(e.format),t.setDirection(e.direction),t}exportDOM(e){const t=this.createDOM(e._config);return t.style.textAlign=this.getFormatType(),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){const r=e[t];if(T(r)&&this.canMergeWith(r)){const s=r.getChildren();this.append(...s),r.remove()}else super.append(r)}return this}replace(e,t){if(U(e))return super.replace(e);this.setIndent(0);const r=this.getParentOrThrow();if(!D(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{const s=ce(r.getListType());let i=this.getNextSibling();for(;i;){const o=i;i=i.getNextSibling(),s.append(o)}r.insertAfter(e),e.insertAfter(s)}
21return t&&(T(e)||Le(139),this.getChildren().forEach((s=>{e.append(s)}))),this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,t=!0){const r=this.getParentOrThrow();if(D(r)||Le(39),U(e))return super.insertAfter(e,t);const s=this.getNextSiblings();if(r.insertAfter(e,t),s.length!==0){const i=ce(r.getListType());s.forEach((o=>i.append(o))),e.insertAfter(i,t)}return e}remove(e){const t=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),t&&r&&Pe(t)&&Pe(r)&&(Ti(t.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(e,t=!0){const r=he(this.__checked==null&&void 0);return this.insertAfter(r,t),r}collapseAtStart(e){const t=q();this.getChildren().forEach((o=>t.append(o)));const r=this.getParentOrThrow(),s=r.getParentOrThrow(),i=U(s);if(r.getChildrenSize()===1)if(i)r.remove(),s.select();else{r.insertBefore(t),r.remove();const o=e.anchor,l=e.focus,a=t.getKey();o.type==="element"&&o.getNode().is(this)&&o.set(a,o.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(a,l.offset,"element")}else r.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){const e=this.getLatest();let t;const r=this.getParent();return D(r)&&(t=r.getListType()),t==="check"?!!e.__checked:void 0}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const e=this.getParent();if(e===null)return this.getLatest().__indent;let t=e.getParentOrThrow(),r=0;for(;U(t);)t=t.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&Le(117),(e=Math.floor(e))>=0||Le(199);let t=this.getIndent();for(;t!==e;)t<e?(Rd(this),t++):(Dd(this),t--);return this}canInsertAfter(e){return U(e)}canReplaceWith(e){return U(e)}canMergeWith(e){return U(e)||bt(e)}extractWithChild(e,t){if(!N(t))return!1;const r=t.anchor.getNode(),s=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(s)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return ce("bullet")}canMergeWhenEmpty(){return!0}};function zo(n,e,t){const r=[],s=[],i=e.list,o=i?i.listitem:void 0;let l;if(i&&i.nested&&(l=i.nested.listitem),o!==void 0&&r.push(...sr(o)),i){const a=t.getParent(),u=D(a)&&a.getListType()==="check",c=t.getChecked();u&&!c||s.push(i.listitemUnchecked),u&&c||s.push(i.listitemChecked),u&&r.push(c?i.listitemChecked:i.listitemUnchecked)}if(l!==void 0){const a=sr(l);t.getChildren().some((u=>D(u)))?r.push(...a):s.push(...a)}s.length>0&&Fr(n,...s),r.length>0&&Ae(n,...r)}function Bo(n,e,t,r){D(e.getFirstChild())?(n.removeAttribute("role"),n.removeAttribute("tabIndex"),n.removeAttribute("aria-checked")):(n.setAttribute("role","checkbox"),n.setAttribute("tabIndex","-1"),t&&e.__checked===t.__checked||n.setAttribute("aria-checked",e.getChecked()?"true":"false"))}function zd(n){if(n.classList.contains("task-list-item")){for(const t of n.children)if(t.tagName==="INPUT")return Bd(t)}const e=n.getAttribute("aria-checked");return{node:he(e==="true"||e!=="false"&&void 0)}}function Bd(n){return n.getAttribute("type")!=="checkbox"?{node:null}:{node:he(n.hasAttribute("checked"))}}function he(n){return xe(new lt(void 0,n))}function U(n){return n instanceof lt}let at=class Na extends Me{static getType(){return"list"}static clone(e){const t=e.__listType||jo[e.__tag];return new Na(t,e.__start,e.__key)}constructor(e,t,r){super(r);const s=jo[e]||e;this.__listType=s,this.__tag=s==="number"?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){const t=this.getWritable();t.__listType=e,t.__tag=e==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e,t){const r=this.__tag,s=document.createElement(r);return this.__start!==1&&s.setAttribute("start",String(this.__start)),s.__lexicalListType=this.__listType,Uo(s,e.theme,this),s}updateDOM(e,t,r){return e.__tag!==this.__tag||(Uo(t,r.theme,this),!1)}static transform(){return e=>{D(e)||Le(163),(function(t){const r=t.getNextSibling();D(r)&&t.getListType()===r.getListType()&&Ti(t,r)})(e),(function(t){const r=t.getListType()!=="check";let s=t.getStart();for(const i of t.getChildren())U(i)&&(i.getValue()!==s&&i.setValue(s),r&&i.getLatest().__checked!=null&&i.setChecked(void 0),D(i.getFirstChild())||s++)})(e)}}
21static importDOM(){return{ol:()=>({conversion:Wo,priority:0}),ul:()=>({conversion:Wo,priority:0})}}static importJSON(e){const t=ce(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){const t=this.createDOM(e._config,e);return se(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let t=0;t<e.length;t++){const r=e[t];if(U(r))super.append(r);else{const s=he();if(D(r))s.append(r);else if(T(r))if(r.isInline())s.append(r);else{const i=K(r.getTextContent());s.append(i)}else s.append(r);super.append(s)}}return this}extractWithChild(e){return U(e)}};function Uo(n,e,t){const r=[],s=[],i=e.list;if(i!==void 0){const o=i[`${t.__tag}Depth`]||[],l=Pd(t)-1,a=l%o.length,u=o[a],c=i[t.__tag];let f;const d=i.nested,h=i.checklist;if(d!==void 0&&d.list&&(f=d.list),c!==void 0&&r.push(c),h!==void 0&&t.__listType==="check"&&r.push(h),u!==void 0){r.push(...sr(u));for(let p=0;p<o.length;p++)p!==a&&s.push(t.__tag+p)}if(f!==void 0){const p=sr(f);l>1?r.push(...p):s.push(...p)}}s.length>0&&Fr(n,...s),r.length>0&&Ae(n,...r)}function Ud(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t];if(U(r)){e.push(r);const s=r.getChildren();s.length>1&&s.forEach((i=>{D(i)&&e.push(Do(i))}))}else e.push(Do(r))}return e}function Wo(n){const e=n.nodeName.toLowerCase();let t=null;return e==="ol"?t=ce("number",n.start):e==="ul"&&(t=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list"))return!0;for(const s of r.childNodes)if(se(s)&&s.hasAttribute("aria-checked"))return!0;return!1})(n)?ce("check"):ce("bullet")),{after:Ud,node:t}}const jo={ol:"number",ul:"bullet"};function ce(n,e=1){return xe(new at(n,e))}function D(n){return n instanceof at}const Aa=Mt(),Fa=Mt(),$a=Mt(),Dn=Mt();function Wd(n){return be(n.registerCommand(Fa,(()=>(Fs(n,"number"),!0)),Z),n.registerCommand(Aa,(()=>(Fs(n,"bullet"),!0)),Z),n.registerCommand(Dn,(()=>(Od(n),!0)),Z),n.registerCommand(on,(()=>!!Md()),Z))}function jd(n,e){const t=e.body?e.body.childNodes:[];let r=[];const s=[];for(let i=0;i<t.length;i++){const o=t[i];if(!La.has(o.nodeName)){const l=Pa(o,n,s,!1);l!==null&&(r=r.concat(l))}}return(function(i){for(const o of i)o.getNextSibling()instanceof Ei&&o.insertAfter(Ne());for(const o of i){const l=o.getChildren();for(const a of l)o.insertBefore(a);o.remove()}})(s),r}function Kd(n,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const t=document.createElement("div"),r=H().getChildren();for(let s=0;s<r.length;s++)Ia(n,r[s],t,e);return t.innerHTML}function Ia(n,e,t,r=null){let s=r===null||e.isSelected(r);const i=T(e)&&e.excludeFromCopy("html");let o=e;if(r!==null){let h=pi(e);h=A(h)&&r!==null?ha(r,h):h,o=h}const l=T(o)?o.getChildren():[],a=n._nodes.get(o.getType());let u;u=a&&a.exportDOM!==void 0?a.exportDOM(n,o):o.exportDOM(n);const{element:c,after:f}=u;if(!c)return!1;const d=document.createDocumentFragment();for(let h=0;h<l.length;h++){const p=l[h],_=Ia(n,p,d,r);!s&&T(e)&&_&&e.extractWithChild(p,r,"html")&&(s=!0)}if(s&&!i){if((se(c)||gs(c))&&c.append(d),t.append(c),f){const h=f.call(o,c);h&&(gs(c)?c.replaceChildren(h):c.replaceWith(h))}}else t.append(d);return s}const La=new Set(["STYLE","SCRIPT"]);function Pa(n,e,t,r,s=new Map,i){let o=[];if(La.has(n.nodeName))return o;let l=null;const a=(function(p,_){const{nodeName:m}=p,x=_._htmlConversions.get(m.toLowerCase());let g=null;if(x!==void 0)for(const y of x){const b=y(p);b!==null&&(g===null||(g.priority||0)<=(b.priority||0))&&(g=b)}return g!==null?g.conversion:null})(n,e),u=a?a(n):null;let c=null;if(u!==null){c=u.after;const p=u.node;if(l=Array.isArray(p)?p[p.length-1]:p,l!==null){for(const[,_]of s)if(l=_(l,i),!l)break;l&&o.push(...Array.isArray(p)?p:[l])}u.forChild!=null&&s.set(n.nodeName,u.forChild)}const f=n.childNodes;let d=[];const h=(l==null||!de(l))&&(l!=null&&tr(l)||r);for(let p=0;p<f.length;p++)d.push(...Pa(f[p],e,t,h,new Map(s),l));return c!=null&&(d=c(d)),Zn(n)&&(d=Hd(n,d,h?()=>{const p=new Ei;return t.push(p),p}:q)),l==null?d.length>0?o=o.concat(d):Zn(n)&&(function(p){return p.nextSibling==null||p.previousSibling==null?!1:hs(p.nextSibling)&&hs(p.previousSibling)}
21)(n)&&(o=o.concat(Ne())):T(l)&&l.append(...d),o}function Hd(n,e,t){const r=n.style.textAlign,s=[];let i=[];for(let o=0;o<e.length;o++){const l=e[o];if(tr(l))r&&!l.getFormat()&&l.setFormat(r),s.push(l);else if(i.push(l),o===e.length-1||o<e.length-1&&tr(e[o+1])){const a=t();a.setFormat(r),a.append(...i),s.push(a),i=[]}}return s}function Jd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ir=Jd((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function Gd(n,e=$()){return e==null&&ir(166),N(e)&&e.isCollapsed()||e.getNodes().length===0?"":Kd(n,e)}function qd(n,e=$()){return e==null&&ir(166),N(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(Vd(n,e))}function Ko(n,e,t){const r=n.getData("application/x-lexical-editor");if(r)try{const o=JSON.parse(r);if(o.namespace===t._config.namespace&&Array.isArray(o.nodes))return Ho(t,Zd(o.nodes),e)}catch{}const s=n.getData("text/html");if(s)try{const o=new DOMParser().parseFromString((function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:a=>a}).createHTML(l):l})(s),"text/html");return Ho(t,jd(t,o),e)}catch{}const i=n.getData("text/plain")||n.getData("text/uri-list");if(i!=null)if(N(e)){const o=i.split(/(\r?\n|\t)/);o[o.length-1]===""&&o.pop();for(let l=0;l<o.length;l++){const a=$();if(N(a)){const u=o[l];u===`
22`||u===`\r
23`?a.insertParagraph():u==="	"?a.insertNodes([zt()]):a.insertText(u)}}}else e.insertRawText(i)}function Ho(n,e,t){n.dispatchCommand(Vu,{nodes:e,selection:t})||t.insertNodes(e)}function Oa(n,e,t,r=[]){let s=e===null||t.isSelected(e);const i=T(t)&&t.excludeFromCopy("html");let o=t;if(e!==null){let u=pi(t);u=A(u)&&e!==null?ha(e,u):u,o=u}const l=T(o)?o.getChildren():[],a=(function(u){const c=u.exportJSON(),f=u.constructor;if(c.type!==f.getType()&&ir(58,f.name),T(u)){const d=c.children;Array.isArray(d)||ir(59,f.name)}return c})(o);if(A(o)){const u=o.__text;u.length>0?a.text=u:s=!1}for(let u=0;u<l.length;u++){const c=l[u],f=Oa(n,e,c,a.children);!s&&T(t)&&f&&t.extractWithChild(c,e,"clone")&&(s=!0)}if(s&&!i)r.push(a);else if(Array.isArray(a.children))for(let u=0;u<a.children.length;u++){const c=a.children[u];r.push(c)}return s}function Vd(n,e){const t=[],r=H().getChildren();for(let s=0;s<r.length;s++)Oa(n,e,r[s],t);return{namespace:n._config.namespace,nodes:t}}function Zd(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t],s=Yc(r);A(s)&&id(s),e.push(s)}return e}let wt=null;async function Jo(n,e,t){if(wt!==null)return!1;if(e!==null)return new Promise(((a,u)=>{n.update((()=>{a(Go(n,e,t))}))}));const r=n.getRootElement(),s=n._window==null?window.document:n._window.document,i=Ee(n._window);if(r===null||i===null)return!1;const o=s.createElement("span");o.style.cssText="position: fixed; top: -1000px;",o.append(s.createTextNode("#")),r.append(o);const l=new Range;return l.setStart(o,0),l.setEnd(o,1),i.removeAllRanges(),i.addRange(l),new Promise(((a,u)=>{const c=n.registerCommand(pr,(f=>(et(f,ClipboardEvent)&&(c(),wt!==null&&(window.clearTimeout(wt),wt=null),a(Go(n,f,t))),!0)),ed);wt=window.setTimeout((()=>{c(),wt=null,a(!1)}),50),s.execCommand("copy"),o.remove()}))}function Go(n,e,t){if(t===void 0){const s=Ee(n._window);if(!s)return!1;const i=s.anchorNode,o=s.focusNode;if(i!==null&&o!==null&&!_n(n,i,o))return!1;const l=$();if(l===null)return!1;t=Xd(l)}e.preventDefault();const r=e.clipboardData;return r!==null&&(Qd(r,t),!0)}const Yd=[["text/html",Gd],["application/x-lexical-editor",qd]];function Xd(n=$()){const e={"text/plain":n?n.getTextContent():""};if(n){const t=Lc();for(const[r,s]of Yd){const i=s(t,n);i!==null&&(e[r]=i)}}return e}function Qd(n,e){for(const t in e){const r=e[t];r!==void 0&&n.setData(t,r)}}function qo(n,e){if(document.caretRangeFromPoint!==void 0){const t=document.caretRangeFromPoint(n,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const t=document.caretPositionFromPoint(n,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}const Kt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,ef=Kt&&"documentMode"in document?document.documentMode:null,tf=!(!Kt||!("InputEvent"in window)||ef)&&"getTargetRanges"in new window.InputEvent("input"),nf=Kt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Vo=Kt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,rf=Kt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),sf=Kt&&/AppleWeb
23Kit\/[\d.]+/.test(navigator.userAgent)&&!rf,Zo=Mt();let Lr=class Ra extends Me{static getType(){return"quote"}static clone(e){return new Ra(e.__key)}constructor(e){super(e)}createDOM(e){const t=document.createElement("blockquote");return Ae(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:of,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(se(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();t.style.textAlign=r;const s=this.getDirection();s&&(t.dir=s)}return{element:t}}static importJSON(e){const t=ki();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}insertNewAfter(e,t){const r=q(),s=this.getDirection();return r.setDirection(s),this.insertAfter(r,t),r}collapseAtStart(){const e=q();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function ki(){return xe(new Lr)}function $s(n){return n instanceof Lr}let Pr=class Da extends Me{static getType(){return"heading"}static clone(e){return new Da(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}createDOM(e){const t=this.__tag,r=document.createElement(t),s=e.theme.heading;if(s!==void 0){const i=s[t];Ae(r,i)}return r}updateDOM(e,t){return!1}static importDOM(){return{h1:e=>({conversion:Ct,priority:0}),h2:e=>({conversion:Ct,priority:0}),h3:e=>({conversion:Ct,priority:0}),h4:e=>({conversion:Ct,priority:0}),h5:e=>({conversion:Ct,priority:0}),h6:e=>({conversion:Ct,priority:0}),p:e=>{const t=e.firstChild;return t!==null&&Yo(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>Yo(e)?{conversion:t=>({node:Nt("h1")}),priority:3}:null}}exportDOM(e){const{element:t}=super.exportDOM(e);if(se(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();t.style.textAlign=r;const s=this.getDirection();s&&(t.dir=s)}return{element:t}}static importJSON(e){const t=Nt(e.tag);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){const r=e?e.anchor.offset:0,s=this.getLastDescendant(),i=!s||e&&e.anchor.key===s.getKey()&&r===s.getTextContentSize()||!e?q():Nt(this.getTag()),o=this.getDirection();if(i.setDirection(o),this.insertAfter(i,t),r===0&&!this.isEmpty()&&e){const l=q();l.select(),this.replace(l,!0)}return i}collapseAtStart(){const e=this.isEmpty()?q():Nt(this.getTag());
23return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}};function Yo(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function Ct(n){const e=n.nodeName.toLowerCase();let t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Nt(e),n.style!==null&&(mi(n,t),t.setFormat(n.style.textAlign))),{node:t}}function of(n){const e=ki();return n.style!==null&&(e.setFormat(n.style.textAlign),mi(n,e)),{node:e}}function Nt(n){return xe(new Pr(n))}function lf(n){return n instanceof Pr}function $n(n){let e=null;if(et(n,DragEvent)?e=n.dataTransfer:et(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];const t=e.types,r=t.includes("Files"),s=t.includes("text/html")||t.includes("text/plain");return[r,Array.from(e.files),s]}function Xo(n){const e=$();if(!N(e))return!1;const t=new Set,r=e.getNodes();for(let s=0;s<r.length;s++){const i=r[s],o=i.getKey();if(t.has(o))continue;const l=Wt(i,(u=>T(u)&&!u.isInline()));if(l===null)continue;const a=l.getKey();l.canIndent()&&!t.has(a)&&(t.add(a),n(l))}return t.size>0}function In(n){const e=Je(n);return W(e)}function ss(n){for(const e of["lowercase","uppercase","capitalize"])n.hasFormat(e)&&n.toggleFormat(e)}function af(n){return be(n.registerCommand(Ws,(e=>{const t=$();return!!oe(t)&&(t.clear(),!0)}),0),n.registerCommand(pt,(e=>{const t=$();return!!N(t)&&(t.deleteCharacter(e),!0)}),z),n.registerCommand(ln,(e=>{const t=$();return!!N(t)&&(t.deleteWord(e),!0)}),z),n.registerCommand(an,(e=>{const t=$();return!!N(t)&&(t.deleteLine(e),!0)}),z),n.registerCommand($t,(e=>{const t=$();if(typeof e=="string")t!==null&&t.insertText(e);else{if(t===null)return!1;const r=e.dataTransfer;if(r!=null)Ko(r,t,n);else if(N(t)){const s=e.data;return s&&t.insertText(s),!0}}return!0}),z),n.registerCommand(us,(()=>{const e=$();return!!N(e)&&(e.removeText(),!0)}),z),n.registerCommand(je,(e=>{const t=$();return!!N(t)&&(t.formatText(e),!0)}),z),n.registerCommand(Qu,(e=>{const t=$();if(!N(t)&&!oe(t))return!1;const r=t.getNodes();for(const s of r){const i=Wt(s,(o=>T(o)&&!o.isInline()));i!==null&&i.setFormat(e)}return!0}),z),n.registerCommand(Ft,(e=>{const t=$();return!!N(t)&&(t.insertLineBreak(e),!0)}),z),n.registerCommand(on,(()=>{const e=$();return!!N(e)&&(e.insertParagraph(),!0)}),z),n.registerCommand(bl,(()=>(qc([zt()]),!0)),z),n.registerCommand(vl,(()=>Xo((e=>{const t=e.getIndent();e.setIndent(t+1)}))),z),n.registerCommand(cs,(()=>Xo((e=>{const t=e.getIndent();t>0&&e.setIndent(t-1)}))),z),n.registerCommand(dr,(e=>{const t=$();if(oe(t)&&!In(e.target)){const r=t.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(N(t)){const r=un(t.focus,!0);if(!e.shiftKey&&W(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1}),z),n.registerCommand(fr,(e=>{const t=$();if(oe(t)){const r=t.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(N(t)){if((function(s){const i=s.focus;return i.key==="root"&&i.offset===H().getChildrenSize()})(t))return e.preventDefault(),!0;const r=un(t.focus,!1);if(!e.shiftKey&&W(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1}),z),n.registerCommand(Hs,(e=>{const t=$();if(oe(t)){const r=t.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectPrevious(),!0}if(!N(t))return!1;if(yo(t,!0)){const r=e.shiftKey;return e.preventDefault(),xo(t,r,!0),!0}return!1}),z),n.registerCommand(xl,(e=>{const t=$();if(oe(t)&&!In(e.target)){const s=t.getNodes();if(s.length>0)return e.preventDefault(),s[0].selectNext(0,0),!0}if(!N(t))return!1;const r=e.shiftKey;return!!yo(t,!1)&&(e.preventDefault(),xo(t,r,!1),!0)}),z),n.registerCommand(Gs,(e=>{if(In(e.target))return!1;const t=$();if(!N(t))return!1;const{anchor:r}=t,s=r.getNode();return t.isCollapsed()&&r.offset===0&&!ae(s)&&_a(s).getIndent()>0?(e.preventDefault(),n.dispatchCommand(cs,void 0)):(!Vo||navigator.language!=="ko-KR")&&(e.preventDefault(),n.dispatchCommand(pt,!0))}),z),n.registerCommand(qs,(e=>{if(In(e.target))return!1;const t=$();return!!N(t)&&(e.preventDefault(),n.dispatchCommand(pt,!1))}),z),n.registerCommand(Ot,(e=>{const t=$();if(!N(t))return!1;if(ss(t),e!==null){if((Vo||nf||sf)&&tf)return!1;if(e.preventDefault(),e.shiftKey)return n.dispatchCommand(Ft,!1)}return n.dispatchCommand(on,void 0)}),z),n.registerCommand(gr,(()=>{const e=$();return!!N(e)&&(n.blur(),!0)}),z),n.registerCommand(Sl,(e=>{const[,t]=$n(e);if(t.length>0){const s=qo(e.clientX,e.clientY);if(s!==null){const{offset:i,node:o}=s,l=Je(o);if(l!==null){const a=Tr();if(A(l))a.anchor.set(l.getKey(),i,"text"),a.focus.set(l.getKey(),i,"text");else{const c=l.getParentOrThrow().getKey(),f=l.getIndexWithinParent()+1;a.anchor.set(c,f,"element"),a.focus.set(c,f,"element")}const u=Dt(a);J(u)}n.dispatchCommand(Zo,t)}return e.preventDefault(),!0}const r=$();return!!N(r)}),z),n.registerCommand(El,(e=>{const[t]=$n(e),r=$();return!(t&&!N(r))}),z),n.registerCommand(wl,(e=>{const[t]=$n(e),r=$();if(t&&!N(r))return!1;const s=qo(e.clientX,e.clientY);if(s!==null){const i=Je(s.node);W(i)&&e.preventDefault()}return!0}),z),n.registerCommand(ds,(()=>(Fc(),!0)),z),n.registerCommand(pr,(e=>(Jo(n,et(e,ClipboardEvent)?e:null),!0)),z),n.registerCommand(Vs,(e=>((async function(t,r){await Jo(r,et(t,ClipboardEvent)?t:null),r.update((()=>{const s=$();
23N(s)?s.removeText():oe(s)&&s.getNodes().forEach((i=>i.remove()))}))})(e,n),!0)),z),n.registerCommand(cr,(e=>{const[,t,r]=$n(e);return t.length>0&&!r?(n.dispatchCommand(Zo,t),!0):Sr(e.target)&&oi(e.target)?!1:$()!==null&&((function(s,i){s.preventDefault(),i.update((()=>{const o=$(),l=et(s,InputEvent)||et(s,KeyboardEvent)?null:s.clipboardData;l!=null&&o!==null&&Ko(l,o,i)}),{tag:"paste"})})(e,n),!0)}),z),n.registerCommand(Js,(e=>{const t=$();return N(t)&&ss(t),!1}),z),n.registerCommand(hr,(e=>{const t=$();return N(t)&&ss(t),!1}),z))}function Is(n,e){const t={};for(const r of n){const s=e(r);s&&(t[s]?t[s].push(r):t[s]=[r])}return t}function Ni(n){const e=Is(n,(t=>t.type));return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const or=/[!-/:-@[-`{-~\s]/,uf=/^\s{0,3}$/;function Ls(n){if(!bt(n))return!1;const e=n.getFirstChild();return e==null||n.getChildrenSize()===1&&A(e)&&uf.test(e.getTextContent())}function cf(n,e,t,r){for(const s of e){if(!s.export)continue;const i=s.export(n,(o=>lr(o,t,r)));if(i!=null)return i}return T(n)?lr(n,t,r):W(n)?n.getTextContent():null}function lr(n,e,t){const r=[],s=n.getChildren(),i=[];e:for(const o of s){for(const l of t){if(!l.export)continue;const a=l.export(o,(u=>lr(u,e,t)),((u,c)=>Qo(u,c,e,i)));if(a!=null){r.push(a);continue e}}Re(o)?r.push(`
24`):A(o)?r.push(Qo(o,o.getTextContent(),e,i)):T(o)?r.push(lr(o,e,t)):W(o)&&r.push(o.getTextContent())}return r.join("")}function Qo(n,e,t,r){const s=e.trim();let i=s,o="",l="";const a=el(n,!0),u=el(n,!1),c=new Set;for(const f of t){const d=f.format[0],h=f.tag;is(n,d)&&!c.has(d)&&(c.add(d),is(a,d)&&r.find((p=>p.tag===h))||(r.push({format:d,tag:h}),o+=h))}for(let f=0;f<r.length;f++)if(!is(u,r[f].format)){for(;r.length>f;){const d=r.pop();d&&typeof d.tag=="string"&&(l+=d.tag)}break}return i=o+i+l,e.replace(s,(()=>i))}function el(n,e){let t=e?n.getPreviousSibling():n.getNextSibling();if(!t){const r=n.getParentOrThrow();r.isInline()&&(t=e?r.getPreviousSibling():r.getNextSibling())}for(;t;){if(T(t)){if(!t.isInline())break;const r=e?t.getLastDescendant():t.getFirstDescendant();if(A(r))return r;t=e?t.getPreviousSibling():t.getNextSibling()}if(A(t))return t;if(!T(t))return null}return null}function is(n,e){return A(n)&&n.hasFormat(e)}const Ht=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,df=Ht&&"documentMode"in document?document.documentMode:null;Ht&&"InputEvent"in window&&!df&&new window.InputEvent("input");const tl=Ht&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),nl=Ht&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ff=Ht&&/^(?=.*Chrome).*/i.test(navigator.userAgent),rl=Ht&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!ff;function gf(n,e=!1){const t=Ni(n),r=(function(s){const i={},o={},l=[],a="(?<![\\\\])";for(const u of s){const{tag:c}=u;i[c]=u;const f=c.replace(/(\*|\^|\+)/g,"\\$1");l.push(f),o[c]=tl||nl||rl?new RegExp(`(${f})(?![${f}\\s])(.*?[^${f}\\s])${f}(?!${f})`):new RegExp(`(?<![\\\\${f}])(${f})((\\\\${f})?.*?[^${f}\\s](\\\\${f})?)((?<!\\\\)|(?<=\\\\\\\\))(${f})(?![\\\\${f}])`)}return{fullMatchRegExpByTag:o,openTagsRegExp:new RegExp((tl||nl||rl?"":`${a}`)+"("+l.join("|")+")","g"),transformersByTag:i}})(t.textFormat);return(s,i)=>{const o=s.split(`
25`),l=o.length,a=i||H();a.clear();for(let c=0;c<l;c++){const f=o[c],[d,h]=hf(o,c,t.multilineElement,a);d?c=h:pf(f,a,t.element,r,t.textMatch)}const u=a.getChildren();for(const c of u)!e&&Ls(c)&&a.getChildrenSize()>1&&c.remove();$()!==null&&a.selectStart()}}function hf(n,e,t,r){for(const s of t){const{handleImportAfterStartMatch:i,regExpEnd:o,regExpStart:l,replace:a}=s,u=n[e].match(l);if(!u)continue;if(i){const p=i({lines:n,rootNode:r,startLineIndex:e,startMatch:u,transformer:s});if(p===null)continue;if(p)return p}const c=typeof o=="object"&&"regExp"in o?o.regExp:o,f=o&&typeof o=="object"&&"optional"in o?o.optional:!o;let d=e;const h=n.length;for(;d<h;){const p=c?n[d].match(c):null;if(!p&&(!f||f&&d<h-1)){d++;continue}if(p&&e===d&&p.index===u.index){d++;continue}const _=[];
25if(p&&e===d)_.push(n[e].slice(u[0].length,-p[0].length));else for(let m=e;m<=d;m++)if(m===e){const x=n[m].slice(u[0].length);_.push(x)}else if(m===d&&p){const x=n[m].slice(0,-p[0].length);_.push(x)}else _.push(n[m]);if(a(r,null,u,p,_,!0)!==!1)return[!0,d];break}}return[!1,e]}function pf(n,e,t,r,s){const i=K(n),o=q();o.append(i),e.append(o);for(const{regExp:l,replace:a}of t){const u=n.match(l);if(u&&(i.setTextContent(n.slice(u[0].length)),a(o,[i],u,!0)!==!1))break}if(Mn(i,r,s),o.isAttached()&&n.length>0){const l=o.getPreviousSibling();if(bt(l)||$s(l)||D(l)){let a=l;if(D(l)){const u=l.getLastDescendant();a=u==null?null:Wt(u,U)}a!=null&&a.getTextContentSize()>0&&(a.splice(a.getChildrenSize(),0,[Ne(),...o.getChildren()]),o.remove())}}}function Mn(n,e,t){const r=n.getTextContent(),s=(function(u,c){const f=u.match(c.openTagsRegExp);if(f==null)return null;for(const d of f){const h=d.replace(/^\s/,""),p=c.fullMatchRegExpByTag[h];if(p==null)continue;const _=u.match(p),m=c.transformersByTag[h];if(_!=null&&m!=null){if(m.intraword!==!1)return _;const{index:x=0}=_,g=u[x-1],y=u[x+_[0].length];if((!g||or.test(g))&&(!y||or.test(y)))return _}}return null})(r,e);if(!s)return void Ma(n,t);let i,o,l;if(s[0]===r)i=n;else{const u=s.index||0,c=u+s[0].length;u===0?[i,o]=n.splitText(c):[l,i,o]=n.splitText(u,c)}i.setTextContent(s[2]);const a=e.transformersByTag[s[1]];if(a)for(const u of a.format)i.hasFormat(u)||i.toggleFormat(u);i.hasFormat("code")||Mn(i,e,t),l&&Mn(l,e,t),o&&Mn(o,e,t)}function Ma(n,e){let t=n;e:for(;t;){for(const r of e){if(!r.replace||!r.importRegExp)continue;const s=t.getTextContent().match(r.importRegExp);if(!s)continue;const i=s.index||0,o=r.getEndIndex?r.getEndIndex(t,s):i+s[0].length;if(o===!1)continue;let l,a;i===0?[l,t]=t.splitText(o):[,l,a]=t.splitText(i,o),a&&Ma(a,e),r.replace(l,s);continue e}break}}function mf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _f=mf((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function sl(n,e,t){const r=t.length;for(let s=e;s>=r;s--){const i=s-r;if(za(n,i,t,0,r)&&n[i+r]!==" ")return i}return-1}function za(n,e,t,r,s){for(let i=0;i<s;i++)if(n[e+i]!==t[r+i])return!1;return!0}function yf(n,e=Rr){const t=Ni(e),r=Is(t.textFormat,(({tag:o})=>o[o.length-1])),s=Is(t.textMatch,(({trigger:o})=>o));for(const o of e){const l=o.type;if(l==="element"||l==="text-match"||l==="multiline-element"){const a=o.dependencies;for(const u of a)n.hasNode(u)||_f(173,u.getType())}}const i=(o,l,a)=>{(function(u,c,f,d){const h=u.getParent();if(!de(h)||u.getFirstChild()!==c)return!1;const p=c.getTextContent();if(p[f-1]!==" ")return!1;for(const{regExp:_,replace:m}of d){const x=p.match(_);if(x&&x[0].length===(x[0].endsWith(" ")?f:f-1)){const g=c.getNextSiblings(),[y,b]=c.splitText(f);if(y.remove(),m(u,b?[b,...g]:g,x,!1)!==!1)return!0}}return!1})(o,l,a,t.element)||(function(u,c,f,d){const h=u.getParent();if(!de(h)||u.getFirstChild()!==c)return!1;const p=c.getTextContent();if(p[f-1]!==" ")return!1;for(const{regExpStart:_,replace:m,regExpEnd:x}of d){if(x&&!("optional"in x)||x&&"optional"in x&&!x.optional)continue;const g=p.match(_);if(g&&g[0].length===(g[0].endsWith(" ")?f:f-1)){const y=c.getNextSiblings(),[b,S]=c.splitText(f);if(b.remove(),m(u,S?[S,...y]:y,g,null,null,!1)!==!1)return!0}}return!1})(o,l,a,t.multilineElement)||(function(u,c,f){let d=u.getTextContent();const h=f[d[c-1]];if(h==null)return!1;c<d.length&&(d=d.slice(0,c));for(const p of h){if(!p.replace||!p.regExp)continue;const _=d.match(p.regExp);if(_===null)continue;const m=_.index||0,x=m+_[0].length;let g;return m===0?[g]=u.splitText(x):[,g]=u.splitText(m,x),g.selectNext(0,0),p.replace(g,_),!0}return!1})(l,a,s)||(function(u,c,f){const d=u.getTextContent(),h=c-1,p=d[h],_=f[p];if(!_)return!1;for(const m of _){const{tag:x}=m,g=x.length,y=h-g+1;if(g>1&&!za(d,y,x,0,g)||d[y-1]===" ")continue;const b=d[h+1];if(m.intraword===!1&&b&&!or.test(b))continue;const S=u;let v=S,E=sl(d,y,x),w=v;for(;E<0&&(w=w.getPreviousSibling())&&!Re(w);)if(A(w)){const Q=w.getTextContent();v=w,E=sl(Q,Q.length,x)}if(E<0||v===S&&E+g===y)continue;const C=v.getTextContent();if(E>0&&C[E-1]===p)continue;const P=C[E-1];if(m.intraword===!1&&P&&!or.test(P))continue;const O=S.getTextContent(),M=O.slice(0,y)+O.slice(h+1);S.setTextContent(M);const R=v===S?M:C;
25v.setTextContent(R.slice(0,E)+R.slice(E+g));const j=$(),B=Tr();J(B);const ve=h-g*(v===S?2:1)+1;B.anchor.set(v.__key,E,"text"),B.focus.set(S.__key,ve,"text");for(const Q of m.format)B.hasFormat(Q)||B.formatText(Q);B.anchor.set(B.focus.key,B.focus.offset,B.focus.type);for(const Q of m.format)B.hasFormat(Q)&&B.toggleFormat(Q);return N(j)&&(B.format=j.format),!0}})(l,a,r)};return n.registerUpdateListener((({tags:o,dirtyLeaves:l,editorState:a,prevEditorState:u})=>{if(o.has("collaboration")||o.has("historic")||n.isComposing())return;const c=a.read($),f=u.read($);if(!N(f)||!N(c)||!c.isCollapsed()||c.is(f))return;const d=c.anchor.key,h=c.anchor.offset,p=a._nodeMap.get(d);!A(p)||!l.has(d)||h!==1&&h>f.anchor.offset+1||n.update((()=>{if(p.hasFormat("code"))return;const _=p.getParent();_===null||wi(_)||i(_,p,c.anchor.offset)}))}))}const Ba=/^(\s*)(\d{1,})\.\s/,Ua=/^(\s*)[-*+]\s/,Wa=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,Ps=/^(#{1,6})\s/,ja=/^>\s/,Ka=/^[ \t]*```(\w+)?/,Ha=/[ \t]*```$/,xf=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,bf=/^(?:\|)(.+)(?:\|)\s?$/,vf=/^(\| ?:?-*:? ?)+\|\s?$/,Ja=n=>(e,t,r)=>{const s=n(r);s.append(...t),e.replace(s),s.select(0,0)},Ai=n=>(e,t,r)=>{const s=e.getPreviousSibling(),i=e.getNextSibling(),o=he(n==="check"?r[3]==="x":void 0);if(D(i)&&i.getListType()===n){const a=i.getFirstChild();a!==null?a.insertBefore(o):i.append(o),e.remove()}else if(D(s)&&s.getListType()===n)s.append(o),e.remove();else{const a=ce(n,n==="number"?Number(r[2]):void 0);a.append(o),e.replace(a)}o.append(...t),o.select(0,0);const l=(function(a){const u=a.match(/\t/g),c=a.match(/ /g);let f=0;return u&&(f+=u.length),c&&(f+=Math.floor(c.length/4)),f})(r[1]);l&&o.setIndent(l)},Or=(n,e,t)=>{const r=[],s=n.getChildren();let i=0;for(const o of s)if(U(o)){if(o.getChildrenSize()===1){const c=o.getFirstChild();if(D(c)){r.push(Or(c,e,t+1));continue}}const l=" ".repeat(4*t),a=n.getListType(),u=a==="number"?`${n.getStart()+i}. `:a==="check"?`- [${o.getChecked()?"x":" "}] `:"- ";r.push(l+u+e(o)),i++}return r.join(`
26`)},Ga={dependencies:[Pr],export:(n,e)=>{if(!lf(n))return null;const t=Number(n.getTag().slice(1));return"#".repeat(t)+" "+e(n)},regExp:Ps,replace:Ja((n=>{const e="h"+n[1].length;return Nt(e)})),type:"element"},qa={dependencies:[Lr],export:(n,e)=>{if(!$s(n))return null;const t=e(n).split(`
27`),r=[];for(const s of t)r.push("> "+s);return r.join(`
28`)},regExp:ja,replace:(n,e,t,r)=>{if(r){const i=n.getPreviousSibling();if($s(i))return i.splice(i.getChildrenSize(),0,[Ne(),...e]),i.select(0,0),void n.remove()}const s=ki();s.append(...e),n.replace(s),s.select(0,0)},type:"element"},Va={dependencies:[$r],export:n=>{if(!wi(n))return null;const e=n.getTextContent();return"```"+(n.getLanguage()||"")+(e?`
29`+e:"")+"\n```"},regExpEnd:{optional:!0,regExp:Ha},regExpStart:Ka,replace:(n,e,t,r,s,i)=>{let o,l;if(!e&&s){if(s.length===1)r?(o=Oe(),l=t[1]+s[0]):(o=Oe(t[1]),l=s[0].startsWith(" ")?s[0].slice(1):s[0]);else{if(o=Oe(t[1]),s[0].trim().length===0)for(;s.length>0&&!s[0].length;)s.shift();else s[0]=s[0].startsWith(" ")?s[0].slice(1):s[0];for(;s.length>0&&!s[s.length-1].length;)s.pop();l=s.join(`
30`)}const a=K(l);o.append(a),n.append(o)}else e&&Ja((a=>Oe(a?a[1]:void 0)))(n,e,t,i)},type:"multiline-element"}
30,Za={dependencies:[at,lt],export:(n,e)=>D(n)?Or(n,e,0):null,regExp:Ua,replace:Ai("bullet"),type:"element"},Sf={dependencies:[at,lt],export:(n,e)=>D(n)?Or(n,e,0):null,regExp:Wa,replace:Ai("check"),type:"element"},Ya={dependencies:[at,lt],export:(n,e)=>D(n)?Or(n,e,0):null,regExp:Ba,replace:Ai("number"),type:"element"},Xa={format:["code"],tag:"`",type:"text-format"},Ef={format:["highlight"],tag:"==",type:"text-format"},Qa={format:["bold","italic"],tag:"***",type:"text-format"},eu={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},tu={format:["bold"],tag:"**",type:"text-format"},nu={format:["bold"],intraword:!1,tag:"__",type:"text-format"},ru={format:["strikethrough"],tag:"~~",type:"text-format"},su={format:["italic"],tag:"*",type:"text-format"},iu={format:["italic"],intraword:!1,tag:"_",type:"text-format"},ou={dependencies:[jt],export:(n,e,t)=>{if(!ye(n))return null;const r=n.getTitle(),s=r?`[${n.getTextContent()}](${n.getURL()} "${r}")`:`[${n.getTextContent()}](${n.getURL()})`,i=n.getFirstChild();return n.getChildrenSize()===1&&A(i)?t(i,s):s},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(n,e)=>{const[,t,r,s]=e,i=gn(r,{title:s}),o=K(t);o.setFormat(n.getFormat()),i.append(o),n.replace(i)},trigger:")",type:"text-match"},wf=[Ga,qa,Za,Ya],Cf=[Va],Tf=[Xa,Qa,eu,tu,nu,Ef,su,iu,ru],kf=[ou],Rr=[...wf,...Cf,...Tf,...kf];function lu(n,e=Rr,t,r=!1,s=!1){const i=r?n:(function(o,l=!1){const a=o.split(`
31`);let u=!1;const c=[];for(let f=0;f<a.length;f++){const d=a[f],h=c[c.length-1];xf.test(d)?c.push(d):Ka.test(d)||Ha.test(d)?(u=!u,c.push(d)):u||d===""||h===""||!h||Ps.test(h)||Ps.test(d)||ja.test(d)||Ba.test(d)||Ua.test(d)||Wa.test(d)||bf.test(d)||vf.test(d)||!l?c.push(d):c[c.length-1]=h+d}return c.join(`
32`)})(n,s);return gf(e,r)(i,t)}function Nf(n=Rr,e,t=!1){return(function(s,i=!1){const o=Ni(s),l=[...o.multilineElement,...o.element],a=!i,u=o.textFormat.filter((c=>c.format.length===1));return c=>{const f=[],d=(c||H()).getChildren();for(let h=0;h<d.length;h++){const p=d[h],_=cf(p,l,u,o.textMatch);_!=null&&f.push(a&&h>0&&!Ls(p)&&!Ls(d[h-1])?`
33`.concat(_):_)}return f.join(`
34`)}})(n,t)(e)}function Af(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ff=Af((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const au=k.createContext(null);function $f(n,e){return{getTheme:function(){return e??null}}}function Y(){const n=k.useContext(au);return n==null&&Ff(8),n}function If(){const[n]=Y();return k.useEffect((()=>be(n.registerCommand($a,(()=>(Fs(n,"check"),!0)),Z),n.registerCommand(fr,(e=>ll(e,n,!1)),Z),n.registerCommand(dr,(e=>ll(e,n,!0)),Z),n.registerCommand(gr,(e=>{if(Os()!=null){const t=n.getRootElement();return t?.focus(),!0}return!1}),Z),n.registerCommand(Js,(e=>{const t=Os();return!(t==null||!n.isEditable())&&(n.update((()=>{const r=Je(t);U(r)&&(e.preventDefault(),r.toggleChecked())})),!0)}),Z),n.registerCommand(Hs,(e=>n.getEditorState().read((()=>{const t=$();if(N(t)&&t.isCollapsed()){const{anchor:r}=t,s=r.type==="element";if(s||r.offset===0){const i=r.getNode(),o=Wt(i,(l=>T(l)&&!l.isInline()));if(U(o)){const l=o.getParent();if(D(l)&&l.getListType()==="check"&&(s||o.getFirstDescendant()===i)){const a=n.getElementByKey(o.__key);if(a!=null&&document.activeElement!==a)return a.focus(),e.preventDefault(),!0}}}}return!1}))),Z),n.registerRootListener(((e,t)=>{e!==null&&(e.addEventListener("click",il),e.addEventListener("pointerdown",ol)),t!==null&&(t.removeEventListener("click",il),t.removeEventListener("pointerdown",ol))}))))),null}function uu(n,e){const t=n.target;if(!se(t))return;const r=t.firstChild;if(se(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const s=t.parentNode;if(!s||s.__lexicalListType!=="check")return;const i=t.getBoundingClientRect(),o=n.pageX/_d(t);(t.dir==="rtl"?o<i.right&&o>i.right-20:o>i.left&&o<i.left+20)&&e()}function il(n){uu(n,(()=>{if(se(n.target)){const e=n.target,t=ai(e);t!=null&&t.isEditable()&&t.update((()=>{const r=Je(e);U(r)&&(e.focus(),r.toggleChecked())}))}}))}function ol(n){uu(n,(()=>{n.preventDefault()}))}function Os(){const n=document.activeElement;return se(n)&&n.tagName==="LI"&&n.parentNode!=null&&n.parentNode.__lexicalListType==="check"?n:null}function ll(n,e,t){const r=Os();return r!=null&&e.update((()=>{const s=Je(r);if(!U(s))return;const i=(function(o,l){let a=l?o.getPreviousSibling():o.getNextSibling(),u=o;for(;a==null&&U(u);)u=u.getParentOrThrow().getParent(),u!=null&&(a=l?u.getPreviousSibling():u.getNextSibling());for(;U(a);){const c=l?a.getLastChild():a.getFirstChild();if(!D(c))return a;a=l?c.getLastChild():c.getFirstChild()}return null})(s,t);if(i!=null){i.selectStart();const o=e.getElementByKey(i.__key);o!=null&&(n.preventDefault(),setTimeout((()=>{o.focus()}),0))}})),!1}const Lf=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?k.useLayoutEffect:k.useEffect;function Pf({onClear:n}){const[e]=Y();return Lf((()=>e.registerCommand(Zs,(t=>(e.update((()=>
34{if(n==null){const r=H(),s=$(),i=q();r.clear(),r.append(i),s!==null&&i.select(),N(s)&&(s.format=0)}else n()})),!0)),z)),[e,n]),null}const cu=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Of=cu?k.useLayoutEffect:k.useEffect,Ln={tag:"history-merge"};function Rf({initialConfig:n,children:e}){const t=k.useMemo((()=>{const{theme:r,namespace:s,nodes:i,onError:o,editorState:l,html:a}=n,u=$f(null,r),c=td({editable:n.editable,html:a,namespace:s,nodes:i,onError:f=>o(f,c),theme:r});return(function(f,d){if(d!==null){if(d===void 0)f.update((()=>{const h=H();if(h.isEmpty()){const p=q();h.append(p);const _=cu?document.activeElement:null;($()!==null||_!==null&&_===f.getRootElement())&&p.select()}}),Ln);else if(d!==null)switch(typeof d){case"string":{const h=f.parseEditorState(d);f.setEditorState(h,Ln);break}case"object":f.setEditorState(d,Ln);break;case"function":f.update((()=>{H().isEmpty()&&d(f)}),Ln)}}})(c,l),[c,u]}),[]);return Of((()=>{const r=n.editable,[s]=t;s.setEditable(r===void 0||r)}),[]),F.jsx(au.Provider,{value:t,children:e})}function Df(){return H().getTextContent()}function Mf(n,e=!0){if(n)return!1;let t=Df();return e&&(t=t.trim()),t===""}function zf(n){if(!Mf(n,!1))return!1;const e=H().getChildren(),t=e.length;if(t>1)return!1;for(let r=0;r<t;r++){const s=e[r];if(W(s))return!1;if(T(s)){if(!bt(s)||s.__indent!==0)return!1;const i=s.getChildren(),o=i.length;for(let l=0;l<o;l++){const a=i[r];if(!A(a))return!1}}}return!0}function du(n){return()=>zf(n)}function Bf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}Bf((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const fu=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?k.useLayoutEffect:k.useEffect;function Uf({editor:n,ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:r,ariaDescribedBy:s,ariaErrorMessage:i,ariaExpanded:o,ariaInvalid:l,ariaLabel:a,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:f,ariaRequired:d,autoCapitalize:h,className:p,id:_,role:m="textbox",spellCheck:x=!0,style:g,tabIndex:y,"data-testid":b,...S},v){const[E,w]=k.useState(n.isEditable()),C=k.useCallback((O=>{O&&O.ownerDocument&&O.ownerDocument.defaultView?n.setRootElement(O):n.setRootElement(null)}),[n]),P=k.useMemo((()=>(function(...O){return M=>{O.forEach((R=>{typeof R=="function"?R(M):R!=null&&(R.current=M)}))}})(v,C)),[C,v]);return fu((()=>(w(n.isEditable()),n.registerEditableListener((O=>{w(O)})))),[n]),F.jsx("div",{"aria-activedescendant":E?e:void 0,"aria-autocomplete":E?t:"none","aria-controls":E?r:void 0,"aria-describedby":s,...i!=null?{"aria-errormessage":i}:{},"aria-expanded":E&&m==="combobox"?!!o:void 0,...l!=null?{"aria-invalid":l}:{},"aria-label":a,"aria-labelledby":u,"aria-multiline":c,"aria-owns":E?f:void 0,"aria-readonly":!E||void 0,"aria-required":d,autoCapitalize:h,className:p,contentEditable:E,"data-testid":b,id:_,ref:P,role:E?m:void 0,spellCheck:x,style:g,tabIndex:y,...S})}const Wf=k.forwardRef(Uf);function al(n){return n.getEditorState().read(du(n.isComposing()))}const jf=k.forwardRef(Kf);function Kf(n,e){const{placeholder:t,...r}=n,[s]=Y();return F.jsxs(F.Fragment,{children:[F.jsx(Wf,{editor:s,...r,ref:e}),t!=null&&F.jsx(Hf,{editor:s,content:t})]})}function Hf({content:n,editor:e}){const t=(function(o){const[l,a]=k.useState((()=>al(o)));return fu((()=>{function u(){const c=al(o);a(c)}return u(),be(o.registerUpdateListener((()=>{u()})),o.registerEditableListener((()=>{u()})))}),[o]),l})(e),[r,s]=k.useState(e.isEditable());if(k.useLayoutEffect((()=>(s(e.isEditable()),e.registerEditableListener((o=>{s(o)})))),[e]),!t)return null;let i=null;return typeof n=="function"?i=n(r):n!==null&&(i=n),i===null?null:F.jsx("div",{"aria-hidden":!0,children:i})}function Rs(n,e){return Rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},Rs(n,e)}var ul={error:null},Jf=(function(n){var e,t;function r(){for(var i,o=arguments.length,l=new Array(o),a=0;a<o;a++)l[a]=arguments[a];return(i=n.call.apply(n,[this].concat(l))||this).state=ul,i.resetErrorBoundary=function(){for(var u,c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];i.props.onReset==null||(u=i.props).onReset.apply(u,f),i.reset()},i}t=n,(e=r).prototype=Object.create(t.prototype),e.prototype.constructor=e,Rs(e,t),r.getDerivedStateFromError=function(i){return{error:i}};var s=r.prototype;return s.reset=function(){this.setState(ul)},s.componentDidCatch=function(i,o){var l,a;(l=(a=this.props).onError)==null||l.call(a,i,o)},s.componentDidUpdate=function(i,o){var l,a,u,c,f=this.state.error,d=this.props.resetKeys;f!==null&&o.error!==null&&((u=i.resetKeys)===void 0&&(u=[]),(c=d)===void 0&&(c=[]),u.length!==c.length||u.some((function(h,p){return!Object.is(h,c[p])}
34)))&&((l=(a=this.props).onResetKeysChange)==null||l.call(a,i.resetKeys,d),this.reset())},s.render=function(){var i=this.state.error,o=this.props,l=o.fallbackRender,a=o.FallbackComponent,u=o.fallback;if(i!==null){var c={error:i,resetErrorBoundary:this.resetErrorBoundary};if(k.isValidElement(u))return u;if(typeof l=="function")return l(c);if(a)return k.createElement(a,c);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r})(k.Component);function Gf({children:n,onError:e}){return F.jsx(Jf,{fallback:F.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:e,children:n})}const Pn=0,Ds=1,Ms=2,Te=0,qf=1,cl=2,Vf=3,Zf=4;function Yf(n,e,t,r,s){if(n===null||t.size===0&&r.size===0&&!s)return Te;const i=e._selection,o=n._selection;if(s)return qf;if(!(N(i)&&N(o)&&o.isCollapsed()&&i.isCollapsed()))return Te;const l=(function(x,g,y){const b=x._nodeMap,S=[];for(const v of g){const E=b.get(v);E!==void 0&&S.push(E)}for(const[v,E]of y){if(!E)continue;const w=b.get(v);w===void 0||ae(w)||S.push(w)}return S})(e,t,r);if(l.length===0)return Te;if(l.length>1){const x=e._nodeMap,g=x.get(i.anchor.key),y=x.get(o.anchor.key);return g&&y&&!n._nodeMap.has(g.__key)&&A(g)&&g.__text.length===1&&i.anchor.offset===1?cl:Te}const a=l[0],u=n._nodeMap.get(a.__key);if(!A(u)||!A(a)||u.__mode!==a.__mode)return Te;const c=u.__text,f=a.__text;if(c===f)return Te;const d=i.anchor,h=o.anchor;if(d.key!==h.key||d.type!=="text")return Te;const p=d.offset,_=h.offset,m=f.length-c.length;return m===1&&_===p-1?cl:m===-1&&_===p+1?Vf:m===-1&&_===p?Zf:Te}function Xf(n,e){let t=Date.now(),r=Te;return(s,i,o,l,a,u)=>{const c=Date.now();if(u.has("historic"))return r=Te,t=c,Ms;const f=Yf(s,i,l,a,n.isComposing()),d=(()=>{const h=o===null||o.editor===n,p=u.has("history-push");if(!p&&h&&u.has("history-merge"))return Pn;if(s===null)return Ds;const _=i._selection;return l.size>0||a.size>0?p===!1&&f!==Te&&f===r&&c<t+e&&h||l.size===1&&(function(m,x,g){const y=x._nodeMap.get(m),b=g._nodeMap.get(m),S=x._selection,v=g._selection;return!(N(S)&&N(v)&&S.anchor.type==="element"&&S.focus.type==="element"&&v.anchor.type==="text"&&v.focus.type==="text"||!A(y)||!A(b)||y.__parent!==b.__parent)&&JSON.stringify(x.read((()=>y.exportJSON())))===JSON.stringify(g.read((()=>b.exportJSON())))})(Array.from(l)[0],s,i)?Pn:Ds:_!==null?Pn:Ms})();return t=c,r=f,d}}function dl(n){n.undoStack=[],n.redoStack=[],n.current=null}function Qf(n,e,t){const r=Xf(n,t);return be(n.registerCommand(js,(()=>((function(i,o){const l=o.redoStack,a=o.undoStack;if(a.length!==0){const u=o.current,c=a.pop();u!==null&&(l.push(u),i.dispatchCommand(Tn,!0)),a.length===0&&i.dispatchCommand(kn,!1),o.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}})(n,e),!0)),z),n.registerCommand(Ks,(()=>((function(i,o){const l=o.redoStack,a=o.undoStack;if(l.length!==0){const u=o.current;u!==null&&(a.push(u),i.dispatchCommand(kn,!0));const c=l.pop();l.length===0&&i.dispatchCommand(Tn,!1),o.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}})(n,e),!0)),z),n.registerCommand(Zs,(()=>(dl(e),!1)),z),n.registerCommand(tc,(()=>(dl(e),n.dispatchCommand(Tn,!1),n.dispatchCommand(kn,!1),!0)),z),n.registerUpdateListener((({editorState:i,prevEditorState:o,dirtyLeaves:l,dirtyElements:a,tags:u})=>{const c=e.current,f=e.redoStack,d=e.undoStack,h=c===null?null:c.editorState;if(c!==null&&i===h)return;const p=r(o,i,c,l,a,u);if(p===Ds)f.length!==0&&(e.redoStack=[],n.dispatchCommand(Tn,!1)),c!==null&&(d.push({...c}),n.dispatchCommand(kn,!0));else if(p===Ms)return;e.current={editor:n,editorState:i}})))}function eg(){return{current:null,redoStack:[],undoStack:[]}}function tg({delay:n,externalHistoryState:e}){const[t]=Y();return(function(r,s,i=1e3){const o=k.useMemo((()=>s||eg()),[s]);k.useEffect((()=>Qf(r,o,i)),[i,r,o])})(t,e,n),null}function ng({validateUrl:n,attributes:e}){const[t]=Y();return k.useEffect((()=>{if(!t.hasNodes([jt]))throw new Error("LinkPlugin: LinkNode not registered on editor");return be(t.registerCommand(Ke,(r=>{if(r===null)return rs(r),!0;if(typeof r=="string")return!(n!==void 0&&!n(r))&&(rs(r,e),!0);{const{url:s,target:i,rel:o,title:l}=r;return rs(s,{...e,rel:o,target:i,title:l}),!0}}),Z),n!==void 0?t.registerCommand(cr,(r=>{const s=$();if(!N(s)||s.isCollapsed()||!et(r,ClipboardEvent))return!1;const i=r;if(i.clipboardData===null)return!1;const o=i.clipboardData.getData("text");return!!n(o)&&!s.getNodes().some((l=>T(l)))&&(t.dispatchCommand(Ke,{...e,url:o}),r.preventDefault(),!0)}),Z):()=>{})}),[t,n,e]),null}function rg(){const[n]=Y();return k.useEffect((()=>
34{if(!n.hasNodes([at,lt]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[n]),(function(e){k.useEffect((()=>Wd(e)),[e])})(n),null}function fl(n,e){return n.getEditorState().read((()=>{const t=ee(e);return t!==null&&t.isSelected()}))}function sg(n){const[e]=Y(),[t,r]=k.useState((()=>fl(e,n)));return k.useEffect((()=>{let s=!0;const i=e.registerUpdateListener((()=>{s&&r(fl(e,n))}));return()=>{s=!1,i()}}),[e,n]),[t,k.useCallback((s=>{e.update((()=>{let i=$();oe(i)||(i=ks(),J(i)),oe(i)&&(s?i.add(n):i.delete(n))}))}),[e,n]),k.useCallback((()=>{e.update((()=>{const s=$();oe(s)&&s.clear()}))}),[e])]}function ig({nodeKey:n}){const[e]=Y(),[t,r,s]=sg(n),i=k.useCallback((o=>{const l=$();return t&&oe(l)&&(o.preventDefault(),e.update((()=>{l.getNodes().forEach((a=>{gu(a)&&a.remove()}))}))),!1}),[e,t]);return k.useEffect((()=>be(e.registerCommand(Ws,(o=>{const l=e.getElementByKey(n);return o.target===l&&(o.shiftKey||s(),r(!t),!0)}),Z),e.registerCommand(qs,i,Z),e.registerCommand(Gs,i,Z))),[s,e,t,n,i,r]),k.useEffect((()=>{const o=e.getElementByKey(n),l="selected";o!==null&&(t?Ae(o,l):Fr(o,l))}),[e,t,n]),null}class En extends vi{static getType(){return"horizontalrule"}static clone(e){return new En(e.__key)}static importJSON(e){return Fi()}static importDOM(){return{hr:()=>({conversion:og,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const t=document.createElement("hr");return Ae(t,e.theme.hr),t}getTextContent(){return`
35`}isInline(){return!1}updateDOM(){return!1}decorate(){return F.jsx(ig,{nodeKey:this.__key})}}function og(){return{node:Fi()}}function Fi(){return xe(new En)}function gu(n){return n instanceof En}const lg=[{dependencies:[En],export:n=>gu(n)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(n,e,t,r)=>{const s=Fi();r||n.getNextSibling()!=null?n.replace(s):n.insertBefore(s),s.selectNext()},type:"element"},...Rr];function ag({transformers:n=lg}){const[e]=Y();return k.useEffect((()=>yf(e,n)),[e,n]),null}const ug=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?k.useLayoutEffect:k.useEffect;function cg({ignoreHistoryMergeTagChange:n=!0,ignoreSelectionChange:e=!1,onChange:t}){const[r]=Y();return ug((()=>{if(t)return r.registerUpdateListener((({editorState:s,dirtyElements:i,dirtyLeaves:o,prevEditorState:l,tags:a})=>{e&&i.size===0&&o.size===0||n&&a.has("history-merge")||l.isEmpty()||t(s,r,a)}))}),[r,n,e,t]),null}const dg=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?k.useLayoutEffect:k.useEffect;function fg(n){return{initialValueFn:()=>n.isEditable(),subscribe:e=>n.registerEditableListener(e)}}function gg(){return(function(n){const[e]=Y(),t=k.useMemo((()=>n(e)),[e,n]),[r,s]=k.useState((()=>t.initialValueFn())),i=k.useRef(r);return dg((()=>{const{initialValueFn:o,subscribe:l}=t,a=o();return i.current!==a&&(i.current=a,s(a)),l((u=>{i.current=u,s(u)}))}),[t,n]),r})(fg)}function hg(n){const e=window.location.origin,t=r=>{if(r.origin!==e)return;const s=n.getRootElement();if(document.activeElement!==s)return;const i=r.data;if(typeof i=="string"){let o;try{o=JSON.parse(i)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"){const l=o.payload;if(l&&l.functionId==="makeChanges"){const a=l.args;if(a){const[u,c,f,d,h,p]=a;n.update((()=>{const _=$();if(N(_)){const m=_.anchor;let x=m.getNode(),g=0,y=0;if(A(x)&&u>=0&&c>=0&&(g=u,y=u+c,_.setTextNodeRange(x,g,x,y)),g===y&&f===""||(_.insertRawText(f),x=m.getNode()),A(x)){g=d,y=d+h;const b=x.getTextContentSize();g=g>b?b:g,y=y>b?b:y,_.setTextNodeRange(x,g,x,y)}r.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",t,!0),()=>{window.removeEventListener("message",t,!0)}}const zs=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?k.useLayoutEffect:k.useEffect;function gl(n){return n.getEditorState().read(du(n.isComposing()))}function pg({contentEditable:n,placeholder:e=null,ErrorBoundary:t}){const[r]=Y(),s=(function(i,o){const[l,a]=k.useState((()=>i.getDecorators()));return zs((()=>i.registerDecoratorListener((u=>{Un.flushSync((()=>{a(u)}))}))),[i]),k.useEffect((()=>{a(i.getDecorators())}),[i]),k.useMemo((()=>{const u=[],c=Object.keys(l);for(let f=0;f<c.length;f++){const d=c[f],h=F.jsx(o,{onError:_=>i._onError(_),children:F.jsx(k.Suspense,{fallback:null,children:l[d]})}),p=i.getElementByKey(d);p!==null&&u.push(Un.createPortal(h,p,d))}return u}),[o,l,i])})(r,t);return(function(i){zs((()=>be(af(i),hg(i))),[i])})(r),F.jsxs(F.Fragment,{children:[n,F.jsx(mg,{content:e}),s]})}function mg({content:n}){const[e]=Y(),t=(function(s){const[i,o]=k.useState((()=>gl(s)));return zs((()=>{function l(){const a=gl(s);o(a)}return l(),be(s.registerUpdateListener((()=>{l()}
35)),s.registerEditableListener((()=>{l()})))}),[s]),i})(e),r=gg();return t?typeof n=="function"?n(r):n:null}function _g(n){return n.registerCommand(hr,(e=>{const t=$();if(!N(t))return!1;e.preventDefault();const r=(function(s){const i=s.getNodes();if(md(i,(f=>tr(f)&&f.canIndent()?f:null)).length>0)return!0;const o=s.anchor,l=s.focus,a=l.isBefore(o)?l:o,u=a.getNode(),c=_a(u);if(c.canIndent()){const f=c.getKey();let d=Tr();if(d.anchor.set(f,0,"element"),d.focus.set(f,0,"element"),d=Dt(d),d.anchor.is(a))return!0}return!1})(t)?e.shiftKey?cs:vl:bl;return n.dispatchCommand(r,void 0)}),z)}function yg(){const[n]=Y();return k.useEffect((()=>_g(n)),[n]),null}function xg(n){return pl(n)}function bg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vg=bg((function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function hu(n,e){for(let t=0;t<e.length;t++){const r=e[t](n);if(r)return r}return null}const Sg=/[.,;\s]/;function ar(n){return Sg.test(n)}function pu(n){return ar(n[n.length-1])}function Bs(n){return ar(n[0])}function mu(n){let e=n.getPreviousSibling();return T(e)&&(e=e.getLastDescendant()),e===null||Re(e)||A(e)&&pu(e.getTextContent())}function _u(n){let e=n.getNextSibling();return T(e)&&(e=e.getFirstDescendant()),e===null||Re(e)||A(e)&&Bs(e.getTextContent())}function Eg(n,e,t,r){return(n>0?ar(t[n-1]):mu(r[0]))?e<t.length?ar(t[e]):_u(r[r.length-1]):!1}function wg(n,e,t){const r=[],s=[],i=[];let o=0,l=0;const a=[...n];for(;a.length>0;){const u=a[0],c=u.getTextContent().length,f=l;l+c<=e?(r.push(u),o+=c):f>=t?i.push(u):s.push(u),l+=c,a.shift()}return[o,r,s,i]}function Cg(n,e,t,r){const s=Ns(r.url,r.attributes);if(n.length===1){let i,o=n[0];e===0?[i,o]=o.splitText(t):[,i,o]=o.splitText(e,t);const l=K(r.text);return l.setFormat(i.getFormat()),l.setDetail(i.getDetail()),l.setStyle(i.getStyle()),s.append(l),i.replace(s),o}if(n.length>1){const i=n[0];let o,l=i.getTextContent().length;e===0?o=i:[,o]=i.splitText(e);const a=[];let u;for(let h=1;h<n.length;h++){const p=n[h],_=p.getTextContent().length,m=l;if(m<t)if(l+_<=t)a.push(p);else{const[x,g]=p.splitText(t-m);a.push(x),u=g}l+=_}const c=$(),f=c?c.getNodes().find(A):void 0,d=K(o.getTextContent());return d.setFormat(o.getFormat()),d.setDetail(o.getDetail()),d.setStyle(o.getStyle()),s.append(d,...a),f&&f===o&&(N(c)?d.select(c.anchor.offset,c.focus.offset):oe(c)&&d.select(0,d.getTextContent().length)),o.replace(s),u}}function os(n,e,t){const r=n.getChildren(),s=r.length;for(let a=0;a<s;a++){const u=r[a];if(!A(u)||!u.isSimpleText())return zn(n),void t(null,n.getURL())}const i=n.getTextContent(),o=hu(i,e);if(o===null||o.text!==i||!mu(n)||!_u(n))return zn(n),void t(null,n.getURL());const l=n.getURL();if(l!==o.url&&(n.setURL(o.url),t(o.url,l)),o.attributes){const a=n.getRel();a!==o.attributes.rel&&(n.setRel(o.attributes.rel||null),t(o.attributes.rel||null,a));const u=n.getTarget();u!==o.attributes.target&&(n.setTarget(o.attributes.target||null),t(o.attributes.target||null,u))}}function zn(n){const e=n.getChildren();for(let t=e.length-1;t>=0;t--)n.insertAfter(e[t]);return n.remove(),e.map((t=>t.getLatest()))}function Tg(n,e,t){k.useEffect((()=>{n.hasNodes([Ir])||vg(77);const r=(s,i)=>{t&&t(s,i)};return be(n.registerNodeTransform(st,(s=>{const i=s.getParentOrThrow(),o=s.getPreviousSibling();if(gt(i)&&!i.getIsUnlinked())os(i,e,r);else if(!ye(i)){if(s.isSimpleText()&&(Bs(s.getTextContent())||!gt(o))){const l=(function(a){const u=[a];let c=a.getNextSibling();for(;c!==null&&A(c)&&c.isSimpleText()&&(u.push(c),!/[\s]/.test(c.getTextContent()));)c=c.getNextSibling();return u})(s);(function(a,u,c){let f=[...a];const d=f.map((m=>m.getTextContent())).join("");let h,p=d,_=0;for(;(h=hu(p,u))&&h!==null;){const m=h.index,x=m+h.length;if(Eg(_+m,_+x,d,f)){const[g,,y,b]=wg(f,_+m,_+x),S=Cg(y,_+m-g,_+x-g,h);f=S?[S,...b]:b,c(h.url,null),_=0}else _+=x;p=p.substring(x)}})(l,e,r)}(function(l,a,u){const c=l.getPreviousSibling(),f=l.getNextSibling(),d=l.getTextContent();var h;!gt(c)||c.getIsUnlinked()||Bs(d)&&(h=d,!(c.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(h):/^\.[a-zA-Z0-9]{1,}/.test(h)))||(c.append(l),os(c,a,u),u(null,c.getURL())),!gt(f)||f.getIsUnlinked()||pu(d)||(zn(f),os(f,a,u),u(null,f.getU
35RL()))})(s,e,r)}})),n.registerCommand(Ke,(s=>{const i=$();return s!==null||!N(i)||i.extract().forEach((o=>{const l=o.getParent();if(gt(l))return l.setIsUnlinked(!l.getIsUnlinked()),l.markDirty(),!0})),!1}),Z))}),[n,e,t])}function kg({matchers:n,onChange:e}){const[t]=Y();return Tg(t,n,e),null}const Ng=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Ag=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,Fg=[n=>{const e=Ng.exec(n);return e&&{index:e.index,length:e[0].length,text:e[0],url:e[0]}},n=>{const e=Ag.exec(n);return e&&{index:e.index,length:e[0].length,text:e[0],url:`mailto:${e[0]}`}}],$g=()=>F.jsx(kg,{matchers:Fg}),Ig=n=>({node:Dr(n.textContent)});class St extends vi{constructor(t,r){super(r);Cn(this,"__inline");Cn(this,"__user");Cn(this,"__mentionText");this.__user=t,this.__mentionText=ur(t),this.__inline=!0}static getType(){return"mention"}static clone(t){return new St(t.__user,t.__key)}static importJSON(t){return Dr(t.user)}exportJSON(){return{...super.exportJSON(),mentionName:this.__mentionText,user:this.__user,type:"mention",version:1}}exportDOM(){const t=document.createElement("span");return t.setAttribute("data-lexical-mention-id",this.getId()),t.innerText=this.__mentionText,{element:t}}static importDOM(){return{span:t=>t.hasAttribute("data-lexical-mention-id")?{conversion:Ig,priority:1}:null}}createDOM(){return document.createElement("span")}updateDOM(t){return this.__inline!==t.__inline}getId(){return this.__user.id}decorate(){return F.jsx("span",{className:"mr-0.5 rounded bg-stone-200 p-0.5 dark:bg-stone-700",children:this.__mentionText})}}const Dr=n=>new St(n),Lg=n=>n instanceof St,yu=n=>{if(!n)return!1;ht.lastIndex=0;const e=ht.test(n);return ht.lastIndex=0,e},Pg=n=>{const e=new Map;return(n?.edges??[]).forEach(r=>{r?.node?.id!=null&&e.set(String(r.node.id),r.node)}),e};function Og(n,e,t,r){let s=0;return n.forEach(i=>{const o=i.index??0,l=i[0],a=i[2];if(o>s){const c=e.slice(s,o);c&&t.push(K(c))}const u=r.get(a);u?t.push(Dr(u)):t.push(K(l)),s=o+l.length}),s}const Rg=(n,e)=>{ht.lastIndex=0;const t=[...n.matchAll(ht)];if(t.length===0)return[];const r=[],s=Og(t,n,r,e);if(s<n.length){const i=n.slice(s);i&&r.push(K(i))}return r},Dg=(n,e)=>{const t=[],r=s=>{if(A(s)){const i=s.getTextContent();if(!yu(i))return;const l=Rg(i,e);if(l.length<=0)return;const a=s.getParent();if(!a)return;t.push({node:s,parent:a,index:s.getIndexWithinParent(),replacements:l})}
35else T(s)&&s.getChildren().forEach(r)};return n.getChildren().forEach(r),t},Mg=n=>{const e=new Map;return n.forEach(t=>{const r=t.parent.getKey();e.has(r)||e.set(r,[]),e.get(r).push(t)}),e},zg=n=>{Mg(n).forEach(t=>{t.sort((r,s)=>s.index-r.index),t.forEach(({node:r,parent:s,replacements:i})=>{if(i.length===0)return;const o=i[0];if(r.replace(o),i.length<=1)return;const l=o.getIndexWithinParent();i.slice(1).forEach((a,u)=>{s.splice(l+1+u,0,[a])})})})},Bg=({mentionedUsers:n,value:e})=>{const[t]=Y(),r=k.useRef(null);return k.useEffect(()=>{if(!n||!e||!yu(e)||r.current===e)return;const o=setTimeout(()=>{const l=Pg(n);if(l.size===0){r.current=e;return}t.update(()=>{const a=H(),u=Dg(a,l);zg(u)}),r.current=e},50);return()=>{clearTimeout(o)}},[t,n,e]),null},Yt={__args:{first:30},__variables:{after:"String"},isInternal:!0,email:!0,isActive:!0},Ug=(n,e,t="",r={},s={})=>{const i=k.useMemo(()=>r.__args?{...Yt.__args,...r.__args}:Yt.__args,[r.__args]),o=k.useMemo(()=>r.__variables?{...Yt.__variables,...r.__variables}:Yt.__variables,[r.__variables]),l=k.useMemo(()=>{const _=Uu(t);return _?{OR:_}:s.variables?.where},[t,s.variables?.where]),{loading:a,nodes:u,pageInfo:c,fetchMore:f}=Fu(Wu,n,e,{...Yt,...r,__args:{...i},__variables:{...o,...l?{where:"UserWhereInput"}:{}}},{...s,variables:{...s.variables,...l?{where:{...s?.variables?.where,...l}}:{}}}),d=k.useCallback((_,{fetchMoreResult:m})=>m?{userCollection:{...m.userCollection,edges:$u("node.id",[..._.userCollection.edges,...m.userCollection.edges])},__typename:"UserConnection"}:_,[]),h=k.useCallback(()=>!c?.hasNextPage||!c?.endCursor?Promise.resolve():f({variables:{after:c.endCursor},updateQuery:d}),[f,c,d]),[p]=Cu({loading:a,hasNextPage:c.hasNextPage,onLoadMore:()=>{f({variables:{after:c&&c.endCursor},disabled:!c,updateQuery:d})},disabled:!1,rootMargin:"100px 0px 0px 0px"});return{loading:a,filter:t,users:u,loaderRef:p,pageInfo:c,fetchMore:h}},Wg=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`,jg={PUNCTUATION:Wg},xu=jg.PUNCTUATION,$i=["@","\\uff20"].join(""),bu=`[^${$i}${xu}\\s]`,Kg="(?:\\.[ |$]| |["+xu+"]|)",Hg=75,Jg=new RegExp("(^|\\s|\\()(["+$i+"]((?:"+bu+Kg+"){0,"+Hg+"}))$"),Gg=50,qg=new RegExp("(^|\\s|\\()(["+$i+"]((?:"+bu+"){0,"+Gg+"}))$"),ls=5,Vg=({index:n,isSelected:e,onClick:t,onMouseEnter:r,user:s})=>{const i=k.useRef(null);return F.jsxs("li",{"aria-selected":e,className:At("flex items-center rounded-lg px-2 py-1 text-sm hover:bg-blue-100",{"bg-blue-100":e}),id:`typeahead-item-${n}`,onClick:t,onMouseEnter:r,ref:i,role:"option",tabIndex:-1,children:[F.jsx(_l,{className:"mr-2",initialsSize:"text-xs",size:6,user:s}),F.jsxs("div",{className:"flex flex-col justify-center",children:[F.jsx("span",{children:ur(s)}),F.jsx("span",{className:"truncate text-stone-700",children:s.email})]})]},s.id)},Zg={profilePicture:{id:!0,uuid:!0,url:!0,fileType:!0,mimetype:!0}},hl=({close:n,editor:e,resolution:t,dataTypes:r,projectName:s})=>{const{sm:i}=ml(),o=k.useRef(null),l=t.match,{users:a,pageInfo:u,loaderRef:c,loading:f}=Ug(r,s,l.matchingString,Zg,{variables:{where:{deactivatedAt:{equals:null}}}}),[d,h]=k.useState(null);k.useEffect(()=>{const m=o.current,x=e.getRootElement();if(a.length>0&&m!==null&&x!==null){const g=t.range,{left:y,top:b}=g.getBoundingClientRect();return m.style.bottom=`${document.body.clientHeight-b+2}px`,m.style.left=`${y-14}px`,m.style.display="block",x.setAttribute("aria-controls","mentions-typeahead"),()=>{m.style.display="none",x.removeAttribute("aria-controls")}}},[e,t,a]);const p=k.useCallback(m=>{if(a.length===0||d===null)return;const x=a[m??d];n(),rh(e,x,l)},[n,l,e,a,d]),_=k.useCallback(m=>{const x=e.getRootElement();x!==null&&(x.setAttribute("aria-activedescendant",`typeahead-item-${m}`),h(m))},[e]);return k.useEffect(()=>()=>{const m=e.getRootElement();m!==null&&m.removeAttribute("aria-activedescendant")},[e]),k.useLayoutEffect(()=>{a.length===0?h(null):d===null&&_(0)},[a,d,_]),k.useEffect(()=>be(e.registerCommand(fr,m=>{const x=m;return a.length>0&&d!==null&&(d<ls-1&&d!==a.length-1&&_(d+1),x.preventDefault(),x.stopImmediatePropagation()),!0},Z),e.registerCommand(dr,m=>{const x=m;return a.length>0&&d!==null&&(d!==0&&_(d-1),x.preventDefault(),x.stopImmediatePropagation()),!0},Z),e.registerCommand(gr,m=>{const x=m;return a.length===0||d===null?!1:(x.preventDefault(),x.stopImmediatePropagation(),n(),!0)},Z),e.registerCommand(hr,m=>{const x=m;return a.length===0||d===null?!1:(x.preventDefault(),x.stopImmediatePropagation(),p(),!0)},Z),e.registerCommand(Ot,m=>a.length===0||d===null?!1:(m!==null&&(m.preventDefault(),m.stopImmediatePropagation()),p(),!0),Qc)),[p,n,e,a,d,_]),i?F.jsx("div",{className:"flex h-12 w-full items-center space-x-2 overflow-x-auto overflow-y-hidden rounded-lg bg-stone-200 px-2 dark:bg-stone-800",children:f?F.jsx(zr,{size:"xs"}):a.length===0?F.jsx("span",{children:ju("core.COMMENT.noUserFound")}):F.jsxs(F.Fragment,{children:[a.slice(0,ls).map((m,x)=>F.jsxs("span",{className:"flex shrink-0 items-center space-x-2 rounded-lg bg-stone-400/50 px-1 text-xs dar
35k:bg-stone-700/50",onClick:()=>{h(x),p(x)},children:[F.jsx(_l,{size:6,user:m}),F.jsxs("div",{className:"flex flex-col justify-center",children:[F.jsx("span",{children:ur(m)}),F.jsx("span",{className:"truncate",children:m.email})]})]},m.id)),u&&u.hasNextPage&&F.jsx("span",{className:"flex w-full justify-center",ref:c,children:F.jsx(zr,{size:"xs"})})]})}):a.length===0?null:F.jsx("div",{"aria-label":"Suggested mentions",className:"absolute z-50 rounded-lg border bg-white p-2",id:"mentions-typeahead",ref:o,role:"listbox",children:F.jsxs("ul",{children:[a.slice(0,ls).map((m,x)=>F.jsx(Vg,{index:x,isSelected:x===d,onClick:()=>{h(x),p()},onMouseEnter:()=>{h(x)},user:m},m.id)),u&&u.hasNextPage&&F.jsx("li",{className:"flex w-full justify-center py-4",ref:c,children:F.jsx(zr,{size:"xs"})})]})})},Yg=(n,e)=>{let t=Jg.exec(n);if(t===null&&(t=qg.exec(n)),t!==null){const r=t[1],s=t[3];if(s.length>=e)return{leadOffset:t.index+r.length,matchingString:s,replaceableString:t[2]}}return null},Xg=n=>Yg(n,1),Qg=n=>{const e=n.anchor;if(e.type!=="text")return null;const t=e.getNode();if(!t.isSimpleText())return null;const r=e.offset;return t.getTextContent().slice(0,r)},eh=(n,e)=>{const t=window.getSelection();if(t===null||!t.isCollapsed)return!1;const r=t.anchorNode,s=n.leadOffset,i=t.anchorOffset;try{e.setStart(r,s),e.setEnd(r,i)}catch{return!1}return!0},th=n=>{let e=null;return n.getEditorState().read(()=>{const t=$();N(t)&&(e=Qg(t))}),e},nh=(n,e,t)=>{const r=ur(e);let s=t;for(let i=s;i<=r.length;i++)n.substr(-i)===r.substr(0,i)&&(s=i);return s},rh=(n,e,t)=>{n.update(()=>{const r=$();if(!N(r)||!r.isCollapsed())return;const s=r.anchor;if(s.type!=="text")return;const i=s.getNode();if(!i.isSimpleText())return;const o=s.offset,l=i.getTextContent().slice(0,o),a=t.replaceableString.length,u=nh(l,e,a),c=o-u;if(c<0)return;let f;c===0?[f]=i.splitText(o):[,f]=i.splitText(c,o);const d=Dr(e);f.replace(d)})},sh=(n,e)=>e!==0?!1:n.getEditorState().read(()=>{const t=$();if(N(t)){const i=t.anchor.getNode().getPreviousSibling();return A(i)&&i.isTextEntity()}return!1}),ih=(n,e,t)=>{const{sm:r}=ml(),[s,i]=k.useState(null);k.useEffect(()=>{if(!n.hasNodes([St]))throw new Error("MentionsPlugin: MentionNode not registered on editor")},[n]),k.useEffect(()=>{let l=document.createRange(),a=null;const u=()=>{const f=l,d=th(n);if(d===a||f===null||(a=d,d===null))return;const h=Xg(d);if(h!==null&&!sh(n,h.leadOffset)&&eh(h,f)!==null){i({match:h,range:f});return}i(null)},c=n.registerUpdateListener(u);return()=>{l=null,c()}},[n]);const o=k.useCallback(()=>{i(null)},[]);return s===null||n===null?null:r?F.jsx(hl,{close:o,dataTypes:e,editor:n,projectName:t,resolution:s}):Un.createPortal(F.jsx(hl,{close:o,dataTypes:e,editor:n,projectName:t,resolution:s}),document.body)},oh=({dataTypes:n,projectName:e})=>{const[t]=Y();return ih(t,n,e)},lh={dependencies:[St],export:n=>Lg(n)?`@[${n.getId()}]`:null,importRegExp:ht,regExp:ht,replace:()=>null,trigger:"@",type:"text-match"},ah=({onEnter:n,onPaste:e})=>{const[t]=Y();return k.useLayoutEffect(()=>(t.registerCommand(Ot,r=>{if(r){const s=n(r);if(s!==void 0)return s}return!0},Z),t.registerRootListener((r,s)=>{s!==null&&s.removeEventListener("paste",e),r!==null&&r.addEventListener("paste",e)})),[t,n,e]),null},Us=n=>{const e=n.anchor,t=n.focus,r=n.anchor.getNode(),s=n.focus.getNode();return r===s?r:n.isBackward()?mo(t)?r:s:mo(e)?s:r},vu=1,as=n=>{let e=n.trim();return e&&!/^https?:\/\//i.test(e)&&(e=`https://${e}`),e},uh=({editor:n})=>{const e=k.useRef(null),t=k.useRef(null),r=k.useRef(!1),[s,i]=k.useState(""),[o,l]=k.useState(null),a=(d,h)=>{h===null?(d.style.opacity="0",d.style.top="-1000px",d.style.left="-1000px"):(d.style.opacity="1",d.style.top=`${h.top+h.height+window.pageYOffset-60}px`,d.style.left=`${h.left+window.pageXOffset-(d.offsetWidth/2+h.width/2)-220}px`)},u=k.useCallback(()=>{const d=$();if(N(d)){const x=Us(d),g=x.getParent();ye(g)?i(g.getURL()):ye(x)?i(x.getURL()):i("")}const h=e.current,p=window.getSelection(),_=document.activeElement;if(h===null)return;const m=n.getRootElement();if(d!==null&&!p.isCollapsed&&m!==null&&m.contains(p.anchorNode)){const x=p.getRangeAt(0);let g;if(p.anchorNode===m){let y=m;for(;y.firstElementChild!=null;)y=y.firstElementChild;g=y.getBoundingClientRect()}else g=x.getBoundingClientRect();r.current||a(h,g),l(d)}else(!_||_.className!=="link-input")&&(a(h,null),l(null),i(""));return!0},[n]),c=k.useCallback(d=>
35{if(d.key===Iu){if(d.preventDefault(),o!==null){const h=as(s);h!==""&&n.dispatchCommand(Ke,h),i(""),l(null),n.update(()=>{J(null)})}}else d.key===Lu&&(d.preventDefault(),i(""),l(null),n.update(()=>{J(null)}))},[n,o,s]),f=()=>{n.update(()=>{const d=$();if(N(d)){const h=Us(d),p=h.getParent();(ye(p)||ye(h))&&n.dispatchCommand(Ke,null)}}),i(""),l(null),n.update(()=>{J(null)})};return k.useEffect(()=>be(n.registerUpdateListener(({editorState:d})=>{d.read(()=>{u()})}),n.registerCommand(hn,()=>(u(),!0),vu)),[n,u]),k.useEffect(()=>{n.getEditorState().read(()=>{u()})},[n,u]),k.useEffect(()=>{o&&t.current&&t.current.focus()},[o]),k.useEffect(()=>{function d(h){if(e.current&&!e.current.contains(h.target)&&t.current!==document.activeElement){const p=as(s);o&&p!==""&&n.dispatchCommand(Ke,p),i(""),l(null)}}if(o)return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[o,s,n]),k.useEffect(()=>{o&&s==="https://"&&i("")},[o,s]),k.useEffect(()=>{const d=n.getRootElement();if(!d)return;function h(p){if(p.button!==0)return;let _=p.target;for(;_&&_!==d;){if(_.tagName==="A"){const m=_;n.update(()=>{const x=m.getAttribute("data-lexical-node-key");if(x){const g=ee(x);g&&g.selectNext(0,0)}}),setTimeout(()=>{n.update(()=>{u()})},0);break}_=_.parentElement}}return d.addEventListener("click",h),()=>{d.removeEventListener("click",h)}},[n,u]),F.jsx("div",{className:"link-editor pointer-events-auto absolute z-50 flex items-center rounded-lg border bg-white p-2 text-sm",ref:e,children:o&&F.jsxs(Tu,{children:[F.jsx("input",{autoFocus:!0,className:"link-input",onChange:d=>{i(d.target.value)},onKeyDown:c,placeholder:"Paste or type a link…",ref:t,style:{minWidth:160},value:s}),F.jsxs("div",{className:"ml-2 flex items-center space-x-1",children:[F.jsx("button",{"aria-label":"Save link",className:`rounded p-1 hover:bg-stone-100 focus:outline-none ${s.trim()?"":"cursor-not-allowed opacity-50"}`,disabled:!s.trim(),onClick:()=>{if(o!==null&&s.trim()){const d=as(s);d!==""&&n.dispatchCommand(Ke,d),i(""),l(null),n.update(()=>{J(null)})}},type:"button",children:F.jsx(ku,{className:"text-pink-400",size:18})}),F.jsx("button",{"aria-label":"Remove link",className:"rounded p-1 hover:bg-stone-100 focus:outline-none",onClick:f,type:"button",children:F.jsx(Pu,{className:"text-stone-400",size:18})}),F.jsx("button",{"aria-label":"Cancel",className:"rounded p-1 hover:bg-stone-100 focus:outline-none",onClick:()=>{l(null),n.update(()=>{J(null)})},type:"button",children:F.jsx(Nu,{className:"text-stone-400",size:18})})]})]})})},ch=({active:n,onClick:e,Icon:t})=>F.jsx("button",{className:At("mx-px rounded p-1",{"bg-input":n}),onClick:e,type:"button",children:F.jsx(t,{size:16})}),Ve=pl(ch),dh=()=>{const[n]=Y(),[e,t]=k.useState(!1),[r,s]=k.useState(!1),[i,o]=k.useState(!1),[l,a]=k.useState(!1),[u,c]=k.useState("paragraph"),f=k.useCallback(g=>y=>{y&&y.preventDefault(),n.dispatchCommand(je,g)},[n]),d=k.useCallback(()=>{const g=$();if(N(g)){const y=g.anchor.getNode(),b=y.getKey()==="root"?y:y.getTopLevelElementOrThrow(),S=b.getKey();if(n.getElementByKey(S)!==null)if(D(b)){const C=ma(y,at),P=C?C.getTag():b.getTag(),O=Ku(C,"__listType",null);c(O==="check"?O:P)}else{const C=b.getType();c(C)}t(g.hasFormat("bold")),s(g.hasFormat("italic")),o(g.hasFormat("code"));const E=Us(g),w=E.getParent();ye(w)||ye(E)?a(!0):a(!1)}},[n]);k.useEffect(()=>be(n.registerUpdateListener(({editorState:g})=>{g.read(()=>{d()})}),n.registerCommand(hn,g=>(d(),!1),vu)),[n,d]);const h=k.useCallback(g=>{g&&g.preventDefault(),u!=="ul"?n.dispatchCommand(Aa):n.dispatchCommand(Dn)},[u,n]),p=k.useCallback(g=>{g&&g.preventDefault(),u!=="check"?n.dispatchCommand($a):n.dispatchCommand(Dn)},[u,n]),_=k.useCallback(g=>{g&&g.preventDefault(),u!=="ol"?n.dispatchCommand(Fa):n.dispatchCommand(Dn)},[u,n]),m=k.useCallback(g=>{g&&g.preventDefault(),l?n.dispatchCommand(Ke,null):n.dispatchCommand(Ke,"")},[n,l]),x=k.useCallback(g=>{g&&g.preventDefault(),u!=="code"&&n.update(()=>{const y=$();N(y)&&ld(y,()=>Oe())})},[u,n]);return F.jsxs("div",{className:"flex flex-wrap items-center gap-x-1",children:[F.jsx(Ve,{active:e,Icon:Hu,onClick:f("bold")}),F.jsx(Ve,{active:r,Icon:Ju,onClick:f("italic")}),F.jsx(Ve,{active:l,Icon:Ou,onClick:m}),F.jsx(Ve,{active:i,Icon:Gu,onClick:f("code")}),l&&Un.createPortal(F.jsx(uh,{editor:n}),document.body),F.jsx("div",{className:"h-5 w-px bg-stone-200"}),F.jsx(Ve,{active:u==="ul",Icon:Ru,onClick:h}),F.jsx(Ve,{active:u==="ol",Icon:qu,onClick:_}),F.jsx(Ve,{active:u==="check",Icon:Du,onClick:p}),F.jsx(Ve,{active:u==="code",Icon:Mu,onClick:x})]})},Bn=[Ga,qa,Sf,Za,Va,Ya,Qa,eu,tu,nu,Xa,su,iu,ru,ou,lh],fh=[Pr,Lr,at,lt,$r,Ci,Ir,jt,St],gh=(n,e)=>{const t=zu(n,Bu);return{placeholder:"text-muted-foreground absolute top-3 left-3 select-none pointer-events-none overflow-hidden",heading:{h1:`editor-heading-h1 ${t.h1}`,h2:`editor-heading-h2 ${t.h2}`,h3:`editor-heading-h3 ${t.h3}`,h4:`editor-heading-h4 ${t.h4}`},paragraph:t.p,quote:`editor-quote ${t.blockquote}`,list:{ol:`list-decimal ${t.ol}`,ul:`list-disc ${t.ul}`,listitem:"editor-listitem",listitemChecked:"editor-list-item-checked -ml-5",listitemUnchecked:"editor-list-item-unchecked -ml-5",nested:{listitem:"editor-nested-list-item list-none"}},link:At(`hover:underline text-${Br(n,500)} hover:text-${Br(n,700)}`),text:{bold:"font-medium",italic:"italic",overflowed:"truncate",hashtag:`font-mono text-${Br(n,400)}`,code:t.code}
35,code:`block font-mono p-2 rounded border text-[13px] ${e?`${Ur.surfaces.elevation1} ${Ur.text.secondary} ${Ur.borders.two}`:"bg-stone-100 text-stone-700"}`}},hh=()=>{const[n]=Y();return k.useEffect(()=>{n.focus()},[n]),null},ph=({localValue:n,value:e,setLocalValue:t,shouldFocus:r})=>{const[s]=Y(),i=yl(e);return k.useEffect(()=>{if(n===e)return;if(!e&&!!i){s.dispatchCommand(Zs,void 0),t(e);return}if(e&&e!==i){const a=s.getRootElement();if(s.isEditable()&&a?.contains(document.activeElement)){t(e);return}s.update(()=>{if(lu(e||"",Bn),r){const u=H(),c=Tr(),f=u.getChildrenSize();c.anchor.set(u.getKey(),f,"element"),c.focus.set(u.getKey(),f,"element"),J(c)}else J(null)}),t(e),r&&requestAnimationFrame(()=>{s.focus()})}},[s,n,i,t,e,r]),null},mh=k.forwardRef(({children:n,className:e="px-3 py-2",dataTypes:t,richTextControls:r=!0,placeholder:s,mentions:i=!1,onChange:o,onEnter:l,onPaste:a,projectName:u,shouldFocus:c=!0,theme:f,value:d,mentionedUsers:h},p)=>{const[_,m]=k.useState(0),[x,g]=k.useState(d),y=k.useRef(),b=k.useRef(d),[S]=Au(),v=k.useCallback(R=>{console.error(R)},[]),E=k.useCallback(R=>{y.current=R,R.read(()=>{const j=Nf(Bn);g(j),o(j)})},[o]),w=f.brandColors.primary,C=k.useMemo(()=>gh(w,S),[w,S]),P=k.useMemo(()=>({theme:C,onError:v,nodes:fh,namespace:"rich-text-editor",editorState:()=>{lu(b.current||"",Bn),c||J(null)}}),[C,v,c]),O=yl(d),M=x===void 0&&d&&O!==d;return k.useEffect(()=>{M&&m(R=>R+1)},[M]),M?(b.current=d,null):F.jsx("div",{className:At(e,"w-full overflow-y-auto overflow-x-hidden text-sm text-foreground"),ref:p,children:F.jsx(Rf,{initialConfig:P,children:F.jsxs("div",{className:At("flex w-full",{"flex-col":r,"items-end":!r}),children:[i&&F.jsx(oh,{dataTypes:t,projectName:u}),F.jsxs("div",{className:"relative mx-1 my-3 w-full",children:[F.jsx(pg,{contentEditable:F.jsx(jf,{}),ErrorBoundary:Gf,placeholder:F.jsx("span",{className:"pointer-events-none absolute left-0 top-0 select-none overflow-hidden text-stone-400",children:s})}),F.jsx(cg,{onChange:E}),F.jsx(tg,{}),c&&F.jsx(hh,{}),r&&F.jsxs(F.Fragment,{children:[F.jsx(rg,{}),F.jsx(If,{}),F.jsx(ng,{}),F.jsx(yg,{}),F.jsx($g,{}),F.jsx(ag,{transformers:Bn})]}),F.jsx(Pf,{}),l&&a&&F.jsx(ah,{onEnter:l,onPaste:a}),F.jsx(ph,{localValue:x,setLocalValue:g,shouldFocus:c,value:d}),h&&F.jsx(Bg,{mentionedUsers:h,value:d})]}),F.jsxs("div",{className:At("flex items-center text-foreground rounded-lg bg-background border border-input",{"sticky bottom-0 w-full p-1 sm:p-0":r,"mb-2":!r}),children:[r&&F.jsx(dh,{}),n&&F.jsx("div",{className:"ml-auto flex items-center",children:n})]})]})})})}),Rh=xg(mh);export{Rh as default};

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.