@remit/web-client-dist 0.0.297 → 0.0.299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/ComposeBody-B0UEQwhO.js +29 -0
- package/assets/ConfirmDialog-BmMCdRRY.js +1 -0
- package/assets/{ErrorState-BIsRA1yb.js → ErrorState-aw5jVL68.js} +1 -1
- package/assets/{OnboardingWizard-Csoe03wD.js → OnboardingWizard-ZIKb4R7f.js} +1 -1
- package/assets/{account-form-helpers-D-BQZoMb.js → account-form-helpers-DfMv3Vm9.js} +1 -1
- package/assets/accounts-CrTDi8os.js +1 -0
- package/assets/{advanced-CvCoog81.js → advanced-BgKEb2Uu.js} +1 -1
- package/assets/{appearance-_olMhTLV.js → appearance-BqTD1S6E.js} +1 -1
- package/assets/{avatar-jWgGKBea.js → avatar-DJyeiQWZ.js} +1 -1
- package/assets/{browser-ponyfill-DbQcbLn8.js → browser-ponyfill-Dh60wXQI.js} +2 -2
- package/assets/{circle-check-BHEWPIM9.js → circle-check-D80BeTT0.js} +1 -1
- package/assets/{download-Bn8cHaDK.js → download-CL5tLTIq.js} +1 -1
- package/assets/{filters-CTDi4esq.js → filters-CmAhUtr7.js} +1 -1
- package/assets/{flagged-BXaMaCQ9.js → flagged-FVOnHcGW.js} +1 -1
- package/assets/{folders-Ckfanrdl.js → folders-C3nXyWs-.js} +1 -1
- package/assets/{index-C9zMY2j2.js → index-Cn3FYNrs.js} +59 -59
- package/assets/{index-othE1Xw8.js → index-DDXUQNXW.js} +1 -1
- package/assets/index-DaAOT-u4.js +1 -0
- package/assets/{index-Bp4WnjS6.css → index-rCP-8V3i.css} +1 -1
- package/assets/{kbd-BbnyBcuL.js → kbd-kS7fe5CA.js} +1 -1
- package/assets/{labels-CdNhMV1Y.js → labels-B5UsoCQq.js} +1 -1
- package/assets/mail-C8lnWIJ3.js +118 -0
- package/assets/{move-options-YmRh5GJL.js → move-options-afteG1Yt.js} +1 -1
- package/assets/{onboarding-CIjOZgeF.js → onboarding-DpCrXMCi.js} +1 -1
- package/assets/{pencil-DP1qeIQH.js → pencil-DZXg9Ca_.js} +1 -1
- package/assets/{senders-DL9uiwnk.js → senders-DbIAqf8q.js} +1 -1
- package/assets/settings-CvsCRNt8.js +1 -0
- package/assets/{settings-screen-3JytIzKD.js → settings-screen-DkAiLtxH.js} +1 -1
- package/assets/{shield-check-CccHwNs5.js → shield-check-D6oCvWFI.js} +1 -1
- package/assets/{suggested-vips-Bm768wmz.js → suggested-vips-Dgcx59pV.js} +1 -1
- package/assets/{useDebouncedValue-CHwoWpg2.js → useDebouncedValue-DPVybDdU.js} +1 -1
- package/assets/{useFilters-U1aiIzCI.js → useFilters-CuXoCjbt.js} +1 -1
- package/assets/{useLabels-G92Yjyjc.js → useLabels-Ch9GQZe_.js} +1 -1
- package/assets/{useSignature-iOtHXa_Q.js → useSignature-CBloimjZ.js} +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/ComposeBody-CsWxoFur.js +0 -25
- package/assets/ConfirmDialog-CAGMaJNT.js +0 -1
- package/assets/accounts-DPXQbePy.js +0 -1
- package/assets/index-B4mxwkl1.js +0 -1
- package/assets/mail-yWRDt7wn.js +0 -118
- package/assets/settings-BaeGte2P.js +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{a as wi,r as z,j as M,B as Ff,d0 as eu,c0 as tu,d as Af,d1 as Yg,d2 as Xg,G as Gg,a0 as nu,d3 as Zg}from"./index-Cn3FYNrs.js";import{s as Ga,U as Qg,c as ru,a as ep}from"./mail-C8lnWIJ3.js";import{C as tp}from"./ConfirmDialog-BmMCdRRY.js";import"./pencil-DZXg9Ca_.js";import"./avatar-DJyeiQWZ.js";import"./kbd-kS7fe5CA.js";import"./shield-check-D6oCvWFI.js";import"./account-form-helpers-DfMv3Vm9.js";import"./useSignature-CBloimjZ.js";import"./useDebouncedValue-DPVybDdU.js";import"./useFilters-CuXoCjbt.js";import"./ErrorState-aw5jVL68.js";import"./format-CKZmh-Ru.js";import"./move-options-afteG1Yt.js";import"./download-CL5tLTIq.js";import"./useLabels-Ch9GQZe_.js";import"./circle-check-D80BeTT0.js";const np=wi("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);const rp=wi("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);const ip=wi("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);const op=wi("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);const sp=wi("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]),ap=({language:n,languages:e,onSelect:t,helpText:r})=>{const[i,o]=z.useState(!1),s=z.useRef(null),a=z.useRef(null),l=z.useRef(null),u=z.useId(),c=z.useCallback(h=>{o(!1),h&&a.current?.focus()},[]);z.useEffect(()=>{if(!i)return;const h=g=>{s.current?.contains(g.target)||o(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[i]),z.useEffect(()=>{if(!i)return;const h=l.current?.querySelector('[aria-checked="true"]'),g=l.current?.querySelector('[role="menuitemradio"]');(h??g)?.focus()},[i]);const f=h=>{if(h.key==="Escape"){h.preventDefault(),c(!0);return}const g=[...l.current?.querySelectorAll('[role="menuitemradio"]')??[]],m=g.indexOf(document.activeElement),p=Xg(h.key,m,g.length);p!==null&&(h.preventDefault(),g[p]?.focus())},d=h=>{t(h),c(!0)};return M.jsxs("div",{ref:s,className:"relative",children:[M.jsx(Ff,{ref:a,variant:"ghost",size:"md","aria-label":`Message language: ${tu(n)}`,"aria-haspopup":"menu","aria-expanded":i,"aria-controls":i?u:void 0,onClick:()=>o(h=>!h),"data-testid":"compose-language-chip","data-language":n,className:"min-h-11 min-w-11 shrink-0 px-2 font-medium",children:eu(n)}),i&&M.jsxs("div",{ref:l,id:u,role:"menu","aria-label":"Message language",onKeyDown:f,"data-testid":"compose-language-menu",className:"absolute right-0 top-full z-50 mt-1 flex max-h-[60dvh] min-w-56 flex-col overflow-y-auto overscroll-contain rounded-md border border-line bg-surface py-1 shadow-lg",children:[e.map(h=>M.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":h===n,lang:h,onClick:()=>d(h),className:Af("flex min-h-11 items-center justify-between gap-3 px-4 py-2.5 text-left text-sm text-fg transition-colors hover:bg-surface-sunken",h===n&&"bg-accent-2-soft"),children:[tu(h),M.jsx("span",{className:"shrink-0 text-xs text-fg-subtle",children:eu(h)})]},h)),M.jsx("p",{"data-testid":"compose-language-help",className:"border-t border-line px-4 pb-1 pt-2 text-xs text-fg-muted",children:r??Yg(navigator.userAgent)})]})]})},lp=({mode:n,onToggle:e})=>M.jsx(Ff,{variant:"ghost",size:"md","aria-pressed":n==="plain",title:"Plain text",onClick:e,"data-testid":"compose-mode-toggle",className:Af("min-h-11 shrink-0",n==="plain"&&"bg-accent-2-soft text-accent-2"),children:"Plain text"});function D(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function zf(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Ve=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,up=Ve&&"documentMode"in document?document.documentMode:null,St=Ve&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),$t=Ve&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),vr=!(!Ve||!("InputEvent"in window)||up)&&"getTargetRanges"in new window.InputEvent("input"),mn=Ve&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Of=Ve&&/Android/.test(navigator.userAgent),Ti=Ve&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!Of,Mf=Ve&&/^(?=.*Chrome).*/i.test(navigator.userAgent),po=Ve&&Of&&Mf,Ei=Ve&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&St&&!Mf,cp=0,fp=1,dp=2,Ys=1,Xs=2,Gs=4,Zs=8,hp=16,vs=32,Ss=64,Za=128,gp=1,pp=2,mp=3,yp=4,_p=5,bp=6,ui=Ti||mn||Ei?" ":"",$n=`
|
|
2
|
+
|
|
3
|
+
`,Qa=$t?" ":ui,rn={bold:1,capitalize:1024,code:16,highlight:Za,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},kp={directionless:1,unmergeable:2},mo={center:2,end:6,justify:4,left:1,right:3,start:5},xp={[pp]:"center",[bp]:"end",[yp]:"justify",[gp]:"left",[mp]:"right",[_p]:"start"},Cp={normal:0,segmented:2,token:1},vp={[cp]:"normal",[dp]:"segmented",[fp]:"token"},iu="$config";function ou(){return Ce()._blockCursorElement}function Sp(n){return n!==null&&n.nodeType===1&&n.hasAttribute("data-lexical-slot")}let jf=class no{element;before;after;constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new no(this.element,e,this.after)}withAfter(e){return new no(this.element,this.before,e)}withElement(e){return this.element===e?this:new no(e,this.before,this.after)}insertChild(e){const t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&D(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&D(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&D(359),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,r){if(this.element===e)return t===e&&r===0?"before":"after";const i=su(e,this.element);if(i===null)return"after";const o=Array.prototype.indexOf.call(e.childNodes,i);if(o<0)return"after";if(t===e)return r<=o?"before":"after";const s=su(e,t);if(s===null)return"after";const a=Array.prototype.indexOf.call(e.childNodes,s);return a>=0&&a<=o?"before":"after"}getInsertionAnchor(){return this.before}};function su(n,e){let t=e;for(;t!==null&&t.parentNode!==n;)t=t.parentNode;return t}let Rf=class ro extends jf{withBefore(e){return new ro(this.element,e,this.after)}withAfter(e){return new ro(this.element,this.before,e)}withElement(e){return this.element===e?this:new ro(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;Sp(t);)e=t,t=t.nextSibling;const r=e?e.nextSibling:this.element.firstChild;return r!==null&&r===ou()?r:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(Ei||mn||Ti);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,i=this.before,o=re().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),r.insertBefore(o,i),e){const s=re().createElement("img");s.setAttribute("data-lexical-managed-linebreak","true"),s.style.setProperty("display","inline","important"),s.style.setProperty("border","0px","important"),s.style.setProperty("margin","0px","important"),s.alt="",r.insertBefore(s,o),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=o}getFirstChildOffset(){const e=this.getFirstChild(),t=this.getInsertionAnchor();let r=0;for(let i=this.element.firstChild;i!==null&&i!==e&&i!==t;i=i.nextSibling)r++;return r}resolveChildIndex(e,t,r,i){if(r===this.element){const l=this.getFirstChildOffset(),u=ou(),c=this.element.childNodes,f=Math.min(i,c.length);let d=0;for(let h=l;h<f;h++)c[h]!==u&&d++;return[e,Math.min(d,e.getChildrenSize())]}const o=au(t,r);o.push(i);const s=au(t,this.element);let a=e.getIndexWithinParent();for(let l=0;l<s.length;l++){const u=o[l],c=s[l];if(u===void 0||u<c)break;if(u>c){a+=1;break}}return[e.getParentOrThrow(),a]}};function au(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;t.push(i)}return r!==n&&D(225),t.reverse()}let Pf;try{Pf="0.49.0+prod.esm"}catch{}const If=Pf??'"<unknown>+source"';let Ur=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){const e=Array.from(this._front).reverse();for(const t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const wn=null;function Lf(n,e=1e3){return n instanceof Qs?n.clone():n.size<e?new Map(n):new Qs().init(new Map(n),void 0,n.size)}let Qs=class Bf{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new Bf().init(this._old,this._nursery,this._size)}init(e,t,r){return this._old=e,this._nursery=t,this._size=r,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){const t=this._nursery&&this._nursery.get(e);return t!==void 0?t:this._old&&this._old.get(e)}get(e){const t=this.getWithTombstone(e);return t===wn?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){const t=new Map(this._old);for(const[r,i]of this._nursery)i!==wn?t.set(r,i):t.delete(r);this._old=t,this._nursery=void 0}return this._mutable=!1,this}set(e,t){const r=this.getWithTombstone(e);if(r===t)return this;const i=this.getNursery();return r!==wn&&r!==void 0||(this._size++,r===wn&&i.delete(e)),i.set(e,t),this}delete(e){const t=this.has(e);return t&&(this.getNursery().set(e,wn),this._size--),t}getOrInsert(e,t){const r=this.get(e);return r!==void 0?r:(this.set(e,t),t)}getOrInsertComputed(e,t){const r=this.get(e);if(r!==void 0)return r;const i=t(e);return this.set(e,i),i}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const e of this.entries())yield e[0]}*values(){for(const e of this.entries())yield e[1]}*entries(){const e=this._nursery,t=this._old;if(t)for(const r of t){const i=r[0],o=e?e.get(i):void 0;o!==wn&&(o!==void 0&&(r[1]=o),yield r)}if(e)for(const r of e)r[1]===wn||t&&t.has(r[0])||(yield r)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(const[r,i]of this.entries())e(i,r,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function yo(n,e,t,r,i,o){if(x(n)){let s=n.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===e&&((x(s)||tn(s)&&s.__slots!==null)&&yo(s,a,t,r,i,o),t.has(a)||o.delete(a),i.push(a)),s=s.getNextSibling()}}for(const s of tn(n)&&n.__slots!==null?n.__slots.values():[]){const a=r.get(s);a!==void 0&&In(a)&&a.__slotHost===e&&((x(a)||tn(a)&&a.__slots!==null)&&yo(a,s,t,r,i,o),t.has(s)||o.delete(s),i.push(s))}}let ea=!1,el=0;function wp(n){el=n.timeStamp}function ws(n,e,t){const r=n.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(n===i||r&&n.previousSibling===i)||r&&Lr(n,t)!==void 0}function Tp(n,e,t){const r=Oe(ot(t)),i=r&&rt(r,t._rootElement);let o=null,s=null;i!==null&&i.anchorNode===n&&(o=i.anchorOffset,s=i.focusOffset);const a=n.nodeValue;a!==null&&Cl(e,a,o,s,!1)}function Ep(n,e,t){if(N(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return it(e)&&t.isAttached()}function Np(n,e,t){for(let r=n;r&&!hh(r);r=Vn(r)){const i=Lr(r,e);if(i!==void 0){const o=ie(i,t);if(o)return Q(o)||!K(r)?void 0:[r,o]}}}function Kf(n,e,t){ea=!0;const r=performance.now()-el>100;try{yt(n,()=>{const i=A()||(function(f){return f.read("latest",()=>{const d=A();return d!==null?d.clone():null})})(n),o=new Map,s=n._editorState,a=n._blockCursorElement;let l=!1,u="";for(let f=0;f<e.length;f++){const d=e[f],h=d.type,g=d.target,m=Np(g,n,s);if(!m)continue;const[p,y]=m;if(h==="characterData")r&&$(y)&&it(g)&&Ep(i,g,y)&&Tp(g,y,n);else if(h==="childList"){l=!0;const _=d.addedNodes;for(let S=0;S<_.length;S++){const C=_[S],w=Zd(C),v=C.parentNode;if(!(v==null||C===a||w!==null||ws(C,v,n)||n._slotsUsed&&K(C)&&C.hasAttribute("data-lexical-slot")||hh(C))){if($t){const T=(K(C)?C.innerText:null)||C.nodeValue;T&&(u+=T)}v.removeChild(C)}}const b=d.removedNodes,k=b.length;if(k>0){let S=0;for(let C=0;C<k;C++){const w=b[C];(ws(w,g,n)||a===w)&&(g.appendChild(w),S++)}k!==S&&o.set(p,y)}}}if(o.size>0)for(const[f,d]of o)d.reconcileObservedMutation(f,n);const c=t.takeRecords();if(c.length>0){for(let f=0;f<c.length;f++){const d=c[f],h=d.addedNodes,g=d.target;for(let m=0;m<h.length;m++){const p=h[m],y=p.parentNode;y==null||p.nodeName!=="BR"||ws(p,g,n)||y.removeChild(p)}}t.takeRecords()}i!==null&&(l&&pe(i),$t&&ih(n)&&i.insertRawText(u))})}finally{ea=!1}}function Wf(n){const e=n._observer;e!==null&&Kf(n,e.takeRecords(),e)}function qf(n){(function(e){el===0&&ot(e).addEventListener("textInput",wp,!0)})(n),n._observer=new MutationObserver((e,t)=>{Kf(n,e,t)})}const lu="latest";let Dp=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Ap).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function Ni(n,e){return new Dp(n,e)}function Di(n,e,t=lu){const r=(t===lu?n.getLatest():n).__state;return r?r.getValue(e):e.defaultValue}function hr(n,e,t){let r;if(Me(),typeof t=="function"){const o=n.getLatest(),s=Di(o,e);if(r=t(s),e.isEqual(s,r))return o}else r=t;const i=n.getWritable();return Hf(i).updateFromKnown(e,r),i}function $p(n){const e=new Map,t=new Set;for(const{ownNodeConfig:r}of Nl(typeof n=="function"?n:n.replace))if(r&&r.stateConfigs)for(const i of r.stateConfigs){let o;"stateConfig"in i?(o=i.stateConfig,i.flat&&t.add(o.key)):o=i,e.set(o.key,o)}return{flatKeys:t,sharedConfigMap:e}}const uu=new Set(["__proto__","constructor","prototype"]);let Fp=class Uf{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,r=void 0,i=new Map,o=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=i;const{sharedConfigMap:s}=this.sharedNodeState,a=o!==void 0?o:(function(l,u,c){let f=c.size;if(u)for(const d in u){const h=l.get(d);h&&c.has(h)||f++}return f})(s,r,i);this.size=a}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return cu(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,i=new Map(this.knownState);return new Uf(e,t,(function(o,s,a){let l;if(a)for(const[u,c]of Object.entries(a)){if(uu.has(u))continue;const f=o.get(u);f?s.has(f)||s.set(f,f.parse(c)):(l=l||{},l[u]=c)}return l})(t.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(const e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:o}=this;i.has(e)||o&&r in o||(o&&(delete o[r],this.unknownState=cu(o)),this.size++),i.set(e,t)}updateFromUnknown(e,t){if(uu.has(e))return;const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}};function Hf(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new Fp(e,Jf(e));return e.__state=t,t}function Jf(n){return n.__state?n.__state.sharedNodeState:Yd(Ce(),n.getType()).sharedNodeState}function cu(n){if(n)for(const e in n)return n}function Ap(n){return n}function fu(n,e,t){for(const[r,i]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const o=t?t.getValue(r):r.defaultValue;if(o!==i&&!r.isEqual(o,i))return!0}return!1}function du(n,e,t){const{unknownState:r}=e,i=t?t.unknownState:void 0;if(r){for(const[o,s]of Object.entries(r))if(!n.has(o)&&(n.add(o),s!==(i?i[o]:void 0)))return!0}return!1}function hu(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function gu(n,e){const t=n.__mode,r=n.__format,i=n.__style,o=e.__mode,s=e.__format,a=e.__style,l=n.__state,u=e.__state;return(t===null||t===o)&&(r===null||r===s)&&(i===null||i===a)&&(n.__state===null||l===u||(function(c,f){if(c===f)return!0;const d=new Set;return!(c&&fu(d,c,f)||f&&fu(d,f,c)||c&&du(d,c,f)||f&&du(d,f,c))})(l,u))}function pu(n,e){const t=n.mergeWithSibling(e),r=fe()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function mu(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&$(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(gu(e,r)){r=pu(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&$(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(gu(r,t)){r=pu(r,t);break}break}t.remove()}}else r.remove()}function Ot(n){return yu(n.anchor),yu(n.focus),n}function yu(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,i;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),i=!0):(r=e.getChildAtIndex(t),i=!1),$(r)){n.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!x(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}const ci=Symbol.for("@lexical/CachedTextSize");function _u(n,e){return na.read(()=>{let t=0,r=n;for(let i=0;i<e&&r!==null;i++){const o=wt.get(r);if(o===void 0&&D(345,r),x(o)){const s=Se.get(r);if(s!==void 0&&x(s)&&s.__parent!==o.__parent)t+=o.getTextContentSize();else{const a=On.get(r),l=a&&a.__lexicalTextContent;typeof l!="string"&&D(346,o.getType()),t+=l.length}i<e-1&&!o.isInline()&&(t+=2)}else{const s=o[ci];s===void 0&&D(347,o.getType(),r),t+=s}r=o.__next}return t},{editor:ue})}function Vf(n){x(n)||n[ci]===void 0&&(n[ci]=$(n)?n.__text.length:n.getTextContentSize())}const zp=4;let fi,ue,di,ee="",Te=null,qe=null,Ie=null;function Mt(){return{firstTextKey:Ie,format:Te,style:qe}}function ht(n){n.firstTextKey!==null&&(Te=n.format,qe=n.style,Ie=n.firstTextKey)}function ta(n){if(Ie!==null)return;const e=n.__lexicalFirstTextKey;if(e===void 0&&D(348),e===null)return;const t=Se.get(e);$(t)&&(Te=t.getFormat(),qe=t.getStyle(),Ie=e)}let Go,ri,ii,wt,na,Se,On,ra,hi,Mn,Zt=!1,_o=!1;function fn(n,e){const t=wt.get(n),r=Se.has(n);if(e!==null){const i=la(n);i.parentNode===e&&e.removeChild(i)}if(!r){if(ue._keyToDOMMap.delete(n),x(t)){const i=Ro(t,wt);ia(i,0,i.length-1,null)}if(t!==void 0){for(const i of at(t).values()){const o=sa(i);fn(i,null),o!==null&&o.remove()}vl(hi,di,Go,t,"destroyed")}}}function ia(n,e,t,r){for(let i=e;i<=t;++i){const o=n[i];o!==void 0&&fn(o,r)}}function Tn(n,e){n.setProperty("text-align",e)}const Op="40px";function Yf(n,e){const t=fi.theme.indent;if(typeof t=="string"){const r=n.classList.contains(t);e>0&&!r?n.classList.add(t):e<1&&r&&n.classList.remove(t)}n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * var(--lexical-indent-base-value, ${Op}))`)}function Xf(n,e){const t=n.style;e===0?Tn(t,""):e===1?Tn(t,"left"):e===2?Tn(t,"center"):e===3?Tn(t,"right"):e===4?Tn(t,"justify"):e===5?Tn(t,"start"):e===6&&Tn(t,"end")}function oa(n,e){const t=(function(r){const i=r.__dir;if(i!==null)return i;if(Ne(r))return null;const o=r.getParent();return o===null||xe(o)&&o.__dir===null?"auto":null})(e);t!==null?n.dir=t:n.removeAttribute("dir")}function Gf(n){const e=re().createElement("div");return e.setAttribute("data-lexical-slot",n),e.style.display="none",e}function Zf(n,e,t){e||n.contentEditable==="false"?qm(t,ue):t.removeAttribute("contenteditable")}function bu(n,e,t){const r=ee,i=Mt();ee="";let o="";const s=Q(n);for(const[a,l]of t){const u=Gf(a);Zf(e,s,u),e.appendChild(u),ee="";const c=Mt();dn(l,xt(n,u,ue)),ht(c),Qf(n,a,e,u),o+=ee}return ht(i),ee=r,o}function at(n){return tn(n)&&n.__slots!==null?n.__slots:mh}function Qf(n,e,t,r){const i=Mn.$getSlotTargetElement(n,e,t,ue);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display="")}function sa(n){const e=On.get(n);return e!==void 0?e.parentElement:null}function ku(n,e,t){const r=at(n),i=at(e);for(const[c,f]of r)if(!i.has(c)){const d=sa(f);fn(f,null),d!==null&&d.remove()}const o=ee,s=Mt();let a="",l=null;const u=Q(e);for(const[c,f]of i){const d=r.get(c);let h=d!==void 0?sa(d):null;ee="";const g=Mt();if(h===null){h=Gf(c);let m=null;for(const p of t.children)if(!p.hasAttribute("data-lexical-slot")){m=p;break}t.insertBefore(h,m),dn(f,xt(e,h,ue))}else d===f?Gt(f,h):(d!==void 0&&fn(d,h),dn(f,xt(e,h,ue)));if(ht(g),Zf(t,u,h),Qf(e,c,t,h),a+=ee,h.parentElement===t){const m=l===null?t.firstChild:l.nextSibling;m!==h&&t.insertBefore(h,m),l=h}}return ht(s),ee=o,a}function dn(n,e){const t=Se.get(n);if(t===void 0&&D(60),e!==null){const i=wt.get(n);if(i!==void 0){const o=On.get(n);if(o!==void 0){const s=In(i)?i.__slotHost:null,a=In(t)?t.__slotHost:null,l=i.__parent!==t.__parent||s!==a,u=a!==null&&o.parentElement!==e.element;if(l||u)return e.insertChild(o),Gt(n,e.element)}}}const r=Mn.$createDOM(t,ue);if((function(i,o,s){const a=s._keyToDOMMap;Qd(o,s,i),a.set(i,o)})(n,r,ue),$(t)?r.setAttribute("data-lexical-text","true"):Q(t)&&(r.setAttribute("data-lexical-decorator","true"),Mo(r,{captureSelection:!0})),x(t)){const i=t.__indent,o=t.__size;oa(r,t),i!==0&&Yf(r,i);const s=at(t),a=s.size>0?bu(t,r,s):"";if(o===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,ee+=a,s.size>0&&(r.__lexicalSlotTextLength=a.length);else{const u=ee,c=o-1;if(aa(Ro(t,Se),t,0,c,xt(t,r,ue)),a!==""){const f=r.__lexicalTextContent||"";r.__lexicalTextContent=a+f,ee=u+a+f}s.size>0&&(r.__lexicalSlotTextLength=a.length)}const l=t.__format;l!==0&&Xf(r,l),t.isInline()||ed(null,t,r)}else{const i=t.getTextContent();if(Q(t)){const o=t.decorate(ue,fi);o!==null&&td(n,o),r.contentEditable="false";const s=at(t);s.size>0&&bu(t,r,s)}ee+=i}return e!==null&&e.insertChild(r),Mn.$decorateDOM(t,null,r,ue),Vf(t),vl(hi,di,Go,t,"created"),r}function aa(n,e,t,r,i){const o=ee,s=Mt();ee="",Te=null,qe=null,Ie=null;let a=t;for(;a<=r;++a){const u=Mt();dn(n[a],i);const c=Se.get(n[a]);c!==null&&$(c)?Te===null&&(Te=c.getFormat(),qe=c.getStyle(),Ie=c.__key):x(c)&&a<r&&!c.isInline()&&(ee+=$n),ht(u)}const l=ue._keyToDOMMap.get(e.__key);l===void 0&&D(349,e.__key),l.__lexicalTextContent=ee,l.__lexicalFirstTextKey=Ie,ee=o+ee,ht(s)}function ed(n,e,t){const r=xt(e,t,ue),i=r.element.__lexicalLastChildKind??null,o=(function(s,a){if(s){const l=s.__last;if(l){const u=a.get(l);if(u)return Pe(u)?"line-break":Q(u)&&u.isInline()?"decorator":null}return at(s).size>0?null:"empty"}return null})(e,Se);i!==o&&r.setManagedLineBreak(o)}function Mp(n,e,t){var r;Te=null,qe=null,Ie=null,(function(i,o,s){const a=ee,l=i.__size,u=o.__size;ee="";const c=s.element,f=ue._keyToDOMMap.get(o.__key);f===void 0&&D(351,o.__key);const d=u-l;if(!Zt&&Math.abs(d)<=1&&l>=zp&&i.__first===o.__first&&(d!==0||!ue._cloneNotNeeded.has(i.__key))){const h=f.__lexicalTextContent,g=ra.get(i.__key);if(!Zt&&typeof h=="string"&&g!==void 0){const m=(function(p,y){const _=y.size;if(_===0||_>=p.__size)return null;let b=p.__last,k=null,S=0;for(;b!==null&&S<_;){if(!y.has(b))return null;k=b;const C=Se.get(b);if(C===void 0)return null;b=C.__prev,S++}return S!==_||b!==null&&y.has(b)?null:k})(o,g);if(m!==null){const p=g.size;if(d===0){const y=_u(m,p);let _=m,b=0;for(;_!==null&&b<p;){const v=Se.get(_);if(v===void 0)break;const T=Mt();Gt(_,c),$(v)&&Te===null&&(Te=v.getFormat(),qe=v.getStyle(),Ie=v.__key),ht(T),_=v.__next,b++}let k="";for(_=m,b=0;_!==null&&b<p;){const v=Se.get(_);if(v===void 0)break;let T;if(x(v)){const F=ue._keyToDOMMap.get(_),E=F&&F.__lexicalTextContent;typeof E!="string"&&D(352,v.getType()),T=E}else T=v.getTextContent();k+=T,b<p-1&&x(v)&&!v.isInline()&&(k+=$n),_=v.__next,b++}const S=f.__lexicalSlotTextLength||0,C=S>0?h.slice(S):h,w=C.slice(0,C.length-y)+k;return f.__lexicalTextContent=w,ee=a+w,void xu(o,f,g)}if((function(y,_,b,k,S,C,w,v){if(v!==1&&v!==-1||w!==(v===1?2:1))return!1;const F=w-v;let E=y.__last;for(let ae=0;ae<F-1;ae++){if(E===null)return!1;const Ae=wt.get(E);if(Ae===void 0)return!1;E=Ae.__prev}if(E===null)return!1;const O=Se.get(C),R=wt.get(E);if(O===void 0||R===void 0||O.__prev!==R.__prev)return!1;const L=[];let J=C;for(let ae=0;ae<w;ae++){if(J===null)return!1;L.push(J);const Ae=Se.get(J);J=Ae?Ae.__next:null}const te=[];J=E;for(let ae=0;ae<F;ae++){if(J===null)return!1;te.push(J);const Ae=wt.get(J);J=Ae?Ae.__next:null}const X=new Set(te),Z=new Set(L),I=[];let P=0,W=0;for(;P<F&&W<w;)if(L[W]===te[P])I.push({key:L[W],kind:"reconcile"}),P++,W++;else if(Z.has(te[P])){if(X.has(L[W]))return!1;I.push({key:L[W],kind:"create",nextIndex:W}),W++}else I.push({key:te[P],kind:"destroy"}),P++;for(;P<F;)I.push({key:te[P++],kind:"destroy"});for(;W<w;)I.push({key:L[W],kind:"create",nextIndex:W}),W++;const ce=_u(E,F);for(const ae of I){const Ae=Mt();if(ae.kind==="reconcile")Gt(ae.key,b.element);else if(ae.kind==="destroy")fn(ae.key,b.element);else{let ft=null;for(let Zn=ae.nextIndex+1;Zn<w;Zn++){const qr=ue._keyToDOMMap.get(L[Zn]);if(qr!==void 0){ft=qr;break}}dn(ae.key,b.withBefore(ft??b.before))}if(ae.kind!=="destroy"){const ft=Se.get(ae.key);ft&&$(ft)&&Te===null&&(Te=ft.getFormat(),qe=ft.getStyle(),Ie=ft.__key)}ht(Ae)}let se="";for(let ae=0;ae<w;ae++){const Ae=Se.get(L[ae]);if(Ae===void 0)return!1;let ft;if(x(Ae)){const Zn=ue._keyToDOMMap.get(L[ae]),qr=Zn&&Zn.__lexicalTextContent;typeof qr!="string"&&D(350,Ae.getType()),ft=qr}else ft=Ae.getTextContent();se+=ft,ae<w-1&&x(Ae)&&!Ae.isInline()&&(se+=$n)}const Fe=k.__lexicalSlotTextLength||0,ct=Fe>0?S.slice(Fe):S;return k.__lexicalTextContent=ct.slice(0,ct.length-ce)+se,!0})(i,0,s,f,h,m,p,d)){const y=f.__lexicalTextContent;return typeof y!="string"&&D(353),ee=a+y,void xu(o,f,g)}}}if(d===0){let m=i.__first,p=0;for(;m!==null;){const y=Se.get(m);if(y===void 0)break;const _=Zt||ii.has(m)||ri.has(m),b=Mt();if(_)Gt(m,c);else{let k,S;if(x(y)){S=On.get(m);const C=S&&S.__lexicalTextContent;typeof C!="string"&&D(354,y.getType()),k=C}else k=y.getTextContent();ee+=k,S!==void 0&&ta(S)}$(y)?Te===null&&(Te=y.getFormat(),qe=y.getStyle(),Ie=y.__key):x(y)&&p<u-1&&!y.isInline()&&(ee+=$n),ht(b),m=y.__next,p++}return f.__lexicalTextContent=ee,f.__lexicalFirstTextKey=Ie,void(ee=a+ee)}}if(l===1&&u===1){const h=i.__first,g=o.__first;if(h===g)Gt(h,c);else{const p=la(h),y=dn(g,null);try{p.parentNode===c?c.replaceChild(y,p):s.insertChild(y)}catch(_){if(typeof _=="object"&&_!=null){const b=`${_.toString()} Parent: ${c.tagName}, new child: {tag: ${y.tagName} key: ${g}}, old child: {tag: ${p.tagName}, key: ${h}}.`;throw new Error(b)}throw _}fn(h,null)}const m=Se.get(g);$(m)&&Te===null&&(Te=m.getFormat(),qe=m.getStyle(),Ie=m.__key)}else{const h=Ro(i,wt),g=Ro(o,Se);if(h.length!==l&&D(227),g.length!==u&&D(228),l===0)u!==0&&aa(g,o,0,u-1,s);else if(u===0){if(l!==0){const m=s.after==null&&s.before==null&&at(o).size===0&&s.element.__lexicalLineBreak==null;ia(h,0,l-1,m?null:c),m&&(c.textContent="")}}else(function(m,p,y,_,b,k){const S=_-1,C=b-1;let w,v,T=k.getFirstChild(),F=0,E=0;for(;F<=S&&E<=C;){const L=p[F],J=y[E],te=Mt();if(L===J)T=Ts(Gt(J,k.element)),F++,E++;else{if(v===void 0&&(v=Cu(y,E)),w===void 0)w=Cu(p,F);else if(!w.has(L)){F++,ht(te);continue}if(!v.has(L)){T=Ts(la(L)),fn(L,k.element),F++,w.delete(L),ht(te);continue}if(w.has(J)){const Z=Dr(ue,J);Z!==T&&k.withBefore(T??k.before).insertChild(Z),T=Ts(Gt(J,k.element)),F++,E++}else dn(J,k.withBefore(T??k.before)),E++}const X=Se.get(J);X!==null&&$(X)?Te===null&&(Te=X.getFormat(),qe=X.getStyle(),Ie=X.__key):x(X)&&E<=C&&!X.isInline()&&(ee+=$n),ht(te)}const O=F>S,R=E>C;if(O&&!R){const L=y[C+1],J=L===void 0?null:ue.getElementByKey(L);aa(y,m,E,C,k.withBefore(J??k.before))}else R&&!O&&ia(p,F,S,k.element)})(o,h,g,l,u,s)}f.__lexicalTextContent=ee,f.__lexicalFirstTextKey=Ie,ee=a+ee})(n,e,xt(e,t,ue)),xe(e)||(r=e,Te==null||Te===r.__textFormat||_o||r.setTextFormat(Te),(function(i){qe==null||qe===i.__textStyle||_o||i.setTextStyle(qe)})(e))}function xu(n,e,t){const r=e.__lexicalFirstTextKey;if(r!=null){const i=n.__key;let o=r;for(;o!==null;){const s=Se.get(o);if(s===void 0){o=null;break}if(s.__parent===i)break;o=s.__parent}if(o!==null&&!t.has(o)){const s=Se.get(r);if($(s))return Te=s.getFormat(),void(qe=s.getStyle())}}e.__lexicalFirstTextKey=Ie}function Gt(n,e){const t=wt.get(n);let r=Se.get(n);t!==void 0&&r!==void 0||D(61);const i=Zt||ii.has(n)||ri.has(n),o=Dr(ue,n);if(t===r&&!i){let s;if(x(t)){const a=o.__lexicalTextContent;typeof a!="string"&&D(355,t.getType()),s=a,ta(o)}else s=t.getTextContent();return ee+=s,o}if(t!==r&&i&&vl(hi,di,Go,r,"updated"),Mn.$updateDOM(r,t,o,ue)){const s=dn(n,null);return e===null&&D(62),e.replaceChild(s,o),fn(n,null),s}if(x(t)){x(r)||D(334,n);const s=r.__indent;(Zt||s!==t.__indent)&&Yf(o,s);const a=r.__format;(Zt||a!==t.__format)&&Xf(o,a);const l=i&&(at(r).size>0||at(t).size>0)?ku(t,r,o):"";if(i){const u=ee;if(Mp(t,r,o),Ne(r)||r.isInline()||ed(0,r,o),l!==""){const c=o.__lexicalTextContent||"";o.__lexicalTextContent=l+c,ee=u+l+c,o.__lexicalSlotTextLength=l.length}else(at(r).size>0||at(t).size>0)&&(o.__lexicalSlotTextLength=0)}else{const u=o.__lexicalTextContent;typeof u!="string"&&D(356,t.getType()),ee+=u,ta(o)}if((Zt||r.__dir!==t.__dir||r.__parent!==t.__parent)&&(oa(o,r),Ne(r)&&!Zt))for(const u of r.getChildren())x(u)&&oa(Dr(ue,u.getKey()),u)}else{const s=r.getTextContent();if(Q(r)){const a=r.decorate(ue,fi);a!==null&&td(n,a),i&&(at(r).size>0||at(t).size>0)&&ku(t,r,o)}ee+=s}if(!_o&&Ne(r)){const s=r.getLatest();if(s.__cachedText!==ee){const a=s.getWritable();a.__cachedText=ee,r=a}}return Mn.$decorateDOM(r,t,o,ue),Vf(r),o}function td(n,e){let t=ue._pendingDecorators;const r=ue._decorators;if(t===null){if(r[n]===e)return;t=eh(ue)}t[n]=e}function Ts(n){let e=n.nextSibling;return e!==null&&e===ue._blockCursorElement&&(e=e.nextSibling),e}function Cu(n,e){const t=new Set;for(let r=e;r<n.length;r++)t.add(n[r]);return t}function jp(n,e,t,r,i,o){ee="",Te=null,qe=null,Ie=null,Zt=r===2,ue=t,fi=t._config,Mn=t._config.dom||$o,di=t._nodes,Go=ue._listeners.mutation,ri=i,ii=o,wt=n._nodeMap,na=n,Se=e._nodeMap,_o=e._readOnly,On=Lf(t._keyToDOMMap),ra=(function(){const a=new Map,l=u=>{for(const c of u){const f=Se.get(c);if(f===void 0)continue;const d=f.__parent;if(d===null)continue;let h=a.get(d);h===void 0&&(h=new Set,a.set(d,h)),h.add(c)}};return l(ri.keys()),l(ii),a})();const s=new Map;return hi=s,Gt("root",null),ue=void 0,di=void 0,ri=void 0,ii=void 0,wt=void 0,na=void 0,Se=void 0,fi=void 0,On=void 0,ra=void 0,hi=void 0,Mn=$o,s}function la(n){const e=On.get(n);return e===void 0&&D(75,n),e}function B(n){return{type:n}}const jt=B("SELECTION_CHANGE_COMMAND"),nd=B("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Zo=B("CLICK_COMMAND"),rd=B("BEFORE_INPUT_COMMAND"),id=B("INPUT_COMMAND"),od=B("COMPOSITION_START_COMMAND"),sd=B("COMPOSITION_END_COMMAND"),hn=B("DELETE_CHARACTER_COMMAND"),gr=B("INSERT_LINE_BREAK_COMMAND"),jn=B("INSERT_PARAGRAPH_COMMAND"),An=B("CONTROLLED_TEXT_INSERTION_COMMAND"),Pr=B("PASTE_COMMAND"),io=B("REMOVE_TEXT_COMMAND"),Sr=B("DELETE_WORD_COMMAND"),wr=B("DELETE_LINE_COMMAND"),Tt=B("FORMAT_TEXT_COMMAND"),Rp=B("SET_TEXT_FORMAT_COMMAND"),Qo=B("UNDO_COMMAND"),es=B("REDO_COMMAND"),tl=B("KEYDOWN_COMMAND"),nl=B("KEY_ARROW_RIGHT_COMMAND"),ad=B("MOVE_TO_END"),rl=B("KEY_ARROW_LEFT_COMMAND"),ld=B("MOVE_TO_START"),il=B("KEY_ARROW_UP_COMMAND"),ol=B("KEY_ARROW_DOWN_COMMAND"),bo=B("KEY_ENTER_COMMAND"),ud=B("KEY_SPACE_COMMAND"),ts=B("KEY_BACKSPACE_COMMAND"),sl=B("KEY_ESCAPE_COMMAND"),al=B("KEY_DELETE_COMMAND"),ll=B("KEY_TAB_COMMAND"),Pp=B("INSERT_TAB_COMMAND"),Ip=B("INDENT_CONTENT_COMMAND"),vu=B("OUTDENT_CONTENT_COMMAND"),cd=B("DROP_COMMAND"),fd=B("FORMAT_ELEMENT_COMMAND"),dd=B("DRAGSTART_COMMAND"),hd=B("DRAGOVER_COMMAND"),Lp=B("DRAGEND_COMMAND"),$i=B("COPY_COMMAND"),ns=B("CUT_COMMAND"),ul=B("SELECT_ALL_COMMAND"),Bp=B("CLEAR_EDITOR_COMMAND"),Kp=B("CLEAR_HISTORY_COMMAND"),Zr=B("CAN_REDO_COMMAND"),Qr=B("CAN_UNDO_COMMAND"),gd=B("FOCUS_COMMAND"),Wp=B("BLUR_COMMAND"),qp=B("KEY_MODIFIER_COMMAND");function Up(n){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(t,r){let i=e.get(t);i===void 0&&(i={dispose:n(t,r),holders:new Set},e.set(t,i));const o=()=>{const s=e.get(t);s&&s.holders.delete(o)&&s.holders.size===0&&(e.delete(t),s.dispose())};return i.holders.add(o),o}}}function oi(n,e,t,r){return n.addEventListener(e,t,r),n.removeEventListener.bind(n,e,t,r)}const Vt=Object.freeze({}),ua=[["keydown",function(n,e){const t=e._inputState;t.lastKeyDownTimeStamp=n.timeStamp,t.lastKeyCode=n.key,n.key!=="Backspace"&&gi(t),!e.isComposing()&&j(e,tl,n)}],["pointerdown",function(n,e){const t=Pn(n),r=n.pointerType;Ft(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&yt(e,()=>{jo(t,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(n,e){j(e,od,n)}],["compositionend",function(n,e){const t=e._inputState;$t?t.compositionPhase="ending-firefox":mn||!Ti&&!Ei?j(e,sd,n):(t.compositionPhase="ending-safari",t.compositionEndData=n.data)}],["input",function(n,e){n.stopPropagation();const t=e._inputState;gi(t),yt(e,()=>{_d(n,e)||e.dispatchCommand(id,n)},{event:n}),t.unprocessedBeforeInputData=null}],["click",function(n,e){yt(e,()=>{const t=A(),r=Oe(ot(e)),i=lt();if(r){if(N(t)){const o=t.anchor,s=o.getNode();o.type==="element"&&o.offset===0&&t.isCollapsed()&&!Ne(s)&&me().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&t.is(i)&&(r.removeAllRanges(),t.dirty=!0)}else if(n.pointerType==="touch"||n.pointerType==="pen"){const o=rt(r,e._rootElement).anchorNode;(K(o)||it(o))&&pe(mi(i,r,e,n))}}if($t&&r!==null&&r.rangeCount===0){const o=e._rootElement;if(o!==null&&n.target===o){const s=n.clientY;let a=o.childNodes.length;for(let u=0;u<o.childNodes.length;u++){const c=o.childNodes[u];if(K(c)){const f=c.getBoundingClientRect();if(s<=(f.top+f.bottom)/2){a=u;break}}}r.setBaseAndExtent(o,a,o,a);const l=mi(i,r,e,n);l!==null?pe(l):r.removeAllRanges()}}j(e,Zo,n)})}],["cut",Vt],["copy",Vt],["dragstart",Vt],["dragover",Vt],["dragend",Vt],["paste",Vt],["focus",Vt],["blur",Vt],["drop",Vt]];vr&&ua.push(["beforeinput",(n,e)=>(function(t,r){const i=t.inputType;i==="deleteCompositionText"||$t&&ih(r)||i!=="insertCompositionText"&&yt(r,()=>{_d(t,r)||j(r,rd,t)},{event:t})})(n,e)]);const ca=new WeakMap,ko=new WeakMap,Hp=Up(n=>(n.addEventListener("selectionchange",Nu),()=>n.removeEventListener("selectionchange",Nu)));function pd(n,e,t,r,i,o){const s=n.anchor,a=n.focus,l=s.getNode(),u=fe();let c;if(o!==void 0)c=o;else{const m=Oe(ot(u));c=m!==null?rt(m,u._rootElement):null}const f=c!==null?c.anchorNode:null,d=s.key,h=u.getElementByKey(d),g=t.length;return d!==a.key||!$(l)||(!i&&(!vr||u._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||l.isDirty()&&g<2||th(t))&&s.offset!==a.offset&&!l.isComposing()||_t(l)||l.isDirty()&&g>1||(i||!vr)&&h!==null&&!l.isComposing()&&f!==pn(l,h,u)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||!l.isComposing()&&(l.getFormat()!==n.format||l.getStyle()!==n.style)||(function(m,p){if(p.isSegmented())return!0;if(!m.isCollapsed())return!1;const y=m.anchor.offset,_=p.getParentOrThrow(),b=Fo(p);return y===0?!p.canInsertTextBefore()||!_.canInsertTextBefore()&&!p.isComposing()||b||(function(k){const S=k.getPreviousSibling();return($(S)||x(S)&&S.isInline())&&!S.canInsertTextAfter()})(p):y===p.getTextContentSize()&&(!p.canInsertTextAfter()||!_.canInsertTextAfter()&&!p.isComposing()||b)})(n,l)}function Su(n,e){return it(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function wu(n,e,t){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=rt(n,e._rootElement),a=e._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,Su(r,i)&&Su(o,s)&&!a.postDeleteSelectionToRestore)||yt(e,()=>{if(!t)return void pe(null);if(!zi(e,r,o))return;let l=A();if(a.postDeleteSelectionToRestore&&N(l)&&l.isCollapsed()){const u=l.anchor,c=a.postDeleteSelectionToRestore.anchor;(u.key===c.key&&u.offset===c.offset+1||u.offset===1&&c.getNode().is(u.getNode().getPreviousSibling()))&&(l=a.postDeleteSelectionToRestore.clone(),pe(l))}if(a.postDeleteSelectionToRestore=null,N(l)){const u=l.anchor,c=u.getNode();if(l.isCollapsed()){n.type==="Range"&&r===o&&(l.dirty=!0);const f=ot(e).event,d=f?f.timeStamp:performance.now(),{format:h,style:g,offset:m,key:p,timeStamp:y}=a.collapsedSelectionFormat,_=me(),b=e.isComposing()===!1&&_.getTextContent()==="";if(d<y+200&&u.offset===m&&u.key===p)oo(l,h,g);else if(u.type==="text")$(c)||D(141),md(l,c);else if(u.type==="element"&&!b){x(c)||D(259);const k=u.getNode();k.isEmpty()?(function(S,C){const w=C.getTextFormat(),v=C.getTextStyle();oo(S,w,v)})(l,k):oo(l,l.format,"")}}else{const f=u.key,d=l.focus.key,h=l.getNodes(),g=h.length,m=l.isBackward(),p=m?s:i,y=m?i:s,_=m?d:f,b=m?f:d;let k=2047,S=!1;for(let C=0;C<g;C++){const w=h[C],v=w.getTextContentSize();if($(w)&&v!==0&&!(C===0&&w.__key===_&&p===v||C===g-1&&w.__key===b&&y===0)&&(S=!0,k&=w.getFormat(),k===0))break}l.format=S?k:0}}j(e,jt)})}function oo(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function md(n,e){oo(n,e.getFormat(),e.getStyle())}function yd(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Tu(n){const{lastKeyCode:e}=fe()._inputState;if(n==null||n.length<=1||e==null)return;const t=e.length===1?e:e==="Enter"?`
|
|
4
|
+
`:e==="Tab"?" ":null;if(!t)return;const r=A();if(!N(r)||!r.isCollapsed())return;const i=r.anchor.getNode();if(!$(i))return;const{offset:o}=r.anchor;if(i.getTextContentSize()===o){const s=i.getNextSibling();if(t===`
|
|
5
|
+
`){if(Pe(s))s.selectEnd();else if(!s){const a=q(i,Er),l=a&&a.getNextSibling();x(l)&&l.selectStart()}}else t===" "?Tr(s)&&s.selectEnd():$(s)&&s.getTextContent()[0]===t&&s.select(1,1)}else i.getTextContent()[o]===t&&i.select(o+1,o+1)}function gi(n){n.isInsertTextAfterHandledSelectionCommand=!1,n.handledSelectionCommandTimeoutId!==null&&(clearTimeout(n.handledSelectionCommandTimeoutId),n.handledSelectionCommandTimeoutId=null)}function Eu(n){gi(n),n.isInsertTextAfterHandledSelectionCommand=!0,n.handledSelectionCommandTimeoutId=setTimeout(()=>gi(n),0)}function _d(n,e){const t=Pn(n);if(K(t)&&jo(t,e))return!0;const r=e.getRootElement();if(r===null)return!1;const i=Ar(r.ownerDocument);return i!==null&&r.contains(i)&&jo(i,e)}function Jp(n){const e=n.inputType,t=yd(n),r=fe(),i=r._inputState,o=A();if(e==="insertText"&&n.data&&i.isInsertTextAfterHandledSelectionCommand){if(gi(i),n.preventDefault(),N(o)&&!o.isCollapsed()){const f=o.isBackward()?o.anchor:o.focus;o.anchor.set(f.key,f.offset,f.type),o.focus.set(f.key,f.offset,f.type)}return!0}if(e==="deleteContentBackward"){if(o===null){const f=lt();if(!N(f))return!0;pe(f.clone())}if(N(o)){const f=o.anchor.key===o.focus.key;if((function(d,h){return d.lastKeyCode==="MediaLast"&&h<d.lastKeyDownTimeStamp+30})(i,n.timeStamp)&&r.isComposing()&&f){if(je(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{yt(r,()=>{je(null)})},30),N(o)){const d=o.anchor.getNode();d.markDirty(),$(d)||D(142),md(o,d)}}else{if(je(null),mn&&t!==null&&!t.collapsed&&(o.applyDOMRange(t),!o.isCollapsed()))return n.preventDefault(),o.removeText(),!0;n.preventDefault();const d=o.anchor.getNode(),h=d.getTextContent(),g=d.canInsertTextAfter(),m=o.anchor.offset===0&&o.focus.offset===h.length;let p=po&&f&&!m&&g;if(p&&o.isCollapsed()&&(p=!Q(Fm(o.anchor,!0))),!p){j(r,hn,!0);const y=A();po&&N(y)&&y.isCollapsed()&&(i.postDeleteSelectionToRestore=y,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!N(o))return!0;const s=n.data;i.unprocessedBeforeInputData!==null&&xl(!1,r,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||Ne(o.anchor.getNode())||t===null||o.applyDOMRange(t),i.unprocessedBeforeInputData=null;const a=o.anchor,l=o.focus,u=a.getNode(),c=l.getNode();if(e==="insertText"||e==="insertTranspose"){if(s===`
|
|
6
|
+
`)n.preventDefault(),j(r,gr,!1);else if(s===$n)n.preventDefault(),j(r,jn);else if(s==null&&n.dataTransfer){const f=n.dataTransfer.getData("text/plain");n.preventDefault(),o.insertRawText(f)}else s!=null&&pd(o,t,s,n.timeStamp,!0)?(n.preventDefault(),j(r,An,s),Tu(s)):i.unprocessedBeforeInputData=s;return i.lastBeforeInputInsertTextTimeStamp=n.timeStamp,!0}switch(n.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":j(r,An,n),Tu((n.dataTransfer?n.dataTransfer.getData("text/plain"):null)??n.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const d=r._compositionKey;je(null),f||j(r,An,n),so(d);break}case"insertLineBreak":je(null),j(r,gr,!1);break;case"insertParagraph":je(null),i.isInsertLineBreak&&!mn?(i.isInsertLineBreak=!1,j(r,gr,!1)):j(r,jn);break;case"insertFromPaste":case"insertFromPasteAsQuotation":j(r,Pr,n);break;case"deleteByComposition":(function(f,d){return f!==d||x(f)||x(d)||!Fo(f)||!Fo(d)})(u,c)&&j(r,io,n);break;case"deleteByDrag":$r(ha),j(r,io,n);break;case"deleteByCut":j(r,io,n);break;case"deleteContent":j(r,hn,!1);break;case"deleteWordBackward":j(r,Sr,!0);break;case"deleteWordForward":j(r,Sr,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":j(r,wr,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":j(r,wr,!1);break;case"formatStrikeThrough":j(r,Tt,"strikethrough");break;case"formatBold":j(r,Tt,"bold");break;case"formatItalic":j(r,Tt,"italic");break;case"formatUnderline":j(r,Tt,"underline");break;case"historyUndo":j(r,Qo);break;case"historyRedo":j(r,es)}return!0}function Vp(n){const e=fe(),t=e._inputState,r=A(),i=n.data,o=yd(n);let s=!1;if(i!=null&&N(r)){const a=Oe(ot(e)),l=a!==null?rt(a,e._rootElement):null,u=n.inputType==="insertCompositionText"&&t.compositionPhase!=="ending-firefox"&&!e.isComposing();u&&(t.hadOrphanedCompositionEvents=!0);const c=r.anchor.getNode(),f=n.inputType==="insertCompositionText"&&t.compositionPhase!=="ending-firefox"&&e.isComposing()&&$(c)&&_t(c);if(!u&&!f&&pd(r,o,i,n.timeStamp,!1,l)){if(s=!0,t.compositionPhase==="ending-firefox"){const y=xo(e,i);if(t.compositionPhase="idle",y)return $r(vo),tc(),!0}const d=r.anchor.getNode();if(a===null||l===null)return!0;const h=r.isBackward(),g=h?r.anchor.offset:r.focus.offset,m=h?r.focus.offset:r.anchor.offset;vr&&!r.isCollapsed()&&$(d)&&l.anchorNode!==null&&d.getTextContent().slice(0,g)+i+d.getTextContent().slice(g+m)===rh(l.anchorNode)||j(e,An,i);const p=i.length;$t&&p>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(r.anchor.offset-=p,r._cachedNodes=null,r._cachedIsBackward=null),po&&e.isComposing()&&(t.lastKeyDownTimeStamp=0,je(null))}}return s||(xl(!1,e,i!==null?i:void 0),t.compositionPhase==="ending-firefox"&&(xo(e,i||void 0),$r(vo),t.compositionPhase="idle")),tc(),!0}function Yp(n){const e=fe(),t=e._inputState,r=A();if(N(r)&&!e.isComposing()){t.compositionPhase="composing",t.hadOrphanedCompositionEvents=!1;const i=r.anchor,o=r.anchor.getNode();if(je(i.key),$r(Sd),n.timeStamp<t.lastKeyDownTimeStamp+30||i.type==="element"||!r.isCollapsed()||!po&&(o.getFormat()!==r.format||$(o)&&o.getStyle()!==r.style)||$(o)&&(_t(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){j(e,An,Qa);const s=A();N(s)&&je(s.anchor.key)}}return!0}function Xp(n){const e=fe();return e._inputState.compositionPhase="idle",xo(e,n.data),$r(vo),!0}function so(n){if(n===null)return;const e=ie(n);if(!$(e)||e.getType()==="text"||_t(e)||!e.isAttached())return;const t=A(),r=N(t)&&t.anchor.key===n?t.anchor.offset:null,i=we(e.getTextContent());if(i.setFormat(e.getFormat()),i.setStyle(e.getStyle()),e.replace(i),r!==null){const o=Math.min(r,i.getTextContentSize());i.select(o,o)}}function xo(n,e){const t=n._compositionKey;if(je(null),t!==null&&e!=null){if(e===""){const i=ie(t),o=n.getElementByKey(t),s=o!==null&&$(i)?pn(i,o,n):null;if(s!==null&&s.nodeValue!==null&&$(i)){const a=Oe(ot(n)),l=a&&rt(a,n._rootElement);let u=null,c=null;l!==null&&l.anchorNode===s&&(u=l.anchorOffset,c=l.focusOffset),Cl(i,s.nodeValue,u,c,!0)}return so(t),!1}if(e[e.length-1]===`
|
|
7
|
+
`){const i=A();if(N(i)||de(i)){if(N(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return j(n,bo,null),so(t),!1}}const r=ie(t);if(r!==null&&$(r)&&_t(r)){r.markDirty();const i=A(),o=r.getTextContentSize(),s=N(i)&&i.anchor.key===t?i.anchor.offset:o;return r.select(s,s).insertText(e),!0}}return xl(!0,n,e),so(t),!1}function Gp(n){const e=fe(),t=e._inputState;if(n.key==null)return!0;if(t.compositionPhase==="ending-safari"){const r=rc(n);if(r&&yt(e,()=>{xo(e,t.compositionEndData)}),t.compositionPhase="idle",t.compositionEndData="",r)return!0}if((function(r){return ye(r,"ArrowRight",{shiftKey:"any"})})(n))j(e,nl,n);else if((function(r){return ye(r,"ArrowRight",{...Xt,shiftKey:"any"})})(n))j(e,ad,n);else if((function(r){return ye(r,"ArrowLeft",{shiftKey:"any"})})(n))j(e,rl,n);else if((function(r){return ye(r,"ArrowLeft",{...Xt,shiftKey:"any"})})(n))j(e,ld,n);else if((function(r){return ye(r,"ArrowUp",{altKey:"any",shiftKey:"any"})})(n))j(e,il,n);else if((function(r){return ye(r,"ArrowDown",{altKey:"any",shiftKey:"any"})})(n))j(e,ol,n);else if((function(r){return ye(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(n))t.isInsertLineBreak=!0,j(e,bo,n);else if((function(r){return r.key===" "})(n))j(e,ud,n);else if((function(r){return St&&ye(r,"o",{ctrlKey:!0})})(n))n.preventDefault(),t.isInsertLineBreak=!0,j(e,gr,!0);else if((function(r){return ye(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(n))t.isInsertLineBreak=!1,j(e,bo,n);else if((function(r){return ye(r,"Backspace",{shiftKey:"any"})||St&&ye(r,"h",{ctrlKey:!0})})(n))rc(n)?j(e,ts,n)&&Eu(t):(n.preventDefault(),j(e,hn,!0));else if((function(r){return r.key==="Escape"})(n))j(e,sl,n);else if((function(r){return ye(r,"Delete",{})||St&&ye(r,"d",{ctrlKey:!0})})(n))(function(r){return r.key==="Delete"})(n)?j(e,al,n):(n.preventDefault(),j(e,hn,!1));else if((function(r){return ye(r,"Backspace",nc)})(n))n.preventDefault(),j(e,Sr,!0);else if((function(r){return ye(r,"Delete",nc)})(n))n.preventDefault(),j(e,Sr,!1);else if((function(r){return St&&ye(r,"Backspace",{metaKey:!0})})(n))n.preventDefault(),j(e,wr,!0);else if((function(r){return St&&(ye(r,"Delete",{metaKey:!0})||ye(r,"k",{ctrlKey:!0}))})(n))n.preventDefault(),j(e,wr,!1);else if((function(r){return ye(r,"b",Xt)})(n))n.preventDefault(),j(e,Tt,"bold");else if((function(r){return ye(r,"u",Xt)})(n))n.preventDefault(),j(e,Tt,"underline");else if((function(r){return ye(r,"i",Xt)})(n))n.preventDefault(),j(e,Tt,"italic");else if((function(r){return ye(r,"Tab",{shiftKey:"any"})})(n))j(e,ll,n);else if((function(r){return ye(r,"z",Xt)})(n))n.preventDefault(),j(e,Qo);else if((function(r){return St?ye(r,"z",{metaKey:!0,shiftKey:!0}):ye(r,"y",{ctrlKey:!0})||ye(r,"z",{ctrlKey:!0,shiftKey:!0})})(n))n.preventDefault(),j(e,es);else{const r=e._editorState._selection;(function(i){return ye(i,"a",Xt)})(n)?(n.preventDefault(),j(e,ul,n)&&Eu(t)):r===null||N(r)||((function(i){return ye(i,"c",Xt)})(n)?(n.preventDefault(),j(e,$i,n)):(function(i){return ye(i,"x",Xt)})(n)&&(n.preventDefault(),j(e,ns,n)))}return(function(r){return r.ctrlKey||r.shiftKey||r.altKey||r.metaKey})(n)&&e.dispatchCommand(qp,n),!0}function bd(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const pr=new Map;function Nu(n){const e=zm(n.target);if(e===null)return;const t=Sl(n.target);let r=null,i=null;const o=t!==null?ko.get(t):void 0;if(t!==null){if(o!==void 0){const f=o.editors;let d=o.hasShadowEditor;if(d===void 0){d=!1;for(const h of f)if(h._rootElement!==null&&qt(h._rootElement.getRootNode())){d=!0;break}o.hasShadowEditor=d}if(d){let h=null,g=null;for(const m of f){const p=m._rootElement;if(p===null)continue;const y=rt(e,p).anchorNode;if(y!==null&&yr(y)===m){if(qt(p.getRootNode())){r=m,i=y;break}h===null&&(h=m,g=y)}}r===null&&h!==null&&(r=h,i=g)}else{const h=e.anchorNode;h===null||K(h)&&h.shadowRoot!==null||(r=yr(h),r!==null&&(i=h))}}if(r===null){const f=Ar(t);r=f!==null?yr(f):null}}if(r===null)return;if(r._inputState.isSelectionChangeFromMouseDown){if(o!==void 0)for(const f of o.editors)f._inputState.isSelectionChangeFromMouseDown=!1;yt(r,()=>{const f=lt(),d=i??rt(e,r._rootElement).anchorNode;(K(d)||it(d))&&pe(mi(f,e,r,n))})}const s=kl(r),a=s[s.length-1],l=a._key,u=pr.get(l),c=u||a;c!==r&&wu(e,c,!1),wu(e,r,!0),r!==a?pr.set(l,r):u&&pr.delete(l)}function Du(n){n._lexicalHandled=!0}function $u(n){return n._lexicalHandled===!0}function Zp(n){const e=ca.get(n);if(e===void 0)return;const t=ko.get(e);if(t===void 0)return;ca.delete(n);const r=Ir(n);Oi(r)?((function(o){if(o._parentEditor!==null){const s=kl(o),a=s[s.length-1]._key;pr.get(a)===o&&pr.delete(a)}else pr.delete(o._key)})(r),t.editors.delete(r),t.hasShadowEditor=void 0,n.__lexicalEditor=null):r&&D(198);const i=bd(n);for(let o=0;o<i.length;o++)i[o]();n.__lexicalEventHandles=[]}function fa(n,e,t){Me();const r=n.__key,i=n.getParent();if(i===null)return void(Ke(n)!==null&&D(367,r,String(Ke(n))));const o=(function(a){const l=A();if(!N(l)||!x(a))return l;const{anchor:u,focus:c}=l,f=u.getNode(),d=c.getNode();return Fr(f,a)&&u.set(a.__key,0,"element"),Fr(d,a)&&c.set(a.__key,0,"element"),l})(n);let s=!1;if(N(o)&&e){const a=o.anchor,l=o.focus;a.key===r&&(wo(a,n,i,n.getPreviousSibling(),n.getNextSibling()),s=!0),l.key===r&&(wo(l,n,i,n.getPreviousSibling(),n.getNextSibling()),s=!0)}else de(o)&&e&&n.isSelected()&&n.selectPrevious();if(N(o)&&e&&!s){const a=n.getIndexWithinParent();Rt(n),Nn(o,i,a,-1)}else Rt(n);t||xe(i)||i.canBeEmpty()||!i.isEmpty()||fa(i,e),e&&o&&Ne(i)&&i.isEmpty()&&i.selectEnd()}const kd=Symbol.for("ephemeral");function Co(n){return n[kd]||!1}const Fu={configurable:!0,enumerable:!1,value:void 0,writable:!0};let Qe=class{__type;__key;__parent;__prev;__next;__state;[ci];static getType(){const{ownNodeType:e}=El(this);return e===void 0&&D(64,this.name),e}static clone(e){D(65,this.name)}$config(){return{}}config(e,t){const r=t.extends||ph(this.constructor);return Object.assign(t,{extends:r}),typeof e=="string"&&Object.assign(t,{type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",Fu),Object.defineProperty(this,ci,Fu),Gd(this,e)}getType(){return this.__type}isInline(){D(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=ie(e);if(t===null)break;e=t.__parent!==null?t.__parent:Ke(t)}return!1}isSelected(e){const t=e||A();if(t==null)return!1;const r=t.getNodes().some(i=>i.__key===this.__key);if($(this))return r;if(N(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const i=this.getParent();if(Q(this)&&this.isInline()&&i){const o=t.isBackward()?t.focus:t.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),r=0;for(;t!==null;){if(this.is(t))return r;r++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:ie(e)}getParentOrThrow(){const e=this.getParent();return e===null&&D(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(xe(t)||Ke(e)!==null)return x(e)||e===this&&Q(e)||D(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&D(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:ie(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:ie(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=x(this)?this:this.getParent(),r=x(e)?e:e.getParent(),i=t&&r?Ca(t,r):null;return i?i.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=Ca(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?kh(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&D(279),!1)))}isParentOf(e){return Fr(e,this)}getNodesBetween(e){const t=this.isBefore(e),r=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),r.push(o)),o===e)break;const a=x(o)?t?o.getFirstChild():o.getLastChild():null;if(a!==null){o=a;continue}const l=t?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===e)break;let c=null,f=u;do{if(f===null&&D(68),c=t?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;c!==null||i.has(f.__key)||r.push(f)}while(c===null);o=c}return t||r.reverse(),r}isDirty(){const e=fe()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(Co(this))return this;const e=ie(this.__key);return e===null&&D(113),e}getWritable(){if(Co(this))return this;Me();const e=ln(),t=fe(),r=e._nodeMap,i=this.__key,o=this.getLatest(),s=t._cloneNotNeeded,a=A();if(a!==null&&a.setCachedNodes(null),s.has(i))return Ao(o),o;const l=dh(o);return s.add(i),Ao(l),r.set(i,l),l}getTextContent(){return yh(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){D(70)}updateDOM(e,t,r){D(71)}getDOMSlot(e){return new jf(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){D(18,this.name)}updateFromJSON(e){return(function(t,r){const i=t.getWritable(),o=r.$;let s=o;for(const a of Jf(i).flatKeys)a in r&&(s!==void 0&&s!==o||(s={...o}),s[a]=r[a]);return(i.__state||s)&&Hf(t).updateFromJSON(s),i})(this,e)}static transform(){return null}remove(e){fa(this,!0,e)}replace(e,t){Me();let r=A();r!==null&&(r=r.clone()),Ms(this,e);const i=this.getLatest(),o=this.__key,s=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size,c=a.getParent(),f=c!==null?a.getIndexWithinParent():-1;Rt(a),c!==null&&N(r)&&Nn(r,c,f,-1);const d=i.getPreviousSibling(),h=i.getNextSibling(),g=i.__prev,m=i.__next,p=i.__parent;fa(i,!1,!0),d===null?l.__first=s:d.getWritable().__next=s,a.__prev=g,h===null?l.__last=s:h.getWritable().__prev=s,a.__next=m,a.__parent=p,l.__size=u;let y=0;t&&(x(this)&&x(a)||D(139),y=a.getChildrenSize(),a.splice(y,0,this.getChildren()));const _=bt(this);if(_.length>0){tn(this)&&tn(a)||D(368,this.__key,a.__key);for(const b of _){const k=Ln(this,b);k!==null&&(Xm(this,b),_h(a,b,k))}}if(N(r)){pe(r);const b=r.anchor,k=r.focus;b.key===o&&(t&&b.type==="element"?b.set(a.__key,y+b.offset,"element"):Mu(b,a)),k.key===o&&(t&&k.type==="element"?k.set(a.__key,y+k.offset,"element"):Mu(k,a))}return Pt()===o&&je(s),a}insertAfter(e,t=!0){Me(),Ms(this,e);const r=this.getWritable(),i=e.getWritable();this.getParentOrThrow();const o=i.getParent(),s=A();let a=!1,l=!1;if(o!==null){const h=e.getIndexWithinParent();if(N(s)){const g=o.__key,m=s.anchor,p=s.focus;a=m.type==="element"&&m.key===g&&m.offset===h+1,l=p.type==="element"&&p.key===g&&p.offset===h+1}Rt(i),t&&N(s)&&Nn(s,o,h,-1)}else Rt(i);const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),f=i.__key,d=r.__next;if(u===null?c.__last=f:u.getWritable().__prev=f,c.__size++,r.__next=f,i.__next=d,i.__prev=r.__key,i.__parent=r.__parent,t&&N(s)){const h=this.getIndexWithinParent();Nn(s,c,h+1);const g=c.__key;a&&s.anchor.set(g,h+2,"element"),l&&s.focus.set(g,h+2,"element")}return e}insertBefore(e,t=!0){Me(),Ms(this,e);const r=this.getWritable(),i=e.getWritable();this.getParentOrThrow();const o=i.__key,s=A(),a=i.getParent(),l=a!==null?i.getIndexWithinParent():-1;Rt(i),a!==null&&t&&N(s)&&Nn(s,a,l,-1);const u=this.getPreviousSibling(),c=this.getParentOrThrow().getWritable(),f=r.__prev,d=this.getIndexWithinParent();return u===null?c.__first=o:u.getWritable().__next=o,c.__size++,r.__prev=o,i.__prev=f,i.__next=r.__key,i.__parent=r.__parent,t&&N(s)&&Nn(s,this.getParentOrThrow(),d),e}isParentRequired(){return!1}createParentElementNode(){return Y()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Me();const r=mt(this);if(r!==null)return r.selectPrevious(e,t);const i=this.getPreviousSibling(),o=this.getParentOrThrow();if(i===null)return o.select(0,0);if(x(i))return i.select();if(!$(i)){const s=i.getIndexWithinParent()+1;return o.select(s,s)}return i.select(e,t)}selectNext(e,t){Me();const r=mt(this);if(r!==null)return r.selectNext(e,t);const i=this.getNextSibling(),o=this.getParentOrThrow();if(i===null)return o.select();if(x(i))return i.select(0,0);if(!$(i)){const s=i.getIndexWithinParent();return o.select(s,s)}return i.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function xd(n){return n instanceof Qe}const da="historic",Qp="history-push",mr="history-merge",Cd="paste",vd="cut",em="collaboration",tm="skip-scroll-into-view",nm="skip-dom-selection",ha="skip-selection-focus",Sd="composition-start",vo="composition-end",rm="!important";function So(n){const e={};if(!n)return e;let t="",r="",i=null,o=!1,s=!1,a=!1,l=0;const u=n.length;let c=-1;for(let h=0;h<u;h++){const g=n[h];if(o)g==="*"&&n[h+1]==="/"&&(o=!1,h++);else if(s)c===-1&&(c=h),s=!1;else if(i===null)if(g!=="/"||n[h+1]!=="*")if(g!=='"'&&g!=="'")if(g!=="(")if(g!==")")if(a||g!==":"||l!==0){if(g===";"&&l===0){c!==-1&&(a?r+=n.slice(c,h):t+=n.slice(c,h),c=-1);const m=t.trim(),p=r.trim();m!==""&&p!==""&&(e[m]=p),t="",r="",a=!1;continue}c===-1&&(c=h)}else c!==-1&&(t+=n.slice(c,h),c=-1),a=!0;else c===-1&&(c=h),l=Math.max(0,l-1);else c===-1&&(c=h),l++;else c===-1&&(c=h),i=g;else c!==-1&&(a?r+=n.slice(c,h):t+=n.slice(c,h),c=-1),o=!0,h++;else c===-1&&(c=h),g==="\\"?s=!0:g===i&&(i=null)}c!==-1&&(a?r+=n.slice(c,u):t+=n.slice(c,u));const f=t.trim(),d=r.trim();return f!==""&&d!==""&&(e[f]=d),e}function im(n,e,t){const r=t.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===rm?n.setProperty(e,r.slice(0,i).trim(),"important"):n.setProperty(e,t,"")}function gn(n,e,t=""){if(e===t)return;const r=So(t),i=So(e);for(const o in i)delete r[o],im(n,o,i[o]);for(const o in r)n.removeProperty(o)}function Es(n,e){return 16&e?"code":e&Za?"mark":32&e?"sub":64&e?"sup":null}function Ns(n,e){return 1&e?"strong":2&e?"em":"span"}function wd(n,e,t,r,i){const o=r.classList;let s=_r(i,"base");s!==void 0&&o.add(...s),s=_r(i,"underlineStrikethrough");let a=!1;const l=8&e&&4&e;s!==void 0&&(8&t&&4&t?(a=!0,l||o.add(...s)):l&&o.remove(...s));for(const u in rn){const c=rn[u];if(s=_r(i,u),s!==void 0)if(t&c){if(a&&(u==="underline"||u==="strikethrough")){e&c&&o.remove(...s);continue}((e&c)===0||l&&u==="underline"||u==="strikethrough")&&o.add(...s)}else e&c&&o.remove(...s)}}function Td(n,e,t){const r=t.isComposing(),i=n+(r?ui:""),o=Ce(),s=cs(o).$getDOMSlot(t,e,o),a=s.getFirstChild();if(a===null||a.nodeType!==Node.TEXT_NODE)return void s.insertChild(re().createTextNode(i));const l=a,u=l.nodeValue;if(u!==i)if(r||$t){const[c,f,d]=(function(h,g){const m=h.length,p=g.length;let y=0,_=0;for(;y<m&&y<p&&h[y]===g[y];)y++;for(;_+y<m&&_+y<p&&h[m-_-1]===g[p-_-1];)_++;return[y,m-y-_,g.slice(y,p-_)]})(u,i);f!==0&&l.deleteData(c,f),l.insertData(c,d)}else l.nodeValue=i}function Au(n,e,t,r,i,o){Td(i,n,e);const s=o.theme.text;s!==void 0&&wd(0,0,r,n,s)}function Li(n,e){const t=re().createElement(e);return t.appendChild(n),t}function ga(n){return n!=null&&n.__isInlineFormattable===!0}class on extends Qe{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config("text",{importDOM:{"#text":()=>({conversion:lm,priority:0}),b:()=>({conversion:sm,priority:0}),code:()=>({conversion:Yt,priority:0}),em:()=>({conversion:Yt,priority:0}),i:()=>({conversion:Yt,priority:0}),mark:()=>({conversion:Yt,priority:0}),s:()=>({conversion:Yt,priority:0}),span:()=>({conversion:om,priority:0}),strong:()=>({conversion:Yt,priority:0}),sub:()=>({conversion:Yt,priority:0}),sup:()=>({conversion:Yt,priority:0}),u:()=>({conversion:Yt,priority:0})}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return vp[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Pt()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=rn[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Rn(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){const r=this.__format,i=Es(0,r),o=Ns(0,r),s=i===null?o:i,a=re().createElement(s);let l=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),i!==null&&(l=re().createElement(o),a.appendChild(l)),Au(l,this,0,r,this.__text,e);const u=this.__style;return u!==""&&gn(a.style,u),a}updateDOM(e,t,r){const i=this.__text,o=e.__format,s=this.__format,a=Es(0,o),l=Es(0,s),u=Ns(0,o),c=Ns(0,s);if((a===null?u:a)!==(l===null?c:l))return!0;if(a===l&&u!==c){const m=t.firstChild;m==null&&D(48);const p=re().createElement(c);return Au(p,this,0,s,i,r),t.replaceChild(p,m),!1}let f=t;l!==null&&a!==null&&(f=t.firstChild,f==null&&D(49)),Td(i,f,this);const d=r.theme.text;d!==void 0&&o!==s&&wd(0,o,s,f,d);const h=e.__style,g=this.__style;return h!==g&&gn(t.style,g,h),!1}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return K(t)||D(132),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=Li(t,"b")),this.hasFormat("italic")&&(t=Li(t,"i")),this.hasFormat("strikethrough")&&(t=Li(t,"s")),this.hasFormat("underline")&&(t=Li(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"?rn[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail=typeof e=="string"?kp[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=Rn(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=Cp[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){Me();let r=e,i=t;const o=A(),s=this.getTextContent(),a=this.__key;if(typeof s=="string"){const l=s.length;r===void 0&&(r=l),i===void 0&&(i=l)}else r=0,i=0;if(!N(o))return jd(a,r,a,i,"text","text");{const l=Pt();l!==o.anchor.key&&l!==o.focus.key||je(a),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,i){const o=this.getWritable(),s=o.__text,a=r.length;let l=e;l<0&&(l=a+l,l<0&&(l=0));const u=A();if(i&&N(u)){const f=e+a;u.setTextNodeRange(o,f,o,f)}const c=s.slice(0,l)+r+s.slice(l+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Me();const t=this.getLatest(),r=t.getTextContent();if(r==="")return[];const i=t.__key,o=Pt(),s=r.length;e.sort((v,T)=>v-T),e.push(s);const a=[],l=e.length;for(let v=0,T=0;v<s&&T<=l;T++){const F=e[T];F>v&&(a.push(r.slice(v,F)),v=F)}const u=a.length;if(u===1)return[t];const c=a[0],f=t.getParent();let d;const h=t.getFormat(),g=t.getStyle(),m=t.__detail;let p=!1,y=null,_=null;const b=A();if(N(b)){const[v,T]=b.isBackward()?[b.focus,b.anchor]:[b.anchor,b.focus];v.type==="text"&&v.key===i&&(y=v),T.type==="text"&&T.key===i&&(_=T)}t.isSegmented()?(d=we(c),d.__format=h,d.__style=g,d.__detail=m,d.__state=hu(t,d),p=!0):d=t.setTextContent(c);const k=[d];for(let v=1;v<u;v++){const T=we(a[v]);T.__format=h,T.__style=g,T.__detail=m,T.__state=hu(t,T);const F=T.__key;o===i&&je(F),k.push(T)}const S=y?y.offset:null,C=_?_.offset:null;let w=0;for(const v of k){if(!y&&!_)break;const T=w+v.getTextContentSize();if(y!==null&&S!==null&&S<=T&&S>=w&&(y.set(v.getKey(),S-w,"text"),S<T&&(y=null)),_!==null&&C!==null&&C<=T&&C>=w){_.set(v.getKey(),C-w,"text");break}w=T}if(f!==null){(function(F){const E=F.getPreviousSibling(),O=F.getNextSibling();E!==null&&Ao(E),O!==null&&Ao(O)})(this);const v=f.getWritable(),T=this.getIndexWithinParent();p?(v.splice(T,0,k),this.remove()):v.splice(T,1,k),N(b)&&Nn(b,f,T,u-1)}return k}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||D(50);const r=this.__key,i=e.__key,o=this.__text,s=o.length;Pt()===i&&je(r);const a=A();if(N(a)){const f=a.anchor,d=a.focus;f!==null&&f.key===i&&qu(f,t,r,e,s),d!==null&&d.key===i&&qu(d,t,r,e,s)}const l=e.__text,u=t?l+o:o+l;this.setTextContent(u);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function om(n){return{forChild:cl(n.style),node:null}}function sm(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:cl(e.style,t?void 0:"bold"),node:null}}const zu=new WeakMap;function am(n){if(!K(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function lm(n){const e=n;n.parentElement===null&&D(129);let t=e.textContent||"";if((function(r){let i,o=r.parentNode;const s=[r];for(;o!==null&&(i=zu.get(o))===void 0&&!am(o);)s.push(o),o=o.parentNode;const a=i===void 0?o:i;for(let l=0;l<s.length;l++)zu.set(s[l],a);return a})(e)!==null)return{node:yi(t)};if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,i=!0;for(;r!==null&&(r=Ou(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(t=t.slice(1)),i=!1;break}}i&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=Ou(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:we(t)}}function Ou(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const o=t.parentElement;if(o===null)return null;t=o}if(t=r,K(t)){const o=t.style.display;if(o===""&&!Oo(t)||o!==""&&!o.startsWith("inline"))return null}let i=t;for(;(i=e?t.firstChild:t.lastChild)!==null;)t=i;if(it(t))return t;if(t.nodeName==="BR")return null}}const um={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Yt(n){const e=um[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:cl(n.style,e),node:null}}function we(n=""){return Ge(new on(n))}function $(n){return n instanceof on}function cl(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),i=t==="700"||t==="bold",o=r.includes("line-through"),s=n.fontStyle==="italic",a=r.includes("underline"),l=n.verticalAlign;return u=>(($(u)||ga(u))&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),s&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),e&&!u.hasFormat(e)&&u.toggleFormat(e)),u)}class rs extends on{$config(){return this.config("tab",{extends:on})}constructor(e=void 0){super(" ",e),this.__detail=2}createDOM(e){const t=super.createDOM(e),r=_r(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}setTextContent(e){return super.setTextContent(" ")}spliceText(e,t,r,i){return r===""&&t===0||r===" "&&t===1||D(286),this}setDetail(e){return e!==2&&D(127),this}setMode(e){return e!=="normal"&&D(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Fi(){return Ge(new rs)}function Tr(n){return n instanceof rs}class cm{key;offset;type;_selection;constructor(e,t,r){this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:xi(We(He(this,"next")),We(He(e,"next")))<0}getNode(){const e=ie(this.key);return e===null&&D(20),e}set(e,t,r,i){const o=this._selection,s=this.key;i&&this.key===e&&this.offset===t&&this.type===r||(this.key=e,this.offset=t,this.type=r,yn()||(Pt()===s&&je(e),o!==null&&(o.setCachedNodes(null),N(o)&&(o._cachedIsBackward=null),o.dirty=!0)))}}function nt(n,e,t){return new cm(n,e,t)}function Ds(n,e){let t=e.__key,r=n.offset,i="element";if($(e)){i="text";const o=e.getTextContentSize();r>o&&(r=o)}else if(!x(e)){const o=e.getNextSibling();if($(o))t=o.__key,r=0,i="text";else{const s=e.getParent();s&&(t=s.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,i)}function Mu(n,e){if(x(e)){const t=e.getLastDescendant();x(t)||$(t)?Ds(n,t):Ds(n,e)}else Ds(n,e)}function ju(n,e,t,r){const i=n.getNode(),o=i.getChildAtIndex(n.offset),s=we();if(s.setFormat(t),s.setStyle(r),Ht(o))o.splice(0,0,[s]);else if(o!==null){const a=xe(i)?Y().append(s):s;o.insertBefore(a)}else if(xe(i)){const a=i.getLastChild();x(a)&&!a.isInline()&&a.isEmpty()?a.append(s):i.append(Y().append(s))}else i.append(s);n.is(e)&&e.set(s.__key,0,"text"),n.set(s.__key,0,"text")}function Ru(n,e,t,r){const i=n.anchor.getNode();$(i)||D(398);const o=n.anchor.offset,s=we(e);s.setFormat(t),s.setStyle(r);const a=i.getParentOrThrow();if(o===0)a.isInline()&&!i.__prev?a.insertBefore(s):i.insertBefore(s,!1);else if(o===i.getTextContentSize())a.isInline()&&!i.__next?a.insertAfter(s):i.insertAfter(s,!1);else{const[l]=i.splitText(o);l.insertAfter(s,!1)}i.getTextContent()===""&&i.isAttached()&&i.remove(),s.selectEnd(),s.isComposing()&&n.anchor.type==="text"&&n.anchor.set(n.anchor.key,n.anchor.offset-e.length,n.anchor.type)}class is{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!de(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new is(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes().filter(s=>Ke(s)===null),r=t.length;if(r===0)return;const i=t[r-1];let o;if($(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(e);for(let s=0;s<r;s++)t[s].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=this._nodes,r=[];for(const i of t){const o=ie(i);o!==null&&r.push(o)}return yn()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let t="";for(let r=0;r<e.length;r++)t+=e[r].getTextContent();return t}deleteNodes(){const e=this.getNodes().filter(t=>Ke(t)===null);if((A()||lt())===this&&e[0]){const t=oe(e[0],"next");Mr(Nt(t,t))}for(const t of e)t.remove();Ed()}}function Ed(){const n=me();if(n.isEmpty()){const e=Y();n.append(e),e.select()}}function N(n){return n instanceof Jn}class Jn{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,r,i){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=r,this.style=i,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=(function(r){const i=[],[o,s]=r.getTextSlices();o&&i.push(o.caret.origin);const a=new Set,l=new Set;for(const u of r)if(Ue(u)){const{origin:c}=u;i.length===0?a.add(c):(l.add(c),i.push(c))}else{const{origin:c}=u;x(c)&&l.has(c)||i.push(c)}if(s&&i.push(s.caret.origin),At(r.focus)&&x(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=ze(r.focus.origin,"previous");Ue(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=Wn(u))a.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!x(u)||l.has(u)||u.isEmpty()||a.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=We(r.anchor),c=We(r.anchor.getFlipped()),f=h=>kt(h)?h.origin:h.getNodeAtCaret(),d=f(u)||f(c)||(r.anchor.getNodeAtCaret()?u.origin:c.origin);i.push(d)}return i})(Al(va(this),"next"));return yn()||(this._cachedNodes=t),t}setTextNodeRange(e,t,r,i){return this.anchor.set(e.__key,t,"text"),this.focus.set(r.__key,i,"text"),this}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],i=this.anchor,o=this.focus,s=i.isBefore(o),[a,l]=pa(this);let u="",c=!0;for(let f=0;f<e.length;f++){const d=e[f];if(x(d)&&!d.isInline()){c||(u+=`
|
|
8
|
+
`);let h="";for(const g of bt(d)){const m=Ln(d,g);m!==null&&(h+=m.getTextContent())}h!==""?(u+=h,c=!1):c=!d.isEmpty()}else if(c=!1,$(d)){let h=d.getTextContent();d===t?d===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(h=a<l?h.slice(a,l):h.slice(l,a)):h=s?h.slice(a):h.slice(l):d===r&&(h=s?h.slice(0,l):h.slice(0,a)),u+=h}else!Q(d)&&!Pe(d)||d===r&&this.isCollapsed()||(u+=d.getTextContent())}return u}applyDOMRange(e){const t=fe(),r=t.getEditorState()._selection,i=Md(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(i===null)return;const[o,s,a]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(s.key,s.offset,s.type,!0),a&&(this.dirty=!0),Ot(this)}clone(){const e=this.anchor,t=this.focus;return new Jn(nt(e.key,e.offset,e.type),nt(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Rn(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=rn[e];return(this.format&t)!==0}insertRawText(e){this.insertNodes(yi(e))}insertText(e){let t=this.format,r=this.style;if(!this.isCollapsed()){const f=(this.focus.isBefore(this.anchor)?this.focus:this.anchor).getNode();if($(f)&&(t=f.getFormat(),r=f.getStyle()),this.removeText(),this.format=t,this.style=r,e==="")return;if(Pt()===null)return this.anchor.type==="element"&&ju(this.anchor,this.focus,t,r),void Ru(this,e,t,r)}this.anchor.type==="element"&&ju(this.anchor,this.focus,t,r);const i=this.anchor.getNode();$(i)||D(398);const o=this.anchor.offset,s=i.getParentOrThrow(),a=i.getTextContentSize();if(_t(i)||o===0&&(!i.canInsertTextBefore()||!s.canInsertTextBefore()&&!i.__prev)||o===a&&(!i.canInsertTextAfter()||!s.canInsertTextAfter()&&!i.__next)){if(i.isSegmented()&&o!==0&&o!==a){if(Pt()!==null)i.setMode("normal").setFormat(t).setStyle(r);else{const d=we(i.getTextContent());d.setFormat(t),d.setStyle(r),i.replace(d),d.select(o,o)}return void(e!==""&&this.insertText(e))}if(e==="")return;if(o===0){const d=i.getPreviousSibling();if($(d)&&d.canInsertTextAfter()&&!_t(d))d.select();else{const h=we();h.setFormat(t),h.setStyle(r),s.canInsertTextBefore()?i.insertBefore(h):s.insertBefore(h),h.select()}return void this.insertText(e)}if(o===a){const d=i.getNextSibling();if($(d)&&d.canInsertTextBefore()&&!_t(d))d.select(0,0);else{const h=we();h.setFormat(t),h.setStyle(r),s.canInsertTextAfter()?i.insertAfter(h):s.insertAfter(h),h.select(0,0)}return void this.insertText(e)}const f=we(e);return f.setFormat(t),f.setStyle(r),i.replace(f),void f.select()}if(e==="")return;const l=s.isInline()&&o===0&&!i.__prev,u=s.isInline()&&o===a&&!i.__next,c=i.getFormat()!==t||i.getStyle()!==r;if(l||u||c){if(i.getTextContent()!==""||l||u)return void Ru(this,e,t,r);i.setFormat(t),i.setStyle(r)}i.spliceText(o,0,e,!0),i.isComposing()&&this.anchor.type==="text"&&this.anchor.set(this.anchor.key,this.anchor.offset-e.length,this.anchor.type)}removeText(){const e=A()===this;co(this,iy(va(this))),e&&A()!==this&&pe(this)}formatText(e,t=null){Dd(this,e,t)}insertNodes(e){if(e.length===0)return;this.isCollapsed()||this.removeText();const t=this.anchor.getNode();if(this.anchor.type==="element"&&x(t)&&Ke(t)!==null){let m=t.isShadowRoot()?t.getFirstChild()??t.append(Y()).getFirstChild():t.getFirstChild();if(t.isShadowRoot()&&m!==null&&!x(m)){const p=Y();m.insertBefore(p),m=p}if(m!==null){m.selectStart();const p=A();return N(p)||D(369),p.insertNodes(e)}}if(this.anchor.type==="element"&&xe(t)){const m=Fs(e),p=m.getLastDescendant();return t.splice(this.anchor.offset,0,m.getChildren()),void(p!==null&&p.selectEnd())}let r=(this.isBackward()?this.focus:this.anchor).getNode(),i=q(r,Le);const o=e[e.length-1];if(x(i)&&"__language"in i){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const m=Hr(this);i.splice(m,0,e),o.selectEnd()}return}if(!e.some(m=>(x(m)||Q(m))&&!m.isInline())){x(i)||D(211,r.constructor.name,r.getType());const m=Hr(this);return i.splice(m,0,e),void o.selectEnd()}if(x(i)&&Ke(i)!==null){const m=Hr(this),p=ya(e);i.splice(m,0,p);const y=p[p.length-1];return void(y!==void 0?y.selectEnd():i.select(m,m))}if(i===null){const m=Fs(e),p=m.getLastDescendant();let y=He(this.anchor,"next");for(const _ of m.getChildren())y=ps(_,y);return void(p!==null&&p.selectEnd())}if(x(i)&&!i.isParentRequired()&&!xe(i.getParentOrThrow())){const m=Hr(this),p=ya(e);i.splice(m,0,p);const y=p[p.length-1];return void(y!==void 0?y.selectEnd():i.select(m,m))}const s=Fs(e),a=s.getLastDescendant(),l=s.getChildren(),u=!x(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(r=this.anchor.getNode(),i=q(r,Le));const c=l[l.length-1];let f=l[0];var d;x(d=f)&&Le(d)&&!d.isEmpty()&&x(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(x(i)||D(211,r.constructor.name,r.getType()),i.append(...f.getChildren()),f=l[1]),f&&(i===null&&D(212,r.constructor.name,r.getType()),(function(m,p){const y=p.getParentOrThrow().getLastChild();let _=p;const b=[p];for(;_!==y;)_.getNextSibling()||D(140),_=_.getNextSibling(),b.push(_);let k=m;for(const S of b)k=k.insertAfter(S)})(i,f));const h=q(a,Le);u&&x(h)&&(u.canMergeWhenEmpty()||Le(c))&&(h.append(...u.getChildren()),u.remove()),x(i)&&i.isEmpty()&&i.remove(),a.selectEnd();const g=x(i)?i.getLastChild():null;Pe(g)&&h!==i&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if(this.anchor.type==="element"&&xe(e)){const a=Y();return e.splice(this.anchor.offset,0,[a]),a.select(),a}const t=Hr(this),r=q(this.anchor.getNode(),Le);if(r!==null&&Ke(r)!==null)return null;x(r)||D(213);const i=r.getChildAtIndex(t),o=i?[i,...i.getNextSiblings()]:[],s=r.insertNewAfter(this,!1);return s?(s.append(...o),s.selectStart(),s):null}insertLineBreak(e){const t=Wt();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),i=t.getIndexWithinParent();r.select(i,i)}}extract(){const e=[...this.getNodes()],t=e.length;let r=e[0],i=e[t-1];const[o,s]=pa(this),a=this.isBackward(),[l,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[c,f]=a?[s,o]:[o,s];if(t===0)return[];if(t===1){if($(r)&&!this.isCollapsed()){const d=r.splitText(c,f),h=c===0?d[0]:d[1];return h?(l.set(h.getKey(),0,"text"),u.set(h.getKey(),h.getTextContentSize(),"text"),[h]):[]}return[r]}if($(r)&&(c===r.getTextContentSize()?e.shift():c!==0&&([,r]=r.splitText(c),e[0]=r,l.set(r.getKey(),0,"text"))),$(i)){const d=i.getTextContent().length;f===0?e.pop():f!==d&&([i]=i.splitText(f),e[e.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return e}modify(e,t,r){if(Eo(this,e,t,r))return;const i=e==="move",o=fe(),s=Oe(ot(o));if(!s)return;const a=o._blockCursorElement,l=o._rootElement,u=this.focus.getNode();l===null||a===null||!x(u)||u.isInline()||u.canBeEmpty()||zo(a,o,l);const c=Dr(o,this.focus.key);let f=c;if(this.focus.type==="text"&&(f=$(u)?pn(u,c,o):null),this.dirty){const d=Dr(o,this.anchor.key);let h=d;if(this.anchor.type==="text"){const g=this.anchor.getNode();h=$(g)?pn(g,d,o):null}h&&f&&To(s,h,this.anchor.offset,f,this.focus.offset)}if(r==="character"&&$(u)&&u.isUnmergeable()&&(t?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const d=oe(u,t?"previous":"next").getNodeAtCaret();if($(d)){if(!i){const h=d.getTextContentSize();return t?this.focus.set(d.__key,h-1,"text"):this.focus.set(d.__key,1,"text"),void(this.dirty=!0)}{const h=o.getElementByKey(d.getKey()),g=h?pn(d,h,o):null;if(g){const m=t?g.length:0;To(s,g,m,g,m)}}}}if(Fd(s,e,t?"backward":"forward",r),s.rangeCount>0){const d=us(s,o._rootElement),h=d||s.getRangeAt(0),g=this.anchor.getNode(),m=Ne(g)?g:oh(g);this.applyDOMRange(h),this.dirty=!0,!i&&(Ad(this,t,m),(d?s.direction!=="backward":s.anchorNode===h.startContainer&&s.anchorOffset===h.startOffset)||$d(this))}r==="lineboundary"&&Eo(this,e,t,r,"decorators")}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&x(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const i=t.getParent(),o=t.getNextSibling()||(i===null?null:i.getNextSibling());if(x(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const o=Or(He(r,e?"previous":"next"));if(o.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(Ue(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(x(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=We(l);co(this,Nt(u,u)),o.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(At(l)){if(x(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(Q(l.origin)){if(!l.origin.isIsolated())if(bt(l.origin).length>0){if(x(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=pi();u.add(l.origin.getKey()),pe(u)}}else if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&x(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=pi();u.add(l.origin.getKey()),pe(u)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:u}=a;return bt(u).length>0?void 0:l.origin.isEmpty()&&!u.isEmpty()&&l.origin.getParent()===u.getParent()?void l.origin.remove(!0):(co(this,Nt(!l.origin.isEmpty()&&u.isEmpty()?Cn(oe(u,l.direction)):o.anchor,l)),this.removeText())}for(let l=r.getNode();l!==null;){if(Ke(l)!==null)return;if(x(l)&&l.isShadowRoot())break;l=l.getParent()}}const s=this.focus;if($s(this,e,"character"),this.isCollapsed()){if(e&&r.offset===0&&Iu(this,r.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(i=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,u=a.getTextContentSize();if(a.is(i)||e&&l!==u||!e&&l!==0)return void Lu(a,e,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,u=i.getTextContentSize();if(i.is(a)||e&&l!==0||!e&&l!==u)return void Lu(i,e,l)}(function(l,u){const c=l.anchor,f=l.focus,d=c.getNode(),h=f.getNode();if(d===h&&c.type==="text"&&f.type==="text"){const g=c.offset,m=f.offset,p=g<m,y=p?g:m,_=p?m:g,b=_-1;y!==b&&(function(k){return!(th(k)||dm(k))})(d.getTextContent().slice(y,_))&&(u?f.set(f.key,b,f.type):c.set(c.key,b,c.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&Ne(r.getParent())&&r.getPreviousSibling()===null&&Iu(this,r),Ed()}}deleteLine(e){const t=ma(this.anchor);if(t!==null&&Q(mt(t)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(e);this.isCollapsed()&&$s(this,e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):q(this.anchor.getNode(),Le)!==q(this.focus.getNode(),Le)?(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(e)):this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,r=t.getNode();if(this.forwardDeletion(t,r,e))return;$s(this,e,"word")}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){const e=this._cachedIsBackward;if(e!==null)return e;const t=this.focus.isBefore(this.anchor);return yn()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}}function de(n){return n instanceof is}function Nd(n,e){if(de(n)){for(const y of n.getNodes())ga(y)&&y.setFormat(e(y.getFormat()));return}if(n.isCollapsed())return n.setFormat(e(n.format)),void je(null);const t=[];for(const y of n.getNodes())$(y)?t.push(y):x(y)?y.setTextFormat(e(y.getTextFormat())):ga(y)&&y.setFormat(e(y.getFormat()));const r=t.length;if(r===0)return n.setFormat(e(n.format)),void je(null);const i=n.anchor,o=n.focus,s=n.isBackward(),a=s?o:i,l=s?i:o;let u=0,c=t[0],f=a.type==="element"?0:a.offset;if(a.type==="text"&&f===c.getTextContentSize()&&(u=1,c=t[1],f=0),c==null)return;const d=r-1;let h=t[d];const g=l.type==="text"?l.offset:h.getTextContentSize();if(c.is(h)){if(f===g)return;const y=e(c.getFormat());if(_t(c)||f===0&&g===c.getTextContentSize())c.setFormat(y);else{const _=c.splitText(f,g),b=f===0?_[0]:_[1];b.setFormat(y),a.type==="text"&&a.set(b.__key,0,"text"),l.type==="text"&&l.set(b.__key,g-f,"text")}return void(n.format=y)}f===0||_t(c)||([,c]=c.splitText(f),f=0);const m=e(c.getFormat());c.setFormat(m);const p=e(h.getFormat());g>0&&(g===h.getTextContentSize()||_t(h)||([h]=h.splitText(g)),h.setFormat(p));for(let y=u+1;y<d;y++){const _=t[y];_.setFormat(e(_.getFormat()))}a.type==="text"&&a.set(c.__key,f,"text"),l.type==="text"&&l.set(h.__key,g,"text"),n.format=m|p}function fm(n,e){const t=[];for(const[r,i]of Object.entries(e))typeof i=="boolean"&&t.push([r,i]);t.length!==0&&Nd(n,r=>{for(const[i,o]of t)r=Rn(r,i,o?rn[i]:0);return r})}function Dd(n,e,t=null){const r=t===null&&N(n)?Rn(n.format,e,null):t;Nd(n,i=>Rn(i,e,r))}function Pu(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function pa(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]:[Pu(t),Pu(r)]}function Iu(n,e){for(let t=e;t;t=t.getParent()){if(x(t)){if(t.collapseAtStart(n))return!0;if(xe(t))break}if(t.getPreviousSibling())break}return!1}function $d(n){const e=n.focus,t=n.anchor,r=t.key,i=t.offset,o=t.type;t.set(e.key,e.offset,e.type,!0),e.set(r,i,o,!0)}function Fd(n,e,t,r){n.modify(e,t,r)}function Ad(n,e,t){const r=n.getNodes(),i=r.filter(a=>Fr(a,t));if(i.length===0||i.length===r.length)return!1;const o=e?i[0]:i[i.length-1],s=x(o)?o:o.getParentOrThrow();return e?s.selectStart():s.selectEnd(),!0}function $s(n,e,t){if(Eo(n,"extend",e,t))return;const r=fe(),i=Oe(ot(r));if(!i||typeof i.modify!="function")return;const o=r._blockCursorElement,s=r._rootElement,a=n.anchor,l=n.focus.getNode();s===null||o===null||!x(l)||l.isInline()||l.canBeEmpty()||zo(o,r,s);const u=T=>{const F=T.getNode(),E=r.getElementByKey(T.key);return E!==null&&T.type==="text"&&$(F)?pn(F,E,r):E},c=a.getNode(),f=u(a);if(f===null)return;const d=a.offset,h=n.isCollapsed(),g=n.focus,m=h?f:u(g);if(m===null)return;const p=g.offset;if(To(i,m,p,m,p),Fd(i,"move",e?"backward":"forward",t),i.rangeCount===0)return;const y=us(i,s)||i.getRangeAt(0),_=y.startContainer,b=y.startOffset;if(h&&t==="character"&&a.type==="text"&&$(c)&&c.isUnmergeable()&&d===(e?0:c.getTextContentSize())){const T=oe(c,e?"previous":"next").getNodeAtCaret();if($(T)){const F=e?T.getTextContentSize()-1:1;return n.focus.set(T.__key,F,"text"),void(n.dirty=!0)}}if(h&&t==="character"&&a.type==="text"){const T=e?0:c.getTextContentSize(),F=_===f?b:d!==T?T:-1;if(F>=0)return void(F!==d&&(n.focus.set(a.key,F,"text"),n.dirty=!0))}const[k,S,C,w]=e?[_,b,f,d]:[f,d,_,b],v=Ne(c)?c:oh(c);n.applyDOMRange({collapsed:!1,endContainer:C,endOffset:w,startContainer:k,startOffset:S}),n.dirty=!0,!Ad(n,e,v)&&e&&$d(n),t==="lineboundary"&&Eo(n,"extend",e,t,"decorators")}const dm=(()=>{try{const n=new RegExp("\\p{Emoji}","u"),e=n.test.bind(n);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function Lu(n,e,t){const r=n,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,a=0;for(let u=0;u<o;u++){const c=u===o-1;if(a=s,s+=i[u].length,e&&s===t||s>t||c){i.splice(u,1),c&&(a=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function Bu(n,e,t,r){let i,o=e,s=!1;if(K(n)){let a=!1;const l=n.childNodes,u=l.length,c=r._blockCursorElement;o===u&&u>0&&(a=!0,o=u-1),Lr(n,r)!==void 0||jo(n,r)||(s=!0);let f=l[o],d=!1;if(f===c)f=l[o+1],d=!0;else if(c!==null){const h=c.parentNode;n===h&&e>Array.prototype.indexOf.call(h.children,c)&&o--}if(i=cr(f),$(i))o=Bt(i,a?"next":"previous");else{let h=cr(n);if(h===null)return null;if(x(h)){const g=r.getElementByKey(h.getKey());g===null&&D(214),[h,o]=xt(h,g,r).resolveChildIndex(h,g,n,e),x(h)||D(215),a&&o>=h.getChildrenSize()&&(o=Math.max(0,h.getChildrenSize()-1));let p=h.getChildAtIndex(o);if(x(p)&&(function(y,_,b){const k=y.getParent();return b===null||k===null||!k.canBeEmpty()||k!==b.getNode()})(p,0,t)){const y=a?p.getLastDescendant():p.getFirstDescendant();y===null?h=p:(p=y,h=x(p)?p:p.getParentOrThrow()),o=0}$(p)?(i=p,h=null,o=Bt(p,a?"next":"previous")):p!==h&&a&&!d&&(x(h)||D(216),o=Math.min(h.getChildrenSize(),o+1))}else{const g=mt(h),m=g!==null?g:h,p=m.getIndexWithinParent(),y=r.getElementByKey(h.getKey());let _="after";if(y!==null&&cr(n)===h){const b=xt(h,y,r);b.element!==y?_=b.resolveLeafPosition(y,n,e):e===0&&Q(h)&&(_="before")}o=_==="before"?p:p+1,h=m.getParentOrThrow()}if(x(h))return[nt(h.__key,o,"element"),s]}}else i=cr(n);return $(i)?[nt(i.__key,Bt(i,o,"clamp"),"text"),s]:null}function Ku(n,e,t){const r=n.offset,i=n.getNode();if(r===0){const o=i.getPreviousSibling(),s=i.getParent();if(e){if((t||!e)&&o===null&&x(s)&&s.isInline()){const a=s.getPreviousSibling();$(a)&&n.set(a.__key,a.getTextContent().length,"text")}}else x(o)&&!t&&o.isInline()?n.set(o.__key,o.getChildrenSize(),"element"):$(o)&&!i.isUnmergeable()&&n.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(e&&x(o)&&o.isInline())n.set(o.__key,0,"element");else if((t||e)&&o===null&&x(s)&&s.isInline()&&!s.canInsertTextAfter()&&s.getTextContentSize()>1){const a=s.getNextSibling();$(a)&&n.set(a.__key,0,"text")}}}function ma(n){const e=ie(n.key);return e===null?null:fs(e)}function zd(n,e,t){const r=ma(n),i=ma(e);if(r===i||r!==null&&i!==null&&r.is(i))return!1;const o=t(r,i);if(r!==null)return x(r)?e.set(r.getKey(),o?r.getChildrenSize():0,"element"):e.set(r.getKey(),o?r.getTextContentSize():0,"text"),!0;const s=mt(i);if(s===null)return!1;const a=s.getParent();if(a===null)return!1;const l=s.getIndexWithinParent();return e.set(a.getKey(),o?l+1:l,"element"),!0}function Od(n){const e=zd(n.anchor,n.focus,(t,r)=>(function(i,o,s,a){if(s!==null&&a!==null){const c=mt(s),f=mt(a);if(c!==null&&c.is(f)){for(const d of ds(c).values()){if(d===s.getKey())return!0;if(d===a.getKey())return!1}return!0}return c===null||f===null||c.isBefore(f)}if(s!==null){const c=mt(s),f=ie(o.key);return c===null||f===null||!(!c.is(f)&&!c.isParentOf(f))||c.isBefore(f)}const l=mt(a),u=ie(i.key);return l!==null&&u!==null&&!l.is(u)&&!l.isParentOf(u)&&u.isBefore(l)})(n.anchor,n.focus,t,r));return e&&(n.dirty=!0),e}function Md(n,e,t,r,i,o){if(n===null||t===null||!zi(i,n,t))return null;const s=Bu(n,e,N(o)?o.anchor:null,i);if(s===null)return null;const a=Bu(t,r,N(o)?o.focus:null,i);if(a===null)return null;const[l,u]=s,[c,f]=a;if(l.type==="element"&&c.type==="element"){const h=cr(n),g=cr(t);if(Q(h)&&Q(g))return null}const d=i._slotsUsed&&zd(l,c,()=>(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return(function(h,g){if(h.type==="text"&&g.type==="text"){const m=h.isBefore(g),p=h.is(g);Ku(h,m,p),Ku(g,!m,p),p&&g.set(h.key,h.offset,h.type)}})(l,c),[l,c,u||f||d]}function Er(n){return x(n)&&!n.isInline()}function jd(n,e,t,r,i,o){const s=ln(),a=new Jn(nt(n,e,i),nt(t,r,o),0,"");return a.dirty=!0,s._selection=a,a}function fl(){const n=nt("root",0,"element"),e=nt("root",0,"element");return new Jn(n,e,0,"")}function pi(){return new is(new Set)}function hm(n,e){return mi(null,n,e,null)}function mi(n,e,t,r){const i=t._window;if(i===null)return null;const o=r||i.event,s=o?o.type:void 0,a=s==="selectionchange",l=!ea&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let u,c,f,d;if(N(n)&&!l)return n.clone();{if(e===null)return null;const k=rt(e,t._rootElement);if(u=k.anchorNode,c=k.focusNode,f=k.anchorOffset,d=k.focusOffset,(a||s===void 0)&&N(n)&&!zi(t,u,c))return n.clone()}const h=Md(u,f,c,d,t,n);if(h===null)return null;const[g,m,p]=h;let y=0,_="";if(N(n)){const k=n.anchor;if(g.key===k.key)y=n.format,_=n.style;else{const S=g.getNode();$(S)?(y=S.getFormat(),_=S.getStyle()):x(S)&&(y=S.getTextFormat(),_=S.getTextStyle())}}const b=new Jn(g,m,y,_);return p&&(b.dirty=!0),b}function A(){return ln()._selection}function lt(){return fe()._editorState._selection}function Nn(n,e,t,r=1){const i=n.anchor,o=n.focus,s=i.getNode(),a=o.getNode();if(!e.is(s)&&!e.is(a))return;const l=e.__key;if(n.isCollapsed()){const u=i.offset;if(t<=u&&r>0||t<u&&r<0){const c=Math.max(0,u+r);i.set(l,c,"element"),o.set(l,c,"element"),Wu(n)}}else{const u=n.isBackward(),c=u?o:i,f=c.getNode(),d=u?i:o,h=d.getNode();if(e.is(f)){const g=c.offset;(t<=g&&r>0||t<g&&r<0)&&c.set(l,Math.max(0,g+r),"element")}if(e.is(h)){const g=d.offset;(t<=g&&r>0||t<g&&r<0)&&d.set(l,Math.max(0,g+r),"element")}}Wu(n)}function Wu(n){const e=n.anchor,t=e.offset,r=n.focus,i=r.offset,o=e.getNode(),s=r.getNode();if(n.isCollapsed()){if(!x(o))return;const a=o.getChildrenSize(),l=t>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(t);if($(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text"),r.set(u.__key,c,"text")}return}if(x(o)){const a=o.getChildrenSize(),l=t>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(t);if($(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text")}}if(x(s)){const a=s.getChildrenSize(),l=i>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(i);if($(u)){let c=0;l&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}function wo(n,e,t,r,i){let o=null,s=0,a=null;r!==null?(o=r.__key,$(r)?(s=r.getTextContentSize(),a="text"):x(r)&&(s=r.getChildrenSize(),a="element")):i!==null&&(o=i.__key,$(i)?a="text":x(i)&&(a="element")),o!==null&&a!==null?n.set(o,s,a):(s=e.getIndexWithinParent(),s===-1&&(s=t.getChildrenSize()),n.set(t.__key,s,"element"))}function qu(n,e,t,r,i){n.type==="text"?n.set(t,n.offset+(e?0:i),"text"):n.offset>r.getIndexWithinParent()&&n.set(n.key,n.offset-1,"element")}function To(n,e,t,r,i){try{n.setBaseAndExtent(e,t,r,i)}catch{}}function Uu(n,e,t){const r=Dr(n,e.getKey());if(x(e)){const i=xt(e,r,n);return[i.element,t+i.getFirstChildOffset()]}return[r,t]}function gm(n,e,t,r,i,o){const s=o.getRootNode(),a=kn(s)||qt(s)?Ar(s):null;if(i.has(em)&&a!==o||a!==null&&bl(a,a))return;const l=rt(r,o);let u;if(!N(e))return void(n!==null&&zi(t,l.anchorNode,l.focusNode)&&r.removeAllRanges());const c=e.anchor,f=e.focus,d=c.getNode(),h=f.getNode(),[g,m]=Uu(t,d,c.offset),[p,y]=Uu(t,h,f.offset),_=e.format,b=e.style,k=e.isCollapsed();let S=g,C=p,w=!1;if(c.type==="text"?(S=$(d)?pn(d,g,t):null,w=d.getFormat()!==_||d.getStyle()!==b):N(n)&&n.anchor.type==="text"&&(w=!0),f.type==="text"&&(C=$(h)?pn(h,p,t):null),S!==null&&C!==null){if(k&&(n===null||w||N(n)&&(n.format!==_||n.style!==b))&&(function(v,T,F,E,O,R){v._inputState.collapsedSelectionFormat={format:T,key:O,offset:E,style:F,timeStamp:R}})(t,_,b,m,c.key,performance.now()),(r.type!=="Range"||!k)&&l.anchorOffset===m&&l.focusOffset===y&&l.anchorNode===S&&l.focusNode===C){if(a===null||!o.contains(a)){const v=a!==null?yr(a):null;v!==null&&v!==t||i.has(ha)||o.focus({preventScroll:!0})}if(c.type!=="element")return}if(To(r,S,m,C,y),$t&&e.isCollapsed()&&o!==null&&!i.has(ha)){const v=bi(o);if(v===null||!o.contains(v)){const T=Ar(o.ownerDocument),F=T!==null?yr(T):null;F!==null&&F!==t||o.focus({preventScroll:!0})}}if(!i.has(tm)&&e.isCollapsed()&&o!==null&&o===bi(o)){const v=N(e)&&e.anchor.type==="element"?S.childNodes[m]||null:(u===void 0&&(u=ch(r,o)),u);if(v!==null){let T;if(it(v)){const F=v.ownerDocument.createRange();F.selectNode(v),T=F.getBoundingClientRect()}else T=v.getBoundingClientRect();(function(F,E,O){const R=Sl(O),L=wl(R);if(R===null||L===null)return;const J=O.getBoundingClientRect();if(E.bottom<J.top)return;let{top:te,bottom:X}=E,Z=0,I=0,P=O;for(;P!==null;){const W=P===R.body;if(W){const se=L.visualViewport;if(se){const Ae=se.offsetTop;Z=Ae,I=Ae+se.height}else Z=0,I=ot(F).innerHeight;const Fe=L.getComputedStyle(R.documentElement),ct=parseFloat(Fe.scrollPaddingTop),ae=parseFloat(Fe.scrollPaddingBottom);isFinite(ct)&&(Z+=ct),isFinite(ae)&&(I-=ae)}else{const se=P===O?J:P.getBoundingClientRect();Z=se.top,I=se.bottom}let ce=0;if(te<Z?ce=-(Z-te):X>I&&(ce=X-I),ce!==0)if(W)L.scrollBy(0,ce);else{const se=P.scrollTop;P.scrollTop+=ce;const Fe=P.scrollTop-se;te-=Fe,X-=Fe}if(W)break;P=Vn(P)}})(t,T,o)}}(function(v){v._inputState.isSelectionChangeFromDOMUpdate=!0})(t)}}function os(n){let e=A()||lt();e===null&&(e=me().selectEnd()),e.insertNodes(n)}function Rd(n,e){for(const t of n.split(/(\r?\n|\t)/))t===`
|
|
9
|
+
`||t===`\r
|
|
10
|
+
`?e.linebreak():t===" "?e.tab():t!==""&&e.text(t)}function yi(n){const e=[];return Rd(n,{linebreak:()=>e.push(Wt()),tab:()=>e.push(Fi()),text:t=>e.push(we(t))}),e}function ya(n){const e=[];for(const t of n)Pe(t)||(!x(t)&&!Q(t)||t.isInline()?e.push(t):x(t)&&e.push(...ya(t.getChildren())));return e}function Hr(n){let e=n;n.isCollapsed()||e.removeText();const t=A();N(t)&&(e=t),N(e)||D(161);const r=e.anchor;let i=r.getNode(),o=r.offset;for(;!Le(i)&&Ke(i)===null;){const s=i;if([i,o]=pm(i,o),s.is(i))break}return o}function pm(n,e){const t=n.getParent();if(!t){const i=Y();return me().append(i),i.select(),[me(),0]}if($(n)){const i=n.splitText(e);if(i.length===0)return[t,n.getIndexWithinParent()];const o=e===0?0:1;return[t,i[0].getIndexWithinParent()+o]}if(!x(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const i=new Jn(nt(n.__key,e,"element"),nt(n.__key,e,"element"),0,""),o=n.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}function Hu(n){return Pe(n)||Tl(n)||$(n)||n.isParentRequired()}function Fs(n){const e=Y();let t=null;for(let r=0;r<n.length;r++){const i=n[r];if(Hu(i)){if(t===null){t=i.createParentElementNode(),e.append(t);const o=n[r+1];if(Pe(i)&&(o===void 0||!Hu(o)))continue}t.append(i)}else e.append(i),t=null}return e}function Eo(n,e,t,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!n.isCollapsed()){const[c,f]=t===n.isBackward()?[n.focus,n.anchor]:[n.anchor,n.focus];return f.set(c.key,c.offset,c.type),!0}const o=He(n.focus,t?"previous":"next"),s=r==="lineboundary",a=e==="move";let l=o,u=i==="decorators-and-blocks";if(!gs(l)){for(const c of l){u=!1;const{origin:f}=c;if(!Q(f)||f.isIsolated()||(l=c,!s||!f.isInline()))break}if(u)for(const c of Or(o).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(Ue(c))c.origin.isInline()||(l=c);else{if(x(c.origin))continue;Q(c.origin)&&!c.origin.isInline()&&(l=c)}break}}if(l===o)return!1;if(a&&!s&&Q(l.origin)&&l.origin.isKeyboardSelectable()){const c=pi();return c.add(l.origin.getKey()),pe(c),!0}return l=We(l),a&&Et(n.anchor,l),Et(n.focus,l),u||!s}let Re=null,De=null,tt=!1,As=!1,ao=!1;const zs=new Set;let lo=0;const Ju={characterData:!0,childList:!0,subtree:!0};function yn(){return tt||Re!==null&&Re._readOnly}function Me(){tt&&D(13)}function Pd(){lo>99&&D(14)}function ln(){return Re===null&&D(195,Ld()),Re}function mm(n){ln()!==null&&De===null&&(De=n),De!==n&&zf(378)}function fe(){return De===null&&D(337,Ld()),De}function Id(){fe()._dirtyType=2}function Ld(){let n=0;const e=new Set,t=Nr.version;if(typeof window<"u")for(const i of lh(document)){const o=Ir(i);if(Oi(o))n++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===t&&(s+=" (separately built, likely a bundler configuration issue)"),e.add(s)}}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 Bd(){return De}function Vu(n,e,t){const r=e.__type,i=Yd(n,r);let o=t.get(r);o===void 0&&(o=Array.from(i.transforms),t.set(r,o));const s=o.length;for(let a=0;a<s&&(o[a](e),e.isAttached());a++);}function Yu(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function Kd(n,e){if(!e)return;const t=n._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)t.add(i)}function ym(n){return No(n,fe()._nodes)}function No(n,e){const t=n.type,r=e.get(t);r===void 0&&D(17,t);const i=r.klass;n.type!==i.getType()&&D(18,i.name);const o=i.importJSON(n),s=n.children;if(x(o)&&Array.isArray(s))for(let l=0;l<s.length;l++){const u=No(s[l],e);o.append(u)}const a=n.$slots;if(a){tn(o)||D(379,i.name);for(const l in a)_h(o,l,No(a[l],e))}return o}function Xu(n,e,t){const r=Re,i=tt,o=De;Re=e,tt=!0,De=n;try{return t()}finally{Re=r,tt=i,De=o}}function cn(n,e){const t=ao;ao=!0;try{(function(r,i){const o=r._pendingEditorState,s=r._rootElement,a=r._headless||s===null;if(o===null)return void(!r._updating&&r._deferred.length>0&&Gu(r,r._deferred));const l=r._editorState,u=l._selection,c=o._selection,f=r._dirtyType!==0,d=Re,h=tt,g=De,m=r._updating,p=r._observer;let y=null;if(r._pendingEditorState=null,r._editorState=o,!a&&f&&p!==null){De=r,Re=o,tt=!1,r._updating=!0;try{const v=r._dirtyType,T=r._dirtyElements,F=r._dirtyLeaves;p.disconnect(),y=jp(l,o,r,v,T,F)}catch(v){if(v instanceof Error&&r._onError(v),As)throw v;return Vd(r,null,s,o),qf(r),r._dirtyType=2,As=!0,cn(r,l),void(As=!1)}finally{p.observe(s,Ju),r._updating=m,Re=d,tt=h,De=g}}o._readOnly||(o._readOnly=!0);const _=r._dirtyLeaves,b=r._dirtyElements,k=r._normalizedNodes,S=r._updateTags;f&&(r._dirtyType=0,r._cloneNotNeeded.clear(),r._dirtyLeaves=new Set,r._dirtyElements=new Map,r._normalizedNodes=new Set),r._updateTags=new Set,(function(v,T){const F=v._decorators;let E=v._pendingDecorators||F;const O=T._nodeMap;let R;for(R in E)O.has(R)||(E===F&&(E=eh(v)),delete E[R])})(r,o);const C=a?null:Oe(ot(r));if(r._editable&&C!==null&&(f||c===null||c.dirty||!c.is(u))&&s!==null&&!S.has(nm)){De=r,Re=o;try{if(p!==null&&p.disconnect(),f||c===null||c.dirty){const v=r._blockCursorElement;v!==null&&zo(v,r,s),gm(u,c,r,C,S,s)}(function(v,T,F){let E=v._blockCursorElement;if(N(F)&&F.isCollapsed()&&F.anchor.type==="element"&&T.contains(bi(T))){const O=F.anchor,R=O.getNode(),L=O.offset;let J=!1,te=null;if(L===R.getChildrenSize())uo(R.getChildAtIndex(L-1))&&(J=!0);else{const X=R.getChildAtIndex(L);if(X!==null&&uo(X)){const Z=X.getPreviousSibling();(Z===null||uo(Z))&&(J=!0,te=v.getElementByKey(X.__key))}}if(J){const X=xt(R,v.getElementByKey(R.__key),v).element;return E===null&&(v._blockCursorElement=E=(function(Z){const I=Z.theme,P=re().createElement("div");P.contentEditable="false",P.setAttribute("data-lexical-cursor","true");let W=I.blockCursor;if(W!==void 0){if(typeof W=="string"){const ce=nn(W);W=I.blockCursor=ce}W!==void 0&&P.classList.add(...W)}return P})(v._config)),T.style.caretColor="transparent",void(te===null?X.appendChild(E):X.insertBefore(E,te))}}E!==null&&zo(E,v,T)})(r,s,c)}finally{p!==null&&p.observe(s,Ju),De=g,Re=d}}y!==null&&(function(v,T,F,E,O){const R=Array.from(v._listeners.mutation),L=R.length;for(let J=0;J<L;J++){const[te,X]=R[J];for(const Z of X){const I=T.get(Z);I!==void 0&&te(I,{dirtyLeaves:E,prevEditorState:O,updateTags:F})}}})(r,y,S,_,l),N(c)||c===null||u!==null&&u.is(c)||r.dispatchCommand(jt);const w=r._pendingDecorators;w!==null&&(r._decorators=w,r._pendingDecorators=null,si("decorator",r,!0,w)),(function(v,T,F){const E=ec(T),O=ec(F);E!==O&&si("textcontent",v,!0,O)})(r,i||l,o),si("update",r,!0,{dirtyElements:b,dirtyLeaves:_,editorState:o,mutatedNodes:y,normalizedNodes:k,prevEditorState:i||l,tags:S}),!m&&Gu(r,r._deferred),(function(v){const T=v._updates;if(T.length===0)return void(v._cascadeCount=0);if((function(E){zs.has(E)||(zs.add(E),setTimeout(()=>{zs.delete(E),E._cascadeCount=0},0))})(v),v._cascadeCount++>99)return v._updates=[],v._cascadeCount=0,void v._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${v._config.namespace}`));const F=T.shift();if(F){const[E,O]=F;_i(v,E,O)}})(r)})(n,e)}finally{ao=t}}function si(n,e,t,...r){const i=e._updating;e._updating=t;try{const o=e._listeners[n],s=Array.from(o);for(const[a,l]of s){l&&l();const u=a(...r);o.has(a)?o.set(a,u):u&&u()}}finally{e._updating=i}}function Wd(n,e,t,r){const i=kl(n);let o;if(!ao)for(let s=0;s<i.length;s++)i[s]._updating||(i[s]._cascadeCount=0);for(let s=4;s>=0;s--)for(let a=0;a<i.length;a++){const l=i[a];if(a>0&&l._updating){o=l;break}const u=l._commands.get(e);if(u!==void 0){const c=u[s];if(c.size>0){let f=!1;if(yt(l,()=>{for(const d of c)if(d(t,r))return void(f=!0)}),f)return f}}}return o&&o.update(()=>{Wd(o,e,t,r)}),!1}function Gu(n,e){if(n._deferred=[],e.length!==0){const t=n._updating;n._updating=!0;try{for(let r=0;r<e.length;r++)e[r]()}finally{n._updating=t}}}function Zu(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const i=t.shift();if(i){const[o,s]=i,a=n._pendingEditorState;let l;s!==void 0&&(l=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(a===null&&D(191),a._flushSync=!0),l&&n._deferred.push(l),Kd(n,s.tag)),a==null?_i(n,o,s):o()}}return r}function _i(n,e,t){const r=n._updateTags;let i,o=!1,s=!1;t!==void 0&&(i=t.onUpdate,Kd(n,t.tag),o=t.skipTransforms||!1,s=t.discrete||!1),i&&n._deferred.push(i);const a=n._editorState;let l=n._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=n._pendingEditorState=qd(l||a),u=!0),l._flushSync=s;const c=Re,f=tt,d=De,h=n._updating;Re=l,tt=!1,n._updating=!0,De=n;const g=n._headless||n.getRootElement()===null;ml(null);try{u&&(g?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=(function(_,b){const k=_.getEditorState()._selection,S=Oe(ot(_));return N(k)||k==null?mi(k,S,_,b):k.clone()})(n,t&&t.event||null));const p=n._compositionKey;e(),o=Zu(n,o),(function(_,b){const k=b.getEditorState()._selection,S=_._selection;if(N(S)){const C=S.anchor,w=S.focus;let v;if(C.type==="text"&&(v=C.getNode(),v.selectionTransform(k,S)),w.type==="text"){const T=w.getNode();v!==T&&T.selectionTransform(k,S)}}})(l,n),n._dirtyType!==0&&(o?(function(_,b){const k=b._dirtyLeaves,S=_._nodeMap;for(const C of k){const w=S.get(C);$(w)&&w.isAttached()&&w.isSimpleText()&&!w.isUnmergeable()&&mu(w)}})(l,n):(function(_,b){const k=b._dirtyLeaves,S=b._dirtyElements,C=_._nodeMap,w=Pt(),v=new Map;let T=k,F=T.size,E=S,O=E.size;for(;F>0||O>0;){if(F>0){b._dirtyLeaves=new Set;for(const R of T){const L=C.get(R);$(L)&&L.isAttached()&&L.isSimpleText()&&!L.isUnmergeable()&&mu(L),L!==void 0&&Yu(L,w)&&Vu(b,L,v),k.add(R)}if(T=b._dirtyLeaves,F=T.size,F>0){lo++;continue}}b._dirtyLeaves=new Set,b._dirtyElements=new Map,E.delete("root")&&E.set("root",!0);for(const R of E){const L=R[0],J=R[1];if(S.set(L,J),!J)continue;const te=C.get(L);te!==void 0&&Yu(te,w)&&Vu(b,te,v)}T=b._dirtyLeaves,F=T.size,E=b._dirtyElements,O=E.size,lo++}b._dirtyLeaves=k,b._dirtyElements=S})(l,n),Zu(n),(function(_,b,k,S){const C=_._nodeMap,w=b._nodeMap,v=[];for(const[E]of S){const O=w.get(E);O!==void 0&&(O.isAttached()||(x(O)&&yo(O,E,C,w,v,S),C.has(E)||S.delete(E),v.push(E)))}for(const E of k){const O=w.get(E);O===void 0||O.isAttached()||(tn(O)&&O.__slots!==null&&yo(O,E,C,w,v,k),C.has(E)||k.delete(E),v.push(E))}for(const E of v)w.delete(E);const T=fe(),F=T._compositionKey;F===null||w.has(F)||(T._compositionKey=null)})(a,l,n._dirtyLeaves,n._dirtyElements)),p!==n._compositionKey&&(l._flushSync=!0);const y=l._selection;if(N(y)){n._slotsUsed&&Od(y);const _=l._nodeMap,b=y.anchor.key,k=y.focus.key;_.get(b)!==void 0&&_.get(k)!==void 0||D(19)}else de(y)&&y._nodes.size===0&&(l._selection=null)}catch(p){return p instanceof Error&&n._onError(p),n._pendingEditorState=a,n._dirtyType=2,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void cn(n)}finally{Re=c,tt=f,De=d,n._updating=h,lo=0}n._dirtyType!==0||n._deferred.length>0||(function(p,y){const _=y.getEditorState()._selection,b=p._selection;if(b!==null){if(b.dirty||!b.is(_))return!0}else if(_!==null)return!0;return!1})(l,n)?l._flushSync?(l._flushSync=!1,cn(n)):u&&Em(()=>{cn(n)}):(l._flushSync=!1,u&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function yt(n,e,t){De===n&&t===void 0?yn()?_i(n,e,t):e():_i(n,e,t)}function _m(n){if(xe(n)){let e=null;for(const t of n.getChildren())e=t.isInline()?(e||t.replace(t.createParentElementNode())).append(t):null}}class ve extends Qe{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:_m,extends:Qe})}constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&D(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return xp[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&&bt(this).length===0}isDirty(){const e=fe()._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=[];for(const r of bt(this)){const i=Ln(this,r);x(i)&&e.push(...i.getAllTextNodes())}let t=this.getFirstChild();for(;t!==null;){if($(t)&&e.push(t),x(t)){const r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;x(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;x(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 o=t[r-1];return x(o)&&o.getLastDescendant()||o||null}const i=t[e];return x(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:ie(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&D(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:ie(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&D(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let r,i;if(e<t/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=t-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e=yh(this);const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const o=t[i];e+=o.getTextContent(),x(o)&&i!==r-1&&!o.isInline()&&(e+=$n)}return e}getTextContentSize(){let e=(function(i){let o=0;for(const s of bt(i)){const a=Ln(i,s);a!==null&&(o+=a.getTextContentSize())}return o})(this);const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const o=t[i];e+=o.getTextContentSize(),x(o)&&i!==r-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const t=mo[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){const t=rn[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Rn(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){Me();const r=A();let i=e,o=t;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const l=this.getFirstChild();if($(l)||x(l))return l.select(0,0)}else if(!(e!==void 0&&e!==s||t!==void 0&&t!==s)){const l=this.getLastChild();if($(l)||x(l))return l.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const a=this.__key;return N(r)?(r.anchor.set(a,i,"element"),r.focus.set(a,o,"element"),r.dirty=!0,r):jd(a,i,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(t=>t.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==""&&mo[e]||0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){Co(this)&&D(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();e+t<=i||D(226,String(e),String(t),String(i));for(const h of r);const s=o.__key,a=[],l=[],u=this.getChildAtIndex(e+t);let c=null,f=i-t+r.length;if(e!==0)if(e===i)c=this.getLastChild();else{const h=this.getChildAtIndex(e);h!==null&&(c=h.getPreviousSibling())}if(t>0){let h=c===null?this.getFirstChild():c.getNextSibling();for(let g=0;g<t;g++){h===null&&D(100);const m=h.getNextSibling(),p=h.__key;Rt(h.getWritable()),l.push(p),h=m}}let d=c;for(const h of r){d!==null&&h.is(d)&&(c=d=d.getPreviousSibling());const g=h.getWritable();g.__parent===s&&f--,Rt(g);const m=h.__key;if(d===null)o.__first=m,g.__prev=null;else{const p=d.getWritable();p.__next=m,g.__prev=p.__key}h.__key===s&&D(76),g.__parent=s,a.push(m),d=h}if(e+t===i)d!==null&&(d.getWritable().__next=null,o.__last=d.__key);else if(u!==null){const h=u.getWritable();if(d!==null){const g=d.getWritable();h.__prev=d.__key,g.__next=u.__key}else h.__prev=null}if(o.__size=f,l.length){const h=A();if(N(h)){const g=new Set(l),m=new Set(a),{anchor:p,focus:y}=h;Qu(p,g,m)&&wo(p,p.getNode(),this,c,u),Qu(y,g,m)&&wo(y,y.getNode(),this,c,u),f!==0||this.canBeEmpty()||xe(this)||this.remove()}}return o}getDOMSlot(e){return new Rf(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(K(t)){const r=this.getIndent();r>0&&(t.style.paddingInlineStart=40*r+"px",t.setAttribute("data-lexical-indent",String(r)));const i=this.getDirection();i&&(t.dir=i)}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),r=this.getTextStyle();return t===0&&r===""||xe(this)||this.getChildren().some($)||(t!==0&&(e.textFormat=t),r!==""&&(e.textStyle=r)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const r=xt(this,e,t);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=t.getElementByKey(o.getKey());s!==null&&(i==null?(r.insertChild(s),i=s):i!==s&&r.replaceChild(s,i),i=i.nextSibling)}}}function x(n){return n instanceof ve}function Qu(n,e,t){let r=n.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!t.has(i))return!0;r=r.getParent()}return!1}class dl extends Qe{__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&D(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Q(n){return n instanceof dl}class ss extends ve{__cachedText;$config(){return this.config("root",{extends:ve})}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){D(51)}getTextContent(){const e=this.__cachedText;return e===null||!yn()&&fe()._dirtyType!==0?super.getTextContent():e}remove(){D(52)}replace(e){D(53)}insertBefore(e){D(54)}insertAfter(e){D(55)}updateDOM(e,t){return!1}splice(e,t,r){for(const i of r)x(i)||Q(i)||D(282);return super.splice(e,t,r)}static importJSON(e){return me().updateFromJSON(e)}collapseAtStart(){return!0}}function Ne(n){return n instanceof ss}function qd(n){return new Ai(Lf(n._nodeMap),null,n._slotsUsed)}function hl(){return new Ai(new Map([["root",new ss]]),null,!1)}function _a(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&D(130,t.name),x(n)){const i=e.children;Array.isArray(i)||D(59,t.name);const o=n.getChildren();for(let s=0;s<o.length;s++){const a=_a(o[s]);i.push(a)}}const r=bt(n);if(r.length>0){const i={};for(const o of r){const s=Ln(n,o);s===null&&D(366,t.name,o),i[o]=_a(s)}e.$slots=i}return e}function bm(n){return n instanceof Ai}class Ai{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,r=!1){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=r}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return Xu(t&&t.editor||null,this,e)}clone(e){const t=new Ai(this._nodeMap,e===void 0?this._selection:e,this._slotsUsed);return t._readOnly=!0,t}toJSON(){return Xu(null,this,()=>({root:_a(me())}))}}class gl extends ve{$config(){return this.config("artificial",{extends:ve})}createDOM(e){return re().createElement("div")}}class as extends Qe{$config(){return this.config("linebreak",{importDOM:{br:e=>Ud(e)||Hd(e)?null:{conversion:km,priority:0}}})}getTextContent(){return`
|
|
11
|
+
`}createDOM(){return re().createElement("br")}updateDOM(){return!1}isInline(){return!0}}function km(n){return{node:Wt()}}function Wt(){return Ge(new as)}function Pe(n){return n instanceof as}function Ud(n){const e=n.parentElement;if(e!==null&&zr(e)){const t=e.firstChild;if(t===n||t.nextSibling===n&&Do(t)){const r=e.lastChild;if(r===n||r.previousSibling===n&&Do(r))return!0}}return!1}function Hd(n){const e=n.parentElement;if(e!==null&&zr(e)){const t=e.firstChild;if(t===n||t.nextSibling===n&&Do(t))return!1;const r=e.lastChild;if(r===n||r.previousSibling===n&&Do(r))return!0}return!1}function Do(n){return it(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}class ls extends ve{$config(){return this.config("paragraph",{extends:ve,importDOM:{p:()=>({conversion:xm,priority:0})}})}createDOM(e){const t=re().createElement("p"),r=_r(e.theme,"paragraph");return r!==void 0&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}exportDOM(e){const{element:t}=super.exportDOM(e);if(K(t)){this.isEmpty()&&t.append(re().createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r)}return{element:t}}exportJSON(){const e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){const t=this.getChildren().find($);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){const r=Y();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||$(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 xm(n){const e=Y();if(Jt(e,n),Yn(n,e),e.getFormatType()===""){const t=n.getAttribute("align");t&&t&&t in mo&&e.setFormat(t)}return Ct(e,n),{node:e}}function Y(){return Ge(new ls)}function Ht(n){return n instanceof ls}function Cm(n){console.warn(n)}const G=0,gt=1,dt=3,Jd=4,vm=-8;function Vd(n,e,t,r,i){const o=n._keyToDOMMap;o.clear(),n._editorState=hl(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(n._updateTags=new Set,n._updates=[],n._cascadeCount=0),n._blockCursorElement=null,n._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(n._inputState.handledSelectionCommandTimeoutId),n._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const s=n._observer;s!==null&&(s.disconnect(),n._observer=null),e!==null&&(e.textContent="",(function(a,l){const u=`__lexicalKey_${l._key}`;delete a[u]})(e,n)),t!==null&&(t.textContent="",o.set("root",t),Qd(t,n,"root"))}function Sm(n){const e=new Set,t=new Set;for(const{klass:r,ownNodeConfig:i}of Nl(n)){const o=r.transform;if(!t.has(o)){t.add(o);const s=r.transform();s&&e.add(s)}if(i){const s=i.$transform;s&&e.add(s)}}return e}const $o={$createDOM:(n,e)=>n.createDOM(e._config,e),$decorateDOM:(n,e,t,r)=>{},$exportDOM:(n,e)=>{const t=_l(e,n.getType());return t&&t.exportDOM!==void 0?t.exportDOM(e,n):n.exportDOM(e)},$extractWithChild:(n,e,t,r,i)=>x(n)&&n.extractWithChild(e,t,r),$getDOMSlot:(n,e,t)=>n.getDOMSlot(e),$getSlotTargetElement:(n,e,t,r)=>null,$shouldExclude:(n,e,t)=>x(n)&&n.excludeFromCopy("html"),$shouldInclude:(n,e,t)=>!e||n.isSelected(e),$updateDOM:(n,e,t,r)=>n.updateDOM(e,t,r._config)};function pl(n){const e=n||{},t=Bd(),r=e.theme||{},i=n===void 0?t:e.parentEditor||null,o=e.disableEvents||!1,s=hl(),a=e.namespace||(i!==null?i._config.namespace:nh()),l=e.editorState,u=[ss,on,as,rs,ls,gl,...e.nodes||[]],{onError:c,onWarn:f,html:d}=e,h=e.editable===void 0||e.editable;let g;if(n===void 0&&t!==null)g=t._nodes;else{g=new Map;for(let p=0;p<u.length;p++){let y=u[p],_=null,b=null;if(y&&typeof y=="object"){const C=y;y=C.replace,_=C.with,b=C.withKlass||null}if(typeof y!="function"||!y.prototype||!(y===Qe||y.prototype instanceof Qe)){let C="<unknown>";try{C=JSON.parse(If)}catch{}D(365,String(p-u.length+(e.nodes?e.nodes.length:0)),typeof y=="function"?`${y.name}${typeof y.getType=="function"?` (type ${String(y.getType())})`:""}`:String(y),String(C))}El(y);const k=y.getType(),S=Sm(y);g.set(k,{exportDOM:d&&d.export?d.export.get(y):void 0,klass:y,replace:_,replaceWithKlass:b,sharedNodeState:$p(u[p]),transforms:S})}}const m=new Nr(s,i,g,{disableEvents:o,dom:{...$o,...n&&n.dom},namespace:a,theme:r},c||console.error,f||Cm,(function(p,y){const _=new Map,b=new Set,k=S=>{Object.keys(S).forEach(C=>{let w=_.get(C);w===void 0&&(w=[],_.set(C,w)),w.push(S[C])})};return p.forEach(S=>{const C=S.klass.importDOM;if(C==null||b.has(C))return;b.add(C);const w=C.call(S.klass);w!==null&&k(w)}),y&&k(y),_})(g,d?d.import:void 0),h,n);return l!==void 0&&(m._pendingEditorState=l,m._dirtyType=2),(function(p){p.registerCommand(rd,Jp,G),p.registerCommand(id,Vp,G),p.registerCommand(od,Yp,G),p.registerCommand(sd,Xp,G),p.registerCommand(tl,Gp,G)})(m),m}function wm(n,e){const t=n.get(e);n.delete(e),t&&t()}function Jr(n,e,t){return n.set(e,t),wm.bind(null,n,e)}class Nr{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(e,t,r,i,o,s,a,l,u){this._createEditorArgs=u,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Qs,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=nh(),this._onError=o,this._onWarn=s,this._htmlConversions=a,this._editable=l,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return Jr(this._listeners.update,e)}registerEditableListener(e){return Jr(this._listeners.editable,e)}registerDecoratorListener(e){return Jr(this._listeners.decorator,e)}registerTextContentListener(e){return Jr(this._listeners.textcontent,e)}registerRootListener(e){const t=this._listeners.root;return Je(Jr(t,e,e(this._rootElement,null)||void 0),()=>(function(r,i,o){const s=r.get(i);s&&s(),r.set(i,i(...o)||void 0)})(t,e,[null,this._rootElement]))}registerCommand(e,t,r){r===void 0&&D(35);const i=this._commands;i.has(e)||i.set(e,[new Ur,new Ur,new Ur,new Ur,new Ur]);const o=i.get(e);o===void 0&&D(36,String(e));const s=(function(l){return 7&l})(r),a=o[s];return s!==r?a.addFront(t):a.addBack(t),()=>{a.delete(t),o.every(l=>l.size===0)&&i.delete(e)}}registerMutationListener(e,t,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;let s=o.get(t);s===void 0&&(s=new Set,o.set(t,s)),s.add(i);const a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(t,i),()=>{s.delete(i),s.size===0&&o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&D(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,i=sc(r).get(t.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){const r=this.registerNodeTransformToKlass(e,t),i=[r],o=r.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,t);i.push(s)}return(function(s,a){const l=sc(s.getEditorState()),u=[];for(const c of a){const f=l.get(c);f&&u.push(f)}u.length!==0&&s.update(()=>{for(const c of u)for(const f of c.keys()){const d=ie(f);d&&d.markDirty()}},s._pendingEditorState===null?{tag:mr}:void 0)})(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,...t){return j(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=_r(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,Vd(this,t,e,i,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||Zp(t),r!=null&&t.classList.remove(...r)),e!==null){const o=wl(e),s=e.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,qf(this),this._updateTags.add(mr),cn(this),this._config.disableEvents||(function(a,l){const u=a.ownerDocument;ca.set(a,u);let c=ko.get(u);c===void 0&&(c={editors:new Set,hasShadowEditor:void 0},ko.set(u,c)),c.editors.add(l),c.hasShadowEditor=void 0,a.__lexicalEditor=l;const f=bd(a);f.push(Hp.register(u));for(let d=0;d<ua.length;d++){const[h,g]=ua[d],m=typeof g=="function"?p=>{$u(p)||(Du(p),(l.isEditable()||h==="click")&&g(p,l))}:p=>{if($u(p))return;Du(p);const y=l.isEditable();switch(h){case"cut":return y&&j(l,ns,p);case"copy":return j(l,$i,p);case"paste":return y&&j(l,Pr,p);case"dragstart":return y&&j(l,dd,p);case"dragover":return y&&j(l,hd,p);case"dragend":return y&&j(l,Lp,p);case"focus":return y&&j(l,gd,p);case"blur":return y&&j(l,Wp,p);case"drop":return y&&j(l,cd,p)}};f.push(oi(a,h,m))}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(mr),cn(this);si("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&D(38);let r=e;r._readOnly&&(r=qd(e),r._selection=e._selection?e._selection.clone():null),Wf(this);const i=this._pendingEditorState,o=t!==void 0?t.tag:null;i===null||i.isEmpty()||(o!=null&&this._updateTags.add(o),cn(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,yt(this,()=>{if(o&&this._updateTags.add(o),e._parsed)for(const[s,a]of r._nodeMap.entries())x(a)?this._dirtyElements.set(s,!0):this._dirtyLeaves.add(s)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return(function(r,i,o){const s=hl(),a=Re,l=tt,u=De,c=i._dirtyElements,f=i._dirtyLeaves,d=i._cloneNotNeeded,h=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,Re=s,tt=!1,De=i,ml(null);try{const g=i._nodes;No(r.root,g),o&&o(),s._readOnly=!0,s._parsed=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=c,i._dirtyLeaves=f,i._cloneNotNeeded=d,i._dirtyType=h,Re=a,tt=l,De=u}return s})(typeof e=="string"?JSON.parse(e):e,this,t)}read(...e){const[t,r]=e.length===1?["force-commit",e[0]]:e;return t==="force-commit"&&cn(this),(t==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(r,{editor:this})}update(e,t){(function(r,i,o){r._updating?r._updates.push([i,o]):_i(r,i,o)})(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),yt(this,()=>{const i=A(),o=me();i!==null?i.dirty||pe(i.clone()):o.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),$r("focus"),Am(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=Oe(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,si("editable",this,!0,e),this._slotsUsed&&this.update(()=>Id()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Nr.version=If;let ba=null;function ml(n){ba=n}const yl=Symbol("INTERNAL_SKIP_AFTER_CLONE_FROM");let Tm=1;function Yd(n,e){const t=_l(n,e);return t===void 0&&D(30,e),t}function _l(n,e){return n._nodes.get(e)}const Em=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function bl(n,e){const t=e!==void 0?e:(()=>{const o=n.getRootNode();return kn(o)||qt(o)?Ar(o):null})();if(!K(t)||t.hasAttribute("data-lexical-slot"))return!1;const r=Xe(t),i=t.nodeName;return xd(r)&&(i==="INPUT"||i==="TEXTAREA"||t.contentEditable==="true"&&Ir(t)==null)}function zi(n,e,t){const r=n.getRootElement();if(!r)return!1;try{if(!e||!r.contains(e)||!r.contains(t))return!1}catch{return!1}return yr(e)===n&&n.read("latest",()=>!bl(e))}function Oi(n){return n instanceof Nr}function yr(n){let e=n;for(;e!=null;){const t=Ir(e);if(Oi(t))return t;e=Vn(e)}return null}function Ir(n){return n?n.__lexicalEditor:null}function Fo(n){return Tr(n)||n.isToken()}function _t(n){return Fo(n)||n.isSegmented()}function it(n){return Ft(n)&&n.nodeType===3}function kn(n){return Ft(n)&&n.nodeType===9}function Nm(n){let e=n;for(;e!=null;){if(it(e))return e;e=e.firstChild}return null}function Rn(n,e,t){const r=rn[e];if(t!==null&&(n&r)===(t&r))return n;let i=n^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function Xd(n){return $(n)||Pe(n)||Q(n)}function Gd(n,e){const t=(function(){const s=ba;return ba=null,s})();if((e=e||t&&t.__key)!=null)return void(n.__key=e);Me(),Pd();const r=fe(),i=ln(),o=""+Tm++;i._nodeMap.set(o,n),x(n)?r._dirtyElements.set(o,!0):r._dirtyLeaves.add(o),r._cloneNotNeeded.add(o),r._dirtyType===0&&(r._dirtyType=1),n.__key=o}function Rt(n){Ke(n)!==null&&D(380,n.__key,String(Ke(n)));const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),i=n.getPreviousSibling(),o=n.getNextSibling(),s=o!==null?o.__key:null,a=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(r.__first=s),o===null&&(r.__last=a),l!==null&&(l.__next=s),u!==null&&(u.__prev=a),t.__prev=null,t.__next=null,t.__parent=null,r.__size--}}function Ao(n){Pd(),Co(n)&&D(323,n.__key,n.__type);const e=n.getLatest(),t=e.__parent!==null?e.__parent:In(e)?e.__slotHost:null,r=ln(),i=fe(),o=r._nodeMap,s=i._dirtyElements;t!==null&&(function(l,u,c){let f=l;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!==null?d.__parent:In(d)?d.__slotHost:null}})(t,o,s);const a=e.__key;i._dirtyType===0&&(i._dirtyType=1),x(n)?s.set(a,!0):i._dirtyLeaves.add(a)}function je(n){Me();const e=fe(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=ie(t);r!==null&&r.getWritable()}if(n!==null){const r=ie(n);r!==null&&r.getWritable()}}}function Pt(){return yn()?null:fe()._compositionKey}function ie(n,e){const t=(e||ln())._nodeMap.get(n);return t===void 0?null:t}function Zd(n,e){const t=Lr(n,fe());return t!==void 0?ie(t,e):null}function Qd(n,e,t){n[`__lexicalKey_${e._key}`]=t}function Lr(n,e){return n[`__lexicalKey_${e._key}`]}function Xe(n,e){let t=n;for(;t!=null;){const r=Zd(t,e);if(r!==null)return r;t=Vn(t)}return null}function eh(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function ec(n){return n.read(()=>me().getTextContent())}function me(){return ln()._nodeMap.get("root")}function pe(n){Me();const e=ln();n!==null&&(n.dirty=!0,n.setCachedNodes(null),N(n)&&fe()._slotsUsed&&Od(n)),e._selection=n}function tc(){Me(),Wf(fe())}function cr(n){const e=(function(t,r){let i=t;for(;i!=null;){const o=Lr(i,r);if(o!==void 0)return o;i=Vn(i)}return null})(n,fe());return e===null?null:ie(e)}function th(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function kl(n){const e=[];for(let t=n;t!==null;t=t._parentEditor)e.push(t);return e}function nh(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function rh(n){return it(n)?n.nodeValue:null}function xl(n,e,t){const r=Oe(ot(e));if(r===null)return;const i=rt(r,e._rootElement),o=i.anchorNode;let{anchorOffset:s,focusOffset:a}=i;if(o!==null){let l=rh(o);const u=Xe(o);if(l!==null&&$(u)){if((l===ui||l===Qa)&&t){const c=t.length;l=t,s=c,a=c}l!==null&&Cl(u,l,s,a,n)}}}function Cl(n,e,t,r,i){let o=n;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();if(o.isToken()&&s)return;let a=e;if((s||i)&&(e.endsWith(ui)&&(a=e.slice(0,-ui.length)),i)){const u=Qa;let c;for(;(c=a.indexOf(u))!==-1;)a=a.slice(0,c)+a.slice(c+u.length),t!==null&&t>c&&(t=Math.max(c,t-u.length)),r!==null&&r>c&&(r=Math.max(c,r-u.length))}const l=o.getTextContent();if(i||a!==l){const u=A();if(a===""){if(je(null),Ti||mn||Ei)o.remove();else{const m=fe();Os(o,"",u),setTimeout(()=>{m.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const c=o.getParent(),f=lt(),d=o.getTextContentSize(),h=Pt(),g=o.getKey();if(o.isToken()&&!s||h!==null&&g===h&&!s||N(f)&&(c!==null&&!c.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===n.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!s||f.focus.key===n.__key&&f.focus.offset===d&&!o.canInsertTextAfter()&&!s))return void o.markDirty();if(!N(u)||t===null||r===null)return void Os(o,a,u);if(u.setTextNodeRange(o,t,o,r),o.isSegmented()){const m=we(o.getTextContent());o.replace(m),o=m}Os(o,a,u)}}}function Os(n,e,t){if(n.setTextContent(e),N(t)){const r=n.getKey();let i=!1;for(const o of["anchor","focus"]){const s=t[o];s.type==="text"&&s.key===r&&(s.offset=Bt(n,s.offset,"clamp"),i=!0)}i&&(t._cachedNodes=null,t._cachedIsBackward=null)}}function Bi(n,e,t){const r=e[t]||!1;return r==="any"||r===n[t]}function Dm(n,e){return Bi(n,e,"altKey")&&Bi(n,e,"ctrlKey")&&Bi(n,e,"shiftKey")&&Bi(n,e,"metaKey")}function ye(n,e,t){if(!Dm(n,t))return!1;if(n.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1||n.key.length===1&&n.key.charCodeAt(0)<=127)return!1;if(n.code.startsWith("Digit")&&/^\d$/.test(e))return n.code===`Digit${e}`;const r="Key"+e.toUpperCase();return n.code===r}const Xt={ctrlKey:!St,metaKey:St},nc={altKey:St,ctrlKey:!St};function rc(n){return n.key==="Backspace"}function $m(n){const e=me();if(N(n)){const t=n.anchor,r=n.focus,i=t.getNode();if(Ne(i))return t.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Ot(n),n;const o=i.getTopLevelElementOrThrow(),s=o.getParent();if(s===null)return x(o)&&(t.set(o.getKey(),0,"element"),r.set(o.getKey(),o.getChildrenSize(),"element"),Ot(n)),n;const a=s;return t.set(a.getKey(),0,"element"),r.set(a.getKey(),a.getChildrenSize(),"element"),Ot(n),n}{const t=e.select(0,e.getChildrenSize());return pe(Ot(t)),t}}function _r(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const i=n[e];if(typeof i=="string"){const o=nn(i);return t[e]=o,o}return i}function vl(n,e,t,r,i){if(t.size===0)return;const o=r.__type,s=r.__key,a=e.get(o);a===void 0&&D(33,o);const l=a.klass;let u=n.get(l);u===void 0&&(u=new Map,n.set(l,u));const c=u.get(s),f=c==="destroyed"&&i==="created";(c===void 0||f)&&u.set(s,f?"updated":i)}function ic(n,e,t){const r=n.getParent();let i=t,o=n;return r!==null&&(t===0&&(i=o.getIndexWithinParent(),o=r)),o.getChildAtIndex(i-1)}function Fm(n,e){const t=n.offset;if(n.type==="element")return ic(n.getNode(),e,t);{const r=n.getNode();if(t===0||!e){const i=r.getPreviousSibling();return i===null?ic(r.getParentOrThrow(),e,r.getIndexWithinParent()+0):i}}return null}function ih(n){const e=ot(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function j(n,e,...t){return Wd(n,e,t[0],n)}function Dr(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&D(75,e),t}function Vn(n){const e=n.assignedSlot||n.parentElement;if(e!==null)return e;const t=n.parentNode;return qt(t)?t.host:null}function Sl(n){return kn(n)?n:K(n)?n.ownerDocument:null}function $r(n){Me(),fe()._updateTags.add(n)}function Am(n){Me(),fe()._deferred.push(n)}function Fr(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function wl(n){const e=Sl(n);return e?e.defaultView:null}function ot(n){const e=n._window;return e===null&&D(78),e}function Tl(n){return x(n)&&n.isInline()||Q(n)&&n.isInline()}function oh(n){let e=n.getLatest();for(;e!==null;){if(Ke(e)!==null&&x(e))return e;const t=e.getParentOrThrow();if(xe(t))return t;e=t}return e}function ai(n){return x(n)&&n.isShadowRoot()}function xe(n){return Ne(n)||ai(n)}function Be(n,e=!1){const t=n.constructor.clone(n,yl);return Gd(t,null),t.afterCloneFrom(n),e||t.resetOnCopyNodeFrom(n),t}function Ge(n){const e=fe(),t=n.getType(),r=_l(e,t);r===void 0&&D(200,n.constructor.name,t);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const s=i(n),a=s.constructor;return o!==null?s instanceof o||D(201,o.name,o.getType(),a.name,a.getType(),n.constructor.name,t):s instanceof n.constructor&&a!==n.constructor||D(202,a.name,a.getType(),n.constructor.name,t),s.__key===n.__key&&D(203,n.constructor.name,t,a.name,a.getType()),s}return n}function Ms(n,e){!Ne(n.getParent())||x(e)||Q(e)||D(99)}function sh(n){const e=ie(n);return e===null&&D(63,n),e}function uo(n){if(!n||n.isInline())return!1;if(Q(n))return!0;if(x(n)){if(n.isShadowRoot()){const e=n.getParent();return!(x(e)&&e.isShadowRoot())}return!n.canBeEmpty()}return!1}function zo(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function Oe(n){return Ve?(n||window).getSelection():null}function zm(n){const e=wl(n);return e?e.getSelection():null}function qt(n){return ka(n)&&"host"in n}const Om=[];function ah(n){const e=n.getRootNode();if(e===n||!qt(e))return Om;const t=[e];let r=e.host;for(;;){const i=r.getRootNode();if(i===r||!qt(i))break;t.push(i),r=i.host}return t}function*lh(n){const e=[n];let t;for(;t=e.pop();){yield*t.querySelectorAll('[data-lexical-editor="true"]');const r=(kn(t)?t:t.ownerDocument).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);let i;for(;i=r.nextNode();)i.shadowRoot&&e.push(i.shadowRoot)}}function uh(n){return n!==null?n.ownerDocument:document}function re(){const n=Bd();return uh(n!==null?n._rootElement:null)}function us(n,e){if(e===null||typeof n.getComposedRanges!="function")return null;const t=ah(e);if(t.length===0)return null;const r=n.getComposedRanges;try{const i=r.call(n,{shadowRoots:t})[0];if(i!==void 0)return i}catch{}try{const i=r.apply(n,t)[0];if(i!==void 0)return i}catch{}return null}function ch(n,e){const t=us(n,e);if(t!==null){const r=Mm(t);if(r!==null)return r}return n.rangeCount>0?n.getRangeAt(0):null}function rt(n,e){const t=us(n,e);return t===null?n:jm(t,Rm(n))}function Mm(n){const e=n.startContainer.ownerDocument;if(e===null)return null;const t=e.createRange();try{return t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),t}catch{return null}}function jm(n,e){const{startContainer:t,startOffset:r,endContainer:i,endOffset:o}=n;return e==="backward"?{anchorNode:i,anchorOffset:o,direction:e,focusNode:t,focusOffset:r}:{anchorNode:t,anchorOffset:r,direction:e,focusNode:i,focusOffset:o}}function Rm(n){return n.direction}function bi(n){const e=n.getRootNode();return kn(e)||qt(e)?e.activeElement:null}function Ar(n){let e=n.activeElement;for(;e!==null&&e.shadowRoot!==null;){const t=e.shadowRoot.activeElement;if(t===null)break;e=t}return e}function Pn(n){const e=n.target;if(e!==null&&K(e)&&e.shadowRoot!==null&&typeof n.composedPath=="function"){const t=n.composedPath();if(t.length>0)return t[0]}return e}function fh(n){return K(n)&&n.tagName==="A"}function Pm(n){return K(n)&&n.tagName==="TR"}function K(n){return Ft(n)&&n.nodeType===1}function Ft(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function ka(n){return Ft(n)&&n.nodeType===11}const Im=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function Oo(n){return!(!K(n)||!n.style.display.startsWith("inline"))||Im.test(n.nodeName)}const Lm=/^(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;function zr(n){return(!K(n)||!n.style.display.startsWith("inline"))&&Lm.test(n.nodeName)}function Le(n){if(Q(n)&&!n.isInline())return!0;if(!x(n)||xe(n))return!1;const e=n.getFirstChild(),t=e===null||Pe(e)||$(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function Ce(){return fe()}function cs(n=Ce()){return n._config.dom||$o}function xt(n,e,t=Ce()){const r=cs(t).$getDOMSlot(n,e,t);return x(n)&&(Bm(r)||D(344,n.getKey(),n.getType())),r}function Bm(n){return n instanceof Rf}function pn(n,e,t=Ce()){return Nm(xt(n,e,t).element)}const oc=new WeakMap,Km=new Map;function sc(n){if(!n._readOnly&&n.isEmpty())return Km;n._readOnly||D(192);let e=oc.get(n);return e||(e=(function(t){const r=new Map;for(const[i,o]of t._nodeMap){const s=o.__type;let a=r.get(s);a||(a=new Map,r.set(s,a)),a.set(i,o)}return r})(n),oc.set(n,e)),e}function dh(n){const e=n.constructor.clone(n,yl);return e.afterCloneFrom(n),e}function Wm(n){return(e=dh(n))[kd]=!0,e;var e}function Yn(n,e){const t=n.getAttribute("data-lexical-indent");if(t!==null){const o=parseInt(t,10);if(Number.isFinite(o)&&o>=0)return void e.setIndent(o)}const r=parseInt(n.style.paddingInlineStart,10)||0,i=Math.round(r/40);e.setIndent(i)}function Ct(n,e){const t=e.getAttribute("dir");return t==="ltr"||t==="rtl"?n.setDirection(t):n}function Jt(n,e){const t=e.style.textAlign;return t&&t in mo?n.setFormat(t):n}function Mo(n,e){n.__lexicalUnmanaged=!0,e&&e.captureSelection!==void 0&&(n.__lexicalCapturedSelection=e.captureSelection)}function hh(n){return n.__lexicalUnmanaged===!0}function qm(n,e=Ce()){const t=e.isEditable();n.contentEditable=t?"true":"false",t?n.__lexicalEditor=e:delete n.__lexicalEditor}function jo(n,e){let t=n;for(;t!=null;){if(t.__lexicalCapturedSelection===!0)return!0;if(K(t)&&t.hasAttribute("data-lexical-slot")||Lr(t,e)!==void 0)return!1;t=Vn(t)}return!1}function Vr(n,e){return(function(t,r){return Object.prototype.hasOwnProperty.call(t,r)})(n,e)&&n[e]!==Qe[e]}const ac=new WeakMap,lc=Symbol("lexical.synthesizedGetType");function El(n){const e=ac.get(n);if(e)return e;const t=n.prototype!=null&&iu in n.prototype?n.prototype[iu]():void 0,r=(function(u){if(!(u===Qe||u.prototype instanceof Qe)){let c="<unknown>",f="<unknown>";try{c=u.getType()}catch{}try{Nr.version&&(f=JSON.parse(Nr.version))}catch{}D(290,u.name,c,f)}return u===dl||u===ve||u===Qe})(n),i=!r&&Vr(n,"getType")?n.getType:void 0,o=i&&!(lc in i)?i.call(n):void 0;let s,a=o;if(t)if(o)s=t[o];else{for(const[u,c]of Object.entries(t))a=u,s=c;if(!s)for(const u of Object.getOwnPropertySymbols(t)){const c=t[u];if(c){s=c;break}}}if(!r&&a){if(!Vr(n,"getType")){const u=n,c=function(){return this!==u?Qe.getType.call(this):a};c[lc]=!0,n.getType=c}if(Vr(n,"clone")||(n.clone=(u,c)=>{ml(u);const f=new n;return c!==yl&&f.afterCloneFrom(u),f}),Vr(n,"importJSON")||(n.importJSON=s&&s.$importJSON||(u=>new n().updateFromJSON(u))),!Vr(n,"importDOM")&&s){const{importDOM:u}=s;u&&(n.importDOM=()=>u)}}const l={klass:n,ownNodeConfig:s,ownNodeType:a};return ac.set(n,l),l}function*Nl(n){for(let e=n;e&&(e===Qe||xd(e.prototype));){const t=El(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||ph(e)}}function gh(n){const e=Ce();return Me(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(n))).klass}const q=(n,e)=>{let t=n;for(;t!=null&&!Ne(t);){if(e(t))return t;t=t.getParent()}return null};function Ro(n,e){const t=[];let r=n.__first;for(;r!==null;){const i=e===null?ie(r):e.get(r);i==null&&D(174),t.push(r),r=i.__next}return t}function ph(n){const e=Object.getPrototypeOf(n);if(typeof e=="function"&&e!==Function.prototype)return e;const t=n.prototype&&Object.getPrototypeOf(n.prototype);return t?t.constructor:null}const mh=new Map;function tn(n){return x(n)||Q(n)}function In(n){return x(n)||Q(n)}function Ke(n){const e=n.getLatest();return In(e)?e.__slotHost:null}function mt(n){const e=Ke(n);if(e===null)return null;const t=ie(e);return x(t)||Q(t)||D(370),t}function Um(n){const e=mt(n);if(e===null)return null;const t=n.getLatest().__key;for(const[r,i]of ds(e))if(i===t)return r;return null}function fs(n){let e=n.getLatest();for(;e!==null;){if(Ke(e)!==null)return e;e=e.getParent()}return null}function ds(n){const e=n.getLatest();return tn(e)&&e.__slots!==null?e.__slots:mh}function bt(n){return Array.from(ds(n).keys())}function Ln(n,e){const t=ds(n).get(e);return t===void 0?null:ie(t)}const Hm=["__proto__","constructor","prototype"],uc=Symbol("slotMapOwner");function xa(n){let e=n.__slots;return e!==null&&e[uc]===n||(e=new Map(e),e[uc]=n,n.__slots=e),e}const cc=new WeakMap,Jm=[];function Vm(n){for(const{ownNodeConfig:e}of Nl(n)){const t=e&&e.slots;if(t)return t}return Jm}function yh(n){let e="";for(const t of bt(n)){const r=Ln(n,t);r!==null&&(e+=r.getTextContent())}return e}function fc(n,e,t){const r=t.get(n),i=t.get(e);return r!==void 0?i!==void 0?r-i:-1:i!==void 0?1:n<e?-1:n>e?1:0}function Ym(n){const e=n.__slots;if(e===null||e.size<2)return;const t=(function(s){let a=cc.get(s);if(a===void 0){const l=Vm(s),u=new Map;for(const c of l)Hm.includes(c)&&D(371,s.name,c),u.has(c)&&D(372,s.name,c),u.set(c,u.size);a=u,cc.set(s,a)}return a})(n.constructor);let r=null,i=!0;for(const s of e.keys()){if(r!==null&&fc(r,s,t)>0){i=!1;break}r=s}if(i)return;const o=Array.from(e).sort(([s],[a])=>fc(s,a,t));e.clear();for(const[s,a]of o)e.set(s,a)}function _h(n,e,t){e!=="__proto__"&&e!=="constructor"&&e!=="prototype"||D(373,e);const r=n.getLatest();if(r.__slots!==null&&r.__slots.get(e)===t.getLatest().__key)return r;(!x(t)&&!Q(t)||t.isInline())&&D(374,t.__key);const i=n.getWritable(),o=xa(i),s=o.get(e);s!==void 0&&bh(s);const a=t.getWritable(),l=mt(a);if(l!==null){const u=Um(a);u!==null&&xa(l.getWritable()).delete(u),a.__slotHost=null}return Rt(a),a.__slotHost=i.__key,o.set(e,a.__key),Ym(i),(function(){const u=Ce();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),i}function Xm(n,e){const t=n.getWritable();if(t.__slots===null)return t;const r=t.__slots.get(e);return r!==void 0&&(bh(r),xa(t).delete(e)),t}function bh(n){const e=ie(n);if(e===null)return;const t=e.getWritable();In(t)||D(377,n),t.__slotHost=null,t.remove()}const Gm={next:"previous",previous:"next"};class Dl{origin;constructor(e){this.origin=e}[Symbol.iterator](){return hs({hasNext:At,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return oe(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return oe(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,t)),this}splice(e,t,r="next"){const i=r===this.direction?t:Array.from(t).reverse();let o=this;const s=this.getParentAtCaret(),a=new Map;for(let l=o.getAdjacentCaret();l!==null&&a.size<e;l=l.getAdjacentCaret()){const u=l.origin.getWritable();a.set(u.getKey(),u)}for(const l of i){if(a.size>0){const u=o.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(l.getKey()),!(u.is(l)||o.origin.is(l))){const c=l.getParent();c&&c.is(s)&&l.remove(),u.replace(l)}}else u===null&&D(263,Array.from(a).join(" "))}else o.insert(l);o=oe(l,this.direction)}for(const l of a.values())l.remove();return this}}class ki extends Dl{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ze(e,this.direction)}getParentCaret(e="root"){return oe($l(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=xn(this.direction);return oe(this.getNodeAtCaret(),e)||ze(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof ki&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const Zm={root:Ne,shadowRoot:xe};function xn(n){return Gm[n]}function $l(n,e="root"){return n===null||Zm[e](n)?null:Ke(n)===null?n:null}class Bn extends Dl{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:oe(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return x(this.origin)?ze(this.origin,this.direction):null}getParentCaret(e="root"){return oe($l(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=xn(this.direction);return oe(this.getNodeAtCaret(),e)||ze(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Bn&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Bn||e instanceof Kn)&&this.direction===e.direction&&this.origin.is(e.origin)}}class Kn extends Dl{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:_n(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return oe($l(this.getParentAtCaret(),e),this.direction)}getFlipped(){return _n(this.origin,xn(this.direction),this.offset)}isSamePointCaret(e){return e instanceof Kn&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Bn||e instanceof Kn)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return oe(this.origin,this.direction)}}function kt(n){return n instanceof Kn}function At(n){return n instanceof Bn}function Ue(n){return n instanceof ki}const Qm={next:class extends Kn{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Kn{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},ey={next:class extends Bn{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Bn{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},ty={next:class extends ki{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(n){return this.origin.splice(0,0,[n]),this}},previous:class extends ki{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(n){return this.origin.splice(this.origin.getChildrenSize(),0,[n]),this}}};function oe(n,e){return n?new ey[e](n):null}function _n(n,e,t){return n?new Qm[e](n,Bt(n,t)):null}function Bt(n,e,t="error"){const r=n.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(t!=="clamp"&&zf(284,String(e),String(r),n.getKey()),i=i<0?0:r),i}function dc(n,e){return new ry(n,e)}function ze(n,e){return x(n)?new ty[e](n):null}function ny(n){return n&&n.getChildCaret()||n}function Wn(n){return n&&ny(n.getAdjacentCaret())}class Fl{type="node-caret-range";direction;anchor;focus;constructor(e,t,r){this.anchor=e,this.focus=t,this.direction=r}getLatest(){const e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new Fl(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const o=this[i].getLatest();return kt(o)?(function(s,a){const{direction:l,origin:u}=s,c=Bt(u,a==="focus"?xn(l):l);return dc(s,c-s.offset)})(o,i):null},t=e("anchor"),r=e("focus");if(t&&r){const{caret:i}=t,{caret:o}=r;if(i.isSameNodeCaret(o))return[dc(i,o.offset-i.offset),null]}return[t,r]}iterNodeCarets(e="root"){const t=kt(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=kt(r),o=s=>s.isSameNodeCaret(r)?null:Wn(s)||s.getParentCaret(e);return hs({hasNext:s=>s!==null&&!(i&&r.isSameNodeCaret(s)),initial:t.isSameNodeCaret(r)?null:o(t),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class ry{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,r=t+e;return r<t?[r,t]:[t,r]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[r,i]=this.getSliceIndices(),o=e.getTextContent();return _n(e.setTextContent(o.slice(0,r)+o.slice(i)),t,r)}}function Or(n){return Nt(n,oe(me(),n.direction))}function Mi(n){return Nt(n,n)}function Nt(n,e){return n.direction!==e.direction&&D(265),new Fl(n,e,n.direction)}function hs(n){const{initial:e,hasNext:t,step:r,map:i}=n;let o=e;return{[Symbol.iterator](){return this},next(){if(!t(o))return{done:!0,value:void 0};const s={done:!1,value:i(o)};return o=r(o),s}}}function xi(n,e){const t=Ca(n.origin,e.origin);switch(t===null&&D(275,n.origin.getKey(),e.origin.getKey()),t.type){case"same":{const r=n.type==="text",i=e.type==="text";return r&&i?(function(o,s){return Math.sign(o-s)})(n.offset,e.offset):n.type===e.type?0:r?-1:i?1:n.type==="child"?-1:1}case"ancestor":return n.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return kh(t)}}function kh(n){const{a:e,b:t}=n,r=e.__key,i=t.__key;let o=e,s=t;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===i)return-1;if(s.__key===r)return 1}return o===null?1:-1}function Ki(n,e){return e.is(n)}function hc(n){return x(n)?[n.getLatest(),null]:[n.getParent(),n.getLatest()]}function Ca(n,e){if(n.is(e))return{commonAncestor:n,type:"same"};const t=new Map;for(let[r,i]=hc(n);r;i=r,r=r.getParent())t.set(r,i);for(let[r,i]=hc(e);r;i=r,r=r.getParent()){const o=t.get(r);if(o!==void 0)return o===null?(Ki(n,r)||D(276),{commonAncestor:r,type:"ancestor"}):i===null?(Ki(e,r)||D(277),{commonAncestor:r,type:"descendant"}):((x(o)||Ki(n,o))&&(x(i)||Ki(e,i))&&r.is(o.getParent())&&r.is(i.getParent())||D(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}function He(n,e){const{type:t,key:r,offset:i}=n,o=sh(n.key);return t==="text"?($(o)||D(266,o.getType(),r),_n(o,e,i)):(x(o)||D(267,o.getType(),r),Sa(o,n.offset,e))}function Et(n,e){const{origin:t,direction:r}=e,i=r==="next";kt(e)?n.set(t.getKey(),e.offset,"text"):At(e)?$(t)?n.set(t.getKey(),Bt(t,r),"text"):n.set(t.getParentOrThrow().getKey(),t.getIndexWithinParent()+(i?1:0),"element"):(Ue(e)&&x(t)||D(268),n.set(t.getKey(),i?0:t.getChildrenSize(),"element"))}function Mr(n){const e=A(),t=N(e)?e:fl();return co(t,n),pe(t),t}function co(n,e){Et(n.anchor,e.anchor),Et(n.focus,e.focus)}function va(n){const{anchor:e,focus:t}=n,r=He(e,"next"),i=He(t,"next"),o=xi(r,i)<=0?"next":"previous";return Nt(sn(r,o),sn(i,o))}function Cn(n){const{direction:e,origin:t}=n,r=oe(t,xn(e)).getNodeAtCaret();return r?oe(r,e):ze(t.getParentOrThrow(),e)}function gc(n,e="root"){const t=[n];for(let r=Ue(n)?n.getParentCaret(e):n.getSiblingCaret();r!==null;r=r.getParentCaret(e))t.push(Cn(r));return t}function js(n){return!!n&&n.origin.isAttached()}function iy(n,e="removeEmptySlices"){if(n.isCollapsed())return n;const t="root",r="next";let i=e;const o=Al(n,r),s=gc(o.anchor,t),a=gc(o.focus.getFlipped(),t),l=new Set,u=[];for(const m of o.iterNodeCarets(t))if(Ue(m))l.add(m.origin.getKey());else if(At(m)){const{origin:p}=m;x(p)&&!l.has(p.getKey())||u.push(p)}const c=new Set;for(const m of u){const p=m.getParent();p===null||l.has(p.getKey())||c.add(p),Rt(m)}for(const m of c)!m.canBeEmpty()&&!xe(m)&&m.isEmpty()&&m.isAttached()&&m.remove();for(const m of o.getTextSlices()){if(!m)continue;const{origin:p}=m.caret,y=p.getTextContentSize(),_=Cn(oe(p,r)),b=p.getMode();if(Math.abs(m.distance)===y&&i==="removeEmptySlices"||b==="token"&&m.distance!==0)_.remove();else if(m.distance!==0){i="removeEmptySlices";let k=m.removeTextSlice();const S=m.caret.origin;if(b==="segmented"){const C=k.origin,w=we(C.getTextContent()).setStyle(C.getStyle()).setFormat(C.getFormat());_.replaceOrInsert(w),k=_n(w,r,k.offset)}S.is(s[0].origin)&&(s[0]=k),S.is(a[0].origin)&&(a[0]=k.getFlipped())}}let f,d;for(const m of s)if(js(m)){f=We(m);break}for(const m of a)if(js(m)){d=We(m);break}const h=(function(m,p,y){if(!m||!p)return null;const _=m.getParentAtCaret(),b=p.getParentAtCaret();if(!_||!b)return null;const k=_.getParents().reverse();k.push(_);const S=b.getParents().reverse();S.push(b);const C=Math.min(k.length,S.length);let w;for(w=0;w<C&&k[w]===S[w];w++);const v=(E,O)=>{let R;for(let L=w;L<E.length;L++){const J=E[L];if(xe(J))return;!R&&O(J)&&(R=J)}return R},T=v(k,Le),F=T&&v(S,E=>y.has(E.getKey())&&Le(E));return F&&bt(F).length>0?null:T&&F?[T,F]:null})(f,d,l);if(h){const[m,p]=h;ze(m,"previous").splice(0,p.getChildren());let y=p.getParent();for(p.remove(!0);y&&y.isEmpty();){const _=y;y=y.getParent(),_.remove(!0)}}else if(d){const m=(function(_){if(Ue(_)){const b=_.origin;if(Le(b))return b}else{const b=_.getParentAtCaret();if(b&&Le(b))return b}return null})(d),p=m&&m.getParent(),y=m&&m.getParents().findLast(ai);if(m&&p&&!Ne(p)&&m.isEmpty()&&l.has(m.getKey())&&bt(m).length===0&&(!y||l.has(y.getKey()))){m.remove(!0);let _=p;for(;_&&!Ne(_)&&_.isEmpty();){const b=_.getParent();if(b&&Ne(b)&&b.getChildrenSize()<=1)break;const k=_;_=b,k.remove(!0)}}}const g=[f,d,...s,...a].find(js);if(g)return Mi(sn(We(g),n.direction));D(269,JSON.stringify(s.map(m=>m.origin.__key)))}function We(n){const e=(function(i){let o=i;for(;Ue(o);){const s=Wn(o);if(!Ue(s))break;o=s}return o})(n.getLatest()),{direction:t}=e;if($(e.origin))return kt(e)?e:_n(e.origin,t,t);const r=e.getAdjacentCaret();return At(r)&&$(r.origin)?_n(r.origin,t,xn(t)):e}function gs(n){return kt(n)&&n.offset!==Bt(n.origin,n.direction)}function sn(n,e){return n.direction===e?n:n.getFlipped()}function Al(n,e){return n.direction===e?n:Nt(sn(n.focus,e),sn(n.anchor,e))}function Sa(n,e,t){let r=ze(n,"next");for(let i=0;i<e;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return sn(r,t)}function xh(n,e="root"){let t=0,r=n,i=Wn(r);for(;i===null;){if(t--,i=r.getParentCaret(e),!i)return null;r=i,i=Wn(r)}return i&&[i,t]}function oy(n){const{origin:e,offset:t,direction:r}=n;if(t===Bt(e,r))return n.getSiblingCaret();if(t===Bt(e,xn(r)))return Cn(n.getSiblingCaret());const[i]=e.splitText(t);return $(i)||D(281),sn(oe(i,"next"),r)}function sy(n,e){return!0}function Ch(n,{$copyElementNode:e=Be,$splitTextPointCaretNext:t=oy,rootMode:r="shadowRoot",$shouldSplit:i=sy,removeEmptyDestination:o=!1}={}){if(kt(n))return t(n);const s=n.getParentCaret(r);if(s){const{origin:a}=s;if(Ue(n)){const u=Cn(s);if(o&&a.isEmpty())return a.remove(),u;if(!a.canBeEmpty()||!i(a,"first"))return u}const l=(function(u){const c=[];for(let f=u.getAdjacentCaret();f;f=f.getAdjacentCaret())c.push(f.origin);return c})(n);(l.length>0||!o&&a.canBeEmpty()&&i(a,"last"))&&s.insert(e(a).splice(0,0,l))}return s}function ps(n,e,t){let r=sn(e,"next");kt(r)&&(r.offset===0?r=oe(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=oe(r.origin,"next"))),r.origin.is(n)&&(At(r)||D(342,n.getKey(),n.getType()),r=Cn(r)),(n.is(r.getNodeAtCaret())||n.is(r.getFlipped().getNodeAtCaret()))&&n.remove(!0);for(let i=r;i;i=Ch(i,t))r=i;return kt(r)&&D(283),r.insert(n.isInline()?Y().append(n):n),sn(oe(n.getLatest(),"next"),e.direction)}function zl(n,e){if(!e||n===e)return n;for(const t in e)if(n[t]!==e[t])return{...n,...e};return n}function nn(...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 Ee(n,...e){const t=nn(...e);t.length>0&&n.classList.add(...t)}function Kt(n,...e){const t=nn(...e);t.length>0&&n.classList.remove(...t)}function Je(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}function vh(n){const e=Ce().getElementByKey(n.getKey());if(e===null)return null;const t=e.ownerDocument.defaultView;return t===null?null:t.getComputedStyle(e)}function Sh(n){return vh(Ne(n)?n:n.getParentOrThrow())}function Wi(n){const e=Sh(n);return e!==null&&e.direction==="rtl"}function wh(n,e,t="self"){const r=n.getStartEndPoints();if(e.isSelected(n)&&!_t(e)&&r!==null){const[i,o]=r,s=n.isBackward(),a=i.getNode(),l=o.getNode(),u=e.is(a),c=e.is(l);if(u||c){const[f,d]=pa(n),h=a.is(l),g=e.is(s?l:a),m=e.is(s?a:l);let p,y=0;h?(y=f>d?d:f,p=f>d?f:d):g?(y=s?d:f,p=void 0):m&&(y=0,p=s?f:d);const _=e.__text.slice(y,p);_!==e.__text&&(t==="clone"&&(e=Wm(e)),e.__text=_)}}return e}function ay(n,e){const t=n.getFormatType(),r=n.getIndent();t!==e.getFormatType()&&e.setFormat(t),r!==e.getIndent()&&e.setIndent(r)}function ly(n,e,t){let r=He(n,t);if(gs(r))return!1;for(;r;r=r.getParentCaret()){const i=r.getParentAtCaret();if(!i||r.getNodeAtCaret())return!1;if(e.is(i))return!0}return!1}function uy(n,e,t=ay){if(!n)return;const r=n.getStartEndPoints();let i=!1,o=null;const s=new Map;if(r){const[a,l]=r,u=q(a.getNode(),Le);o=q(l.getNode(),Le);const c=n.isBackward()?"previous":"next";i=x(o)&&!o.is(u)&&(function(f,d,h){const g=f.getNode();return(!x(g)||!g.isEmpty())&&ly(f,d,h)})(l,o,xn(c)),x(u)&&s.set(u.getKey(),u),x(o)&&!i&&s.set(o.getKey(),o)}for(const a of n.getNodes())if(x(a)&&Le(a)){if(i&&a.is(o))continue;s.set(a.getKey(),a)}else if(!r){const l=q(a,Le);x(l)&&s.set(l.getKey(),l)}for(const a of s.values()){const l=e();t(a,l),a.replace(l,!0)}}function Th(n){const e=Eh(n);return e!==null&&e.writingMode==="vertical-rl"}function Eh(n){const e=n.anchor.getNode();return x(e)?vh(e):Sh(e)}function pc(n,e){let t=Th(n)?!e:e;Nh(n)&&(t=!t);const r=He(n.focus,t?"previous":"next");if(gs(r))return!1;if(kt(r)&&!Tr(r.origin)&&r.origin.isUnmergeable()){const i=r.getNodeAtCaret();if($(i)&&!Tr(i))return!0}for(const i of Or(r)){if(Ue(i))return!i.origin.isInline();if(!x(i.origin)){if(Q(i.origin))return!0;break}}return!1}function cy(n,e,t,r){n.modify(e?"extend":"move",t,r)}function Nh(n){const e=Eh(n);return e!==null&&e.direction==="rtl"}function mc(n,e,t){const r=Nh(n);let i;i=Th(n)||r?!t:t,cy(n,e,i,"character")}function fy(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function dy(n,e){return Array.from(hy(n))}function hy(n,e){return py("next",n)}function gy(n,e){const t=xh(oe(n,e));return t&&t[0]}function py(n,e,t){const r=me(),i=e||r,o=x(i)?ze(i,n):oe(i,n),s=my(i),a=gy(i,n);let l=s;return hs({hasNext:u=>u!==null,initial:o,map:u=>({depth:l,node:u.origin}),step:u=>{if(u.isSameNodeCaret(a))return null;Ue(u)&&l++;const c=xh(u);return!c||c[0].isSameNodeCaret(a)?null:(l+=c[1],c[0])}})}function my(n){let e=-1;for(let t=n;t!==null;t=t.getParent()??mt(t))e++;return e}function yy(n,e){let t=n;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function _y(n){const e=q(n,t=>x(t)&&!t.isInline());return x(e)||fy(4,n.__key),e}function by(n){const e=A()||lt();let t;if(N(e))t=He(e.focus,"next");else{if(e!=null){const s=e.getNodes(),a=s[s.length-1];a&&(t=oe(a,"next"))}t=t||ze(me(),"previous").getFlipped().insert(Y())}const r=ps(n,t),i=Wn(r),o=Ue(i)?We(i):r;return Mr(Mi(o)),n.getLatest()}function It(n,e){return n!==null&&Object.getPrototypeOf(n).constructor.name===e.name}function qi(n){let e=null;if(It(n,DragEvent)?e=n.dataTransfer:It(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];const t=e.types,r=t.includes("Files"),i=t.includes("text/html")||t.includes("text/plain");return[r,Array.from(e.files),i]}function yc(n){const e=A();if(!N(e))return!1;const t=new Set,r=e.getNodes();for(let i=0;i<r.length;i++){const o=r[i],s=o.getKey();if(t.has(s))continue;const a=q(o,u=>x(u)&&!u.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!t.has(l)&&(t.add(l),n(a))}return t.size>0}function ky(n,e){ze(n,"next").insert(e)}function Dh(n,e){return $h(n,e,null)}function $h(n,e,t){let r=!1;for(const i of Fh(n))e(i)?t!==null&&t(i):(r=!0,x(i)&&$h(i,e,t||(o=>i.insertAfter(o))),i.remove());return r}function Po(n,e){const t=[],r=Array.from(n).reverse();for(let i=r.pop();i!==void 0;i=r.pop())if(e(i))t.push(i);else if(x(i))for(const o of Fh(i))r.push(o);return t}function Fh(n){return xy(ze(n,"previous"))}function xy(n){return hs({hasNext:At,initial:n.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}const Cy=Symbol.for("preact-signals");function Ol(){if(zn>1)return void zn--;let n,e=!1;for(!(function(){let t=Io;for(Io=void 0;t!==void 0;)t.S.v===t.v&&(t.S.i=t.i),t=t.o})();li!==void 0;){let t=li;for(li=void 0,Lo++;t!==void 0;){const r=t.u;if(t.u=void 0,t.f&=-3,!(8&t.f)&&Ah(t))try{t.c()}catch(i){e||(n=i,e=!0)}t=r}}if(Lo=0,zn--,e)throw n}let he,li;function _c(n){const e=he;he=void 0;try{return n()}finally{he=e}}let Io,zn=0,Lo=0,bc=0,fo=0;function kc(n){if(he===void 0)return;let e=n.n;return e===void 0||e.t!==he?(e={i:0,S:n,p:he.s,n:void 0,t:he,e:void 0,x:void 0,r:e},he.s!==void 0&&(he.s.n=e),he.s=e,n.n=e,32&he.f&&n.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=he.s,e.n=void 0,he.s.n=e,he.s=e),e):void 0}function Ye(n,e){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function ji(n,e){return new Ye(n,e)}function Ah(n){for(let e=n.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function xc(n){for(let e=n.s;e!==void 0;e=e.n){const t=e.S.n;if(t!==void 0&&(e.r=t),e.S.n=e,e.i=-1,e.n===void 0){n.s=e;break}}}function zh(n){let e,t=n.s;for(;t!==void 0;){const r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}n.s=e}function Qn(n,e){Ye.call(this,void 0),this.x=n,this.s=void 0,this.g=fo-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function Oh(n){const e=n.m;if(n.m=void 0,typeof e=="function"){zn++;const t=he;he=void 0;try{e()}catch(r){throw n.f&=-2,n.f|=8,Ml(n),r}finally{he=t,Ol()}}}function Ml(n){for(let e=n.s;e!==void 0;e=e.n)e.S.U(e);n.x=void 0,n.s=void 0,Oh(n)}function vy(n){if(he!==this)throw new Error("Out-of-order effect");zh(this),he=n,this.f&=-2,8&this.f&&Ml(this),Ol()}function lr(n,e){this.x=n,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=e?.name}function jl(n,e){const t=new lr(n,e);try{t.c()}catch(i){throw t.d(),i}const r=t.d.bind(t);return r[Symbol.dispose]=r,r}function Sy(n,e={}){const t={};for(const r in n){const i=e[r],o=ji(i===void 0?n[r]:i);t[r]=o}return t}Ye.prototype.brand=Cy,Ye.prototype.h=function(){return!0},Ye.prototype.S=function(n){const e=this.t;e!==n&&n.e===void 0&&(n.x=e,this.t=n,e!==void 0?e.e=n:_c(()=>{var t;(t=this.W)==null||t.call(this)}))},Ye.prototype.U=function(n){if(this.t!==void 0){const e=n.e,t=n.x;e!==void 0&&(e.x=t,n.e=void 0),t!==void 0&&(t.e=e,n.x=void 0),n===this.t&&(this.t=t,t===void 0&&_c(()=>{var r;(r=this.Z)==null||r.call(this)}))}},Ye.prototype.subscribe=function(n){return jl(()=>{const e=this.value,t=he;he=void 0;try{n(e)}finally{he=t}},{name:"sub"})},Ye.prototype.valueOf=function(){return this.value},Ye.prototype.toString=function(){return this.value+""},Ye.prototype.toJSON=function(){return this.value},Ye.prototype.peek=function(){const n=he;he=void 0;try{return this.value}finally{he=n}},Object.defineProperty(Ye.prototype,"value",{get(){const n=kc(this);return n!==void 0&&(n.i=this.i),this.v},set(n){if(n!==this.v){if(Lo>100)throw new Error("Cycle detected");(function(e){zn!==0&&Lo===0&&e.l!==bc&&(e.l=bc,Io={S:e,v:e.v,i:e.i,o:Io})})(this),this.v=n,this.i++,fo++,zn++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Ol()}}}}),Qn.prototype=new Ye,Qn.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===fo))return!0;if(this.g=fo,this.f|=1,this.i>0&&!Ah(this))return this.f&=-2,!0;const n=he;try{xc(this),he=this;const e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return he=n,zh(this),this.f&=-2,!0},Qn.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}Ye.prototype.S.call(this,n)},Qn.prototype.U=function(n){if(this.t!==void 0&&(Ye.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Qn.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let n=this.t;n!==void 0;n=n.x)n.t.N()}},Object.defineProperty(Qn.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const n=kc(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}}),lr.prototype.c=function(){const n=this.S();try{if(8&this.f||this.x===void 0)return;const e=this.x();typeof e=="function"&&(this.m=e)}finally{n()}},lr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Oh(this),xc(this),zn++;const n=he;return he=this,vy.bind(this,n)},lr.prototype.N=function(){2&this.f||(this.f|=2,this.u=li,li=this)},lr.prototype.d=function(){this.f|=8,1&this.f||Ml(this)},lr.prototype.dispose=function(){this.d()};function wy(n){return(typeof n.nodes=="function"?n.nodes():n.nodes)||[]}function Ty(n,e){let t;return ji(n(),{unwatched(){t&&(t(),t=void 0)},watched(){this.value=n(),t=e(this)}})}function ke(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let Mh;try{Mh="0.49.0+prod.esm"}catch{}const Ey=Mh??'"<unknown>+source"',Ny=new Set(["__proto__","constructor","prototype"]);function jh(n,e){if(n&&e&&!Array.isArray(e)&&typeof n=="object"&&typeof e=="object"){const t=n,r=e;for(const i in r)!Ny.has(i)&&Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=jh(t[i],r[i]));return n}return e}const Rl=0,wa=1,Rh=2,Rs=3,Ui=4,er=5,Ps=6,Yr=7;function Is(n){return n.id===Rl}function Ph(n){return n.id===Rh}function Dy(n){return(function(e){return e.id===wa})(n)||ke(305,String(n.id),String(wa)),Object.assign(n,{id:Rh})}const $y=new Set;let Fy=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:Rl}}mergeConfigs(){let e=this.extension.config||{};const t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):zl;for(const r of this.configs)e=t(e,r);return e}init(e){const t=this.state;Ph(t)||ke(306,String(t.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(a,l,u){return Object.assign(a,{config:l,id:Rs,registerState:u})})(t,this.mergeConfigs(),r);let s;this.state=o,this.extension.init&&(s=this.extension.init(e,o.config,r)),this.state=(function(a,l,u){return Object.assign(a,{id:Ui,initResult:l,registerState:u})})(o,s,i)}build(e){const t=this.state;let r;t.id!==Ui&&ke(307,String(t.id),String(er)),this.extension.build&&(r=this.extension.build(e,t.config,t.registerState));const i={...t.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=(function(o,s,a){return Object.assign(o,{id:er,output:s,registerState:a})})(t,r,i)}register(e,t){this._signal=t;const r=this.state;r.id!==er&&ke(308,String(r.id),String(er));const i=this.extension.register&&this.extension.register(e,r.config,r.registerState);return this.state=(function(o){return Object.assign(o,{id:Ps})})(r),()=>{const o=this.state;o.id!==Yr&&ke(309,String(r.id),String(Yr)),this.state=(function(s){return Object.assign(s,{id:er})})(o),i&&i()}}afterRegistration(e){const t=this.state;let r;return t.id!==Ps&&ke(310,String(t.id),String(Ps)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=(function(i){return Object.assign(i,{id:Yr})})(t),r}getSignal(){return this._signal===void 0&&ke(311),this._signal}getInitResult(){this.extension.init===void 0&&ke(312,this.extension.name);const e=this.state;return(function(t){return t.id>=Ui})(e)||ke(313,String(e.id),String(Ui)),e.initResult}getInitPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return(function(t){return t.id>=Rs})(e)||ke(314,String(e.id),String(Rs)),{config:e.config}}getPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&ke(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&ke(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){const e=this.state;return(function(t){return t.id>=Yr})(e)||ke(316,String(e.id),String(Yr)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||$y}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([t])=>t)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(t){return t.id>=er})(e)||ke(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}};const Cc={tag:mr};function Ay(){const n=me();n.isEmpty()&&n.append(Y())}const zy={config:{setOptions:Cc,updateOptions:Cc},init:({$initialEditorState:n=Ay})=>({$initialEditorState:n,initialized:!1}),afterRegistration(n,{updateOptions:e,setOptions:t},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(bm(o))n.setEditorState(o,t);else if(typeof o=="function")n.update(()=>{o(n)},e);else if(o&&(typeof o=="string"||typeof o=="object")){const s=n.parseEditorState(o);n.setEditorState(s,t)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[ss,on,as,rs,ls]},vc=Symbol.for("@lexical/extension/LexicalBuilder");function Sc(){}function Oy(n){throw n}function Hi(n){return Array.isArray(n)?n:[n]}const Ls=Ey;let Ih=class ho{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=Ls,this.roots=e;for(const t of e)this.addExtension(t)}static fromExtensions(e){const t=[Hi(zy)];for(const r of e)t.push(Hi(r));return new ho(t)}static maybeFromEditor(e){const t=e[vc];return t&&(t.PACKAGE_VERSION!==Ls&&ke(292,t.PACKAGE_VERSION,Ls),t instanceof ho||ke(293)),t}static fromEditor(e){const t=ho.maybeFromEditor(e);return t===void 0&&ke(294),t}constructEditor(){const{$initialEditorState:e,onError:t,onWarn:r,...i}=this.buildCreateEditorArgs(),o=Object.assign(pl({...i,...t?{onError:s=>{t(s,o)}}:{},...r?{onWarn:s=>{r(s,o)}}:{}}),{[vc]:this});for(const s of this.sortedExtensionReps())s.build(o);return o}buildEditor(){let e=Sc;function t(){try{e()}finally{e=Sc}}const r=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=Je(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){const t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&ke(295,e.name),t}addEdge(e,t,r){const i=this.outgoingConfigEdges.get(e);i?i.set(t,r):this.outgoingConfigEdges.set(e,new Map([[t,r]]));const o=this.incomingEdges.get(t);o?o.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&ke(296);const t=Hi(e),[r]=t;typeof r.name!="string"&&ke(297,typeof r.name);let i=this.extensionNameMap.get(r.name);if(i!==void 0&&i.extension!==r&&ke(298,r.name),!i){i=new Fy(this,r),this.extensionNameMap.set(r.name,i);const o=this.conflicts.get(r.name);typeof o=="string"&&ke(299,r.name,o);for(const s of r.conflictsWith||[])this.extensionNameMap.has(s)&&ke(299,r.name,s),this.conflicts.set(s,r.name);for(const s of r.dependencies||[]){const a=Hi(s);this.addEdge(r.name,a[0].name,a.slice(1)),this.addExtension(a)}for(const[s,a]of r.peerDependencies||[])this.addEdge(r.name,s,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const e=[],t=(r,i)=>{let o=r.state;if(Ph(o))return;const s=r.extension.name;var a;Is(o)||ke(300,s,i||"[unknown]"),Is(a=o)||ke(304,String(a.id),String(Rl)),o=Object.assign(a,{id:wa}),r.state=o;const l=this.outgoingConfigEdges.get(s);if(l)for(const u of l.keys()){const c=this.extensionNameMap.get(u);c&&t(c,s)}o=Dy(o),r.state=o,e.push(r)};for(const r of this.extensionNameMap.values())Is(r.state)&&t(r);for(const r of e)for(const[i,o]of this.outgoingConfigEdges.get(r.extension.name)||[])if(o.length>0){const s=this.extensionNameMap.get(i);if(s)for(const a of o)s.configs.add(a)}for(const[r,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(r.name);o===void 0&&ke(301,r.name);for(const s of i)o.configs.add(s)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const t=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],o=r.signal;for(const s of t){const a=s.register(e,o);a&&i.push(a)}for(const s of t){const a=s.afterRegistration(e);a&&i.push(a)}return Je(...i)}buildCreateEditorArgs(){const e={},t=new Set,r=new Map,i=new Map,o={},s={},a=this.sortedExtensionReps();for(const c of a){const{extension:f}=c;if(f.onError!==void 0&&(e.onError=f.onError),f.onWarn!==void 0&&(e.onWarn=f.onWarn),f.disableEvents!==void 0&&(e.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(e.parentEditor=f.parentEditor),f.editable!==void 0&&(e.editable=f.editable),f.namespace!==void 0&&(e.namespace=f.namespace),f.$initialEditorState!==void 0&&(e.$initialEditorState=f.$initialEditorState),f.nodes)for(const d of wy(f)){if(typeof d!="function"){const h=r.get(d.replace);h&&ke(302,f.name,d.replace.name,h.extension.name),r.set(d.replace,c)}t.add(d)}if(f.html){if(f.html.export)for(const[d,h]of f.html.export.entries())i.set(d,h);f.html.import&&Object.assign(o,f.html.import)}f.theme&&jh(s,f.theme)}Object.keys(s).length>0&&(e.theme=s),t.size&&(e.nodes=[...t]);const l=Object.keys(o).length>0,u=i.size>0;(l||u)&&(e.html={},l&&(e.html.import=o),u&&(e.html.export=i));for(const c of a)c.init(e);return e.onError||(e.onError=Oy),e}};function Br(n,e){const t=Ih.maybeFromEditor(n);if(!t)return;const r=t.extensionNameMap.get(e);return r?r.getExtensionDependency():void 0}function My(n){return Br(Ce(),n)}let Pl=class extends dl{$config(){return this.config("horizontalrule",{importDOM:{hr:()=>({conversion:jy,priority:0})}})}exportDOM(){return{element:re().createElement("hr")}}createDOM(e){const t=re().createElement("hr");return Ee(t,e.theme.hr),t}getTextContent(){return`
|
|
12
|
+
`}isInline(){return!1}updateDOM(){return!1}};function jy(){return{node:Lh()}}function Lh(){return gh(Pl)}function Kr(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let br;function Bh(n,e){const{key:t}=e;return n&&t in n?n[t]:e.defaultValue}function Kh(n){return br&&br.editor===n?br:void 0}function Ry(n,e){if("cfg"in e){const{cfg:t,updater:r}=e;return[t,r(Bh(n,t))]}return e}function Py(n,e){let t=e;for(const r of n){const[i,o]=Ry(t,r),s=i.key;if(t===e&&Bh(t,i)===o)continue;const a=t===e||t===void 0?Iy(e):t;a[s]=o,t=a}return t}function Iy(n){return Object.create(n||null)}function Bo(n,e){return[n,e]}function Ly(n,e,t,r=Ce()){const i=br,o=Kh(r);try{return br={...o,editor:r,[n]:e},t()}finally{br=i}}function By(n,e=()=>{}){return(t,r=Ce())=>i=>{const o=Kh(r),s=o&&o[n],a=Py(t,s||e(r));return a&&a!==s?Ly(n,a,i,r):i()}}function Wh(n,e,t,r){return Object.assign(Ni(Symbol(e),{isEqual:r,parse:t}),{[n]:!0})}function Ky(n){if(!kn(n))return;const e=n;if(e.querySelector("style")===null)return;const t=new Map;function r(i){let o=t.get(i);if(o===void 0){o=new Set;for(let s=0;s<i.style.length;s++)o.add(i.style[s]);t.set(i,o)}return o}try{for(const i of Array.from(e.styleSheets)){let o;try{o=i.cssRules}catch{continue}for(const s of Array.from(o)){if(!It(s,CSSStyleRule))continue;let a;try{a=e.querySelectorAll(s.selectorText)}catch{continue}for(const l of Array.from(a)){if(!K(l))continue;const u=r(l);for(let c=0;c<s.style.length;c++){const f=s.style[c];u.has(f)||l.style.setProperty(f,s.style.getPropertyValue(f),s.style.getPropertyPriority(f))}}}}}catch{}}const qh="@lexical/html/DOM",Uh=Symbol.for("@lexical/html/DOMExportContext"),Wy=Symbol.for("@lexical/html/DOMImportContext");function qy(n,e,t){return Wh(Uh,n,e,t)}const Uy=qy("isExport",Boolean);function Hy(n){const e=Br(n,qh);return e?e.output.defaults:void 0}function Jy(n){const e=Br(n,qh);return e?e.output.runtime:void 0}function Vy(n=Ce()){const e=Jy(n);return e?e.getSessionConfig():cs(n)}const Yy=By(Uh,Hy),ms=Symbol.for("@lexical/html/SelectorImpl");function Ci(n,e){const t={kind:"element",predicate:(r=e,r.length===0?K:r.length===1?r[0]:(o,s)=>{for(const a of r)if(!a(o,s))return!1;return!0}),tags:n};var r;const i=o=>Ci(n,[...e,o]);return{[ms]:t,attr:(o,s,a)=>i(Ta(o,s,a)),classAll:(...o)=>i(Jh(o)),classAny:(...o)=>i((function(s){const a=Hh(s);return a.length===0?()=>!1:l=>{if(!K(l))return!1;const u=l.classList;for(const c of a)if(u.contains(c))return!0;return!1}})(o)),styleAny:(o,s,a)=>i((function(l,u,c){if(typeof u=="string")return f=>K(f)&&f.style.getPropertyValue(l)===u;if(u instanceof RegExp){const f=c&&c.capture,d=u;return(h,g)=>{if(!K(h))return!1;const m=h.style.getPropertyValue(l);if(!m)return!1;const p=m.match(d);return p!==null&&(f!==void 0&&(g[f]=p),!0)}}Kr(362,JSON.stringify(l))})(o,s,a))}}function Hh(n){const e=[];for(const t of n)t&&e.push(t);return e}function Jh(n){const e=Hh(n);return e.length===0?()=>!0:t=>{if(!K(t))return!1;const r=t.classList;for(const i of e)if(!r.contains(i))return!1;return!0}}function Ta(n,e,t){if(e===!0)return r=>K(r)&&r.hasAttribute(n);if(typeof e=="string")return r=>K(r)&&r.getAttribute(n)===e;if(e instanceof RegExp){const r=t&&t.capture,i=e;return(o,s)=>{if(!K(o))return!1;const a=o.getAttribute(n);if(a==null)return!1;const l=a.match(i);return l!==null&&(r!==void 0&&(s[r]=l),!0)}}Kr(361,JSON.stringify(n))}const Xy={kind:"text",predicate:it,tags:new Set},Gy={[ms]:Xy},Zy={kind:"comment",predicate:n=>n.nodeType===8,tags:new Set},Qy={[ms]:Zy},fr={any:()=>Ci(new Set,[]),comment:()=>Qy,tag(...n){n.length>0||Kr(363);const e=new Set;for(const t of n)e.add(t.toUpperCase());return Ci(e,[])},text:()=>Gy};function Vh(n,e){return K(n)&&n.nodeName===e.toUpperCase()}const Yh=/[A-Za-z0-9_-]/;class e_{constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const e=this.pos;for(;!this.eof()&&Yh.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){const e=this.consume();this.assert(e==='"'||e==="'","expected quote");const t=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()==="\\"?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const r=this.source.slice(t,this.pos);return this.pos++,r.replace(/\\(.)/g,"$1")}assert(e,t){e||Kr(364,String(this.pos+1),t,this.source)}}function t_(n){const e=new Set,t=[],r=[];if(n.skipWhitespace(),n.peek()==="*")n.consume();else if(Yh.test(n.peek())){const i=n.readIdent();i&&e.add(i.toUpperCase())}for(;!n.eof();){const i=n.peek();if(i==="."){n.consume();const o=n.readIdent();n.assert(o!=="",'expected class name after "."'),r.push(o)}else if(i==="#"){n.consume();const o=n.readIdent();n.assert(o!=="",'expected id after "#"'),t.push(Ta("id",o))}else{if(i!=="[")break;{n.consume(),n.skipWhitespace();const o=n.readIdent();n.assert(o!=="",'expected attribute name after "["'),n.skipWhitespace();let s=!0;if(n.peek()==="="){n.consume(),n.skipWhitespace();const a=n.peek();a==='"'||a==="'"?s=n.readQuoted():(s=n.readIdent(),n.assert(s!=="","expected attribute value")),n.skipWhitespace()}n.assert(n.peek()==="]",'expected "]"'),n.consume(),t.push(Ta(o,s))}}}return r.length>0&&t.push(Jh(r)),{predicates:t,tags:e}}function n_(n){const e=new e_(n,0),t=[];for(;;){const i=t_(e);if(t.push(i),e.skipWhitespace(),e.eof())break;e.assert(e.peek()===",",'expected "," (selector lists are the only supported combinator)'),e.consume(),e.skipWhitespace()}if(t.length===1)return Ci(t[0].tags,t[0].predicates);const r=new Set;if(t.every(i=>i.tags.size>0))for(const i of t)for(const o of i.tags)r.add(o);return Ci(r,[(i,o)=>{for(const s of t){const a=i.nodeName;if(s.tags.size>0&&!s.tags.has(a))continue;let l=!0;for(const u of s.predicates)if(!u(i,o)){l=!1;break}if(l)return!0}return!1}])}function Il(n,e,t){return Wh(Wy,n,e,t)}const vi=Il("textFormat",()=>0),Ea=Il("textStyle",()=>({}));function r_(n){if(!K(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function i_(n){if(it(n))return!0;if(!K(n))return!1;const e=n.style.display;return e?e.startsWith("inline"):!zr(n)&&Oo(n)}const o_=Il("whitespaceConfig",()=>({isInline:i_,preservesWhitespace:r_}));function Ll(n){return Er(n)||Q(n)&&!n.isInline()}function Xh(n,e){const t=[];let r=[];const i=()=>{r.length!==0&&(t.push(e().splice(0,0,r)),r=[])};for(const o of n)if(Ll(o)){if(i(),x(o)){const s=Xh(o.getChildren(),e);o.splice(0,o.getChildrenSize(),s)}t.push(o)}else r.push(o);return i(),t}function Bl(n,e){if(!K(e))return n;const t=e.style.textAlign;if(!Kl(t))return n;for(const r of n)Er(r)&&r.getFormatType()===""&&r.setFormat(t);return n}function s_(n,e,t){n.length===1&&Pe(n[0])&&(n=[]);const r=Y();if(K(t)){const i=t.style.textAlign;Kl(i)&&r.setFormat(i)}return[r.splice(0,0,n)]}const Gh={$accepts:Ll,$packageRun:s_,name:"BlockSchema"},Xn=fr,a_=new Set(["center","end","justify","left","right","start"]);function Kl(n){return a_.has(n)}const l_={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},u_={CODE:hp,MARK:Za},c_=new Set(["font-weight","font-style","text-decoration","vertical-align"]),f_={$import:(n,e)=>{const t=n.get(vi),r=l_[e.nodeName],i=(function(d){return{fontStyle:d.style.fontStyle,fontWeight:d.style.fontWeight,textDecoration:d.style.textDecoration,verticalAlign:d.style.verticalAlign}})(e),o=r?(s=r,{fontStyle:(a=i).fontStyle||s.fontStyle,fontWeight:a.fontWeight||s.fontWeight,textDecoration:a.textDecoration||s.textDecoration,verticalAlign:a.verticalAlign||s.verticalAlign}):i;var s,a;let l=(u=t,c=(function(d){let h=0,g=0;const{fontWeight:m,fontStyle:p,textDecoration:y,verticalAlign:_}=d;if(m==="700"||m==="bold"?h|=Ys:m!=="normal"&&m!=="400"||(g|=Ys),p==="italic"?h|=Xs:p==="normal"&&(g|=Xs),y){const b=y.split(" ");b.includes("underline")&&(h|=Zs),b.includes("line-through")&&(h|=Gs),b.includes("none")&&(g|=Zs|Gs)}return _==="sub"?(h|=vs,g|=Ss):_==="super"?(h|=Ss,g|=vs):_==="baseline"&&(g|=vs|Ss),{clear:g,set:h}})(o),u&~c.clear|c.set);var u,c;const f=u_[e.nodeName];return f&&(l|=f),l===t?n.$importChildren(e):n.$importChildren(e,{context:[Bo(vi,l)]})},match:Xn.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function wc(n,e,t){let r=n;for(;;){let i=null;for(;(i=e?r.nextSibling:r.previousSibling)===null;){const s=r.parentNode;if(s===null)return null;r=s}if(r=i,!t.isInline(r))return null;let o=r;for(;(o=e?r.firstChild:r.lastChild)!==null;)r=o;if(it(r))return r;if(r.nodeName==="BR")return null}}function Tc(n,e){return e!==0&&$(n)?n.setFormat(e):n}function Ec(n,e){if($(n)){const t=(function(r){let i="";for(const o in r)c_.has(o)||(i+=`${o}: ${r[o]}; `);return i.trimEnd()})(e);t!==""&&n.setStyle(t)}return n}const d_={$import:(n,e)=>{const t=n.get(vi),r=n.get(Ea),i=n.get(o_);if((function(a,l){let u=a.parentNode;for(;u!==null;){if(l.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(e,i)){const a=yi(e.textContent||"");for(const l of a)Tc(l,t),Ec(l,r);return a}const o=(function(a,l){let u=(a.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(u.length===0)return"";if(u[0]===" "){let c=a,f=!0;for(;c!==null&&(c=wc(c,!1,l))!==null;){const d=c.textContent||"";if(d.length>0){/[ \t\n]$/.test(d)&&(u=u.slice(1)),f=!1;break}}f&&(u=u.slice(1))}if(u.length>0&&u[u.length-1]===" "){let c=a,f=!0;for(;c!==null&&(c=wc(c,!0,l))!==null;)if((c.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){f=!1;break}f&&(u=u.slice(0,-1))}return u})(e,i);if(o==="")return[];const s=we(o);return Tc(s,t),Ec(s,r),[s]},match:Xn.text(),name:"@lexical/html/#text"},h_={$import:()=>[],match:Xn.tag("script","style"),name:"@lexical/html/script-style-ignore"},g_={$import:(n,e)=>Ud(e)||Hd(e)?[]:[Wt()],match:Xn.tag("br"),name:"@lexical/html/br"},p_={$import:(n,e)=>{const t=Y();if(Jt(t,e),Yn(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&Kl(r)&&t.setFormat(r)}return Ct(t,e),[t.splice(0,0,n.$importChildren(e))]},match:Xn.tag("p"),name:"@lexical/html/p"},m_={$import:(n,e,t)=>Ce().hasNode(Pl)?[Lh()]:t(),match:Xn.tag("hr"),name:"@lexical/html/hr"};Xn.any();function y_(n,e){const t=[];let r=0,i=0;for(;r<n.length&&i<e.length;)n[r]<=e[i]?t.push(n[r++]):t.push(e[i++]);for(;r<n.length;)t.push(n[r++]);for(;i<e.length;)t.push(e[i++]);return t}function __(n){const e=[],t=new Map,r=[],i=[],o=[],s=new Set;n.forEach((l,u)=>{const c=(function(d){const h=d[ms];return h===void 0&&Kr(360),h})(l.match),f=l.name||(function(d,h){return d.kind==="text"?`#text@${h}`:d.kind==="comment"?`#comment@${h}`:d.tags.size===0?`*@${h}`:`${Array.from(d.tags).join(",").toLowerCase()}@${h}`})(c,u);if(l.name&&s.add(l.name),e.push({$import:l.$import,name:f,predicate:c.predicate}),c.kind==="text")i.push(u);else if(c.kind==="comment")o.push(u);else if(c.tags.size===0)r.push(u);else for(const d of c.tags){let h=t.get(d);h||(h=[],t.set(d,h)),h.push(u)}});const a=new Map;if(r.length===0)for(const[l,u]of t)a.set(l,u);else for(const[l,u]of t)a.set(l,y_(u,r));return{byTag:a,commentIndices:o,rules:e,textIndices:i,wildcardIndices:r}}function b_(n){const e=[];for(const t of n)if(k_(t))for(const r of t.rules)e.push(r);else e.push(t);return e}function k_(n){return typeof n=="object"&&n!==null&&"__type"in n&&n.__type==="CompiledOverlayRules"}function Zh(n){const e=b_(n);return{__type:"CompiledOverlayRules",dispatch:__(e),rules:e}}fr.any();const $e={any:fr.any,comment:fr.comment,css:n_,tag:fr.tag,text:fr.text},Qh=new Set(["STYLE","SCRIPT"]);function eg(n,e){Ky(e);const t=kn(e)?e.body.childNodes:e.childNodes,r=[],i=[];for(const o of t)if(!Qh.has(o.nodeName)){const s=ng(o,n,i,!1);if(s!==null)for(const a of s)r.push(a)}return(function(o){for(const s of o)s.getParent()&&s.getNextSibling()instanceof gl&&s.insertAfter(Wt());for(const s of o){const a=s.getParent();a&&a.splice(s.getIndexWithinParent(),1,s.getChildren())}})(i),r}function x_(n,e=null,t=Ce()){return Yy([Bo(Uy,!0)],t)(()=>{const r=me(),i=Vy(t),o=N(e)?fs(e.anchor.getNode()):null,s=n.append.bind(n);for(const a of(x(o)?o:r).getChildren())tg(t,a,s,e,i);return n})}function Wl(n,e=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&Kr(338),mm(n),x_(re().createElement("div"),e,n).innerHTML}function tg(n,e,t,r=null,i=cs(n)){let o=i.$shouldInclude(e,r,n);const s=i.$shouldExclude(e,r,n);let a=e;r!==null&&$(e)&&(a=wh(r,e,"clone"));const l=i.$exportDOM(a,n),{element:u,after:c,append:f,$getChildNodes:d}=l;if(!u)return!1;const h=re().createDocumentFragment(),g=d?d():x(a)?a.getChildren():[],m=o&&de(r)&&x(e)?null:r,p=h.append.bind(h);for(const y of g){const _=tg(n,y,p,m,i);!o&&_&&i.$extractWithChild(e,y,r,"html",n)&&(o=!0)}if(o&&!s){if((K(u)||ka(u))&&(f?f(h):u.append(h)),t(u),c){const y=c.call(a,u);y&&(ka(u)?u.replaceChildren(y):u.replaceWith(y))}}else t(h);return o}function ng(n,e,t,r,i=new Map,o){const s=[];if(Qh.has(n.nodeName))return s;let a=null;const l=(function(g,m){const{nodeName:p}=g,y=m._htmlConversions.get(p.toLowerCase());let _=null;if(y!==void 0)for(const b of y){const k=b(g);k!==null&&(_===null||(_.priority||0)<=(k.priority||0))&&(_=k)}return _!==null?_.conversion:null})(n,e),u=l?l(n):null;let c=null;if(u!==null){c=u.after;const g=u.node;if(a=Array.isArray(g)?g[g.length-1]:g,a!==null){for(const[,m]of i)if(a=m(a,o),!a)break;a&&s.push(...Array.isArray(g)?g:[a])}u.forChild!=null&&i.set(n.nodeName,u.forChild)}const f=n.childNodes;let d=[];const h=(a==null||!xe(a))&&(a!=null&&Er(a)||r);for(let g=0;g<f.length;g++)d.push(...ng(f[g],e,t,h,new Map(i),a));if(c!=null&&(d=c(d)),zr(n)&&(d=C_(n,d,h?()=>{const g=new gl;return t.push(g),g}:Y)),a==null)if(d.length>0)for(const g of d)s.push(g);else zr(n)&&(function(g){return g.nextSibling==null||g.previousSibling==null?!1:Oo(g.nextSibling)&&Oo(g.previousSibling)})(n)&&s.push(Wt());else x(a)&&a.append(...d);return s}function C_(n,e,t){const r=n.style.textAlign,i=[];let o=[];for(let s=0;s<e.length;s++){const a=e[s];if(Er(a))r&&!a.getFormat()&&a.setFormat(r),i.push(a);else if(o.push(a),s===e.length-1||s<e.length-1&&Er(e[s+1])){const l=t();l.setFormat(r),l.append(...o),i.push(l),o=[]}}return i}function v_(n,e){let t=n;for(let r=oe(n,e);r&&(ig(r.origin)||Tr(r.origin));r=r.getAdjacentCaret())t=r.origin;return t}function S_(n){return v_(n,"previous")}function rg(n,e){for(const t of n.childNodes)if(K(t)&&t.tagName===e||rg(t,e))return!0;return!1}const ei="data-language",Xr="data-highlight-language",Ji="data-theme";let ys=class extends ve{__language;__theme;__isSyntaxHighlightSupported;$config(){return this.config("code",{extends:ve,importDOM:{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||rg(e,"BR"))?{conversion:Nc,priority:1}:null,div:()=>({conversion:w_,priority:1}),pre:()=>({conversion:Nc,priority:0}),table:e=>Bs(e)?{conversion:T_,priority:3}:null,td:e=>{const t=e,r=t.closest("table");return t.classList.contains("js-file-line")||r&&Bs(r)?{conversion:Dc,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&Bs(t)?{conversion:Dc,priority:3}:null}}})}constructor(e=void 0,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){const t=re().createElement("code");Ee(t,e.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(t.setAttribute(ei,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Xr,r));const i=this.getTheme();i&&t.setAttribute(Ji,i);const o=this.getStyle();return o&&gn(t.style,o),t}updateDOM(e,t,r){const i=this.__language,o=e.__language;i?i!==o&&t.setAttribute(ei,i):o&&t.removeAttribute(ei);const s=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&o?s&&i?i!==o&&t.setAttribute(Xr,i):t.removeAttribute(Xr):s&&i&&t.setAttribute(Xr,i);const a=this.__theme,l=e.__theme;a?a!==l&&t.setAttribute(Ji,a):l&&t.removeAttribute(Ji);const u=this.__style,c=e.__style;return u!==c&&gn(t.style,u,c),!1}exportDOM(e){const t=re().createElement("pre");Ee(t,e._config.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(t.setAttribute(ei,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Xr,r));const i=this.getTheme();i&&t.setAttribute(Ji,i);const o=this.getStyle();return o&&gn(t.style,o),{element:t}}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,t=!0){if(!Br(Ce(),"@lexical/code")){const s=E_(e);if(s)return s}const{anchor:r,focus:i}=e,o=(r.isBefore(i)?r:i).getNode();if($(o)){let s=S_(o);const a=[];for(;;)if(Tr(s))a.push(Fi()),s=s.getNextSibling();else{if(!ig(s))break;{let g=0;const m=s.getTextContent(),p=s.getTextContentSize();for(;g<p&&m[g]===" ";)g++;if(g!==0&&a.push(N_(" ".repeat(g))),g!==p)break;s=s.getNextSibling()}}const l=o.splitText(r.offset)[0],u=r.offset===0?0:1,c=l.getIndexWithinParent()+u,f=o.getParentOrThrow(),d=[Wt(),...a];f.splice(c,0,d);const h=a[a.length-1];h?h.select():r.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(ql(o)){const{offset:s}=e.anchor;o.splice(s,0,[Wt()]),o.select(s+1,s+1)}return null}canIndent(){return!1}collapseAtStart(){const e=Y();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}setLanguage(e){const t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}};function et(n,e){return gh(ys).setLanguage(n).setTheme(e)}function ql(n){return n instanceof ys}function Nc(n){return{node:et(n.getAttribute(ei))}}function w_(n){const e=n,t=$c(e);return t||(function(r){let i=r.parentElement;for(;i!==null;){if($c(i))return!0;i=i.parentElement}return!1})(e)?{node:t?et():null}:{node:null}}function T_(){return{node:et()}}function Dc(){return{node:null}}function $c(n){return n.style.fontFamily.match("monospace")!==null}function Bs(n){return n.classList.contains("js-file-line-container")}function E_(n){const{anchor:e}=n;if(n.isCollapsed()&&e.type==="element"){const t=e.getNode();if(ql(t)){const r=t.getChildrenSize();if(r>=2&&e.offset===r){const i=t.getLastChild();if(Pe(i)&&Pe(i.getPreviousSibling())){const o=Y();return t.splice(r-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}class Ul extends on{__highlightType;constructor(e="",t,r){super(e,r),this.__highlightType=t}$config(){return this.config("code-highlight",{extends:on})}afterCloneFrom(e){super.afterCloneFrom(e),this.__highlightType=e.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){const t=super.createDOM(e),r=Ks(e.theme,this.__highlightType);return Ee(t,r),t}updateDOM(e,t,r){const i=super.updateDOM(e,t,r),o=Ks(r.theme,e.__highlightType),s=Ks(r.theme,this.__highlightType);return o!==s&&(o&&Kt(t,o),s&&Ee(t,s)),i}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return et()}}function Ks(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function N_(n="",e){return Ge(new Ul(n,e))}function ig(n){return n instanceof Ul}const og="data-language";function sg(n){return n.style.fontFamily.match("monospace")!==null}function Na(n){let e=n.parentElement;for(;e!==null;){if(sg(e))return!0;e=e.parentElement}return!1}const D_=Zh([{$import:(n,e)=>n.$importChildren(e),match:$e.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),$_={$import:(n,e)=>[et(e.getAttribute(og)).splice(0,0,n.$importChildren(e))],match:$e.tag("pre"),name:"@lexical/code/pre"},F_={$import:(n,e,t)=>{const r=e.textContent||"";return/\r?\n/.test(r)||e.querySelector("br")!==null?[et(e.getAttribute(og)).splice(0,0,n.$importChildren(e))]:t()},match:$e.tag("code"),name:"@lexical/code/code-multiline"};function Vi(n){if(!K(n))return!1;const e=n.style.fontFamily,t=n.style.whiteSpace;return typeof e=="string"&&/monospace/i.test(e)&&typeof t=="string"&&t.startsWith("pre")}function A_(n){let e=!1;const t=[];let r="",i=!1;const o=()=>{i&&(t.push(r),r="",i=!1)};for(const s of Array.from(n.childNodes))if(K(s))s.tagName==="DIV"?(o(),t.push(s.textContent||""),e=!0):s.tagName==="BR"?(o(),t.push(""),e=!0):(r+=s.textContent||"",i=!0);else if(it(s)){const a=s.textContent||"";a.length>0&&(r+=a,i=!0)}return o(),e?t:null}$e.tag("div"),$e.tag("div","br");const z_={$import:(n,e,t)=>sg(e)?[et().splice(0,0,n.$importChildren(e))]:Na(e)?n.$importChildren(e):t(),match:$e.tag("div"),name:"@lexical/code/div"};$e.tag("table").classAll("js-file-line-container"),$e.tag("td").classAll("js-file-line");const Fc=new Set(["http:","https:","mailto:","sms:","tel:"]);let bn=class extends ve{__url;__target;__rel;__title;$config(){return this.config("link",{extends:ve,importDOM:{a:()=>({conversion:M_,priority:1})}})}constructor(e="",t={},r){super(r);const{target:i=null,rel:o=null,title:s=null}=t;this.__url=e,this.__target=i,this.__rel=o,this.__title=s}afterCloneFrom(e){super.afterCloneFrom(e),this.__url=e.__url,this.__rel=e.__rel,this.__target=e.__target,this.__title=e.__title}createDOM(e){const t=re().createElement("a");return this.updateLinkDOM(null,t,e),Ee(t,e.theme.link),t}updateLinkDOM(e,t,r){if(fh(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,s=this[o];e&&e[o]===s||(s?t[i]=s:t.removeAttribute(i))}}}updateDOM(e,t,r){return this.updateLinkDOM(e,t,r),!1}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){const t=e;e=Mc(e);try{const r=new URL(Mc(e));if(!Fc.has(r.protocol))return"about:blank"}catch{const i=t.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(i!=null&&!Fc.has(`${i[1].toLowerCase()}:`))return"about:blank"}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){const t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){const t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){const t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){const t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){const r=Be(this);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 i=t.anchor.getNode(),o=t.focus.getNode();return(this.is(i)||this.isParentOf(i))&&(this.is(o)||this.isParentOf(o))&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(e){return this.getType()===e.getType()&&this.__url===e.__url&&this.__target===e.__target&&this.__rel===e.__rel&&this.__title===e.__title}};function Ac(n){const e=He(n,"next");return[e,e.getFlipped()]}function zc(n,e){for(const t of e)if(t.origin.isAttached()){const r=We(t);return void Et(n,r)}}function O_(n){const e=A();let t=null,r=null;function i(){N(e)&&(zc(e.anchor,t),zc(e.focus,r),Ot(e))}N(e)&&(t=Ac(e.anchor),r=Ac(e.focus));let o=!1;for(const a of ze(n,"next")){const l=a.origin;if(x(l)&&!l.isInline()){const u=l.getChildren();if(u.length>0){const c=Be(n);c.append(...u),l.append(c),o=!0}ps(l,Cn(a),{$shouldSplit:()=>!1})}}function s(a,l,u){const[c,f]=a,d=g=>At(g)&&g.origin.is(l);if(!d(c)&&!d(f))return a;const h=We(ze(u,"next"));return[h,h.getFlipped()]}if(n.isAttached()){const a=n.getPreviousSibling();if(Ze(a)&&a.shouldMergeAdjacentLink(n))return t&&(t=s(t,a,n)),r&&(r=s(r,a,n)),a.append(...n.getChildren()),n.remove(),void i();const l=n.getNextSibling();Ze(l)&&n.shouldMergeAdjacentLink(l)&&(t&&(t=s(t,n,l)),r&&(r=s(r,n,l)),n.append(...l.getChildren()),l.remove(),o=!0)}if(o){if(!n.canBeEmpty()&&n.isEmpty()){const a=n.getParent();n.remove(),a&&a.isEmpty()&&a.remove()}i()}}function M_(n){let e=null;if(fh(n)){const t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=Si(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function Si(n="",e){return Ge(new bn(n,e))}function Ze(n){return n instanceof bn}let Hl=class extends bn{__isUnlinked;constructor(e="",t={},r){super(e,t,r),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}afterCloneFrom(e){super.afterCloneFrom(e),this.__isUnlinked=e.__isUnlinked}$config(){return this.config("autolink",{extends:bn})}shouldMergeAdjacentLink(e){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?re().createElement("span"):super.createDOM(e)}updateDOM(e,t,r){return super.updateDOM(e,t,r)||e.__isUnlinked!==this.__isUnlinked}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){const r=j_(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}};function j_(n="",e){return Ge(new Hl(n,e))}function ur(n){return n instanceof Hl}const Da=B("TOGGLE_LINK_COMMAND");function Oc(n,e){if(n.type==="element"){const t=n.getNode();return x(t)||(function(r,...i){const o=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const a of i)s.append("v",a);throw o.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),t.getChildren()[n.offset+e]||null}return null}function Ws(n,e={}){let t;if(n&&typeof n=="object"){const{url:c,...f}=n;t=c,e={...f,...e}}else t=n;const{target:r,title:i}=e,o=e.rel===void 0?"noreferrer":e.rel,s=A();if(s===null||!N(s)&&!de(s))return;if(de(s)){const c=s.getNodes();return c.length===0?void 0:void c.forEach(f=>{if(t===null){const d=q(f,h=>!ur(h)&&Ze(h));d&&(d.insertBefore(f),d.getChildren().length===0&&d.remove())}else{const d=q(f,h=>!ur(h)&&Ze(h));if(d)d.setURL(t),r!==void 0&&d.setTarget(r),o!==void 0&&d.setRel(o);else{const h=Si(t,{rel:o,target:r});f.insertBefore(h),h.append(f)}}})}if(s.isCollapsed()&&t===null)for(const c of s.getNodes()){const f=q(c,d=>!ur(d)&&Ze(d));return void(f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove()))}const a=s.extract();if(t===null){const c=new Set;return void a.forEach(f=>{const d=q(f,h=>!ur(h)&&Ze(h));if(d!==null){const h=d.getKey();if(c.has(h))return;(function(g,m){const p=new Set(m.filter(v=>g.isParentOf(v)).map(v=>v.getKey())),y=g.getChildren(),_=v=>p.has(v.getKey())||x(v)&&m.some(T=>g.isParentOf(T)&&v.isParentOf(T)),b=y.filter(_);if(b.length===y.length)return y.forEach(v=>g.insertBefore(v)),void g.remove();const k=y.findIndex(_),S=y.findLastIndex(_),C=k===0,w=S===y.length-1;if(C)b.forEach(v=>g.insertBefore(v));else if(w)for(let v=b.length-1;v>=0;v--)g.insertAfter(b[v]);else{for(let T=b.length-1;T>=0;T--)g.insertAfter(b[T]);const v=y.slice(S+1);if(v.length>0){const T=Be(g);b[b.length-1].insertAfter(T),v.forEach(F=>T.append(F))}}})(d,a),c.add(h)}})}const l=new Set,u=c=>{l.has(c.getKey())||(l.add(c.getKey()),c.setURL(t),r!==void 0&&c.setTarget(r),o!==void 0&&c.setRel(o),i!==void 0&&c.setTitle(i))};if(a.length===1){const c=a[0],f=q(c,Ze);if(f!==null)return u(f)}(function(c){const f=A();if(!N(f))return c();const d=Ot(f),h=d.isBackward(),g=Oc(d.anchor,h?-1:0),m=Oc(d.focus,h?0:-1);if(c(),g||m){const p=A();if(N(p)){const y=p.clone();if(g){const _=g.getParent();_&&y.anchor.set(_.getKey(),g.getIndexWithinParent()+(h?1:0),"element")}if(m){const _=m.getParent();_&&y.focus.set(_.getKey(),m.getIndexWithinParent()+(h?0:1),"element")}pe(Ot(y))}}})(()=>{let c=null;for(const f of a){if(!f.isAttached())continue;const d=q(f,Ze);if(d){u(d);continue}if(x(f)){if(!f.isInline())continue;if(Ze(f)){if(!(ur(f)||c!==null&&c.getParentOrThrow().isParentOf(f))){u(f),c=f;continue}for(const g of f.getChildren())f.insertBefore(g);f.remove();continue}}const h=f.getPreviousSibling();Ze(h)&&h.is(c)?h.append(f):(c=Si(t,{rel:o,target:r,title:i}),f.insertAfter(c),c.append(f))}})}const R_=/^\+?[0-9\s()-]{5,}$/;function Mc(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:R_.test(n)?`tel:${n}`:`https://${n}`}$e.tag("a");function P_(n,e){return Je(n.registerNodeTransform(bn,O_),n.registerCommand(Da,t=>{const r=e.validateUrl.peek(),i=e.attributes.peek();if(t===null)return Ws(null),!0;if(typeof t=="string")return!(r!==void 0&&!r(t))&&(Ws(t,i),!0);{const{url:o,target:s,rel:a,title:l}=t;return Ws(o,{...i,rel:a,target:s,title:l}),!0}},G),jl(()=>{const t=e.validateUrl.value;if(!t)return;const r=e.attributes.value;return n.registerCommand(Pr,i=>{const o=A();if(!N(o)||o.isCollapsed()||!It(i,ClipboardEvent)||i.clipboardData===null)return!1;const s=i.clipboardData.getData("text");return t(s)?!o.getNodes().some(a=>x(a)||$(a)&&!a.isSimpleText())&&(n.dispatchCommand(Da,{...r,url:s}),i.preventDefault(),!0):!1},gt)}))}function un(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function $a(n){let e=1,t=n.getParent();for(;t!=null;){if(ne(t)){const r=t.getParent();if(V(r)){e++,t=r.getParent();continue}un(40)}return e}return e}function Fa(n){const e=n.getParent();V(e)||un(40);let t=e,r=e;for(;r!==null;)r=r.getParent(),V(r)&&(t=r);return t}function ag(n){let e=[];const t=n.getChildren().filter(ne);for(let r=0;r<t.length;r++){const i=t[r],o=i.getFirstChild();V(o)?e=e.concat(ag(o)):e.push(i)}return e}function pt(n){return ne(n)&&V(n.getFirstChild())}function lg(n,e){return ne(n)&&(e.length===0||e.length===1&&n.is(e[0])&&n.getChildrenSize()===0)}function jc(n){const e=A();if(e!==null){let t=e.getNodes();if(N(e)){const[i]=e.getStartEndPoints(),o=i.getNode(),s=o.getParent();if(xe(o)){const a=o.getFirstChild();if(a)t=a.selectStart().getNodes();else{const l=Y();o.append(l),t=l.select().getNodes()}}else if(lg(o,t)){const a=Dt(n);if(xe(s)){o.replace(a);const l=Ut();x(o)&&(l.setFormat(o.getFormatType()),l.setIndent(o.getIndent())),a.append(l)}else if(ne(o)){const l=o.getParentOrThrow();qn(a,l.getChildren()),l.replace(a)}return}}const r=new Set;for(let i=0;i<t.length;i++){const o=t[i];if(x(o)&&o.isEmpty()&&!ne(o)&&!r.has(o.getKey())){Rc(o,n);continue}let s=Xd(o)?o.getParent():ne(o)&&o.isEmpty()?o:null;for(;s!=null;){const a=s.getKey();if(V(s)){if(!r.has(a)){const l=Dt(n);qn(l,s.getChildren()),s.replace(l),r.add(a)}break}{const l=s.getParent();if(xe(l)&&!r.has(a)){r.add(a),Rc(s,n);break}s=l}}}}}function qn(n,e){n.splice(n.getChildrenSize(),0,e)}function Rc(n,e){if(V(n))return n;const t=n.getPreviousSibling(),r=n.getNextSibling(),i=Ut();let o;if(qn(i,n.getChildren()),V(t)&&e===t.getListType())t.append(i),V(r)&&e===r.getListType()&&(qn(t,r.getChildren()),r.remove()),o=t;else if(V(r)&&e===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const a=Dt(e);a.append(i),n.replace(a),o=a}i.setFormat(n.getFormatType()),i.setIndent(n.getIndent());const s=A();return N(s)&&(o.getKey()===s.anchor.key&&s.anchor.set(i.getKey(),s.anchor.offset,"element"),o.getKey()===s.focus.key&&s.focus.set(i.getKey(),s.focus.offset,"element")),n.remove(),o}function Jl(n,e){const t=n.getLastChild(),r=e.getFirstChild();t&&r&&pt(t)&&pt(r)&&(Jl(t.getFirstChild(),r.getFirstChild()),r.remove());const i=e.getChildren();i.length>0&&n.append(...i),e.remove()}function I_(){const n=A();if(N(n)){const e=new Set,t=n.getNodes(),r=n.anchor.getNode();if(lg(r,t))e.add(Fa(r));else for(let i=0;i<t.length;i++){const o=t[i];if(Xd(o)){const s=yy(o,vn);s!=null&&e.add(Fa(s))}}for(const i of e){let o=i;const s=ag(i);for(const a of s){const l=Y().setTextStyle(n.style).setTextFormat(n.format);qn(l,a.getChildren()),o.insertAfter(l),o=l,a.__key===n.anchor.key&&Et(n.anchor,We(ze(l,"next"))),a.__key===n.focus.key&&Et(n.focus,We(ze(l,"next"))),a.remove()}i.remove()}}}function ug(n){const e=n.getListType()!=="check";let t=n.getStart();for(const r of n.getChildren())ne(r)&&(r.getValue()!==t&&r.setValue(t),e&&r.getLatest().__checked!=null&&r.setChecked(void 0),V(r.getFirstChild())||t++)}function L_(n){const e=new Set;if(pt(n)||e.has(n.getKey()))return;const t=n.getParent(),r=n.getNextSibling(),i=n.getPreviousSibling();if(pt(r)&&pt(i)){const o=i.getFirstChild();if(V(o)){o.append(n);const s=r.getFirstChild();V(s)&&(qn(o,s.getChildren()),r.remove(),e.add(r.getKey()))}}else if(pt(r)){const o=r.getFirstChild();if(V(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(n)}}else if(pt(i)){const o=i.getFirstChild();V(o)&&o.append(n)}else if(V(t)){const o=Be(n),s=Be(t);o.append(s),s.append(n),i?i.insertAfter(o):r?r.insertBefore(o):t.append(o)}}function Pc(n){if(pt(n))return;const e=n.getParent(),t=e?e.getParent():void 0;if(V(t?t.getParent():void 0)&&ne(t)&&V(e)){const r=e?e.getFirstChild():void 0,i=e?e.getLastChild():void 0;if(n.is(r))t.insertBefore(n),e.isEmpty()&&t.remove();else if(n.is(i))t.insertAfter(n),e.isEmpty()&&t.remove();else{const o=Be(n),s=Be(e);o.append(s),n.getPreviousSiblings().forEach(u=>s.append(u));const a=Be(n),l=Be(e);a.append(l),qn(l,n.getNextSiblings()),t.insertBefore(o),t.insertAfter(a),t.replace(n)}}}function B_(n=!1){const e=A();if(!N(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();let r=null;if(ne(t)&&t.getChildrenSize()===0)r=t;else if($(t)){const u=t.getParent();ne(u)&&u.getChildren().every(c=>$(c)&&c.getTextContent().trim()==="")&&(r=u)}if(r===null)return!1;const i=Fa(r),o=r.getParent();V(o)||un(40);const s=o.getParent();let a;if(xe(s))a=Y(),i.insertAfter(a);else{if(!ne(s))return!1;a=Be(s),s.insertAfter(a)}a.setTextStyle(e.style).setTextFormat(e.format).select();const l=r.getNextSiblings();if(l.length>0){const u=n?(function(f,d){return f.getStart()+d.getIndexWithinParent()})(o,r):1,c=Be(o).setStart(u);if(ne(a)){const f=Be(a);f.append(c),a.insertAfter(f)}else a.insertAfter(c);c.append(...l)}return(function(u){let c=u;for(;c.getNextSibling()==null&&c.getPreviousSibling()==null;){const f=c.getParent();if(f==null||!ne(f)&&!V(f))break;c=f}c.remove()})(r),!0}let vn=class extends ve{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{const t=e.getParent();if(V(t))t.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0);else if(t){const r=e.createParentElementNode();V(r)||un(340);const i=[e];for(const o of["previous","next"]){i.reverse();for(const{origin:s}of oe(e,o)){if(!ne(s))break;i.push(s)}}e.insertBefore(r),r.splice(0,0,i),xe(t)||(ps(r,Cn(oe(r,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},extends:ve,importDOM:{li:()=>({conversion:K_,priority:0})}})}constructor(e=1,t=void 0,r){super(r),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const t=re().createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,r){(function(s,a){const l=a.getParent();!V(l)||l.getListType()!=="check"||V(a.getFirstChild())?(s.removeAttribute("role"),s.removeAttribute("tabIndex"),s.removeAttribute("aria-checked")):(s.setAttribute("role","checkbox"),s.setAttribute("tabIndex","-1"),s.setAttribute("aria-checked",a.getChecked()?"true":"false"))})(t,this),t.value=this.__value,(function(s,a,l){const u=a.list;if(!u)return;const c=u.listitem,f=u.nested&&u.nested.listitem,d=l.getParent(),h=V(d)&&d.getListType()==="check",g=l.getChecked(),m=l.getChildren().some(_=>V(_)),p=[];u.listitemChecked!==void 0&&p.push(u.listitemChecked),u.listitemUnchecked!==void 0&&p.push(u.listitemUnchecked),f!==void 0&&p.push(...nn(f)),p.length>0&&Kt(s,...p);const y=[];if(c!==void 0&&y.push(...nn(c)),h){const _=g?u.listitemChecked:u.listitemUnchecked;_!==void 0&&y.push(_)}f!==void 0&&m&&y.push(...nn(f)),y.length>0&&Ee(s,...y)})(t,r.theme,this);const i=e?e.__style:"",o=this.__style;i!==o&&gn(t.style,o,i),(function(s,a,l){const u=a.__textStyle,c=l?l.__textStyle:"";if(l!==null&&c===u)return;const f=So(u);for(const d in f)s.style.setProperty(`--listitem-marker-${d}`,f[d]);if(c!=="")for(const d in So(c))d in f||s.style.removeProperty(`--listitem-marker-${d}`)})(t,this,e)}updateDOM(e,t,r){const i=t;return this.updateListItemDOM(e,i,r),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const t=this.createDOM(e._config),r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();return i&&(t.dir=i),pt(this)?{after(o){if(K(o)){const s=o.previousElementSibling;if(K(s)&&s.nodeName==="LI"){for(;o.firstChild;)s.append(o.firstChild);o.remove()}}return o},element:t}:{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(x(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(e,t){if(ne(e))return super.replace(e);this.setIndent(0);const r=this.getParentOrThrow();if(!V(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{const s=Be(r);let a=this.getNextSibling();for(;a;){const l=a;a=a.getNextSibling(),s.append(l)}r.insertAfter(e),e.insertAfter(s)}const i=this.__key;let o=0;if(t&&(x(e)||un(139),o=e.getChildrenSize(),e.splice(o,0,this.getChildren())),t&&x(e)){const s=A();if(N(s))for(const a of s.getStartEndPoints())a.key===i&&a.type==="element"&&a.set(e.getKey(),o+a.offset,"element")}return this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,t=!0){const r=this.getParentOrThrow();if(V(r)||un(39),ne(e))return super.insertAfter(e,t);const i=this.getNextSiblings();if(r.insertAfter(e,t),i.length!==0){const o=Be(r);i.forEach(s=>o.append(s)),e.insertAfter(o,t)}return e}remove(e){const t=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),t&&r&&pt(t)&&pt(r)&&(Jl(t.getFirstChild(),r.getFirstChild()),r.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){const r=Be(this);return this.insertAfter(r,t),r}collapseAtStart(e){if(pt(this))return!1;const t=this.getParentOrThrow();if(ne(t.getParentOrThrow()))return Pc(this),!0;const r=Y().append(...this.getChildren()),i=this.getNextSiblings();if(i.length>0){const o=Be(t);o.append(...i),t.insertAfter(o)}return t.insertAfter(r),this.remove(),t.getChildrenSize()===0&&t.remove(),r.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(e){const t=this.getWritable();return t.__value=e,t}getChecked(){const e=this.getLatest();let t;const r=this.getParent();return V(r)&&(t=r.getListType()),t==="check"?!!e.__checked:void 0}setChecked(e){const t=this.getWritable();return t.__checked=e,t}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),r=0;for(;ne(t);)t=t.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&un(117),(e=Math.floor(e))>=0||un(199);let t=this.getIndent();for(;t!==e;)t<e?(L_(this),t++):(Pc(this),t--);return this}canInsertAfter(e){return ne(e)}canReplaceWith(e){return ne(e)}canMergeWith(e){return ne(e)||Ht(e)}extractWithChild(e,t){if(!N(t))return!1;const r=t.anchor.getNode(),i=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Dt("bullet")}canMergeWhenEmpty(){return!0}};function K_(n){if(n.classList.contains("task-list-item")){for(const r of n.children)if(r.tagName==="INPUT")return Ic(r)}if(n.classList.contains("joplin-checkbox")){for(const r of n.children)if(r.classList.contains("checkbox-wrapper")&&r.children.length>0&&r.children[0].tagName==="INPUT")return Ic(r.children[0])}const e=n.getAttribute("aria-checked"),t=Ut(e==="true"||e!=="false"&&void 0);return Jt(t,n),{after:cg.bind(null,t),node:Ct(t,n)}}function Ic(n){if(n.getAttribute("type")!=="checkbox")return{node:null};const e=Ut(n.hasAttribute("checked"));return{after:cg.bind(null,e),node:e}}function cg(n,e){const t=e[0];return e.length===1&&Ht(t)&&!n.getFormatType()&&t.getFormatType()?(n.setFormat(t.getFormatType()),t.getChildren()):e}function Ut(n){return Ge(new vn(void 0,n))}function ne(n){return n instanceof vn}let Gn=class extends ve{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{(function(t){const r=t.getNextSibling();V(r)&&t.getListType()===r.getListType()&&Jl(t,r)})(e),ug(e)},extends:ve,importDOM:{ol:()=>({conversion:Bc,priority:0}),ul:()=>({conversion:Bc,priority:0})}})}constructor(e="number",t=1,r){super(r);const i=W_[e]||e;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const t=this.getWritable();return t.__listType=e,t.__tag=e==="number"?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const t=this.getWritable();return t.__start=e,t}createDOM(e,t){const r=this.__tag,i=re().createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,Lc(i,e.theme,this),i}updateDOM(e,t,r){return e.__tag!==this.__tag||e.__listType!==this.__listType||(Lc(t,r.theme,this),e.__start!==this.__start&&t.setAttribute("start",String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const t=this.createDOM(e._config,e);return K(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}splice(e,t,r){let i=r;for(let o=0;o<r.length;o++){const s=r[o];ne(s)||(i===r&&(i=[...r]),i[o]=this.createListItemNode().append(!x(s)||V(s)||s.isInline()?s:we(s.getTextContent())))}return super.splice(e,t,i)}extractWithChild(e){return ne(e)}createListItemNode(){return Ut()}};function Lc(n,e,t){const r=[],i=[],o=e.list;if(o!==void 0){const s=o[`${t.__tag}Depth`]||[],a=$a(t)-1,l=a%s.length,u=s[l],c=o[t.__tag];let f;const d=o.nested,h=o.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(...nn(u));for(let g=0;g<s.length;g++)g!==l&&i.push(t.__tag+g)}if(f!==void 0){const g=nn(f);a>1?r.push(...g):i.push(...g)}}i.length>0&&Kt(n,...i),r.length>0&&Ee(n,...r)}function Bc(n){let e;if((function(t){return K(t)&&t.nodeName.toLowerCase()==="ol"})(n)){const t=n.start;e=Dt("number",t)}else e=(function(t){if(t.getAttribute("__lexicallisttype")==="check"||t.classList.contains("contains-task-list")||t.getAttribute("data-is-checklist")==="1")return!0;for(const r of t.childNodes)if(K(r)&&r.hasAttribute("aria-checked"))return!0;return!1})(n)?Dt("check"):Dt("bullet");return Ct(e,n),{after:t=>(function(r,i){const o=i.createListItemNode.bind(i),s=[];for(let a=0;a<r.length;a++){const l=r[a];if(ne(l)){s.push(l);const u=l.getChildren();u.length>1&&u.forEach(c=>{V(c)&&s.push(o().append(c))})}else s.push(o().append(l))}return s})(t,e),node:e}}const W_={ol:"number",ul:"bullet"};function Dt(n="number",e=1){return Ge(new Gn(n,e))}function V(n){return n instanceof Gn}function q_(n){const e=[];for(const t of n)if(ne(t)){e.push(t);const r=t.getChildren();if(r.length>1)for(const i of r)V(i)&&e.push(Ut().append(i))}else e.push(Ut().append(t));return e}const U_={$import:(n,e)=>{let t;var r;return Vh(e,"ol")?t=Dt("number",e.start):t=(r=e).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||r.querySelector(":scope > [aria-checked]")!==null?Dt("check"):Dt("bullet"),Ct(t,e),[t.splice(0,0,Bl(q_(n.$importChildren(e)),e))]},match:$e.tag("ol","ul"),name:"@lexical/list/list"};function fg(n,e){if(e.length!==1)return e;const t=e[0];return Ht(t)&&!n.getFormatType()&&t.getFormatType()?(n.setFormat(t.getFormatType()),t.getChildren()):e}function dg(n){const e=s=>Ll(s)&&!V(s);if(!n.some(e))return n;const t=[];let r=[];const i=()=>{r.length>0&&(t.push(r),r=[])};for(const s of n)e(s)?(i(),t.push(x(s)?s.getChildren():[s])):r.push(s);i();const o=[];for(const s of t)o.length>0&&o.push(Wt()),o.push(...s);return o}const H_={$import:(n,e)=>{const t=e.getAttribute("aria-checked"),r=Ut(t==="true"||t!=="false"&&void 0);return Jt(r,e),Ct(r,e),[r.splice(0,0,dg(fg(r,n.$importChildren(e))))]},match:$e.tag("li"),name:"@lexical/list/li"};function Kc(n,e,t){const r=Vh(t,"input")?t:t.querySelector('input[type="checkbox"]');if(!r||r.getAttribute("type")!=="checkbox")return[];const i=Ut(r.hasAttribute("checked"));return Jt(i,e),Ct(i,e),[i.splice(0,0,dg(fg(i,n.$importChildren(e))))]}$e.tag("li").classAll("task-list-item"),$e.tag("li").classAll("joplin-checkbox");const J_=B("UPDATE_LIST_START_COMMAND"),V_=B("INSERT_UNORDERED_LIST_COMMAND"),Y_=B("INSERT_ORDERED_LIST_COMMAND"),X_=B("REMOVE_LIST_COMMAND");function Wc(n,e){return Je(n.registerCommand(Y_,()=>(jc("number"),!0),gt),n.registerCommand(J_,t=>{const{listNodeKey:r,newStart:i}=t,o=ie(r);return!!V(o)&&(o.getListType()==="number"&&(o.setStart(i),ug(o)),!0)},gt),n.registerCommand(V_,()=>(jc("bullet"),!0),gt),n.registerCommand(X_,()=>(I_(),!0),gt),n.registerCommand(jn,()=>B_(!!(e&&e.restoreNumbering)),gt),n.registerCommand(ts,t=>{const r=A();if(!N(r)||!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;let o=i.getNode();for(;!ne(o);){if(o.getPreviousSibling()!==null)return!1;const s=o.getParent();if(s===null)return!1;o=s}return!(!ne(o)||!o.collapseAtStart(r))&&(t.preventDefault(),!0)},vm),n.registerNodeTransform(vn,t=>{const r=t.getFirstChild();if(r){if($(r)){const i=r.getStyle(),o=r.getFormat();t.getTextStyle()!==i&&t.setTextStyle(i),t.getTextFormat()!==o&&t.setTextFormat(o)}}else{const i=A();N(i)&&(i.style!==t.getTextStyle()||i.format!==t.getTextFormat())&&i.isCollapsed()&&t.is(i.anchor.getNode())&&t.setTextStyle(i.style).setTextFormat(i.format)}}),n.registerNodeTransform(on,t=>{const r=t.getParent();if(ne(r)&&t.is(r.getFirstChild())){const i=t.getStyle(),o=t.getFormat();i===r.getTextStyle()&&o===r.getTextFormat()||r.setTextStyle(i).setTextFormat(o)}}))}function G_(n){const e=t=>{const r=t.getParent();if(V(t.getFirstChild())||!V(r))return;const i=q(t,o=>ne(o)&&V(o.getParent())&&ne(o.getPreviousSibling()));if(i===null&&t.getIndent()>0)t.setIndent(0);else if(ne(i)){const o=i.getPreviousSibling();if(ne(o)){const s=(function(l){let u=l,c=u.getFirstChild();for(;V(c);){const f=c.getLastChild();if(!ne(f))break;u=f,c=u.getFirstChild()}return u})(o),a=s.getParent();if(V(a)){const l=$a(a);l+1<$a(r)&&t.setIndent(l)}}}};return n.registerNodeTransform(Gn,t=>{const r=[t];for(;r.length>0;){const i=r.shift();if(V(i)){for(const o of i.getChildren())if(ne(o)){e(o);const s=o.getFirstChild();V(s)&&r.push(s)}}}})}function Ko(n,e,t=null){const r=uh(t),i=t?ah(t):[],o=t!==null&&i.length>0;if(o&&typeof r.caretPositionFromPoint=="function"){const s=r.caretPositionFromPoint(n,e,{shadowRoots:i});if(s!==null&&(function(a,l){for(let u=a;u!==null;){if(u===l)return!0;u=Vn(u)}return!1})(s.offsetNode,t))return{node:s.offsetNode,offset:s.offset}}if(o){const s=t.getRootNode();if(qt(s)){const a=s.elementFromPoint(n,e);if(a!==null&&t.contains(a)){const l=(function(u,c,f,d){const h=d.createRange(),g=w=>c<w.top?w.top-c:c>w.bottom?c-w.bottom:0,m=w=>u<w.left?w.left-u:u>w.right?u-w.right:0,p=d.createTreeWalker(f,NodeFilter.SHOW_TEXT);let y=null,_=1/0,b=1/0;for(let w=p.nextNode();w;w=p.nextNode()){h.selectNodeContents(w);for(const v of h.getClientRects()){const T=g(v),F=m(v);(T<_||T===_&&F<b)&&(_=T,b=F,y=w)}}if(y===null)return null;let k=0,S=1/0,C=1/0;for(let w=0;w<=y.length;w++){h.setStart(y,w),h.collapse(!0);const v=h.getBoundingClientRect(),T=g(v),F=Math.abs(u-v.left);(T<S||T===S&&F<C)&&(S=T,C=F,k=w)}return{node:y,offset:k}})(n,e,a,r);if(l!==null)return l}}}if(typeof r.caretRangeFromPoint=="function"){const s=r.caretRangeFromPoint(n,e);return s===null?null:{node:s.startContainer,offset:s.startOffset}}if(typeof r.caretPositionFromPoint=="function"){const s=r.caretPositionFromPoint(n,e);return s===null?null:{node:s.offsetNode,offset:s.offset}}return null}function dr(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Aa={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Z_(n){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(n):n}const qc=(n,e)=>{if(!N(e))return e.insertRawText(n),!0;const t=r=>{const i=A();N(i)&&r(i)};return Rd(n,{linebreak:()=>t(r=>r.insertParagraph()),tab:()=>t(r=>r.insertNodes([Fi()])),text:r=>t(i=>i.insertText(r))}),!0},za={"application/x-lexical-editor":[(n,e,t)=>{try{const r=Ce(),i=JSON.parse(n);if(i&&i.namespace===r._config.namespace&&Array.isArray(i.nodes))return Uc(r,sb(i.nodes),e),!0}catch(r){console.error(r)}return t()}],"text/html":[(n,e,t)=>{try{const r=Ce(),i=new DOMParser().parseFromString(Z_(n),"text/html");return Uc(r,eg(r,i),e),!0}catch(r){return console.error(r),t()}}],"text/plain":[qc],"text/uri-list":[qc]};function Q_(n,e,t,r){if(!n)return!1;const i=o=>!!n[o]&&n[o](e,t,i.bind(null,o-1),r);return i(n.length-1)}function hg(n,e,t){const r=e.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(s=>o.$importMimeType[s]!==void 0).sort((s,a)=>{const l=o.priority[s],u=o.priority[a];return l===void 0&&u===void 0?s<a?-1:s>a?1:0:l===void 0?1:u===void 0?-1:l-u})})(n)){const o=e.getData(i);if(o&&(i!=="text/html"||o!==r)&&Q_(n.$importMimeType[i],o,t,e))return!0}return!1}const eb={$importMimeType:za,$insertDataTransfer:(n,e)=>hg({$importMimeType:za,priority:Aa},n,e),priority:Aa},tb={build:(n,e)=>({$importMimeType:e.$importMimeType,$insertDataTransfer:(t,r)=>hg(e,t,r),priority:e.priority}),config:{$importMimeType:za,priority:Aa},mergeConfig(n,e){const t=zl(n,e);if(e.$importMimeType){const r={...n.$importMimeType};for(const[i,o]of Object.entries(e.$importMimeType))if(o){const s=r[i];r[i]=s?[...s,...o]:o}t.$importMimeType=r}return e.priority&&(t.priority={...n.priority,...e.priority}),t},name:"@lexical/clipboard/Import"};function gg(n,e=A()){return e==null&&dr(166),N(e)&&e.isCollapsed()||e.getNodes().length===0?"":Wl(n,e)}function pg(n,e=A()){return e==null&&dr(166),N(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(ob(n,e))}function Oa(n,e,t){(function(){const r=My(tb.name);return r?r.output:eb})().$insertDataTransfer(n,e)}const mg="application/x-lexical-drag";function nb(n,e){const t={editorKey:e.getKey()};n.setData(mg,JSON.stringify(t))}function rb(n,e,t){const r=n.dataTransfer;if(r===null)return!1;const i=(function(u){const c=u.getData(mg);if(!c)return null;let f;try{f=JSON.parse(c)}catch{return null}return(d=f)!==null&&typeof d=="object"&&"editorKey"in d&&typeof d.editorKey=="string"?f:null;var d})(r);if(i===null)return!1;const o=(function(u,c){const f=Ko(u.clientX,u.clientY,c.getRootElement());if(f===null)return null;const d=Xe(f.node);if(d===null)return null;if($(d))return _n(d,"next",f.offset);if(x(d))return Sa(d,f.offset,"next");const h=d.getParent();return h===null?null:Sa(h,d.getIndexWithinParent()+1,"next")})(n,e);if(o===null)return!1;const s=Ch(o);if(s===null)return!1;const a=i.editorKey===e.getKey(),l=A();if(a){if(!N(l)||l.isCollapsed())return!1;if((function(u,c){const{anchor:f,focus:d}=Al(va(c),"next");return xi(f,u)<0&&xi(u,d)<0})(o,l))return n.preventDefault(),!0;l.removeText()}if(!s.origin.isAttached())return n.preventDefault(),!0;if(t(r,Mr(Mi(s)),e),!a){const u=e.getRootElement(),c=u?u.ownerDocument:null,f=c?(function(d,h){for(const g of lh(h)){const m=Ir(g);if(Oi(m)&&m.getKey()===d&&K(g))return g}return null})(i.editorKey,c):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return n.preventDefault(),!0}function ib(n,e){return rb(n,e,Oa)}function Uc(n,e,t){n.dispatchCommand(nd,{nodes:e,selection:t})||(t.insertNodes(e),(function(r){if(N(r)&&r.isCollapsed()){const i=r.anchor;let o=null;const s=He(i,"previous");if(s)if(kt(s))o=s.origin;else{const a=Nt(s,ze(me(),"next").getFlipped());for(const l of a){if($(l.origin)){o=l.origin;break}if(x(l.origin)&&!l.origin.isInline())break}}if(o&&$(o)){const a=o.getFormat(),l=o.getStyle();r.format===a&&r.style===l||(r.format=a,r.style=l,r.dirty=!0)}}})(t))}function Ma(n,e,t,r=[]){let i=e===null||t.isSelected(e);const o=x(t)&&t.excludeFromCopy("html");let s=t;e!==null&&$(s)&&(s=wh(e,s,"clone"));const a=x(s)?s.getChildren():[],l=(function(c){const f=c.exportJSON(),d=c.constructor;if(f.type!==d.getType()&&dr(58,d.name),x(c)){const h=f.children;Array.isArray(h)||dr(59,d.name)}return f})(s);$(s)&&s.getTextContentSize()===0&&(i=!1);const u=i&&de(e)&&x(t)?null:e;for(let c=0;c<a.length;c++){const f=a[c],d=Ma(n,u,f,l.children);!i&&x(t)&&d&&t.extractWithChild(f,e,"clone")&&(i=!0)}if(i&&!o){const c=bt(s);if(c.length>0){const f={};for(const d of c){const h=Ln(s,d);h===null&&dr(366,s.constructor.name,d);const g=[];Ma(n,null,h,g),g.length===1&&g[0].type===h.getType()||dr(385,d,s.constructor.name,String(g.length),String(g.length>0?g[0].type:"none")),f[d]=g[0]}l.$slots=f}}if(i&&!o)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const f=l.children[c];r.push(f)}return i}function ob(n,e){const t=[],r=me(),i=N(e)?e.anchor.getNode():de(e)?e.getNodes()[0]??null:null,o=i!==null?fs(i):null,s=(x(o)?o:r).getChildren();for(let a=0;a<s.length;a++)Ma(n,e,s[a],t);return{namespace:n._config.namespace,nodes:t}}function sb(n){const e=[];for(const t of n)e.push(ym(t));return e}let tr=null;async function ja(n,e,t){if(tr!==null)return!1;if(e!==null)return new Promise((u,c)=>{n.update(()=>{u(Hc(n,e,t))})});const r=n.getRootElement(),i=n._window||window,o=i.document,s=Oe(i);if(r===null||s===null)return!1;const a=o.createElement("span");a.style.position="fixed",a.style.top="-1000px",a.append(o.createTextNode("#")),r.append(a);const l=o.createRange();return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((u,c)=>{const f=n.registerCommand($i,d=>(It(d,ClipboardEvent)&&(f(),tr!==null&&(i.clearTimeout(tr),tr=null),u(Hc(n,d,t))),!0),Jd);tr=i.setTimeout(()=>{f(),tr=null,u(!1)},50),o.execCommand("copy"),a.remove()})}function Hc(n,e,t){if(t===void 0){const i=Oe(n._window),o=A();if(!o||o.isCollapsed()||!i)return!1;const s=rt(i,n.getRootElement()),a=s.anchorNode,l=s.focusNode;if(a!==null&&l!==null&&!zi(n,a,l))return!1;t=Vl(o)}e.preventDefault();const r=e.clipboardData;return r!==null&&(yg(r,t),!0)}const ab=[["text/html",gg],["application/x-lexical-editor",pg]];function Vl(n=A()){return(function(e,t){const r={"text/plain":""};for(const[i,o]of Object.entries(e))if(o){const s=ub(o,t);s!==null&&(r[i]=s)}return r})(lb(),n)}function yg(n,e){for(const[t]of ab)e[t]===void 0&&n.setData(t,"");for(const t in e){const r=e[t];r!==void 0&&n.setData(t,r)}}function lb(n=Ce()){const e=Br(n,cb.name);return e?e.output:_g}const _g={"application/x-lexical-editor":[(n,e)=>n?pg(Ce(),n):e()],"text/html":[(n,e)=>n?gg(Ce(),n):e()],"text/plain":[(n,e)=>n?n.getTextContent():e()]};function ub(n,e){const t=r=>n[r]?n[r](e,t.bind(null,r-1)):null;return t(n.length-1)}const cb={build:(n,e,t)=>e.$exportMimeType,config:{$exportMimeType:_g},mergeConfig(n,e){const t=zl(n,e);if(e.$exportMimeType){const r={...n.$exportMimeType};for(const[i,o]of Object.entries(e.$exportMimeType))if(o){const s=r[i];r[i]=s?[...s,...o]:o}t.$exportMimeType=r}return t},name:"@lexical/clipboard/GetClipboardData"},fb={bold:"bold",italic:"italic",strikeThrough:"strikethrough",subscript:"subscript",superscript:"superscript",underline:"underline"},Wo=Symbol.for("@lexical/dragon/WindowState");function db(n,e,t){const r=(function(i){let o=i[Wo];return o===void 0&&(o={dispose:()=>{},editors:new Map,installs:new Set},i[Wo]=o),o})(n);if(r.installs.size===0){const i=pb.bind(n);n.addEventListener("message",i,!0),r.dispose=()=>{n.removeEventListener("message",i,!0)}}if(r.installs.add(e),t){const i=r.editors.get(t)||new Set;i.add(e),r.editors.set(t,i)}return hb.bind(null,n,r,e,t)}function hb(n,e,t,r){if(r){const i=e.editors.get(r);i&&i.delete(t)&&i.size===0&&e.editors.delete(r)}e.installs.delete(t)&&e.installs.size===0&&(e.dispose(),delete n[Wo])}function Jc(n){return n&&n.ownerDocument.defaultView}function gb(n){const e=Ty(()=>Jc(n.getRootElement()),t=>n.registerRootListener(r=>{t.value=Jc(r)}));return jl(()=>{const t=e.value;if(t)return db(t,Symbol("@lexical/dragon/editorInstall"),n)})}function pb(n){if(n.origin!==this.location.origin)return;const e=(function(r){const i=r[Wo];if(i===void 0)return null;const o=Ir(Ar(r.document));return Oi(o)&&i.editors.has(o)?o:null})(this);if(e===null)return;const t=n.data;if(typeof t=="string"){let r;try{r=JSON.parse(t)}catch{return}if(r&&r.protocol==="nuanria_messaging"&&r.type==="request"){const i=r.payload;if(i&&i.functionId==="makeChanges"){const o=i.args;if(Array.isArray(o)){const[s,a,l,u,c,f]=o;if(![s,a,u,c].every(Number.isFinite)||typeof l!="string"&&l!==-1)return;e.update(()=>{const d=A();if(N(d)){const h=d.anchor;let g=h.getNode(),m=0,p=0;if($(g)&&s>=0&&a>=0&&(m=s,p=s+a,d.setTextNodeRange(g,m,g,p)),typeof l!="string"||m===p&&l===""||(d.insertRawText(l),g=h.getNode()),$(g)){const y=g.getTextContentSize();m=Math.min(Math.max(u,0),y),p=u<0||c<0?m:Math.min(u+c,y),d.setTextNodeRange(g,m,g,p)}if(typeof f=="string"&&c>0&&!d.isCollapsed()){const y=fb[f];y!==void 0&&d.formatText(y)}n.stopImmediatePropagation()}})}}}}}const mb={$import:(n,e)=>{const t=jr(e.nodeName.toLowerCase());return Yn(e,t),Jt(t,e),Ct(t,e),[t.splice(0,0,n.$importChildren(e))]},match:$e.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},yb={$import:(n,e)=>{const t=Wr();return Jt(t,e),Yn(e,t),Ct(t,e),[t.splice(0,0,n.$importChildren(e))]},match:$e.tag("blockquote"),name:"@lexical/rich-text/blockquote"};$e.tag("blockquote");$e.tag("p"),$e.tag("span");const Vc=B("DRAG_DROP_PASTE_FILE"),qs=Ni("shadowRoot",{parse:Boolean});class _s extends ve{$config(){return this.config("quote",{extends:ve,importDOM:{blockquote:()=>({conversion:_b,priority:0})},stateConfigs:[{flat:!0,stateConfig:qs}]})}isShadowRoot(){return Di(this,qs)}setIsShadowRoot(e){return hr(this,qs,e)}createDOM(e){const t=re().createElement("blockquote");return Ee(t,e.theme.quote),t}updateDOM(e,t,r){return!1}exportDOM(e){const{element:t}=super.exportDOM(e);if(K(t)){this.isEmpty()&&t.append(re().createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();i&&(t.dir=i)}return{element:t}}exportJSON(){return super.exportJSON()}static importJSON(e){return Wr().updateFromJSON(e)}insertNewAfter(e,t){const r=Y(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,t),r}collapseAtStart(){if(this.isShadowRoot()){for(const t of this.getChildren())this.insertBefore(t);return this.remove(),!0}const e=Y();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function Wr(n){const e=Ge(new _s);return n&&n.shadowRoot?e.setIsShadowRoot(!0):e}function qo(n){return n instanceof _s}let bs=class extends ve{__tag;$config(){return this.config("heading",{extends:ve,importDOM:{h1:()=>({conversion:nr,priority:0}),h2:()=>({conversion:nr,priority:0}),h3:()=>({conversion:nr,priority:0}),h4:()=>({conversion:nr,priority:0}),h5:()=>({conversion:nr,priority:0}),h6:()=>({conversion:nr,priority:0}),p:e=>{const t=e.firstChild;return t!==null&&Yc(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>Yc(e)?{conversion:()=>({node:jr("h1")}),priority:3}:null}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__tag=e.__tag}constructor(e="h1",t){super(t),this.__tag=e}getTag(){return this.getLatest().__tag}setTag(e){const t=this.getWritable();return t.__tag=e,t}createDOM(e){const t=this.__tag,r=re().createElement(t),i=e.theme.heading;if(i!==void 0){const o=i[t];Ee(r,o)}return r}updateDOM(e,t,r){return e.__tag!==this.__tag}exportDOM(e){const{element:t}=super.exportDOM(e);if(K(t)){this.isEmpty()&&t.append(re().createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();i&&(t.dir=i)}return{element:t}}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){const r=e?e.anchor.offset:0,i=this.getLastDescendant(),o=!i||e&&e.anchor.key===i.getKey()&&r===i.getTextContentSize()||!e?Y():jr(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,t),r===0&&!this.isEmpty()&&e){const a=Y();a.select(),this.replace(a,!0)}return o}collapseAtStart(){if(this.isEmpty()){const e=Y();this.getChildren().forEach(t=>e.append(t)),this.replace(e)}return!0}extractWithChild(){return!0}};function Yc(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function nr(n){const e=n.nodeName.toLowerCase();let t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=jr(e),Yn(n,t),Jt(t,n),Ct(t,n)),{node:t}}function _b(n){const e=Wr();return Jt(e,n),Yn(n,e),Ct(e,n),{node:e}}function jr(n="h1"){return Ge(new bs(n))}function bg(n){return n instanceof bs}function Xc(n){const e=Xe(n);return Q(e)}function rr(n,e,t,r){let i=!1,o=null;if(n.isCollapsed()&&n.anchor.type==="text"){const a=n.anchor.getNode();if($(a)){o=a;const l=n.anchor.offset,u=l===a.getTextContentSize()&&a.getNextSibling()===null,c=l===0&&a.getPreviousSibling()===null;i=t==="end"&&u||t==="start"&&c||t==="both"&&(u||c)}}let s=!1;for(const[a,l]of Object.entries(r)){if(l==null||!l[e])continue;const u=a;if(l.onlyAtBoundary){if(!(i&&o&&$(o)&&o.hasFormat(u)))continue;s=!0}n.hasFormat(u)&&n.toggleFormat(u)}s&&n.setStyle("")}const bb={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function Yi(n,e){return(function(t,r){if(!t.isCollapsed())return!1;const i=He(t.focus,r),o=q(i.origin,ai);if(!o)return!1;const s=t.focus.getNode();if(!o.is(s)&&!Fr(s,o))return!1;const a=Nt(i,oe(o,r));if(a.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const l=Nt(a.anchor.getSiblingCaret(),a.focus);let u=l.anchor.origin;for(const f of l){if(!At(f)||!f.origin.is(u.getParent()))return!1;u=f.origin}let c=o;for(const f of Or(oe(o,r))){if(!f.origin.is(c.getParent())){if(uo(f.origin)){const d=oe(c,r);return Mr(Nt(d,d)),!0}break}if(!ai(f.origin))break;c=f.origin}return!1})(n,e)||(function(t,r){if(!t.isCollapsed()||t.anchor.type!=="element")return!1;const i=He(t.anchor,r).getNodeAtCaret();return!(!ai(i)||i.isInline()||(Mr(Mi(We(ze(i,r)))),0))})(n,e)}function Gc(n){return Q(n)&&!n.isInline()&&!n.isIsolated()&&n.isKeyboardSelectable()}function Xi(n){const e=pi();e.add(n),pe(e)}function Zc(n,e){if(!n.isCollapsed())return!1;const t=n.focus,r=t.getNode(),i=e?"previous":"next",o=He(t,i);if(t.type==="element"&&x(r)&&xe(r)){const y=o.getNodeAtCaret();return!(y===null||!Gc(y))&&(Xi(y.__key),!0)}const s=q(x(r)?r:r.getParentOrThrow(),y=>x(y)&&!y.isInline()&&xe(y.getParent()));if(s===null)return!1;const a=oe(s,i).getNodeAtCaret();if(a===null||!Gc(a))return!1;if(s.getTextContentSize()===0)return Xi(a.__key),!0;const l=Ce().getRootElement();if(l===null)return!1;const u=Oe(l.ownerDocument.defaultView);if(u===null||u.rangeCount===0)return!1;const c=u.anchorNode,f=u.anchorOffset,d=u.focusNode,h=u.focusOffset;u.modify("move",e?"backward":"forward","line");const g=u.anchorNode,m=u.anchorOffset;if(g===null)return Qc(u,c,f,d,h),!1;const p=Xe(g);return Qc(u,c,f,d,h),p===null?!1:(g===c&&m===f||!p.is(s)&&!Fr(p,s))&&(Xi(a.__key),!0)}function Qc(n,e,t,r,i){e!==null&&r!==null&&n.setBaseAndExtent(e,t,r,i)}function ef(n,e){if(!n.isCollapsed())return!1;const t=n.focus.getNode(),r=q(x(t)?t:t.getParentOrThrow(),p=>x(p)&&!p.isInline());if(r===null)return!1;const i=Ce(),o=i.getRootElement();if(o===null)return!1;const s=o.ownerDocument.defaultView;if(s===null)return!1;let a=!1;for(const p of r.getChildren())if(x(p)&&p.isInline()){const y=i.getElementByKey(p.getKey());if(y!==null){const _=s.getComputedStyle(y).display;if(_==="inline-grid"||_==="inline-flex"){a=!0;break}}}if(!a)return!1;const l=oe(r,e?"previous":"next").getNodeAtCaret();if(l===null||!x(l)){if(e){const p=r.getFirstDescendant();$(p)?p.select(0,0):r.select(0,0)}else{const p=r.getLastDescendant();if($(p)){const y=p.getTextContentSize();p.select(y,y)}else{const y=r.getChildrenSize();r.select(y,y)}}return!0}const u=i.getElementByKey(l.getKey());if(u===null)return!1;const c=Oe(s);if(c===null||c.rangeCount===0)return!1;const f=c.getRangeAt(0).cloneRange();f.collapse(!0);const d=f.getBoundingClientRect(),h=u.getBoundingClientRect(),g=h.top+h.height/2;if(d.height>0){const p=Ko(d.left,g,o);if(p!==null&&u.contains(p.node)){const y=o.ownerDocument.createRange();return y.setStart(p.node,p.offset),y.collapse(!0),n.applyDOMRange(y),n.dirty=!0,!0}}const m=e?l.getLastDescendant():l.getFirstDescendant();if($(m)){const p=e?m.getTextContentSize():0;m.select(p,p)}else{const p=l.getChildrenSize();l.select(e?p:0,e?p:0)}return!0}function Gi(n,e){const t=oe(n,e),r=t.getAdjacentCaret();r!==null&&x(r.origin)&&!r.origin.isInline()&&r.origin.isShadowRoot()?Mr(Mi(t)):e==="next"?n.selectNext(0,0):n.selectPrevious()}function tf(n,e,t){t.preventDefault(),t.stopPropagation();const r=n.getNodes();if(r.length===0)return!0;const i=r.map(l=>oe(l,"next")).sort(xi),o=(e?i[0]:i[i.length-1]).origin,s=q(o,l=>l!==o&&x(l)&&!l.isInline())??me(),a=e?0:s.getChildrenSize();return s.select(a,a),!0}function kb(n,e=ji(bb)){return Je(n.registerCommand(Zo,()=>{const t=A();return de(t)?(t.clear(),!0):(N(t)&&rr(t,"click","both",e.peek()),!1)},G),n.registerCommand(hn,t=>{const r=A();return N(r)?(r.deleteCharacter(t),!0):!!de(r)&&(r.deleteNodes(),!0)},G),n.registerCommand(Sr,t=>{const r=A();return!!N(r)&&(r.deleteWord(t),!0)},G),n.registerCommand(wr,t=>{const r=A();return!!N(r)&&(r.deleteLine(t),!0)},G),n.registerCommand(An,t=>{const r=A();if(typeof t=="string")r!==null&&r.insertText(t);else{if(r===null)return!1;const i=t.dataTransfer;if(i!=null)Oa(i,r);else if(N(r)){const o=t.data;return o&&r.insertText(o),!0}}return!0},G),n.registerCommand(io,()=>{const t=A();return!!N(t)&&(t.removeText(),!0)},G),n.registerCommand(Tt,t=>{const r=A();return!(!N(r)&&!de(r))&&(Dd(r,t),!0)},G),n.registerCommand(Rp,t=>{const r=A();return!(!N(r)&&!de(r))&&(fm(r,t),!0)},G),n.registerCommand(fd,t=>{const r=A();if(!N(r)&&!de(r))return!1;const i=r.getNodes();for(const o of i){const s=q(o,a=>x(a)&&!a.isInline());s!==null&&s.setFormat(t)}return!0},G),n.registerCommand(gr,t=>{const r=A();return!!N(r)&&(r.insertLineBreak(t),!0)},G),n.registerCommand(jn,()=>{const t=A();return!!N(t)&&(t.insertParagraph(),!0)},G),n.registerCommand(Pp,()=>{const t=Fi(),r=A();return N(r)&&(t.setFormat(r.format),t.setStyle(r.style)),os([t]),!0},G),n.registerCommand(Ip,()=>yc(t=>{const r=t.getIndent();t.setIndent(r+1)}),G),n.registerCommand(vu,()=>yc(t=>{const r=t.getIndent();r>0&&t.setIndent(Math.max(0,r-1))}),G),n.registerCommand(il,t=>{const r=A();if(de(r)){const i=r.getNodes();if(i.length>0)return t.preventDefault(),Gi(i[0],"previous"),!0}else if(N(r)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===0})(r)||!t.shiftKey&&Yi(r,"previous")||!t.shiftKey&&Zc(r,!0)||!t.shiftKey&&ef(r,!0)))return t.preventDefault(),!0;return!1},G),n.registerCommand(ol,t=>{const r=A();if(de(r)){const i=r.getNodes();if(i.length>0)return t.preventDefault(),Gi(i[0],"next"),!0}else if(N(r)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===me().getChildrenSize()})(r)||!t.shiftKey&&Yi(r,"next")||!t.shiftKey&&Zc(r,!1)||!t.shiftKey&&ef(r,!1)))return t.preventDefault(),!0;return!1},G),n.registerCommand(rl,t=>{const r=A();if(de(r)){const i=r.getNodes();if(i.length>0)return t.preventDefault(),Gi(i[0],Wi(i[0])?"next":"previous"),!0}if(!N(r))return!1;if(!t.shiftKey&&Yi(r,Wi(r.anchor.getNode())?"next":"previous"))return t.preventDefault(),!0;if(t.shiftKey||rr(r,"arrow","start",e.peek()),pc(r,!0)){const i=t.shiftKey;return t.preventDefault(),mc(r,i,!0),!0}return!1},G),n.registerCommand(nl,t=>{const r=A();if(de(r)){const i=r.getNodes();if(i.length>0)return t.preventDefault(),Gi(i[0],Wi(i[0])?"previous":"next"),!0}if(!N(r))return!1;if(!t.shiftKey&&Yi(r,Wi(r.anchor.getNode())?"previous":"next"))return t.preventDefault(),!0;if(t.shiftKey||rr(r,"arrow","end",e.peek()),pc(r,!1)){const i=t.shiftKey;return t.preventDefault(),mc(r,i,!1),!0}return!1},G),n.registerCommand(ts,t=>{const r=A();if(!de(r)&&Xc(t.target))return!1;if(N(r)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:o}=i;if(o.offset!==0)return!1;const s=o.getNode();if(Ne(s))return!1;const a=_y(s);return a.getIndent()>0&&(a.is(s)||s.is(a.getFirstDescendant()))})(r))return t.preventDefault(),n.dispatchCommand(vu);if(mn&&vr)return!1}else if(!de(r))return!1;return t.preventDefault(),n.dispatchCommand(hn,!0)},G),n.registerCommand(al,t=>{const r=A();return!(!de(r)&&Xc(t.target))&&!(!N(r)&&!de(r))&&(t.preventDefault(),n.dispatchCommand(hn,!1))},G),n.registerCommand(bo,t=>{let r=A();if(de(r)){const i=r.getNodes();i.length===1&&Q(i[0])&&!i[0].isInline()&&(r=i[0].selectNext())}if(!N(r))return!1;if(rr(r,"enter","both",e.peek()),t!==null){if((mn||Ti||Ei)&&vr)return!1;if(t.preventDefault(),t.shiftKey)return n.dispatchCommand(gr,!1)}return n.dispatchCommand(jn)},G),n.registerCommand(sl,()=>{const t=A();return!!N(t)&&(n.blur(),!0)},G),n.registerCommand(cd,t=>{const[,r]=qi(t);if(r.length>0){const i=t.clientX,o=t.clientY,s=Ko(i,o,n.getRootElement());if(s!==null){const{offset:a,node:l}=s,u=Xe(l);if(u!==null){const c=fl();if($(u))c.anchor.set(u.getKey(),a,"text"),c.focus.set(u.getKey(),a,"text");else{const d=u.getParentOrThrow().getKey(),h=u.getIndexWithinParent()+1;c.anchor.set(d,h,"element"),c.focus.set(d,h,"element")}const f=Ot(c);pe(f)}n.dispatchCommand(Vc,r)}return t.preventDefault(),!0}return ib(t,n)},G),n.registerCommand(dd,t=>{const[r]=qi(t),i=A();return!(r&&!N(i))&&(N(i)&&!i.isCollapsed()&&t.dataTransfer!==null&&(yg(t.dataTransfer,Vl(i)),nb(t.dataTransfer,n)),!0)},G),n.registerCommand(hd,t=>{const[r]=qi(t),i=A();if(r&&!N(i))return!1;const o=t.clientX,s=t.clientY,a=Ko(o,s,n.getRootElement());if(a!==null){const l=Xe(a.node);Q(l)&&t.preventDefault()}return!0},G),n.registerCommand(ul,()=>{const t=A();return $m(N(t)&&fs(t.anchor.getNode())!==null?t:null),!0},G),n.registerCommand($i,t=>(ja(n,It(t,ClipboardEvent)?t:null),!0),G),n.registerCommand(ns,t=>((async function(r,i){await ja(i,It(r,ClipboardEvent)?r:null),i.update(()=>{const o=A();N(o)?o.removeText():de(o)&&o.getNodes().forEach(s=>s.remove())},{tag:vd})})(t,n),!0),G),n.registerCommand(Pr,t=>{const[,r,i]=qi(t);return r.length>0&&!i?(n.dispatchCommand(Vc,r),!0):Ft(t.target)&&bl(t.target)?!1:A()!==null&&((function(o,s){o.preventDefault(),s.update(()=>{const a=A(),l=It(o,InputEvent)||It(o,KeyboardEvent)?null:o.clipboardData;l!=null&&a!==null&&Oa(l,a)},{tag:Cd})})(t,n),!0)},G),n.registerCommand(ud,()=>{const t=A();return N(t)&&rr(t,"space","both",e.peek()),!1},G),n.registerCommand(ll,()=>{const t=A();return N(t)&&rr(t,"tab","both",e.peek()),!1},G),n.registerCommand(ad,t=>{const r=A();if(de(r))return tf(r,!1,t);if(!N(r))return!1;const{anchor:i}=r;if(i.type!=="element"||i.offset!==0)return!1;const o=i.getNode();if(!x(o))return!1;const s=o.getFirstChild();if(!Q(s)||!s.isInline())return!1;const a=o.getKey(),l=o.selectEnd();return t.shiftKey&&l.anchor.set(a,0,"element"),t.preventDefault(),t.stopPropagation(),!0},G),n.registerCommand(ld,t=>{const r=A();if(de(r))return tf(r,!0,t);if(!N(r))return!1;const{anchor:i,focus:o}=r,s=q(o.getNode(),u=>x(u)&&!u.isInline());if(s===null)return!1;const a=s.getFirstChild();if(!Q(a)||!a.isInline()||q(i.getNode(),u=>x(u)&&!u.isInline())!==s)return!1;const l=s.getKey();return(o.type!=="element"||o.key!==l||o.offset!==0)&&(r.focus.set(l,0,"element"),t.shiftKey||r.anchor.set(l,0,"element"),t.preventDefault(),t.stopPropagation(),!0)},G))}function xb(n,e){const t={};for(const r of n){const i=e(r);i&&(t[i]?t[i].push(r):t[i]=[r])}return t}function kg(n){const e=xb(n,t=>t.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const nf=/\s/,Ra=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,Cb=/^\s{0,3}$/;function Pa(n){if(!Ht(n))return!1;const e=n.getFirstChild();return e==null||n.getChildrenSize()===1&&$(e)&&Cb.test(e.getTextContent())}function Ia(n){return n.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(Number(t)))}const xg=/^(\s*)(\d{1,})\.\s/,Cg=/^(\s*)[-*+]\s/,vb=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,La=/^(#{1,6})\s/,vg=/^>\s/,Sg=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,Ba=/^[ \t]*`{3,}$/,Sb=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,wb=/^(?:\|)(.+)(?:\|)\s?$/;function wg(n){if(n[0]!=="|")return!1;const{length:e}=n;let t=1,r=0;for(;t<e;){let i=t;for(n[i]===" "&&i++,n[i]===":"&&i++;n[i]==="-";)i++;if(n[i]===":"&&i++,n[i]===" "&&i++,n[i]!=="|")break;r++,t=i+1}return r>0&&(t===e||t===e-1&&/\s/.test(n[t]))}const rf=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,of=/^<\/[a-z_][\w-]*\s*>/i,sf=n=>new RegExp(`(?:${n.source})$`,n.flags),ti=Ni("mdListMarker",{parse:n=>typeof n=="string"&&/^[-*+]$/.test(n)?n:"-",resetOnCopyNode:!0}),af=Ni("mdCodeFence",{parse:n=>typeof n=="string"&&/^`{3,}$/.test(n)?n:"```",resetOnCopyNode:!0}),Tg=Ni("mdHardLineBreak",{parse:n=>typeof n=="string"&&/^(\\| {2,})$/.test(n)?n:"",resetOnCopyNode:!0});function Ka(n){if(n.endsWith("\\"))return[n.slice(0,-1),"\\"];const e=n.match(/^(.*?\S)( {2,})$/);return e?[e[1],e[2]]:null}function Tb(n){const e=n.getChildren(),t=e.length-1,r=e[t];if(!$(r))return null;const i=r.getTextContent(),o=Ka(i);if(o!==null){const[s,a]=o;return r.setTextContent(s),a}return/^ {2,}$/.test(i)&&(function(s,a){for(let l=a-1;l>=0;l--){if(Pe(s[l]))return!1;if(/\S/.test(s[l].getTextContent()))return!0}return!1})(e,t)?(r.setTextContent(""),i):null}function Eg(n){const e=Wt(),t=Tb(n);return t!==null&&hr(e,Tg,t),e}const Ng=n=>(e,t,r,i)=>{const o=n(r);o.append(...t),e.replace(o),i||o.select(0,0)},Dg=n=>(e,t,r,i)=>{if(bg(e))return!1;const o=e.getPreviousSibling(),s=e.getNextSibling(),a=Ut(n==="check"?r[3]==="x":void 0),l=r[0].trim()[0],u=n!=="bullet"&&n!=="check"||l!==ti.parse(l)?void 0:l;if(V(s)&&s.getListType()===n){u&&hr(s,ti,u);const f=s.getFirstChild();f!==null?f.insertBefore(a):s.append(a),n==="number"&&s.setStart(Number(r[2])),e.remove()}else if(V(o)&&o.getListType()===n)u&&hr(o,ti,u),o.append(a),e.remove();else{const f=Dt(n,n==="number"?Number(r[2]):void 0);u&&hr(f,ti,u),f.append(a),e.replace(f)}a.append(...t),i||a.select(0,0);const c=(function(f){const d=f.match(/\t/g),h=f.match(/ /g);let g=0;return d&&(g+=d.length),h&&(g+=Math.floor(h.length/4)),g})(r[1]);c&&a.setIndent(c)},Yl=(n,e,t,r)=>{const i=[],o=n.getChildren();let s=0;for(const a of o)if(ne(a)){if(a.getChildrenSize()===1){const h=a.getFirstChild();if(V(h)){const g=Yl(h,e,t+1,r);g&&i.push(g);continue}}if(r&&!a.getChildren().some(h=>h.isSelected(r)))continue;const l=" ".repeat(4*t),u=n.getListType(),c=Di(n,ti),f=u==="number"?`${n.getStart()+s}. `:u==="check"?`${c} [${a.getChecked()?"x":" "}] `:c+" ";let d=e(a);u!=="number"&&(d=d.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(l+f+d),s++}return i.join(`
|
|
13
|
+
`)},Eb={dependencies:[bs],export:(n,e)=>{if(!bg(n))return null;const t=Number(n.getTag().slice(1));return"#".repeat(t)+" "+e(n)},regExp:La,replace:Ng(n=>{const e="h"+n[1].length;return jr(e)}),triggerOnEnter:!0,type:"element"},Nb={dependencies:[_s],export:(n,e)=>{if(!qo(n))return null;const t=e(n).split(`
|
|
14
|
+
`),r=[];for(const i of t)r.push("> "+i);return r.join(`
|
|
15
|
+
`)},regExp:vg,replace:(n,e,t,r)=>{if(r){const o=n.getPreviousSibling();if(qo(o))return o.splice(o.getChildrenSize(),0,[Eg(o),...e]),void n.remove()}const i=Wr();i.append(...e),n.replace(i),r||i.select(0,0)},triggerOnEnter:!0,type:"element"},go={dependencies:[ys],export:n=>{if(!ql(n))return null;const e=n.getTextContent();let t=Di(n,af);if(e.indexOf(t)>-1){const r=e.match(/`{3,}/g);if(r){const i=Math.max(...r.map(o=>o.length));t="`".repeat(i+1)}}return t+(n.getLanguage()||"")+(e?`
|
|
16
|
+
`+e:"")+`
|
|
17
|
+
`+t},handleImportAfterStartMatch:({lines:n,rootNode:e,startLineIndex:t,startMatch:r})=>{const i=r[1],o=i.trim().length,s=n[t],a=r.index+i.length,l=s.slice(a),u=new RegExp(`\`{${o},}$`);if(u.test(l)){const h=l.match(u),g=l.slice(0,l.lastIndexOf(h[0])),m=[...r];return m[2]="",go.replace(e,null,m,h,[g],!0),[!0,t]}const c=new RegExp(`^[ \\t]*\`{${o},}$`);for(let h=t+1;h<n.length;h++){const g=n[h];if(c.test(g)){const m=g.match(c),p=n.slice(t+1,h),y=s.slice(r[0].length);return y.length>0&&p.unshift(y),go.replace(e,null,r,m,p,!0),[!0,h]}}const f=n.slice(t+1),d=s.slice(r[0].length);return d.length>0&&f.unshift(d),go.replace(e,null,r,null,f,!0),[!0,n.length-1]},regExpEnd:{optional:!0,regExp:Ba},regExpStart:Sg,replace:(n,e,t,r,i,o)=>{let s,a;const l=t[1]?t[1].trim():"```",u=t[2]||void 0;if(!e&&i){if(i.length===1)r?(s=et(u),a=i[0]):(s=et(u),a=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(s=et(u),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(" ")&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();a=i.join(`
|
|
18
|
+
`)}hr(s,af,l);const c=we(a);s.append(c),n.append(s)}else e&&Ng(c=>et(c?c[2]:void 0))(n,e,t,o)},type:"multiline-element"},Db={dependencies:[Gn,vn],export:(n,e,t)=>V(n)?Yl(n,e,0,t):null,regExp:Cg,replace:Dg("bullet"),triggerOnEnter:!0,type:"element"},$b={dependencies:[Gn,vn],export:(n,e,t)=>V(n)?Yl(n,e,0,t):null,regExp:xg,replace:Dg("number"),triggerOnEnter:!0,type:"element"},Fb={format:["code"],tag:"`",type:"text-format"},Ab={format:["highlight"],tag:"==",type:"text-format"},zb={format:["bold","italic"],tag:"***",type:"text-format"},Ob={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Mb={format:["bold"],tag:"**",type:"text-format"},jb={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Rb={format:["strikethrough"],tag:"~~",type:"text-format"},Pb={format:["italic"],tag:"*",type:"text-format"},Ib={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Lb={dependencies:[bn],export:(n,e,t)=>{if(!Ze(n)||ur(n))return null;const r=e(n);let i=n.getTitle();return i!=null&&(i=i.replace(/([\\"])/g,"\\$1")),i?`[${r}](${n.getURL()} "${i}")`:`[${r}](${n.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(n,e)=>{if(q(n,Ze))return;const[,t,r,i]=e,o=r!=null?Ia(r):void 0,s=i!=null?Ia(i):void 0,a=Si(o,{title:s}),l=t.split("[").length-1,u=t.split("]").length-1;let c=t,f="";if(l<u)return;if(l>u){const h=t.split("[");f="["+h[0],c=h.slice(1).join("[")}const d=we(c);return d.setFormat(n.getFormat()),a.append(d),n.replace(a),f&&a.insertBefore(we(f)),d},trigger:")",type:"text-match"},Bb=[Eb,Nb,Db,$b],Kb=[go],Wb=[Fb,zb,Ob,Mb,jb,Ab,Pb,Ib,Rb],qb=[Lb],Xl=[...Bb,...Kb,...Wb,...qb];function Ub(n,e=!1){const t=n.split(`
|
|
19
|
+
`);let r=0;const i=[];for(let o=0;o<t.length;o++){const s=t[o],a=s.trimEnd(),l=i[i.length-1],u=o<t.length-1?Ka(s):null,c=l!==void 0&&Ka(l)!==null;if(Sb.test(a))i.push(a);else if(r===0){{const f=a.match(Sg);if(f){r=f[1].trim().length,i.push(a);continue}}a===""||l===""||!l||La.test(l)||La.test(a)||vg.test(a)||xg.test(a)||Cg.test(a)||vb.test(a)||wb.test(a)||wg(a)||c||!e||rf.test(a)||of.test(a)||sf(of).test(l)||sf(rf).test(l)||Ba.test(l)?i.push(!e&&a!==""||u!==null?s:a):i[i.length-1]=l+" "+(u===null?a:s).trimStart()}else{if(Ba.test(a)&&a.trim().length>=r){r=0,i.push(a);continue}i.push(s)}}return i.join(`
|
|
20
|
+
`)}function Hb(n,e,t,r,i){for(const o of e){if(!o.export)continue;const s=o.export(n,a=>Uo(a,t,r,void 0,void 0,i));if(s!=null)return s}return x(n)?Uo(n,t,r,void 0,void 0,i):Q(n)?n.getTextContent():null}function Uo(n,e,t,r,i,o=!1){const s=[],a=n.getChildren();r||(r=[]),i||(i=[]);e:for(const l of a){for(const u of t){if(!u.export)continue;const c=u.export(l,f=>Uo(f,e,t,r,[...i,...r],o),(f,d)=>lf(f,d,e,r,i,o));if(c!=null){s.push(c);continue e}}Pe(l)?s.push(Jb(l)):$(l)?s.push(lf(l,l.getTextContent(),e,r,i,o)):x(l)?s.push(Uo(l,e,t,r,i,o)):Q(l)&&s.push(l.getTextContent())}return s.join("")}function Jb(n){return Di(n,Tg)+`
|
|
21
|
+
`}function lf(n,e,t,r,i,o=!1){const s=n.hasFormat("code");let a,l,u,c,f=e;if(s||(f=o?f.replace(/([*_`~])/g,"\\$1"):f.replace(/([*_`~\\])/g,"\\$1")),s){const{fence:_,padded:b}=(function(k){const S=k.match(/`+/g),C=S?Math.max(...S.map(w=>w.length)):0;return{fence:"`".repeat(C+1),padded:k.length===0||k.includes("`")||/^\s/.test(k)&&/\s$/.test(k)?` ${k} `:k}})(e);a="",u="",l=_+b+_,c=!1}else{const _=f.match(/^(\s*)(.*?)(\s*)$/s)||["","",f,""];a=_[1],l=_[2],u=_[3],c=l===""}let d="",h="",g="";const m=uf(n,!0),p=uf(n,!1),y=new Set;for(const _ of t){const b=_.format[0],k=_.tag;b!=="code"&&cf(n,b)&&!y.has(b)&&(y.add(b),cf(m,b)&&r.find(S=>S.tag===k)||(r.push({format:b,tag:k}),d+=k))}for(let _=0;_<r.length;_++){const b=Wa(n,r[_].format),k=Wa(p,r[_].format);if(b&&k)continue;const S=[...r];for(;S.length>_;){const C=S.pop();i&&C&&i.find(w=>w.tag===C.tag)||(C&&typeof C.tag=="string"&&(b?k||(g+=C.tag):h+=C.tag),r.pop())}break}return c&&!n.hasFormat("code")?h+f:h+a+d+l+g+u}function uf(n,e){const t=e?n.getPreviousSibling():n.getNextSibling();return $(t)?t:null}function Wa(n,e){return $(n)&&n.hasFormat(e)}function cf(n,e){return!!Wa(n,e)&&(e==="code"||!n||!/^\s*$/.test(n.getTextContent()))}function Vb(n,e){const t=n.getTextContent(),r=e.transformersByTag["`"],i=[];let o=null;if(r){const f=(function(d){const h=_=>{let b=0;for(let k=_-1;k>=0&&d[k]==="\\";k--)b++;return b%2==1},g=[];let m=0;for(;m<d.length;)if(d[m]==="`"){let _=1;for(;m+_<d.length&&d[m+_]==="`";)_++;g.push({index:m,length:_}),m+=_}else m++;const p=[];let y=0;for(;y<g.length;){const _=g[y];if(h(_.index)){y++;continue}let b=-1;for(let C=y+1;C<g.length;C++)if(g[C].length===_.length){b=C;break}if(b===-1){y++;continue}const k=g[b];let S=d.slice(_.index+_.length,k.index);S.length>=2&&S.startsWith(" ")&&S.endsWith(" ")&&/[^ ]/.test(S)&&(S=S.slice(1,-1)),p.push({content:S,endIndex:k.index+k.length,startIndex:_.index}),y=b+1}return p})(t);for(const d of f)o||(o={content:d.content,endIndex:d.endIndex,startIndex:d.startIndex,tag:"`"}),i.push({end:d.endIndex,start:d.startIndex})}const s=(function(f,d,h=[]){const g=[],m=new Set(Object.keys(d.transformersByTag).filter(b=>b[0]!=="`").map(b=>b[0])),p=b=>{let k=0;for(let S=b-1;S>=0&&f[S]==="\\";S--)k++;return k%2==1},y=b=>h.some(k=>b>=k.start&&b<k.end);let _=0;for(;_<f.length;){const b=f[_];if(!m.has(b)||p(_)||y(_)){_++;continue}let k=1;for(;_+k<f.length&&f[_+k]===b;)k++;const S=ff(b,f,_,k,!0),C=ff(b,f,_,k,!1);(S||C)&&g.push({active:!0,canClose:C,canOpen:S,char:b,index:_,length:k}),_+=k}return g})(t,e,i),a=s.length>0?(function(f,d,h){const g={};let m=0,p=null;for(;m<d.length;){const y=d[m];if(!y.active||!y.canClose||y.length===0){m++;continue}const _=`${y.char}${y.canOpen}${y.length%3}`,b=g[_]??-1;let k=!1;for(let S=m-1;S>b;S--){const C=d[S];if(!C.active||!C.canOpen||C.length===0||C.char!==y.char||(C.canClose||y.canOpen)&&(C.length+y.length)%3==0&&C.length%3!=0&&y.length%3!=0)continue;const w=Math.min(C.length,y.length),v=Object.keys(h.transformersByTag).filter(E=>E[0]===C.char&&E.length<=w).sort((E,O)=>O.length-E.length)[0];if(!v)continue;k=!0;const T=v.length,F={content:f.slice(C.index+C.length,y.index),endIndex:y.index+T,startIndex:C.index+(C.length-T),tag:v};(!p||F.startIndex<p.startIndex||F.startIndex===p.startIndex&&F.endIndex>p.endIndex)&&(p=F);for(let E=S+1;E<m;E++)d[E].active=!1;C.length-=T,y.length-=T,C.active=C.length>0,y.length>0?y.index+=T:(y.active=!1,m++);break}k||(g[_]=m-1,y.canOpen||(y.active=!1),m++)}return p})(t,s,e):null;let l=null,u=null;if(o&&a?a.startIndex<=o.startIndex&&a.endIndex>=o.endIndex?(l=a,u=e.transformersByTag[a.tag]):(l=o,u=r):o?(l=o,u=r):a&&(l=a,u=e.transformersByTag[a.tag]),!l||!u)return null;const c=[t.slice(l.startIndex,l.endIndex),l.tag,l.content];return c.index=l.startIndex,c.input=t,{endIndex:l.endIndex,isCodeSpan:u===r,match:c,startIndex:l.startIndex,transformer:u}}function ff(n,e,t,r,i){if(!df(e,t,r,i))return!1;if(n==="*")return!0;if(n==="_"){if(!df(e,t,r,!i))return!0;const o=i?e[t-1]:e[t+r];return o!==void 0&&Ra.test(o)}return!0}function df(n,e,t,r){const i=n[e-1],o=n[e+t],[s,a]=r?[o,i]:[i,o];return s!==void 0&&!nf.test(s)&&(!Ra.test(s)||a===void 0||nf.test(a)||Ra.test(a))}function ir(n){return $(n)&&!n.hasFormat("code")}function En(n,e,t){let r=Vb(n,e),i=(function(s,a){const l=s;let u,c,f,d;for(const h of a){if(!h.replace||!h.importRegExp)continue;const g=l.getTextContent().match(h.importRegExp);if(!g)continue;const m=g.index||0,p=h.getEndIndex?h.getEndIndex(l,g):m+g[0].length;p!==!1&&(u===void 0||c===void 0||m<u&&(p>c||p<=u))&&(u=m,c=p,f=h,d=g)}return u===void 0||c===void 0||f===void 0||d===void 0?null:{endIndex:c,match:d,startIndex:u,transformer:f}})(n,t);if(r&&i&&(r.isCodeSpan?i.startIndex<=r.startIndex&&i.endIndex>=r.endIndex?r=null:i=null:r.startIndex<=i.startIndex&&r.endIndex>=i.endIndex||i.startIndex>r.endIndex?i=null:r=null),r){const s=(function(a,l,u,c,f){const d=a.getTextContent();let h,g,m;if(f[0]===d?h=a:l===0?[h,g]=a.splitText(u):[m,h,g]=a.splitText(l,u),h.setTextContent(f[2]),c)for(const p of c.format)h.hasFormat(p)||h.toggleFormat(p);return{nodeAfter:g,nodeBefore:m,transformedNode:h}})(n,r.startIndex,r.endIndex,r.transformer,r.match);ir(s.nodeAfter)&&En(s.nodeAfter,e,t),ir(s.nodeBefore)&&En(s.nodeBefore,e,t),ir(s.transformedNode)&&En(s.transformedNode,e,t)}else if(i){const s=(function(a,l,u,c,f){let d,h,g;return l===0?[d,h]=a.splitText(u):[g,d,h]=a.splitText(l,u),c.replace?{nodeAfter:h,nodeBefore:g,transformedNode:c.replace(d,f)||void 0}:null})(n,i.startIndex,i.endIndex,i.transformer,i.match);if(!s)return;ir(s.nodeAfter)&&En(s.nodeAfter,e,t),ir(s.nodeBefore)&&En(s.nodeBefore,e,t),ir(s.transformedNode)&&En(s.transformedNode,e,t)}const o=Ia(n.getTextContent());n.setTextContent(o)}function Yb(n,e,t,r=!1){const i=kg(t),o=(function(u){const c={},f={},d=[];for(const h of u){const{tag:g}=h;c[g]=h;const m=g.replace(/(\*|\^|\+)/g,"\\$1");d.push(m),g.length===1?f[g]=g==="`"?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${m}])(${m})((\\\\${m})?.*?[^${m}\\s](\\\\${m})?)(${m})(?![\\\\${m}])`):f[g]=new RegExp(`(^|[^\\\\])(${m})((\\\\${m})?.*?[^\\s](\\\\${m})?)(${m})(?!\\\\)`)}return{fullMatchRegExpByTag:f,openTagsRegExp:new RegExp(`(${d.join("|")})`,"g"),transformersByTag:c}})(i.textFormat),s=n.split(`
|
|
22
|
+
`),a=s.length;for(let u=0;u<a;u++){const c=s[u],[f,d]=Xb(s,u,i.multilineElement,e);f?u=d:Gb(c,e,i.element,o,i.textMatch,r)}const l=e.getChildren();for(const u of l)if(!r&&Pa(u)&&e.getChildrenSize()>1)u.remove();else if(x(u))for(const c of u.getAllTextNodes())Zb(c)}function Xb(n,e,t,r){for(const i of t){const{handleImportAfterStartMatch:o,regExpEnd:s,regExpStart:a,replace:l}=i,u=n[e].match(a);if(!u)continue;if(o){const g=o({lines:n,rootNode:r,startLineIndex:e,startMatch:u,transformer:i});if(g===null)continue;if(g)return g}const c=typeof s=="object"&&"regExp"in s?s.regExp:s,f=s&&typeof s=="object"&&"optional"in s?s.optional:!s;let d=e;const h=n.length;for(;d<h;){const g=c?n[d].match(c):null;if(!g&&(!f||f&&d<h-1)){d++;continue}if(g&&e===d&&g.index===u.index){d++;continue}const m=[];if(g&&e===d)m.push(n[e].slice(u[0].length,-g[0].length));else for(let p=e;p<=d;p++)if(p===e){const y=n[p].slice(u[0].length);m.push(y)}else if(p===d&&g){const y=n[p].slice(0,-g[0].length);m.push(y)}else m.push(n[p]);if(l(r,null,u,g,m,!0)!==!1)return[!0,d];break}}return[!1,e]}function Gb(n,e,t,r,i,o){const s=we(n),a=Y();a.append(s),e.append(a);for(const{regExp:l,replace:u}of t){const c=n.match(l);if(c&&(s.setTextContent(n.slice(c[0].length)),u(a,[s],c,!0)!==!1))break}if(En(s,r,i),a.getParent()!==null&&n.length>0){const l=a.getPreviousSibling();if(!o&&(Ht(l)||qo(l)||V(l))){let u=l;if(V(l)){const c=l.getLastDescendant();u=c==null?null:q(c,ne)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[Eg(u),...a.getChildren()]),a.remove())}}}function Zb(n){const e=new Set,t=n.getTextContent();let r=t.indexOf(" ");for(;r!==-1;)e.add(r),e.add(r+1),r=t.indexOf(" ",r+1);n.splitText(...e).forEach(i=>{i.getTextContent()===" "&&i.replace(Fi())})}function $g(n,e=Xl,t,r=!1,i=!1){const o=r?n:Ub(n,i),s=t||me();s.clear(),Yb(o,s,e,r),A()!==null&&s.selectStart()}function Gl(n=Xl,e,t=!1){return(function(i,o=!1){const s=kg(i),a=[...s.multilineElement,...s.element],l=!o,u=s.textFormat.filter(c=>c.format.length===1).sort((c,f)=>Number(c.format.includes("code"))-Number(f.format.includes("code")));return c=>{const f=[],d=(c||me()).getChildren();for(let h=0;h<d.length;h++){const g=d[h],m=Hb(g,a,u,s.textMatch,o);m!=null&&f.push(l&&h>0&&!Pa(g)&&!Pa(d[h-1])?`
|
|
23
|
+
`.concat(m):m)}return f.join(`
|
|
24
|
+
`)}})(n,t)(e)}const kr=/^(\d+(?:\.\d+)?)px$/,le={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class Sn extends ve{__colSpan;__rowSpan;__headerState;__width;__backgroundColor;__verticalAlign;$config(){return this.config("tablecell",{extends:ve,importDOM:{td:()=>({conversion:hf,priority:0}),th:()=>({conversion:hf,priority:0})}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__rowSpan=e.__rowSpan,this.__backgroundColor=e.__backgroundColor,this.__verticalAlign=e.__verticalAlign,this.__colSpan=e.__colSpan,this.__headerState=e.__headerState,this.__width=e.__width}updateFromJSON(e){return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan||1).setRowSpan(e.rowSpan||1).setWidth(e.width||void 0).setBackgroundColor(e.backgroundColor||null).setVerticalAlign(e.verticalAlign||void 0)}constructor(e=le.NO_STATUS,t=1,r,i){super(i),this.__colSpan=t,this.__rowSpan=1,this.__headerState=e,this.__width=r,this.__backgroundColor=null,this.__verticalAlign=void 0}createDOM(e){const t=re().createElement(this.getTag());return this.__width&&(t.style.width=`${this.__width}px`),this.__colSpan>1&&(t.colSpan=this.__colSpan),this.__rowSpan>1&&(t.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(t.style.backgroundColor=this.__backgroundColor),qa(this.__verticalAlign)&&(t.style.verticalAlign=this.__verticalAlign),Ee(t,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),t}exportDOM(e){const t=super.exportDOM(e);if(K(t.element)){const r=t.element;r.setAttribute("data-temporary-table-cell-lexical-key",this.getKey()),r.style.border="1px solid black",this.__colSpan>1&&(r.colSpan=this.__colSpan),this.__rowSpan>1&&(r.rowSpan=this.__rowSpan),r.style.width=`${this.getWidth()||75}px`,r.style.verticalAlign=this.getVerticalAlign()||"top",r.style.textAlign="start",this.__backgroundColor===null&&this.hasHeader()&&(r.style.backgroundColor="#f2f3f5")}return t}exportJSON(){return{...super.exportJSON(),...qa(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(e){const t=this.getWritable();return t.__colSpan=e,t}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(e){const t=this.getWritable();return t.__rowSpan=e,t}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e,t=le.BOTH){const r=this.getWritable();return r.__headerState=e&t|r.__headerState&~t,r}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){const t=this.getWritable();return t.__width=e,t}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){const t=this.getWritable();return t.__backgroundColor=e,t}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(e){const t=this.getWritable();return t.__verticalAlign=e||void 0,t}toggleHeaderStyle(e){const t=this.getWritable();return(t.__headerState&e)===e?t.__headerState-=e:t.__headerState+=e,t}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==le.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor||e.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function qa(n){return n==="middle"||n==="bottom"}function hf(n){const e=n,t=n.nodeName.toLowerCase();let r;kr.test(e.style.width)&&(r=parseFloat(e.style.width));let i=le.NO_STATUS;if(t==="th"){const m=e.getAttribute("scope");if(m==="col")i=le.COLUMN;else if(m==="row")i=le.ROW;else{const p=e.parentElement,y=K(p)&&p.nodeName.toLowerCase()==="tr"&&K(p.parentElement)&&(p.parentElement.nodeName.toLowerCase()==="thead"||p.rowIndex===0),_=e.cellIndex===0;y&&(i|=le.ROW),_&&(i|=le.COLUMN),i===le.NO_STATUS&&(i=le.ROW)}}const o=ut(i,e.colSpan,r);o.__rowSpan=e.rowSpan;const s=e.style.backgroundColor;s!==""&&(o.__backgroundColor=s);const a=e.style.verticalAlign;qa(a)&&(o.__verticalAlign=a);const l=e.style,u=(l&&l.textDecoration||"").split(" "),c=l.fontWeight==="700"||l.fontWeight==="bold",f=u.includes("line-through"),d=l.fontStyle==="italic",h=u.includes("underline"),g=l.color;return{after:m=>{const p=[];let y=null;const _=()=>{if(y){const b=y.getFirstChild();Pe(b)&&y.getChildrenSize()===1&&b.remove()}};for(const b of m)if(Tl(b)||$(b)||Pe(b)){if($(b)&&(c&&b.toggleFormat("bold"),f&&b.toggleFormat("strikethrough"),d&&b.toggleFormat("italic"),h&&b.toggleFormat("underline"),g)){const k=b.getStyle();k.includes("color:")||b.setStyle(k+`color: ${g};`)}y?y.append(b):(y=Y().append(b),p.push(y))}else p.push(b),_(),y=null;return _(),p.length===0&&p.push(Y()),p},node:o}}function ut(n=le.NO_STATUS,e=1,t){return Ge(new Sn(n,e,t))}function H(n){return n instanceof Sn}const Qb=B("INSERT_TABLE_COMMAND");function U(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class Ri extends ve{__height;$config(){return this.config("tablerow",{extends:ve,importDOM:{tr:()=>({conversion:ek,priority:0})}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__height=e.__height}updateFromJSON(e){return super.updateFromJSON(e).setHeight(e.height)}constructor(e=void 0,t){super(t),this.__height=e}exportJSON(){const e=this.getHeight();return{...super.exportJSON(),...e===void 0?void 0:{height:e}}}createDOM(e){const t=re().createElement("tr");return this.__height&&(t.style.height=`${this.__height}px`),Ee(t,e.theme.tableRow),t}extractWithChild(e,t,r){return r==="html"}isShadowRoot(){return!0}setHeight(e){const t=this.getWritable();return t.__height=e,t}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function ek(n){const e=n;let t;return kr.test(e.style.height)&&(t=parseFloat(e.style.height)),{after:r=>Po(r,H),node:Un(t)}}function Un(n){return Ge(new Ri(n))}function be(n){return n instanceof Ri}function tk(n,e,t=!0){const r=Pi();for(let i=0;i<n;i++){const o=Un();for(let s=0;s<e;s++){let a=le.NO_STATUS;typeof t=="object"?(i===0&&t.rows&&(a|=le.ROW),s===0&&t.columns&&(a|=le.COLUMN)):t&&(i===0&&(a|=le.ROW),s===0&&(a|=le.COLUMN));const l=ut(a),u=Y();u.append(we()),l.append(u),o.append(l)}r.append(o)}return r}function nk(n){const e=q(n,t=>ge(t));if(ge(e))return e;throw new Error("Expected table cell to be inside of table.")}const Ua=(n,e)=>n===le.BOTH||n===e?e:le.NO_STATUS;function rk(n,e=!0){const[,,t]=Lt(n),[r,i]=zt(t,n,n),o=r[0].length,{startRow:s}=i;let a=null;if(e){const l=s+n.__rowSpan-1,u=r[l],c=Un();for(let d=0;d<o;d++){const{cell:h,startRow:g}=u[d];if(g+h.__rowSpan-1<=l){const m=u[d].cell.__headerState,p=Ua(m,le.COLUMN);c.append(ut(p).append(Y()))}else h.setRowSpan(h.__rowSpan+1)}const f=t.getChildAtIndex(l);be(f)||U(256),f.insertAfter(c),a=c}else{const l=s,u=r[l],c=Un();for(let d=0;d<o;d++){const{cell:h,startRow:g}=u[d];if(g===l){const m=u[d].cell.__headerState,p=Ua(m,le.COLUMN);c.append(ut(p).append(Y()))}else h.setRowSpan(h.__rowSpan+1)}const f=t.getChildAtIndex(l);be(f)||U(257),f.insertBefore(c),a=c}return a}function ik(n,e=!0,t=!0){const[,,r]=Lt(n),[i,o]=zt(r,n,n),s=i.length,{startColumn:a}=o,l=e?a+n.__colSpan-1:a-1,u=r.getFirstChild();be(u)||U(120);let c=null;function f(g=le.NO_STATUS){const m=ut(g).append(Y());return c===null&&(c=m),m}let d=u;e:for(let g=0;g<s;g++){if(g!==0){const S=d.getNextSibling();be(S)||U(121),d=S}const m=i[g],p=m[l<0?0:l].cell.__headerState,y=Ua(p,le.ROW);if(l<0){Fg(d,f(y));continue}const{cell:_,startColumn:b,startRow:k}=m[l];if(b+_.__colSpan-1<=l){let S=_,C=k,w=l;for(;C!==g&&S.__rowSpan>1;){if(w-=_.__colSpan,!(w>=0)){d.append(f(y));continue e}{const{cell:v,startRow:T}=m[w];S=v,C=T}}S.insertAfter(f(y))}else _.setColSpan(_.__colSpan+1)}c!==null&&t&&ok(c);const h=r.getColWidths();if(h){const g=[...h],m=l<0?0:l,p=g[m];g.splice(m,0,p),r.setColWidths(g)}return c}function ok(n){const e=n.getFirstDescendant();e==null?n.selectStart():e.getParentOrThrow().selectStart()}function Fg(n,e){const t=n.getFirstChild();t!==null?t.insertBefore(e):n.append(e)}function sk(n){if(n.length===0)return null;const e=nk(n[0]),[t]=en(e,null,null);let r=1/0,i=-1/0,o=1/0,s=-1/0;const a=new Set;for(const h of t)for(const g of h){if(!g||!g.cell)continue;const m=g.cell.getKey();if(!a.has(m)&&n.some(p=>p.is(g.cell))){a.add(m);const p=g.startRow,y=g.startColumn,_=g.cell.__rowSpan||1,b=g.cell.__colSpan||1;r=Math.min(r,p),i=Math.max(i,p+_-1),o=Math.min(o,y),s=Math.max(s,y+b-1)}}if(r===1/0||o===1/0)return null;const l=i-r+1,u=s-o+1,c=t[r][o];if(!c.cell)return null;const f=c.cell;f.setColSpan(u),f.setRowSpan(l);const d=new Set([f.getKey()]);for(let h=r;h<=i;h++)for(let g=o;g<=s;g++){const m=t[h][g];if(!m.cell)continue;const p=m.cell,y=p.getKey();d.has(y)||(d.add(y),ak(p)||f.append(...p.getChildren()),p.remove())}return f.getChildrenSize()===0&&f.append(Y()),f}function ak(n){if(n.getChildrenSize()!==1)return!1;const e=n.getFirstChildOrThrow();return!(!Ht(e)||!e.isEmpty())}function lk(n){const[e,t,r]=Lt(n),i=e.__colSpan,o=e.__rowSpan;if(i===1&&o===1)return;const[s,a]=zt(r,e,e),{startColumn:l,startRow:u}=a,c=e.__headerState&le.COLUMN,f=Array.from({length:i},(g,m)=>{let p=c;for(let y=0;p!==0&&y<s.length;y++)p&=s[y][m+l].cell.__headerState;return p}),d=e.__headerState&le.ROW,h=Array.from({length:o},(g,m)=>{let p=d;for(let y=0;p!==0&&y<s[0].length;y++)p&=s[m+u][y].cell.__headerState;return p});if(i>1){for(let g=1;g<i;g++)e.insertAfter(ut(f[g]|h[0]).append(Y()));e.setColSpan(1)}if(o>1){let g;for(let m=1;m<o;m++){const p=u+m,y=s[p];g=(g||t).getNextSibling(),be(g)||U(125);let _=null;for(let b=0;b<l;b++){const k=y[b],S=k.cell;k.startRow===p&&(_=S),S.__colSpan>1&&(b+=S.__colSpan-1)}if(_===null)for(let b=i-1;b>=0;b--)Fg(g,ut(f[b]|h[m]).append(Y()));else for(let b=i-1;b>=0;b--)_.insertAfter(ut(f[b]|h[m]).append(Y()))}e.setRowSpan(1)}}function zt(n,e,t){const[r,i,o]=en(n,e,t);return i===null&&U(207),o===null&&U(208),[r,i,o]}function en(n,e,t){const r=[];let i=null,o=null;function s(l){let u=r[l];return u===void 0&&(r[l]=u=[]),u}const a=n.getChildren();for(let l=0;l<a.length;l++){const u=a[l];be(u)||U(209);const c=s(l);for(let f=u.getFirstChild(),d=0;f!=null;f=f.getNextSibling()){for(H(f)||U(147);c[d]!==void 0;)d++;const h={cell:f,startColumn:d,startRow:l},{__rowSpan:g,__colSpan:m}=f;for(let p=0;p<g&&!(l+p>=a.length);p++){const y=s(l+p);for(let _=0;_<m;_++)y[d+_]=h}e!==null&&i===null&&e.is(f)&&(i=h),t!==null&&o===null&&t.is(f)&&(o=h)}}return[r,i,o]}function Lt(n){let e;if(n instanceof Sn)e=n;else if("__type"in n){const i=q(n,H);H(i)||U(148),e=i}else{const i=q(n.getNode(),H);H(i)||U(148),e=i}const t=e.getParent();be(t)||U(149);const r=t.getParent();return ge(r)||U(210),[e,t,r]}function Ho(n,e,t){let r,i=Math.min(e.startColumn,t.startColumn),o=Math.min(e.startRow,t.startRow),s=Math.max(e.startColumn+e.cell.__colSpan-1,t.startColumn+t.cell.__colSpan-1),a=Math.max(e.startRow+e.cell.__rowSpan-1,t.startRow+t.cell.__rowSpan-1);do{r=!1;for(let l=0;l<n.length;l++)for(let u=0;u<n[0].length;u++){const c=n[l][u];if(!c)continue;const f=c.startColumn+c.cell.__colSpan-1,d=c.startRow+c.cell.__rowSpan-1,h=c.startColumn<=s&&f>=i,g=c.startRow<=a&&d>=o;if(h&&g){const m=Math.min(i,c.startColumn),p=Math.max(s,f),y=Math.min(o,c.startRow),_=Math.max(a,d);m===i&&p===s&&y===o&&_===a||(i=m,s=p,o=y,a=_,r=!0)}}}while(r);return{maxColumn:s,maxRow:a,minColumn:i,minRow:o}}function gf(n){const[e,,t]=Lt(n),r=t.getChildren().filter(be),i=r.length,o=r[0].getChildren().length,s=new Array(i);for(let a=0;a<i;a++)s[a]=new Array(o);for(let a=0;a<i;a++){const l=r[a].getChildren().filter(H);let u=0;for(let c=0;c<l.length;c++){for(;s[a][u];)u++;const f=l[c],d=f.__rowSpan||1,h=f.__colSpan||1;for(let g=0;g<d;g++)for(let m=0;m<h;m++)s[a+g][u+m]=f;if(e===f)return{colSpan:h,columnIndex:u,rowIndex:a,rowSpan:d};u+=h}}return null}function Ag(n,e){const t=e.getStartEndPoints(),r=_e(e);if(t===null)return!1;const[i,o]=t,[s,a,l]=Lt(i),u=q(o.getNode(),E=>H(E));if(!(H(s)&&H(u)&&be(a)&&ge(l)))return!1;const[c,f,d]=zt(l,s,u),[h]=en(n,null,null),g=c.length,m=g>0?c[0].length:0;let p=f.startRow,y=f.startColumn,_=h.length,b=_>0?h[0].length:0;if(r){const E=Ho(c,f,d),O=E.maxRow-E.minRow+1,R=E.maxColumn-E.minColumn+1;p=E.minRow,y=E.minColumn,_=Math.min(_,O),b=Math.min(b,R)}let k=!1;const S=Math.min(g,p+_)-1,C=Math.min(m,y+b)-1,w=new Set;for(let E=p;E<=S;E++)for(let O=y;O<=C;O++){const R=c[E][O];w.has(R.cell.getKey())||R.cell.__rowSpan===1&&R.cell.__colSpan===1||(lk(R.cell),w.add(R.cell.getKey()),k=!0)}let[v]=en(l.getWritable(),null,null);const T=_-g+p;for(let E=0;E<T;E++)rk(v[g-1][0].cell);const F=b-m+y;for(let E=0;E<F;E++)ik(v[0][m-1].cell,!0,!1);[v]=en(l.getWritable(),null,null);for(let E=p;E<p+_;E++)for(let O=y;O<y+b;O++){const R=E-p,L=O-y,J=h[R][L];if(J.startRow!==R||J.startColumn!==L)continue;const te=J.cell;if(te.__rowSpan!==1||te.__colSpan!==1){const P=[],W=Math.min(E+te.__rowSpan,p+_)-1,ce=Math.min(O+te.__colSpan,y+b)-1;for(let se=E;se<=W;se++)for(let Fe=O;Fe<=ce;Fe++){const ct=v[se][Fe];P.push(ct.cell)}sk(P),k=!0}const{cell:X}=v[E][O],Z=te.getBackgroundColor();Z!=null&&X.setBackgroundColor(Z);const I=X.getChildren();te.getChildren().forEach(P=>{$(P)&&Y().append(P),X.append(P)}),I.forEach(P=>P.remove())}if(r&&k){const[E]=en(l.getWritable(),null,null);E[f.startRow][f.startColumn].cell.selectEnd()}return!0}function Us(n){const[[e,t,r,i],[o,s,a,l]]=["anchor","focus"].map(u=>{const c=n[u].getNode(),f=q(c,H);H(f)||U(238,u,c.getKey(),c.getType());const d=f.getParent();be(d)||U(239,u);const h=d.getParent();return ge(h)||U(240,u),[c,f,d,h]});return i.is(l)||U(241),{anchorCell:t,anchorNode:e,anchorRow:r,anchorTable:i,focusCell:s,focusNode:o,focusRow:a,focusTable:l}}class ks{tableKey;anchor;focus;_cachedNodes;dirty;constructor(e,t,r){this.anchor=t,this.focus=r,t._selection=this,r._selection=this,this._cachedNodes=null,this.dirty=!1,this.tableKey=e}getStartEndPoints(){return[this.anchor,this.focus]}isValid(){if(this.tableKey==="root"||this.anchor.key==="root"||this.anchor.type!=="element"||this.focus.key==="root"||this.focus.type!=="element")return!1;const e=ie(this.tableKey),t=ie(this.anchor.key),r=ie(this.focus.key);return e!==null&&t!==null&&r!==null}isBackward(){return this.focus.isBefore(this.anchor)}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return _e(e)&&this.tableKey===e.tableKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)}set(e,t,r){this.dirty=this.dirty||e!==this.tableKey||t!==this.anchor.key||r!==this.focus.key,this.tableKey=e,this.anchor.key=t,this.focus.key=r,this._cachedNodes=null}clone(){return new ks(this.tableKey,nt(this.anchor.key,this.anchor.offset,this.anchor.type),nt(this.focus.key,this.focus.offset,this.focus.type))}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(e){if(e==="")return;const t=(e.endsWith(`
|
|
25
|
+
`)?e.slice(0,-1):e).split(`
|
|
26
|
+
`).map(o=>o.split(" ")),r=Pi();for(const o of t){const s=Un();for(const a of o){const l=ut(le.NO_STATUS),u=Y();a&&u.append(we(a)),l.append(u),s.append(l)}r.append(s)}const{anchorCell:i}=Us(this);Ag(r,i.select(0,i.getChildrenSize()))}insertText(){}hasFormat(e){let t=0;this.getNodes().filter(H).forEach(i=>{const o=i.getFirstChild();Ht(o)&&(t|=o.getTextFormat())});const r=rn[e];return(t&r)!==0}insertNodes(e){const t=this.focus.getNode();x(t)||U(151),Ot(t.select(0,t.getChildrenSize())).insertNodes(e)}getShape(){const{anchorCell:e,focusCell:t}=Us(this),r=gf(e);r===null&&U(153);const i=gf(t);i===null&&U(155);const o=Math.min(r.columnIndex,i.columnIndex),s=Math.max(r.columnIndex+r.colSpan-1,i.columnIndex+i.colSpan-1),a=Math.min(r.rowIndex,i.rowIndex),l=Math.max(r.rowIndex+r.rowSpan-1,i.rowIndex+i.rowSpan-1);return{fromX:Math.min(o,s),fromY:Math.min(a,l),toX:Math.max(o,s),toY:Math.max(a,l)}}getNodes(){if(!this.isValid())return[];const e=this._cachedNodes;if(e!==null)return e;const{anchorTable:t,anchorCell:r,focusCell:i}=Us(this),o=i.getParents()[1];if(o!==t){if(t.isParentOf(i)){const p=o.getParent();p==null&&U(159),this.set(this.tableKey,i.getKey(),p.getKey())}else{const p=t.getParent();p==null&&U(158),this.set(this.tableKey,p.getKey(),i.getKey())}return this.getNodes()}const[s,a,l]=zt(t,r,i),{minColumn:u,maxColumn:c,minRow:f,maxRow:d}=Ho(s,a,l),h=new Map([[t.getKey(),t]]);let g=null;for(let p=f;p<=d;p++)for(let y=u;y<=c;y++){const{cell:_}=s[p][y],b=_.getParent();be(b)||U(160),b!==g&&(h.set(b.getKey(),b),g=b),h.has(_.getKey())||uk(_,k=>{h.set(k.getKey(),k)})}const m=Array.from(h.values());return yn()||(this._cachedNodes=m),m}getTextContent(){const e=this.getNodes().filter(r=>H(r));let t="";for(let r=0;r<e.length;r++){const i=e[r],o=i.__parent,s=(e[r+1]||{}).__parent;t+=i.getTextContent()+(s!==o?`
|
|
27
|
+
`:" ")}return t}}function _e(n){return n instanceof ks}function Ha(n,e,t){n.getKey(),e.getKey(),t.getKey();const r=A(),i=_e(r)?r.clone():new ks("root",nt("root",0,"element"),nt("root",0,"element"));return i.set(n.getKey(),e.getKey(),t.getKey()),i}function uk(n,e){const t=[[n]];for(let r=t.at(-1);r!==void 0&&t.length>0;r=t.at(-1)){const i=r.pop();i===void 0?t.pop():e(i)!==!1&&x(i)&&t.push(i.getChildren())}}function zg(n,e=Ce()){const t=ie(n);ge(t)||U(231,n);const r=an(t,e.getElementByKey(n));return r===null&&U(232,n),{tableElement:r,tableNode:t}}class ck{observers;nextFocus;shouldCheckSelectionForTable;constructor(){this.observers=new Map,this.nextFocus=null,this.shouldCheckSelectionForTable=null}setNextFocus(e){this.nextFocus=e}getAndClearNextFocus(){const{nextFocus:e}=this;return e!==null&&(this.nextFocus=null),e}setShouldCheckSelectionForTable(e){this.shouldCheckSelectionForTable=e}getAndClearShouldCheckSelectionForTable(){const{shouldCheckSelectionForTable:e}=this;return e?(this.shouldCheckSelectionForTable=null,e):null}removeObserver(e){const t=this.observers.get(e);return t!==void 0&&(t[0].removeListeners(),this.observers.delete(e),!0)}removeAllObservers(){for(const e of Array.from(this.observers.keys()))this.removeObserver(e)}$getTableNodesAndObservers(){const e=[];for(const[t,[r]]of Array.from(this.observers.entries())){const i=ie(t);ge(i)?e.push([i,r]):this.removeObserver(t)}return e}}class fk{focusX;focusY;listenersToRemove;table;isHighlightingCells;anchorX;anchorY;tableNodeKey;anchorCell;focusCell;anchorCellNodeKey;focusCellNodeKey;editor;tableSelection;hasHijackedSelectionStyles;isSelecting;pointerType;abortController;listenerOptions;constructor(e,t){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=t,this.editor=e,this.table={columns:0,domRows:[],rows:0},this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.isSelecting=!1,this.pointerType=null,this.abortController=new AbortController,this.listenerOptions={signal:this.abortController.signal},this.trackTable()}getTable(){return this.table}removeListeners(){this.abortController.abort("removeListeners"),Array.from(this.listenersToRemove).forEach(e=>e()),this.listenersToRemove.clear()}$lookup(){return zg(this.tableNodeKey,this.editor)}trackTable(){const e=new MutationObserver(t=>{this.editor.read("latest",()=>{let r=!1;for(let s=0;s<t.length;s++){const a=t[s].target.nodeName;if(a==="TABLE"||a==="TBODY"||a==="THEAD"||a==="TR"){r=!0;break}}if(!r)return;const{tableNode:i,tableElement:o}=this.$lookup();this.table=Cr(i,o)})});this.editor.read("latest",()=>{const{tableNode:t,tableElement:r}=this.$lookup();this.table=Cr(t,r),e.observe(r,{attributes:!0,childList:!0,subtree:!0})})}$clearHighlight(e=!0){const t=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.$enableHighlightStyle();const{tableNode:r,tableElement:i}=this.$lookup();Zi(t,Cr(r,i),null),e&&A()!==null&&(pe(null),t.dispatchCommand(jt))}$enableHighlightStyle(){const e=this.editor,{tableElement:t}=this.$lookup();Kt(t,e._config.theme.tableSelection),t.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}$disableHighlightStyle(){const{tableElement:e}=this.$lookup();Ee(e,this.editor._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}$updateTableTableSelection(e){if(e!==null){e.tableKey!==this.tableNodeKey&&U(233,e.tableKey,this.tableNodeKey);const t=this.editor;this.tableSelection=e,this.isHighlightingCells=!0,this.$disableHighlightStyle(),this.updateDOMSelection(),Zi(t,this.table,this.tableSelection)}else this.$clearHighlight()}updateDOMSelection(){if(this.anchorCell!==null&&this.focusCell!==null){const e=Oe(this.editor._window);e&&e.rangeCount>0&&e.removeAllRanges()}}$setFocusCellForSelection(e,t=!1){const r=this.editor,{tableNode:i}=this.$lookup(),o=e.x,s=e.y;if(this.focusCell=e,!this.isHighlightingCells&&(t||this.anchorX!==o||this.anchorY!==s||this.tableSelection!=null&&this.anchorCellNodeKey!=null)&&(this.isHighlightingCells=!0,this.$disableHighlightStyle()),this.focusX!==-1&&this.focusY!==-1&&o===this.focusX&&s===this.focusY)return!1;if(this.focusX=o,this.focusY=s,this.isHighlightingCells){const a=Va(i,e.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null){let l=a;if(l===null&&t&&(l=i.getCellNodeFromCords(o,s,this.table)),l!==null){const u=this.$getAnchorTableCellOrThrow();return this.focusCellNodeKey=l.getKey(),this.tableSelection=Ha(i,u,l),pe(this.tableSelection),r.dispatchCommand(jt),Zi(r,this.table,this.tableSelection),!0}}}return!1}$getAnchorTableCell(){const e=this.anchorCellNodeKey?ie(this.anchorCellNodeKey):null;return H(e)?e:null}$getAnchorTableCellOrThrow(){const e=this.$getAnchorTableCell();return e===null&&U(234),e}$getFocusTableCell(){const e=this.focusCellNodeKey?ie(this.focusCellNodeKey):null;return H(e)?e:null}$getFocusTableCellOrThrow(){const e=this.$getFocusTableCell();return e===null&&U(235),e}$setAnchorCellForSelection(e){this.isHighlightingCells=!1,this.anchorCell=e,this.anchorX=e.x,this.anchorY=e.y,this.focusX=-1,this.focusY=-1,this.focusCell=null,this.focusCellNodeKey=null;const{tableNode:t}=this.$lookup(),r=Va(t,e.elem);if(r!==null){const i=r.getKey();this.tableSelection!=null?(this.tableSelection=this.tableSelection.clone(),this.tableSelection.set(t.getKey(),i,i)):this.tableSelection=Ha(t,r,r),this.anchorCellNodeKey=i}}$formatCells(e){const t=A();_e(t)||U(236);const r=fl(),i=r.anchor,o=r.focus,s=t.getNodes().filter(H);s.length>0||U(237);const a=s[0].getFirstChild(),l=Ht(a)?a.getFormatFlags(e,null):null;s.forEach(u=>{i.set(u.getKey(),0,"element"),o.set(u.getKey(),u.getChildrenSize(),"element"),r.formatText(e,l)}),pe(t),this.editor.dispatchCommand(jt)}$clearText(){const{editor:e}=this,t=ie(this.tableNodeKey);if(!ge(t))throw new Error("Expected TableNode.");const r=A();_e(r)||U(253);const i=r.getNodes().filter(H),o=t.getFirstChild(),s=t.getLastChild();if(i.length>0&&o!==null&&s!==null&&be(o)&&be(s)&&i[0]===o.getFirstChild()&&i[i.length-1]===s.getLastChild()){t.selectPrevious();const a=t.getParent();return t.remove(),void(Ne(a)&&a.isEmpty()&&e.dispatchCommand(jn))}i.forEach(a=>{if(x(a)){const l=Y(),u=we();l.append(u),a.append(l),a.getChildren().forEach(c=>{c!==l&&c.remove()})}}),Zi(e,this.table,null),pe(null),e.dispatchCommand(jt)}}const xr="__lexicalTableSelection";function Og(n){const e=sh(n);return ge(e)||U(386,n),e}const or=40;function Hs(n,e,t){const r=i=>Math.max(1,Math.ceil(Math.min(or,i)/or*18));return n<=e+or?-r(e+or-n):n>=t-or?r(n-(t-or)):0}function Dn(n){return K(n)&&n.nodeName==="TABLE"}function an(n,e){if(!e)return e;const t=Dn(e)?e:e.querySelector("table");return Dn(t)||U(341,n.constructor.name,n.getType(),n.getKey(),e.nodeName),t}function xs(n){return n._window}function Cs(n,e){for(let t=e,r=null;t!==null;t=t.getParent()){if(n.is(t))return r;H(t)&&(r=t)}return null}const dk=[[ol,"down"],[il,"up"],[rl,"backward"],[nl,"forward"]],hk=[Sr,wr,hn],gk=[ts,al];function pk(n,e){return n.registerRootListener(t=>{if(t===null)return;const r=n._window;if(r!==null)return oi(r,"pointerdown",i=>{const o=Pn(i);if(i.button!==0||!Ft(o)||!t.contains(o))return;const s=(function(a){const l=Jo(a);if(l===null)return null;let u=l.elem;for(;u!=null;){if(u.nodeName==="TABLE"&&xr in u&&u[xr])return{cellElement:l,tableElement:u,tableObserver:u[xr]};u=u.parentNode}return null})(o);n.update(()=>{if(_e(A())){for(const[c]of e.observers.values())c.$clearHighlight(!1);pe(null),n.dispatchCommand(jt)}if(!s)return;const{tableObserver:a,tableElement:l,cellElement:u}=s;(function(c,f,d,h,g,m){const p=c._window;if(!p)return;const y=k=>{if(g.isSelecting)return;g.isSelecting=!0,k!==null&&g.anchorCell===null&&c.update(()=>{g.$setAnchorCellForSelection(k)});let S=f.clientX,C=f.clientY,w=null;const v=()=>{g.isSelecting=!1,w!==null&&(p.cancelAnimationFrame(w),w=null),p.removeEventListener("pointerup",X),p.removeEventListener("pointermove",Z)},T=(I,P)=>{const W=h.getRootNode();if(!kn(W)&&!qt(W))return null;for(const ce of W.elementsFromPoint(I,P)){const se=mf(h,ce);if(se)return se}return null},F=(I,P)=>{g.anchorCell===null&&c.update(()=>{g.$setAnchorCellForSelection(I)}),g.focusCell!==null&&I.elem===g.focusCell.elem||(m.setNextFocus({focusCell:I,override:P,tableKey:g.tableNodeKey}),c.dispatchCommand(jt))},E=I=>{for(let P=h.parentElement;P;P=P.parentElement)if(I==="x"?P.scrollWidth>P.clientWidth:P.scrollHeight>P.clientHeight){const W=p.getComputedStyle(P),ce=I==="x"?W.overflowX:W.overflowY;if(ce==="auto"||ce==="scroll")return P}return null},O=(I,P,W)=>{let ce,se;if(I===null)ce=0,se=W==="x"?p.innerWidth:p.innerHeight;else{const ae=I.getBoundingClientRect();ce=W==="x"?ae.left:ae.top,se=W==="x"?ae.right:ae.bottom}const Fe=Hs(P,ce,se);if(Fe===0)return!1;if(I===null){const ae=W==="x"?p.scrollX:p.scrollY;return p.scrollBy(W==="x"?Fe:0,W==="x"?0:Fe),(W==="x"?p.scrollX:p.scrollY)!==ae}if(W==="x"){const ae=I.scrollLeft;return I.scrollLeft+=Fe,I.scrollLeft!==ae}const ct=I.scrollTop;return I.scrollTop+=Fe,I.scrollTop!==ct},R=(I,P)=>{let W=S,ce=C;if(I===null)W=Math.min(Math.max(W,1),p.innerWidth-1);else{const se=I.getBoundingClientRect();W=Math.min(Math.max(W,se.left+1),se.right-1)}if(P===null)ce=Math.min(Math.max(ce,1),p.innerHeight-1);else{const se=P.getBoundingClientRect();ce=Math.min(Math.max(ce,se.top+1),se.bottom-1)}return[W,ce]},L=()=>{const I=E("x");if(I!==null){const se=I.getBoundingClientRect();if(Hs(S,se.left,se.right)!==0)return!0}const P=E("y"),W=P===null?0:P.getBoundingClientRect().top,ce=P===null?p.innerHeight:P.getBoundingClientRect().bottom;return Hs(C,W,ce)!==0},J=()=>{if(w=null,!g.isSelecting)return;const I=E("x"),P=E("y"),W=I!==null&&O(I,S,"x"),ce=O(P,C,"y");if(W||ce){const[se,Fe]=R(I,P),ct=T(se,Fe);ct&&F(ct,!1),w=p.requestAnimationFrame(J)}},te=()=>{w===null&&g.pointerType!=="touch"&&L()&&(w=p.requestAnimationFrame(J))},X=()=>{v()},Z=I=>{if(!(se=>!(1&~se.buttons))(I)&&g.isSelecting)return void v();const P=Pn(I);if(!Ft(P))return;S=I.clientX,C=I.clientY;let W=null;const ce=!($t||h.contains(P));W=ce?mf(h,P):T(I.clientX,I.clientY),W&&F(W,ce),te()};p.addEventListener("pointerup",X,g.listenerOptions),p.addEventListener("pointermove",Z,g.listenerOptions)};g.pointerType=f.pointerType;const _=Og(g.tableNodeKey),b=lt();if($t&&f.shiftKey&&vt(b,_)&&(N(b)||_e(b))){const k=b.anchor.getNode(),S=Cs(_,b.anchor.getNode());S?(g.$setAnchorCellForSelection(Fn(g,S)),g.$setFocusCellForSelection(d),Qt(f)):(_.isBefore(k)?_.selectStart():_.selectEnd()).anchor.set(b.anchor.key,b.anchor.offset,b.anchor.type)}else f.pointerType!=="touch"&&g.$setAnchorCellForSelection(d);y(d)})(n,i,u,l,a,e)})})})}function mk(n,e,t,r,i){const o=t.getRootElement(),s=xs(t);o!==null&&s!==null||U(246);const a=new fk(t,n.getKey()),l=an(n,e);(function(d,h){pf(d)!==null&&U(205),d[xr]=h})(l,a),a.listenersToRemove.add(()=>(function(d,h){pf(d)===h&&delete d[xr]})(l,a)),a.listenersToRemove.add(oi(l,"mousedown",d=>{const h=Pn(d);d.detail>=3&&Ft(h)&&Jo(h)!==null&&d.preventDefault()},a.listenerOptions));for(const[d,h]of dk)a.listenersToRemove.add(t.registerCommand(d,g=>Rg(t,g,h,n,a,i),dt));a.listenersToRemove.add(t.registerCommand(sl,d=>{const h=A();if(_e(h)){const g=Cs(n,h.focus.getNode());if(g!==null)return Qt(d),g.selectEnd(),!0}return!1},dt));const u=()=>{const d=A();return!!vt(d,n)&&!!_e(d)&&(a.$clearText(),!0)};for(const d of hk)a.listenersToRemove.add(t.registerCommand(d,u,dt));const c=d=>{const h=A();if(!_e(h)&&!N(h))return!1;const g=n.isParentOf(h.anchor.getNode());if(g!==n.isParentOf(h.focus.getNode())){const m=g?"anchor":"focus",p=g?"focus":"anchor",{key:y,offset:_,type:b}=h[p];return n[h[m].isBefore(h[p])?"selectPrevious":"selectNext"]()[p].set(y,_,b),!1}return!!vt(h,n)&&!!_e(h)&&(d&&(d.preventDefault(),d.stopPropagation()),a.$clearText(),!0)};for(const d of gk)a.listenersToRemove.add(t.registerCommand(d,c,dt));a.listenersToRemove.add(t.registerCommand(ns,d=>{const h=A();if(h){if(!_e(h)&&!N(h))return!1;ja(t,It(d,ClipboardEvent)?d:null,Vl(h));const g=c(d);return N(h)?(h.removeText(),!0):g}return!1},dt));const f=o.ownerDocument;return a.listenersToRemove.add(oi(f,"paste",d=>{d.defaultPrevented||t.read("latest",()=>{const h=A();return o.contains(f.activeElement)&&_e(h)&&vt(h,n)})&&(d.preventDefault(),t.dispatchCommand(Pr,d))})),a.listenersToRemove.add(oi(f,"copy",d=>{if(d.defaultPrevented)return;const h=Pn(d);h===o||Ft(h)&&o.contains(h)||t.read("latest",()=>{const g=A();return o.contains(bi(o))&&_e(g)&&vt(g,n)})&&(d.preventDefault(),t.dispatchCommand($i,d))})),a.listenersToRemove.add(t.registerCommand(Tt,d=>{const h=A();return!!vt(h,n)&&!!_e(h)&&(a.$formatCells(d),!0)},dt)),a.listenersToRemove.add(t.registerCommand(fd,d=>{const h=A();if(!_e(h)||!vt(h,n))return!1;const g=h.anchor.getNode(),m=h.focus.getNode();if(!H(g)||!H(m))return!1;const[p,y,_]=zt(n,g,m),b=Math.max(y.startRow+y.cell.__rowSpan-1,_.startRow+_.cell.__rowSpan-1),k=Math.max(y.startColumn+y.cell.__colSpan-1,_.startColumn+_.cell.__colSpan-1),S=Math.min(y.startRow,_.startRow),C=Math.min(y.startColumn,_.startColumn);if(S===0&&C===0&&b===p.length-1&&k===p[0].length-1)return n.setFormat(d),!0;const w=new Set;for(let v=S;v<=b;v++)for(let T=C;T<=k;T++){const F=p[v][T].cell;if(w.has(F))continue;w.add(F),F.setFormat(d);const E=F.getChildren();for(let O=0;O<E.length;O++){const R=E[O];x(R)&&!R.isInline()&&R.setFormat(d)}}return!0},dt)),a.listenersToRemove.add(t.registerCommand(An,d=>{const h=A();if(!vt(h,n))return!1;if(_e(h))return a.$clearHighlight(),!1;if(N(h)){const g=q(h.anchor.getNode(),m=>H(m));if(!H(g))return!1;if(typeof d=="string"){const m=_f(t,h,n);if(m)return yf(m,n,[we(d)]),!0}}return!1},dt)),r&&a.listenersToRemove.add(t.registerCommand(ll,d=>{const h=A();if(!N(h)||!h.isCollapsed()||!vt(h,n))return!1;const g=ni(h.anchor.getNode());return!(g===null||!n.is(Rr(g)))&&(Qt(d),(function(m,p){const y=p==="next"?"getNextSibling":"getPreviousSibling",_=p==="next"?"getFirstChild":"getLastChild",b=m[y]();if(x(b))return b.selectEnd();const k=q(m,be);k===null&&U(247);for(let C=k[y]();be(C);C=C[y]()){const w=C[_]();if(x(w))return w.selectEnd()}const S=q(k,ge);S===null&&U(248),p==="next"?S.selectNext():S.selectPrevious()})(g,d.shiftKey?"previous":"next"),!0)},dt)),a.listenersToRemove.add(t.registerCommand(gd,d=>n.isSelected(),dt)),a.listenersToRemove.add(t.registerCommand(jn,()=>{const d=A();if(!N(d)||!d.isCollapsed()||!vt(d,n))return!1;const h=_f(t,d,n);return!!h&&(yf(h,n),!0)},dt)),a}function yk(n,e){const t=A(),r=lt(),i=n.getAndClearNextFocus();if(i!==null){const{tableKey:s,focusCell:a}=i,l=n.observers.get(s);l||U(335,s);const[u]=l;if(_e(t)&&t.tableKey===u.tableNodeKey)return(a.x!==u.focusX||a.y!==u.focusY)&&(u.$setFocusCellForSelection(a),!0);if(u.anchorCell!==null&&u.anchorCellNodeKey!==null&&a.elem!==u.anchorCell.elem&&u.tableSelection!==null)return u.$setFocusCellForSelection(a,!0),!0}const o=n.getAndClearShouldCheckSelectionForTable();if(o&&N(r)&&N(t)&&t.isCollapsed()){const s=ie(o);if(ge(s)){const a=t.anchor.getNode(),l=s.getFirstChild(),u=ni(a);if(u!==null&&be(l)){const c=l.getFirstChild();if(H(c)&&s.is(q(u,f=>f.is(s)||f.is(c))))return c.selectStart(),!0}}}_e(t)&&(function(s,a){const l=xs(s),u=lt();if(!a.is(u))return;const c=Og(a.tableKey),f=Oe(l),d=f&&rt(f,s.getRootElement());if(f&&d&&d.anchorNode&&d.focusNode){const h=Xe(d.focusNode),g=h&&!c.isParentOf(h),m=Xe(d.anchorNode),p=m&&c.isParentOf(m);if(g&&p&&f.rangeCount>0){const y=hm(f,s);y&&(y.anchor.set(c.getKey(),a.isBackward()?c.getChildrenSize():0,"element"),f.removeAllRanges(),pe(y))}}})(e,t),N(t)&&(function(s,a){const l=lt(),{anchor:u,focus:c}=s,f=u.getNode(),d=c.getNode(),h=ni(f),g=ni(d),m=h?Rr(h):null,p=g?Rr(g):null,y=s.isBackward(),_=h&&g&&m&&p&&m.is(p),b=p&&(!m||m.isParentOf(p)),k=m&&(!p||p.isParentOf(m));if(b){const S=s.clone(),[C]=zt(p,g,g),w=C[0][0].cell,v=C[C.length-1].at(-1).cell;S.focus.set(y?w.getKey():v.getKey(),y?0:v.getChildrenSize(),"element"),pe(S)}else if(k){const S=s.clone(),[C]=zt(m,h,h),w=C[0][0].cell,v=C[C.length-1].at(-1).cell;S.anchor.set(y?v.getKey():w.getKey(),y?v.getChildrenSize():0,"element"),pe(S)}else if(_){const S=a.observers.get(m.getKey());S||U(335,m.getKey());const[C]=S;if(h.is(g)||(C.$setAnchorCellForSelection(Fn(C,h)),C.$setFocusCellForSelection(Fn(C,g),!0)),C.pointerType==="touch"&&C.isSelecting&&s.isCollapsed()&&N(l)&&l.isCollapsed()){const w=ni(l.anchor.getNode());w&&!w.is(g)&&(C.$setAnchorCellForSelection(Fn(C,w)),C.$setFocusCellForSelection(Fn(C,g),!0),C.pointerType=null)}}})(t,n);for(const[s,a]of n.$getTableNodesAndObservers())_k(e,s,a);return!1}function _k(n,e,t){const r=A(),i=lt();r&&!r.is(i)&&(_e(r)||_e(i))&&t.tableSelection&&!t.tableSelection.is(i)&&(_e(r)&&r.tableKey===t.tableNodeKey?t.$updateTableTableSelection(r):!_e(r)&&_e(i)&&i.tableKey===t.tableNodeKey&&t.$updateTableTableSelection(null)),t.hasHijackedSelectionStyles&&!e.isSelected()?(function(o,s){s.$enableHighlightStyle(),Ja(s.table,a=>{const l=a.elem;a.highlighted=!1,jg(o,a),l.getAttribute("style")||l.removeAttribute("style")})})(n,t):!t.hasHijackedSelectionStyles&&e.isSelected()&&(function(o,s){s.$disableHighlightStyle(),Ja(s.table,a=>{a.highlighted=!0,Mg(o,a)})})(n,t)}function pf(n){return n[xr]||null}function Jo(n){let e=n;for(;e!=null;){const t=e.nodeName;if(t==="TD"||t==="TH"){const r=e._cell;return r===void 0?null:r}e=e.parentNode}return null}function mf(n,e){if(!n.contains(e))return null;let t=null;for(let r=e;r!=null;r=r.parentNode){if(r===n)return t;const i=r.nodeName;i!=="TD"&&i!=="TH"||(t=r._cell||null)}return null}function Cr(n,e){const t=[],r={columns:0,domRows:t,rows:0};let i=an(n,e).querySelector("tr"),o=0,s=0;for(t.length=0;i!=null;){const a=i.nodeName;if(a==="TD"||a==="TH"){const c={elem:i,hasBackgroundColor:i.style.backgroundColor!=="",highlighted:!1,x:o,y:s};i._cell=c;let f=t[s];f===void 0&&(f=t[s]=[]),f[o]=c}else{const c=i.firstChild;if(c!=null){i=c;continue}}const l=i.nextSibling;if(l!=null){o++,i=l;continue}const u=i.parentNode;if(u!=null){const c=u.nextSibling;if(c==null)break;s++,o=0,i=c}}return r.columns=o+1,r.rows=s+1,r}function Zi(n,e,t){const r=new Set(t?t.getNodes():[]);Ja(e,(i,o)=>{const s=i.elem;r.has(o)?(i.highlighted=!0,Mg(n,i)):(i.highlighted=!1,jg(n,i),s.getAttribute("style")||s.removeAttribute("style"))})}function Ja(n,e){const{domRows:t}=n;for(let r=0;r<t.length;r++){const i=t[r];if(i)for(let o=0;o<i.length;o++){const s=i[o];if(!s)continue;const a=Xe(s.elem);a!==null&&e(s,a,{x:o,y:r})}}}const bk=(n,e,t,r,i)=>{const o=i==="forward";switch(i){case"backward":case"forward":return t!==(o?n.table.columns-1:0)?eo(e.getCellNodeFromCordsOrThrow(t+(o?1:-1),r,n.table),o):r!==(o?n.table.rows-1:0)?eo(e.getCellNodeFromCordsOrThrow(o?0:n.table.columns-1,r+(o?1:-1),n.table),o):o?e.selectNext():e.selectPrevious(),!0;case"up":return r!==0?eo(e.getCellNodeFromCordsOrThrow(t,r-1,n.table),!1):e.selectPrevious(),!0;case"down":return r!==n.table.rows-1?eo(e.getCellNodeFromCordsOrThrow(t,r+1,n.table),!0):e.selectNext(),!0;default:return!1}};function Js(n,e){let t,r;if(e.startColumn===n.minColumn)t="minColumn";else{if(e.startColumn+e.cell.__colSpan-1!==n.maxColumn)return null;t="maxColumn"}if(e.startRow===n.minRow)r="minRow";else{if(e.startRow+e.cell.__rowSpan-1!==n.maxRow)return null;r="maxRow"}return[t,r]}function Qi([n,e]){return[n==="minColumn"?"maxColumn":"minColumn",e==="minRow"?"maxRow":"minRow"]}function sr(n,e,[t,r]){const i=e[r],o=n[i];o===void 0&&U(250,r,String(i));const s=e[t],a=o[s];return a===void 0&&U(250,t,String(s)),a}function kk(n,e,t,r,i){const o=Ho(e,t,r),s=(function(C,w){const{minColumn:v,maxColumn:T,minRow:F,maxRow:E}=w;let O=1,R=1,L=1,J=1;const te=C[F],X=C[E];for(let Z=v;Z<=T;Z++)O=Math.max(O,te[Z].cell.__rowSpan),J=Math.max(J,X[Z].cell.__rowSpan);for(let Z=F;Z<=E;Z++)R=Math.max(R,C[Z][v].cell.__colSpan),L=Math.max(L,C[Z][T].cell.__colSpan);return{bottomSpan:J,leftSpan:R,rightSpan:L,topSpan:O}})(e,o),{topSpan:a,leftSpan:l,bottomSpan:u,rightSpan:c}=s,f=(function(C,w){const v=Js(C,w);return v===null&&U(249,w.cell.getKey()),v})(o,t),[d,h]=Qi(f);let g=o[d],m=o[h];i==="forward"?g+=d==="maxColumn"?1:l:i==="backward"?g-=d==="minColumn"?1:c:i==="down"?m+=h==="maxRow"?1:a:i==="up"&&(m-=h==="minRow"?1:u);const p=e[m];if(p===void 0)return!1;const y=p[g];if(y===void 0)return!1;const[_,b]=(function(C,w,v){const T=Ho(C,w,v),F=Js(T,w);if(F)return[sr(C,T,F),sr(C,T,Qi(F))];const E=Js(T,v);if(E)return[sr(C,T,Qi(E)),sr(C,T,E)];const O=["minColumn","minRow"];return[sr(C,T,O),sr(C,T,Qi(O))]})(e,t,y),k=Fn(n,_.cell),S=Fn(n,b.cell);return n.$setAnchorCellForSelection(k),n.$setFocusCellForSelection(S,!0),!0}function vt(n,e){if(N(n)||_e(n)){const t=e.isParentOf(n.anchor.getNode()),r=e.isParentOf(n.focus.getNode());return t&&r}return!1}function eo(n,e){e?n.selectStart():n.selectEnd()}function Mg(n,e){const t=e.elem,r=n._config.theme;H(Xe(t))||U(131),Ee(t,r.tableCellSelected)}function jg(n,e){const t=e.elem;H(Xe(t))||U(131);const r=n._config.theme;Kt(t,r.tableCellSelected)}function ni(n){const e=q(n,H);return H(e)?e:null}function Rr(n){const e=q(n,ge);return ge(e)?e:null}function xk(n,e,t,r,i,o,s){const a=He(t.focus,i?"previous":"next");if(gs(a))return!1;let l=a;for(const p of Or(a).iterNodeCarets("shadowRoot")){if(!At(p)||!x(p.origin))return!1;l=p}const u=l.getParentAtCaret();if(!H(u))return!1;const c=u,f=(function(p){for(const y of Or(p).iterNodeCarets("root")){const{origin:_}=y;if(H(_)){if(Ue(y))return ze(_,p.direction)}else if(!be(_))break}return null})(oe(c,l.direction)),d=q(c,ge);if(!d||!d.is(o))return!1;const h=n.getElementByKey(c.getKey()),g=Jo(h);if(!h||!g)return!1;const m=vk(n,d);if(s.table=m,f)if(r==="extend"){const p=Jo(n.getElementByKey(f.origin.getKey()));if(!p)return!1;s.$setAnchorCellForSelection(g),s.$setFocusCellForSelection(p,!0)}else{const p=We(f);Et(t.anchor,p),Et(t.focus,p)}else if(r==="extend")s.$setAnchorCellForSelection(g),s.$setFocusCellForSelection(g,!0);else{const p=(function(y){const _=Wn(y);return Ue(_)?We(_):y})(oe(d,a.direction));Et(t.anchor,p),Et(t.focus,p)}return Qt(e),!0}function Rg(n,e,t,r,i,o){if((t==="up"||t==="down")&&(function(a){const l=a.getRootElement();return l?l.hasAttribute("aria-controls")&&l.getAttribute("aria-controls")==="typeahead-menu":!1})(n))return!1;const s=A();if(!vt(s,r)){if(N(s)){if(t==="backward"){if(s.focus.offset>0)return!1;const a=(function(u){for(let c=u,f=u;f!==null;c=f,f=f.getParent())if(x(f)){if(f!==c&&f.getFirstChild()!==c)return null;if(!f.isInline())return f}return null})(s.focus.getNode());if(!a)return!1;const l=a.getPreviousSibling();return!!ge(l)&&(Qt(e),e.shiftKey?s.focus.set(l.getParentOrThrow().getKey(),l.getIndexWithinParent(),"element"):l.selectEnd(),!0)}if(e.shiftKey&&(t==="up"||t==="down")){const a=s.focus.getNode();if(!s.isCollapsed()&&(t==="up"&&!s.isBackward()||t==="down"&&s.isBackward())){let l=q(a,h=>ge(h));if(H(l)&&(l=q(l,ge)),l!==r||!l)return!1;const u=t==="down"?l.getNextSibling():l.getPreviousSibling();if(!u)return!1;let c=0;t==="up"&&x(u)&&(c=u.getChildrenSize());let f=u;t==="up"&&x(u)&&(f=u.getLastChild()||u,c=$(f)?f.getTextContentSize():0);const d=s.clone();return d.focus.set(f.getKey(),c,$(f)?"text":"element"),pe(d),Qt(e),!0}if(xe(a)){const l=t==="up"?s.getNodes()[s.getNodes().length-1]:s.getNodes()[0];if(l&&Cs(r,l)!==null){const u=r.getFirstDescendant(),c=r.getLastDescendant();if(!u||!c)return!1;const[f]=Lt(u),[d]=Lt(c),h=r.getCordsFromCellNode(f,i.table),g=r.getCordsFromCellNode(d,i.table),m=r.getDOMCellFromCordsOrThrow(h.x,h.y,i.table),p=r.getDOMCellFromCordsOrThrow(g.x,g.y,i.table);return i.$setAnchorCellForSelection(m),i.$setFocusCellForSelection(p,!0),!0}return!1}{let l=q(a,c=>x(c)&&!c.isInline());if(H(l)&&(l=q(l,ge)),!l)return!1;const u=t==="down"?l.getNextSibling():l.getPreviousSibling();if(ge(u)&&i.tableNodeKey===u.getKey()){const c=u.getFirstDescendant(),f=u.getLastDescendant();if(!c||!f)return!1;const[d]=Lt(c),[h]=Lt(f),g=s.clone();return g.focus.set((t==="up"?d:h).getKey(),t==="up"?0:h.getChildrenSize(),"element"),Qt(e),pe(g),!0}}}}return t==="down"&&Vo(n)&&o.setShouldCheckSelectionForTable(r.getKey()),!1}if(N(s)){if(t==="backward"||t==="forward")return xk(n,e,s,e.shiftKey?"extend":"move",t==="backward",r,i);if(s.isCollapsed()){const{anchor:a,focus:l}=s,u=q(a.getNode(),H),c=q(l.getNode(),H);if(!H(u)||!u.is(c))return!1;const f=Rr(u);if(f!==r&&f!=null){const _=an(f,n.getElementByKey(f.getKey()));if(_!=null)return i.table=Cr(f,_),Rg(n,e,t,f,i,o)}const d=n.getElementByKey(u.__key),h=n.getElementByKey(a.key);if(h==null||d==null)return!1;let g;if(a.type==="element")g=h.getBoundingClientRect();else{const _=Oe(xs(n));if(_===null||_.rangeCount===0)return!1;const b=ch(_,n.getRootElement());if(b===null)return!1;g=b.getBoundingClientRect()}const m=t==="up"?u.getFirstChild():u.getLastChild();if(m==null)return!1;const p=n.getElementByKey(m.__key);if(p==null)return!1;const y=p.getBoundingClientRect();if(t==="up"?y.top>g.top-g.height:g.bottom+g.height>y.bottom){Qt(e);const _=r.getCordsFromCellNode(u,i.table);if(!e.shiftKey)return bk(i,r,_.x,_.y,t);{const b=r.getDOMCellFromCordsOrThrow(_.x,_.y,i.table);i.$setAnchorCellForSelection(b),i.$setFocusCellForSelection(b,!0)}return!0}}}else if(_e(s)){const{anchor:a,focus:l,tableKey:u}=s;if(u!==r.getKey())return!1;const c=q(a.getNode(),H),f=q(l.getNode(),H),[d]=s.getNodes();ge(d)||U(251);const h=an(d,n.getElementByKey(d.getKey()));if(!H(c)||!H(f)||!ge(d)||h==null)return!1;i.$updateTableTableSelection(s);const g=Cr(d,h),m=r.getCordsFromCellNode(c,g),p=r.getDOMCellFromCordsOrThrow(m.x,m.y,g);if(i.$setAnchorCellForSelection(p),Qt(e),e.shiftKey){const[y,_,b]=zt(r,c,f);return kk(i,y,_,b,t)}return f.selectEnd(),!0}return!1}function Qt(n){n.preventDefault(),n.stopImmediatePropagation(),n.stopPropagation()}function yf(n,e,t){const r=Y();n==="first"?e.insertBefore(r):e.insertAfter(r),r.append(...t||[]),r.selectEnd()}function _f(n,e,t){const r=t.getParent();if(!r)return;const i=Oe(xs(n));if(!i)return;const o=rt(i,n.getRootElement()).anchorNode,s=n.getElementByKey(r.getKey()),a=an(t,n.getElementByKey(t.getKey()));if(!o||!s||!a||!s.contains(o)||a.contains(o))return;const l=q(e.anchor.getNode(),_=>H(_));if(!l)return;const u=q(l,_=>ge(_));if(!ge(u)||!u.is(t))return;const[c,f]=zt(t,l,l),d=c[0][0],h=c[c.length-1][c[0].length-1],{startRow:g,startColumn:m}=f,p=g===d.startRow&&m===d.startColumn,y=g===h.startRow&&m===h.startColumn;return p?"first":y?"last":void 0}function Fn(n,e){const{tableNode:t}=n.$lookup(),r=t.getCordsFromCellNode(e,n.table);return t.getDOMCellFromCordsOrThrow(r.x,r.y,n.table)}function Va(n,e,t){return Cs(n,Xe(e,t))}function bf(n){return K(n)&&n.nodeName==="DIV"}function kf(n,e,t){let r=n.querySelector(":scope > colgroup");if(!t)return void(r&&r.remove());r||(r=re().createElement("colgroup"),Mo(r),n.insertBefore(r,n.firstChild));const i=[];for(let o=0;o<e;o++){const s=re().createElement("col"),a=t[o];a&&(s.style.width=`${a}px`),i.push(s)}r.replaceChildren(...i)}function xf(n,e,t){if(!e.theme.tableAlignment)return;const r=[],i=[];for(const o of["center","right"]){const s=e.theme.tableAlignment[o];s&&(o===t?i:r).push(s)}Kt(n,...r),Ee(n,...i)}const Ya=new WeakSet;function Vo(n=Ce()){return Ya.has(n)}function Cf(n=Ce()){const e=Br(n,"@lexical/table/Table");return!!e&&e.output.hasStickyScrollbar.peek()&&e.output.hasHorizontalScroll.peek()}function Ck(n,e){e?Ya.add(n):Ya.delete(n)}class Hn extends ve{__rowStriping=!1;__frozenColumnCount=0;__frozenRowCount=0;__colWidths=void 0;$config(){return this.config("table",{extends:ve,importDOM:{table:()=>({conversion:Sk,priority:1})}})}getColWidths(){return this.getLatest().__colWidths}setColWidths(e){const t=this.getWritable();return t.__colWidths=e,t}afterCloneFrom(e){super.afterCloneFrom(e),this.__colWidths=e.__colWidths,this.__rowStriping=e.__rowStriping,this.__frozenColumnCount=e.__frozenColumnCount,this.__frozenRowCount=e.__frozenRowCount}updateFromJSON(e){return super.updateFromJSON(e).setRowStriping(e.rowStriping||!1).setFrozenColumns(e.frozenColumnCount||0).setFrozenRows(e.frozenRowCount||0).setColWidths(e.colWidths)}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(e,t,r){return r==="html"}getDOMSlot(e){const t=Dn(e)?e:e.querySelector("table");return Dn(t)||U(229),super.getDOMSlot(e).withElement(t).withAfter(t.querySelector(":scope > colgroup"))}createDOM(e,t){const r=re().createElement("table");if(this.__style&&gn(r.style,this.__style),this.getColWidths()){const i=re().createElement("colgroup");r.appendChild(i),Mo(i)}if(Ee(r,e.theme.table),this.updateTableElement(null,r,e),Vo(t)){const i=Cf(t),o=(function(s,a,l){const u=re().createElement("div"),c=a.theme.tableScrollableWrapper;return c?Ee(u,c):u.style.overflowX="auto",l&&(u.style.scrollbarWidth="none"),u.appendChild(s),u})(r,e,i);if(this.updateTableWrapper(null,o,r,e),i){const s=(function(l){const u=re(),c=u.createElement("div"),f=l.theme.tableStickyScrollbar;f?Ee(c,f):(c.style.position="sticky",c.style.bottom="0",c.style.overflowX="scroll",c.style.overflowY="hidden"),c.style.display="none",c.setAttribute("aria-hidden","true"),c.tabIndex=-1;const d=u.createElement("div");return d.style.height="1px",d.style.width="0px",c.appendChild(d),c})(e),a=re().createElement("div");return a.setAttribute("data-lexical-sticky-scrollbar","true"),a.appendChild(o),a.appendChild(s),Mo(s),a}return o}return r}updateTableWrapper(e,t,r,i){this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&(function(o,s,a,l){l>0?(Ee(o,a.theme.tableFrozenColumn),s.setAttribute("data-lexical-frozen-column","true")):(Kt(o,a.theme.tableFrozenColumn),s.removeAttribute("data-lexical-frozen-column"))})(t,r,i,this.__frozenColumnCount),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&(function(o,s,a,l){l>0?(Ee(o,a.theme.tableFrozenRow),s.setAttribute("data-lexical-frozen-row","true")):(Kt(o,a.theme.tableFrozenRow),s.removeAttribute("data-lexical-frozen-row"))})(t,r,i,this.__frozenRowCount)}updateTableElement(e,t,r){this.__style!==(e?e.__style:"")&&gn(t.style,this.__style,e?e.__style:""),this.__rowStriping!==(!!e&&e.__rowStriping)&&(function(s,a,l){l?(Ee(s,a.theme.tableRowStriping),s.setAttribute("data-lexical-row-striping","true")):(Kt(s,a.theme.tableRowStriping),s.removeAttribute("data-lexical-row-striping"))})(t,r,this.__rowStriping);const i=e?e.getColumnCount():0,o=e?e.__colWidths:void 0;this.getColumnCount()===i&&this.getColWidths()===o||kf(t,this.getColumnCount(),this.getColWidths()),xf(t,r,this.getFormatType())}updateDOM(e,t,r){const i=an(this,t);if(t===i===Vo())return!0;if(bf(t)){if(t.hasAttribute("data-lexical-sticky-scrollbar")!==Cf())return!0;const o=i.parentElement;bf(o)&&this.updateTableWrapper(e,o,i,r)}return this.updateTableElement(e,i,r),!1}scaleDOMColWidths(e,t){const r=this.getColWidths();r&&kf(an(this,e),this.getColumnCount(),r.map(i=>i*t))}exportDOM(e){const t=super.exportDOM(e),{element:r}=t;return{after:i=>{if(t.after&&(i=t.after(i)),!Dn(i)&&K(i)&&(i=i.querySelector("table")),!Dn(i))return null;xf(i,e._config,this.getFormatType());const[o]=en(this,null,null),s=new Map;for(const c of o)for(const f of c){const d=f.cell.getKey();s.has(d)||s.set(d,{colSpan:f.cell.getColSpan(),startColumn:f.startColumn})}const a=new Set;for(const c of i.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){const f=c.getAttribute("data-temporary-table-cell-lexical-key");if(f){const d=s.get(f);if(c.removeAttribute("data-temporary-table-cell-lexical-key"),d){s.delete(f);for(let h=0;h<d.colSpan;h++)a.add(h+d.startColumn)}}}const l=i.querySelector(":scope > colgroup");if(l){const c=Array.from(i.querySelectorAll(":scope > colgroup > col")).filter((f,d)=>a.has(d));l.replaceChildren(...c)}const u=i.querySelectorAll(":scope > tr");if(u.length>0){const c=re().createElement("tbody");for(const f of u)c.appendChild(f);i.append(c)}return i},element:!Dn(r)&&K(r)?r.querySelector("table"):r}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,t){const{rows:r,domRows:i}=t;for(let o=0;o<r;o++){const s=i[o];if(s!=null)for(let a=0;a<s.length;a++){const l=s[a];if(l==null)continue;const{elem:u}=l,c=Va(this,u);if(c!==null&&e.is(c))return{x:a,y:o}}}throw new Error("Cell not found in table.")}getDOMCellFromCords(e,t,r){const{domRows:i}=r,o=i[t];if(o==null)return null;const s=o[e<o.length?e:o.length-1];return s??null}getDOMCellFromCordsOrThrow(e,t,r){const i=this.getDOMCellFromCords(e,t,r);if(!i)throw new Error("Cell not found at cords.");return i}getCellNodeFromCords(e,t,r){const i=this.getDOMCellFromCords(e,t,r);if(i==null)return null;const o=Xe(i.elem);return H(o)?o:null}getCellNodeFromCordsOrThrow(e,t,r){const i=this.getCellNodeFromCords(e,t,r);if(!i)throw new Error("Node at cords not TableCellNode.");return i}getRowStriping(){return!!this.getLatest().__rowStriping}setRowStriping(e){const t=this.getWritable();return t.__rowStriping=e,t}setFrozenColumns(e){const t=this.getWritable();return t.__frozenColumnCount=e,t}getFrozenColumns(){return this.getLatest().__frozenColumnCount}setFrozenRows(e){const t=this.getWritable();return t.__frozenRowCount=e,t}getFrozenRows(){return this.getLatest().__frozenRowCount}canSelectBefore(){return!0}canIndent(){return!1}getColumnCount(){const e=this.getFirstChild();if(!be(e))return 0;let t=0;return e.getChildren().forEach(r=>{H(r)&&(t+=r.getColSpan())}),t}}function vk(n,e){const t=n.getElementByKey(e.getKey());return t===null&&U(230),Cr(e,t)}function Sk(n){const e=Pi();n.hasAttribute("data-lexical-row-striping")&&e.setRowStriping(!0),n.hasAttribute("data-lexical-frozen-column")&&e.setFrozenColumns(1),n.hasAttribute("data-lexical-frozen-row")&&e.setFrozenRows(1);const t=n.querySelector(":scope > colgroup");if(t){let r=[];for(const i of t.querySelectorAll(":scope > col")){let o=i.style.width||"";if(!kr.test(o)&&(o=i.getAttribute("width")||"",!/^\d+$/.test(o))){r=void 0;break}r.push(parseFloat(o))}r&&e.setColWidths(r)}return{after:r=>Po(r,be),node:e}}function Pi(){return Ge(new Hn)}function ge(n){return n instanceof Hn}function wk(n){be(n.getParent())?n.isEmpty()&&n.append(Y()):n.remove()}function Tk(n){ge(n.getParent())?Dh(n,H):n.remove()}function Ek(n){Dh(n,be);const[e]=en(n,null,null),t=e.reduce((s,a)=>Math.max(s,a.length),0),r=n.getChildren();for(let s=0;s<e.length;++s){const a=r[s];if(!a)continue;be(a)||U(254,a.constructor.name,a.getType());const l=e[s].reduce((u,c)=>c?1+u:u,0);if(l!==t)for(let u=l;u<t;++u){const c=ut();c.append(Y()),a.append(c)}}const i=n.getColWidths(),o=n.getColumnCount();if(i&&i.length!==o){let s;if(o<i.length)s=i.slice(0,o);else if(i.length>0){const a=i[i.length-1];s=[...i,...Array(o-i.length).fill(a)]}n.setColWidths(s)}}function Nk(n){if(n.detail<3||!Ft(n.target))return!1;const e=Xe(n.target);if(e===null)return!1;const t=q(e,r=>x(r)&&!r.isInline());return t===null?!1:!!H(t.getParent())&&(t.select(0),!0)}function Dk(){const n=A();if(!N(n))return!1;const e=Rr(n.anchor.getNode());if(e===null)return!1;const t=me();if(!t.is(e.getParent())||t.getChildrenSize()!==1)return!1;const[r]=en(e,null,null);if(r.length===0||r[0].length===0)return!1;const i=r[0][0];if(!i||!i.cell)return!1;const o=r[r.length-1],s=o[o.length-1];if(!s||!s.cell)return!1;const a=Ha(e,i.cell,s.cell);return pe(a),!0}function $k(n){return n.registerNodeTransform(Sn,e=>{if(e.getColSpan()>1||e.getRowSpan()>1){const[,,t]=Lt(e),[r]=zt(t,e,e),i=r.length,o=r[0].length;let s=t.getFirstChild();be(s)||U(175);const a=[];for(let l=0;l<i;l++){l!==0&&(s=s.getNextSibling(),be(s)||U(175));let u=null;for(let c=0;c<o;c++){const f=r[l][c],d=f.cell;if(f.startRow===l&&f.startColumn===c)u=d,a.push(d);else if(d.getColSpan()>1||d.getRowSpan()>1){H(d)||U(176);const h=ut(d.__headerState);u!==null?u.insertAfter(h):ky(s,h)}}}for(const l of a)l.setColSpan(1),l.setRowSpan(1)}})}function Fk(n,e=!0){const t=new ck,r=(i,o,s)=>{const a=an(i,s),l=mk(i,a,n,e,t);t.observers.set(o,[l,a])};return Je(pk(n,t),n.registerCommand(jt,()=>yk(t,n),dt),n.registerMutationListener(Hn,i=>{n.read("latest",()=>{for(const[o,s]of i){const a=t.observers.get(o);if(s==="created"||s==="updated"){const{tableNode:l,tableElement:u}=zg(o);a===void 0?r(l,o,u):u!==a[1]&&(t.removeObserver(o),r(l,o,u))}else s==="destroyed"&&t.removeObserver(o)}})},{skipInitialization:!1}),()=>{t.removeAllObservers()})}function Ak(n,e){n.hasNodes([Hn])||U(255);const{hasNestedTables:t=ji(!1)}=e??{};return Je(n.registerCommand(Qb,r=>(function({rows:i,columns:o,includeHeaders:s},a){const l=A()||lt();if(!l||!N(l)||!a&&Rr(l.anchor.getNode()))return!1;const u=tk(Number(i),Number(o),s);by(u);const c=u.getFirstDescendant();return $(c)&&c.select(),!0})(r,t.peek()),G),n.registerCommand(nd,(r,i)=>n===i&&(function(o,s){const{nodes:a,selection:l}=o;if(!a.some(f=>ge(f)||dy(f).some(d=>ge(d.node)))){if(_e(l)){let f="",d=!1;for(const h of a){const g=x(h)&&!h.isInline();f.length>0&&(g||d)&&(f+=`
|
|
28
|
+
`),f+=h.getTextContent(),d=g}return l.insertRawText(f),!0}return!1}const u=_e(l),c=N(l);return c&&q(l.anchor.getNode(),f=>H(f))!==null&&q(l.focus.getNode(),f=>H(f))!==null||u?a.length===1&&ge(a[0])?Ag(a[0],l):!(c&&s.peek()&&!(function(f){return!!(_e(f)&&!f.focus.getNode().is(f.anchor.getNode())||N(f)&&H(f.anchor.getNode())&&!f.anchor.getNode().is(f.focus.getNode()))})(l)):!1})(r,t),G),n.registerCommand(ul,Dk,gt),n.registerCommand(Zo,Nk,G),n.registerNodeTransform(Hn,Ek),n.registerNodeTransform(Ri,Tk),n.registerNodeTransform(Sn,wk))}$e.tag("table"),$e.tag("tr"),$e.tag("td","th");const zk=/^\|(.+)\|\s*$/,Ok=n=>Gl(Ii,n).replace(/\n+/g," ").replace(/\|/g,"\\|").trim(),Mk=n=>{const e=n.trim().replace(/^\|/,"").replace(/\|$/,""),t=[];let r="";for(let i=0;i<e.length;i++){const o=e[i];if(o==="\\"&&e[i+1]==="|"){r+="|",i++;continue}if(o==="|"){t.push(r),r="";continue}r+=o}return t.push(r),t},jk=n=>{const e=ut(le.NO_STATUS);return $g(n.trim(),Ii,e),e},vf=(n,e)=>{const t=Un();for(let r=0;r<e;r++)t.append(jk(n[r]??""));return t},Rk=n=>{const e=n.getFirstChild();return be(e)?e.getChildrenSize():0},Pk=n=>{const e=n.getFirstChild();if(be(e))for(const t of e.getChildren())H(t)&&t.setHeaderStyles(le.ROW,le.ROW)},Ik={dependencies:[Hn,Ri,Sn],export:n=>{if(!ge(n))return null;const e=[];for(const t of n.getChildren()){if(!be(t))continue;const r=t.getChildren().filter(H);r.length!==0&&(e.push(`| ${r.map(Ok).join(" | ")} |`),e.length===1&&e.push(`| ${r.map(()=>"---").join(" | ")} |`))}return e.length===0?null:e.join(`
|
|
29
|
+
`)},regExp:zk,replace:(n,e,t)=>{const r=t[0].trimEnd(),i=n.getPreviousSibling();if(wg(r)){if(ge(i)){Pk(i),n.remove();return}const a=e[0];$(a)&&a.setTextContent(r);return}const o=Mk(r);if(ge(i)){i.append(vf(o,Rk(i))),n.remove();return}const s=Pi();s.append(vf(o,o.length)),n.replace(s)},type:"element"},Ii=[Ik,...Xl],Pg=z.createContext(null);function Lk(n,e){return{getTheme:function(){return e??null}}}function st(){const n=z.useContext(Pg);return n==null&&(function(e,...t){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",e);for(const o of t)i.append("v",o);throw r.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),n}function Sf(n,e){return n.read("latest",()=>{const t=ie(e);return t!==null&&t.isSelected()})}function Bk(n){const[e]=st(),[t,r]=z.useState(()=>Sf(e,n));return z.useEffect(()=>{let i=!0;const o=e.registerUpdateListener(()=>{i&&r(Sf(e,n))});return()=>{i=!1,o()}},[e,n]),[t,z.useCallback(i=>{e.update(()=>{let o=A();de(o)||(o=pi(),pe(o)),de(o)&&(i?o.add(n):o.delete(n))})},[e,n]),z.useCallback(()=>{e.update(()=>{const i=A();de(i)&&i.clear()})},[e])]}function Kk({nodeKey:n}){const[e]=st(),[t,r,i]=Bk(n);return z.useEffect(()=>Je(e.registerCommand(Zo,o=>{const s=e.getElementByKey(n);return Pn(o)===s&&(o.shiftKey||i(),r(!t),!0)},gt)),[i,e,t,n,r]),z.useEffect(()=>{const o=e.getElementByKey(n),s=e._config.theme.hrSelected??"selected";o!==null&&(t?Ee(o,s):Kt(o,s))},[e,t,n]),null}let Ig=class extends Pl{$config(){return this.config("horizontalrule",{importDOM:{hr:()=>({conversion:Wk,priority:0})}})}decorate(){return M.jsx(Kk,{nodeKey:this.__key})}};function Wk(){return{node:qk()}}function qk(){return Ge(new Ig)}const Lg=[bs,_s,Gn,vn,bn,Hl,Hn,Ri,Sn,ys,Ul,Ig],Uk={code:"block my-2 rounded bg-surface-sunken p-2 font-mono text-xs whitespace-pre-wrap",heading:{h1:"mt-3 mb-1 text-xl font-semibold",h2:"mt-3 mb-1 text-lg font-semibold",h3:"mt-2 mb-1 text-base font-semibold",h4:"mt-2 mb-1 text-sm font-semibold",h5:"mt-2 mb-1 text-sm font-semibold",h6:"mt-2 mb-1 text-xs font-semibold uppercase tracking-wide"},hr:"my-3 border-t border-line",link:"text-accent underline",list:{listitem:"ml-2",nested:{listitem:"list-none"},ol:"my-1 list-decimal pl-6",ul:"my-1 list-disc pl-6"},paragraph:"my-1",quote:"my-1 border-l-2 border-fg-subtle/30 pl-3 text-fg-muted [&_p]:my-0.5",table:"my-2 w-full table-fixed border-collapse",tableCell:"border border-line px-2 py-1 align-top",tableCellHeader:"bg-surface-sunken font-semibold",text:{bold:"font-semibold",code:"rounded bg-surface-sunken px-1 font-mono text-xs",italic:"italic",strikethrough:"line-through",underline:"underline"}},Zl=(n,e)=>{const t=new DOMParser().parseFromString(Ga(e),"text/html");return eg(n,t)},Hk=new Set(["root","paragraph","text","linebreak"]),Jk=["bold","italic","strikethrough","underline","code","subscript","superscript","highlight"],Vk=()=>{const n=new Set,e=t=>{const r=t.getType();if(Hk.has(r)||n.add(r),$(t))for(const i of Jk)t.hasFormat(i)&&n.add(i);if(x(t))for(const i of t.getChildren())e(i)};return e(me()),[...n].sort()},Yk=n=>({html:Ga(Wl(n,null)),text:Gl(Ii),formatting:Vk()}),Bg=()=>pl({namespace:"compose-conversion",nodes:[...Lg],onError:n=>{throw n}}),Xk=n=>{const e=Bg();return e.update(()=>{const t=me();t.clear(),t.select(),os(Zl(e,n))},{discrete:!0}),e.read(()=>Gl(Ii))},Gk=n=>{const e=Bg();return e.update(()=>{$g(n,Ii)},{discrete:!0}),e.read(()=>Ga(Wl(e,null)))},Zk="Nothing to paste. The copied content was an image, or had no text in it.",Qk=(n,e)=>{const t=n.selectionStart??n.value.length,r=n.selectionEnd??t;return document.execCommand?.bind(document)?.("insertText",!1,e)?null:{value:n.value.slice(0,t)+e+n.value.slice(r),caret:t+e.length}},e0=({value:n,onChange:e,onSubmit:t,autoFocus:r=!1,placeholder:i="Write your message…",ariaLabel:o="Message body",trailing:s,lang:a})=>{const l=z.useRef(null),u=z.useRef(null),c=z.useRef(!1),[f,d]=z.useState(!1);z.useLayoutEffect(()=>{const m=l.current;if(!m||(m.style.height="auto",m.style.height=`${m.scrollHeight}px`,m.value!==n))return;const p=u.current;p!==null&&(u.current=null,m.setSelectionRange(p,p))},[n]),z.useEffect(()=>{if(!r)return;const m=l.current;if(!m)return;const p=setTimeout(()=>{m.focus();const y=m.value.length;m.setSelectionRange(y,y)},0);return()=>clearTimeout(p)},[r]);const h=m=>{(m.metaKey||m.ctrlKey)&&m.key.toLowerCase()==="v"&&(c.current=m.shiftKey),t&&(!(m.metaKey||m.ctrlKey)||m.key!=="Enter"||(m.preventDefault(),t()))},g=m=>{const p=m.clipboardData;if(!p)return;const y=m.currentTarget;m.preventDefault();const _=c.current;c.current=!1;const b=p.getData("text/plain"),k=_?"":p.getData("text/html"),S=(k?Xk(k):"")||b;if(S===""){d(!0);return}d(!1);const C=Qk(y,S);C&&(u.current=C.caret,e(C.value))};return M.jsxs("div",{className:"flex shrink-0 grow flex-col",children:[M.jsx("div",{className:"sticky top-0 z-10 border-b border-line bg-canvas",children:M.jsxs("div",{className:"flex items-center gap-2 px-3 py-1",children:[M.jsx("span",{className:"min-w-0 truncate py-2 text-xs text-fg-muted",children:"Plain text · Markdown"}),s&&M.jsx("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:s})]})}),f&&M.jsx(Gg,{tone:"info",variant:"soft",onDismiss:()=>d(!1),className:"mx-3 mt-2",children:Zk}),M.jsx("textarea",{ref:l,value:n,onChange:m=>e(m.target.value),onKeyDown:h,onPaste:g,lang:a,"aria-label":o,placeholder:i,"data-testid":"compose-body-plain",wrap:"off",spellCheck:!0,className:"w-full shrink-0 grow resize-none overflow-x-auto whitespace-pre bg-canvas px-3 py-2 font-mono text-base text-fg outline-none placeholder:text-fg-subtle"})]})},t0=Ve?z.useLayoutEffect:z.useEffect,to={tag:mr};function n0({initialConfig:n,children:e}){const t=z.useMemo(()=>{const{theme:r,namespace:i,nodes:o,onError:s,onWarn:a,editorState:l,html:u}=n,c=Lk(null,r),f=pl({editable:n.editable,html:u,namespace:i,nodes:o,onError:d=>s(d,f),...a?{onWarn:d=>a(d,f)}:{},theme:r});return(function(d,h){if(h!==null){if(h===void 0)d.update(()=>{const g=me();if(g.isEmpty()){const m=Y();g.append(m);const p=d.getRootElement(),y=Ve&&p!==null?bi(p):null;(A()!==null||y!==null&&y===p)&&m.select()}},to);else if(h!==null)switch(typeof h){case"string":{const g=d.parseEditorState(h);d.setEditorState(g,to);break}case"object":d.setEditorState(h,to);break;case"function":d.update(()=>{me().isEmpty()&&h(d)},to)}}})(f,l),[f,c]},[]);return t0(()=>{const r=n.editable,[i]=t;i.setEditable(r===void 0||r)},[]),M.jsx(Pg.Provider,{value:t,children:e})}function r0(){return me().getTextContent()}function i0(n,e=!0){if(n)return!1;let t=r0();return e&&(t=t.trim()),t===""}function o0(n){if(!i0(n,!1))return!1;const e=me().getChildren(),t=e.length;if(t>1)return!1;for(let r=0;r<t;r++){const i=e[r];if(Q(i))return!1;if(x(i)){if(!Ht(i)||i.__indent!==0)return!1;const o=i.getChildren(),s=o.length;for(let a=0;a<s;a++){const l=o[r];if(!$(l))return!1}}}return!0}function Kg(n){return()=>o0(n)}const Wg=Ve?z.useLayoutEffect:z.useEffect;function s0({editor:n,ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:o,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:f,ariaRequired:d,autoCapitalize:h,className:g,id:m,role:p="textbox",spellCheck:y=!0,style:_,tabIndex:b,"data-testid":k,...S},C){const[w,v]=z.useState(n.isEditable()),T=z.useCallback(E=>{E&&E.ownerDocument&&E.ownerDocument.defaultView?n.setRootElement(E):n.setRootElement(null)},[n]),F=z.useMemo(()=>(function(...E){return O=>{for(const R of E)typeof R=="function"?R(O):R!=null&&(R.current=O)}})(C,T),[T,C]);return Wg(()=>(v(n.isEditable()),n.registerEditableListener(E=>{v(E)})),[n]),M.jsx("div",{"aria-activedescendant":w?e:void 0,"aria-autocomplete":w?t:"none","aria-controls":w?r:void 0,"aria-describedby":i,...o!=null?{"aria-errormessage":o}:{},"aria-expanded":w&&p==="combobox"?!!s:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":u,"aria-multiline":c,"aria-owns":w?f:void 0,"aria-readonly":!w||void 0,"aria-required":d,autoCapitalize:h,className:g,contentEditable:w,"data-testid":k,id:m,ref:F,role:p,spellCheck:y,style:_,tabIndex:b??(w?void 0:-1),...S})}const a0=z.forwardRef(s0);function wf(n){return n.read("latest",Kg(n.isComposing()))}const l0=z.forwardRef(u0);function u0(n,e){const{placeholder:t,...r}=n,[i]=st();return M.jsxs(M.Fragment,{children:[M.jsx(a0,{editor:i,...r,ref:e}),t!=null&&M.jsx(c0,{editor:i,content:t})]})}function c0({content:n,editor:e}){const t=(function(s){const[a,l]=z.useState(()=>wf(s));return Wg(()=>{function u(){const c=wf(s);l(c)}return u(),Je(s.registerUpdateListener(()=>{u()}),s.registerEditableListener(()=>{u()}))},[s]),a})(e),[r,i]=z.useState(e.isEditable());if(z.useLayoutEffect(()=>(i(e.isEditable()),e.registerEditableListener(s=>{i(s)})),[e]),!t)return null;let o=null;return typeof n=="function"?o=n(r):n!==null&&(o=n),o===null?null:M.jsx("div",{"aria-hidden":!0,children:o})}class f0 extends z.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e instanceof Error?e:new Error(String(e),{cause:e}),t)}render(){return this.state.hasError?this.props.fallback:this.props.children}}function d0({children:n,fallback:e,onError:t}){return M.jsx(f0,{fallback:e===void 0?M.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}):e,onError:t,children:n})}function h0(n,e,t,r,i){if(n===null||t.size===0&&r.size===0&&!i)return 0;const o=e._selection,s=n._selection;if(i)return 1;if(!(N(o)&&N(s)&&s.isCollapsed()&&o.isCollapsed()))return 0;const a=(function(y,_,b){const k=y._nodeMap,S=[];for(const C of _){const w=k.get(C);w!==void 0&&S.push(w)}for(const[C,w]of b){if(!w)continue;const v=k.get(C);v===void 0||Ne(v)||S.push(v)}return S})(e,t,r);if(a.length===0)return 0;if(a.length>1){const y=e._nodeMap,_=y.get(o.anchor.key),b=y.get(s.anchor.key);return _&&b&&!n._nodeMap.has(_.__key)&&$(_)&&_.__text.length===1&&o.anchor.offset===1?2:0}const l=a[0],u=n._nodeMap.get(l.__key);if(!$(u)||!$(l)||u.__mode!==l.__mode)return 0;const c=u.__text,f=l.__text;if(c===f)return 0;const d=o.anchor,h=s.anchor;if(d.key!==h.key||d.type!=="text")return 0;const g=d.offset,m=h.offset,p=f.length-c.length;return p===1&&m===g-1?2:p===-1&&m===g+1?3:p===-1&&m===g?4:0}function g0(n,e,t){let r=t(),i=0,o=r,s=0,a=null;return(l,u,c,f,d,h)=>{const g=t();if(h.has(Sd)&&(o=r,s=i,a=l),h.has(da))return i=0,r=g,2;h.has(vo)&&a&&(r=o,i=s,l=a);const m=h.has(Cd)||h.has(vd)?0:h0(l,u,f,d,n.isComposing()),p=(()=>{const y=c===null||c.editor===n,_=h.has(Qp);if(!_&&y&&h.has(mr))return 0;if(m===1)return 2;if(l===null)return 1;const b=u._selection;if(!(f.size>0||d.size>0))return b!==null?0:2;const k=typeof e=="number"?e:e.peek();return _===!1&&m!==0&&m===i&&g<r+k&&y||f.size===1&&(function(S,C,w){const v=C._nodeMap.get(S),T=w._nodeMap.get(S),F=C._selection,E=w._selection;return!(N(F)&&N(E)&&F.anchor.type==="element"&&F.focus.type==="element"&&E.anchor.type==="text"&&E.focus.type==="text"||!$(v)||!$(T)||v.__parent!==T.__parent)&&JSON.stringify(C.read(()=>v.exportJSON()))===JSON.stringify(w.read(()=>T.exportJSON()))})(Array.from(f)[0],l,u)?0:1})();return r=g,i=m,p}}function Tf(n,e){n.undoStack=[],n.redoStack=[],n.current=null}function p0(n,e,t,r=Date.now,i,o=null){const s=g0(n,t,r);return Je(n.registerCommand(Qo,()=>((function(a,l,u){const c=l.redoStack,f=l.undoStack;if(f.length!==0){const d=l.current,h=f.pop();d!==null&&(c.push(d),a.dispatchCommand(Zr,!0)),f.length===0&&a.dispatchCommand(Qr,!1),l.current=h||null,h&&h.editor.setEditorState(h.editorState,{tag:da})}})(n,e),!0),G),n.registerCommand(es,()=>((function(a,l,u){const c=l.redoStack,f=l.undoStack;if(c.length!==0){const d=l.current;d!==null&&(f.push(d),a.dispatchCommand(Qr,!0));const h=c.pop();c.length===0&&a.dispatchCommand(Zr,!1),l.current=h||null,h&&h.editor.setEditorState(h.editorState,{tag:da})}})(n,e),!0),G),n.registerCommand(Bp,()=>(Tf(e),!1),G),n.registerCommand(Kp,()=>(Tf(e),n.dispatchCommand(Zr,!1),n.dispatchCommand(Qr,!1),!0),G),n.registerUpdateListener(({editorState:a,prevEditorState:l,dirtyLeaves:u,dirtyElements:c,tags:f})=>{const d=e.current,h=e.redoStack,g=e.undoStack,m=d===null?null:d.editorState;if(d!==null&&a===m)return;const p=s(l,a,d,u,c,f);if(p===1){if(h.length!==0&&(e.redoStack=[],n.dispatchCommand(Zr,!1)),d!==null){g.push({...d});const y=typeof o=="number"||o===null?o:o.peek();y!==null&&g.length>y&&g.splice(0,g.length-y),n.dispatchCommand(Qr,!0)}}else if(p===2)return;e.current={editor:n,editorState:a}}))}function m0(){return{current:null,redoStack:[],undoStack:[]}}function y0({delay:n,externalHistoryState:e}){const[t]=st();return(function(r,i,o=1e3){const s=z.useMemo(()=>i||m0(),[i]);z.useEffect(()=>p0(r,s,o),[o,r,s])})(t,e,n),null}function _0({validateUrl:n,attributes:e}){const[t]=st();return z.useEffect(()=>{if(!t.hasNodes([bn]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),z.useEffect(()=>P_(t,Sy({attributes:e,validateUrl:n})),[t,n,e]),null}function b0({hasStrictIndent:n=!1,shouldPreserveNumbering:e=!1}){const[t]=st();return z.useEffect(()=>{if(!t.hasNodes([Gn,vn]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),z.useEffect(()=>Je(Wc(t,{restoreNumbering:e}),n?G_(t):()=>{}),[t,n,e]),(function(r){z.useEffect(()=>Wc(r),[r])})(t),null}const k0=Ve?z.useLayoutEffect:z.useEffect;function x0(n){return{initialValueFn:()=>n.isEditable(),subscribe:e=>n.registerEditableListener(e)}}function C0(){return(function(n){const[e]=st(),t=z.useMemo(()=>n(e),[e,n]),[r,i]=z.useState(()=>t.initialValueFn()),o=z.useRef(r);return k0(()=>{const{initialValueFn:s,subscribe:a}=t,l=s();return o.current!==l&&(o.current=l,i(l)),a(u=>{o.current=u,i(u)})},[t,n]),r})(x0)}const v0={name:"@lexical/react/ReactProvider"};function S0(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Ql=Ve?z.useLayoutEffect:z.useEffect;function w0({editor:n,ErrorBoundary:e}){return(function(t,r){const[i,o]=z.useState(()=>t.getDecorators());return Ql(()=>t.registerDecoratorListener(s=>{nu.flushSync(()=>{o(s)})}),[t]),z.useEffect(()=>{o(t.getDecorators())},[t]),z.useMemo(()=>{const s=[],a=Object.keys(i);for(let l=0;l<a.length;l++){const u=a[l],c=M.jsx(r,{onError:d=>t._onError(d),children:M.jsx(z.Suspense,{fallback:null,children:i[u]})}),f=t.getElementByKey(u);f!==null&&s.push(nu.createPortal(c,f,u))}return s},[r,i,t])})(n,e)}function T0({editor:n,ErrorBoundary:e}){return(function(t){const r=Ih.maybeFromEditor(t);if(r&&r.hasExtensionByName(v0.name)){for(const i of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(i)&&S0(320,i);return!0}return!1})(n)?null:M.jsx(w0,{editor:n,ErrorBoundary:e})}function Ef(n){return n.read("latest",Kg(n.isComposing()))}function E0({contentEditable:n,placeholder:e=null,ErrorBoundary:t}){const[r]=st();return(function(i){Ql(()=>Je(kb(i),gb(i)),[i])})(r),M.jsxs(M.Fragment,{children:[n,M.jsx(N0,{content:e}),M.jsx(T0,{editor:r,ErrorBoundary:t})]})}function N0({content:n}){const[e]=st(),t=(function(i){const[o,s]=z.useState(()=>Ef(i));return Ql(()=>{function a(){const l=Ef(i);s(l)}return a(),Je(i.registerUpdateListener(()=>{a()}),i.registerEditableListener(()=>{a()}))},[i]),o})(e),r=C0();return t?typeof n=="function"?n(r):n:null}function D0({hasCellMerge:n=!0,hasCellBackgroundColor:e=!0,hasTabHandler:t=!0,hasHorizontalScroll:r=!1,hasNestedTables:i=!1}){const[o]=st();z.useEffect(()=>{Vo(o)!==r&&(Ck(o,r),o.update(Id))},[o,r]);const s=(function(a){const[l]=z.useState(()=>ji(a));return l.peek()!==a&&(l.value=a),l})(i);return z.useEffect(()=>Ak(o,{hasNestedTables:s}),[o,s]),z.useEffect(()=>Fk(o,t),[o,t]),z.useEffect(()=>{if(!n)return $k(o)},[o,n]),z.useEffect(()=>{if(!e)return o.registerNodeTransform(Sn,a=>{a.getBackgroundColor()!==null&&a.setBackgroundColor(null)})},[o,e,n]),null}const ar=({isActive:n,onClick:e,children:t,title:r})=>M.jsx("button",{type:"button",onMouseDown:i=>{i.preventDefault(),e()},title:r,"aria-label":r,"aria-pressed":n,className:`inline-flex min-h-11 min-w-11 shrink-0 items-center justify-center rounded transition-colors ${n?"text-fg bg-accent-2-soft":"text-fg-muted hover:text-fg hover:bg-surface-raised"}`,children:t}),$0={bold:!1,italic:!1,quote:!1,link:null,canUndo:!1,canRedo:!1},F0=({trailing:n})=>{const[e]=st(),[t,r]=z.useState($0),[i,o]=z.useState(null),s=z.useRef(null),a=z.useCallback(()=>{const c=A();if(!N(c))return;const f=c.anchor.getNode(),d=q(f,Ze),h=q(f,qo);r(g=>({...g,bold:c.hasFormat("bold"),italic:c.hasFormat("italic"),quote:h!==null,link:Ze(d)?d.getURL():null}))},[]);z.useEffect(()=>Je(e.registerUpdateListener(({editorState:c})=>{c.read(a)}),e.registerCommand(jt,()=>(a(),!1),gt),e.registerCommand(Qr,c=>(r(f=>({...f,canUndo:c})),!1),gt),e.registerCommand(Zr,c=>(r(f=>({...f,canRedo:c})),!1),gt)),[e,a]),z.useEffect(()=>{i!==null&&s.current?.focus()},[i]);const l=()=>{e.update(()=>{const c=A();N(c)&&uy(c,()=>t.quote?Y():Wr())})},u=c=>{const f=c.trim();e.dispatchCommand(Da,f===""?null:f),o(null),e.focus()};return M.jsxs("div",{className:"sticky top-0 z-10 border-b border-line bg-canvas",children:[M.jsxs("div",{className:"flex items-center gap-2 px-3 py-1",children:[M.jsxs("div",{"data-testid":"compose-format-cluster",className:"flex min-w-0 items-center gap-0.5 overflow-x-auto",children:[M.jsx(ar,{isActive:t.bold,onClick:()=>e.dispatchCommand(Tt,"bold"),title:"Bold (Ctrl+B)",children:M.jsx(np,{className:"size-4"})}),M.jsx(ar,{isActive:t.italic,onClick:()=>e.dispatchCommand(Tt,"italic"),title:"Italic (Ctrl+I)",children:M.jsx(rp,{className:"size-4"})}),M.jsx(ar,{isActive:t.link!==null,onClick:()=>o(t.link??"https://"),title:"Link (Ctrl+K)",children:M.jsx(ip,{className:"size-4"})}),M.jsx(ar,{isActive:t.quote,onClick:l,title:"Blockquote",children:M.jsx(op,{className:"size-4"})}),M.jsx("div",{className:"mx-1.5 h-4 w-px shrink-0 bg-line"}),M.jsx(ar,{isActive:!1,onClick:()=>e.dispatchCommand(Qo,void 0),title:"Undo (Ctrl+Z)",children:M.jsx(Qg,{className:`size-4 ${t.canUndo?"":"opacity-40"}`})}),M.jsx(ar,{isActive:!1,onClick:()=>e.dispatchCommand(es,void 0),title:"Redo (Ctrl+Y)",children:M.jsx(sp,{className:`size-4 ${t.canRedo?"":"opacity-40"}`})})]}),n&&M.jsx("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:n})]}),i!==null&&M.jsxs("div",{className:"flex items-center gap-2 border-t border-line px-3 py-1.5",children:[M.jsx("input",{ref:s,type:"url",value:i,"aria-label":"Link address",placeholder:"https://example.com",className:"min-w-0 flex-1 bg-transparent text-sm text-fg outline-none placeholder:text-fg-subtle",onChange:c=>o(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),u(i)),c.key==="Escape"&&(c.preventDefault(),o(null),e.focus())}}),M.jsx("button",{type:"button",className:"text-xs text-accent hover:underline",onClick:()=>u(i),children:"Apply"}),t.link!==null&&M.jsx("button",{type:"button",className:"text-xs text-fg-muted hover:text-fg",onClick:()=>u(""),children:"Remove"})]})]})},A0=()=>{const[n]=st(),e=z.useRef(!1);return z.useEffect(()=>Je(n.registerCommand(tl,t=>((t.metaKey||t.ctrlKey)&&t.key.toLowerCase()==="v"&&(e.current=t.shiftKey),!1),gt),n.registerCommand(Pr,t=>{if(!(t instanceof ClipboardEvent))return!1;const r=t.clipboardData;if(!r)return!1;const i=e.current;if(e.current=!1,i){const s=A();return N(s)?(t.preventDefault(),s.insertRawText(r.getData("text/plain")),!0):!1}const o=r.getData("text/html");return o?(t.preventDefault(),os(Zl(n,o)),!0):!1},Jd)),[n]),null},z0=({onChange:n})=>{const[e]=st(),t=z.useRef(n);return z.useEffect(()=>{t.current=n},[n]),z.useEffect(()=>{const r=()=>t.current(e.read(()=>Yk(e)));return r(),e.registerUpdateListener(({dirtyElements:i,dirtyLeaves:o})=>{i.size===0&&o.size===0||r()})},[e]),null},O0=({enabled:n})=>{const[e]=st();return z.useEffect(()=>{if(!n)return;const t=setTimeout(()=>e.focus(),0);return()=>clearTimeout(t)},[e,n]),null},M0=n=>e=>{const t=Zl(e,n);t.length!==0&&(me().select(),os(t))},j0=({initialHtml:n,onChange:e,onSubmit:t,autoFocus:r=!1,placeholder:i="Write your message…",ariaLabel:o="Message body",trailing:s,lang:a})=>M.jsxs(n0,{initialConfig:{namespace:"compose",nodes:Lg,theme:Uk,editorState:n?M0(n):void 0,onError:l=>{throw l}},children:[M.jsxs("div",{className:"flex shrink-0 grow flex-col",children:[M.jsx(F0,{trailing:s}),M.jsx("div",{className:"relative flex shrink-0 grow flex-col",children:M.jsx(E0,{contentEditable:M.jsx(l0,{lang:a,"aria-label":o,"aria-placeholder":i,"data-testid":"compose-body",className:"min-h-[120px] w-full shrink-0 grow bg-canvas px-3 py-2 text-sm text-fg outline-none",placeholder:M.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 px-3 py-2 text-sm text-fg-subtle",children:i}),onKeyDown:l=>{t&&(!(l.metaKey||l.ctrlKey)||l.key!=="Enter"||(l.preventDefault(),t()))}}),ErrorBoundary:d0})})]}),M.jsx(y0,{}),M.jsx(b0,{}),M.jsx(_0,{}),M.jsx(D0,{}),M.jsx(A0,{}),M.jsx(O0,{enabled:r}),e&&M.jsx(z0,{onChange:e})]});qg(2);const R0=qg(3);function qg(n){if(typeof n!="number"||Number.isNaN(n)||n<1||n===Number.POSITIVE_INFINITY)throw new Error("`"+n+"` is not a valid argument for `n-gram`");return e;function e(t){const r=[];if(t==null)return r;const i=typeof t.slice=="function"?t:String(t);let o=i.length-n+1;if(o<1)return r;for(;o--;)r[o]=i.slice(o,o+n);return r}}const P0=/\s+/g,I0=/[\t\n\v\f\r ]+/g;function L0(n,e){e?typeof e=="string"&&(e={style:e}):e={};const t=e.preserveLineEndings?B0:K0;return String(n).replace(e.style==="html"?I0:P0,e.trim?W0(t):t)}function B0(n){const e=/\r?\n|\r/.exec(n);return e?e[0]:" "}function K0(){return" "}function W0(n){return e;function e(t,r,i){return r===0||r+t.length===i.length?"":n(t)}}const Ug={}.hasOwnProperty;function q0(n){return n==null?"":L0(String(n).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function U0(n){return R0(" "+q0(n)+" ")}function H0(n){const e=U0(n),t={};let r=-1;for(;++r<e.length;)Ug.call(t,e[r])?t[e[r]]++:t[e[r]]=1;return t}function J0(n){const e=H0(n),t=[];let r;for(r in e)Ug.call(e,r)&&t.push([r,e[r]]);return t.sort(V0),t}function V0(n,e){return n[1]-e[1]}const Y0={cmn:/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]/g,Latin:/[A-Za-z\u00AA\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uAB66-\uAB69\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A]|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]/g,Cyrillic:/[\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F]|\uD838[\uDC30-\uDC6D\uDC8F]/g,Arabic:/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u0870-\u088E\u0890\u0891\u0898-\u08E1\u08E3-\u08FF\uFB50-\uFBC2\uFBD3-\uFD3D\uFD40-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD803[\uDE60-\uDE7E\uDEFD-\uDEFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/g,ben:/[\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE]/g,Devanagari:/[\u0900-\u0950\u0955-\u0963\u0966-\u097F\uA8E0-\uA8FF]|\uD806[\uDF00-\uDF09]/g,jpn:/[\u3041-\u3096\u309D-\u309F]|\uD82C[\uDC01-\uDD1F\uDD32\uDD50-\uDD52]|\uD83C\uDE00|[\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD55\uDD64-\uDD67]|[\u3400-\u4DB5\u4E00-\u9FAF]/g,jav:/[\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF]/g,kor:/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/g,tel:/[\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C7F]/g,tam:/[\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA]|\uD807[\uDFC0-\uDFF1\uDFFF]/g,guj:/[\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF]/g,kan:/[\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3]/g,mal:/[\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F]/g,mya:/[\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F]/g,pan:/[\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76]/g,amh:/[\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]/g,tha:/[\u0E01-\u0E3A\u0E40-\u0E5B]/g,sin:/[\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4]|\uD804[\uDDE1-\uDDF4]/g,ell:/[\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65]|\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]/g},Vs={Latin:{spa:" de|de |os | la| a |la | y |ón |ión|es |ere|rec|ien|o a|der|ció|cho|ech|en |a p|ent|a l|aci|el |na |ona|e d| co|as |da | to|al |ene| en|tod| pe|e l| el|ho |nte| su|per|a t|ad | ti|ers|tie| se|rso|son|e s| pr|o d|oda|te |cia|n d| es|dad|ida| in|ne |est|ion|cio|s d|con|a e| po|men| li|n e|nci|res|su |to |tra| re| lo|tad| na|los|a s| o |ia |que| pa|rá |pro| un|s y|ual|s e|lib|nac|do |ra |er |a d|ue | qu|e e|sta|nal|ar |nes|ica|a c|ser|or |ter|se |por|cci|io |del|l d|des|ado|les|one|a a|ndi| so| cu|s p|ale|s n|ame|par|ici|oci|una|ber|s t|rta|com| di|dos|e a|imi|o s|e c|ert|las|o p|ant|dic|nto| al|ara|ibe|enc|o e|s l|cas| as|e p|ten|ali|o t|soc|y l|n c|nta|so |tos|y a|ria|n t|die|a u| fu|no |l p|ial|qui|dis|s o|hos|gua|igu| ig| ca|sar|l t| ma|l e|pre| ac|tiv|s a|re |nad|vid|era| tr|ier|cua|n p|ta |cla|ade|bre|s s|esa|ntr|ecc|a i| le|lid|das|d d|ido|ari|ind|ada|nda|fun|mie|ca |tic|eli|y d|nid|e i|odo|ios|o y|esp|iva|y e|mat|bli|r a|drá|tri|cti|tal|rim|ont|erá|us |sus|end|pen|tor|ito|ond|ori|uie|lig|n a|ist|rac|lar|rse|tar|mo |omo|ibr|n l|edi|med| me|nio|a y|eda|isf|lo |aso|l m|ias|ico|lic|ple|ste|act|tec|ote|rot|ele|ura| ni|ie |adi|u p|seg|s i|un |und|a n|lqu|alq|o i|inc|sti| si|n s|ern",eng:"the| th| an|he |nd |ion|and| to|to |tio| of|on |of | in|al |ati|or |ght|igh|rig| ri|ne |ent|one|ll |is |as |ver|ed | be|e r|in |t t|all|eve|ht | or|ery|s t|ty | ev|e h|yon| ha|ryo|e a|be |his| fr|ng |d t|has| sh|ing| hi|sha| pr| co| re|hal|nal|y a|s a|n t|ce |men|ree|fre|e s|l b|nat|for|ts |nt |n a|ity|ry |her|nce|ect|d i| pe|pro|n o|cti| fo|e e|ly |es | no|ona|ny |any|er |re |f t|e o| de|s o| wi|ter|nte|e i|ons| en| ar|res|ers|y t|per|d f| a | on|ith|l a|e t|oci|soc|lit| as| se|dom|edo|eed|nti|s e|t o|oth|wit| di|equ|t a|ted|st |y o|int|e p| ma| so| na|l o|e c|ch |d a|enc|th |are|ns |ic | un| fu|tat|ial|cia| ac|hts|nit|qua| eq| al|om |e w|d o|f h|ali|ote|n e| wh|r t|sta|ge |thi|o a|tit|ual|an |te |ess| ch|le |ary|e f|by | by|y i|tec|uni|o t|o o| li|no | la|s r| su|inc|led|rot|con| pu| he|ere|imi|r a|ntr| st| ot|eli|age|dis|s d|tle|itl|hou|son|duc|edu| wo|ate|ble|ces|at | at| fa|com|ive|o s|eme|o e|aw |law|tra|und|pen|nde|unt|oun|n s|s f|f a|tho|ms | is|act|cie|cat|uca| ed|anc|wor|ral|t i| me|o f|ily|pri|ren|ose|s c|en |d n|l c|ful|rar|nta|nst| ag|l p|min|din|sec|y e| tr|rso|ich|hic|whi|cou|ern|uri|r o|tic|iti|igi|lig|rat|rth|t f|oms|rit|d r|ee |e b|era|rou|se |ay |rs | ho|abl|e u",por:"de | de| se|ão |os |to |em | e |do |o d| di|er |ito|eit|ser|ent|ção| a |dir|ire|rei|o s|ade|dad|uma|as |no |e d| to|nte| co|o t|tod| ou|men|que|s e|man| pr| in| qu|es | te|hum|odo|e a|da | hu|ano|te |al |tem|o e|s d|ida|m d| pe| re|o a|ou |r h|e s|cia|a e| li|o p| es|res| do| da| à |ual| em| su|açã|dos|a p|tra|est|ia |con|pro|ar |e p|is | na|rá |qua|a d| pa|com|ais|o c|ame|erá| po|uer|sta|ber|ter| o |ess|ra |e e|das|o à|nto|nal|o o|a c|ido|rda|erd| as|nci|sua|ona|des|ibe|lib|e t|ado|s n|ua |s t|ue | so|ica|ma |lqu|alq|tos|m s|a l|per|ada|oci|soc|cio|a n|par|aci|s a|pre|ont|m o|ura|a s| um|ion|e o|or |e r|pel|nta|ntr|a i|io |nac|ênc|str|ali|ria|nst| tr|a q|int|o n|a o|ca |ela|uçã|lid|e l| at|sen|ese|r d|s p|egu|seg|vid|pri|sso|ém |ime|tic|dis|raç|eci|ara| ca|nid|tru|ões|ass|seu|por|a a|m p| ex|so |r i|eçã|teç|ote|rot| le| ma|ing|a t|ran|era|rio|l d|eli|ça |sti| ne|cid|ern|utr|out|r e|e c|tad|gua|igu| ig| os|s o|ruç|ins|çõe|ios| fa|e n|sse| no|re |art|r p|rar|u p|inc|lei|cas|ico|uém|gué|ngu|nin| ni|gur|la |pen|nça|na |içã|ião|cie|ist|sem|ta |ele|e f|om |tro| ao|rel|m a|s s|tar|eda|ied|uni|e m|s i|a f|ias| cu| ac|r a|á a|rem|ei |omo|rec|for|s f|esc|ant|à s| vi|o q|ver|a u|nda|und|fun",ind:"an |ang|ng | da|ak | pe|ata| se| ke| me|dan| di| be|ber|kan|ran|hak|per|yan| ya|nga|nya|gan| at|ara| ha|eng|asa|ora|men|n p|n k|erh|rha|n d|ya |ap |at |as |tan|n b|ala|a d| or|a s|san|tas|eti|uk |pen|g b|set|ntu|n y|tia|iap|k m|eba|aan| un|n s|tuk|k a|p o|am |lam| ma|unt| de|ter|bas|beb|dak|end|i d|pun|mem|tau|dal|ama|keb|aka|ika|n m| ba|di |ma | sa|den|au |nda|n h|eri| ti|ela|k d|un |n a|ebe|ana|ah |ra |ida|uka| te|al |ada|ri |ole|tid|ngg|lak|leh|dap|a p|dil|g d|ena|eh |gar|na |ert|apa|um |tu |atu|a m|sam|ila|har|n t|asi|ban|erl|t d|bat|uat|ta |lan|adi|h d|neg| ne|kum|mas|nan|pat|aha| in|l d|emp|sem|rus|sua|ser|uan|era|ari|erb|kat|man|a b|g s|rta|ai |nny|n u|ung|ndi|han|uku|huk| hu|sa |ers|in | la|ka | su|ann|car|kes|aku|dip|i s|a a|erk|n i|lai|rga|aru|k h|i m|rka|a u|us |nak|emb|gga|nta|iba| pu|ind|s p|ent|mel|ina|min|ian|dar|ni |rma|lua|rik|ndu|lin|sia|rbu|g p|k s|da |aya|ese|u d|ega|nas|ar |ipe|yar|sya|ik |aga| ta|ain|ua |arg|uar|iny|pem|ut |si |dun|eor|seo|rak|ngs|ami|kel|ini|g t|dik|mer|emu|aks|rat|uru|ewa|il |enu|any|kep|pel|asu|rli|ia |dir|jam|mba|mat|pan|g m|ses|sar|das|kuk|bol|ili|u k|gsa|u p|a k|ern|ant|raa|t p|ema|mua|idi|did|t s|i k|rin|erm|esu|ger|elu|nja|enj|ga |dit",fra:" de|es |de |ion|nt |tio|et |ne |on | et|ent|le |oit|e d| la|e p|la |it | à |t d|roi|dro| dr| le|té |e s|ati|te |re | to|s d|men|tou|e l|ns | pe| co|son|que| au| so|e a|onn|out| un| qu| sa| pr|ute|eme| l’|t à| a |e e|con|des| pa|ue |ers|e c| li|a d|per|ont|s e|t l|les|ts |tre|s l|ant| ou|cti|rso|ou |ce |ux |à l|nne|ons|ité|en |un | en|er |une|n d|sa |lle| in|nte|e t| se|lib|res|a l|ire| d’| re|é d|nat|iqu|ur |r l|t a|s s|aux|par|nal|a p|ans|dan|qui|t p| dé|pro|s p|air| ne| fo|ert|s a|nce|au |ui |ect|du |ond|ale|lit| po|san| ch|és | na|us |com|our|ali|tra| ce|al |e o|e n|rté|ber|ibe|tes|r d|e r|its| di|êtr|pou|été|s c|à u|ell|int|fon|oci|soc|ut |ter| da|aut|ien|rai| do|iss|s n| ma|bli|ge |est|s o| du|ona|n p|pri|rs |éga| êt|ous|ens|ar |age|s t| su|cia|u d|cun|rat| es|ir |n c|e m| ét|t ê|a c| ac|ote|n t|ein| tr|a s|ndi|e q|sur|ée |ser|l n| pl|anc|lig|t s|n e|s i|t e| ég|ain|omm|act|ntr|tec|gal|ul | nu| vi|me |nda|ind|soi|st | te|pay|tat|era|il |rel|n a|dis|n s|pré|peu|rit|é e|t é|bre|sen|ill|l’a|d’a| mo|ass|lic|art| pu|abl|nta|t c|rot| on| lo|ure|l’e|ava|ten|nul|ivi|t i|ess|ys |ays| fa|ine|eur|rés|cla|tés|oir|eut|e f|utr|doi|ibr|ais|ins|éra|’en|iét|l e|s é|nté| ré|ssi| as|nse|ces|é a",deu:"en |er |der|ein| un|nd |und|ung|cht|ich| de|sch|ng | ge|ine|ech|gen|rec|che|ie | re|eit| au|ht |die| di| ha|ch | da|ver| zu|lic|t d|in |auf| ei| in| be|hen|nde|n d|uf |ede| ve|it |ten|n s|sei|at |jed| je| se|and|rei|s r|den|ter|ne |hat|t a|r h|zu |das|ode| od|as |es | an|fre|nge| we|n u|run| fr|ere|e u|lle|ner|nte|hei|ese| so|rde|wer|ige| al|ers|n g|hte|d d| st|n j|lei|all|n a|nen|ege|ent|bei|g d|erd|t u|ren|nsc|chu| gr|kei|ens|le |ben|aft|haf|cha|tli|ges|e s| si|men| vo|lun|em |r s|ion|te |len|gru|gun|tig|unt|uch|spr|n e|ft |ei |e f| wi| sc|r d|n n|geh|r g|dar|sta|erk| er|r e|sen|eic|gle| gl|lie|e e|tz |fen|n i|nie|f g|t w|des|chl|ite|ihe|eih|ies|ruc|st |ist|n w|h a|n z|e a| ni|ang|rf |arf|gem|ale|ati|on |he |t s|ach| na|end|n o|pru|ans|sse|ern|aat|taa|ehe|e d|hli|hre|int|tio|her|nsp|de |mei| ar|r a|ffe|e b|wie|erf|abe|hab|ndl|n v|sic|t i|han|ema|nat|ber|ied|geg|d s|nun|d f|ind| me|gke|igk|ieß| fa|igu|hul|r v|dig|rch|urc|dur| du|utz|hut|tra|aus|alt|bes|str|ell|ste|ger|r o|esc|e g|rbe|arb|ohn|r b|mit|d g|r w|ntl|sow|n h|nne|etz|raf|dlu| ih|lte|man|iem|erh|eru| is|dem|lan|rt |son|isc|eli|rel|n r|e i|rli|r i| mi|e m|ild|bil| bi|eme| en|ins|für| fü|gel|öff| öf|owi|ill|wil|e v|ric|f e",jav:"ng |an | ka|ang|ing|kan| sa|ak |lan| la|hak| pa| ha|ara|ne |abe| in|n k|ngg|ong|ane|nga|ant|won|uwo| an| uw|nin|ata|n u|en |ra |tan| da|ran|ana| ma|nth|ake|ben|beb|hi |ke |sab|nda| ng|adi|thi|nan|a k| ba|san|asa|ni |e h|e k|g k| ut|pan|awa| be|eba|gan|g p|dan| wa|bas|aka|dha|yan|sa |arb|man| di|wa |g d| na|g n|ban| tu|n s|ung|wen|g s|rbe|dar|dak|di |g u|ora|aya|be |ah |a s|eni| or|han|as | pr|a n|na |iya|a a|kar|at |a l|mar|uwe|duw|uta|und|n p|asi|pa | si|ala|n n| un|kab|oni|ya |i h|gar|g b|yat|tum|ta |n m|i k|apa|taw| li|ani| ke|al |ka |kal|ngk|ega| ne|nal|n i|g a|ggo|ina|we |ena|dad|iba|awi|aga|a p| ta|sar|adh|awe|and|uju|ind|min|sin|ndu|uwa|gge|n l|ggu|ngs|n b|a b|pra|iji|n a|ha | bi|kat|go | ku|e p|ron|kak|ngu|a u|gsa|war|nya|g t|pad|bis|k b|i w|ae |wae| nd|ali|a m|er |sak|e s|ku |liy|ama|i l|eh |isa|arg|n t|a d|kap|i s|ayo|gay| pe|ndh|bad|pri|neg|tow|uto|eda|bed|il |ih | ik|ur |k k|rta|art|i p|rga|lak|ami|ro |aro|yom|r k|e d|a w|kon|rib|eng|ger|g l|ras|dil| ti|k l|rap|mra|uma| pi|k h|n d|gaw|wat|ga |k n|ar |per| we|oma|k p|jro|ajr|saj|ase|ini|ken|saw|ona|nas|kas|h k|i t| um|tin|wo | me|aba|rak|pag|yar|sya|t k| te| mu|ngl| ni|i b|men|ate|a i|aku|ebu|a t| du|g m|owo|mat| lu|amp",vie:"ng |̣c |́c | qu|à | th|nh | ng|̣i |̀n |và| va| nh|uyê| ph|quy| ca|ền|yề|̀nh|̀i |̣t | ch|ó | tr|ngư|i n| gi|gươ|ời|ườ|́t | co|ượ| cu|ác|ự |ợc| kh| đư|đươ| tư|có| ha|ông|c t| đê|n t|i đ|ìn|̀u |cá|gia|́i |ọi|mọ| mo|ều|iệ|đề|u c|như|pha| ba| bi|ất|̉a |ủa|củ|hôn| đô|g t|́ q|̃ng| ti|tự|t c|̣n | la|n đ|n c|n n|hiê|ch |ay |hay| vi|ân | đi| na|bả| ho|do | do| tô| hi|ội|há|ị |nà|̀ t|ới|hân| mô|́p |àn|̣ d|́ch|̣p |̀o |ào|khô|́n |ột|mộ| hô|ia |ốc|c h|hữ|i v|g n|́ng|uố|quô|h t|ôn |ên |n v|nhâ|̣ t| bâ|i c|g v|̉ng|iế|c c|ật|thư|hư |ướ|̉n | vơ| cô|c đ| đo| sư|t t|ộc|ữn|vớ| vê|ả |̣ng|g đ|̉o |ảo|uậ| đa|bị|là|sự|bấ|hà|hộ|i t|ản|hươ|̀ng|tro|̉m |o v| mi|ể |ục|i h|ức|áp|g c|̃ h|iá|n b|̉i |a m|h c|côn|ện|ớc|hạ|độ| du| cư|a c|n h|tha|ã | xa|́o |áo|ín|̀y |g b| hư|g h|ong|ron|̀ c|cho|̀ n|mì|ực|h v|c b| lu|i b|ệ |ai |ế |̣ c|xã|kha|c q|iể|tộ|ối|đố|á |hoa|o h|h đ|cả|n l|họ|tiê|y t|̉ c|ại|án|̀ đ|oà|y đ|chi|̉ n|phâ|ề |thu|iên|dụ|o c|i m|luâ|c p|ốn|c l|́ c|ũn|cũ|c g|c n|qua|n g|c m|o n|ải|hả|́ t|ho |về| tâ| hơ|o t|ở |hứ|hì|viê|̀m |̉ t|đó|thô|ứ |cứ|hí|́nh|ày|ởn|ưở| bă|tri| ta|m v|c v|ợp|hợ|h m| nư|ết|thi|ặc|ngh|uy ",ita:" di|to | in|ion|la | de|di |re |e d|ne | e |zio|rit|a d|one|o d|ni |le |lla|itt|ess| al|iri|dir|tto|ent|ell|i i|del|ndi|ere|ind|o a| co|te |tà |ti |a s|uo |e e|gni|azi| pr|idu|ivi|duo|vid|div|ogn| og| es|i e| ha|all|ale|nte|e a|men|ser| su| ne|e l|za |i d|per|a p|ha | pe| un|con|no |sse|li |e i| o | so| li| la|pro|ia |o i|e p|o s|i s|in |ato|o h|na |e s|a l|e o|nza|ali|tti|o p|ta |so |ber|ibe|lib|o e|un | a | ri|ua |il | il|nto|pri|el | po|una|are|ame| qu|a c|ro |oni|nel|e n| ad|ual|gli|sua|ond| re|a a|i c|ri |o o|sta|ita|i o| le|ad |i a|ers|enz|ssi|à e|ità|gua|i p|e c|io | pa|ter|soc|nal|ona|naz|ist|cia|rso|ver|a e|i r|tat|lle|sia| si|rio|tra|che| se|rtà|ert|anz|eri|tut|à d|he | da|al |ant|qua|on |ari|o c| st|oci|er |dis|tri|si |ed | ed|ono| tu|ei |dei|uzi|com|att|a n|opr|rop|par|nes|i l|zza|ese|res|ien|son| eg|n c|ont|nti|pos|int|ico|rà |sun|ial|lit|sen|pre|tta|dev|nit|era|eve|ll |l i| l |nda|ina|non| no|o n|ria|str|d a|art|se |ssu|ica|raz|ett|sci|gio|ati|egu| na|i u|utt|ve | ma|do |e r|ssa|sa |a f|n p|fon| ch|d u|rim| fo|a t| sc|trà|otr|pot|n i| cu|l p|ra |ezz|a o|ini|sso|dic|ltr|uni|cie| ra|i n|ruz|tru|ste| is|der|l m|a r|pie|lia|est|dal|nta| at|tal|ntr| pu|nno|ann|ten|vit|a v",tur:" ve| ha|ve |ir |ler|hak| he|her|in |lar|r h|bir|ya |er |ak |kkı|akk|eti| ka| bi|eya|an |eri|iye|yet|ara|ek | ol|de |vey|ın |ır |nda|arı|esi|ını|dır| ta|tle|e h|ası|etl|e k| va|ı v|sın|ile|ne |rke|erk|ard|ine| sa|ınd|ini|k h|kın|ama|le |tin|rdı|var|a v| me|e m|na |sin|ere|k v| şa| bu|lan|kes|dir|rin|dan| ma|kı |mak|şah|da | te|mek| ge|nı | hi|nin|en |n h| se|lik|rle|ana|lma|e a|ı h|r ş|ill|si | de|aya|zdi|izd|aiz|hai|ret|hiç|ına| iş|e b| ba|kla|et | hü|rın|n k|ola|nma|e t| ya|eme|riy|n v|e i|a h|li |mil|eli|ket|ik |kar|irl|hür|im |evl|mes|e d|ahs|ma |rak|ala|let|lle|un | ed|rri|ürr|bu | mi|i v|dil| il| eş|n i|la |el |mal| mü| ko|e g|se | ki|mas|lek|mle|mem|n b|ili|e e|ser| iç|n s|din| di|es |mel|eke|tir|şit|eşi|r b|akl|yla|n m|len| ke|edi|oru|nde|re |ele|ni |tür|a k|eye|ık |ken|uğu| uy|eml|erd|ede|ame| gö|e s|i m|tim|i b|rde|rşı|arş|a s|it |t v|siy|ar |rme|est|bes|rbe|erb|te |alı| an|ndi|end|hsı|unm|rı |kor|nın| ce|maz|mse|ims|kim|iç | ay|a m|lam|ri |sız|a b|ade|n t|nam|lme|ilm|k g|il |tme|etm|r v|e v|n e|ğre|öğr| öğ|al |ıyl|olm|vle|şma|i s|ger|me | da|ind|lem|i o|may|cak|çin|içi|nun|kan|ye |e y|r t|az |ç k|ece|sı |eni| mu|ulu|und|den|lun| fa|şı |ahi|l v|r a|san|kat| so|enm| ev|iş ",pol:" pr|nie|pra| i |nia|ie |go |ani|raw|ia | po|ego| do|wie|iek|awo| ni|owi|ch |ek |do | ma|wo |a p|ści|ci |ej | cz| za| w |ych|ośc|rze|prz| ka|wa |eni| na| je|ażd|każ|ma |zło|czł|noś|o d|łow|y c|dy |żdy|i p|wol| lu|ny |oln| wy|stw| wo|ub |lub|lno|rod|k m|twa|dzi|na | sw|rzy|ają|ecz|czn|sta| sp|owa|o p|spo|i w|kie|a w|zys|obo|est|neg|ać |mi |cze|e w|nyc|nic|jak| ja|wsz| z |jeg|wan|ńst|o s|a i|awa|e p|yst|pos|pow| ró|o o|jąc|ony|nej|owo|dow|ów | ko|kol|aki|bez|rac|sze|iej| in|zen|pod|i i|ni | ro|cy |o w|zan|eńs|no |zne|a s|lwi|olw|ez |odn|rów|odz|o u|ne |i n|i k|czy| be|acj|wob|inn| ob|ówn|zie| ws|aln|orz|nik|o n|icz|zyn|łec|ołe|poł|aro|nar|a j|i z|tęp|stę|ien|cza|o z|ym |zec|ron|i l|ami| os|kra| kr|owe| od|ji |cji|mie|a z|bod|swo|dni|zes|ełn|peł|iu |edn|iko|a n|raj| st|odo|zna|wyc|em |lni|szy|wia|nym|ą p|ją |zeń|iec|pie|st |jes| to|sob|któ|ale|y w|ieg|och|du |ini|war|zaw|nny|roz|i o|wej|ię |się| si|nau| or|o r|kor|e s|pop|zas|niu|z p|owy|w k|ywa| ta|ymi|hro|chr| oc|jed|ki |o t|ogo|oby|ran|any|oso|a o|tór| kt|w z|dne|to |tan|h i|nan|ejs|ada|a k|iem|aw |h p|wni|ucz|ora|a d| wł|ian| dz| mo|e m|awi|ć s|gan|zez|mu |taw|dst|wią|w c|y p|kow|o j|i m|y s|bow|kog|by |j o|ier|mow|sza|b o|ju |yna",swh:"a k| ya|na |wa |ya | ku|a m| na| ha|i y| wa|a h|a n|ana|aki|ki |la |hak| ka|kwa|tu | kw| ma|li |a a|ila|i k| ki|ni |a w|ali|a u| an| mt|ke |mtu|a y|ake|ati|kil|ka |ika|kat|ili|te |ote|we |a s|e k|ia |zi |u a|za |azi|ifa|ma |yak|yo |i n|ama| yo|au | au|e a|kut|amb|o y|ha |asi|fa |u w|hal|ara|sha|ish|ata|ayo| as|tik|u k| za|i z|ina|u n|mba|uhu|hi |hur|cha|yot|ru |uru|wat| ch|eri|ngi|e y|u y|i a|aif|tai| sh|nay|chi|ra |ani| bi| uh|sa | hi|i h|awa|iwa|a j|ti |mu |o k|ja |kan|uli|iwe|any|i w| am|e n|end|atu|kaz|o h|ria|her|she|shi|nch| nc|uta|ye |wak|ii |ele|ami|adh|eza| wo|iki|oja|moj|jam| ja|aka|bu |kam|kul|mat|fan|a l|agu|ind|ne |iri|lim|wen|da |kup|uto|i m|a b|ini|wan|bil| ta|sta|dha| sa| ni|ao | hu|e w|wot| zi|rik|kuf|aji|ta |wez|nya|har| ye|e m|si |lin| ut|ine|gin|ing| la|a t|zim|imu|ima|tak|e b|uni|ibu|azo|kos|yan|nye|uba|ari|ahi|nde|asa|ri |ham|dhi|eli|hir|ush|pat| nd|kus|maa|di |nda|oa |bar|bo |mbo|oka|tok|ndw|ala|wal| si|uzi|hii|tah|i s|o n|liw| el|upa|zin|hag|a c|ndi|ais|mai|eny|mwe|aa |ewe| al|ndo|e h|lo |umi|kuh|jib|osa|mam|a z|ufu|dwa|u i| in|iyo|nyi| ny|u m|sil|ang|o w|guz|zwa|uwa|kuw|hil|saw|uch|ufa|laz|und|aha|ua | mw|bal| lo|o l|a i|del|nun|anu|nji| ba|lik|le |uku|i i",sun:"an |na |eun|ng | ka|ana| sa| di|ang|ung|un |nga|ak | ha|keu| ba|a b| an|nu |hak| bo|anu|ata|nan|a h|ina| je|aha|ga |ah |awa|jeu| na|ara|ing|oga|bog|gan| ng|asa|kan|a s|ha |ae |bae|n k|a k| pa|a p|sah|g s|sar| si|sin|a n|din|n s|ma | at|aga|a a|tan| ku| ma|n a|san|man|wa |lah|pan|taw|u d|ra |ari|eu | pi|gar| pe|kat| te|n p|sa |per|a d|a m|e b|aan|ban|ran|ala|ike|n n|kum| ti|ama|a j|pik|ima|n d|al |at | ja|ila|ta |nda|bas|rim|teu|n b|eba|beb|udu|aya|ika|ngg|nag|kab|rta|art| me|ola|k n|uma|atu|aba|g k|adi|aca| po|ngt|nar|una|ate|oh |boh|awe|di |tin|asi|uku|n h|dan|aka|iba|car|sac|gaw|are|ent|um |jen|abe|u s|dil|pol|ar |ku |kud|u m|upa|han| hu|ake|bar|ur |hna|aru|h s|a t|sak|wat|kaw| so|n t|pa |mpa|du |ngk|g d|ena|huk| mi|mas|ngs|ti |n j|ka |aku|ren|n m| ta|law|isa| tu|und|a u|h a|tay|ula|aja|ali|nte|gsa|en |gam| wa|ieu|ere|k h|jal|h b|il |dit|ngu|lan|asu|yun|ayu|gta|k d|a r|g n|mah|uda|dip|kas|rup|geu| be|ter|sej|min|ri |ern|u p|k k|amp|ura|kal|e a|k a|ut |g b|nak|bis| bi|k p|tes|end|we |h k|tun|uan| un| de|u n|h t|ksa|u k|ian|wil|u b|ona|nas|uka|rak|eje| se|ami| ke|war| ra| ie|k j|eh |ya |lma|alm|pen|tur|wan|lak|h j|g a|ean|up |rga|arg|r k|u t| ne|deu|gal|gke|e t|h p| ge|g t| da|i n",ron:" de|re | în|și |are|de | și|te |ul | sa|rep|e d|ea |ept|dre|tul|e a| dr|ie |în |ptu|le |ate|la |e p| la| pe|ori| pr|ce |e s| or|au |tat| ar|ice|ii |or |a s| fi| a |ric|ale|per| co|nă |ă a|rea|ers|i s| li|sau| ca|rso|ent|lor|ați|al |a d|e o|men|l l|ei |e c|pri|ană| ac| re|uri|ber|ibe|lib|a p|oan|soa| in|i l|ter| al| să|tea|lă |car|tăț|să |tur|i a|i d|nal| ni|ri |ita|e î|e ș|se |ilo|in |ia |ție|pre|fie|ții|ăți|con|ere|e f|a o|eni|nte| nu| se|ace|ire|ici| cu|i î|a c|i n|a l|pen|ui |nu |ări|ală|ona|l d|ră |ert|ril| su|ntr|n c|rin| as|ni |i o|eri|tă |că |ile|ă d|i c|e n|ele|sa | mo|i p|fi |sal|tor|va |oci|soc|nic|pro| un| tr|est|inț|a î|uni|n m|a a| di|ecu|lui|sta|lit| po|tre|gal|ega|oat|ra |act|ă î|leg|u d|e l|nde|int|a f|n a| so|naț|ara|i f|uie|iun| to|tar|ste|ces|rar|at | ce|eme|i ș|rec|dep| că| o | îm|bui|ebu|reb| eg| na|mân|ntu|ili|văț|ând|iei|r ș|bil|pli|od |mod|res|din|e e|cți| au|ali|ă p|ă f|împ|ial|cia|ion|ă c|dec|nta| om|ită| fa|ță |cu |tra|ăță|nvă|înv|ât |ite|i i|lic| pu| ex|riv|tri|rot|ța |ți |l c|rta|imi|ulu|țio|ică|lig|rel|ta |cla|t î|nt |nit|e m|ânt|ămâ|țăm|ger|nța|ru |tru|gur|u c|bli|abi|ată|art|par|ar |rim|iva|l ș| sc|ime|nim|era|sup|ind|u a|dic|ic | st| va|ini|igi|e r",hau:"da | da|in |a k|ya |a d| ya|an |a a| ko| wa|na | a |sa | ha|kin|wan|ta | ba|a s| ta|a y|a h|wa |ko | na|n d|a t|ba |ma |n a| ma|iya|hak|asa| sa|ar |ata|yan| za|akk|a w|ama| ka|i d|iki|a m|owa|a b| ci| mu| sh|anc|nci|kow|a z|ai |nsa|a c|shi| ƙa|cik|ne |ana|i k|ci |kki|e d|a ƙ| ku|su |n y|uma|ka |uwa|kum|hi |a n|utu| yi|ani| ga| ra|aka|ali|mut|‘ya|tar| do|ɗan|ars| ‘y|sam|ƙas|nda|ane|man|tum|i a|yi |ni | du|ada| su|and|a g|cin| ad|a i|ke | ɗa|n k|yin|um |e m| ab|ins|nan|ki |mi |ami|yar|min|oka|re |i b|kam|mas|i y|mat|za |ann|en |aɗa| ja|m n|li |duk|dai|e s|n s|ra |n w|n h|aik| ai|ida|ga |san|rsa|aba|sar|ce |nin| la|o n|ban|nna|kan|abi|una|dam|me |ara|i m|hal|a r|add|are|n j|abu| ne|zai|a ɗ|wat|ari| ƙu|on |ans|waɗ|ame|ake|kar|din|zam| fa|a l|ƙun|buw|r d| hu|oki|kok|a ‘|u d|n t|abb|aur| id|rin|yak|dok|kiy|ray|jam|n b|ubu|bub|n m|i s| an|am |ili|bba|omi|dan|gam|ayu|ash|nce|tsa|ayi|har|yya|ika|bin|han|kko|rsu|aif|imi|fa | am|i i|dom| ki|yuw|dun|o a|fan|n ƙ|aya|fi |n r|she|uni|bay|riy|n ‘|sab| iy|bat|tab|aga| ir|mar|o w|i w|sha|awa| ak|uns|unc|tun|u k| il|ɗin|mfa|amf|aci|ewa|kas|lin|n n|don|n i|ure|ifi|lai|dda| ts|iri|aye|un |tan|wad|gwa|afi| ay|ace|mba|amb|aid|nta|ant|war|lim|kya| al|aɗi",fuv:"de | e |e n| ha|nde|la | wa|ina| ka|akk| nd|ɗo |na | in|e e|hak|al |di |i h|kke|ii |um |ko |ala|ndi| mu| ne|lla| jo|wal|eɗɗ|neɗ|all|mum| fo|kal|jog|ke |aaw|taa| ko|eed|ɗɗo|aa | le|ji |ade|aad|laa|o k| ng|e h| ta|re |ogi|a j|e w|e m|nnd|gii|e l|ley|awa|aag|ede|waa|e k|gu |e d| go|gal|ɓe |ti |fot|aan|eyd|ydi|ɗe |ee | re|ol |oto|i e|oti|m e|taw|nga|a i|kee|to |ann|eji|am |ni | wo|een|goo|eej|e f| he|enn|gol|agu|pot| po|dee|ay | fa|ka |a k|ond|oot| de|a f|o f|a n|wa |maa|ota|le |hay|i k|o n|ngo|e j|o t| ja|ñaa|hee|nka|i w|awi|a w|ngu|der| to|e t|dim|i n|fof|i f|e g|tee|naa|aak| do|too|a e|ndo|ren|dii|oor|er |o e|i m|of | sa| so|gaa|ani|kam| ma| ña|o w|i l|u m|kaa|ima|dir| ba|igg|lig| li|aar| ɓe|o i|e s| o |e r|so |ooj| nj| la|won|awo|dow|woo|faw|and|e i|ore|nge|nan|are|a t|tin|aam| mo|ɗee|ita|ira|aaɗ|e p|nng|ma |ank|yan|nda|oo |e ɓ|njo|ude|nee|e y|e a|je | ya|en |ine|iin| di|ral| na|ɗi |und| hu|inn|ŋde|aŋd|jaŋ|a d|den| fe| te|go | su|a h|haa|tal|eɗe|e b|y g|baa|tde| yi|ɗɗa|o h|iiɗ|ow | da|do |l n|alt| ho|l e|aga|mii| aa|a a|ama|nna|m t| ke|edd|oga|m w|l m|o j|aɗe|ree|oje|yee| no|ele|ne |ago| pa| al|guu|wi |ge |aaɓ|daa|ind|dew|i j|jey| je|ent|tan|o ɗ|geɗ| ge|ñee|a l| ɗu|kko|mak|a s| ga",bos:" pr| i |je |rav|na |ma |pra| na|ima| sv|a s|da |a p|vo |nje|ko |ako|anj|o i| po|avo|ja |e s|a i|ti | im| da| u |sva|no |ju | za|o n|va |i p|ili|vak|li | ko|ne | il|koj| ne|nja| dr|ost| sl|van|im |i s|u s|i i|a n|ava|ije|a u| bi|stv|se |a d|om |jed|bod|obo|lob|slo| se| ra|ih |sti| ob| je|pri|enj|dru|u i|o d|iti|voj|raz|ova|dje| os|e i|lo |e p| nj|uje|i d|bra|tre| tr| su|jeg|i n|u z|a k|og |u p|oje|cij|reb|a o|a b|lju|i u|ran|mij|ni |nos|jen|ba |edn|svo| iz|jel|pro|e d|žav|bit| ni|i o|sta|a z|avn|vje| ka|bil|ovo|a j|aju|ist|nih|tu |red|gov| od|e o|oji| sm|lje|o k|ilo|ji |aci|e u|e n|pre|o p|eba|u o|su |vim|ičn| sa|u n| dj|a t|ija|čno|jem|rža|drž|elj|stu|dna|odn|eni|za |iva|olj|šti|nom|em |du |vno|smi|jer|e b|de |pos|m i| do|u d|nak|a r|obr| mo|lja|nim|ego| kr|tit|kri|ve |nju|an |iko|nik|nu |i m|nog|eno|sno| st|e k|tup|rug|ka |oda|riv|vol|aln|m s|itu|ašt|zaš|ani|sam|akv|ovi|osn|rod|aro| mi|tva|dno|nst|jan|ak |ite|vič|rad|u m| ta|dst|tiv|nac|rim|kon|ku |odu|živ|amo|tvo|tel|pod|g p|nov|ina|nar| vj|o s|i b|oj | ov|ave|vu |ans|oja|zov|azo|ude|bud| bu|e t|i v|din|edi|nic|tan|nap|mje| is|jal|slu|pun|eds|o o|zak|jav|i k|m p|tno|ivo|ere|nič|m n|jim|kak|ada|vni|ugi| ro|mov|ven|pol|to |te | vr",hrv:" pr| i |ma |rav|ima|pra|je |na | sv|ti | na|a p|vo |vat|ko |a s|nje| po|anj|avo|o i|tko| im|a i|sva|no |i p|e s|ja |o n| za|ju |ili| u |va |li | bi|ne |i s|atk| il|iti|da | ne| ko| dr| sl|van|nja|koj|ije| ra|ova| os|u s|i i|ost|bod|obo|lob|slo|pri|a n|om |jed|ati|ih |im |voj|ava| ob|stv|se | mo|i u|bit|dru| je| se|dje|i o|enj| ka|i n|sti|lo |u i|svo|mij|ni |e i|raz|a o|e n|bra|o p| su|a b|u p|ran|a k|og |i d|bil|ako|e p|a d|edn|aju|mor|eni| nj|iva|jel|žav| ni|a z|avn|ovi|eno|ra |oje|a j| da|a u|ora|jeg| iz|nih|rža|drž|oji|sno|nit|jen|vje|ilo|cij|oda|nim| dj|pro|tit|u z|e d|red|nom|jem| od|nos|sta|nov|osn| sm|lje|o s|ji |ovo|stu|pos|vim| do|odn|rad|ist| sa|e o|tu |nju|em |gov|o d|rod|i m|jer|aci|oj |pre|m i|nak|dna|a r|lju|uje|e m|obr|za |olj|ve |o o|m s|an |nu |du |aro|vno|smi|aln|e k|o k|i b|e u|tva|u u|tup|rug|dno|u o|su |u d|ka |vol| ta|ija|itu|šti|ašt|zaš|itk|živ|ani|sam|elj| st|sob|oso|nar|akv|ada| mi|te |ona|nst|jan|lja|i v|ite|ego|elo|rim|ku |odu|amo|tvo|tel|jim|pod|nog|vi |ina| vj|to |e b|ans|zov|azo|ak | sk|edi|tan|oju|pun|pot|oti|kon|zak|i k|m p|tno|ivo|ere|nič|kak|vni|ugi| ro|mov|ven|štv| be|ara|kla|ave|u b|avi|oja|jal|u m|dni|mje|rak|din|ći |juč|klj|nic|u k|nap|obi|atn",nld:"en |an |de | de| he|ing|cht| en|der|van| va|ng |een|et |ech| ge| ee|n e|rec| re|n v|n d|nde|ver| be|er |ede|den| op|het|n i| te|lij|gen|zij| zi|ht |ijk|eli| in|t o| ve|op |and|ten|ke |ijn|e v|jn |ied| on|eft| ie|sch|n z|n o|aan|ft |eid|te |oor| we|ond|eef|ere|hee|id |in |rde|n w|t r|aar|rij|ord|wor|ens|of | of|hei|n g| vr| vo| aa|r h|hte| wo|n h|al |nd |vri|e o|ren|le |or |n a|jke|lle|eni|n b|ij |e e|g v| st|ige|die|e g|men|nge|t h|e b| za|e s|om |t e|ati|wel|erk|sta|ers| al| om|n t|zal|dig| me|ste|voo|ter|gin|re |ege|ge |g e|bes|nat| na|eke|che|ig |gel|nie|nst|e a|nig|est|e w|erw|r d|end|ona|d v|jhe|ijh|d e|ele| di|ie | do|del|n n|at |it | da|tie|e r|elk|ich|jk |vol|ijd|tel|min|len|str|lin|n s|per|t d|han| zo|hap|cha|wet| to|ven| ni|aat|ion|tio|taa|lke|eze|met|ard|waa|uit|sti|e n|doo|pen|eve|el |toe|ale|ien|ach|st |ns | wa|eme|nin|e d|bij| gr|n m|p v|esc|t w|ont|ite|man|ema| ma|nal|g o|rin|hed|t a|t v|beg|all|ijs|wij|rwi|e h| bi|gro|p d|rmi|erm|her|oon| pe|eit|kin|t z|iet|iem|e i|gem|igi| an|d o|r e|ete|e m|js | hu|oep|g z|edi|arb|zen|tin|ron|daa|teg|g t|raf|tra|eri|soo|nsc|t b| er|lan| la|ern|ar |lit|zon|d z|ze |dez|eho|d m|tig|loo|mee|ger|ali|gev|ije|ezi|gez|nli|l v|tij|eer| ar",srp:" pr| i |rav|na |pra| na|ma | sv|ima|da |ja |a p|vo |je |ko |ti |avo| po|a i|ako|a s| za| u |ju |o i| im|nje|i p|va |sva|anj|vak| da|o n|nja|e s|ost| ko|a n|li |ili|ne |om | ne|i s| sl| il| dr|no |koj|u s|ava| ra|og |slo|im |enj|sti|bod|obo|lob|iti|a o|stv|i u|a d|ni |jed|u p|pri|edn| bi|i i|a k|o d|sta|ih |dru|a u| je| os| ni|nos|pro|aju|i o|ran| de| su|u i|se |van|ova|i d|cij| ob|uje|red|žav|e i|i n|voj|e p|a j|dna| se| od|ve | ka|eni|rža|drž|a z|avn|aci|ovo|u u|m i|oja| iz|lja| nj|ija|u z|e o|rod|jen|lje|e b|raz|jan|lju|svo|za |gov|ičn| st|nov|sno|osn|du |ji |pre| tr|su |vu |odn|a b|jeg|nim|nih|tu |tit|šti|ku |nom|bit|e d|me |iko|čno|oji|lo |vno|nik|e n|đen|ika|bez|ara|de |u o|vim|nak| sa|u n|riv|ave|an |olj|vol| kr|o p|sme|e k|nog| ov|e u|tva|bra|rug|reb|tre|u d|oda| mo| vr|vlj|avl|ego|jav|del|m s|kri|o k|ašt|zaš|nju| sm|ani| li|dno|eđu|aln|la |akv|oj |šen|kom|stu|ugi|avi|a r|ka |rad|oju|tan|odi|vič|tav|itu|ude|bud| bu|pot|odu|živ|ere|m n|tvo|ilo|bil|aro|ovi|por|eno|štv|nac|ove|m p|tup|pos|rem|dni|ba |nst|a t|ast|iva|e m|vre|nu |beđ|ist|pun|en |te |dst|rot|zak|ao |kao|i k|juć|o s|st |sam|ter|nar| me|i m|kol|e r|ušt|ruš|ver|kak| be|i b|kla|ada|eba|ena|ona| on|tvu|ans| do|rak|slu",ckb:" he| û |ên | bi| ma|na |in |maf| di|an |xwe| xw|ku | ku|kes| de| ji|her|kir|iya|ya |rin|iri|ji |bi |es | ne|ye |yên|e b|er |afê|tin|ke | an|iyê|eye|rke|erk|we | be|e h|de | we|hey|fê |i b|yê |ina| bê| li|diy|ber|li |re |î û|nê |ê d| se| ci|eke|di |wî | na|î y|af |ete|hem| wî|sti| ki|rî |kî |î a|yek|n d|kar| te|ne |yî |i h|e k|tî |tê |a w|e d|î b|s m|ast|n b|be |yan|ser|tew|net| tu| ew|hev|aza|ara|û b|n k|adi|ev |zad| az|ras|est|anê| ya|n h|n û|wed| tê|wek|bat|bo | bo| yê|st |n n|ê k|dan|ê h|ema|ê b|iye|î h|din|bûn|r k|ekî| me|par|ûna|ta |wle|ewl|î m| ke|nav|ewe|man|ê t|dî |û m|mû |emû|a m|ika|e û|n w|a x|ê m|e n| ta|ela|n j|eyê|n x|civ|wey|ana| re|khe|ekh|bik|kê |jî |f h|erî| pa|îna|bin|erb|vak|iva|a s| ni|cih|vê |e j|ari| pê|î d|nên|ike|e t|a k|ê x| ye|n a|eyî|n e|ama|bê |ar |ewa|atê|bes|rbe|av |ibe|ist|mî |tem|awa|are|hî |geh|nge|ing|nek|nûn|anû|qan| qa|vî |rti|uke|tuk| şe|eza| da|u d|û a|f û|edi| ra|tu |tiy|tên| mi|xeb| ge|hîn| hî|etê|î j|stî|mal|bib|ra |i d|e m|mam|i a|nik|i m|î k| wi|ûn | ko|a ş|ê j|riy|lat|wel|e e|ine|ane|û h|în |a d|siy|end|aye| za|ija|a n|î n|ek |tek|yet|mbe|emb|û d|rov|iro|mir|eba| xe|mên| ên| hu|nîn|anî|t û|ten|n m|dem|ê û|enê|te |art|i r| jî|u j|ekê|dew",yor:" ní|ti |ọ́ |ní | lá| ẹ̀|àn |ẹ́ |kan|tí | tí|an |ẹ̀ |tọ́|ọ̀ | ẹn|ọn |wọn|í ẹ|bí |áti|lát|̀tọ|ẹ̀t| gb| àt| àw|n l|àti| a |lẹ̀|ẹnì| ó |kọ̀| ló|ì k|sí |ọ̀k| kọ|ra |ni |àbí|tàb| tà|nì | sí|̀ka|ọ̀ọ|n ẹ|àwọ|n t|ó n|̀ọ̀|ílẹ|orí|ló | wọ|tó |dè |ìyà|ún | tó| or|í ì|èdè|kò |‐èd|̀‐è|ẹ̀‐|ríl|í ó|rẹ̀|í à| sì|yàn|gbo|ṣe | kò|í a| rẹ| jẹ|sì | bá|ràn| ṣe|wọ́|nìy|fún| fú|n à|ba |n n|gbà|gbọ|jẹ́|un |ìí | kí|gba|ènì| èn|bá |́ l|a k| ka|dọ̀|kí | òm|in | fi|bò |fi |bẹ́|ọdọ|bọd|́ s|hun|nú |nín|wà |ira|nir|òmì|ìgb| ìg|́ t|ẹni|ínú|i l|ìni|mìn|bà |áà |i ì|ohu| oh|í i|ara| ti|bo |ò l| pé|rú |írà| ọ̀|í ò|ogb|kọ́|pọ̀|ó b|à t|i n|lọ́|ẹ́n| ìb|yìí|gbé|gẹ́|bog|óò |yóò| yó|n k|pé |dá |́wọ|ọ́w|à l|í k| wà|n o|jọ | ir|ọ̀r|ú ì|́ à|ó s|i t|ṣẹ́|̀kọ|í t|yé |lè | lè|fin|àbò| lọ|à n|ùjọ|wùj|irú|ó j| ar|í w|a w| ìm|ú à|̀ t|òfi| òf| àà|fẹ́|àwù|́ni|wù |ìír|mìí| mì|láì| yì|í g|ọ́n|n s|i ẹ|ẹ̀k|àgb|ígb|níg|a n| kú|láà|í o|náà| ná|kẹ́|ípa|níp|ìn | ìk|bé |i g|ọmọ| ọm|i à|iṣẹ|̀ à|ìmọ|n a|n f|jẹ |yí |́ ọ|ó d|́ ò| dá| mú|ààb|ábẹ|láb|ìbá|ò g|jú |i o|lú | èt|̀ ẹ|tọ̀|de |̀ n|i ò| ìy|kàn|́n | bí| iṣ|mọ̀|e ẹ|̀ l| fà|èyí| èy| ìd|mọ́|dé |̀ k|́ p|ò t|mú | fẹ| ìj|rí |ìkẹ|nìk|ìní|n ì|n è|sìn|è ẹ| i |rọ̀| àn|́ b|ùn |́gb|ọ́g|dọ́| dọ|í n|rin|̀ j",uzn:"ish|an |lar|ga |ir | bi|ar | va|da |iga| hu|va |bir|sh |uqu|quq|huq| ha|shi| bo|r b|gan|a e|ida| ta|ini|lis|adi|ng |dir|lik|iy |ili|oʻl|har|ari| oʻ|uqi|ins|lan|hi |ing|dan|nin|kin| yo|son|nso| in| mu|on |qig| ma|ega|r i|boʻ| eg|oʻz|ni |gad|ash|i b|ki |oki|ila|yok|a b|n b|osh|ala|at |in |r h|erk| er|lga| qa|rki|h h| sh|i h|ara|n m| ba|nis|ik |igi|lig|bos|ri |qil|a t|bil|las|eti| et|n o|ani|nli|kla|i v|a q|a h|a o|yat| qo|im |a s|i m|iya|atl|oli|osi|siy|qla|cha|til| ol|ati|a y|mas|qar|inl|lat| qi|taʼ|ham|gi |ib |ʻli|mla|h v|ʻz |hun|n e|mum| da| bu| to|un |mki|umk|sha|tla|ris|iro|ha |rch|bar|iri|oya|ali| be|i o|asi|aro| ke|i t|rla| te|arc|hda|shu|tis|n h|tga| sa| xa|rak|lin|ada|ola|imo|hqa|shq|li | tu|aml|lla|sid| as|nid|a i| ki|ch |n t|nda|k b|era|siz|or |hla|a m|r v|eng|ten|mat|mda|amd|lim|miy|y t|ayo|i a|ino|ilg|tni| is|ana|as |ema| em|ech|a a|tar|kat|aka|ak |rat| de|aza|ill| si| so|gʻi|uql|n q|oda|ʼli|aʼl|nik| ni|tda|uch|gin|a u|him|uni|sit|ay |qon| ja|atn|kim|h k|hec| he|ʻzi|lak|ker|ikl| ch|liy|lli|chi|ur |zar|shl|rig|irl|dam|koh|iko|a d|am |n v|rti|tib|yot|tal|chu| uc|sla|rin|sos|aso| un|na | ka|muh|dig|asl|lma|ra |bu |ush|xal|ʻlg|i k|ekl|r d|qat|aga|i q|oiy|mil| mi|qa |i s|jin",zlm:"an |ang| ke|ng | se| da|ada|ara|dan| pe|ran| be|ak |ber|hak|ata|ala|a s|ah |nya| me|da |per|n s|ya | di|kan|lah|n k|aan|gan|dal|pad|kep|a p|n d|erh|eba|nga|yan|rha| ya|nda|ora|tia|asa| ha|ama|epa| or|iap|ap |a b| at| ma|eti|ra |tau|n a|set|au | ba|pa | ad|n p|tan|p o|eng|a d|men|apa|h b|h d|dak|man|a a|ter| te|k k| sa|n b|ana|g a|end|leh|ole|a k|am |n y|aka|eh |lam|bas|beb|n m| un|pen|sa |keb|sam|n t| ti|ela|san|car|uan|ma |di |han|ega|ban|eri|at |sia|a m|ika|kes|ian|gar|seb|ta |mas|und|neg|nan|ngs|i d|erl|na |epe|emb|bar| la|atu|kla|pem|mem|emu|eca|sec|ngg|nny|any|bol|al |aha|gsa|ebe|ind|akl|n h|erk|ung|ena| bo|a t| ap|ers| de|in |tu |pun|as |agi|ann|g b|bag| ne|ain|hen| he|era|rat|sem| su|adi|lan|g s|dia|mat|ses|iad| ta|iha|g t|tin|k m|k h|i k|gi |i s|ing|uka|enu|den|lai|k d|ert|ti |rka|aja|rga|lua|ker|mel|dun|ndu|lin|rli|nak|ntu|esi|aya|un |uat|jua| in|rma|erm|ai |emp|kem|ri |dil|ua |uk |h m|l d|g m|mba|kat|ese|tik|ni |ini| an|mpu|ka |dar|mar|rja|erj|arg|u k|sua| ol|esa|dap|ar |g u|si |ent|g d| pu|awa|iri|dir|sal|gam|mbe|n i|har|a h|raa|ema|tar|i a|saa|ira|ari|pel|jar|laj|uju|tuj|rak|ura|uar|elu|t d|unt|il |wen|asi|gga|ipa|ksa|tuk|ula|sek|sas|ibu|rta|sep|rsa|nta|ati|ila|mua|yar",ibo:"a n|e n|ke | na| ọ |na | bụ|ọ b|nwe|nye|ere|re | n |ya |la | nk|ye | nw| ma|e ọ| ya| ik|a o|a ọ|ma |ụla|bụl|ike| on|nke|e i|a m|ony|ụ n|kik|iki|bụ | a |ka |wer|ta |i n|do |di | nd| ga|a a|e a|a i|he |kwa| ok| ob|e o|hi |any|ga‐|ha |dụ | mm|ndi|ọ n|wa |rụ |e m|che|a e|oke|wu |aka|ite|o n|a g|odo|bod|obo| dị| ez|ara|we | ih|a‐e|hị |ri |n o|zi |mma|chi|dị |ghi|ụta|iri|ihe| an| oh|a y|gba|ụ ọ| ọz| ak| iw|nya|te |iwu| nt|ro |oro|e ị|zọ |ezi|me |e e|u n|her|ohe| si|a‐a|i m|ala|ụ i| ka|akw| in|ghị|kpe|n e|pụt| e |i i|i o|ide|inw|ụ o|hụ |ahụ|weg|ra |o i|kpa|adụ|mad|si |sit|a s| me|sor|i ọ|gid|edo|u o|e y|n a| en|tar|ozu|toz|bi |be |ụ m|ụrụ|ọrụ| ọr|mak|uso|ama|de |ị o| ọn|ọzọ|chị|egh|enw|apụ|ru | to|i a|a ụ|osi|rị |wet|hed|nch| nc| eb| al|nọd|ọnọ|uru|sir| kw|yer|ji |eny| mk|ịrị|eta| us|tu |ọ d|u ọ| o |ba | mb|ọdụ|ịch| ch|a d|pa | ag|kwe| ha|a u|e s|mkp|n u|nta|ebe|n ọ|o m|kwu|nkw|nwa|obi| ịk|esi|i e|nha| nh|le |ile|nil| ni|eme| og|e k|n i|chọ|o y|asị|otu| ot|ram|u m|ịgh|dịg|zu |nọ |mba| gb|e g|ị m|ọch|ich|pe |agb|i ị|uch|zụz|uny|wun|ọrọ| nn|na‐| di|ge |oge|iji| ij|ọha| ọh|ikp|egi|meg|o o|ụhụ|hụh|mah|n ụ|ọ g|ọta|ekọ|ị n|kwụ|agh|ụmụ|ban|kpu|okp| ah|ịkp|a k|ime| im|zụ |ụzụ|ọzụ| ụz|lit|ali|nat",ceb:"sa | sa|ng |ang| ka| pa|an |ga |nga| ma|pag| ng|on |a p|od |kat|ay | an|g m|a k|ug |ana| ug|ung|ata|ngo|atu|n s|ala|san|d s|tun|ag |a m|god|g s|a a|a s|g k|g p|yon|n u|ong|tag|usa|pan|ing|una|mat|g u|mga| mg|y k| us|ali|syo| o |aga|tan|iya|kin|dun|nay|man|nan|a i| na|ina|nsa|isa|bis|a b|adu| ad|n n| bi|asy|asa|lay|awa|lan|non|a n|nas|o s|al |agp|lin|nal|wal| wa|ili|was|gaw|han| iy| ki|nah|ban|nag|yan|ahi|n k|gan| gi|him| di|a u| ba| un|ini|ama|ya |kas|asu|n a|g a|gka|agk|kan|ags|agt|l n|a g|kag| ta|imo|uns|sam| su|g n|n o|gal|kal|og |taw|aho|uka|gpa|ipo|ika|o p|a t| og| si|gsa|g t|aba|ano|gla|y s|o a|aki|hat|kau|sud|gpi|a w|g i|aha|ot |ran|i s|n m|bal|lip|gon|ud | ga|li |uba|ig |ara|g d|na |kab|aka|gba|ngl|ayo| la| hu|a h|ati|d a|d n| pu| in|uga|ok |ihi|d u|ma |may|awo|agb|ami|say|apa|pod|uha|t n|agh|buh|ins|ad | ub| bu|at |iin|a d|ip |uta|sal|hon|wo |ho |tra|lak|iko|as |aod|bah|mo |aug|ona|dil|gik|sos|lih|pin| pi|k s|nin|oon|abu|la |rab|hun| ti|mah|tar|t s|ngb|uma|hin|bat|lao|mak|it | at|s s|sno|asn|ni |aan|ahu| hi|agi|n p|inu|ulo|y p| ni|iha|mag|o n|duk|edu| ed|a e|til|ura|tin|kip|agl|gay|g h|g b|ato|ghi|nab|kon|in |ter|o u|o o|yal|sya|osy| so|tik| re| tr|hig|a o|ha |but|pak|aya",tgl:"ng |ang| pa|an |sa | ka| sa|at | ma| ng|apa|ala|ata|g p|pan|pag|ay | an| na|ara| at|tan|a p|pat|n a| ba|ga |awa|rap|kar|g k|aya|lan|g m|n n|g b|nga|mga| mg|a k|na |ama|n s|a a|gan|yan|gka| ta|may|tao|agk|asa|man|aka|ao |y m|ana|g a|nan|aha|kan|y k|baw|kal|a m|g n|ing|wat| y |t t|pam|a n|o y|ban| la|ali|san|wal|mag| o |g i|aga|lay|any|g s|in |nya|yon|kas|a s|isa|una|ong|aan|kat|t p| wa|ina|tay|ya |on |o m|ila|ag |nta|t n|aba|ili| ay|o a| ga|no |a i|gal|ant|han|t s|kap|kak|lah|ari|agt|agp|ran|g l|lin|as |lal|gaw|ans|to |ito| it|hay|wa |t m| is|pap|mam|nsa|ahi|nag|bat|lip|gta| di|gay|gpa|pin| si|ngk|ung|aki|y n|iti|tat|ano|yaa|y s|mal|hat|kai|sal|hin|uma|mak|di |agi|pun|ihi|a l|i a|ira|gga|nah|s n|ap | ha|usa|nin|o p|gin|ipu|ika|ngi|i n|lag|la |y p|ini|g t|uka|nap| tu|a g|tas|aru|ipa| ip|li |al |n o|a o|t k|alo| pi|sin|syo|asy|ita|aho|nar|par|o s|pak|t a|uha|sas|gsa|ags|kin|a h|iba|lit|ula|o n|nak|a t| bu|duk|kab|sam|g e|ain|ami|mas|lab|ani|kil|it | al|agb|buh|a b|g g|ba | ib|iyo|ri |yag|ad | da|edu| ed|anl|ma |ais|iga|mba|tun|ipi| ki|od |ayu| li|lih|sar|gi |g w|pah|wir|oob|loo|agg|nli|bay|map|git|mil|ok |hon|ngg|sah|iya|pas|g h|agl|tar|ngu|amb|uku|ayo|s a|p n|n m|rus|i m|l a|abu| aa",hun:"en | sz| va| a |és |min|ek | és| mi|jog| jo|an |ind|nek|sze|ság|nde|a v|den|oga|sza|val|ga |mél|ala|emé|gy |n a|van|zem|ele| me|egy|ély| eg|zab|tás| az|n s|bad|aba|ni |az |gye| el|ak | se|meg|sen|ény|ség|k j|yne|lyn| ne|ben|lam|tt |t a|et |agy|oz |hoz|vag|zet| te|n m|ez |nak|int|re |eté|tet|mel|tel|s a|em |ely|let|hez| al|s s| ki|ete|atá|z a| le|yen|es |ra |tés|ell|nt |sem|t s|len|nem|a s|ese|nki|enk|a m|ásá|i m|ban|kin|k m|szt| ál|ame|köz|k a|dsá|ads|ló | kö|ás |ly |on |ébe|tat|a t|n v|áll|mén| vé|nye|kül|lő |a n| cs|i é|ok |ész|ért|lla|lap|ágo|gok|nyi|tek| ke|nd |éte|ami|zés|yes|szo|t m|a a|het|fel|lat|lem|lle|el |z e|s e|k é|mbe|emb|elé|ot |lis|vet|kor|ág |olg| am|szá|ehe|leh|ogo|ott|ül |nte|éle|i v|ogy|hog| ho|kel|n k|tes|nlő|enl|ssá|áza|ház|ég |vel|ába|lek|ége| ha|a h|rés| fe|ány|del|elő|át |alá|art|tar|zto|zás|tő |yil|koz|tko|aló|s k|i e|árs|tár|mze|emz| ny|más|ett|ny |fej|ass|zas| há|d a|t é|is |ésé|ezé|téb| mu|áso|sít|lye|elm|éde|véd|ine|t k|os |it |izt|biz| bi|y a|m l|tot|a j|atk|nél|t n|ti | má|ai |lás|eve|nev|zte| bá|sel|ll |al |ere|n e|unk|mun|t e| ak|ife|kif|ako|s é| ér|ána| es|s t|got|sül| be|vál|csa|se |ése|ad |ges|tos|ja | gy|asz|ten|lmé| tá|eze|árm|bár|ess|l s|üle",azj:" və|və |ər |ir | hə| bi| hü| ol|üqu|hüq|quq|na |in |lar|hər|də | şə|bir|lər|lik|mal|r b|lma|r h| tə|əxs|şəx|ən |dir|uqu|una|an |ali|a m| ma|ikd|ini|r ş|dən|ar |ilə|qun|aq |ası| ya|mək|yət| mə| mü|kdi|əsi|ək |ilm|nin|ndə|olm|əti|ə y|sin|xs |nda|lmə|yyə|i v| qa| az|olu|iyy|ya |ind|zad|qla|ün |ni |lə |tin|n m|aza|arı|ət |n t|maq|lun|lıq|ə b|un |nun|q v|n h|dan|ın | et|tmə|ərə| öz|da |ə v| on|ə a|ına|ını|bil|a b|sı |il |əmi|ara|si | di|ə m|əri|rlə| va|ə h|etm|ığı|ama|dlı|adl|rin|bər|rın|n i|müd|nın| he|mas|ik |n a|dil|alı|irl|ələ|üda|sın|ınd|xsi|li |ə d|nə | bə|əya| in|ə i|lət| sə|nı | iş|anı|eç |heç|q h|eyn|ə e|dır| da|asi|rı |iş |ifa|lığ|i s|fiə|afi|daf| ed|məz|u v|kil| ha|ola|n v|əni|ır |uq |unm| bu| as|sia|osi|sos|ili|ıdı|lıd|nma|ıq |inə|əra|sil|xil|axi|dax|adə|man|a h|ə o|onu|a q|əz | ki|seç| se|ı h|min|lan|ədə|bu |raq|lı |ılı|al |ə q|r v|nla|hsi|əhs|təh|öz |ist| is|məs| əs|ina|ə t|ətl|a v|iə |n b|tər| ta| cə|edi|ala|kim|qu |i t|ulm|məh|n o|aya|ı o|ial| so|ill|siy| də|var|ins|mi |ğı |nik|r i|aql|k h|təm|tam|çün|üçü| üç|ğın|sas|əsa|z h|əmə|zam| za|sti|rəf|n e|r a|ild|həm|ıql|yan|may|n ə|mən|mil| mi|əqi|din|n d|tün| dö|miy|kah|ika| ni|fad|tif|l o|sər|yni| ey|ana|lən|am |ril|ayə|aşı",ces:" pr|ní | a | ne|prá|ráv|na |ost| po|ho | sv|o n| na|vo |neb|ávo|bo |ebo|nos|má | má|ažd|kaž| ka| ro|ch |dý |ždý|ti |ou |a s| př| za|ání|á p| je| v |svo|ého| st|ý m|sti|ně | by|obo|vob|ter|pro|ení|bod| zá| sp|í a|rod|kte|by |mu |u p|o p| ná|ván|jak| ja|a p|o v|í n|ová|oli|ví |spo|roz| kt|mi |í p|ny | ma|ím |i a|do | so|odn|áro|nár|li |né |tví|at |ých|a z| vy|byl|vol|en |ýt |být| bý|t s|tní|stn|o s|í b|to | do|své|vé |ran|ejn|zák|eho|jeh|nes|pří|mí |čin|kol|ají|sou| vš|ích|it |ným|ým |nu |hra|nou|u s|ému| k |du |žen|pod| ze|kla|a v|stv|pol|dní|eré|m p|stá|je |ci |ečn| ni|néh|a n|aké|áva|maj|em |rov|í m|ké |ole|nýc|ova| ve|ako| ta|i k|chr|och| oc|kon|i p|í v|smí|esm|kdo|st |i n|o z|ave|odu|bez| to|sta|ech|jí |o d|sob|se | se|í s|ými|i s| i |i v| vz|ním|pra|lně|při|tát|ste|a j|aby| ab| s |oln|a o|m n|čen|slu|řís| os|zem|mez| či|lní|áln|oci|jin| ji|y b|í z|y s|va |vše|t v|ovn|chn|děl|níc|leč| pl|vat| vo|vin|rav|vou|lad|inn|é v|anu|tej|u k|stu|est| tr|ky |ikd|nik|ivo|nit|zen|u o|ném|nez|iál|ího|len|ens|ože|oko|kéh|rac|ven|í k|e s|lán|ělá|zdě|vzd|t k|din|odi|tí | od|ré |tup|pov|pln|ště|ákl|nno|tak|erá|řed|o a|a t|res|jíc| mu|u z|rok| ob|čno|u a|y k|i j|é n|luš|ísl|oso|ciá|soc|níh|o j|cké",run:"ra |we |wa |e a| mu|a k|se | n | um| ku|ira|ash|tu |ntu|a i|mu |umu|mun|unt|ere|zwa|ege|ye |ora|teg|a n|a a|ing|ko | bi|sho|iri| ar| we|shi|aba|e n|ese|go |a m|o a|gu |uba|ngo|nga|hir| ca|ugu|obo|hob|za |ndi|ish|gih| at|ara|wes| kw|ger|ate|a b| ba| gu|e k|can|ama|ung|bor|u w|mwe|di | ab|nke|ke |kwi|ka |ank|yo |ezw|n u|na |iwe|e m|rez|ri |a g|gir| am|igi|e i|ro |a u|ngi|e b|ban| ak| in|ari|n i|hug|ihu|e u|riz|ang|nta| vy|ata| ub|and|aka|rwa| nt|kur|ta |iki|kan|iza|u b|ran|sha|o n|i n| ig|ivy| iv|ahi|bah|u n|ana| bu| as|aku|ga |uko|o u|ho | ka|ose|ubu|ako|guk|ite|o y|ba |i b|any|kir|o k|aho|iye|kub|amw|nye|aha| ng|o m|nya| it|re | im|o b|izw|kun|hin|e c|vyo|o i|vyi|ngu|uri|imi|imw|gin|ene|u m|zi |ha |kug|bur|uru|jwe| zi|u g|era|aga|ron|abi| y |e y| uk|gek|ani| gi|eye|ind|wo |u a|i a| ib|i i|ras|bat|gan|amb|n a|onk|rik|ne |ihe|agi|kor| ic|ze |tun|ibi|wub|nge|o z|tse|nka|he |rek|twa|gen|eko|mat|ber| ah|ni |ush|umw| bw|mak|bik|ury|yiw|bwo| nk|ma |no |kiz|uro|gis|aro|ika| ya|gus|y i|wir|ugi|uki| ki|a c|ryo|bir| ma| yi|iro|bwa|mur|eng|ukw|hat|tan|utu|wit|w i| mw|y a|mbe| ha|uza|ham|rah| is|irw|o v|umv|ura|eny|him|eka|bak|bun| ny|bo |yig|kuv|wab|key|eke|yer|vye|i y|ita|ya |a r| ko|kwa|o c",plt:"ny |na |ana| ny|a n|sy |y f|a a|aha|ra | ma|nan|n n|any|y n|a m|y m|y a| fi|an |tra|han|ara| fa| am|ka | ts| na|in |ami| mi|a t|olo|min|man|iza|lon| iz|fan| ol| ha| sy|aka|a i|reh|ay |ian|tsy|ina| ar|on |o a|etr|het|ona|y o|o h|zan|y t|a h|ala| hi|a f|y h|ehe|ira|a s|zo |y i|ndr|jo | jo|n j| an| az|ran|dia| dr|y s|fah|ena|ire|tan|dre| zo|mba| ka|m p|afa| di|n d|and|azo|zy |amp|ia |ren|iny|rah|y z|ry |ika|oan|ao |amb|lal|ho | ho|isy|ony|tsa|asa|a d|ha |fia|mis|ava|ray| pi|am |dra| to|rin| ta|ant|eo |zay|rai|tsi|itr|sa | fo| ra|van|ova|nen|azy| vo|mpi|ari|o f|tok|a k| ir|kan|oto|mah|ly |sia| la|n i|voa|haf|a r|ito|y k|oka|y r|y l|ano|ita|ene|its|ial|zon|aza|ain| re| as|fot|aro|fit|nat|nin|aly|har| ko|ham| no|fa |ary|atr|ila|ata|iha|nam|kon|oko| sa|elo|nja|anj|ive|isa|oa |dy |y d|o m|nto|ank|o n|otr|pan|fir|air|sir|ty |a v|sam|o s|tov|mit|rak|reo|o t|pia|tao| ao|no |y v|iar|a e|a z|hit|hoa| it|to |za |ton|eha|end|vy |idi|tin|ati|adi|lna|aln|rov|ban| za|nga|hah|oni|osi|sos|vah|ino|ity| at|hia|pir|ifa|omb|ame|era|vel|kar|va |tso|jak|fid|ifi|ais|o i|idy|la |ama|ba | pa|tot|ani|rar|mpa|haz|kam| eo| il|iva|aho|nao|n k|ato|lah|ovy| te|dro|lan|ela| mo| si|fin|miv|san|koa| he|aso| mb|sak|kav",qug:"ta | ka|ka |na |una|cha|ash|ari|a k|ana|pak|ish|ach|hka|shk|mi |kta|hay|man| ch|apa|ak |rin|ata|kun|har|akt|ita| ha|ami|lla| pa|ama|pas|shp| ma|tak|ayñ|yñi|in |sh |ina|uku|nka|chi|aka|a c|yta|kuy|all|tap|a h|kan| tu|ñit|tuk| ru|run|chu|an |pay|ayt|ris| ki|aku|hpa|ank|a p|kam| sh|nam|a s|uy |i k|ayp|nak|pi |nta|a m| li|ay |lia|hin|kaw|nap|ant|tam|a t|iri|nat| wa|y r|kay|aws| ya|n t|ypa|wsa|pa |lak|shi|a a|lli|iku|hu |n k|iak|yay|kis| al|shu|a w|ipa| sa| il|api|kas|yku|yac|kat|a r|huk|i c|wan|hik|a i|ill|ush| ti|ayk|hpi| ku|kac|say|hun|uya|ila|ika|yuy|pir|ich|mac|ima|a y|yll|ayl|i p|kin|a l| wi|kus| yu|lan|tan|llu|kpi| ta| pi|aya|la |yan|awa| ni|kak|lat|rik|war|ull|kll|li |ink|nch|un |akp|n s|may| ay|uch|i s|nac|sha|iki|kik|h m|ukt|pip|tin|n p|iya|nal|aki| ri|ura|tik|mak|ypi|i m|i w|n m|his|k i|riy|iwa|y h| hu|han|akl|k t|mas|pik|kap| ña|u t|nmi|nis|k a|i y|k l|kar| im|i i|wil|yma|aym|ksi|iks|uma| su|h k|has| ak|unk|huc|kir|anc|k m|pal|k k|ik |iñi| iñ|ma |n y|mun| mu|mam|tac|a n|i t|k r|sam|ian|asi|k h|was|ywa|iyt|llp|san|sum|ray|si |pan|nki|tar| ii|u k|ñik|uk |iña|kuk|wpa|awp|akk|a u|wat|uri| mi|yar|uyk|ayw|h c|ha |tay|rmi|arm|uta|las|yka|llk|kul|wiñ|ati|ska| ll|kit|n h|uti|kic|mat",mad:"an |eng|ng |ban| sa| ka|dha|ren| se| ba|ak | ha|adh|hak| dh|ang|se | pa|aba|a s|na |aga|ha | or|n s|ore|ara| ag|gad|are|ana|n o|ngg|ale|gan|a k|ala|dhu|tab|sar|ota|asa|eba| ot| ke|sab|ba |wi |uwi|abb|i h|huw|aan|n k|a b|bba| ta| ma|pan|hal|bas|ako|dhi|ra |kab|em |beb|ka |lak|gi |lem|g a|eka|n b|ama|nga|san|at |ong|ran|nge|a o|ggu|sa |a d|ane|n p|ken|par|aja|man|gar|ata|nek|apa| na|agi|abe| ga|e e|sal|a a|tan|g s|al |kal|gen|ta |i s|aka|e a|a p|a e| la| pe|nan| an|era|e d| e | be|n a| al|ena|uy |guy|n n|ate| bi|mas|e k|kat|uan|oan|kon|k k|a m|i d|g e|n t|g k|ada|koa|lan|ela| da|bad|ma |ne |as |lab|ega| mo|ar |car|one|i p|bi |kaa|bat|ri |on |pon| so|e b|le |ah |abi|ase|adi|epa| ep|k h|and|pam|te |ok |ste|aon|om |oko|aha|ari|ona|asi|ter| di|di |pad|e s|sad|yar|neg|ton|set|rga|ost|mos|gap|nda|a l|har|i k|ina| a | ng|kom|isa|si |a t|a h| kl|jan|daj|iga|hig|idh|hid|ndh|n m|ngs|tto|ett|arg|la |k b|ler|k d|nna| to|nao|n d|mat| ca|tad|bis|aya|epo|aen| po|bin|nya|kas|k s|n h|sya|nta|gsa|en |ant|n g|kar|i e|das|e t|e p|iba| pr|g p| ho| el|i a|hi |os |sao|uwa|tes| ja|nag|nas|lae|sia|t s|k o|nto|int|yat|arn|m p|duw|adu|eta| ko|i b|ni |g n|kla|rak|ame|mpo|jua|sok|aso|ggi|eja|pel|jam|ele| et|dil",nya:"ali|ndi|a m|a k| nd|wa |na | al|yen| ku|nth|ra |di |se |nse| mu|a n|thu|hu |nga| wa|la |mun|u a|unt|iye| ka|ce |ace| lo|a l|ang|e a| la| pa|liy|a u|ens| ma|idw|ons|dwa|e m|i n|ala|kha|lo |li |ira|era|ene|ga |ana|za |o m| mo|yo |o w| ci|we |dzi|ko |o l|and|dan|hal|zik|chi|oyo|pa |ner|ulu|ena|moy| um|a p| da|ape|kap|ka |iko| an|pen|a c|to |ito|hit|nch| nc|iri|lir|wac|umo|e k|lu |a a|aye| dz|kuk|a z|dwe|tha|mal| za|ing|ufu|mu |ro |ful| uf|o c|i d|lin|e l|zo |edw| zo|o a|mwa|u w|iro|o n|lan|amu|ere| mw|nzi|dza|alo|ri | li|fun|lid|gan|so | ca|kul|ofu|nso|o z|ulo|unz|o k|mul|lam|i c|san|a b|kwa| na|a d| a |una|u k|i l|nkh|ant|aku|ca |cit|oli|ipo|dip|ama|lac|wir|han|yan|osa|uli|tsa|i m|pon|kup|u d|ti |gwi|ukh|ung|hun|lon|ank|nda|iki|ina| ko|ao |diz|phu|ati|oma|i a|tsi|pat|iya|siy|kut| ya|zid|eze|ma |i k|mer|ome|mol|u n|u o|aph|ogw|izo|mba|sid|ku |sam|awi|adz| ad|izi|ula|say|e n|khu| kh|rez|vom|bvo|okh|lok|win|akh|o o| am| on|zir|map| zi|eza|ja |go |ngo|ika|its|ats|osi|gwe| co|isa|ya |haw|ani|o p|zi |ndu|kho|ezo|kir|uni|i u| ay|lal|gal|sa |bom| bo|ola|amb|wak|ha |ba |nja|anj|ban| ba|iza| bu|udz|ngw|bun|oye|o d|nal|kus|i p|i o|i y|wi | nt|e p| si|aka|ne |men|jir|nji|sed|ets|end|eka|uma|du ",zyb:"bou|iz |aeu|enz|eng|uz | bo|ih |oux|nz | di|ing|z g|ux |uq |dih|ngh| ca|ng |gen|ung|z c| mi|miz|ij |cae|z d| gi| de| ge|euq|you| ci|ngz|ouj|aen|uj | yi|ien|gya| gu|ngj|mbo| mb|zli|dae|gij|cin|ang|j d|nae| se| ba|z y|euz| cu|de |x m|oz |j g|ouz|x b|li |z b|h g| da| yo|nj |xna|oxn|rox| ro|h c|nzl|vei|yau|wz |z m|ix | si|i c|iq |gh |j b| cw|nda|yin| hi| nd|dan|vun|inh| ga|can|ei |cun|yie|q g|hoz|bau| li| gy|wyo|cwy|z h|gue|gz |gun|faz|unz|yen|uh |den|ciz| go|q c|gj | bi|ej |aej| fa|hin|zci| wn|j n|goz|gai|au |z s|q d| vu|h m|gva|hu |auj|ouq|az |h d|ya |uek|ci |nh |u d|ou |sou|jso|gjs|din|awz|enj| do|h s|eve|sev|z r|nq |sin|nhy|g g|g b|liz|kgy|ekg|sen|eix|wng|lij|ngq|bin|i d|ghc| ha|bae|hix|h y|j c|ghg|i b|ouh|en |n d|h f|j s|z v|j y|law|hci|anh|inz|q y|nei|anj|ozc|ez |enh|q s|aiq|uen|zsi|zda|hye|ujc|e c|siz|eiz|anz|g y|i g|q n|bie| ne| ae|giz|u c|hgy|g d|gda|ngd|cou| la|z l|auy|ai |in |iuz|zdi|jhu|ujh|yuz| du|j m| fu|cuz|eiq|g c|gzd| co|uyu|coz|zbi|biu| dw|i s|i n|aw |dun|yun|izy|daw| he|nho| ho|enq|x l|cie|q b|cij|uzl|x d|iuj|awj| ya|eij|dei|nde|sae|izc|wnq|wnh|sei|h b|aih|gzs|bwn|a d|u g|ngg|jca|e b|ran| ra|hcu| me|iet|van| bu|guh|hen|si |wnj| ve|u b|azl|inj|gak|gan|ozg|siu|yaw|i m",kin:"ra | ku|se | mu|a k|ntu|tu |nga|umu|ye | um|unt|mun|e n| gu|we |ira|a n| n |wa |ere|mu |ko |gom|a b|e a| ab|li |e k|mba|a a|e b|aba|ga |e u|ba |omb|o k| ba|a u|ose|u b|o a| cy|ash|eng| ag|kwi| bu|za |gih|ren|ndi| ub|ang|yo |aka|gu |igi| ib|a g|a m| nt|uli|o b|ama|ihu|e i|nta| ak|ago|ro |ora| ka|ugu|hug|di |iye|ban| am|cya|ku |ta | bw|and|sha|re | ig|gan|ubu|na | kw|obo| by| bi|a i|yan|ka |sho|kub|era|ese| we|kan|aga|hob|bor|ana|byo|ura|uru|ibi|rwa|wes|u w|no |uko|i m|mo |u a|ure|ili|uba|o n|uha|uga|n a| im|ish|bwa|bwo|wiy|ali|ber|ze |ne |ush|are|o i|u m|ger|bur|ran| ki| no|ane|bye| y |ege|teg|guh| uk|n i|rag|i a|ya |u g|e m|anz|bo |abo|gar|wo |y i|ho |age|ind|o m|eke|a s|ara|zir|ite|kug|kim|aci| as|u n|ani|kir|mbe| gi|yos|kur|ugo|gir|e c|iza|aho|i b|tur|ata|o u| se|u u|zo |i i|aha|nge|mwe|iro|akw|any|eza|uki|imi|o y|ate|u k|iki|atu|bat| in|go |tan|n u|bos| bo| na|hak|iby| at|ihe|ung|ha |bul|kar|eye|eko|gek|nya|o g|shy|e y|awe|ngo|bit|mul|nzi|rer|bag|ge |imw|bah|cir|gac|bak|je |gez|imu|eze|tse|ets|mat| ru|irw|he | ni| ur| yi|ako|ngi| ng|i n|rez|ubi|gus|fit|afi|ugi|uka|amb|o c|utu|ufa|ruk|mug|bas|bis|uku|hin|e g|ige|amo|ing| af|yem|ni | ry|a r|gaz|te |erw|bwe|ubw|hwa|iko| al|ant|zi ",zul:"nge|oku| ng|a n|lo |ung|nga|la |le | no|elo|lun| um|e n|wa |we |gel|e u|ele|nel|thi|ke |nom|ezi|ma |ntu|oma|hi |o n|ngo|tu |nke|onk|o l|uth|ni |a u|lek|unt| wo|o e| lo|mun|umu|pha| ku|ang|ho |kwe|ulu| ne|won|une|lul|elu| un|a i|gok|kul|ath|hla|lok|khe|eni|tho|ela|zwe|akh|kel|a k|enz|ana|ban|aka|u u|ing|ule|elw|kho|uku|ala|lwa|gen| uk|wen|ama|na |e k|ko |gan|a e|he |zin|enk|o y| ez|kat| kw|lan|eth|het|o o| ok|okw|i n|nzi|aba|e a|hak|lel|lwe|eko|ane|ka |so |yo |ayo|o a|uhl|nku|nye| na|thu|mph|do |ben|ise|kut|ike|kun| is| im|hol|obu|fan|i k|e w|nhl|nok|ini|and|kuh|ukh|kuk| ak|e i|isi|aph|zi |ile|eki|ekh| ba|eka|the|a a| le| ye|kwa|e e|fut| fu|za |mal| ab|ebe|isa| em|o w|kub|mth|i w|ndl|emp|any|olo|ga | ko|nen|nis|alu|ith|eli|ndo|seb|nda| ya|i i|eke|vik|ake|uba|abe|ezw|yok|ba |ale|zo |olu|ume|ye |esi|kil|khu|yen|emi|nez|hlo|a l|ase|ula|kek|a o|iph|o u|no |azw|kan|mel|uny|ne |ufa|ahl|lin|hul|ant|und|sa |enh|kus|kuv|lak| in|o i|din|kom|amb|zis|ind|ola|uph|wez|eng|yez|phe|phi|mba|nya|han|kuf|nem|isw|ani|iyo| iy|fun| yo|uvi|i a|ene|izi| el|cal|i e|eze|ano|nay|hwe|kup|lal|uyo|ubu|kol|oko|ulo| la|e l|tha|nan|mfu|hon|nza|hin| ey|omp|da |bo |ilu|wak|lon|iso|kug|nka|ink|i l|sek|eku| ek|thw|gez",swe:"ar |er |tt |ch |och| oc|ing|ätt|ill|rät|en | ti|til|för|ll | rä|nde| fö|var|et |and| en|ell| ha|om |het|lle|lig|de |nin| de|ng | in| fr|as |ler| el|gen|nva|und|att|env|r h| i |r r|ska|fri| so|har|der| at|ör |ter|all|t t| ut|den|ka |lla|som|av |sam|ghe|ga | sk| vi| av|ete|la |ens|t a| si|r s|iga|igh|tig| va|ig |a s| st|ion|ra |tti|a o| är|ten|ns |t e|na | be|han| un| an| sa|a f| la| gr| må|nge|n s|vis|lan|må |ati|nat| åt|an |nna| li| al|t f|ans|nsk|sni|gru|äll|tio|ad | me|isk|kli|s f|t i|stä|t s|ri |med|sta|h r|lik|da |dig|ta |r o|run|on | re|lag|tta|är |kap|a i|a r|änd|erv|n e|kte|n f|rvi|nom|itt|id | mo|sky|r e|ver|äns|vil|gt |igt| na|tan|uta|dra|t o|ro |isn| fa|kal|ihe|rih|erk|r u|e s|per|l v|vid|one|rel|ber|ran|ot |mot|ndl|d f|ed |ika|män|l s|bet|t b|dd |ydd|kyd|n o|s s|str|n m|tet|sin|r f| om|rna|int|r i|end|nad|l a|ap |ers|nda|t v|ent|rbe|arb| hä|ets|häl|amh|ckl|gar|nga|r m|je |rje|arj|n i|s e|lin|r t|i s|rän| pe|ilk|t l|ern|på | på|täl|d e|dom|ege|g e|tni|r a|lit|ras| så|lln|kil|ski|enn|i o|a d|erä|n a|ara| ge|äro|a m| ar|t d|ilj|els|yck| ve|g o|frå|nas|tra|ess|del|m s|liv|l l|in |v s|g a|ast|e e|val|son|rso|e t|age|nd | eg|ial|cia|oci|soc|upp|igi|eli|g s|rkl|gad|ndr|nte|öra",lin:"na | na| ya|ya |a m| mo|to | ko|li |a b| li|o n| bo|i n|a y|a n|ki |a l|kok|la | ma|zal|i y|oki| pe|ngo|ali|pe |so |nso|oto|ons| ba|ala|mot|a k|eng|nyo|eko|o e|nge|yon| ny|kol|lik|iko|a e|o y|ang|ye | ye|oko|ma |o a|go | ek|ko |e m|aza|te |olo|sal|ama|si | az|mak|e b|lo | te|ta |isa|ako|amb|sen|ong|e n|ela|oyo|i k|ani| es|o m|ni |osa| to|ban|bat|a t|mba|ing|yo | oy|eli|a p|mbo|o p|mi | mi| nd|ba |i m|bok|i p|isi|mok|lis|nga|ge |nde|koz|bo |gel|ato|o t|mos|aka|oba|ese|lam|kop| ez|lon|den|omb|o b|ota|sa |ga |e a|e y|eza|kos|lin|esa|e e|kob|e k|sam|kot|kan|bot|ika|ngi|kam|ka | po|gom|oli|ope|yan|elo| lo|ata| el|bon|oka|po |bik|ate| bi|a s|i t|i b|omi|pes|wa | se|oza|lok|bom|oke|som|zwa|mis|i e|bek|iki| at|ola|ti |ozw|lib|o l|osu|oso|e t|nda|ase|ele|kel|omo|bos|su |usu|sus|bal|i l|ami|o o|bak| nz|pon|tel|mob|mu | ep|nza|asi|mbi|ati|kat|le |gi |ana|oti|ndi|tan|a o|wan|obe|kum|nya|mab|bis|nis|opo|tal|mat| ka|bol|and|aye|baz|u y|eta| ta|ne |ene|emb|sem|e l|gis|ben| ak| en|mal|obo|gob|ike|se |ibo|’te| ’t|umb| so|mik|oku|be |mbe|bi |i a|eni|i o| mb|tey|san| et|abo|ebe|geb|eba|yeb|bu | as|ote|sik|ema|eya|ibe|mib|ai |pai|mwa|kes|da |may|boz|amu|a a|kom|mel|ona|ebi|ia |ina|tin| ti|bwa|sol|son",som:" ka|ka |ay |uu |an |yo |oo |aan|aha| wa|da | qo| in| u |sha| xa|a i|ada|iyo| iy|ma |ama| ah| la|qof|aa |hay|ga |a a|a w|ah | dh|a s| da|in |xaq| oo|a d|aad|yah|eey| le|isa|lee|u l|q u|aq | si|taa|eya|ast|la |of |iya|sa |y i|u x|sta|kas|xuu|uxu|wux| wu|iis|nuu|inu|ro | am| ma|a q|wax|dha|ala|kal|nay|f k|a k|le |ku | ku| sh|o i|a l|ta |maa|a u|dii|loo| lo|o a|ale|ara|ana|iga|o d| uu|ha |lo |o m|o x|doo|aro|kar|yaa|gu |si |ima|na | xo| fa|adk|do |a x|ad |aas| qa| so|a o| ba|lag| aa| he|dka|adi|soo|o k|aqa| is|ash|u d|had| ga|eed|san|u k|a m|iin|i k| ca|u s|n l|yad|rka|axa|elo|hel|aga|hii|o h|o q| ha|id |n k| mi|baa| xu|har|xor|aar|ax |mad|add|nta|mid|aal|waa|haa|ina|qaa|daa|agu|ark|o w|nka|u h|dad|ihi| bu| ho|naa|n a|ays|haq|a h|o l| gu|o s|aya|saa|lka| ee| sa|dda|ab |nim|quu|gga|ank|kii|rci|arc|n s|a g| ji|gel| ge|eli|ysa|a f|siy|int|laa|uuq|uqu|xuq| mu|i a|uur|mar|ra |iri|o u| ci|riy|ya |ado|alk|dal|ee |al |rri|ayn|asa| di|ooc|aam|ofk|oon|to |ayo|dar| xi|dhi|jee|a c| ay|yih|a j|ban|caa|lad|sho|d k|ida|uqd|agg|sag|ras|bar|ar | ko| ra|o f|gaa|gal|fal|u a| de| ya|o c|ii |xay|eel|aab|sig|aba|orr|hoo|u q|y d|ed |ho |sad|qda|h q|fka|n i|xag|n x|qay|lsh|uls|bul|u w|jin| do|raa| ug|ido|ood",hms:"ang|gd |ngd|ib | na|nan|ex | ji|eb |id |d n|b n|ud | li|nl |ad | le|jid|leb|l l| ga|ot | me|x n|anl|aot|mex|d g|b l|d d|ob |gs |ngs|jan| ne|ul | ni|nja| nj|lib|ong|nd | zh|jex| je|b j| sh|ngb| gh|gb | gu|gao|l n|han| ad|gan| da|t n| wu|il |x g|nb |b m| nh|she|is |l j|d l|nha|l g|d j|b g|el |end|wud|nex|gho|d s|d z|oul|hob|ub |nis| ch| ya|it |b y|eib| gi|s g|lie| yo| zi|oud|s j|d b|nx | de|es |d y| hu|uel|gue|ies|aob|you| ba|d m|chu|gia|dao|b d|s n|zib| go|zha|eit|hei|al |hud| do|nt |ol | fa|t g|hen|ut |gx |ngx|ab |fal|x j|b z|ian|d h|don|b w|t j|iad|nen| xi|gou|d c|b h|hao|x z|nib|anx|ant|gua| mi|s z|dan|ox |inl|hib|lil|uan|and| xa|b x| se|x m|uib|hui|d x|anb|enl| we|od |enb| du|at |ix |s m|bao| ho|hub| ng|zhi|jil|l s|yad|t m|t l|yan| ze| ju|heb|had|os |aos|t h|l d|nga| he|b a|xan|b s|sen|xin|dud|jul|d a|lou| lo|dei|d w| bi|b c| di|zhe|gt |ngt|x l|bad|x b| ja|hon|zho|blo| bl|d k| ma|deb|l z|wei| yi| qi|b b|x d|d p|eud| ge|x a|can| ca|t w|lol| si|hol|s w|aod|pao| pa|ren| re|x s|eut|pud| pu|aox|mis|gl |ngl|x w|zei|gon|enx|gha|s a|b f|l y|oub|eab|hea| to|did| ko|unb|ghu|t p|x c|geu|t s|x x|jao|ed |t c|l m|l h|jib|ax |l c|d f|nia| pi|eul|d r| no|min|l t|heu|ux |tou|ns |s y|iel|s l|hun",hnj:"it | zh| ni|ab |at |ang| sh|nit| do|uat|os |ax |ox |ol |nx |ob | nd|t d|zhi|nf |x n|if |uax| mu|d n|tab| ta| cu|mua|cua|as |ad |ef |uf |id |dos|gd |ngd|hit|ib |us |enx|f n|she|s d|t l|nb |ux |x z|ed |inf|b n|l n|t n|aob|b z| lo|ong|ix |dol| go|zhe|f g| ho| yi|t z|d z|b d| le|euf|d s|ut |yao| yo| zi|gb |ngb|ndo|enb|len| dr|zha|uab|dro|hox| ge|nen| ne|han| ja|das|x d|x c|x j|f z|shi|f h|il | da|oux|nda|s n|nd |s z|b g| ny|heu| de|gf |ngf| du|od |gox| na|uad| gu|inx|b c| ya|uef| xa| ji|ous| ua| hu|xan|hen|zhu|nil|jai|rou|t g|f d| la|enf|ged|ik | bu|nya|you|f y|lob|af |bua|uk |is |yin|out|of |l m|ud |hua| qi|ot |t s| ba|ait| kh|s s|nad| di|aib|x l|lol| id|dou|ex |aod|bao| re| ga|d d|b y|las|hed|b h|b s|f b|t y|jua| ju| dl|x s|hue|b l| xi|zif|dus|b b|x g|hif|x y|hai| nz|sha| li|x t| be|d j|und|hun|ren|d y|hef|xin| ib|b t|l d|aos|s l| ha|gai|nzh|gx |ngx| ao|s b|s x|el |gt |ngt|hik|aid|s t|x m|f l|f t| pi|aof|t r|eb | gh|s y|d l|gua| bi| za| fu|t h| zu|hou|deu|lb | lb|d g| mo|b k| bo|iao|ros|gon|eut|x h|al |uaf|hab|t t|k n|f x|hix|pin|yua| no|t b|ak | zo|s m| nb| we|d b|gha|f s|mol|euk|dax|l b|nof| ko|lou|guk|end|uas|t k|dis|dan|yol|uan|d t|x b|lan|t m| ch|jix|x x| hl|aox|zis|x i|et | ro",ilo:"ti |iti|an |nga|ga | ng| it| pa|en | ma| ka| a | ke| ti|ana|pan|ken|ang|a n|agi|a k|n a|gan|a m|a a|lin|ali|aya|man|int|teg|n t|i p|nte| na|awa|a p|na |kal|ng |dag|git|ega|sa |da |add|way|n i|n n|no |ysa|al |dda|n k|ada|aba|nag|nna|ngg|eys| me|a i|i a|mey|ann|pag|wen|i k|gal|gga| tu|enn| da| sa|nno| we|ung| ad|tun|mai| ba|l m| ag|ya |i s|i n|yan|nan|ata|nak| si|aka|kad|aan|kas|asa|wan|ami|aki|ay |li |i m|apa|yaw|a t|mak| an|i t|g k|a s|ina|eng|ala|ika|ama|ong|ara|ili|dad| aw|gpa|nai|et |yon|ani|aik|on |at |oma|sin|bal|ipa|n d|uma|g i|ket|ag |in |aen|n p|ram|sab|aga|nom|ino|lya|ily|syo|i b| ki|nia|agp|gim|kab|asi|kin|iam|ags|bab|oy |toy|n m|agt| ta|bag|sia|g a|gil|mil| um|o p|ngi|n w|i i|pad|pap|daa|iwa|naa|eg |ias|ed |nat|bae|o k|saa|san|pam|gsa|ta |kit|ma |dum|yto|tan|i e|t n|uka|t k|apu|lan|sta|sal| li|a b|ari|g n|den|mid|ad |o i|y a|ida|ar |aar|y n|dey| de| wa|a d|ak |bia|ao |tao|min|asy|mon|imo| gi|maa|sap|abi|i u|aib|kni|i l|gin|ged|o a| ar|kap|pul|eyt|abs|ibi| am|akn|i g|kip|isu|g t|bas|nay|ing|i d|kar|ban|iba|nib|t i|as |d n|y i|ura|a w|nal|aad|i w|lak|adu|kai|bsa|duk|edu| ed|may|agb|agk|tra|gge|sol|aso|agr|ngs|ian|ila|dde|edd|tal|aip|kua|umi|pay|sas|ita|pak|g d|ulo|inn|aw "},Cyrillic:{rus:" пр| и |рав| на|пра|ств|го |ени|во |ове| ка|на |ть | по|ия |о н| об|ет | в |сво| св|аво|ани|ост|ого|ый |ажд|лов|т п| им|ния| че| со|ело|име| не|льн|ли |чел|каж|ест|век|ать|ова|или| ра|ек |й ч|дый|жды| до|ие |еет|мее|но | ил|ии |ся |его|обо|и п|ние|к и| бы|и с|и и|ми |бод|воб|ван| за|ой |ых |ом |лен|аци|енн|о с|о п|ьно|тва|тво|при|ног|аль|ако|ва |и н|сти|ных|то |бра|олж|дол|сто|и в|ным|ое | ег|нов|их |ель|тел|ти |нос|не |пол|раз| вс|и о| ли|и р|ыть|быт|вле|ред|ию |тор| ос|ься|тьс|оди|щес|я и|как|про|жен|ым |пре|а с|сно|е д|нно|о и|ий | ко|о в| ни| де|сту|лжн|сов|е в|ном|оль|ран|оже|иче|ей |аст|нны| от|туп|м и|одн|зов|рес| мо|осу|ля |осн|а о|вен| то|о б|шен|тве|общ|а и|е м|ьны|обр|вер|чен|я н|жно|чес|ак |лич|нии|е и|все|бще|ват|есп|мож|й и|ное|о д|бес| во|я в|ду | ст|дно|она|нац|ден|ежд|х и| бе|и д|ны |дос|для| дл| та|льс|ате|ции|я п|ую |ите|е о|ной|под|ото|стр|ста| ме|ели| ре|я к|тоя|ами|ен |ь в|ю и|азо|гос|м п|ь п|т б|жет|уча|суд|ьст|дст|щит|ащи|защ|кон|нию|ам |оду|ере|гра|печ|о о|оро|кот|и к|тра|ник|уще|циа|оци|соц|нал|еск|о р|ког|дру| др|ни |ава|нст|ем |авн|ыми|едс|дин|дов| го| вы|в к|ые |обе|му |я е|слу|уда|так|кой|ту |иту|зак|ход|вол|раб|кто|икт|ичн|нич|от |ина| к |тер|род|нар",ukr:"на | пр|пра| і |рав| на| по|ня |ння| за|ого|ти |во |го | ко|аво| ма|люд|о н| не| лю|юди|ожн|кож|льн|жна|дин|ати|ає |их |ина|пов|сво| св|анн|є п|має|або|а л| бу|не |енн|бо | аб|а м|ови|ні | ви| ос|аці|вин| та|без|обо| ві| як|ере| до|і п|ува|о п|аль|них|ом |ми |іль|ног|та |ий |при|ою |ть |ста| об|ван|инн|ті |ост| у |ся |ват|бут|ист| мо|езп|ути|нов|пер|ії |и п|бод|воб|ств| в |о в|від| бе|ако|під|тис|кон|но |ва |нні|і с|а п|сті| сп|ний|ду |ьно|она| ін|дно|ним|ій |а з|ну |мож|її | її|ля |соб|му |ої |яко| пе| ра|ід | де|і в|и і|чин|вно|ому|ном|у п|і н|а с| су|а о|нен|ися|ово|нан|одн|у в|і д|ава|ідн|рів| рі|і р|ими|віл|им |ції|о д|а в|сту|оду|буд|ова| пі| ні|я н|е п|нац|и с|нна| од| ро|нос|ьни|ють|и з|ки |і з|а б|спр|чен|же |оже|е м|овн|рим|е б|то |ніх|осо|удь|ві | ре| ст|рац|до | со|роз|лен|вни|івн|род| вс|спі|ков|зпе|ів |для| дл|ї о|хис|ахи|зах|‐як|ь‐я|дь‐|я і|так|зна|заб|сть|ту |ною|а н|тор|сно|о с|жен|ціа|оці|соц|інш|і м|кла|и в|тер| ді|іст|ові|у с|я в|аро|сі |віт|сві|осв|роб|піл|рес|за |печ|абе|ку |лив|ерж|дер|в і|авн|тав|ав |ами|ком|вле|о б|ь п| що|їх |тво|хто|іхт|ког| кр|ано|тан|іал|нал|нь |х п|жно|леж|але|про|тва|рат|о о|х в|нар|льс|цій|кор|час|ржа|ї с|ину|дст|о з|раз|мін|а р|зак",bos:" пр| и |рав|на |ма |пра| на|има| св|а с|да |а п|во |је |ко |ако|о и| по|аво|е с|а и|ти | им| да| у |сва|но | за|о н|ва |и п|или|вак|ли | ко|не | ил|кој| не| др|ост| сл|ња |им |и с|у с|и и|ава|ије|а у| би|ств|се |вањ|а д|ом |јед|бод|обо|лоб|сло| се| ра|их |сти|а н|ње | об| је|при|дру|у и|ју |о д|ити|вој|раз|ање|ова|дје| ос|е и|ло |е п|ања|ује|и д|бра|тре| тр| су|у з|а к|ог |у п|оје|циј|реб|а о|а б| ње|и у|миј|ни |нос|ба |едн|сво|њег| из|про|е д|жав|бит| ни|и о|ста|а з|авн|вје| ка|бил|ово|а ј|ају|ист|и н|них|јел|ту |ред|гов| од|е о|оји| см|ја |о к|ило|аци|е у|пре|о п|еба|у о|су |вим|ичн| са| дј|а т|ија|шти|чно|ржа|држ|сту|дна|одн|ени|за |ива|ном|ем |ду |ран|вно|сми|јер|е б|е н|де |пос|м и| до|у д|нак|а р|обр| мо|ним|его| кр|тит|кри|ве |ан |ико|ник|ну |и м|ног|ено|сно|е к|туп|руг|ка |ода|рив|вољ|алн|м с|иту|ашт|заш|ани|сам| ст|акв|ови|осн|род|аро| ми|ји |тва|дно|нст|ак |ите|љу |вич|рад|у н|у м| та|дст|тив|нац|рим|кон|ку |њу |оду|жив|амо|тво|тељ|под|ећу|г п|нов|ина|нар| вј|и б|ој | ов|аве|ву |анс|оја|зов|азо|уде|буд| бу|е т|и в|ења|еди|ниц|нап|мје| ис|слу|едс|о о|зак|и к|м п|тно|иво|ере|нич|как|ада|вни|уги| ро|мов|вен|о с|то |те | вр| бе|ара|кла| бр|у б|у у|и т|она| он|ави|јал|дни| ск",srp:" пр| и |рав|на |пра| на|ма | св|има|да |а п|во |ко |ти |аво| по|а и|ако|а с| за| у |о и| им|и п|ва |сва|вак| да|о н|е с|ост| ко|ња |ли |или|не |ом | не|а н| сл| ил|је | др|и с|но |кој|у с|ава| ра|ог |сло|ју |им |сти|бод|обо|лоб|ити|а о|ств|и у|а д|ни |јед|у п|при|едн| би|и и|а к|о д|ста|их |дру|а у| је|ања| ос| ни|нос|про|ају|и о| де| су|у и|се |ње |ја |ова|и д|циј| об|ује|ред|жав|е и|е п|а ј|дна| се| од|ве | ка|ени|ржа|држ|а з|авн|ења|аци|вој|ово|у у|м и|оја|вањ| из|ија|у з|ање|ран|е о|род|и н|е б|раз|за | ње|гов|ичн| ст|нов|сно|осн|ду |пре| тр|су |ву |одн|а б|сво|њег|ним|них|ту |тит|шти|ку |ном|бит|е д|ме |ико|чно|оји|ло |вно|ник|ика|без|ара|де |у о|вим|нак| са|рив|аве|ан |вољ| кр|о п|сме|е к|ног|ји | ов|е у|тва|бра|руг|реб|тре|у д|ода| мо| вр|ављ|у н|его|дел|м с|кри|о к|ашт|заш|њу | см|ани| ли|дно|еђу|алн|ла |акв|ој |ком|сту|уги|ави|а р|ка |рад|оди|вич|тав|иту|уде|буд| бу|пот|оду|жив|ере|тво|ило|бил|аро|е н|ови|пор|ено|штв|нац|ове|м п|туп|пос|рем|дни|ба |нст|а т|оју|аст|ива|е м|вре|вља|ну |беђ|ист|ен |те |дст|рот|зак|ао |као|и к|јућ|о с|ст |сам|м н|тер|нар| ме|и м|кол|е р|ушт|руш|вер|как| бе|и б|кла|ада|еба|ена|она| он|тву|анс| до|рак|слу|и в|ниц|у к|мен|врш|еме|едс|иви|о о|јав",uzn:"ан |лар|га |ир | би|ар | ва|да |ига| ҳу|ва |бир|уқу|қуқ|ҳуқ| ҳа|р б|ган|иш |ида| та|а э|ини|ади|нг |дир|иши|лик|лиш|ий |или|ари|уқи|ҳар|лан|инг|ши |дан|нин|инс|кин|сон|нсо| ин| му|қиг| ма|он |р и| бў|эга| эг| ўз|ни |бўл|гад|и б|ки |ила|ёки| ёк|а б|н б|ин |р ҳ|ала|эрк| эр|лга| қа|рки|ш ҳ|и ҳ|н м| бо| ба|ик |ара|иги|лиг|ри |қил|а т|бил| эт|ниш|нли|кла|и в|бош|эти|ани|им |и м|оли|қла|а ҳ|лаш|атл|тил|а қ| ол|оси|мас|қар|инл|лат| қи|таъ|ҳам|ги |иб |мла|ўз |н э|мум| да| бу|ат |ш в|ун |ати|мки|умк|тла|иро|ўли|бар|ири|риш|ият|али| бе| қо|а ш|аро| ке|и т|рла| те|ча |рча|арч|а ў| шу|тиш|н ҳ|тга| са|аси| ха|рак|лин|ола|имо|шқа|ли | ту|амл|лла|сид|н ў| ас|нид|а и| ки|н т|нда|к б|ера|ошқ|сиз|ор |а м|р в|енг|тен|мат|мда|амд|лим|й т|ят |и а|ино|илг| то|тни|ана|ас |эма| эм|а ё| ша|аш |а а|тар|кат|ака|ак | де|аза|илл|сий| си| со|уқл|н қ|ода|ъли|аъл|ник|ада| ни|тда|гин|уни|сит|ай |қон|н о| жа|ким|еч |ҳеч| ҳе|ўзи|лак|кер|икл|лли|ур |зар|шла|риг|ирл|дам|коҳ|ико|а д|ам |н в|рти|тиб|тал| иш|чун|учу| уч|сла|а у|рин|сос|асо| ун|на | ка|муҳ|диг|ч к|асл|лма|ра |бу |хал|ўлг|и к|екл|р д|қат|ага|и қ|оий|мил| ми|қа |и с|жин| жи|син|рор|а в|лад|а о|тли|мия|н и|аб |тир|з м|дав|рга|аги|а к|нла|ақт|вақ|арт|аёт|лаб",azj:" вә|вә |әр |ир | һә| би| һү| ол|үгу|һүг|гуг|на |ин |лар|һәр|дә | шә|бир|ләр|лик|мал|р б|лма|р һ| тә|әхс|шәх|ән |дир|угу|уна|ан |али|а м| ма|икд|ини|р ш|дән|ар |илә|гун|аг |асы| ја|мәк|јәт| мә| мү|кди|әси|әк |илм|нин|ндә|олм|әти|ә ј|син|хс |нда|лмә|јјә|и в| га| аз|олу|ијј|ја |инд|зад|гла|үн |ни |лә |тин|н м|аза|ары|әт |н т|маг|лун|лыг|ә б|ун |нун|г в|н һ|дан|ын | ет|тмә|әрә| өз|да |ә в| он|ә а|ына|ыны|бил|а б|сы |ил |әми|ара|си | ди|ә м|әри|рлә| ва|ә һ|етм|ығы|ама|длы|адл|рин|бәр|рын|н и|мүд|нын| һе|мас|ик |н а|дил|алы|ирл|әлә|үда|сын|ынд|хси|ли |ә д|нә | бә|әја| ин|ә и|ләт| сә|ны | иш|аны|еч |һеч|г һ|ејн|ә е|дыр| да|аси|ры |иш |ифа|лығ|и с|фиә|афи|даф| ед|мәз|у в|кил| һа|ола|н в|әни|ыр |уг |унм| бу| ас|сиа|оси|сос|или|ыды|лыд|нма|ыг |инә|әра|сил|хил|ахи|дах|адә|ман|а һ|ә о|ону|а г|әз | ки|сеч| се|ы һ|мин|лан|әдә|бу |раг|лы |ылы|ал |ә г|р в|нла|һси|әһс|тәһ|өз |ист| ис|мәс| әс|ина|ә т|әтл|а в|иә |н б|тәр| та| ҹә|еди|ала|ким|гу |и т|улм|мәһ|н о|аја|ы о|иал| со|илл|сиј| дә|вар|инс|ми |ғы |ник|р и|агл|к һ|тәм|там|чүн|үчү| үч|ғын|сас|әса|з һ|әмә|зам| за|сти|рәф|н е|р а|илд|һәм|ыгл|јан|мај|н ә|мән|мил| ми|әги|дин|н д|түн| дө|миј|каһ|ика| ни|фад|тиф|л о|сәр|јни| еј|ана|лән|ам |рил|ајә|ашы",koi:"ны |ӧн | бы|да | пр|лӧн|рав| мо|пра| да|быд| ве|орт|лӧ |ӧй |мор|ӧм |аво| не|во |ыд |ыс |нӧй|ын |м п|д м|ыны|тны| ас|тӧм|льн| эм|вер|сь |ьнӧ|эм |н э|тлӧ| кы|сӧ | по|ерм|сьӧ|ртл|аль| кӧ|эз | ӧт|ӧ в|то |ето|нет|ылӧ| ко|тшӧ| от| и |ы с|бы |ӧ б|ств|кӧр| вӧ|шӧм|кыт|та |на |з в| се| до|вол|ӧс | сы|ы а|ола|рмӧ|ас |оз | оз| сі|а с|тво|с о| вы|ліс|ӧ к|ытш|ӧ д|ис |ісь|ӧтн|ась| ол| на|аци| эт|а в|злӧ|сет| во| чу|лас|лан|мӧ |тыс|рты|ӧрт|ы п|ӧтл|о с|эта|дз |кӧт|ӧдн|вны| мы|н н|удж| уд|выл|ӧ м|рті|орй|ись| со|воэ|ыдӧ|й о|кол| го|с с|сси|сыл|ысл|йын|кин|олӧ|тӧн| сь|ана|ӧр |ция|а д|ӧмӧ| ви|з к| эз|ы б|тӧг|ӧт |мӧд|ест|ост|ӧны|тир|оти|укӧ|чук|н п|онд|пон|слӧ|кер| ке| об|сис|суд|а н|дор|кон|нек|н б|лӧт|с в|ті |ьӧр|тра| ст|нал|она|нац|н к|кӧд|ӧг |скӧ|ть |етӧ|дӧс|быт|рны|ӧ н|тсӧ|рре|а б|нда|с д|асс|ы к|асл| ло|ьны|сьн|ы м|еки|ы д| мӧ|ь м|ы н|ытӧ| ме|рйӧ|иал|й д|итӧ|а к|ӧсь|мӧс|овн|зын|а п|отс| ли|оля|ӧ а|осу|ӧя |нӧя|езл|рез|мед|с м| сэ|ь к|рйы|ако|зак| за|ьын|ннё|мӧл|умӧ| ум|ы у|н в|м д|н с| дз|н о|ран|стр|озь|поз|з п|о д|циа|оци|соц|ион|а м|еск|чес|нӧ |з д|тсь|бӧр| бӧ| ов|вес|кыд|ӧ с|воы|код|тко|ӧтк|оль|дбы|едб|сьы|чын|тчы|ӧтч|тла|мӧн|сла|йӧз| йӧ|т в|ы и|ез |о в|оны|йӧ |анн|ӧль| пы|ан |нӧс|нит| су|м с",bel:" пр|пра| і |ава|на |рав| на| па|ны |ва |або|ць | аб|ае | ма|аве|анн|ацы|сва| св|е п|льн| ча|не |ння|ала|а н|ай |лав|чал| ко| ад| не|га |ожн|кож|век|ня | як|жны|ы ч|мае|а п|ага|бо |ек |а а|ца |цца| ў | за|ых |пав|а с|го |він|дна|бод|мі |ваб|ван|ам | вы| са| да|ста|аві|нне|асц|най|цыя|наг|ара|і н|к м|яго| яг|ьна|пры|аць|і п|одн|ств|ама|ных| бы|тва|дзе|аль| ра|ні |і с|і а|ыць|а б|енн|лен|ці |оўн|ым |рац|інн|іх | ас| та|то |нас|які| дз|чын|оль|і д|аво|ад | ні|сці|ымі|ным|быц|я п|ьны|ыя |аро|ана|іна|і і|рад| гр|ля |ўле|о п|а ў|рым|пад|ыі | ін|амі|дзя|рам|цыі|аба|а і|ду |жна|ўна|нал|нац|ры |эта|гэт| гэ|нен|да |ах |гра|кац|ука|а з|кі |адс|ў і|нст|энн|я а|нні|оду|а р|нна|ход|нан|пер|х п| у |адз|і р|мад|м п|е м|аду|дст|для| дл|оў |нае|і м|ако| ка|ы ў|бар|е а|ацц|ую |ыцц|сам|яўл|але|род|раб| пе|што| ўс|адн| су|роў| ро|дук|люб|ь с| шл|раз|нав|зна|вол|удз|ада|жыц|чна|ве |а т|асн|сац|ера| рэ|яко|кла|аны| шт|ь у|аюц|нар| ус|соб|асо|пам|я ў|авя|чэн|воў|так|ну |ю а|ь п|зак|кар|е і|ь а|бес|ія |кія|х і|заб|аса|ім |жав|і з|леж|тан|ахо|яль|ыял|о с|яна|кан|ака|інш|алі|вы | мо|нах|я я|м н|ога| бе|й д|о а| ст|ены|і ў|а д|есп|шлю|цця|ы і|ыст|рыс|люч|клю|тац|уль|ынс|ачы|спр| сп|аў |ыма|ары|кам|е ў|і к|кон",bul:" на|на | пр|то | и |рав|да | да|пра|ств|ва |а с|а п|во |но |ите|та |о и|ени| за|не | не|а н| вс|ван|аво|ото|е н|о н|а и|ки |ие |те |ни |има| им|ли |или|ия | по|ове|ане|чов|ма | чо|и ч|а д|ние|и д|ест| ил|ани|век|все| об|ек |еки|сек|ава|тво|сво| св|вот|а в|и с|ост| ра|ова|а о|е и|ват|и н|е п|к и|а б| в |и п|лно|о д| се|раз|ето|ъде|бъд| бъ|при|ата| ко| тр| ос| съ|бод|обо|воб|ат |за |тел| е |аци|о с|де |о п|ен |бра|и в| от|се |ния|алн| де|его|нег| из|от |ран|ята|как|оди|е с|и и|ден|пре|бва|ябв|ряб|тря|нит| ка|ява|про|ст |а з|гов|вен|тве|о о|а р|акв|о в|и з|ред|нос|ият|е д|щес|нов| ни|ция| до|йст|о т|е т|ржа|ърж|дър|ено|пол| с |обр|тва|нот|рес|ейс|и о|е в|кой|общ|лен|она|нац|иче|ез |без| бе|ежд|ува|вит|ри |зак|и к| ли|а е|под|ели|ник|си |е о|а т|авн|и р|т с|ка |оет|елн|нен|ой |гра|жен|дру| ре|а к|сно|осн|лич|зи | та|са |нст|вни|чки|ичк|сич|вси|люч|клю|дно| мо|еме|а у|изв|тви|дей|я н|кри|ато|о р|й н|ико|ичн|жав| дъ| то|бще|иал| со|лит|т н| си|т и|одн|жда|зов|азо|уча| гр|кое|тъп|стъ|вол|лни|сре| ср|ква|кон|тно|ака|и у|ко |ган|ода|чен|лст|елс|стр| къ|ста|род|нар|и м|нал|руг| др|чес|въз|ди | са| те|сто|дос|раж|рез|чре|гат|еоб|а м|о е|ине|аст|ово|чно|аве|му | му|ано|ита|ими|ако|нак|лаг|ови",kaz:"не | құ|ен |ұқы| ба| қа|құқ|ық |ға | жә|әне|жән| не| бо|де |дам|ада|а қ|тар|ына| ад|ылы| әр|ың |ан |ін |қыл|ар |еме|на |р а|лық|уға|ала|ықт| өз|мес|әр | жа|мен|ығы|лы | де|қта|ның|н қ|ған|іне|бас|ары| ме| қо|еке|ын |да |е қ|ды |асы|се |есе|ам |бол|анд|нем| бі|ара|ы б|ста|тан|нды|н б|ің |е б|ілі|тиі| ти|бар|ғы |нде|етт|иіс|қығ|іс |лар|ге |ы т|інд|ік |бір| бе| ке|алу|е а|алы|луы|а ж|ері|олы| те|қық|н к| та|н ж|ғын|тті|іні|тын| ер|нда|ім | са|е ж|аты| ар|рға|еті|ана|ы ә|уын|лға|өзі|ост|егі|тік|қа |сқа|рын|кін|луғ|ң қ|нің|уы |бос|асқ|қар|дық|нан|мыс|мны|амн|ы м|айд|ке | же|зін|рде|рін|е т|ген|ып |ры |ті |сын|қам|ден|і б|гіз|рал|е ө|лан|сы |ама|тта|тық|бер|ді |біл|ркі|өз |зде|кет|қор|дай|уге|ы е|ынд|нег|оны|ей |мет|аны|а т|жас|ауы|лге|аса|еге|дар|ру |ау |ерк|ы ж|рыл| то|н н|е н|тін|ір |сіз|тер|лма|і т|кім| ал|р м|лік| мү|е м|түр| тү|кел|лып|ең |тең|рлы|лім|рды|ард|атт|с б|ыры|сыз|ыс |елг|дал|йда|орғ|рқы|арқ| жү|тал|ылм|а б|ігі|лде|із |қты| еш|дей|ай |жағ|кті|ікт|гін| әл|тты|ұлт| ұл|е д|ыны|лін|р б|еле|кұқ| кұ|амд|м б| ет|оға|құр| кө|аға|тол|шін|айы| қы|қал|жек|і н|ес |ағы|е о|елі| ел|н е|зі |шкі|ешк|олу|ция|мас|ғда|ағд|лтт|імд|ным| да|а д|әсі|с ә|қат|ірі| со|ң б|аза|мда|айл| ас|ғам|қоғ"},Arabic:{arb:" ال|ية |في | في|الح| أو|أو | وا|وال|حق |ة ا|لحق|الت|كل |الم|لكل| لك|لى |ق ف|ته |و ا|ة و|شخص|ة ل|ات |الأ|ي أ|ون | شخ|م ا|أي | أي|ان |أن |مة |ي ا|الا|لا |ها |اء | أن| عل|خص |ن ا| لل|د ا|من |فرد|ما |الع|ت ا|حري|على|ل ف|رد |ل ش| لا|رية| إل|ة أ|ا ا|ن ي| ول|ا ل|ا ي| فر| من|ة م|الق|جتم|ن أ|ق ا|الإ| حر|له |ه ل|اية|لك |ه ا| دو|دة |اً |ين |ه و|لة |ي ح| عن|ماع|ي ت|ذا | حق|قوق|حقو|، و|ن ت|مع |ص ا|ام |د أ| كا|هذا|الو| إن|مل |امة|ع ا|إلى|ة ع|ماي|حما|ن و|لتع| وي|ير |نون|ي و|اسي|الج| هذ|نسا|وق |ترا|عية|ه أ| له|سية| يج| با|دول|انو|قان|لقا|ة ب|ة ت|تما|الد|يات|ع ب|سان|إنس|هم |علي| مت|لمج|ذلك|عمل|لأس|وز |جوز|يجو|بال|غير|ك ا|كان|ساس|أسا|دم |لاد|اعي|الر|تمي|دون|تمت|لتم| يع|ليه|ساو|اجت|ي م|لعا|لجم|تعل|ر و|تمع|مجت| مع|يه |ى أ|فيه|ى ا| كل|لات|ملا|ود |انت|الف|يها|ي إ|تي |الب|لي |قدم|ال |اد |ل ا|يز |ييز|ميي| تم|لحر|تع |متع|ا ب|عام|ا و|ق و|رام|ل ل|لاج|را |الش| وإ|يم |ليم|شتر|ا ح|واج|لزو|ول |ا ف|ولة|لحم|أسر| ذل|ه ف|اته|مسا|لمس| تع|عن |ه ع|وله|يته|ن ل|رة | وس|اة |يد | تح| مس|ي ي|لتي|عة |ولي|لدو| أس| وف|ل و|أية|ني |الس|لان|لإع|ة ف|ريا|ل إ|م ب|امل|كرا|تسا|ميع|جمي| جم|أول|بية|عيش|تحق|ادة|س ا| مم|معي|جما|عات|اعا|ارس|مار|مما|م و|راك|اشت|الط|اج |زوا|الز| وم|حدة|تحد|لمت|مم |لأم|ده |بلا| بل|ار |يار|تيا|ختي|اخت|ن م| مر",urd:"ور | او|اور|کے | کے| کی| کا|یں | حق|کی |کا | کو|ئے |ے ک|یا |سے |کو |شخص| شخ|نے | اس| ہے|میں|حق | ہو| می|خص |ے ا| جا|اس | سے| یا|ہر |ی ا| کر| ہر|ے۔ |سی |ہیں|ا ح|ص ک|وں |ے م| ان|ر ش|۔ ہ|ائے|زاد|آزا| آز|ام |ر ا|ق ہ|ادی|جائ|ں ک|ہے۔|م ک| کس|ا ج|ی ک|س ک|کسی| پر|ے گ|ہے |ار |ت ک|دی |پر |و ا| حا| جو| ہی|ان |ی ج|ری | نہ| مع|جو |ل ک|ی ت|ن ک|کرن|ئی |ل ہ|تی |ہو |ہ ا| ای|صل |اصل|حاص|رنے|ی ش|نہ |۔ ا|ں۔ |یں۔|ر ک|ر م| مل|وہ |معا|رے |ں ا|نہی|ے ہ|ے ب|ایس|ے ل| تع| گا|یت |ی ح|ا ا|ی م|اپن| اپ|کیا|می |ی س| جس|ہ ک|نی |اشر|عاش| دو|لئے| لئ|انہ|وق |قوق|حقو|مل | قا|کہ | گی|ر ب|ہ م| وہ| بن|ی ب|ملک|جس |ا۔ |ریق|ر ن|ے ج|اد |ات |گی |د ک|ے ح|دار|ر ہ|گا۔|قوم| قو|ے، |ا س|دوس|ر پ| و | شا|ی آ|ں م|ق ح| پو| با|خلا|انے|یم |لیم|و ت|ون | کہ|ی، |۔ ک|ا پ|ن ا|لک |علا|ا م|ق ک|ائی|وسر|ی ہ|وئی|یر |ا ہ|علی|و گ|وری|دگی|ندگ|و ک|یسے| من|ائد|رائ| مر|پور| طر|ومی|ے خ|سب |نون|انو|قان| سک|وام|ین | رک|تعل|لاق|غیر|دان|، ا| بی| مس|یوں|نا | بھ| بر|رتی|ادا|امل|یہ | یہ|ہ و| عا|ی پ| بچ|اف |لاف| خل|ی۔ |گی۔| دی|ھی |بھی|دہ |جا |پنی|قوا|اقو|رکھ|ے ی| عل|کوئ|، م| چا|ے س|ر ع| پی|برا|ر س|ر ح|سان|م ا|کام|شرت| را|شام|من |زند| زن|ب ک|ت م|اہ |اری|س م|ر ج| مح|ورا|ے پ|طری|ہوں|ال |ں س|ی ن|کرے| مق|ت س|تحف| تح|و۔ |ہو۔|بند| اق|د ہ| ام|امی|الا|لت |شرے|ے ع|ا ک|فری",pes:" و | حق| با|ند |رد |دار| دا|که |هر | در| که|در | هر|ر ک|حق |د ه|از |یت | از|یا |کس |ود |ارد| یا| کس|ای |د و| بر| خو|ق د|باش|شد |د ک|ار |د ب| را|ه ب|ان |آزا| آز|را |اشد|ی و|ه ا|ین |ید |زاد|س ح|خود|ی ب| اس|ده |دی |ور |اید|ه د|ری |و ا|تما|ات | نم|ی ک|ادی|نه |رای|د ا| آن|است|ر ا|ر م| اج|مای|ون |قوق|حقو|و م| ان|انه| هم|وق |ایت| شو|ی ا| مو| بی|با | تا|ورد|انو|ست |وان|برا|ام |شود|آن |جتم|ی ی| کن|ر ب|کند| مر|ت م|های|ت ا| مس|ی، |ماع|اجت|توا|یگر|و ب|دان|ت و|ا م| بد|عی |کار| من|مور| مق|ی د| زن|ی م|ن ب|ر خ|اه |ا ب|اری|د آ|مل | به|اعی|د، |دیگ|ت ب|بای|این| می|ن و|ق م| عم| کا|ن ا|و آ| حم|نون|ه و|و د|د ش| ای|شور|کشو| کش|لی |نی |ه م|بعی|ر ش|یه | مل|میت|ی ر|رند| شر|می |وی |ساو|قان| قا|مقا|او | او|د م|گی |نمی| اح| مح|مین|ئی |ادا| آم|خوا|گرد| گر|مند| شد|ائی| دی|ز ح|هیچ| هی|اده| مت|نما|ت ک|ران| بم|ن ح|ر ت|حما|ارن|مسا|دگی|ومی|ن ت|ملل|بر |هد |واه|بهر| اع|ها|ق و|، ا|عیت|یتو|ا ر|ن م| عق|همه|ا ه|زش |وزش|موز|آمو|انت|تی |جام|موم|عمو|تخا| فر|طور|د د|ه ح|ردا|اوی|نوا|انی|رار| مج|ی ن|حدی|احد|ندگ|زند|شخص| شخ|من|هم|ره|هره|شده|ع ا|و ه|اسی|هٔ |یده|عقی|ا ا|مه | بش|اد |دیه|ا د|دوا|ی ح|ابع|ی ت|خاب|نتخ|رور|و ر|شرا| خا|ٔمی|أم|تأ|اً |امل|له |د ر|اسا|خور|بل |ابل|قاب|یک |سان|قرا|ا ن|خصی| ام| بو|یر |الم|بین|اهد|تبع| تب",zlm:" دا|ان |دان| بر| او|ن س|رڠ |دال| ڤر|له |كن | كڤ|ن ا|ن ك|ن د|يڠ | يڠ|ڤد |حق |ورڠ|تيا|ياڤ|ارا|كڤد|اور|رحق|برح|اله|أن |ولي| ات|اتا|ڠن |تاو|اڤ |ستي|ليه|او | ست|ڤ ا|يه |را |ه ب|ه د|عدا| عد|ن ڤ|ن ب|ين | تر|ق ك|ن ي|يبس|بيب| تي| سو| كب| سا|ن م|ن ت|لم |الم|د س|ڠ ع| من|چار|د ڤ|رن |سام| ما|ڽ س|ن، | بو| اي|ندق| حق|ڬار|نڬا|بول|سبا| سب|اتو|ا س|قله| ڤم| مم|وان|سچا| سچ| كس|ا ب|سن | سم|ڤرل|اون|نڽ |تن | با|هن |سيا|ا ڤ|ارڠ|بار|ڤا |بسن|كبي|ام |يند|ي د|اڬي|ڠ ب|باڬ|ي ا|مان| لا| د |دقل|هند| هن|ت د|ادي|وين|يكن| نڬ|، ك|ن٢ | ڤو|بڠس|ق٢ |ات |اول|اكن|اڽ | سس|ون |اد | كو|اين|دڠن| دڠ|ائن|تو |تي |ن ه|ڬي |سي |ق م|وڠن|دوڠ|ندو|لين|رلي|نتو|ڤون|وات|ياد|تيك|ڠسا|ڤمب|ترم|٢ د|حق٢|وا |لوا|ماس|وق |ه م|ل د| مل|وند| ڤڠ|ا، |، ت|لائ|اي |مڤو|يك |ي ك|رات|مرا| بي|سمو|و ك|، د|سوا|ڠ م|ڠ س|ڠ٢ |ڤري|يري|دير|ا ا|اسا|ڤ٢ |تا |سوس|، س|جوا|ڠ ت|رأن| ان|سأن|ريك|يأن|ري | در|امر|كرج| ڤل|ا د|جرن|اجر|ارك|لاج|د ك|وار|برس|ونت|منو|سال|ينڠ|دڠ٢|ندڠ| مڠ|اڤا|سسي|ساس|نن |ڤول|اڬا| بڠ| سڤ|مبي| اڤ|ڠ ا|ارأ|ڤرا|ي س|بس | دل|ا م|موا|ڤلا|ملا|ڤرك|كور|وبو| كأ|وكن|أنڽ|كسا|ڠڬو|ادڤ|هاد|رها|تره|كوم|توق|م س|ڠ د|دي | دي|٢ س|ندي|اس |ادا|بوا| دب|ڠ ڤ|ڽ، |اڤ٢|رتا|ال |يال|وسي| كت|أن،|نڤا|تنڤ| تن|م ڤ|رسا|ممڤ| مر|ن ح| كم|نسي|جأن|ؤي |لؤي|الؤ|لال|كڤر|كت |ركت|شار|مشا| مش|جاد|رڬا",skr:"تے |اں |دی |دے | ۔ |وں | تے| دا| کو|کوں| حق|دا | دی|یاں| دے|یں |ے ا|شخص| شخ|ہر |ے ۔|اصل| حا|حق |خص | ہر|صل |حاص|ہے | ہے|ال |ق ح|ل ہ| نا| کی| وچ|۔ ہ|یا |سی |ے م| او|وچ |اتے|کیت|ا ح|ادی|نال|ص ک| ات|ر ش|ہیں| یا|ں د| ای|یسی| مل|وند|کہی| کہ|ی ت|زاد|ازا| از|ندے|ں ک|ار | وی|ے ک|ئے | ان|ڻ د|نہ | کر|اون|ے و|دیا|ی د|ں ا|ے ب|ویس|وڻ |ی ن| ہو|تی |ی ۔| نہ|ی ا|یند|و ڄ|آپڻ| آپ|ا و|ے ج| کن|ے ن|ندی|ت د|ے ح|ی ک|ئی |ملک|یتے|ن ۔|تھی| تھ|ون |ں م| بچ|۔ ا|نوں|کنو|ڻے |اری|ا ا|ے ہ|ل ت| ڄئ|وق |قوق|حقو|ل ک|خلا| جی|لک |دار|یت |کرڻ|انہ|کو |ہکو| ہک|ن ا|مل | وس|ں و|پڻے| تع|ی م|اف |ے خ|نون|قنو| قن| لو|۔ ک|ری |لے |تا |یتا| قو| چا|ہاں|ڄئے|ق ت|ایہ|رڻ |ے د|ر ک| و |لاف| خل| جو|ی و|او |ہو |ئو |چئو|بچئ|یر |ہوو|ا م|ی ج|الا|ین | جا|می |نہا|ان |ات |سڱد| سڱ|یب |سیب|وسی| شا|ب د|یوڻ|ام |اوڻ|ے ت|ڻ ک| مط|ں ت| ون| کم|ن د|رکھ| رک|ڻی |ں آ|ریا|ی ہ|اد |یاد|علا|ر ہ|ں س|ی ح|جھی|ائد|ہی |لوک| ڋو| سم| سا| من| مع|بق |ابق|طاب|مطا|ھیو|ں ف|ہن | ہن|جو |و ک|ں ش|ر ت|کار|م د|ھیا| ٻا|غیر|و ل|وئی|جیا|وام|قوا|ی س| جھ|ل ا|قوم| سی|ذہب|مذہ| مذ|اے | اے|دن |ا ت|سان|نسا|انس|رے |لیم|علی|تعل|امل|ہ د|ے ر|د ا|کم |یہو|فائ|چ ا| کھ|م ت|را |ورا|پور|ں ب|ق د|ے ق|وکو|کھی|ا ک|و د|ے ذ|پڻی|بند| فر|کوئ|امی|ی ی|ائی|لاق|ایں|ہ ا| نظ|سما|ومی|ی، |ے س|ت و|ھین|ے ع|یم |سہو| سہ",pbu:" د | او|او |په | په|ي۔ | حق|چې | چې|ره |ي ا|ې د| هر|نه |هر |حق | څو|وک |څوک|و ا|ه د|ه ا|۔ ه|ه و| شي| لر|ي چ|و د|ري |لري|ق ل| کښ|وي |ښې |کښې|ه ک|غه |لو |ر څ|سره| سر|ه پ| ټو|و پ|له |يت |ټول|يا |کړي| کو|خه |ي، |دي | له| از|د م| هي| وا| يا| څخ|ازا|د ا|ولو|ه ت|څخه| کړ|ول |هغه|ه ش|ي د| هغ|کول|زاد|نو | وي|و ي|ه ب|شي۔|دې |يو | دي|ته |خپل| پر|اد |د د|ک ح| تو|ه م|ګه |ه ه|قوق|حقو|و م|ه ح|د ه| تر| مس|شي | نه|ړي۔|ني |د پ|واد|ې پ|ادي|ولن| يو|د ت|ونو|وګه|ي و|لي | دا|يد | با|تون| خپ|ي پ|توګ|ار |اند|يوا|ې و|دان| بر|ړي | عم|انه| ده|يڅ |هيڅ|امي|لني|بعي|ډول| ډو|ه ل|ايد|باي|اتو|ه ګ| تا|پل | مل|ايت|وم |ون | لا|هيو| شو| دغ|م د|ده |ې ا|ان | ته|کار|تو |مي |اره|اوي|ساو|مسا|نون|دهغ|و ت|ي ش|انو| مح|ين |اخل| ګټ|شوي|دغه|و ح|وي،|نيز|سي |اسي|وند|قو |وقو|و ک|ونه|ومي| وک|ي ت| ان|قان|ندې|و ر|ک د|ه ي|مين|پر |ټه |لام|غو |هغو|د ټ|و ه|ل ت|لے |ولے|وون|کي |رو |ن ک|موم|وکړ|پار|ن ش|من | نو| وړ| قا|ې چ| وس|څ څ|شخص| شخ|ژون| ژو|تر |ګټه|و څ|هم |عقي|رته| ور|بل | بل|و ب|ه س|ښوو| ښو| کا|ې ک|و س|اده|ونک| غو|دو |و ن|ت ک|مل |عمو|ل ه| پي|وسي|ړان|وړا|يز |خصي|ي م|ا ب|ادا|ه ن|خلي|واخ|ديو|، د|د ق| هم|ا د| بي|تبع| تب|ه چ| عق|پلو|و ل| را|د ب|راي| دخ|نې |نکي|ت د|ابع| مق|د خ|وره|شرا| شر|ر م|رسر|تام|ه ټ| من|طه |سطه|اسط|واس|لې | اس|۔ د|برخ|ې ن"},Devanagari:{hin:"के |प्र| प्| का| के| । |और | और|का | को|कार|ार |ति |या |को |ने |ों |िका|्रत| है| कि|ं क|है |धिक|व्य|अधि| अध|्ति| सम|्यक|ि क|क्त|ा अ|की |ा क| व्|ें | हो|यक्|सी |से |े क| या| की|में|न्त| मे|त्य|ै ।|ता |रत्|क्ष|ेक |येक|्ये|िक |र ह|भी |किस| जा| स्|क व|ा ज|िसी|मान| वि|र स|त्र|ी स|। प| कर|्रा|गा |ित | अप| पर|स्व|ी क| से|ा स|्य | अन|्त्|िया|ा ह| सा|ना |्त |प्त|समा|ान |र क|ाप्|तन्| भी| उस|राप|वतन|्वत|रों|वार|े स|था |हो |े अ|ा ।|न क| न |देश| रा|षा |अन्|त ह|्षा|्वा|जाए|ी प|करन|ा प|अपन|ष्ट| सं|े व|होग|िवा|ट्र|्ट्|ाष्|राष|सके| मा|ओं |ाओं|री |क स|े प| नि|ीय |रक्|ो स|ाएग|रने| इस|व क|पर |रता|र अ| सभ|तथा| तथ| ऐस|रा |पने|्री|िक्|किय|ा व|माज|ं औ|र उ|द्ध|सभी|श्य| जि|ाने|ार्|ारा|द्व| द्|एगा|सम्|ेश |िए |ाव |र प| दे|्तर|ा औ|ारो|यों|परा|पूर|चित|्ध |रूप| रू| सु| लि|त क|ो प|ं स|े ल|शिक| शि|वाह|े औ|जो |राध|जिस|ूर्|ी भ|ूप |ोगा|स्थ|रीय|तिक|्र |। इ|इस | उन|ले |े म|लिए|म क|कता|े य| जो|न म|अपर| पू|ो क|ा उ|ाह |नून|ानू|गी |दी |ारी|ं म|। क|तर्|ी र|श क|परि|स्त|ोई |कोई|र्य|ी अ|हित|भाव| भा|ताओ|ास |साम|विक|विव|म्म| सक|कर |ाना|ध क|निक|य क|उसक|कृत| क़ा|न स|जीव|्या|रका|्रक|ाज |न्य|्म |र्ण|क़ ह|हक़ | हक़|ी म|जिक|ाजि|ामा|क औ|मिल|ेने|लेन| ले|ये |ो अ|े ज|रिव|मय |समय|वश्|आवश| आव|ऐसी|ाध |र द|र्व|सार|प स|बन्| सह|िधा|विध|ी न|ून |क़ान",mar:"्या|या |त्य|याच|चा |ण्य|ाचा| व |कार|प्र| प्|िका|धिक|ार | अध|अधि|च्य|आहे| आह|ा अ|हे |ा क|ास |वा |्ये|्रत| स्|ता |ा स| अस| कर|स्व| का|ल्य|रत्|ाहि|कोण| को|िक |येक|्वा|ा व| त्|र आ|्य |त्र|ेका|क्ष|ा न| सं|ामा|ाच्|ंवा|िंव|किं| कि|ात |ष्ट|कास| या|यां|ांच|र्य|मिळ| मि| सा|व्य|ोणत|ने |े प|काम| सम|ंत्|ये | रा|समा|तंत|करण|ा आ|े क|हि |े स|ना |िळण|ून |ा प|ट्र|्ट्|ाष्|राष|ीय |व स|क्त|मान|र्व| आप|ळण्|्र्|ातं|वात|चे | वि|्षण|रण्| दे| व्|आपल|ही |ार्|नये| नय|मा |यास| जा|लेल| नि|े अ| पा|ा म|ले |ाही|बंध|े व|्यक| मा|शिक| शि|देश|ा द|माज|्री|ली |ान |ांन|पल्| हो|ा ह|षण |जे |िजे|हिज|पाह|ारा|यात|सर्| सर|रां|असल|ंबं|संब|िक्|ी प|ंच्|रक्|णत्| आण|ला |स्थ|रीय|ीत |ंना|त व|्व |क व|णे |ाचे|न क|त क|रता|्रा|याह|्त |ची |य क|द्ध|्वत|यक्|णि |आणि|स स|ंधा|क स|च्छ|य अ|त स|ीने|ोणा|करत|त्व|ील |ी अ|सार|र व|भाव|व त|थवा|अथव| अथ|े त|े ज|याय|ंचा|ेल्|ाने|ेण्|क आ|क्क|हक्| हक|ण म|ंरक|संर|न्य|ायद|ा त|त आ| उप|वस्|िवा|ेशा|साम|े य|े आ|ी व|व म|तीन|व आ|ध्य| अश|धात|कृत|्क |द्य|ित |सले|ेश |तो |ेल |ती |्ती|असे|इतर| इत|स्त|र्ण|ा ब|ेले| के|हीर|जाह|ा ज|ेत |ूर्|पूर|ेच | वा|ाजा|ी स|शा |य व| न्|याव|द्द|्ध |रून|यद्|काय|ा श|गण्|क क|राध| शा|यत्|ल अ|्यव|ी क|ाव |ा य|त्त|जिक|ाजि|रणा| धर|ा ध|भेद| बा|रका|्रक|केल|ि व|िष्|तील|योग|साध|ांत|विव|श्र| धे| मु|वतः",mai:"ाक |प्र|कार| प्|ार |िका|्यक|धिक|क अ|्रत|्ति|व्य| अध|ेँ |अधि|िक | व्|आʼ | आʼ|क्त|यक्|तिक|केँ|क व|बाक|क स|छैक| छै|त्य|मे |ेक | सम|क्ष|हि |रत्|र छ|येक|्ये|न्त|वा |िके|क। |ैक।|। प| अप| स्| वि| जा|ित |सँ | हो|कोन| को|त्र|स्व| वा|क आ|ष्ट| कर|अपन|मान| का| अन|ति |्त्|नो |नहि| पर|ट्र|्य | एह|ि क|्ट्|ाष्|राष| रा|समा|ोनो|ल ज| नह|ताक|ार्|पन |तन्|वतन|्वत|्षा| कए| सा|्री| नि|ा आ|िवा| सं| दे|जाए|ीय |करब|था |एबा|ा प|ना |्वा|देश|त। |रक |क ह|ँ अ| सभ| आ |त क|चित|्त |वार|ता |ारक|माज|ा स|रीय|न्य|रता|ान |्रा|्या|रक्|ारण|परि|एल |कएल|अन्|रबा|क प|ओर |आओर| आओ|अछि| अछ|िर्|ान्|नक |होए|कर |धार|स्थ|ा अ|िमे|र आ|एहि| एक|े स|तथा| तथ| मा|िक्|शिक| शि|प्त|र्व|निर|च्छ|र्य|ँ स|क क|हो |ाहि|एत।|र प|ामा|साम|षा |ʼ स|ँ ए|ैक |द्ध|र अ|क ज|स्त|ाप्|ँ क| सक|यक |कान|हन |एहन|ेल |ोएत|त आ|ा व|। क|्तर|ाएत|्रक|हु |क उ|पूर|विव|ʼ अ|छि | ले|न प|ास |राप|धक |पएब| पए|रा |यता|रूप|न व| के|षाक|य प|त ह|जाह| ओ |भाव|पर |थवा|अथव| अथ|सम्|जिक|ाजि|ूर्|रति| दो|सभक|। स| जन|सभ |बाध|अनु|िसँ| सह|ँ व|ए स|रिव|तु |ेतु|हेत| हे|ाध |ेबा|न स|िष्|राध| अव|ित्|वास|चार| उच|ारा|न क|वक |ा क|नून|ानू|एत |री |ेओ |केओ|रण |्रस|ि द|ओ व| भे|नहु|ोनह|्थि|पत्|म्प|राज| भा|हिम| हक|ामे|्ण |र्ण|हार|ि स|क द|न अ|त अ|लेब| अभ|िश्|जक |ाजक|न आ|वाह|काज|श्य|वस्|ओहि| ओह|योग|। ए|कए |े ओ|अपर",bho:" के|के |े क|ार |कार|िका|धिक|अधि| अध|ओर |आओर| आओ|े अ|े स|ा क| सं|िक |र ह|ा स| हो|र स|ें |में| मे| कर| से|नो |क्ष|से | का|। स|खे |ा। |रा | सम| सब|्रा| सक|र क|न क|वे |ौनो|कौन| कौ|चाह| चा| बा|प्र| प्|था |ि क|ति | जा| सा|े आ|पन |करे|ता |होख|त क|े। |े ब|तथा| तथ| आप|केल|सके| स्|रे |सबह|कर |आपन|े ओ|जा | पर|ष्ट| रा|ना |हवे| हव|ला |ेला|बहि| ओक|ोखे|र ब|ह। | ह।|न स|ाष्|राष|्त | और|े च|। क|संग|र आ|ट्र|्ट्|षा |मान|ा आ|ं क|ा प|्षा|रक्|हे |ाहे|ाति|ावे| जे|ही |ओकर|मिल|ित |ो स|ल ज|इखे|नइख| नइ|त्र|माज| बि|वे।|े ज|क स|िं |हिं|करा|और |े म|समा|हु | ओ |पर |े न|स्थ|रीय|्री|ला।|ाज |ान |कान|े त|िर |तिर|खात| खा|े उ|नून|ानू|ाम | सु| दे|ी क| मा|र म|प्त|िया|ाही|बा।|योग|ी स|ल ह|ून |व्य|ु क|ए क|े व|ंत्|स्व|केह|ीय |खल |साम|यता|तिक|े ह|ाप्|राप|र प|र अ| लो| सह|जे |ोग |म क|ले | नि|ेकर|ा ह|पूर|र न|ेहु|्य |या | या|देश|दी |ा म|ाव | दो|े द| पा|हि |िक्|शिक| शि|बा |िल | उप|्रत| वि| ही| ले|रो |े ख|ठन |गठन|ंगठ| मि|षण |्षण|ंरक|संर| आद| एक|ने | अप|तंत|वतं|्वत|्तर|्या|ेश |ादी|्ति|जिक|ाजि|क आ|्म |चार| उच| शा|री |ाह |याह|बिय|चित|क्त|पयो|उपय|रता|र व|न म|लोग|ह क|न प|काम| पू| इ |आदि|ईल | कई| व्|मी |ुरक|सुर| जी|धार|य स|तर्|भे |सभे| सभ|भाव|्थि|ामा|सर |र्म| को| बे|ोसर|दोस|ण क|ास |े प|जाद|आजा| आज|उचि|ग क|ारी| जर|गे |ज क|ी ब|सन |हो |ा त",npi:"को |ने | र |ार |क्त|कार|प्र| प्|्यक|व्य| गर|िका| व्|्रत|धिक|्ति|यक्|अधि| अध|ाई |मा |लाई|त्य|िक | । | सम|वा | वा|क व|्ने|र्न|गर्|न्त|छ ।|तिल|रत्|त्र|ेक |येक|्ये|िला|र स|ो स| स्|मान|क्ष| वि|हुन|ा स| हु| छ |र छ|्त्|समा|स्व|। प| सं|नेछ|ुने|हरु|तन्|वतन|े अ|िने|ो अ|्वत| का|े छ|गरि| रा|्र |ति |ाको| कु|ष्ट|ना |स्त|क स|ुनै|कुन|ट्र|ले | नि|ान |छैन| छै|्ट्|ाष्|राष|तिक|छ। |ार्|ता |ित |नै |ा अ| सा|ा व|रु | मा| अन|ा र|रता|र र|हरू|ेछ |ा प|रक्|्त | पर|था | ला|परि|देश|सको| यस|माज|ामा|्रा|िवा|ाहर|ो प|्य |वार|न स|। क|नि |्षा| त्|द्ध|र ह|तथा| तथ|यस्|्यस|री |र व|पनि|रिन|ंरक|संर|भाव|ै व|सबै| सब| शि| सह|ताक|े र|त र|लाग| सु|्षण|द्द| अप|ैन |ो व|िक्|ाव |धार|्या|्रि|ा भ|एको|र म|न अ|ो ल| उस|शिक|ात्|स्थ|वाह|ूर्|श्य|ित्|रको|ारक|ुद्|तो |्तो|ाउन|कान|िएक|ा न| पन|न। |ैन।|का |ेछ।| भे|र्य|सम्|त्प|साम|रिय|चार|निज|ुन |गि |ागि|उसक| मत| अभ|पूर|र त| सक|सार|राध|परा|अपर|ुक्|जको| उप|रा |ारा|्वा|विध|्न |ा त|न ग|णको| पा| दि|क र|र प|अन्|भेद|ारम|ो आ| अर|जिक|ाजि|िय |षा |ाट |बाट| बा|ि र| छ।|त्व|त स|रू |छ र|रका|विक|र उ|ोग |्दे|रिव|सकि|ै प|रति|अनु| आव|युक|ा ग|नमा|योग|ग ग|क अ|द्व|्ध |रुद| बि|। स|उने|ान्|ा म|िको|र्द|ारी|्तर|ो ह|हित| दे|रिक|ा क| आध|राज|र्म|्ण |र्ण|ि व|्यव|विच|बै |सहि|रोज|र्स|ई उ|्प |रात|निक|मिक|च्छ|्था|विव|कता|अभि|्धा",mag:" के|के |ार | हई|कार|ई। |हई।|िका|े अ|धिक|अधि| अध|र ह|े क|और | और|ा क|े स|सब | सब| कर|ें |था |में| मे|तथा| तथ|िक | हो| सम|क्ष|ना |ब क|र स| सं|ा स|कर | भी|। स| सा| से| का| अप|्रा|प्र| प्|से |भी | को|त क| पर|रा |क ह|पन |अपन| सक|या |ति |र क|ी क| या|करे| जा|रे | ओक|्त |सक |नो |ान |मान|ओकर|ा प|न क|ेल | ना|। क|रक्| स्|ही |होए| एक|पर |दी |ट्र|ता |व्य|हई | शा|े उ| दे|त्र|ादी| रा| ही|कान|ित |म क|ल ज|ाम |ी स|े भ|न स|माज|ष्ट|षा | ले|क स|बे |वे |ावे|मिल|र म|्य |ा ह|ला |प्त|नून|ानू|जा |ेकर|्षा|्रत|ंत्|र औ|ोई |कोई|्ट्|ाष्|राष| मा|रो | जे|करा|ोए |ाप्|राप|समा|ून |ो स|स्व|्ति|साम|ोनो|कोन| व्|र अ|्म | वि| सह|े म|क्त|योग|र व|काम|ल ह| नि|देश|पूर|वार| इ |ंरक|संर|ए क|र प| सु|तंत|वतं|्वत|ा म|व क|े व|ाथ |साथ| दो|होब| पा|ो क|े ब|ोग | उप|स्त|परि|न प|े त|्तर|लेल|े ओ|चाह| चा|य क|वा |ेश |य स|न ह|षण |ा ब|। त|एक |एल |ीय |केक|े ह|र आ|ि क|स्थ|जिक|ाजि|ामा|रीय|्री|तिक|ाति| बि|चार|े आ|ास | उच|ा त|यक्|्यक|िल |मय |समय|शाद|पयो|उपय|े ख|रिव| पू|े ल|े च|ौनो|कौन| कौ|ं क|संग|न द|ं स|ण प|्षण|र न|े न|ो भ|करो|ा औ|रता|ाव |भाव|क औ|र्म|ोसर|दोस|ण क|े प|न औ|ब ह|िक्|शिक| शि|ाबे|निय|चित|उचि|ित्|ग क|े। |त स|ी श|ं श|एकर|। ए|तन | ओ |री |्र |जे |क क| सी|सन |िवा| अन|ूरा| बच|ए। | बे|त ह| तक| मि|धार|थवा|अथव| अथ|िला|्वा|ि म| आद|ने |कएल| कए|्या"}},X0=2048,G0=10,Hg=300,Yo={}.hasOwnProperty;let Gr;const Xo={};for(Gr in Vs)if(Yo.call(Vs,Gr)){const n=Vs[Gr];let e;Xo[Gr]={};for(e in n)if(Yo.call(n,e)){const t=n[e].split("|"),r={};let i=t.length;for(;i--;)r[t[i]]=i;Xo[Gr][e]=r}}function Z0(n,e){return Q0(n,e)[0][0]}function Q0(n,e={}){const t=[...e.whitelist||[],...e.only||[]],r=[...e.blacklist||[],...e.ignore||[]],i=e.minLength!==null&&e.minLength!==void 0?e.minLength:G0;if(!n||n.length<i)return Xa();n=n.slice(0,X0);const o=tx(n,Y0);return!o[0]||!(o[0]in Xo)?!o[0]||o[1]===0||!Jg(o[0],t,r)?Xa():Vg(o[0]):ex(n,rx(J0(n),Xo[o[0]],t,r))}function ex(n,e){const t=e[0][1],r=n.length*Hg-t;let i=-1;for(;++i<e.length;)e[i][1]=1-(e[i][1]-t)/r||0;return e}function tx(n,e){let t=-1,r,i;for(i in e)if(Yo.call(e,i)){const o=nx(n,e[i]);o>t&&(t=o,r=i)}return[r,t]}function nx(n,e){const t=n.match(e);return(t?t.length:0)/n.length||0}function rx(n,e,t,r){e=ox(e,t,r);const i=[];let o;if(e)for(o in e)Yo.call(e,o)&&i.push([o,ix(n,e[o])]);return i.length===0?Xa():i.sort(sx)}function ix(n,e){let t=0,r=-1;for(;++r<n.length;){const i=n[r];let o=Hg;i[0]in e&&(o=i[1]-e[i[0]]-1,o<0&&(o=-o)),t+=o}return t}function ox(n,e,t){if(e.length===0&&t.length===0)return n;const r={};let i;for(i in n)Jg(i,e,t)&&(r[i]=n[i]);return r}function Jg(n,e,t){return e.length===0&&t.length===0?!0:(e.length===0||e.includes(n))&&!t.includes(n)}function Xa(){return Vg("und")}function Vg(n){return[[n,1]]}function sx(n,e){return n[1]-e[1]}const Nf=20,ax=(n,e)=>{const t=n.trim();if(t.length<Nf)return null;const r=new Map;for(const o of e){const s=Zg(o);s&&!r.has(s)&&r.set(s,o)}if(r.size<2)return null;const i=Z0(t,{only:[...r.keys()],minLength:Nf});return r.get(i)??null},lx=({languages:n,text:e,initialLanguage:t,debounceMs:r=400})=>{const i=n.join(","),o=z.useMemo(()=>i.split(",").filter(f=>f!==""),[i]),s=o[0]??"en",[a,l]=z.useState(()=>t?{language:t,source:"manual"}:{language:s,source:"account"}),u=a.source==="manual";z.useEffect(()=>{if(u)return;const f=setTimeout(()=>{const d=ax(e,o),h=d??s,g=d?"detected":"account";l(m=>m.source==="manual"||m.language===h&&m.source===g?m:{language:h,source:g})},r);return()=>clearTimeout(f)},[u,e,o,s,r]);const c=z.useCallback(f=>{l({language:f,source:"manual"})},[]);return{...a,choose:c}},ux={toPlain:n=>n.text,toRich:n=>Gk(n)},Df=n=>new DOMParser().parseFromString(n,"text/html").body.textContent??"",$f=n=>({html:"",text:n,formatting:[]}),Ix=({mode:n,onModeChange:e,initialHtml:t,initialText:r,onChange:i,onSubmit:o,autoFocus:s=!1,onConversionError:a,conversions:l=ux,languages:u,initialLanguage:c,onLanguageChange:f})=>{const[d,h]=z.useState(t),[g,m]=z.useState(0),[p,y]=z.useState(r),[_,b]=z.useState(r),[k,S]=z.useState(!1),[C,w]=z.useState(!1),v=z.useRef({html:t,text:r,formatting:[]}),{language:T,choose:F}=lx({languages:u,text:_,initialLanguage:c});z.useEffect(()=>{f(T)},[T,f]);const E=X=>{v.current=X,b(X.text),i(X)},O=X=>{y(X),b(X),i($f(X))},R=()=>{const X=v.current,Z=l.toPlain(X),I=ru("plain",Df(X.html),Z);if(I.outcome==="blocked"){a(I);return}y(Z),b(Z),w(!0),i($f(Z)),e("plain")},L=()=>{const X=l.toRich(p),Z=ru("rich",p,Df(X));if(Z.outcome==="blocked"){a(Z);return}h(X),m(I=>I+1),w(!0),e("rich")},J=()=>{if(n==="plain"){L();return}if(ep("plain",v.current.formatting)){S(!0);return}R()},te=M.jsxs(M.Fragment,{children:[M.jsx(ap,{language:T,languages:u,onSelect:F}),M.jsx(lp,{mode:n,onToggle:J})]});return M.jsxs(M.Fragment,{children:[n==="plain"?M.jsx(e0,{value:p,onChange:O,onSubmit:o,autoFocus:C,lang:T,trailing:te}):M.jsx(j0,{initialHtml:d,onChange:E,onSubmit:o,autoFocus:s||C,lang:T,trailing:te},g),M.jsx(tp,{isOpen:k,title:"Switch to plain text?",description:"Formatting becomes Markdown. Bold keeps its asterisks, a table becomes rows of pipes, and that text is what the recipient gets. No formatted version is sent alongside it.",confirmLabel:"Switch to plain text",onConfirm:()=>{S(!1),R()},onCancel:()=>S(!1)})]})};export{Ix as ComposeBody,ux as DEFAULT_COMPOSE_CONVERSIONS};
|