@remit/web-client-dist 0.0.481 → 0.0.483
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/BriefPane-D6mVesqu.js +1 -0
- package/assets/CalendarShell-CbesY9P5.js +1 -0
- package/assets/EmptyState-DYWkEoYy.js +1 -0
- package/assets/{ErrorState-CBV6FtSJ.js → ErrorState-CQA1uNfQ.js} +1 -1
- package/assets/FlaggedPane-DoeXJfm_.js +1 -0
- package/assets/FullCompose-DdXnvGhK.js +1 -0
- package/assets/MailListHeader-Dv4RRNrm.js +7 -0
- package/assets/MailNav-v3LcAYtx.js +1 -0
- package/assets/MailShell-CqyZkGBA.js +1 -0
- package/assets/{MailViewChrome-CNywrIYr.js → MailViewChrome-BrAblQ-h.js} +1 -1
- package/assets/MailboxPane-B1OopvI6.js +1 -0
- package/assets/{NavMenuButton-meKsCAv8.js → NavMenuButton-DsipgLLk.js} +1 -1
- package/assets/OnboardingWizard-LMPbQ6jT.js +1 -0
- package/assets/OpenCalendarEvent-jziTx8_b.js +1 -0
- package/assets/OutboxPane-C5Ns55rS.js +1 -0
- package/assets/_calendarObjectId-BwZvTd4q.js +1 -0
- package/assets/_mailboxId-r4aTgexi.js +1 -0
- package/assets/_messageId-B1vH4rgJ.js +1 -0
- package/assets/_messageId-BtEEXwAi.js +1 -0
- package/assets/_messageId-Df_PxEto.js +1 -0
- package/assets/_outboxMessageId-CxMGfZJP.js +1 -0
- package/assets/_recurrenceId-C2heuIxv.js +1 -0
- package/assets/_threadId-BCSAHVdO.js +1 -0
- package/assets/_threadId-qoVrigtw.js +1 -0
- package/assets/_threadId-vleFQxLm.js +1 -0
- package/assets/_view._date-kUsauS8B.js +1 -0
- package/assets/accounts-Dzj3yoGR.js +1 -0
- package/assets/advanced-DUCDPZSq.js +4 -0
- package/assets/appearance-BOPQSuz4.js +1 -0
- package/assets/{attachment-file-B4nazean.js → attachment-file-DClGI76U.js} +1 -1
- package/assets/{avatar-lcZ4TVQd.js → avatar-wLH6-Ayd.js} +1 -1
- package/assets/{bottom-sheet-D-zZ-Ztc.js → bottom-sheet-D6dXigqc.js} +1 -1
- package/assets/{brief-Cn1i1Vih.js → brief-BVNqThW-.js} +1 -1
- package/assets/brief-DZPDGIPc.js +1 -0
- package/assets/{browser-ponyfill-DYQZeblA.js → browser-ponyfill-CH8d2KQ8.js} +2 -2
- package/assets/{bug-DQdIiRjm.js → bug-C9mbESSL.js} +1 -1
- package/assets/calendar-ZcQGYvWc.js +1 -0
- package/assets/calendar-_byPswbZ.js +1 -0
- package/assets/calendar-days-GutYioyG.js +1 -0
- package/assets/card-D55_7IJj.js +1 -0
- package/assets/chevron-left-KNAXuraL.js +1 -0
- package/assets/{circle-check-big-CyS5sZb6.js → circle-check-big-B1p6oh-i.js} +1 -1
- package/assets/circle-check-o0AqGZ-u.js +1 -0
- package/assets/{circle-help-DbSK9hyF.js → circle-help-DtvJPapE.js} +1 -1
- package/assets/clock-Z-oAijsz.js +1 -0
- package/assets/compose._-_outboxMessageId_-5aWrcne1.js +1 -0
- package/assets/compose._-_outboxMessageId_-Bi_nmcO4.js +1 -0
- package/assets/compose._-_outboxMessageId_-D3DAlT64.js +1 -0
- package/assets/compose._-_outboxMessageId_-PDfNjd_n.js +1 -0
- package/assets/config-import-CMt0F7iy.js +1 -0
- package/assets/{confirm-dialog-BeWZSgTL.js → confirm-dialog-XKVleo_p.js} +1 -1
- package/assets/credential-steps-Bhbo8-zA.js +1 -0
- package/assets/download-BzIqNtrq.js +1 -0
- package/assets/filters-Cp8CCnd5.js +1 -0
- package/assets/{flagged-D4rwWprf.js → flagged-CLgTXep4.js} +1 -1
- package/assets/flagged-D-ptU5v2.js +1 -0
- package/assets/folders-BiY-9lME.js +1 -0
- package/assets/{format-Dquh5i8-.js → format-CCaI2KqP.js} +1 -1
- package/assets/{help-copy-DryiNLYs.js → help-copy-DawC2xSA.js} +1 -1
- package/assets/import-CJAbCD1j.js +1 -0
- package/assets/index-BDh85s_o.js +1 -0
- package/assets/index-BluhX7J5.js +1 -0
- package/assets/index-BqjhYbTK.js +1 -0
- package/assets/index-BtEEXwAi.js +1 -0
- package/assets/index-CJDhCMZY.js +1 -0
- package/assets/index-CeziyGm_.js +1 -0
- package/assets/index-CxA7LBuE.js +1 -0
- package/assets/index-D8-XdCBI.js +1 -0
- package/assets/{index-DNl2PEHq.css → index-DYO-sbPN.css} +1 -1
- package/assets/index-Df_PxEto.js +1 -0
- package/assets/index-lqmSDAG_.js +1 -0
- package/assets/{index-BMM2gkfY.js → index-lxVTsHBH.js} +65 -65
- package/assets/{index-znJrox9Y.js → index-y3enq74c.js} +12 -12
- package/assets/kbd-Ds8JAL-i.js +1 -0
- package/assets/labels-CwARLqAD.js +1 -0
- package/assets/mail-Bux3edOt.js +1 -0
- package/assets/mail-CSpgLNSC.js +1 -0
- package/assets/menu-D6aq1T1f.js +1 -0
- package/assets/minus-DW1FraKg.js +1 -0
- package/assets/new-DwJ7NLZR.js +1 -0
- package/assets/onboarding-0lqsEEMH.js +1 -0
- package/assets/onboarding-completion-WuK4B8wi.js +1 -0
- package/assets/outbox-4__1O2vy.js +1 -0
- package/assets/{pencil-BJbvhQrw.js → pencil-DJPntSjN.js} +1 -1
- package/assets/{rich-text-Dyp4iBOD.js → rich-text-Ticmqq6R.js} +15 -15
- package/assets/{rich-text-spellcheck-worker-provider-VN94aKh3.js → rich-text-spellcheck-worker-provider-CEjXNkTo.js} +1 -1
- package/assets/rotate-ccw-Snzk6-SP.js +1 -0
- package/assets/row-actions-BY8sJ70m.js +1 -0
- package/assets/search-mirror-CgMxavNa.js +1 -0
- package/assets/{search-scope-DTcpOp3S.js → search-scope-B5-OK3Cq.js} +1 -1
- package/assets/search-token-index-D1mRODfF.js +1 -0
- package/assets/sections-BaNfgGs8.js +1 -0
- package/assets/senders-DtfLvp-S.js +1 -0
- package/assets/settings-JoaCyeEy.js +1 -0
- package/assets/settings-screen-D5PdsyBl.js +1 -0
- package/assets/shield-check-Bvnu7s8U.js +1 -0
- package/assets/{suggested-vips-CmHb5WaT.js → suggested-vips-W8f9qNN8.js} +1 -1
- package/assets/useCalendarData-CBjm4DbE.js +1 -0
- package/assets/{useDebouncedValue-DlyzBdqd.js → useDebouncedValue-D4EGUdvx.js} +1 -1
- package/assets/useFilters-CW_hrFZo.js +1 -0
- package/assets/useLabels-Dlob_XK-.js +1 -0
- package/assets/useLayoutTier-Ciq4HlaK.js +1 -0
- package/assets/{useMessageBodyContent-DHYriZRr.js → useMessageBodyContent-CUM4C6Cq.js} +1 -1
- package/assets/useQueries-CPnZMt_1.js +1 -0
- package/assets/useRefreshControl-DiNXvxEh.js +1 -0
- package/assets/{useSearchTokenContext-Dpl3C3yN.js → useSearchTokenContext-mRvSGuNd.js} +4 -4
- package/assets/useSemanticSearch-DqVnsXbc.js +1 -0
- package/assets/useSignature-CrrwTrAx.js +1 -0
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/BriefPane-BH4C3dLA.js +0 -1
- package/assets/FlaggedPane-Bx8o8jcX.js +0 -1
- package/assets/FullCompose-DQRblSEf.js +0 -1
- package/assets/MailListHeader-BpL0hiB2.js +0 -7
- package/assets/MailShell-zSsU-lz6.js +0 -1
- package/assets/MailboxPane-CBUf4RMT.js +0 -1
- package/assets/OnboardingWizard-CVgzD3hy.js +0 -1
- package/assets/OutboxPane-BxAQvF2m.js +0 -1
- package/assets/_mailboxId-BjXkByox.js +0 -1
- package/assets/_messageId-C3Ex2aTK.js +0 -1
- package/assets/_messageId-C_uTJLZJ.js +0 -1
- package/assets/_messageId-Cq1MMY1y.js +0 -1
- package/assets/_outboxMessageId-yXv0wqF1.js +0 -1
- package/assets/_threadId-9F3WBJ7b.js +0 -1
- package/assets/_threadId-CHYDYhMA.js +0 -1
- package/assets/_threadId-DAypvq_q.js +0 -1
- package/assets/accounts-ywyLeeZ4.js +0 -1
- package/assets/advanced-BWphupC9.js +0 -4
- package/assets/appearance-DIb1edPD.js +0 -1
- package/assets/brief-QvkLl3Xq.js +0 -1
- package/assets/circle-check-wwq1h3jr.js +0 -1
- package/assets/clock-KiLfjGAs.js +0 -1
- package/assets/compose._-_outboxMessageId_-B0wVDNtg.js +0 -1
- package/assets/compose._-_outboxMessageId_-BgkhRDHR.js +0 -1
- package/assets/compose._-_outboxMessageId_-IlQ7bZjJ.js +0 -1
- package/assets/compose._-_outboxMessageId_-ckob2lG-.js +0 -1
- package/assets/download-CCD9VEcr.js +0 -1
- package/assets/filters-DQwnkuFu.js +0 -1
- package/assets/flagged-KEPxze7A.js +0 -1
- package/assets/folders-DSaMJ8g_.js +0 -1
- package/assets/index-B8kF4cHs.js +0 -1
- package/assets/index-BwO3HmU5.js +0 -1
- package/assets/index-C_uTJLZJ.js +0 -1
- package/assets/index-Cq1MMY1y.js +0 -1
- package/assets/index-D81-y_-k.js +0 -1
- package/assets/index-DMMbHmw7.js +0 -1
- package/assets/index-DhPAqRyZ.js +0 -1
- package/assets/index-kEVKBUOf.js +0 -1
- package/assets/kbd-B-P9r9YU.js +0 -1
- package/assets/labels-B09LuD3F.js +0 -1
- package/assets/mail-5WLfHo9K.js +0 -1
- package/assets/mail-CyEa53oG.js +0 -1
- package/assets/menu-Rr3_qIop.js +0 -1
- package/assets/onboarding-DD5frk6X.js +0 -1
- package/assets/outbox-DR0YZs6I.js +0 -1
- package/assets/rotate-ccw-CrVofVFV.js +0 -1
- package/assets/row-actions-Bgax_YZA.js +0 -1
- package/assets/search-mirror-Lf1ogSTC.js +0 -1
- package/assets/search-token-index-BxytxF1H.js +0 -1
- package/assets/senders-dS1BVDQU.js +0 -1
- package/assets/settings-Cs9rwA_N.js +0 -1
- package/assets/settings-screen-D0fhHptg.js +0 -1
- package/assets/shield-check-BktB9xgz.js +0 -1
- package/assets/useFilters-CJkmZ6i7.js +0 -1
- package/assets/useLabels-DL6gxLzs.js +0 -1
- package/assets/useQueries-B-aYaD8d.js +0 -1
- package/assets/useRefreshControl-DUEqZD7x.js +0 -1
- package/assets/useSemanticSearch-DCoRQGtD.js +0 -1
- package/assets/useSignature-D4_HRnT6.js +0 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{e as Jr,r as O,j as F,f as nf,e7 as ku,t as da,an as ho,e8 as Ap,e9 as Fp,B as zp,bG as xu,bJ as Op,bK as Mp,U as jp,E as Rp,ea as Pp,_ as Lp,L as Ip,eb as Bp}from"./index-lxVTsHBH.js";import{s as ml,c as Cu,a as Kp}from"./index-y3enq74c.js";import{C as Wp}from"./confirm-dialog-XKVleo_p.js";import{B as qp}from"./bottom-sheet-D6dXigqc.js";import{a as Up,b as Hp,c as js,f as vu,U as Jp}from"./attachment-file-DClGI76U.js";import{o as JC}from"./rich-text-spellcheck-provider-J8m9wz6A.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";const Vp=Jr("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 Yp=Jr("BookPlus",[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);const Xp=Jr("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 Gp=Jr("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 Qp=Jr("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 Zp=Jr("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"}]]),$C={html:"",text:"",formatting:[]},em={account:"the account default",detected:"detected from what you wrote",manual:"chosen for this message"},tm=({language:n,languages:e,source:t,onSelect:r,helpText:o})=>{const[i,s]=O.useState(!1),a=O.useRef(null),l=O.useRef(null),u=O.useRef(null),c=O.useId(),d=O.useCallback(g=>{s(!1),g&&l.current?.focus()},[]);O.useEffect(()=>{if(!i)return;const g=m=>{a.current?.contains(m.target)||s(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[i]),O.useEffect(()=>{if(!i)return;const g=u.current?.querySelector('[aria-checked="true"]'),m=u.current?.querySelector('[role="menuitemradio"]');(g??m)?.focus()},[i]);const f=g=>{if(g.key==="Escape"){g.preventDefault(),d(!0);return}const m=[...u.current?.querySelectorAll('[role="menuitemradio"]')??[]],p=m.indexOf(document.activeElement),y=Fp(g.key,p,m.length);y!==null&&(g.preventDefault(),m[y]?.focus())},h=g=>{r(g),d(!0)};return F.jsxs("div",{ref:a,className:"relative",children:[F.jsx(nf,{ref:l,variant:"ghost",size:"md","aria-label":`Message language: ${ho(n)}, ${em[t]}`,"aria-haspopup":"menu","aria-expanded":i,"aria-controls":i?c:void 0,onClick:()=>s(g=>!g),"data-testid":"compose-language-chip","data-language":n,"data-language-source":t,className:da("min-h-11 min-w-11 shrink-0 px-2 font-medium",n!==e[0]&&"bg-accent-2-soft text-accent-2"),children:ku(n)}),i&&F.jsxs("div",{ref:u,id:c,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(g=>F.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":g===n,lang:g,onClick:()=>h(g),className:da("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",g===n&&"bg-accent-2-soft"),children:[ho(g),F.jsx("span",{className:"shrink-0 text-xs text-fg-subtle",children:ku(g)})]},g)),F.jsx("p",{"data-testid":"compose-language-help",className:"border-t border-line px-4 pb-1 pt-2 text-xs text-fg-muted",children:o??Ap(navigator.userAgent)})]})]})},nm=({mode:n,onToggle:e})=>F.jsx(nf,{variant:"ghost",size:"md","aria-pressed":n==="plain",title:"Plain text",onClick:e,"data-testid":"compose-mode-toggle",className:da("min-h-11 shrink-0",n==="plain"&&"bg-accent-2-soft text-accent-2"),children:"Plain text"}),rm=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),rf=n=>{const e=n.activeElement;return e?.shadowRoot?rf(e.shadowRoot)??e:e},om=n=>{const e=n.tagName.toUpperCase();if(e==="IFRAME"||e==="FRAME"||e==="TEXTAREA"||e==="SELECT")return!0;if(e==="INPUT"){const r=(n.getAttribute("type")??"text").toLowerCase();return!rm.has(r)}const t=n.getAttribute("contenteditable");return t!==null&&t.toLowerCase()!=="false"?!0:n.isContentEditable===!0},of=n=>{const e=n?.ownerDocument??globalThis.document;if(!e)return!1;const t=rf(e);return!t||t===n||n?.contains(t)?!1:om(t)};function $(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 sf(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 et=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,im=et&&"documentMode"in document?document.documentMode:null,Ft=et&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Pt=et&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Fr=!(!et||!("InputEvent"in window)||im)&&"getTargetRanges"in new window.InputEvent("input"),En=et&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,af=et&&/Android/.test(navigator.userAgent),jo=et&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!af,lf=et&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Ei=et&&af&&lf,Ro=et&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Ft&&!lf,sm=0,am=1,lm=2,fa=1,ha=2,ga=4,pa=8,um=16,Rs=32,Ps=64,yl=128,cm=1,dm=2,fm=3,hm=4,gm=5,pm=6,ko=jo||En||Ro?" ":"",In=`
|
|
2
2
|
|
|
3
|
-
`,_l=Pt?" ":ko,hn={bold:1,capitalize:1024,code:16,highlight:yl,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},mm={directionless:1,unmergeable:2},Ti={center:2,end:6,justify:4,left:1,right:3,start:5},ym={[dm]:"center",[pm]:"end",[hm]:"justify",[cm]:"left",[fm]:"right",[gm]:"start"},_m={normal:0,segmented:2,token:1},bm={[sm]:"normal",[lm]:"segmented",[am]:"token"},Su="$config";function wu(){return we()._blockCursorElement}function km(n){return n!==null&&n.nodeType===1&&n.hasAttribute("data-lexical-slot")}let uf=class gi{element;before;after;constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new gi(this.element,e,this.after)}withAfter(e){return new gi(this.element,this.before,e)}withElement(e){return this.element===e?this:new gi(e,this.before,this.after)}insertChild(e){const t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&$(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&$(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&$(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 o=Eu(e,this.element);if(o===null)return"after";const i=Array.prototype.indexOf.call(e.childNodes,o);if(i<0)return"after";if(t===e)return r<=i?"before":"after";const s=Eu(e,t);if(s===null)return"after";const a=Array.prototype.indexOf.call(e.childNodes,s);return a>=0&&a<=i?"before":"after"}getInsertionAnchor(){return this.before}};function Eu(n,e){let t=e;for(;t!==null&&t.parentNode!==n;)t=t.parentNode;return t}let cf=class pi extends uf{withBefore(e){return new pi(this.element,e,this.after)}withAfter(e){return new pi(this.element,this.before,e)}withElement(e){return this.element===e?this:new pi(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;km(t);)e=t,t=t.nextSibling;const r=e?e.nextSibling:this.element.firstChild;return r!==null&&r===wu()?r:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(Ro||En||jo);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,o=this.before,i=ae().createElement("br");if(i.setAttribute("data-lexical-managed-linebreak","true"),r.insertBefore(i,o),e){const s=ae().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,i),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=i}getFirstChildOffset(){const e=this.getFirstChild(),t=this.getInsertionAnchor();let r=0;for(let o=this.element.firstChild;o!==null&&o!==e&&o!==t;o=o.nextSibling)r++;return r}resolveChildIndex(e,t,r,o){if(r===this.element){const l=this.getFirstChildOffset(),u=wu(),c=this.element.childNodes,d=Math.min(o,c.length);let f=0;for(let h=l;h<d;h++)c[h]!==u&&f++;return[e,Math.min(f,e.getChildrenSize())]}const i=Tu(t,r);i.push(o);const s=Tu(t,this.element);let a=e.getIndexWithinParent();for(let l=0;l<s.length;l++){const u=i[l],c=s[l];if(u===void 0||u<c)break;if(u>c){a+=1;break}}return[e.getParentOrThrow(),a]}};function Tu(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let o=0;for(let i=r.previousSibling;i!==null;i=i.previousSibling)o++;t.push(o)}return r!==n&&$(225),t.reverse()}let df;try{df="0.49.0+prod.esm"}catch{}const ff=df??'"<unknown>+source"';let eo=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 Mn=null;function hf(n,e=1e3){return n instanceof ma?n.clone():n.size<e?new Map(n):new ma().init(new Map(n),void 0,n.size)}let ma=class gf{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new gf().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===Mn?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,o]of this._nursery)o!==Mn?t.set(r,o):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 o=this.getNursery();return r!==Mn&&r!==void 0||(this._size++,r===Mn&&o.delete(e)),o.set(e,t),this}delete(e){const t=this.has(e);return t&&(this.getNursery().set(e,Mn),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 o=t(e);return this.set(e,o),o}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 o=r[0],i=e?e.get(o):void 0;i!==Mn&&(i!==void 0&&(r[1]=i),yield r)}if(e)for(const r of e)r[1]===Mn||t&&t.has(r[0])||(yield r)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(const[r,o]of this.entries())e(o,r,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function Ni(n,e,t,r,o,i){if(C(n)){let s=n.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===e&&((C(s)||dn(s)&&s.__slots!==null)&&Ni(s,a,t,r,o,i),t.has(a)||i.delete(a),o.push(a)),s=s.getNextSibling()}}for(const s of dn(n)&&n.__slots!==null?n.__slots.values():[]){const a=r.get(s);a!==void 0&&Yn(a)&&a.__slotHost===e&&((C(a)||dn(a)&&a.__slots!==null)&&Ni(a,s,t,r,o,i),t.has(s)||i.delete(s),o.push(s))}}let ya=!1,bl=0;function xm(n){bl=n.timeStamp}function Ls(n,e,t){const r=n.nodeName==="BR",o=e.__lexicalLineBreak;return o&&(n===o||r&&n.previousSibling===o)||r&&Xr(n,t)!==void 0}function Cm(n,e,t){const r=Pe(gt(t)),o=r&&ft(r,t._rootElement);let i=null,s=null;o!==null&&o.anchorNode===n&&(i=o.anchorOffset,s=o.focusOffset);const a=n.nodeValue;a!==null&&Ll(e,a,i,s,!1)}function vm(n,e,t){if(N(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return ht(e)&&t.isAttached()}function Sm(n,e,t){for(let r=n;r&&!Bh(r);r=or(r)){const o=Xr(r,e);if(o!==void 0){const i=te(o,t);if(i)return ne(i)||!q(r)?void 0:[r,i]}}}function pf(n,e,t){ya=!0;const r=performance.now()-bl>100;try{wt(n,()=>{const o=z()||(function(d){return d.read("latest",()=>{const f=z();return f!==null?f.clone():null})})(n),i=new Map,s=n._editorState,a=n._blockCursorElement;let l=!1,u="";for(let d=0;d<e.length;d++){const f=e[d],h=f.type,g=f.target,m=Sm(g,n,s);if(!m)continue;const[p,y]=m;if(h==="characterData")r&&D(y)&&ht(g)&&vm(o,g,y)&&Cm(g,y,n);else if(h==="childList"){l=!0;const _=f.addedNodes;for(let S=0;S<_.length;S++){const x=_[S],w=Eh(x),v=x.parentNode;if(!(v==null||x===a||w!==null||Ls(x,v,n)||n._slotsUsed&&q(x)&&x.hasAttribute("data-lexical-slot")||Bh(x))){if(Pt){const E=(q(x)?x.innerText:null)||x.nodeValue;E&&(u+=E)}v.removeChild(x)}}const b=f.removedNodes,k=b.length;if(k>0){let S=0;for(let x=0;x<k;x++){const w=b[x];(Ls(w,g,n)||a===w)&&(g.appendChild(w),S++)}k!==S&&i.set(p,y)}}}if(i.size>0)for(const[d,f]of i)f.reconcileObservedMutation(d,n);const c=t.takeRecords();if(c.length>0){for(let d=0;d<c.length;d++){const f=c[d],h=f.addedNodes,g=f.target;for(let m=0;m<h.length;m++){const p=h[m],y=p.parentNode;y==null||p.nodeName!=="BR"||Ls(p,g,n)||y.removeChild(p)}}t.takeRecords()}o!==null&&(l&&_e(o),Pt&&Fh(n)&&o.insertRawText(u))})}finally{ya=!1}}function mf(n){const e=n._observer;e!==null&&pf(n,e.takeRecords(),e)}function yf(n){(function(e){bl===0&>(e).addEventListener("textInput",xm,!0)})(n),n._observer=new MutationObserver((e,t)=>{pf(n,e,t)})}const Nu="latest";let wm=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Nm).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function Po(n,e){return new wm(n,e)}function Lo(n,e,t=Nu){const r=(t===Nu?n.getLatest():n).__state;return r?r.getValue(e):e.defaultValue}function Cr(n,e,t){let r;if(Ie(),typeof t=="function"){const i=n.getLatest(),s=Lo(i,e);if(r=t(s),e.isEqual(s,r))return i}else r=t;const o=n.getWritable();return bf(o).updateFromKnown(e,r),o}function Em(n){const e=new Map,t=new Set;for(const{ownNodeConfig:r}of Ul(typeof n=="function"?n:n.replace))if(r&&r.stateConfigs)for(const o of r.stateConfigs){let i;"stateConfig"in o?(i=o.stateConfig,o.flat&&t.add(i.key)):i=o,e.set(i.key,i)}return{flatKeys:t,sharedConfigMap:e}}const Du=new Set(["__proto__","constructor","prototype"]);let Tm=class _f{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,r=void 0,o=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=o;const{sharedConfigMap:s}=this.sharedNodeState,a=i!==void 0?i:(function(l,u,c){let d=c.size;if(u)for(const f in u){const h=l.get(f);h&&c.has(h)||d++}return d})(s,r,o);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 o=this.unknownState[e.key];o!==void 0&&(r=e.parse(o)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,o]of this.knownState)r.isEqual(o,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(o);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return $u(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,o=new Map(this.knownState);return new _f(e,t,(function(i,s,a){let l;if(a)for(const[u,c]of Object.entries(a)){if(Du.has(u))continue;const d=i.get(u);d?s.has(d)||s.set(d,d.parse(c)):(l=l||{},l[u]=c)}return l})(t.sharedConfigMap,o,r),o,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:o,unknownState:i}=this;o.has(e)||i&&r in i||(i&&(delete i[r],this.unknownState=$u(i)),this.size++),o.set(e,t)}updateFromUnknown(e,t){if(Du.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,o]of Object.entries(e))this.updateFromUnknown(r,o)}};function bf(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new Tm(e,kf(e));return e.__state=t,t}function kf(n){return n.__state?n.__state.sharedNodeState:vh(we(),n.getType()).sharedNodeState}function $u(n){if(n)for(const e in n)return n}function Nm(n){return n}function Au(n,e,t){for(const[r,o]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const i=t?t.getValue(r):r.defaultValue;if(i!==o&&!r.isEqual(i,o))return!0}return!1}function Fu(n,e,t){const{unknownState:r}=e,o=t?t.unknownState:void 0;if(r){for(const[i,s]of Object.entries(r))if(!n.has(i)&&(n.add(i),s!==(o?o[i]:void 0)))return!0}return!1}function zu(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function Ou(n,e){const t=n.__mode,r=n.__format,o=n.__style,i=e.__mode,s=e.__format,a=e.__style,l=n.__state,u=e.__state;return(t===null||t===i)&&(r===null||r===s)&&(o===null||o===a)&&(n.__state===null||l===u||(function(c,d){if(c===d)return!0;const f=new Set;return!(c&&Au(f,c,d)||d&&Au(f,d,c)||c&&Fu(f,c,d)||d&&Fu(f,d,c))})(l,u))}function Mu(n,e){const t=n.mergeWithSibling(e),r=he()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function ju(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&D(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Ou(e,r)){r=Mu(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&D(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Ou(r,t)){r=Mu(r,t);break}break}t.remove()}}else r.remove()}function Kt(n){return Ru(n.anchor),Ru(n.focus),n}function Ru(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,o;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),o=!0):(r=e.getChildAtIndex(t),o=!1),D(r)){n.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!C(r))break;n.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}const xo=Symbol.for("@lexical/CachedTextSize");function Pu(n,e){return ba.read(()=>{let t=0,r=n;for(let o=0;o<e&&r!==null;o++){const i=zt.get(r);if(i===void 0&&$(345,r),C(i)){const s=De.get(r);if(s!==void 0&&C(s)&&s.__parent!==i.__parent)t+=i.getTextContentSize();else{const a=qn.get(r),l=a&&a.__lexicalTextContent;typeof l!="string"&&$(346,i.getType()),t+=l.length}o<e-1&&!i.isInline()&&(t+=2)}else{const s=i[xo];s===void 0&&$(347,i.getType(),r),t+=s}r=i.__next}return t},{editor:de})}function xf(n){C(n)||n[xo]===void 0&&(n[xo]=D(n)?n.__text.length:n.getTextContentSize())}const Dm=4;let Co,de,vo,oe="",ze=null,Ye=null,qe=null;function Wt(){return{firstTextKey:qe,format:ze,style:Ye}}function Ct(n){n.firstTextKey!==null&&(ze=n.format,Ye=n.style,qe=n.firstTextKey)}function _a(n){if(qe!==null)return;const e=n.__lexicalFirstTextKey;if(e===void 0&&$(348),e===null)return;const t=De.get(e);D(t)&&(ze=t.getFormat(),Ye=t.getStyle(),qe=e)}let ls,go,po,zt,ba,De,qn,ka,So,Un,ln=!1,Di=!1;function xn(n,e){const t=zt.get(n),r=De.has(n);if(e!==null){const o=wa(n);o.parentNode===e&&e.removeChild(o)}if(!r){if(de._keyToDOMMap.delete(n),C(t)){const o=Vi(t,zt);xa(o,0,o.length-1,null)}if(t!==void 0){for(const o of pt(t).values()){const i=va(o);xn(o,null),i!==null&&i.remove()}Il(So,vo,ls,t,"destroyed")}}}function xa(n,e,t,r){for(let o=e;o<=t;++o){const i=n[o];i!==void 0&&xn(i,r)}}function jn(n,e){n.setProperty("text-align",e)}const $m="40px";function Cf(n,e){const t=Co.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, ${$m}))`)}function vf(n,e){const t=n.style;e===0?jn(t,""):e===1?jn(t,"left"):e===2?jn(t,"center"):e===3?jn(t,"right"):e===4?jn(t,"justify"):e===5?jn(t,"start"):e===6&&jn(t,"end")}function Ca(n,e){const t=(function(r){const o=r.__dir;if(o!==null)return o;if(Oe(r))return null;const i=r.getParent();return i===null||Se(i)&&i.__dir===null?"auto":null})(e);t!==null?n.dir=t:n.removeAttribute("dir")}function Sf(n){const e=ae().createElement("div");return e.setAttribute("data-lexical-slot",n),e.style.display="none",e}function wf(n,e,t){e||n.contentEditable==="false"?Ly(t,de):t.removeAttribute("contenteditable")}function Lu(n,e,t){const r=oe,o=Wt();oe="";let i="";const s=ne(n);for(const[a,l]of t){const u=Sf(a);wf(e,s,u),e.appendChild(u),oe="";const c=Wt();Cn(l,Dt(n,u,de)),Ct(c),Ef(n,a,e,u),i+=oe}return Ct(o),oe=r,i}function pt(n){return dn(n)&&n.__slots!==null?n.__slots:qh}function Ef(n,e,t,r){const o=Un.$getSlotTargetElement(n,e,t,de);o!==null&&(r.parentElement!==o&&o.appendChild(r),r.style.display="")}function va(n){const e=qn.get(n);return e!==void 0?e.parentElement:null}function Iu(n,e,t){const r=pt(n),o=pt(e);for(const[c,d]of r)if(!o.has(c)){const f=va(d);xn(d,null),f!==null&&f.remove()}const i=oe,s=Wt();let a="",l=null;const u=ne(e);for(const[c,d]of o){const f=r.get(c);let h=f!==void 0?va(f):null;oe="";const g=Wt();if(h===null){h=Sf(c);let m=null;for(const p of t.children)if(!p.hasAttribute("data-lexical-slot")){m=p;break}t.insertBefore(h,m),Cn(d,Dt(e,h,de))}else f===d?an(d,h):(f!==void 0&&xn(f,h),Cn(d,Dt(e,h,de)));if(Ct(g),wf(t,u,h),Ef(e,c,t,h),a+=oe,h.parentElement===t){const m=l===null?t.firstChild:l.nextSibling;m!==h&&t.insertBefore(h,m),l=h}}return Ct(s),oe=i,a}function Cn(n,e){const t=De.get(n);if(t===void 0&&$(60),e!==null){const o=zt.get(n);if(o!==void 0){const i=qn.get(n);if(i!==void 0){const s=Yn(o)?o.__slotHost:null,a=Yn(t)?t.__slotHost:null,l=o.__parent!==t.__parent||s!==a,u=a!==null&&i.parentElement!==e.element;if(l||u)return e.insertChild(i),an(n,e.element)}}}const r=Un.$createDOM(t,de);if((function(o,i,s){const a=s._keyToDOMMap;Th(i,s,o),a.set(o,i)})(n,r,de),D(t)?r.setAttribute("data-lexical-text","true"):ne(t)&&(r.setAttribute("data-lexical-decorator","true"),Hi(r,{captureSelection:!0})),C(t)){const o=t.__indent,i=t.__size;Ca(r,t),o!==0&&Cf(r,o);const s=pt(t),a=s.size>0?Lu(t,r,s):"";if(i===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,oe+=a,s.size>0&&(r.__lexicalSlotTextLength=a.length);else{const u=oe,c=i-1;if(Sa(Vi(t,De),t,0,c,Dt(t,r,de)),a!==""){const d=r.__lexicalTextContent||"";r.__lexicalTextContent=a+d,oe=u+a+d}s.size>0&&(r.__lexicalSlotTextLength=a.length)}const l=t.__format;l!==0&&vf(r,l),t.isInline()||Tf(null,t,r)}else{const o=t.getTextContent();if(ne(t)){const i=t.decorate(de,Co);i!==null&&Nf(n,i),r.contentEditable="false";const s=pt(t);s.size>0&&Lu(t,r,s)}oe+=o}return e!==null&&e.insertChild(r),Un.$decorateDOM(t,null,r,de),xf(t),Il(So,vo,ls,t,"created"),r}function Sa(n,e,t,r,o){const i=oe,s=Wt();oe="",ze=null,Ye=null,qe=null;let a=t;for(;a<=r;++a){const u=Wt();Cn(n[a],o);const c=De.get(n[a]);c!==null&&D(c)?ze===null&&(ze=c.getFormat(),Ye=c.getStyle(),qe=c.__key):C(c)&&a<r&&!c.isInline()&&(oe+=In),Ct(u)}const l=de._keyToDOMMap.get(e.__key);l===void 0&&$(349,e.__key),l.__lexicalTextContent=oe,l.__lexicalFirstTextKey=qe,oe=i+oe,Ct(s)}function Tf(n,e,t){const r=Dt(e,t,de),o=r.element.__lexicalLastChildKind??null,i=(function(s,a){if(s){const l=s.__last;if(l){const u=a.get(l);if(u)return We(u)?"line-break":ne(u)&&u.isInline()?"decorator":null}return pt(s).size>0?null:"empty"}return null})(e,De);o!==i&&r.setManagedLineBreak(i)}function Am(n,e,t){var r;ze=null,Ye=null,qe=null,(function(o,i,s){const a=oe,l=o.__size,u=i.__size;oe="";const c=s.element,d=de._keyToDOMMap.get(i.__key);d===void 0&&$(351,i.__key);const f=u-l;if(!ln&&Math.abs(f)<=1&&l>=Dm&&o.__first===i.__first&&(f!==0||!de._cloneNotNeeded.has(o.__key))){const h=d.__lexicalTextContent,g=ka.get(o.__key);if(!ln&&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 x=De.get(b);if(x===void 0)return null;b=x.__prev,S++}return S!==_||b!==null&&y.has(b)?null:k})(i,g);if(m!==null){const p=g.size;if(f===0){const y=Pu(m,p);let _=m,b=0;for(;_!==null&&b<p;){const v=De.get(_);if(v===void 0)break;const E=Wt();an(_,c),D(v)&&ze===null&&(ze=v.getFormat(),Ye=v.getStyle(),qe=v.__key),Ct(E),_=v.__next,b++}let k="";for(_=m,b=0;_!==null&&b<p;){const v=De.get(_);if(v===void 0)break;let E;if(C(v)){const A=de._keyToDOMMap.get(_),T=A&&A.__lexicalTextContent;typeof T!="string"&&$(352,v.getType()),E=T}else E=v.getTextContent();k+=E,b<p-1&&C(v)&&!v.isInline()&&(k+=In),_=v.__next,b++}const S=d.__lexicalSlotTextLength||0,x=S>0?h.slice(S):h,w=x.slice(0,x.length-y)+k;return d.__lexicalTextContent=w,oe=a+w,void Bu(i,d,g)}if((function(y,_,b,k,S,x,w,v){if(v!==1&&v!==-1||w!==(v===1?2:1))return!1;const A=w-v;let T=y.__last;for(let re=0;re<A-1;re++){if(T===null)return!1;const $e=zt.get(T);if($e===void 0)return!1;T=$e.__prev}if(T===null)return!1;const M=De.get(x),j=zt.get(T);if(M===void 0||j===void 0||M.__prev!==j.__prev)return!1;const R=[];let B=x;for(let re=0;re<w;re++){if(B===null)return!1;R.push(B);const $e=De.get(B);B=$e?$e.__next:null}const Z=[];B=T;for(let re=0;re<A;re++){if(B===null)return!1;Z.push(B);const $e=zt.get(B);B=$e?$e.__next:null}const ie=new Set(Z),Q=new Set(R),L=[];let P=0,K=0;for(;P<A&&K<w;)if(R[K]===Z[P])L.push({key:R[K],kind:"reconcile"}),P++,K++;else if(Q.has(Z[P])){if(ie.has(R[K]))return!1;L.push({key:R[K],kind:"create",nextIndex:K}),K++}else L.push({key:Z[P],kind:"destroy"}),P++;for(;P<A;)L.push({key:Z[P++],kind:"destroy"});for(;K<w;)L.push({key:R[K],kind:"create",nextIndex:K}),K++;const se=Pu(T,A);for(const re of L){const $e=Wt();if(re.kind==="reconcile")an(re.key,b.element);else if(re.kind==="destroy")xn(re.key,b.element);else{let it=null;for(let nn=re.nextIndex+1;nn<w;nn++){const _n=de._keyToDOMMap.get(R[nn]);if(_n!==void 0){it=_n;break}}Cn(re.key,b.withBefore(it??b.before))}if(re.kind!=="destroy"){const it=De.get(re.key);it&&D(it)&&ze===null&&(ze=it.getFormat(),Ye=it.getStyle(),qe=it.__key)}Ct($e)}let ee="";for(let re=0;re<w;re++){const $e=De.get(R[re]);if($e===void 0)return!1;let it;if(C($e)){const nn=de._keyToDOMMap.get(R[re]),_n=nn&&nn.__lexicalTextContent;typeof _n!="string"&&$(350,$e.getType()),it=_n}else it=$e.getTextContent();ee+=it,re<w-1&&C($e)&&!$e.isInline()&&(ee+=In)}const xe=k.__lexicalSlotTextLength||0,ot=xe>0?S.slice(xe):S;return k.__lexicalTextContent=ot.slice(0,ot.length-se)+ee,!0})(o,0,s,d,h,m,p,f)){const y=d.__lexicalTextContent;return typeof y!="string"&&$(353),oe=a+y,void Bu(i,d,g)}}}if(f===0){let m=o.__first,p=0;for(;m!==null;){const y=De.get(m);if(y===void 0)break;const _=ln||po.has(m)||go.has(m),b=Wt();if(_)an(m,c);else{let k,S;if(C(y)){S=qn.get(m);const x=S&&S.__lexicalTextContent;typeof x!="string"&&$(354,y.getType()),k=x}else k=y.getTextContent();oe+=k,S!==void 0&&_a(S)}D(y)?ze===null&&(ze=y.getFormat(),Ye=y.getStyle(),qe=y.__key):C(y)&&p<u-1&&!y.isInline()&&(oe+=In),Ct(b),m=y.__next,p++}return d.__lexicalTextContent=oe,d.__lexicalFirstTextKey=qe,void(oe=a+oe)}}if(l===1&&u===1){const h=o.__first,g=i.__first;if(h===g)an(h,c);else{const p=wa(h),y=Cn(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 _}xn(h,null)}const m=De.get(g);D(m)&&ze===null&&(ze=m.getFormat(),Ye=m.getStyle(),qe=m.__key)}else{const h=Vi(o,zt),g=Vi(i,De);if(h.length!==l&&$(227),g.length!==u&&$(228),l===0)u!==0&&Sa(g,i,0,u-1,s);else if(u===0){if(l!==0){const m=s.after==null&&s.before==null&&pt(i).size===0&&s.element.__lexicalLineBreak==null;xa(h,0,l-1,m?null:c),m&&(c.textContent="")}}else(function(m,p,y,_,b,k){const S=_-1,x=b-1;let w,v,E=k.getFirstChild(),A=0,T=0;for(;A<=S&&T<=x;){const R=p[A],B=y[T],Z=Wt();if(R===B)E=Is(an(B,k.element)),A++,T++;else{if(v===void 0&&(v=Ku(y,T)),w===void 0)w=Ku(p,A);else if(!w.has(R)){A++,Ct(Z);continue}if(!v.has(R)){E=Is(wa(R)),xn(R,k.element),A++,w.delete(R),Ct(Z);continue}if(w.has(B)){const Q=Pr(de,B);Q!==E&&k.withBefore(E??k.before).insertChild(Q),E=Is(an(B,k.element)),A++,T++}else Cn(B,k.withBefore(E??k.before)),T++}const ie=De.get(B);ie!==null&&D(ie)?ze===null&&(ze=ie.getFormat(),Ye=ie.getStyle(),qe=ie.__key):C(ie)&&T<=x&&!ie.isInline()&&(oe+=In),Ct(Z)}const M=A>S,j=T>x;if(M&&!j){const R=y[x+1],B=R===void 0?null:de.getElementByKey(R);Sa(y,m,T,x,k.withBefore(B??k.before))}else j&&!M&&xa(p,A,S,k.element)})(i,h,g,l,u,s)}d.__lexicalTextContent=oe,d.__lexicalFirstTextKey=qe,oe=a+oe})(n,e,Dt(e,t,de)),Se(e)||(r=e,ze==null||ze===r.__textFormat||Di||r.setTextFormat(ze),(function(o){Ye==null||Ye===o.__textStyle||Di||o.setTextStyle(Ye)})(e))}function Bu(n,e,t){const r=e.__lexicalFirstTextKey;if(r!=null){const o=n.__key;let i=r;for(;i!==null;){const s=De.get(i);if(s===void 0){i=null;break}if(s.__parent===o)break;i=s.__parent}if(i!==null&&!t.has(i)){const s=De.get(r);if(D(s))return ze=s.getFormat(),void(Ye=s.getStyle())}}e.__lexicalFirstTextKey=qe}function an(n,e){const t=zt.get(n);let r=De.get(n);t!==void 0&&r!==void 0||$(61);const o=ln||po.has(n)||go.has(n),i=Pr(de,n);if(t===r&&!o){let s;if(C(t)){const a=i.__lexicalTextContent;typeof a!="string"&&$(355,t.getType()),s=a,_a(i)}else s=t.getTextContent();return oe+=s,i}if(t!==r&&o&&Il(So,vo,ls,r,"updated"),Un.$updateDOM(r,t,i,de)){const s=Cn(n,null);return e===null&&$(62),e.replaceChild(s,i),xn(n,null),s}if(C(t)){C(r)||$(334,n);const s=r.__indent;(ln||s!==t.__indent)&&Cf(i,s);const a=r.__format;(ln||a!==t.__format)&&vf(i,a);const l=o&&(pt(r).size>0||pt(t).size>0)?Iu(t,r,i):"";if(o){const u=oe;if(Am(t,r,i),Oe(r)||r.isInline()||Tf(0,r,i),l!==""){const c=i.__lexicalTextContent||"";i.__lexicalTextContent=l+c,oe=u+l+c,i.__lexicalSlotTextLength=l.length}else(pt(r).size>0||pt(t).size>0)&&(i.__lexicalSlotTextLength=0)}else{const u=i.__lexicalTextContent;typeof u!="string"&&$(356,t.getType()),oe+=u,_a(i)}if((ln||r.__dir!==t.__dir||r.__parent!==t.__parent)&&(Ca(i,r),Oe(r)&&!ln))for(const u of r.getChildren())C(u)&&Ca(Pr(de,u.getKey()),u)}else{const s=r.getTextContent();if(ne(r)){const a=r.decorate(de,Co);a!==null&&Nf(n,a),o&&(pt(r).size>0||pt(t).size>0)&&Iu(t,r,i)}oe+=s}if(!Di&&Oe(r)){const s=r.getLatest();if(s.__cachedText!==oe){const a=s.getWritable();a.__cachedText=oe,r=a}}return Un.$decorateDOM(r,t,i,de),xf(r),i}function Nf(n,e){let t=de._pendingDecorators;const r=de._decorators;if(t===null){if(r[n]===e)return;t=Nh(de)}t[n]=e}function Is(n){let e=n.nextSibling;return e!==null&&e===de._blockCursorElement&&(e=e.nextSibling),e}function Ku(n,e){const t=new Set;for(let r=e;r<n.length;r++)t.add(n[r]);return t}function Fm(n,e,t,r,o,i){oe="",ze=null,Ye=null,qe=null,ln=r===2,de=t,Co=t._config,Un=t._config.dom||Bi,vo=t._nodes,ls=de._listeners.mutation,go=o,po=i,zt=n._nodeMap,ba=n,De=e._nodeMap,Di=e._readOnly,qn=hf(t._keyToDOMMap),ka=(function(){const a=new Map,l=u=>{for(const c of u){const d=De.get(c);if(d===void 0)continue;const f=d.__parent;if(f===null)continue;let h=a.get(f);h===void 0&&(h=new Set,a.set(f,h)),h.add(c)}};return l(go.keys()),l(po),a})();const s=new Map;return So=s,an("root",null),de=void 0,vo=void 0,go=void 0,po=void 0,zt=void 0,ba=void 0,De=void 0,Co=void 0,qn=void 0,ka=void 0,So=void 0,Un=Bi,s}function wa(n){const e=qn.get(n);return e===void 0&&$(75,n),e}function W(n){return{type:n}}const qt=W("SELECTION_CHANGE_COMMAND"),Df=W("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),us=W("CLICK_COMMAND"),$f=W("BEFORE_INPUT_COMMAND"),Af=W("INPUT_COMMAND"),Ff=W("COMPOSITION_START_COMMAND"),zf=W("COMPOSITION_END_COMMAND"),vn=W("DELETE_CHARACTER_COMMAND"),vr=W("INSERT_LINE_BREAK_COMMAND"),Hn=W("INSERT_PARAGRAPH_COMMAND"),Kn=W("CONTROLLED_TEXT_INSERTION_COMMAND"),Vr=W("PASTE_COMMAND"),mi=W("REMOVE_TEXT_COMMAND"),zr=W("DELETE_WORD_COMMAND"),Or=W("DELETE_LINE_COMMAND"),Ot=W("FORMAT_TEXT_COMMAND"),zm=W("SET_TEXT_FORMAT_COMMAND"),cs=W("UNDO_COMMAND"),ds=W("REDO_COMMAND"),fs=W("KEYDOWN_COMMAND"),kl=W("KEY_ARROW_RIGHT_COMMAND"),Of=W("MOVE_TO_END"),xl=W("KEY_ARROW_LEFT_COMMAND"),Mf=W("MOVE_TO_START"),Cl=W("KEY_ARROW_UP_COMMAND"),vl=W("KEY_ARROW_DOWN_COMMAND"),$i=W("KEY_ENTER_COMMAND"),jf=W("KEY_SPACE_COMMAND"),hs=W("KEY_BACKSPACE_COMMAND"),Sl=W("KEY_ESCAPE_COMMAND"),wl=W("KEY_DELETE_COMMAND"),El=W("KEY_TAB_COMMAND"),Om=W("INSERT_TAB_COMMAND"),Mm=W("INDENT_CONTENT_COMMAND"),Wu=W("OUTDENT_CONTENT_COMMAND"),Rf=W("DROP_COMMAND"),Pf=W("FORMAT_ELEMENT_COMMAND"),Lf=W("DRAGSTART_COMMAND"),If=W("DRAGOVER_COMMAND"),jm=W("DRAGEND_COMMAND"),Io=W("COPY_COMMAND"),gs=W("CUT_COMMAND"),Tl=W("SELECT_ALL_COMMAND"),Rm=W("CLEAR_EDITOR_COMMAND"),Pm=W("CLEAR_HISTORY_COMMAND"),ao=W("CAN_REDO_COMMAND"),lo=W("CAN_UNDO_COMMAND"),Bf=W("FOCUS_COMMAND"),Lm=W("BLUR_COMMAND"),Im=W("KEY_MODIFIER_COMMAND");function Bm(n){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(t,r){let o=e.get(t);o===void 0&&(o={dispose:n(t,r),holders:new Set},e.set(t,o));const i=()=>{const s=e.get(t);s&&s.holders.delete(i)&&s.holders.size===0&&(e.delete(t),s.dispose())};return o.holders.add(i),i}}}function mo(n,e,t,r){return n.addEventListener(e,t,r),n.removeEventListener.bind(n,e,t,r)}const rn=Object.freeze({}),Ea=[["keydown",function(n,e){const t=e._inputState;t.lastKeyDownTimeStamp=n.timeStamp,t.lastKeyCode=n.key,n.key!=="Backspace"&&wo(t),!e.isComposing()&&I(e,fs,n)}],["pointerdown",function(n,e){const t=Vn(n),r=n.pointerType;Lt(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&wt(e,()=>{Ji(t,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(n,e){I(e,Ff,n)}],["compositionend",function(n,e){const t=e._inputState;Pt?t.compositionPhase="ending-firefox":En||!jo&&!Ro?I(e,zf,n):(t.compositionPhase="ending-safari",t.compositionEndData=n.data)}],["input",function(n,e){n.stopPropagation();const t=e._inputState;wo(t),wt(e,()=>{Uf(n,e)||e.dispatchCommand(Af,n)},{event:n}),t.unprocessedBeforeInputData=null}],["click",function(n,e){wt(e,()=>{const t=z(),r=Pe(gt(e)),o=yt();if(r){if(N(t)){const i=t.anchor,s=i.getNode();i.type==="element"&&i.offset===0&&t.isCollapsed()&&!Oe(s)&&ge().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&o!==null&&t.is(o)&&(r.removeAllRanges(),t.dirty=!0)}else if(n.pointerType==="touch"||n.pointerType==="pen"){const i=ft(r,e._rootElement).anchorNode;(q(i)||ht(i))&&_e(To(o,r,e,n))}}if(Pt&&r!==null&&r.rangeCount===0){const i=e._rootElement;if(i!==null&&n.target===i){const s=n.clientY;let a=i.childNodes.length;for(let u=0;u<i.childNodes.length;u++){const c=i.childNodes[u];if(q(c)){const d=c.getBoundingClientRect();if(s<=(d.top+d.bottom)/2){a=u;break}}}r.setBaseAndExtent(i,a,i,a);const l=To(o,r,e,n);l!==null?_e(l):r.removeAllRanges()}}I(e,us,n)})}],["cut",rn],["copy",rn],["dragstart",rn],["dragover",rn],["dragend",rn],["paste",rn],["focus",rn],["blur",rn],["drop",rn]];Fr&&Ea.push(["beforeinput",(n,e)=>(function(t,r){const o=t.inputType;o==="deleteCompositionText"||Pt&&Fh(r)||o!=="insertCompositionText"&&wt(r,()=>{Uf(t,r)||I(r,$f,t)},{event:t})})(n,e)]);const Ta=new WeakMap,Ai=new WeakMap,Km=Bm(n=>(n.addEventListener("selectionchange",Vu),()=>n.removeEventListener("selectionchange",Vu)));function Kf(n,e,t,r,o,i){const s=n.anchor,a=n.focus,l=s.getNode(),u=he();let c;if(i!==void 0)c=i;else{const m=Pe(gt(u));c=m!==null?ft(m,u._rootElement):null}const d=c!==null?c.anchorNode:null,f=s.key,h=u.getElementByKey(f),g=t.length;return f!==a.key||!D(l)||(!o&&(!Fr||u._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||l.isDirty()&&g<2||Dh(t))&&s.offset!==a.offset&&!l.isComposing()||Et(l)||l.isDirty()&&g>1||(o||!Fr)&&h!==null&&!l.isComposing()&&d!==wn(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=Ki(p);return y===0?!p.canInsertTextBefore()||!_.canInsertTextBefore()&&!p.isComposing()||b||(function(k){const S=k.getPreviousSibling();return(D(S)||C(S)&&S.isInline())&&!S.canInsertTextAfter()})(p):y===p.getTextContentSize()&&(!p.canInsertTextAfter()||!_.canInsertTextAfter()&&!p.isComposing()||b)})(n,l)}function qu(n,e){return ht(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function Uu(n,e,t){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=ft(n,e._rootElement),a=e._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,qu(r,o)&&qu(i,s)&&!a.postDeleteSelectionToRestore)||wt(e,()=>{if(!t)return void _e(null);if(!Wo(e,r,i))return;let l=z();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(),_e(l))}if(a.postDeleteSelectionToRestore=null,N(l)){const u=l.anchor,c=u.getNode();if(l.isCollapsed()){n.type==="Range"&&r===i&&(l.dirty=!0);const d=gt(e).event,f=d?d.timeStamp:performance.now(),{format:h,style:g,offset:m,key:p,timeStamp:y}=a.collapsedSelectionFormat,_=ge(),b=e.isComposing()===!1&&_.getTextContent()==="";if(f<y+200&&u.offset===m&&u.key===p)yi(l,h,g);else if(u.type==="text")D(c)||$(141),Wf(l,c);else if(u.type==="element"&&!b){C(c)||$(259);const k=u.getNode();k.isEmpty()?(function(S,x){const w=x.getTextFormat(),v=x.getTextStyle();yi(S,w,v)})(l,k):yi(l,l.format,"")}}else{const d=u.key,f=l.focus.key,h=l.getNodes(),g=h.length,m=l.isBackward(),p=m?s:o,y=m?o:s,_=m?f:d,b=m?d:f;let k=2047,S=!1;for(let x=0;x<g;x++){const w=h[x],v=w.getTextContentSize();if(D(w)&&v!==0&&!(x===0&&w.__key===_&&p===v||x===g-1&&w.__key===b&&y===0)&&(S=!0,k&=w.getFormat(),k===0))break}l.format=S?k:0}}I(e,qt)})}function yi(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function Wf(n,e){yi(n,e.getFormat(),e.getStyle())}function qf(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Hu(n){const{lastKeyCode:e}=he()._inputState;if(n==null||n.length<=1||e==null)return;const t=e.length===1?e:e==="Enter"?`
|
|
3
|
+
`,_l=Pt?" ":ko,hn={bold:1,capitalize:1024,code:16,highlight:yl,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},mm={directionless:1,unmergeable:2},Ti={center:2,end:6,justify:4,left:1,right:3,start:5},ym={[dm]:"center",[pm]:"end",[hm]:"justify",[cm]:"left",[fm]:"right",[gm]:"start"},_m={normal:0,segmented:2,token:1},bm={[sm]:"normal",[lm]:"segmented",[am]:"token"},Su="$config";function wu(){return we()._blockCursorElement}function km(n){return n!==null&&n.nodeType===1&&n.hasAttribute("data-lexical-slot")}let uf=class gi{element;before;after;constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new gi(this.element,e,this.after)}withAfter(e){return new gi(this.element,this.before,e)}withElement(e){return this.element===e?this:new gi(e,this.before,this.after)}insertChild(e){const t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&$(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&$(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&$(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 o=Eu(e,this.element);if(o===null)return"after";const i=Array.prototype.indexOf.call(e.childNodes,o);if(i<0)return"after";if(t===e)return r<=i?"before":"after";const s=Eu(e,t);if(s===null)return"after";const a=Array.prototype.indexOf.call(e.childNodes,s);return a>=0&&a<=i?"before":"after"}getInsertionAnchor(){return this.before}};function Eu(n,e){let t=e;for(;t!==null&&t.parentNode!==n;)t=t.parentNode;return t}let cf=class pi extends uf{withBefore(e){return new pi(this.element,e,this.after)}withAfter(e){return new pi(this.element,this.before,e)}withElement(e){return this.element===e?this:new pi(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;km(t);)e=t,t=t.nextSibling;const r=e?e.nextSibling:this.element.firstChild;return r!==null&&r===wu()?r:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(Ro||En||jo);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,o=this.before,i=ae().createElement("br");if(i.setAttribute("data-lexical-managed-linebreak","true"),r.insertBefore(i,o),e){const s=ae().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,i),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=i}getFirstChildOffset(){const e=this.getFirstChild(),t=this.getInsertionAnchor();let r=0;for(let o=this.element.firstChild;o!==null&&o!==e&&o!==t;o=o.nextSibling)r++;return r}resolveChildIndex(e,t,r,o){if(r===this.element){const l=this.getFirstChildOffset(),u=wu(),c=this.element.childNodes,d=Math.min(o,c.length);let f=0;for(let h=l;h<d;h++)c[h]!==u&&f++;return[e,Math.min(f,e.getChildrenSize())]}const i=Tu(t,r);i.push(o);const s=Tu(t,this.element);let a=e.getIndexWithinParent();for(let l=0;l<s.length;l++){const u=i[l],c=s[l];if(u===void 0||u<c)break;if(u>c){a+=1;break}}return[e.getParentOrThrow(),a]}};function Tu(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let o=0;for(let i=r.previousSibling;i!==null;i=i.previousSibling)o++;t.push(o)}return r!==n&&$(225),t.reverse()}let df;try{df="0.49.0+prod.esm"}catch{}const ff=df??'"<unknown>+source"';let eo=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 Mn=null;function hf(n,e=1e3){return n instanceof ma?n.clone():n.size<e?new Map(n):new ma().init(new Map(n),void 0,n.size)}let ma=class gf{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new gf().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===Mn?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,o]of this._nursery)o!==Mn?t.set(r,o):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 o=this.getNursery();return r!==Mn&&r!==void 0||(this._size++,r===Mn&&o.delete(e)),o.set(e,t),this}delete(e){const t=this.has(e);return t&&(this.getNursery().set(e,Mn),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 o=t(e);return this.set(e,o),o}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 o=r[0],i=e?e.get(o):void 0;i!==Mn&&(i!==void 0&&(r[1]=i),yield r)}if(e)for(const r of e)r[1]===Mn||t&&t.has(r[0])||(yield r)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(const[r,o]of this.entries())e(o,r,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function Ni(n,e,t,r,o,i){if(C(n)){let s=n.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===e&&((C(s)||dn(s)&&s.__slots!==null)&&Ni(s,a,t,r,o,i),t.has(a)||i.delete(a),o.push(a)),s=s.getNextSibling()}}for(const s of dn(n)&&n.__slots!==null?n.__slots.values():[]){const a=r.get(s);a!==void 0&&Yn(a)&&a.__slotHost===e&&((C(a)||dn(a)&&a.__slots!==null)&&Ni(a,s,t,r,o,i),t.has(s)||i.delete(s),o.push(s))}}let ya=!1,bl=0;function xm(n){bl=n.timeStamp}function Ls(n,e,t){const r=n.nodeName==="BR",o=e.__lexicalLineBreak;return o&&(n===o||r&&n.previousSibling===o)||r&&Xr(n,t)!==void 0}function Cm(n,e,t){const r=Pe(gt(t)),o=r&&ft(r,t._rootElement);let i=null,s=null;o!==null&&o.anchorNode===n&&(i=o.anchorOffset,s=o.focusOffset);const a=n.nodeValue;a!==null&&Ll(e,a,i,s,!1)}function vm(n,e,t){if(N(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return ht(e)&&t.isAttached()}function Sm(n,e,t){for(let r=n;r&&!Bh(r);r=or(r)){const o=Xr(r,e);if(o!==void 0){const i=te(o,t);if(i)return ne(i)||!q(r)?void 0:[r,i]}}}function pf(n,e,t){ya=!0;const r=performance.now()-bl>100;try{wt(n,()=>{const o=z()||(function(d){return d.read("latest",()=>{const f=z();return f!==null?f.clone():null})})(n),i=new Map,s=n._editorState,a=n._blockCursorElement;let l=!1,u="";for(let d=0;d<e.length;d++){const f=e[d],h=f.type,g=f.target,m=Sm(g,n,s);if(!m)continue;const[p,y]=m;if(h==="characterData")r&&D(y)&&ht(g)&&vm(o,g,y)&&Cm(g,y,n);else if(h==="childList"){l=!0;const _=f.addedNodes;for(let S=0;S<_.length;S++){const x=_[S],w=Eh(x),v=x.parentNode;if(!(v==null||x===a||w!==null||Ls(x,v,n)||n._slotsUsed&&q(x)&&x.hasAttribute("data-lexical-slot")||Bh(x))){if(Pt){const E=(q(x)?x.innerText:null)||x.nodeValue;E&&(u+=E)}v.removeChild(x)}}const b=f.removedNodes,k=b.length;if(k>0){let S=0;for(let x=0;x<k;x++){const w=b[x];(Ls(w,g,n)||a===w)&&(g.appendChild(w),S++)}k!==S&&i.set(p,y)}}}if(i.size>0)for(const[d,f]of i)f.reconcileObservedMutation(d,n);const c=t.takeRecords();if(c.length>0){for(let d=0;d<c.length;d++){const f=c[d],h=f.addedNodes,g=f.target;for(let m=0;m<h.length;m++){const p=h[m],y=p.parentNode;y==null||p.nodeName!=="BR"||Ls(p,g,n)||y.removeChild(p)}}t.takeRecords()}o!==null&&(l&&_e(o),Pt&&Fh(n)&&o.insertRawText(u))})}finally{ya=!1}}function mf(n){const e=n._observer;e!==null&&pf(n,e.takeRecords(),e)}function yf(n){(function(e){bl===0&>(e).addEventListener("textInput",xm,!0)})(n),n._observer=new MutationObserver((e,t)=>{pf(n,e,t)})}const Nu="latest";let wm=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Nm).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function Po(n,e){return new wm(n,e)}function Lo(n,e,t=Nu){const r=(t===Nu?n.getLatest():n).__state;return r?r.getValue(e):e.defaultValue}function Cr(n,e,t){let r;if(Ie(),typeof t=="function"){const i=n.getLatest(),s=Lo(i,e);if(r=t(s),e.isEqual(s,r))return i}else r=t;const o=n.getWritable();return bf(o).updateFromKnown(e,r),o}function Em(n){const e=new Map,t=new Set;for(const{ownNodeConfig:r}of Ul(typeof n=="function"?n:n.replace))if(r&&r.stateConfigs)for(const o of r.stateConfigs){let i;"stateConfig"in o?(i=o.stateConfig,o.flat&&t.add(i.key)):i=o,e.set(i.key,i)}return{flatKeys:t,sharedConfigMap:e}}const Du=new Set(["__proto__","constructor","prototype"]);let Tm=class _f{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,r=void 0,o=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=o;const{sharedConfigMap:s}=this.sharedNodeState,a=i!==void 0?i:(function(l,u,c){let d=c.size;if(u)for(const f in u){const h=l.get(f);h&&c.has(h)||d++}return d})(s,r,o);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 o=this.unknownState[e.key];o!==void 0&&(r=e.parse(o)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,o]of this.knownState)r.isEqual(o,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(o);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return $u(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,o=new Map(this.knownState);return new _f(e,t,(function(i,s,a){let l;if(a)for(const[u,c]of Object.entries(a)){if(Du.has(u))continue;const d=i.get(u);d?s.has(d)||s.set(d,d.parse(c)):(l=l||{},l[u]=c)}return l})(t.sharedConfigMap,o,r),o,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:o,unknownState:i}=this;o.has(e)||i&&r in i||(i&&(delete i[r],this.unknownState=$u(i)),this.size++),o.set(e,t)}updateFromUnknown(e,t){if(Du.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,o]of Object.entries(e))this.updateFromUnknown(r,o)}};function bf(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new Tm(e,kf(e));return e.__state=t,t}function kf(n){return n.__state?n.__state.sharedNodeState:vh(we(),n.getType()).sharedNodeState}function $u(n){if(n)for(const e in n)return n}function Nm(n){return n}function Au(n,e,t){for(const[r,o]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const i=t?t.getValue(r):r.defaultValue;if(i!==o&&!r.isEqual(i,o))return!0}return!1}function Fu(n,e,t){const{unknownState:r}=e,o=t?t.unknownState:void 0;if(r){for(const[i,s]of Object.entries(r))if(!n.has(i)&&(n.add(i),s!==(o?o[i]:void 0)))return!0}return!1}function zu(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function Ou(n,e){const t=n.__mode,r=n.__format,o=n.__style,i=e.__mode,s=e.__format,a=e.__style,l=n.__state,u=e.__state;return(t===null||t===i)&&(r===null||r===s)&&(o===null||o===a)&&(n.__state===null||l===u||(function(c,d){if(c===d)return!0;const f=new Set;return!(c&&Au(f,c,d)||d&&Au(f,d,c)||c&&Fu(f,c,d)||d&&Fu(f,d,c))})(l,u))}function Mu(n,e){const t=n.mergeWithSibling(e),r=he()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function ju(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&D(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Ou(e,r)){r=Mu(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&D(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Ou(r,t)){r=Mu(r,t);break}break}t.remove()}}else r.remove()}function Kt(n){return Ru(n.anchor),Ru(n.focus),n}function Ru(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,o;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),o=!0):(r=e.getChildAtIndex(t),o=!1),D(r)){n.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!C(r))break;n.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}const xo=Symbol.for("@lexical/CachedTextSize");function Pu(n,e){return ba.read(()=>{let t=0,r=n;for(let o=0;o<e&&r!==null;o++){const i=zt.get(r);if(i===void 0&&$(345,r),C(i)){const s=De.get(r);if(s!==void 0&&C(s)&&s.__parent!==i.__parent)t+=i.getTextContentSize();else{const a=qn.get(r),l=a&&a.__lexicalTextContent;typeof l!="string"&&$(346,i.getType()),t+=l.length}o<e-1&&!i.isInline()&&(t+=2)}else{const s=i[xo];s===void 0&&$(347,i.getType(),r),t+=s}r=i.__next}return t},{editor:de})}function xf(n){C(n)||n[xo]===void 0&&(n[xo]=D(n)?n.__text.length:n.getTextContentSize())}const Dm=4;let Co,de,vo,oe="",ze=null,Ye=null,qe=null;function Wt(){return{firstTextKey:qe,format:ze,style:Ye}}function Ct(n){n.firstTextKey!==null&&(ze=n.format,Ye=n.style,qe=n.firstTextKey)}function _a(n){if(qe!==null)return;const e=n.__lexicalFirstTextKey;if(e===void 0&&$(348),e===null)return;const t=De.get(e);D(t)&&(ze=t.getFormat(),Ye=t.getStyle(),qe=e)}let ls,go,po,zt,ba,De,qn,ka,So,Un,ln=!1,Di=!1;function xn(n,e){const t=zt.get(n),r=De.has(n);if(e!==null){const o=wa(n);o.parentNode===e&&e.removeChild(o)}if(!r){if(de._keyToDOMMap.delete(n),C(t)){const o=Vi(t,zt);xa(o,0,o.length-1,null)}if(t!==void 0){for(const o of pt(t).values()){const i=va(o);xn(o,null),i!==null&&i.remove()}Il(So,vo,ls,t,"destroyed")}}}function xa(n,e,t,r){for(let o=e;o<=t;++o){const i=n[o];i!==void 0&&xn(i,r)}}function jn(n,e){n.setProperty("text-align",e)}const $m="40px";function Cf(n,e){const t=Co.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, ${$m}))`)}function vf(n,e){const t=n.style;e===0?jn(t,""):e===1?jn(t,"left"):e===2?jn(t,"center"):e===3?jn(t,"right"):e===4?jn(t,"justify"):e===5?jn(t,"start"):e===6&&jn(t,"end")}function Ca(n,e){const t=(function(r){const o=r.__dir;if(o!==null)return o;if(Oe(r))return null;const i=r.getParent();return i===null||Se(i)&&i.__dir===null?"auto":null})(e);t!==null?n.dir=t:n.removeAttribute("dir")}function Sf(n){const e=ae().createElement("div");return e.setAttribute("data-lexical-slot",n),e.style.display="none",e}function wf(n,e,t){e||n.contentEditable==="false"?Ly(t,de):t.removeAttribute("contenteditable")}function Lu(n,e,t){const r=oe,o=Wt();oe="";let i="";const s=ne(n);for(const[a,l]of t){const u=Sf(a);wf(e,s,u),e.appendChild(u),oe="";const c=Wt();Cn(l,Dt(n,u,de)),Ct(c),Ef(n,a,e,u),i+=oe}return Ct(o),oe=r,i}function pt(n){return dn(n)&&n.__slots!==null?n.__slots:qh}function Ef(n,e,t,r){const o=Un.$getSlotTargetElement(n,e,t,de);o!==null&&(r.parentElement!==o&&o.appendChild(r),r.style.display="")}function va(n){const e=qn.get(n);return e!==void 0?e.parentElement:null}function Iu(n,e,t){const r=pt(n),o=pt(e);for(const[c,d]of r)if(!o.has(c)){const f=va(d);xn(d,null),f!==null&&f.remove()}const i=oe,s=Wt();let a="",l=null;const u=ne(e);for(const[c,d]of o){const f=r.get(c);let h=f!==void 0?va(f):null;oe="";const g=Wt();if(h===null){h=Sf(c);let m=null;for(const p of t.children)if(!p.hasAttribute("data-lexical-slot")){m=p;break}t.insertBefore(h,m),Cn(d,Dt(e,h,de))}else f===d?an(d,h):(f!==void 0&&xn(f,h),Cn(d,Dt(e,h,de)));if(Ct(g),wf(t,u,h),Ef(e,c,t,h),a+=oe,h.parentElement===t){const m=l===null?t.firstChild:l.nextSibling;m!==h&&t.insertBefore(h,m),l=h}}return Ct(s),oe=i,a}function Cn(n,e){const t=De.get(n);if(t===void 0&&$(60),e!==null){const o=zt.get(n);if(o!==void 0){const i=qn.get(n);if(i!==void 0){const s=Yn(o)?o.__slotHost:null,a=Yn(t)?t.__slotHost:null,l=o.__parent!==t.__parent||s!==a,u=a!==null&&i.parentElement!==e.element;if(l||u)return e.insertChild(i),an(n,e.element)}}}const r=Un.$createDOM(t,de);if((function(o,i,s){const a=s._keyToDOMMap;Th(i,s,o),a.set(o,i)})(n,r,de),D(t)?r.setAttribute("data-lexical-text","true"):ne(t)&&(r.setAttribute("data-lexical-decorator","true"),Hi(r,{captureSelection:!0})),C(t)){const o=t.__indent,i=t.__size;Ca(r,t),o!==0&&Cf(r,o);const s=pt(t),a=s.size>0?Lu(t,r,s):"";if(i===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,oe+=a,s.size>0&&(r.__lexicalSlotTextLength=a.length);else{const u=oe,c=i-1;if(Sa(Vi(t,De),t,0,c,Dt(t,r,de)),a!==""){const d=r.__lexicalTextContent||"";r.__lexicalTextContent=a+d,oe=u+a+d}s.size>0&&(r.__lexicalSlotTextLength=a.length)}const l=t.__format;l!==0&&vf(r,l),t.isInline()||Tf(null,t,r)}else{const o=t.getTextContent();if(ne(t)){const i=t.decorate(de,Co);i!==null&&Nf(n,i),r.contentEditable="false";const s=pt(t);s.size>0&&Lu(t,r,s)}oe+=o}return e!==null&&e.insertChild(r),Un.$decorateDOM(t,null,r,de),xf(t),Il(So,vo,ls,t,"created"),r}function Sa(n,e,t,r,o){const i=oe,s=Wt();oe="",ze=null,Ye=null,qe=null;let a=t;for(;a<=r;++a){const u=Wt();Cn(n[a],o);const c=De.get(n[a]);c!==null&&D(c)?ze===null&&(ze=c.getFormat(),Ye=c.getStyle(),qe=c.__key):C(c)&&a<r&&!c.isInline()&&(oe+=In),Ct(u)}const l=de._keyToDOMMap.get(e.__key);l===void 0&&$(349,e.__key),l.__lexicalTextContent=oe,l.__lexicalFirstTextKey=qe,oe=i+oe,Ct(s)}function Tf(n,e,t){const r=Dt(e,t,de),o=r.element.__lexicalLastChildKind??null,i=(function(s,a){if(s){const l=s.__last;if(l){const u=a.get(l);if(u)return We(u)?"line-break":ne(u)&&u.isInline()?"decorator":null}return pt(s).size>0?null:"empty"}return null})(e,De);o!==i&&r.setManagedLineBreak(i)}function Am(n,e,t){var r;ze=null,Ye=null,qe=null,(function(o,i,s){const a=oe,l=o.__size,u=i.__size;oe="";const c=s.element,d=de._keyToDOMMap.get(i.__key);d===void 0&&$(351,i.__key);const f=u-l;if(!ln&&Math.abs(f)<=1&&l>=Dm&&o.__first===i.__first&&(f!==0||!de._cloneNotNeeded.has(o.__key))){const h=d.__lexicalTextContent,g=ka.get(o.__key);if(!ln&&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 x=De.get(b);if(x===void 0)return null;b=x.__prev,S++}return S!==_||b!==null&&y.has(b)?null:k})(i,g);if(m!==null){const p=g.size;if(f===0){const y=Pu(m,p);let _=m,b=0;for(;_!==null&&b<p;){const v=De.get(_);if(v===void 0)break;const E=Wt();an(_,c),D(v)&&ze===null&&(ze=v.getFormat(),Ye=v.getStyle(),qe=v.__key),Ct(E),_=v.__next,b++}let k="";for(_=m,b=0;_!==null&&b<p;){const v=De.get(_);if(v===void 0)break;let E;if(C(v)){const A=de._keyToDOMMap.get(_),T=A&&A.__lexicalTextContent;typeof T!="string"&&$(352,v.getType()),E=T}else E=v.getTextContent();k+=E,b<p-1&&C(v)&&!v.isInline()&&(k+=In),_=v.__next,b++}const S=d.__lexicalSlotTextLength||0,x=S>0?h.slice(S):h,w=x.slice(0,x.length-y)+k;return d.__lexicalTextContent=w,oe=a+w,void Bu(i,d,g)}if((function(y,_,b,k,S,x,w,v){if(v!==1&&v!==-1||w!==(v===1?2:1))return!1;const A=w-v;let T=y.__last;for(let re=0;re<A-1;re++){if(T===null)return!1;const $e=zt.get(T);if($e===void 0)return!1;T=$e.__prev}if(T===null)return!1;const M=De.get(x),j=zt.get(T);if(M===void 0||j===void 0||M.__prev!==j.__prev)return!1;const R=[];let B=x;for(let re=0;re<w;re++){if(B===null)return!1;R.push(B);const $e=De.get(B);B=$e?$e.__next:null}const Q=[];B=T;for(let re=0;re<A;re++){if(B===null)return!1;Q.push(B);const $e=zt.get(B);B=$e?$e.__next:null}const ie=new Set(Q),Z=new Set(R),L=[];let P=0,K=0;for(;P<A&&K<w;)if(R[K]===Q[P])L.push({key:R[K],kind:"reconcile"}),P++,K++;else if(Z.has(Q[P])){if(ie.has(R[K]))return!1;L.push({key:R[K],kind:"create",nextIndex:K}),K++}else L.push({key:Q[P],kind:"destroy"}),P++;for(;P<A;)L.push({key:Q[P++],kind:"destroy"});for(;K<w;)L.push({key:R[K],kind:"create",nextIndex:K}),K++;const se=Pu(T,A);for(const re of L){const $e=Wt();if(re.kind==="reconcile")an(re.key,b.element);else if(re.kind==="destroy")xn(re.key,b.element);else{let it=null;for(let nn=re.nextIndex+1;nn<w;nn++){const _n=de._keyToDOMMap.get(R[nn]);if(_n!==void 0){it=_n;break}}Cn(re.key,b.withBefore(it??b.before))}if(re.kind!=="destroy"){const it=De.get(re.key);it&&D(it)&&ze===null&&(ze=it.getFormat(),Ye=it.getStyle(),qe=it.__key)}Ct($e)}let ee="";for(let re=0;re<w;re++){const $e=De.get(R[re]);if($e===void 0)return!1;let it;if(C($e)){const nn=de._keyToDOMMap.get(R[re]),_n=nn&&nn.__lexicalTextContent;typeof _n!="string"&&$(350,$e.getType()),it=_n}else it=$e.getTextContent();ee+=it,re<w-1&&C($e)&&!$e.isInline()&&(ee+=In)}const xe=k.__lexicalSlotTextLength||0,ot=xe>0?S.slice(xe):S;return k.__lexicalTextContent=ot.slice(0,ot.length-se)+ee,!0})(o,0,s,d,h,m,p,f)){const y=d.__lexicalTextContent;return typeof y!="string"&&$(353),oe=a+y,void Bu(i,d,g)}}}if(f===0){let m=o.__first,p=0;for(;m!==null;){const y=De.get(m);if(y===void 0)break;const _=ln||po.has(m)||go.has(m),b=Wt();if(_)an(m,c);else{let k,S;if(C(y)){S=qn.get(m);const x=S&&S.__lexicalTextContent;typeof x!="string"&&$(354,y.getType()),k=x}else k=y.getTextContent();oe+=k,S!==void 0&&_a(S)}D(y)?ze===null&&(ze=y.getFormat(),Ye=y.getStyle(),qe=y.__key):C(y)&&p<u-1&&!y.isInline()&&(oe+=In),Ct(b),m=y.__next,p++}return d.__lexicalTextContent=oe,d.__lexicalFirstTextKey=qe,void(oe=a+oe)}}if(l===1&&u===1){const h=o.__first,g=i.__first;if(h===g)an(h,c);else{const p=wa(h),y=Cn(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 _}xn(h,null)}const m=De.get(g);D(m)&&ze===null&&(ze=m.getFormat(),Ye=m.getStyle(),qe=m.__key)}else{const h=Vi(o,zt),g=Vi(i,De);if(h.length!==l&&$(227),g.length!==u&&$(228),l===0)u!==0&&Sa(g,i,0,u-1,s);else if(u===0){if(l!==0){const m=s.after==null&&s.before==null&&pt(i).size===0&&s.element.__lexicalLineBreak==null;xa(h,0,l-1,m?null:c),m&&(c.textContent="")}}else(function(m,p,y,_,b,k){const S=_-1,x=b-1;let w,v,E=k.getFirstChild(),A=0,T=0;for(;A<=S&&T<=x;){const R=p[A],B=y[T],Q=Wt();if(R===B)E=Is(an(B,k.element)),A++,T++;else{if(v===void 0&&(v=Ku(y,T)),w===void 0)w=Ku(p,A);else if(!w.has(R)){A++,Ct(Q);continue}if(!v.has(R)){E=Is(wa(R)),xn(R,k.element),A++,w.delete(R),Ct(Q);continue}if(w.has(B)){const Z=Pr(de,B);Z!==E&&k.withBefore(E??k.before).insertChild(Z),E=Is(an(B,k.element)),A++,T++}else Cn(B,k.withBefore(E??k.before)),T++}const ie=De.get(B);ie!==null&&D(ie)?ze===null&&(ze=ie.getFormat(),Ye=ie.getStyle(),qe=ie.__key):C(ie)&&T<=x&&!ie.isInline()&&(oe+=In),Ct(Q)}const M=A>S,j=T>x;if(M&&!j){const R=y[x+1],B=R===void 0?null:de.getElementByKey(R);Sa(y,m,T,x,k.withBefore(B??k.before))}else j&&!M&&xa(p,A,S,k.element)})(i,h,g,l,u,s)}d.__lexicalTextContent=oe,d.__lexicalFirstTextKey=qe,oe=a+oe})(n,e,Dt(e,t,de)),Se(e)||(r=e,ze==null||ze===r.__textFormat||Di||r.setTextFormat(ze),(function(o){Ye==null||Ye===o.__textStyle||Di||o.setTextStyle(Ye)})(e))}function Bu(n,e,t){const r=e.__lexicalFirstTextKey;if(r!=null){const o=n.__key;let i=r;for(;i!==null;){const s=De.get(i);if(s===void 0){i=null;break}if(s.__parent===o)break;i=s.__parent}if(i!==null&&!t.has(i)){const s=De.get(r);if(D(s))return ze=s.getFormat(),void(Ye=s.getStyle())}}e.__lexicalFirstTextKey=qe}function an(n,e){const t=zt.get(n);let r=De.get(n);t!==void 0&&r!==void 0||$(61);const o=ln||po.has(n)||go.has(n),i=Pr(de,n);if(t===r&&!o){let s;if(C(t)){const a=i.__lexicalTextContent;typeof a!="string"&&$(355,t.getType()),s=a,_a(i)}else s=t.getTextContent();return oe+=s,i}if(t!==r&&o&&Il(So,vo,ls,r,"updated"),Un.$updateDOM(r,t,i,de)){const s=Cn(n,null);return e===null&&$(62),e.replaceChild(s,i),xn(n,null),s}if(C(t)){C(r)||$(334,n);const s=r.__indent;(ln||s!==t.__indent)&&Cf(i,s);const a=r.__format;(ln||a!==t.__format)&&vf(i,a);const l=o&&(pt(r).size>0||pt(t).size>0)?Iu(t,r,i):"";if(o){const u=oe;if(Am(t,r,i),Oe(r)||r.isInline()||Tf(0,r,i),l!==""){const c=i.__lexicalTextContent||"";i.__lexicalTextContent=l+c,oe=u+l+c,i.__lexicalSlotTextLength=l.length}else(pt(r).size>0||pt(t).size>0)&&(i.__lexicalSlotTextLength=0)}else{const u=i.__lexicalTextContent;typeof u!="string"&&$(356,t.getType()),oe+=u,_a(i)}if((ln||r.__dir!==t.__dir||r.__parent!==t.__parent)&&(Ca(i,r),Oe(r)&&!ln))for(const u of r.getChildren())C(u)&&Ca(Pr(de,u.getKey()),u)}else{const s=r.getTextContent();if(ne(r)){const a=r.decorate(de,Co);a!==null&&Nf(n,a),o&&(pt(r).size>0||pt(t).size>0)&&Iu(t,r,i)}oe+=s}if(!Di&&Oe(r)){const s=r.getLatest();if(s.__cachedText!==oe){const a=s.getWritable();a.__cachedText=oe,r=a}}return Un.$decorateDOM(r,t,i,de),xf(r),i}function Nf(n,e){let t=de._pendingDecorators;const r=de._decorators;if(t===null){if(r[n]===e)return;t=Nh(de)}t[n]=e}function Is(n){let e=n.nextSibling;return e!==null&&e===de._blockCursorElement&&(e=e.nextSibling),e}function Ku(n,e){const t=new Set;for(let r=e;r<n.length;r++)t.add(n[r]);return t}function Fm(n,e,t,r,o,i){oe="",ze=null,Ye=null,qe=null,ln=r===2,de=t,Co=t._config,Un=t._config.dom||Bi,vo=t._nodes,ls=de._listeners.mutation,go=o,po=i,zt=n._nodeMap,ba=n,De=e._nodeMap,Di=e._readOnly,qn=hf(t._keyToDOMMap),ka=(function(){const a=new Map,l=u=>{for(const c of u){const d=De.get(c);if(d===void 0)continue;const f=d.__parent;if(f===null)continue;let h=a.get(f);h===void 0&&(h=new Set,a.set(f,h)),h.add(c)}};return l(go.keys()),l(po),a})();const s=new Map;return So=s,an("root",null),de=void 0,vo=void 0,go=void 0,po=void 0,zt=void 0,ba=void 0,De=void 0,Co=void 0,qn=void 0,ka=void 0,So=void 0,Un=Bi,s}function wa(n){const e=qn.get(n);return e===void 0&&$(75,n),e}function W(n){return{type:n}}const qt=W("SELECTION_CHANGE_COMMAND"),Df=W("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),us=W("CLICK_COMMAND"),$f=W("BEFORE_INPUT_COMMAND"),Af=W("INPUT_COMMAND"),Ff=W("COMPOSITION_START_COMMAND"),zf=W("COMPOSITION_END_COMMAND"),vn=W("DELETE_CHARACTER_COMMAND"),vr=W("INSERT_LINE_BREAK_COMMAND"),Hn=W("INSERT_PARAGRAPH_COMMAND"),Kn=W("CONTROLLED_TEXT_INSERTION_COMMAND"),Vr=W("PASTE_COMMAND"),mi=W("REMOVE_TEXT_COMMAND"),zr=W("DELETE_WORD_COMMAND"),Or=W("DELETE_LINE_COMMAND"),Ot=W("FORMAT_TEXT_COMMAND"),zm=W("SET_TEXT_FORMAT_COMMAND"),cs=W("UNDO_COMMAND"),ds=W("REDO_COMMAND"),fs=W("KEYDOWN_COMMAND"),kl=W("KEY_ARROW_RIGHT_COMMAND"),Of=W("MOVE_TO_END"),xl=W("KEY_ARROW_LEFT_COMMAND"),Mf=W("MOVE_TO_START"),Cl=W("KEY_ARROW_UP_COMMAND"),vl=W("KEY_ARROW_DOWN_COMMAND"),$i=W("KEY_ENTER_COMMAND"),jf=W("KEY_SPACE_COMMAND"),hs=W("KEY_BACKSPACE_COMMAND"),Sl=W("KEY_ESCAPE_COMMAND"),wl=W("KEY_DELETE_COMMAND"),El=W("KEY_TAB_COMMAND"),Om=W("INSERT_TAB_COMMAND"),Mm=W("INDENT_CONTENT_COMMAND"),Wu=W("OUTDENT_CONTENT_COMMAND"),Rf=W("DROP_COMMAND"),Pf=W("FORMAT_ELEMENT_COMMAND"),Lf=W("DRAGSTART_COMMAND"),If=W("DRAGOVER_COMMAND"),jm=W("DRAGEND_COMMAND"),Io=W("COPY_COMMAND"),gs=W("CUT_COMMAND"),Tl=W("SELECT_ALL_COMMAND"),Rm=W("CLEAR_EDITOR_COMMAND"),Pm=W("CLEAR_HISTORY_COMMAND"),ao=W("CAN_REDO_COMMAND"),lo=W("CAN_UNDO_COMMAND"),Bf=W("FOCUS_COMMAND"),Lm=W("BLUR_COMMAND"),Im=W("KEY_MODIFIER_COMMAND");function Bm(n){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(t,r){let o=e.get(t);o===void 0&&(o={dispose:n(t,r),holders:new Set},e.set(t,o));const i=()=>{const s=e.get(t);s&&s.holders.delete(i)&&s.holders.size===0&&(e.delete(t),s.dispose())};return o.holders.add(i),i}}}function mo(n,e,t,r){return n.addEventListener(e,t,r),n.removeEventListener.bind(n,e,t,r)}const rn=Object.freeze({}),Ea=[["keydown",function(n,e){const t=e._inputState;t.lastKeyDownTimeStamp=n.timeStamp,t.lastKeyCode=n.key,n.key!=="Backspace"&&wo(t),!e.isComposing()&&I(e,fs,n)}],["pointerdown",function(n,e){const t=Vn(n),r=n.pointerType;Lt(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&wt(e,()=>{Ji(t,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(n,e){I(e,Ff,n)}],["compositionend",function(n,e){const t=e._inputState;Pt?t.compositionPhase="ending-firefox":En||!jo&&!Ro?I(e,zf,n):(t.compositionPhase="ending-safari",t.compositionEndData=n.data)}],["input",function(n,e){n.stopPropagation();const t=e._inputState;wo(t),wt(e,()=>{Uf(n,e)||e.dispatchCommand(Af,n)},{event:n}),t.unprocessedBeforeInputData=null}],["click",function(n,e){wt(e,()=>{const t=z(),r=Pe(gt(e)),o=yt();if(r){if(N(t)){const i=t.anchor,s=i.getNode();i.type==="element"&&i.offset===0&&t.isCollapsed()&&!Oe(s)&&ge().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&o!==null&&t.is(o)&&(r.removeAllRanges(),t.dirty=!0)}else if(n.pointerType==="touch"||n.pointerType==="pen"){const i=ft(r,e._rootElement).anchorNode;(q(i)||ht(i))&&_e(To(o,r,e,n))}}if(Pt&&r!==null&&r.rangeCount===0){const i=e._rootElement;if(i!==null&&n.target===i){const s=n.clientY;let a=i.childNodes.length;for(let u=0;u<i.childNodes.length;u++){const c=i.childNodes[u];if(q(c)){const d=c.getBoundingClientRect();if(s<=(d.top+d.bottom)/2){a=u;break}}}r.setBaseAndExtent(i,a,i,a);const l=To(o,r,e,n);l!==null?_e(l):r.removeAllRanges()}}I(e,us,n)})}],["cut",rn],["copy",rn],["dragstart",rn],["dragover",rn],["dragend",rn],["paste",rn],["focus",rn],["blur",rn],["drop",rn]];Fr&&Ea.push(["beforeinput",(n,e)=>(function(t,r){const o=t.inputType;o==="deleteCompositionText"||Pt&&Fh(r)||o!=="insertCompositionText"&&wt(r,()=>{Uf(t,r)||I(r,$f,t)},{event:t})})(n,e)]);const Ta=new WeakMap,Ai=new WeakMap,Km=Bm(n=>(n.addEventListener("selectionchange",Vu),()=>n.removeEventListener("selectionchange",Vu)));function Kf(n,e,t,r,o,i){const s=n.anchor,a=n.focus,l=s.getNode(),u=he();let c;if(i!==void 0)c=i;else{const m=Pe(gt(u));c=m!==null?ft(m,u._rootElement):null}const d=c!==null?c.anchorNode:null,f=s.key,h=u.getElementByKey(f),g=t.length;return f!==a.key||!D(l)||(!o&&(!Fr||u._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||l.isDirty()&&g<2||Dh(t))&&s.offset!==a.offset&&!l.isComposing()||Et(l)||l.isDirty()&&g>1||(o||!Fr)&&h!==null&&!l.isComposing()&&d!==wn(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=Ki(p);return y===0?!p.canInsertTextBefore()||!_.canInsertTextBefore()&&!p.isComposing()||b||(function(k){const S=k.getPreviousSibling();return(D(S)||C(S)&&S.isInline())&&!S.canInsertTextAfter()})(p):y===p.getTextContentSize()&&(!p.canInsertTextAfter()||!_.canInsertTextAfter()&&!p.isComposing()||b)})(n,l)}function qu(n,e){return ht(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function Uu(n,e,t){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=ft(n,e._rootElement),a=e._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,qu(r,o)&&qu(i,s)&&!a.postDeleteSelectionToRestore)||wt(e,()=>{if(!t)return void _e(null);if(!Wo(e,r,i))return;let l=z();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(),_e(l))}if(a.postDeleteSelectionToRestore=null,N(l)){const u=l.anchor,c=u.getNode();if(l.isCollapsed()){n.type==="Range"&&r===i&&(l.dirty=!0);const d=gt(e).event,f=d?d.timeStamp:performance.now(),{format:h,style:g,offset:m,key:p,timeStamp:y}=a.collapsedSelectionFormat,_=ge(),b=e.isComposing()===!1&&_.getTextContent()==="";if(f<y+200&&u.offset===m&&u.key===p)yi(l,h,g);else if(u.type==="text")D(c)||$(141),Wf(l,c);else if(u.type==="element"&&!b){C(c)||$(259);const k=u.getNode();k.isEmpty()?(function(S,x){const w=x.getTextFormat(),v=x.getTextStyle();yi(S,w,v)})(l,k):yi(l,l.format,"")}}else{const d=u.key,f=l.focus.key,h=l.getNodes(),g=h.length,m=l.isBackward(),p=m?s:o,y=m?o:s,_=m?f:d,b=m?d:f;let k=2047,S=!1;for(let x=0;x<g;x++){const w=h[x],v=w.getTextContentSize();if(D(w)&&v!==0&&!(x===0&&w.__key===_&&p===v||x===g-1&&w.__key===b&&y===0)&&(S=!0,k&=w.getFormat(),k===0))break}l.format=S?k:0}}I(e,qt)})}function yi(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function Wf(n,e){yi(n,e.getFormat(),e.getStyle())}function qf(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Hu(n){const{lastKeyCode:e}=he()._inputState;if(n==null||n.length<=1||e==null)return;const t=e.length===1?e:e==="Enter"?`
|
|
4
4
|
`:e==="Tab"?" ":null;if(!t)return;const r=z();if(!N(r)||!r.isCollapsed())return;const o=r.anchor.getNode();if(!D(o))return;const{offset:i}=r.anchor;if(o.getTextContentSize()===i){const s=o.getNextSibling();if(t===`
|
|
5
5
|
`){if(We(s))s.selectEnd();else if(!s){const a=U(o,jr),l=a&&a.getNextSibling();C(l)&&l.selectStart()}}else t===" "?Mr(s)&&s.selectEnd():D(s)&&s.getTextContent()[0]===t&&s.select(1,1)}else o.getTextContent()[i]===t&&o.select(i+1,i+1)}function wo(n){n.isInsertTextAfterHandledSelectionCommand=!1,n.handledSelectionCommandTimeoutId!==null&&(clearTimeout(n.handledSelectionCommandTimeoutId),n.handledSelectionCommandTimeoutId=null)}function Ju(n){wo(n),n.isInsertTextAfterHandledSelectionCommand=!0,n.handledSelectionCommandTimeoutId=setTimeout(()=>wo(n),0)}function Uf(n,e){const t=Vn(n);if(q(t)&&Ji(t,e))return!0;const r=e.getRootElement();if(r===null)return!1;const o=Br(r.ownerDocument);return o!==null&&r.contains(o)&&Ji(o,e)}function Wm(n){const e=n.inputType,t=qf(n),r=he(),o=r._inputState,i=z();if(e==="insertText"&&n.data&&o.isInsertTextAfterHandledSelectionCommand){if(wo(o),n.preventDefault(),N(i)&&!i.isCollapsed()){const d=i.isBackward()?i.anchor:i.focus;i.anchor.set(d.key,d.offset,d.type),i.focus.set(d.key,d.offset,d.type)}return!0}if(e==="deleteContentBackward"){if(i===null){const d=yt();if(!N(d))return!0;_e(d.clone())}if(N(i)){const d=i.anchor.key===i.focus.key;if((function(f,h){return f.lastKeyCode==="MediaLast"&&h<f.lastKeyDownTimeStamp+30})(o,n.timeStamp)&&r.isComposing()&&d){if(Be(null),o.lastKeyDownTimeStamp=0,setTimeout(()=>{wt(r,()=>{Be(null)})},30),N(i)){const f=i.anchor.getNode();f.markDirty(),D(f)||$(142),Wf(i,f)}}else{if(Be(null),En&&t!==null&&!t.collapsed&&(i.applyDOMRange(t),!i.isCollapsed()))return n.preventDefault(),i.removeText(),!0;n.preventDefault();const f=i.anchor.getNode(),h=f.getTextContent(),g=f.canInsertTextAfter(),m=i.anchor.offset===0&&i.focus.offset===h.length;let p=Ei&&d&&!m&&g;if(p&&i.isCollapsed()&&(p=!ne(Ey(i.anchor,!0))),!p){I(r,vn,!0);const y=z();Ei&&N(y)&&y.isCollapsed()&&(o.postDeleteSelectionToRestore=y,setTimeout(()=>o.postDeleteSelectionToRestore=null))}}return!0}}if(!N(i))return!0;const s=n.data;o.unprocessedBeforeInputData!==null&&Pl(!1,r,o.unprocessedBeforeInputData),i.dirty&&o.unprocessedBeforeInputData===null||!i.isCollapsed()||Oe(i.anchor.getNode())||t===null||i.applyDOMRange(t),o.unprocessedBeforeInputData=null;const a=i.anchor,l=i.focus,u=a.getNode(),c=l.getNode();if(e==="insertText"||e==="insertTranspose"){if(s===`
|
|
6
|
-
`)n.preventDefault(),I(r,vr,!1);else if(s===In)n.preventDefault(),I(r,Hn);else if(s==null&&n.dataTransfer){const d=n.dataTransfer.getData("text/plain");n.preventDefault(),i.insertRawText(d)}else s!=null&&Kf(i,t,s,n.timeStamp,!0)?(n.preventDefault(),I(r,Kn,s),Hu(s)):o.unprocessedBeforeInputData=s;return o.lastBeforeInputInsertTextTimeStamp=n.timeStamp,!0}switch(n.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":I(r,Kn,n),Hu((n.dataTransfer?n.dataTransfer.getData("text/plain"):null)??n.data);break;case"insertFromComposition":{const d=o.hadOrphanedCompositionEvents;o.hadOrphanedCompositionEvents=!1;const f=r._compositionKey;Be(null),d||I(r,Kn,n),_i(f);break}case"insertLineBreak":Be(null),I(r,vr,!1);break;case"insertParagraph":Be(null),o.isInsertLineBreak&&!En?(o.isInsertLineBreak=!1,I(r,vr,!1)):I(r,Hn);break;case"insertFromPaste":case"insertFromPasteAsQuotation":I(r,Vr,n);break;case"deleteByComposition":(function(d,f){return d!==f||C(d)||C(f)||!Ki(d)||!Ki(f)})(u,c)&&I(r,mi,n);break;case"deleteByDrag":Lr($a),I(r,mi,n);break;case"deleteByCut":I(r,mi,n);break;case"deleteContent":I(r,vn,!1);break;case"deleteWordBackward":I(r,zr,!0);break;case"deleteWordForward":I(r,zr,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":I(r,Or,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":I(r,Or,!1);break;case"formatStrikeThrough":I(r,Ot,"strikethrough");break;case"formatBold":I(r,Ot,"bold");break;case"formatItalic":I(r,Ot,"italic");break;case"formatUnderline":I(r,Ot,"underline");break;case"historyUndo":I(r,cs);break;case"historyRedo":I(r,ds)}return!0}function qm(n){const e=he(),t=e._inputState,r=z(),o=n.data,i=qf(n);let s=!1;if(o!=null&&N(r)){const a=Pe(gt(e)),l=a!==null?ft(a,e._rootElement):null,u=n.inputType==="insertCompositionText"&&t.compositionPhase!=="ending-firefox"&&!e.isComposing();u&&(t.hadOrphanedCompositionEvents=!0);const c=r.anchor.getNode(),d=n.inputType==="insertCompositionText"&&t.compositionPhase!=="ending-firefox"&&e.isComposing()&&D(c)&&Et(c);if(!u&&!d&&Kf(r,i,o,n.timeStamp,!1,l)){if(s=!0,t.compositionPhase==="ending-firefox"){const y=Fi(e,o);if(t.compositionPhase="idle",y)return Lr(Oi),xc(),!0}const f=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;Fr&&!r.isCollapsed()&&D(f)&&l.anchorNode!==null&&f.getTextContent().slice(0,g)+o+f.getTextContent().slice(g+m)===Ah(l.anchorNode)||I(e,Kn,o);const p=o.length;Pt&&p>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(r.anchor.offset-=p,r._cachedNodes=null,r._cachedIsBackward=null),Ei&&e.isComposing()&&(t.lastKeyDownTimeStamp=0,Be(null))}}return s||(Pl(!1,e,o!==null?o:void 0),t.compositionPhase==="ending-firefox"&&(Fi(e,o||void 0),Lr(Oi),t.compositionPhase="idle")),xc(),!0}function Um(n){const e=he(),t=e._inputState,r=z();if(N(r)&&!e.isComposing()){t.compositionPhase="composing",t.hadOrphanedCompositionEvents=!1;const o=r.anchor,i=r.anchor.getNode();if(Be(o.key),Lr(
|
|
7
|
-
`){const o=z();if(N(o)||pe(o)){if(N(o)){const i=o.focus;o.anchor.set(i.key,i.offset,i.type)}return I(n,$i,null),_i(t),!1}}const r=te(t);if(r!==null&&D(r)&&Et(r)){r.markDirty();const o=z(),i=r.getTextContentSize(),s=N(o)&&o.anchor.key===t?o.anchor.offset:i;return r.select(s,s).insertText(e),!0}}return Pl(!0,n,e),_i(t),!1}function Jm(n){const e=he(),t=e._inputState;if(n.key==null)return!0;if(t.compositionPhase==="ending-safari"){const r=vc(n);if(r&&wt(e,()=>{Fi(e,t.compositionEndData)}),t.compositionPhase="idle",t.compositionEndData="",r)return!0}if((function(r){return be(r,"ArrowRight",{shiftKey:"any"})})(n))I(e,kl,n);else if((function(r){return be(r,"ArrowRight",{...sn,shiftKey:"any"})})(n))I(e,Of,n);else if((function(r){return be(r,"ArrowLeft",{shiftKey:"any"})})(n))I(e,xl,n);else if((function(r){return be(r,"ArrowLeft",{...sn,shiftKey:"any"})})(n))I(e,Mf,n);else if((function(r){return be(r,"ArrowUp",{altKey:"any",shiftKey:"any"})})(n))I(e,Cl,n);else if((function(r){return be(r,"ArrowDown",{altKey:"any",shiftKey:"any"})})(n))I(e,vl,n);else if((function(r){return be(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(n))t.isInsertLineBreak=!0,I(e,$i,n);else if((function(r){return r.key===" "})(n))I(e,jf,n);else if((function(r){return Ft&&be(r,"o",{ctrlKey:!0})})(n))n.preventDefault(),t.isInsertLineBreak=!0,I(e,vr,!0);else if((function(r){return be(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(n))t.isInsertLineBreak=!1,I(e,$i,n);else if((function(r){return be(r,"Backspace",{shiftKey:"any"})||Ft&&be(r,"h",{ctrlKey:!0})})(n))vc(n)?I(e,hs,n)&&Ju(t):(n.preventDefault(),I(e,vn,!0));else if((function(r){return r.key==="Escape"})(n))I(e,Sl,n);else if((function(r){return be(r,"Delete",{})||Ft&&be(r,"d",{ctrlKey:!0})})(n))(function(r){return r.key==="Delete"})(n)?I(e,wl,n):(n.preventDefault(),I(e,vn,!1));else if((function(r){return be(r,"Backspace",Cc)})(n))n.preventDefault(),I(e,zr,!0);else if((function(r){return be(r,"Delete",Cc)})(n))n.preventDefault(),I(e,zr,!1);else if((function(r){return Ft&&be(r,"Backspace",{metaKey:!0})})(n))n.preventDefault(),I(e,Or,!0);else if((function(r){return Ft&&(be(r,"Delete",{metaKey:!0})||be(r,"k",{ctrlKey:!0}))})(n))n.preventDefault(),I(e,Or,!1);else if((function(r){return be(r,"b",sn)})(n))n.preventDefault(),I(e,Ot,"bold");else if((function(r){return be(r,"u",sn)})(n))n.preventDefault(),I(e,Ot,"underline");else if((function(r){return be(r,"i",sn)})(n))n.preventDefault(),I(e,Ot,"italic");else if((function(r){return be(r,"Tab",{shiftKey:"any"})})(n))I(e,El,n);else if((function(r){return be(r,"z",sn)})(n))n.preventDefault(),I(e,cs);else if((function(r){return Ft?be(r,"z",{metaKey:!0,shiftKey:!0}):be(r,"y",{ctrlKey:!0})||be(r,"z",{ctrlKey:!0,shiftKey:!0})})(n))n.preventDefault(),I(e,ds);else{const r=e._editorState._selection;(function(o){return be(o,"a",sn)})(n)?(n.preventDefault(),I(e,Tl,n)&&Ju(t)):r===null||N(r)||((function(o){return be(o,"c",sn)})(n)?(n.preventDefault(),I(e,Io,n)):(function(o){return be(o,"x",sn)})(n)&&(n.preventDefault(),I(e,gs,n)))}return(function(r){return r.ctrlKey||r.shiftKey||r.altKey||r.metaKey})(n)&&e.dispatchCommand(Im,n),!0}function Hf(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const Sr=new Map;function Vu(n){const e=Ny(n.target);if(e===null)return;const t=Bl(n.target);let r=null,o=null;const i=t!==null?Ai.get(t):void 0;if(t!==null){if(i!==void 0){const d=i.editors;let f=i.hasShadowEditor;if(f===void 0){f=!1;for(const h of d)if(h._rootElement!==null&&Zt(h._rootElement.getRootNode())){f=!0;break}i.hasShadowEditor=f}if(f){let h=null,g=null;for(const m of d){const p=m._rootElement;if(p===null)continue;const y=ft(e,p).anchorNode;if(y!==null&&Er(y)===m){if(Zt(p.getRootNode())){r=m,o=y;break}h===null&&(h=m,g=y)}}r===null&&h!==null&&(r=h,o=g)}else{const h=e.anchorNode;h===null||q(h)&&h.shadowRoot!==null||(r=Er(h),r!==null&&(o=h))}}if(r===null){const d=Br(t);r=d!==null?Er(d):null}}if(r===null)return;if(r._inputState.isSelectionChangeFromMouseDown){if(i!==void 0)for(const d of i.editors)d._inputState.isSelectionChangeFromMouseDown=!1;wt(r,()=>{const d=yt(),f=o??ft(e,r._rootElement).anchorNode;(q(f)||ht(f))&&_e(To(d,e,r,n))})}const s=Rl(r),a=s[s.length-1],l=a._key,u=Sr.get(l),c=u||a;c!==r&&Uu(e,c,!1),Uu(e,r,!0),r!==a?Sr.set(l,r):u&&Sr.delete(l)}function Yu(n){n._lexicalHandled=!0}function Xu(n){return n._lexicalHandled===!0}function Vm(n){const e=Ta.get(n);if(e===void 0)return;const t=Ai.get(e);if(t===void 0)return;Ta.delete(n);const r=Yr(n);qo(r)?((function(i){if(i._parentEditor!==null){const s=Rl(i),a=s[s.length-1]._key;Sr.get(a)===i&&Sr.delete(a)}else Sr.delete(i._key)})(r),t.editors.delete(r),t.hasShadowEditor=void 0,n.__lexicalEditor=null):r&&$(198);const o=Hf(n);for(let i=0;i<o.length;i++)o[i]();n.__lexicalEventHandles=[]}function Na(n,e,t){Ie();const r=n.__key,o=n.getParent();if(o===null)return void(Je(n)!==null&&$(367,r,String(Je(n))));const i=(function(a){const l=z();if(!N(l)||!C(a))return l;const{anchor:u,focus:c}=l,d=u.getNode(),f=c.getNode();return Ir(d,a)&&u.set(a.__key,0,"element"),Ir(f,a)&&c.set(a.__key,0,"element"),l})(n);let s=!1;if(N(i)&&e){const a=i.anchor,l=i.focus;a.key===r&&(ji(a,n,o,n.getPreviousSibling(),n.getNextSibling()),s=!0),l.key===r&&(ji(l,n,o,n.getPreviousSibling(),n.getNextSibling()),s=!0)}else pe(i)&&e&&n.isSelected()&&n.selectPrevious();if(N(i)&&e&&!s){const a=n.getIndexWithinParent();Ut(n),Pn(i,o,a,-1)}else Ut(n);t||Se(o)||o.canBeEmpty()||!o.isEmpty()||Na(o,e),e&&i&&Oe(o)&&o.isEmpty()&&o.selectEnd()}const Jf=Symbol.for("ephemeral");function zi(n){return n[Jf]||!1}const Gu={configurable:!0,enumerable:!1,value:void 0,writable:!0};let lt=class{__type;__key;__parent;__prev;__next;__state;[xo];static getType(){const{ownNodeType:e}=ql(this);return e===void 0&&$(64,this.name),e}static clone(e){$(65,this.name)}$config(){return{}}config(e,t){const r=t.extends||Wh(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",Gu),Object.defineProperty(this,xo,Gu),wh(this,e)}getType(){return this.__type}isInline(){$(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=te(e);if(t===null)break;e=t.__parent!==null?t.__parent:Je(t)}return!1}isSelected(e){const t=e||z();if(t==null)return!1;const r=t.getNodes().some(o=>o.__key===this.__key);if(D(this))return r;if(N(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const o=this.getParent();if(ne(this)&&this.isInline()&&o){const i=t.isBackward()?t.focus:t.anchor;if(o.is(i.getNode())&&i.offset===o.getChildrenSize()&&this.is(o.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:te(e)}getParentOrThrow(){const e=this.getParent();return e===null&&$(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(Se(t)||Je(e)!==null)return C(e)||e===this&&ne(e)||$(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&$(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:te(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:te(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=C(this)?this:this.getParent(),r=C(e)?e:e.getParent(),o=t&&r?La(t,r):null;return o?o.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=La(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?Vh(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&$(279),!1)))}isParentOf(e){return Ir(e,this)}getNodesBetween(e){const t=this.isBefore(e),r=[],o=new Set;let i=this;for(;i!==null;){const s=i.__key;if(o.has(s)||(o.add(s),r.push(i)),i===e)break;const a=C(i)?t?i.getFirstChild():i.getLastChild():null;if(a!==null){i=a;continue}const l=t?i.getNextSibling():i.getPreviousSibling();if(l!==null){i=l;continue}const u=i.getParentOrThrow();if(o.has(u.__key)||r.push(u),u===e)break;let c=null,d=u;do{if(d===null&&$(68),c=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;c!==null||o.has(d.__key)||r.push(d)}while(c===null);i=c}return t||r.reverse(),r}isDirty(){const e=he()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(zi(this))return this;const e=te(this.__key);return e===null&&$(113),e}getWritable(){if(zi(this))return this;Ie();const e=yn(),t=he(),r=e._nodeMap,o=this.__key,i=this.getLatest(),s=t._cloneNotNeeded,a=z();if(a!==null&&a.setCachedNodes(null),s.has(o))return Wi(i),i;const l=Ih(i);return s.add(o),Wi(l),r.set(o,l),l}getTextContent(){return Uh(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){$(70)}updateDOM(e,t,r){$(71)}getDOMSlot(e){return new uf(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){$(18,this.name)}updateFromJSON(e){return(function(t,r){const o=t.getWritable(),i=r.$;let s=i;for(const a of kf(o).flatKeys)a in r&&(s!==void 0&&s!==i||(s={...i}),s[a]=r[a]);return(o.__state||s)&&bf(t).updateFromJSON(s),o})(this,e)}static transform(){return null}remove(e){Na(this,!0,e)}replace(e,t){Ie();let r=z();r!==null&&(r=r.clone()),Ys(this,e);const o=this.getLatest(),i=this.__key,s=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size,c=a.getParent(),d=c!==null?a.getIndexWithinParent():-1;Ut(a),c!==null&&N(r)&&Pn(r,c,d,-1);const f=o.getPreviousSibling(),h=o.getNextSibling(),g=o.__prev,m=o.__next,p=o.__parent;Na(o,!1,!0),f===null?l.__first=s:f.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&&(C(this)&&C(a)||$(139),y=a.getChildrenSize(),a.splice(y,0,this.getChildren()));const _=Tt(this);if(_.length>0){dn(this)&&dn(a)||$(368,this.__key,a.__key);for(const b of _){const k=Xn(this,b);k!==null&&(Uy(this,b),Hh(a,b,k))}}if(N(r)){_e(r);const b=r.anchor,k=r.focus;b.key===i&&(t&&b.type==="element"?b.set(a.__key,y+b.offset,"element"):tc(b,a)),k.key===i&&(t&&k.type==="element"?k.set(a.__key,y+k.offset,"element"):tc(k,a))}return Ht()===i&&Be(s),a}insertAfter(e,t=!0){Ie(),Ys(this,e);const r=this.getWritable(),o=e.getWritable();this.getParentOrThrow();const i=o.getParent(),s=z();let a=!1,l=!1;if(i!==null){const h=e.getIndexWithinParent();if(N(s)){const g=i.__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}Ut(o),t&&N(s)&&Pn(s,i,h,-1)}else Ut(o);const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=o.__key,f=r.__next;if(u===null?c.__last=d:u.getWritable().__prev=d,c.__size++,r.__next=d,o.__next=f,o.__prev=r.__key,o.__parent=r.__parent,t&&N(s)){const h=this.getIndexWithinParent();Pn(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){Ie(),Ys(this,e);const r=this.getWritable(),o=e.getWritable();this.getParentOrThrow();const i=o.__key,s=z(),a=o.getParent(),l=a!==null?o.getIndexWithinParent():-1;Ut(o),a!==null&&t&&N(s)&&Pn(s,a,l,-1);const u=this.getPreviousSibling(),c=this.getParentOrThrow().getWritable(),d=r.__prev,f=this.getIndexWithinParent();return u===null?c.__first=i:u.getWritable().__next=i,c.__size++,r.__prev=i,o.__prev=d,o.__next=r.__key,o.__parent=r.__parent,t&&N(s)&&Pn(s,this.getParentOrThrow(),f),e}isParentRequired(){return!1}createParentElementNode(){return Y()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Ie();const r=St(this);if(r!==null)return r.selectPrevious(e,t);const o=this.getPreviousSibling(),i=this.getParentOrThrow();if(o===null)return i.select(0,0);if(C(o))return o.select();if(!D(o)){const s=o.getIndexWithinParent()+1;return i.select(s,s)}return o.select(e,t)}selectNext(e,t){Ie();const r=St(this);if(r!==null)return r.selectNext(e,t);const o=this.getNextSibling(),i=this.getParentOrThrow();if(o===null)return i.select();if(C(o))return o.select(0,0);if(!D(o)){const s=o.getIndexWithinParent();return i.select(s,s)}return o.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function Vf(n){return n instanceof lt}const Da="historic",Yf="history-push",wr="history-merge",Xf="paste",Gf="cut",Ym="collaboration",Xm="skip-scroll-into-view",Gm="skip-dom-selection",$a="skip-selection-focus",Zf="composition-start",Oi="composition-end",Zm="!important";function Mi(n){const e={};if(!n)return e;let t="",r="",o=null,i=!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(i)g==="*"&&n[h+1]==="/"&&(i=!1,h++);else if(s)c===-1&&(c=h),s=!1;else if(o===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),o=g;else c!==-1&&(a?r+=n.slice(c,h):t+=n.slice(c,h),c=-1),i=!0,h++;else c===-1&&(c=h),g==="\\"?s=!0:g===o&&(o=null)}c!==-1&&(a?r+=n.slice(c,u):t+=n.slice(c,u));const d=t.trim(),f=r.trim();return d!==""&&f!==""&&(e[d]=f),e}function Qm(n,e,t){const r=t.trimEnd(),o=r.length-10;o>=0&&r.slice(o).toLowerCase()===Zm?n.setProperty(e,r.slice(0,o).trim(),"important"):n.setProperty(e,t,"")}function Sn(n,e,t=""){if(e===t)return;const r=Mi(t),o=Mi(e);for(const i in o)delete r[i],Qm(n,i,o[i]);for(const i in r)n.removeProperty(i)}function Bs(n,e){return 16&e?"code":e&yl?"mark":32&e?"sub":64&e?"sup":null}function Ks(n,e){return 1&e?"strong":2&e?"em":"span"}function Qf(n,e,t,r,o){const i=r.classList;let s=Tr(o,"base");s!==void 0&&i.add(...s),s=Tr(o,"underlineStrikethrough");let a=!1;const l=8&e&&4&e;s!==void 0&&(8&t&&4&t?(a=!0,l||i.add(...s)):l&&i.remove(...s));for(const u in hn){const c=hn[u];if(s=Tr(o,u),s!==void 0)if(t&c){if(a&&(u==="underline"||u==="strikethrough")){e&c&&i.remove(...s);continue}((e&c)===0||l&&u==="underline"||u==="strikethrough")&&i.add(...s)}else e&c&&i.remove(...s)}}function eh(n,e,t){const r=t.isComposing(),o=n+(r?ko:""),i=we(),s=vs(i).$getDOMSlot(t,e,i),a=s.getFirstChild();if(a===null||a.nodeType!==Node.TEXT_NODE)return void s.insertChild(ae().createTextNode(o));const l=a,u=l.nodeValue;if(u!==o)if(r||Pt){const[c,d,f]=(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,o);d!==0&&l.deleteData(c,d),l.insertData(c,f)}else l.nodeValue=o}function Zu(n,e,t,r,o,i){eh(o,n,e);const s=i.theme.text;s!==void 0&&Qf(0,0,r,n,s)}function Zo(n,e){const t=ae().createElement(e);return t.appendChild(n),t}function Aa(n){return n!=null&&n.__isInlineFormattable===!0}class gn extends lt{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config("text",{importDOM:{"#text":()=>({conversion:ry,priority:0}),b:()=>({conversion:ty,priority:0}),code:()=>({conversion:on,priority:0}),em:()=>({conversion:on,priority:0}),i:()=>({conversion:on,priority:0}),mark:()=>({conversion:on,priority:0}),s:()=>({conversion:on,priority:0}),span:()=>({conversion:ey,priority:0}),strong:()=>({conversion:on,priority:0}),sub:()=>({conversion:on,priority:0}),sup:()=>({conversion:on,priority:0}),u:()=>({conversion:on,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 bm[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Ht()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=hn[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Jn(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){const r=this.__format,o=Bs(0,r),i=Ks(0,r),s=o===null?i:o,a=ae().createElement(s);let l=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),o!==null&&(l=ae().createElement(i),a.appendChild(l)),Zu(l,this,0,r,this.__text,e);const u=this.__style;return u!==""&&Sn(a.style,u),a}updateDOM(e,t,r){const o=this.__text,i=e.__format,s=this.__format,a=Bs(0,i),l=Bs(0,s),u=Ks(0,i),c=Ks(0,s);if((a===null?u:a)!==(l===null?c:l))return!0;if(a===l&&u!==c){const m=t.firstChild;m==null&&$(48);const p=ae().createElement(c);return Zu(p,this,0,s,o,r),t.replaceChild(p,m),!1}let d=t;l!==null&&a!==null&&(d=t.firstChild,d==null&&$(49)),eh(o,d,this);const f=r.theme.text;f!==void 0&&i!==s&&Qf(0,i,s,d,f);const h=e.__style,g=this.__style;return h!==g&&Sn(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 q(t)||$(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=Zo(t,"b")),this.hasFormat("italic")&&(t=Zo(t,"i")),this.hasFormat("strikethrough")&&(t=Zo(t,"s")),this.hasFormat("underline")&&(t=Zo(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"?hn[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail=typeof e=="string"?mm[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=Jn(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=_m[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){Ie();let r=e,o=t;const i=z(),s=this.getTextContent(),a=this.__key;if(typeof s=="string"){const l=s.length;r===void 0&&(r=l),o===void 0&&(o=l)}else r=0,o=0;if(!N(i))return ch(a,r,a,o,"text","text");{const l=Ht();l!==i.anchor.key&&l!==i.focus.key||Be(a),i.setTextNodeRange(this,r,this,o)}return i}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,o){const i=this.getWritable(),s=i.__text,a=r.length;let l=e;l<0&&(l=a+l,l<0&&(l=0));const u=z();if(o&&N(u)){const d=e+a;u.setTextNodeRange(i,d,i,d)}const c=s.slice(0,l)+r+s.slice(l+t);return i.__text=c,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Ie();const t=this.getLatest(),r=t.getTextContent();if(r==="")return[];const o=t.__key,i=Ht(),s=r.length;e.sort((v,E)=>v-E),e.push(s);const a=[],l=e.length;for(let v=0,E=0;v<s&&E<=l;E++){const A=e[E];A>v&&(a.push(r.slice(v,A)),v=A)}const u=a.length;if(u===1)return[t];const c=a[0],d=t.getParent();let f;const h=t.getFormat(),g=t.getStyle(),m=t.__detail;let p=!1,y=null,_=null;const b=z();if(N(b)){const[v,E]=b.isBackward()?[b.focus,b.anchor]:[b.anchor,b.focus];v.type==="text"&&v.key===o&&(y=v),E.type==="text"&&E.key===o&&(_=E)}t.isSegmented()?(f=Fe(c),f.__format=h,f.__style=g,f.__detail=m,f.__state=zu(t,f),p=!0):f=t.setTextContent(c);const k=[f];for(let v=1;v<u;v++){const E=Fe(a[v]);E.__format=h,E.__style=g,E.__detail=m,E.__state=zu(t,E);const A=E.__key;i===o&&Be(A),k.push(E)}const S=y?y.offset:null,x=_?_.offset:null;let w=0;for(const v of k){if(!y&&!_)break;const E=w+v.getTextContentSize();if(y!==null&&S!==null&&S<=E&&S>=w&&(y.set(v.getKey(),S-w,"text"),S<E&&(y=null)),_!==null&&x!==null&&x<=E&&x>=w){_.set(v.getKey(),x-w,"text");break}w=E}if(d!==null){(function(A){const T=A.getPreviousSibling(),M=A.getNextSibling();T!==null&&Wi(T),M!==null&&Wi(M)})(this);const v=d.getWritable(),E=this.getIndexWithinParent();p?(v.splice(E,0,k),this.remove()):v.splice(E,1,k),N(b)&&Pn(b,d,E,u-1)}return k}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||$(50);const r=this.__key,o=e.__key,i=this.__text,s=i.length;Ht()===o&&Be(r);const a=z();if(N(a)){const d=a.anchor,f=a.focus;d!==null&&d.key===o&&cc(d,t,r,e,s),f!==null&&f.key===o&&cc(f,t,r,e,s)}const l=e.__text,u=t?l+i:i+l;this.setTextContent(u);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function ey(n){return{forChild:Nl(n.style),node:null}}function ty(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:Nl(e.style,t?void 0:"bold"),node:null}}const Qu=new WeakMap;function ny(n){if(!q(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function ry(n){const e=n;n.parentElement===null&&$(129);let t=e.textContent||"";if((function(r){let o,i=r.parentNode;const s=[r];for(;i!==null&&(o=Qu.get(i))===void 0&&!ny(i);)s.push(i),i=i.parentNode;const a=o===void 0?i:o;for(let l=0;l<s.length;l++)Qu.set(s[l],a);return a})(e)!==null)return{node:No(t)};if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,o=!0;for(;r!==null&&(r=ec(r,!1))!==null;){const i=r.textContent||"";if(i.length>0){/[ \t\n]$/.test(i)&&(t=t.slice(1)),o=!1;break}}o&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,o=!0;for(;r!==null&&(r=ec(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){o=!1;break}o&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:Fe(t)}}function ec(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const i=t.parentElement;if(i===null)return null;t=i}if(t=r,q(t)){const i=t.style.display;if(i===""&&!Ui(t)||i!==""&&!i.startsWith("inline"))return null}let o=t;for(;(o=e?t.firstChild:t.lastChild)!==null;)t=o;if(ht(t))return t;if(t.nodeName==="BR")return null}}const oy={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function on(n){const e=oy[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:Nl(n.style,e),node:null}}function Fe(n=""){return tt(new gn(n))}function D(n){return n instanceof gn}function Nl(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),o=t==="700"||t==="bold",i=r.includes("line-through"),s=n.fontStyle==="italic",a=r.includes("underline"),l=n.verticalAlign;return u=>((D(u)||Aa(u))&&(o&&!u.hasFormat("bold")&&u.toggleFormat("bold"),i&&!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 ps extends gn{$config(){return this.config("tab",{extends:gn})}constructor(e=void 0){super(" ",e),this.__detail=2}createDOM(e){const t=super.createDOM(e),r=Tr(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}setTextContent(e){return super.setTextContent(" ")}spliceText(e,t,r,o){return r===""&&t===0||r===" "&&t===1||$(286),this}setDetail(e){return e!==2&&$(127),this}setMode(e){return e!=="normal"&&$(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Bo(){return tt(new ps)}function Mr(n){return n instanceof ps}class iy{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:Fo(Ve(Ze(this,"next")),Ve(Ze(e,"next")))<0}getNode(){const e=te(this.key);return e===null&&$(20),e}set(e,t,r,o){const i=this._selection,s=this.key;o&&this.key===e&&this.offset===t&&this.type===r||(this.key=e,this.offset=t,this.type=r,Tn()||(Ht()===s&&Be(e),i!==null&&(i.setCachedNodes(null),N(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}}function dt(n,e,t){return new iy(n,e,t)}function Ws(n,e){let t=e.__key,r=n.offset,o="element";if(D(e)){o="text";const i=e.getTextContentSize();r>i&&(r=i)}else if(!C(e)){const i=e.getNextSibling();if(D(i))t=i.__key,r=0,o="text";else{const s=e.getParent();s&&(t=s.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,o)}function tc(n,e){if(C(e)){const t=e.getLastDescendant();C(t)||D(t)?Ws(n,t):Ws(n,e)}else Ws(n,e)}function nc(n,e,t,r){const o=n.getNode(),i=o.getChildAtIndex(n.offset),s=Fe();if(s.setFormat(t),s.setStyle(r),en(i))i.splice(0,0,[s]);else if(i!==null){const a=Se(o)?Y().append(s):s;i.insertBefore(a)}else if(Se(o)){const a=o.getLastChild();C(a)&&!a.isInline()&&a.isEmpty()?a.append(s):o.append(Y().append(s))}else o.append(s);n.is(e)&&e.set(s.__key,0,"text"),n.set(s.__key,0,"text")}function rc(n,e,t,r){const o=n.anchor.getNode();D(o)||$(398);const i=n.anchor.offset,s=Fe(e);s.setFormat(t),s.setStyle(r);const a=o.getParentOrThrow();if(i===0)a.isInline()&&!o.__prev?a.insertBefore(s):o.insertBefore(s,!1);else if(i===o.getTextContentSize())a.isInline()&&!o.__next?a.insertAfter(s):o.insertAfter(s,!1);else{const[l]=o.splitText(i);l.insertAfter(s,!1)}o.getTextContent()===""&&o.isAttached()&&o.remove(),s.selectEnd(),s.isComposing()&&n.anchor.type==="text"&&n.anchor.set(n.anchor.key,n.anchor.offset-e.length,n.anchor.type)}class ms{_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(!pe(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(o=>r.has(o))}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 ms(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes().filter(s=>Je(s)===null),r=t.length;if(r===0)return;const o=t[r-1];let i;if(D(o))i=o.select();else{const s=o.getIndexWithinParent()+1;i=o.getParentOrThrow().select(s,s)}i.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 o of t){const i=te(o);i!==null&&r.push(i)}return Tn()||(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=>Je(t)===null);if((z()||yt())===this&&e[0]){const t=ue(e[0],"next");qr(jt(t,t))}for(const t of e)t.remove();th()}}function th(){const n=ge();if(n.isEmpty()){const e=Y();n.append(e),e.select()}}function N(n){return n instanceof rr}class rr{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,r,o){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=r,this.style=o,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 o=[],[i,s]=r.getTextSlices();i&&o.push(i.caret.origin);const a=new Set,l=new Set;for(const u of r)if(Xe(u)){const{origin:c}=u;o.length===0?a.add(c):(l.add(c),o.push(c))}else{const{origin:c}=u;C(c)&&l.has(c)||o.push(c)}if(s&&o.push(s.caret.origin),It(r.focus)&&C(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=Re(r.focus.origin,"previous");Xe(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(o[o.length-1]);u=Qn(u))a.delete(u.origin),o.pop();for(;o.length>1;){const u=o[o.length-1];if(!C(u)||l.has(u)||u.isEmpty()||a.has(u))break;o.pop()}if(o.length===0&&r.isCollapsed()){const u=Ve(r.anchor),c=Ve(r.anchor.getFlipped()),d=h=>Nt(h)?h.origin:h.getNodeAtCaret(),f=d(u)||d(c)||(r.anchor.getNodeAtCaret()?u.origin:c.origin);o.push(f)}return o})(Yl(Ia(this),"next"));return Tn()||(this._cachedNodes=t),t}setTextNodeRange(e,t,r,o){return this.anchor.set(e.__key,t,"text"),this.focus.set(r.__key,o,"text"),this}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],o=this.anchor,i=this.focus,s=o.isBefore(i),[a,l]=Fa(this);let u="",c=!0;for(let d=0;d<e.length;d++){const f=e[d];if(C(f)&&!f.isInline()){c||(u+=`
|
|
8
|
-
`);let h="";for(const g of Tt(f)){const m=Xn(f,g);m!==null&&(h+=m.getTextContent())}h!==""?(u+=h,c=!1):c=!f.isEmpty()}else if(c=!1,D(f)){let h=f.getTextContent();f===t?f===r?o.type==="element"&&i.type==="element"&&i.offset!==o.offset||(h=a<l?h.slice(a,l):h.slice(l,a)):h=s?h.slice(a):h.slice(l):f===r&&(h=s?h.slice(0,l):h.slice(0,a)),u+=h}else!ne(f)&&!We(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(e){const t=he(),r=t.getEditorState()._selection,o=uh(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(o===null)return;const[i,s,a]=o;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(s.key,s.offset,s.type,!0),a&&(this.dirty=!0),Kt(this)}clone(){const e=this.anchor,t=this.focus;return new rr(dt(e.key,e.offset,e.type),dt(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Jn(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=hn[e];return(this.format&t)!==0}insertRawText(e){this.insertNodes(No(e))}insertText(e){let t=this.format,r=this.style;if(!this.isCollapsed()){const d=(this.focus.isBefore(this.anchor)?this.focus:this.anchor).getNode();if(D(d)&&(t=d.getFormat(),r=d.getStyle()),this.removeText(),this.format=t,this.style=r,e==="")return;if(Ht()===null)return this.anchor.type==="element"&&nc(this.anchor,this.focus,t,r),void rc(this,e,t,r)}this.anchor.type==="element"&&nc(this.anchor,this.focus,t,r);const o=this.anchor.getNode();D(o)||$(398);const i=this.anchor.offset,s=o.getParentOrThrow(),a=o.getTextContentSize();if(Et(o)||i===0&&(!o.canInsertTextBefore()||!s.canInsertTextBefore()&&!o.__prev)||i===a&&(!o.canInsertTextAfter()||!s.canInsertTextAfter()&&!o.__next)){if(o.isSegmented()&&i!==0&&i!==a){if(Ht()!==null)o.setMode("normal").setFormat(t).setStyle(r);else{const f=Fe(o.getTextContent());f.setFormat(t),f.setStyle(r),o.replace(f),f.select(i,i)}return void(e!==""&&this.insertText(e))}if(e==="")return;if(i===0){const f=o.getPreviousSibling();if(D(f)&&f.canInsertTextAfter()&&!Et(f))f.select();else{const h=Fe();h.setFormat(t),h.setStyle(r),s.canInsertTextBefore()?o.insertBefore(h):s.insertBefore(h),h.select()}return void this.insertText(e)}if(i===a){const f=o.getNextSibling();if(D(f)&&f.canInsertTextBefore()&&!Et(f))f.select(0,0);else{const h=Fe();h.setFormat(t),h.setStyle(r),s.canInsertTextAfter()?o.insertAfter(h):s.insertAfter(h),h.select(0,0)}return void this.insertText(e)}const d=Fe(e);return d.setFormat(t),d.setStyle(r),o.replace(d),void d.select()}if(e==="")return;const l=s.isInline()&&i===0&&!o.__prev,u=s.isInline()&&i===a&&!o.__next,c=o.getFormat()!==t||o.getStyle()!==r;if(l||u||c){if(o.getTextContent()!==""||l||u)return void rc(this,e,t,r);o.setFormat(t),o.setStyle(r)}o.spliceText(i,0,e,!0),o.isComposing()&&this.anchor.type==="text"&&this.anchor.set(this.anchor.key,this.anchor.offset-e.length,this.anchor.type)}removeText(){const e=z()===this;Ci(this,Qy(Ia(this))),e&&z()!==this&&_e(this)}formatText(e,t=null){rh(this,e,t)}insertNodes(e){if(e.length===0)return;this.isCollapsed()||this.removeText();const t=this.anchor.getNode();if(this.anchor.type==="element"&&C(t)&&Je(t)!==null){let m=t.isShadowRoot()?t.getFirstChild()??t.append(Y()).getFirstChild():t.getFirstChild();if(t.isShadowRoot()&&m!==null&&!C(m)){const p=Y();m.insertBefore(p),m=p}if(m!==null){m.selectStart();const p=z();return N(p)||$(369),p.insertNodes(e)}}if(this.anchor.type==="element"&&Se(t)){const m=Us(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(),o=U(r,Ue);const i=e[e.length-1];if(C(o)&&"__language"in o){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const m=to(this);o.splice(m,0,e),i.selectEnd()}return}if(!e.some(m=>(C(m)||ne(m))&&!m.isInline())){C(o)||$(211,r.constructor.name,r.getType());const m=to(this);return o.splice(m,0,e),void i.selectEnd()}if(C(o)&&Je(o)!==null){const m=to(this),p=Oa(e);o.splice(m,0,p);const y=p[p.length-1];return void(y!==void 0?y.selectEnd():o.select(m,m))}if(o===null){const m=Us(e),p=m.getLastDescendant();let y=Ze(this.anchor,"next");for(const _ of m.getChildren())y=Ns(_,y);return void(p!==null&&p.selectEnd())}if(C(o)&&!o.isParentRequired()&&!Se(o.getParentOrThrow())){const m=to(this),p=Oa(e);o.splice(m,0,p);const y=p[p.length-1];return void(y!==void 0?y.selectEnd():o.select(m,m))}const s=Us(e),a=s.getLastDescendant(),l=s.getChildren(),u=!C(o)||!o.isEmpty()?this.insertParagraph():null;u&&!o.isAttached()&&(r=this.anchor.getNode(),o=U(r,Ue));const c=l[l.length-1];let d=l[0];var f;C(f=d)&&Ue(f)&&!f.isEmpty()&&C(o)&&(!o.isEmpty()||o.canMergeWhenEmpty())&&(C(o)||$(211,r.constructor.name,r.getType()),o.append(...d.getChildren()),d=l[1]),d&&(o===null&&$(212,r.constructor.name,r.getType()),(function(m,p){const y=p.getParentOrThrow().getLastChild();let _=p;const b=[p];for(;_!==y;)_.getNextSibling()||$(140),_=_.getNextSibling(),b.push(_);let k=m;for(const S of b)k=k.insertAfter(S)})(o,d));const h=U(a,Ue);u&&C(h)&&(u.canMergeWhenEmpty()||Ue(c))&&(h.append(...u.getChildren()),u.remove()),C(o)&&o.isEmpty()&&o.remove(),a.selectEnd();const g=C(o)?o.getLastChild():null;We(g)&&h!==o&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if(this.anchor.type==="element"&&Se(e)){const a=Y();return e.splice(this.anchor.offset,0,[a]),a.select(),a}const t=to(this),r=U(this.anchor.getNode(),Ue);if(r!==null&&Je(r)!==null)return null;C(r)||$(213);const o=r.getChildAtIndex(t),i=o?[o,...o.getNextSiblings()]:[],s=r.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(e){const t=Gt();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),o=t.getIndexWithinParent();r.select(o,o)}}extract(){const e=[...this.getNodes()],t=e.length;let r=e[0],o=e[t-1];const[i,s]=Fa(this),a=this.isBackward(),[l,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[c,d]=a?[s,i]:[i,s];if(t===0)return[];if(t===1){if(D(r)&&!this.isCollapsed()){const f=r.splitText(c,d),h=c===0?f[0]:f[1];return h?(l.set(h.getKey(),0,"text"),u.set(h.getKey(),h.getTextContentSize(),"text"),[h]):[]}return[r]}if(D(r)&&(c===r.getTextContentSize()?e.shift():c!==0&&([,r]=r.splitText(c),e[0]=r,l.set(r.getKey(),0,"text"))),D(o)){const f=o.getTextContent().length;d===0?e.pop():d!==f&&([o]=o.splitText(d),e[e.length-1]=o,u.set(o.getKey(),o.getTextContentSize(),"text"))}return e}modify(e,t,r){if(Pi(this,e,t,r))return;const o=e==="move",i=he(),s=Pe(gt(i));if(!s)return;const a=i._blockCursorElement,l=i._rootElement,u=this.focus.getNode();l===null||a===null||!C(u)||u.isInline()||u.canBeEmpty()||qi(a,i,l);const c=Pr(i,this.focus.key);let d=c;if(this.focus.type==="text"&&(d=D(u)?wn(u,c,i):null),this.dirty){const f=Pr(i,this.anchor.key);let h=f;if(this.anchor.type==="text"){const g=this.anchor.getNode();h=D(g)?wn(g,f,i):null}h&&d&&Ri(s,h,this.anchor.offset,d,this.focus.offset)}if(r==="character"&&D(u)&&u.isUnmergeable()&&(t?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const f=ue(u,t?"previous":"next").getNodeAtCaret();if(D(f)){if(!o){const h=f.getTextContentSize();return t?this.focus.set(f.__key,h-1,"text"):this.focus.set(f.__key,1,"text"),void(this.dirty=!0)}{const h=i.getElementByKey(f.getKey()),g=h?wn(f,h,i):null;if(g){const m=t?g.length:0;Ri(s,g,m,g,m)}}}}if(ih(s,e,t?"backward":"forward",r),s.rangeCount>0){const f=Cs(s,i._rootElement),h=f||s.getRangeAt(0),g=this.anchor.getNode(),m=Oe(g)?g:zh(g);this.applyDOMRange(h),this.dirty=!0,!o&&(sh(this,t,m),(f?s.direction!=="backward":s.anchorNode===h.startContainer&&s.anchorOffset===h.startOffset)||oh(this))}r==="lineboundary"&&Pi(this,e,t,r,"decorators")}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&C(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const o=t.getParent(),i=t.getNextSibling()||(o===null?null:o.getNextSibling());if(C(i)&&i.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let o=r.getNode();if(this.forwardDeletion(r,o,e))return;const i=Wr(Ze(r,e?"previous":"next"));if(i.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of i.iterNodeCarets("shadowRoot"))if(Xe(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(C(i.anchor.origin)&&i.anchor.origin.isEmpty()){const u=Ve(l);Ci(this,jt(u,u)),i.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(It(l)){if(C(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(i.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(ne(l.origin)){if(!l.origin.isIsolated())if(Tt(l.origin).length>0){if(C(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();const u=Eo();u.add(l.origin.getKey()),_e(u)}}else if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&C(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();const u=Eo();u.add(l.origin.getKey()),_e(u)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:u}=a;return Tt(u).length>0?void 0:l.origin.isEmpty()&&!u.isEmpty()&&l.origin.getParent()===u.getParent()?void l.origin.remove(!0):(Ci(this,jt(!l.origin.isEmpty()&&u.isEmpty()?Fn(ue(u,l.direction)):i.anchor,l)),this.removeText())}for(let l=r.getNode();l!==null;){if(Je(l)!==null)return;if(C(l)&&l.isShadowRoot())break;l=l.getParent()}}const s=this.focus;if(qs(this,e,"character"),this.isCollapsed()){if(e&&r.offset===0&&ic(this,r.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(o=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,u=a.getTextContentSize();if(a.is(o)||e&&l!==u||!e&&l!==0)return void sc(a,e,l)}else if(o!==null&&o.isSegmented()){const l=r.offset,u=o.getTextContentSize();if(o.is(a)||e&&l!==0||!e&&l!==u)return void sc(o,e,l)}(function(l,u){const c=l.anchor,d=l.focus,f=c.getNode(),h=d.getNode();if(f===h&&c.type==="text"&&d.type==="text"){const g=c.offset,m=d.offset,p=g<m,y=p?g:m,_=p?m:g,b=_-1;y!==b&&(function(k){return!(Dh(k)||ay(k))})(f.getTextContent().slice(y,_))&&(u?d.set(d.key,b,d.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()&&Oe(r.getParent())&&r.getPreviousSibling()===null&&ic(this,r),th()}}deleteLine(e){const t=za(this.anchor);if(t!==null&&ne(St(t)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(e);this.isCollapsed()&&qs(this,e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):U(this.anchor.getNode(),Ue)!==U(this.focus.getNode(),Ue)?(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;qs(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 Tn()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}}function pe(n){return n instanceof ms}function nh(n,e){if(pe(n)){for(const y of n.getNodes())Aa(y)&&y.setFormat(e(y.getFormat()));return}if(n.isCollapsed())return n.setFormat(e(n.format)),void Be(null);const t=[];for(const y of n.getNodes())D(y)?t.push(y):C(y)?y.setTextFormat(e(y.getTextFormat())):Aa(y)&&y.setFormat(e(y.getFormat()));const r=t.length;if(r===0)return n.setFormat(e(n.format)),void Be(null);const o=n.anchor,i=n.focus,s=n.isBackward(),a=s?i:o,l=s?o:i;let u=0,c=t[0],d=a.type==="element"?0:a.offset;if(a.type==="text"&&d===c.getTextContentSize()&&(u=1,c=t[1],d=0),c==null)return;const f=r-1;let h=t[f];const g=l.type==="text"?l.offset:h.getTextContentSize();if(c.is(h)){if(d===g)return;const y=e(c.getFormat());if(Et(c)||d===0&&g===c.getTextContentSize())c.setFormat(y);else{const _=c.splitText(d,g),b=d===0?_[0]:_[1];b.setFormat(y),a.type==="text"&&a.set(b.__key,0,"text"),l.type==="text"&&l.set(b.__key,g-d,"text")}return void(n.format=y)}d===0||Et(c)||([,c]=c.splitText(d),d=0);const m=e(c.getFormat());c.setFormat(m);const p=e(h.getFormat());g>0&&(g===h.getTextContentSize()||Et(h)||([h]=h.splitText(g)),h.setFormat(p));for(let y=u+1;y<f;y++){const _=t[y];_.setFormat(e(_.getFormat()))}a.type==="text"&&a.set(c.__key,d,"text"),l.type==="text"&&l.set(h.__key,g,"text"),n.format=m|p}function sy(n,e){const t=[];for(const[r,o]of Object.entries(e))typeof o=="boolean"&&t.push([r,o]);t.length!==0&&nh(n,r=>{for(const[o,i]of t)r=Jn(r,o,i?hn[o]:0);return r})}function rh(n,e,t=null){const r=t===null&&N(n)?Jn(n.format,e,null):t;nh(n,o=>Jn(o,e,r))}function oc(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function Fa(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]:[oc(t),oc(r)]}function ic(n,e){for(let t=e;t;t=t.getParent()){if(C(t)){if(t.collapseAtStart(n))return!0;if(Se(t))break}if(t.getPreviousSibling())break}return!1}function oh(n){const e=n.focus,t=n.anchor,r=t.key,o=t.offset,i=t.type;t.set(e.key,e.offset,e.type,!0),e.set(r,o,i,!0)}function ih(n,e,t,r){n.modify(e,t,r)}function sh(n,e,t){const r=n.getNodes(),o=r.filter(a=>Ir(a,t));if(o.length===0||o.length===r.length)return!1;const i=e?o[0]:o[o.length-1],s=C(i)?i:i.getParentOrThrow();return e?s.selectStart():s.selectEnd(),!0}function qs(n,e,t){if(Pi(n,"extend",e,t))return;const r=he(),o=Pe(gt(r));if(!o||typeof o.modify!="function")return;const i=r._blockCursorElement,s=r._rootElement,a=n.anchor,l=n.focus.getNode();s===null||i===null||!C(l)||l.isInline()||l.canBeEmpty()||qi(i,r,s);const u=E=>{const A=E.getNode(),T=r.getElementByKey(E.key);return T!==null&&E.type==="text"&&D(A)?wn(A,T,r):T},c=a.getNode(),d=u(a);if(d===null)return;const f=a.offset,h=n.isCollapsed(),g=n.focus,m=h?d:u(g);if(m===null)return;const p=g.offset;if(Ri(o,m,p,m,p),ih(o,"move",e?"backward":"forward",t),o.rangeCount===0)return;const y=Cs(o,s)||o.getRangeAt(0),_=y.startContainer,b=y.startOffset;if(h&&t==="character"&&a.type==="text"&&D(c)&&c.isUnmergeable()&&f===(e?0:c.getTextContentSize())){const E=ue(c,e?"previous":"next").getNodeAtCaret();if(D(E)){const A=e?E.getTextContentSize()-1:1;return n.focus.set(E.__key,A,"text"),void(n.dirty=!0)}}if(h&&t==="character"&&a.type==="text"){const E=e?0:c.getTextContentSize(),A=_===d?b:f!==E?E:-1;if(A>=0)return void(A!==f&&(n.focus.set(a.key,A,"text"),n.dirty=!0))}const[k,S,x,w]=e?[_,b,d,f]:[d,f,_,b],v=Oe(c)?c:zh(c);n.applyDOMRange({collapsed:!1,endContainer:x,endOffset:w,startContainer:k,startOffset:S}),n.dirty=!0,!sh(n,e,v)&&e&&oh(n),t==="lineboundary"&&Pi(n,"extend",e,t,"decorators")}const ay=(()=>{try{const n=new RegExp("\\p{Emoji}","u"),e=n.test.bind(n);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function sc(n,e,t){const r=n,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let s=0,a=0;for(let u=0;u<i;u++){const c=u===i-1;if(a=s,s+=o[u].length,e&&s===t||s>t||c){o.splice(u,1),c&&(a=void 0);break}}const l=o.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function ac(n,e,t,r){let o,i=e,s=!1;if(q(n)){let a=!1;const l=n.childNodes,u=l.length,c=r._blockCursorElement;i===u&&u>0&&(a=!0,i=u-1),Xr(n,r)!==void 0||Ji(n,r)||(s=!0);let d=l[i],f=!1;if(d===c)d=l[i+1],f=!0;else if(c!==null){const h=c.parentNode;n===h&&e>Array.prototype.indexOf.call(h.children,c)&&i--}if(o=br(d),D(o))i=Yt(o,a?"next":"previous");else{let h=br(n);if(h===null)return null;if(C(h)){const g=r.getElementByKey(h.getKey());g===null&&$(214),[h,i]=Dt(h,g,r).resolveChildIndex(h,g,n,e),C(h)||$(215),a&&i>=h.getChildrenSize()&&(i=Math.max(0,h.getChildrenSize()-1));let p=h.getChildAtIndex(i);if(C(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=C(p)?p:p.getParentOrThrow()),i=0}D(p)?(o=p,h=null,i=Yt(p,a?"next":"previous")):p!==h&&a&&!f&&(C(h)||$(216),i=Math.min(h.getChildrenSize(),i+1))}else{const g=St(h),m=g!==null?g:h,p=m.getIndexWithinParent(),y=r.getElementByKey(h.getKey());let _="after";if(y!==null&&br(n)===h){const b=Dt(h,y,r);b.element!==y?_=b.resolveLeafPosition(y,n,e):e===0&&ne(h)&&(_="before")}i=_==="before"?p:p+1,h=m.getParentOrThrow()}if(C(h))return[dt(h.__key,i,"element"),s]}}else o=br(n);return D(o)?[dt(o.__key,Yt(o,i,"clamp"),"text"),s]:null}function lc(n,e,t){const r=n.offset,o=n.getNode();if(r===0){const i=o.getPreviousSibling(),s=o.getParent();if(e){if((t||!e)&&i===null&&C(s)&&s.isInline()){const a=s.getPreviousSibling();D(a)&&n.set(a.__key,a.getTextContent().length,"text")}}else C(i)&&!t&&i.isInline()?n.set(i.__key,i.getChildrenSize(),"element"):D(i)&&!o.isUnmergeable()&&n.set(i.__key,i.getTextContent().length,"text")}else if(r===o.getTextContent().length){const i=o.getNextSibling(),s=o.getParent();if(e&&C(i)&&i.isInline())n.set(i.__key,0,"element");else if((t||e)&&i===null&&C(s)&&s.isInline()&&!s.canInsertTextAfter()&&s.getTextContentSize()>1){const a=s.getNextSibling();D(a)&&n.set(a.__key,0,"text")}}}function za(n){const e=te(n.key);return e===null?null:Ss(e)}function ah(n,e,t){const r=za(n),o=za(e);if(r===o||r!==null&&o!==null&&r.is(o))return!1;const i=t(r,o);if(r!==null)return C(r)?e.set(r.getKey(),i?r.getChildrenSize():0,"element"):e.set(r.getKey(),i?r.getTextContentSize():0,"text"),!0;const s=St(o);if(s===null)return!1;const a=s.getParent();if(a===null)return!1;const l=s.getIndexWithinParent();return e.set(a.getKey(),i?l+1:l,"element"),!0}function lh(n){const e=ah(n.anchor,n.focus,(t,r)=>(function(o,i,s,a){if(s!==null&&a!==null){const c=St(s),d=St(a);if(c!==null&&c.is(d)){for(const f of ws(c).values()){if(f===s.getKey())return!0;if(f===a.getKey())return!1}return!0}return c===null||d===null||c.isBefore(d)}if(s!==null){const c=St(s),d=te(i.key);return c===null||d===null||!(!c.is(d)&&!c.isParentOf(d))||c.isBefore(d)}const l=St(a),u=te(o.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 uh(n,e,t,r,o,i){if(n===null||t===null||!Wo(o,n,t))return null;const s=ac(n,e,N(i)?i.anchor:null,o);if(s===null)return null;const a=ac(t,r,N(i)?i.focus:null,o);if(a===null)return null;const[l,u]=s,[c,d]=a;if(l.type==="element"&&c.type==="element"){const h=br(n),g=br(t);if(ne(h)&&ne(g))return null}const f=o._slotsUsed&&ah(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);lc(h,m,p),lc(g,!m,p),p&&g.set(h.key,h.offset,h.type)}})(l,c),[l,c,u||d||f]}function jr(n){return C(n)&&!n.isInline()}function ch(n,e,t,r,o,i){const s=yn(),a=new rr(dt(n,e,o),dt(t,r,i),0,"");return a.dirty=!0,s._selection=a,a}function Dl(){const n=dt("root",0,"element"),e=dt("root",0,"element");return new rr(n,e,0,"")}function Eo(){return new ms(new Set)}function ly(n,e){return To(null,n,e,null)}function To(n,e,t,r){const o=t._window;if(o===null)return null;const i=r||o.event,s=i?i.type:void 0,a=s==="selectionchange",l=!ya&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&i&&i.detail===3||s==="drop"||s===void 0);let u,c,d,f;if(N(n)&&!l)return n.clone();{if(e===null)return null;const k=ft(e,t._rootElement);if(u=k.anchorNode,c=k.focusNode,d=k.anchorOffset,f=k.focusOffset,(a||s===void 0)&&N(n)&&!Wo(t,u,c))return n.clone()}const h=uh(u,d,c,f,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();D(S)?(y=S.getFormat(),_=S.getStyle()):C(S)&&(y=S.getTextFormat(),_=S.getTextStyle())}}const b=new rr(g,m,y,_);return p&&(b.dirty=!0),b}function z(){return yn()._selection}function yt(){return he()._editorState._selection}function Pn(n,e,t,r=1){const o=n.anchor,i=n.focus,s=o.getNode(),a=i.getNode();if(!e.is(s)&&!e.is(a))return;const l=e.__key;if(n.isCollapsed()){const u=o.offset;if(t<=u&&r>0||t<u&&r<0){const c=Math.max(0,u+r);o.set(l,c,"element"),i.set(l,c,"element"),uc(n)}}else{const u=n.isBackward(),c=u?i:o,d=c.getNode(),f=u?o:i,h=f.getNode();if(e.is(d)){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=f.offset;(t<=g&&r>0||t<g&&r<0)&&f.set(l,Math.max(0,g+r),"element")}}uc(n)}function uc(n){const e=n.anchor,t=e.offset,r=n.focus,o=r.offset,i=e.getNode(),s=r.getNode();if(n.isCollapsed()){if(!C(i))return;const a=i.getChildrenSize(),l=t>=a,u=l?i.getChildAtIndex(a-1):i.getChildAtIndex(t);if(D(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text"),r.set(u.__key,c,"text")}return}if(C(i)){const a=i.getChildrenSize(),l=t>=a,u=l?i.getChildAtIndex(a-1):i.getChildAtIndex(t);if(D(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text")}}if(C(s)){const a=s.getChildrenSize(),l=o>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(o);if(D(u)){let c=0;l&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}function ji(n,e,t,r,o){let i=null,s=0,a=null;r!==null?(i=r.__key,D(r)?(s=r.getTextContentSize(),a="text"):C(r)&&(s=r.getChildrenSize(),a="element")):o!==null&&(i=o.__key,D(o)?a="text":C(o)&&(a="element")),i!==null&&a!==null?n.set(i,s,a):(s=e.getIndexWithinParent(),s===-1&&(s=t.getChildrenSize()),n.set(t.__key,s,"element"))}function cc(n,e,t,r,o){n.type==="text"?n.set(t,n.offset+(e?0:o),"text"):n.offset>r.getIndexWithinParent()&&n.set(n.key,n.offset-1,"element")}function Ri(n,e,t,r,o){try{n.setBaseAndExtent(e,t,r,o)}catch{}}function dc(n,e,t){const r=Pr(n,e.getKey());if(C(e)){const o=Dt(e,r,n);return[o.element,t+o.getFirstChildOffset()]}return[r,t]}function uy(n,e,t,r,o,i){const s=i.getRootNode(),a=$n(s)||Zt(s)?Br(s):null;if(o.has(Ym)&&a!==i||a!==null&&jl(a,a))return;const l=ft(r,i);let u;if(!N(e))return void(n!==null&&Wo(t,l.anchorNode,l.focusNode)&&r.removeAllRanges());const c=e.anchor,d=e.focus,f=c.getNode(),h=d.getNode(),[g,m]=dc(t,f,c.offset),[p,y]=dc(t,h,d.offset),_=e.format,b=e.style,k=e.isCollapsed();let S=g,x=p,w=!1;if(c.type==="text"?(S=D(f)?wn(f,g,t):null,w=f.getFormat()!==_||f.getStyle()!==b):N(n)&&n.anchor.type==="text"&&(w=!0),d.type==="text"&&(x=D(h)?wn(h,p,t):null),S!==null&&x!==null){if(k&&(n===null||w||N(n)&&(n.format!==_||n.style!==b))&&(function(v,E,A,T,M,j){v._inputState.collapsedSelectionFormat={format:E,key:M,offset:T,style:A,timeStamp:j}})(t,_,b,m,c.key,performance.now()),(r.type!=="Range"||!k)&&l.anchorOffset===m&&l.focusOffset===y&&l.anchorNode===S&&l.focusNode===x){if(a===null||!i.contains(a)){const v=a!==null?Er(a):null;v!==null&&v!==t||o.has($a)||i.focus({preventScroll:!0})}if(c.type!=="element")return}if(Ri(r,S,m,x,y),Pt&&e.isCollapsed()&&i!==null&&!o.has($a)){const v=$o(i);if(v===null||!i.contains(v)){const E=Br(i.ownerDocument),A=E!==null?Er(E):null;A!==null&&A!==t||i.focus({preventScroll:!0})}}if(!o.has(Xm)&&e.isCollapsed()&&i!==null&&i===$o(i)){const v=N(e)&&e.anchor.type==="element"?S.childNodes[m]||null:(u===void 0&&(u=Ph(r,i)),u);if(v!==null){let E;if(ht(v)){const A=v.ownerDocument.createRange();A.selectNode(v),E=A.getBoundingClientRect()}else E=v.getBoundingClientRect();(function(A,T,M){const j=Bl(M),R=Kl(j);if(j===null||R===null)return;const B=M.getBoundingClientRect();if(T.bottom<B.top)return;let{top:Z,bottom:ie}=T,Q=0,L=0,P=M;for(;P!==null;){const K=P===j.body;if(K){const ee=R.visualViewport;if(ee){const $e=ee.offsetTop;Q=$e,L=$e+ee.height}else Q=0,L=gt(A).innerHeight;const xe=R.getComputedStyle(j.documentElement),ot=parseFloat(xe.scrollPaddingTop),re=parseFloat(xe.scrollPaddingBottom);isFinite(ot)&&(Q+=ot),isFinite(re)&&(L-=re)}else{const ee=P===M?B:P.getBoundingClientRect();Q=ee.top,L=ee.bottom}let se=0;if(Z<Q?se=-(Q-Z):ie>L&&(se=ie-L),se!==0)if(K)R.scrollBy(0,se);else{const ee=P.scrollTop;P.scrollTop+=se;const xe=P.scrollTop-ee;Z-=xe,ie-=xe}if(K)break;P=or(P)}})(t,E,i)}}(function(v){v._inputState.isSelectionChangeFromDOMUpdate=!0})(t)}}function ys(n){let e=z()||yt();e===null&&(e=ge().selectEnd()),e.insertNodes(n)}function dh(n,e){for(const t of n.split(/(\r?\n|\t)/))t===`
|
|
6
|
+
`)n.preventDefault(),I(r,vr,!1);else if(s===In)n.preventDefault(),I(r,Hn);else if(s==null&&n.dataTransfer){const d=n.dataTransfer.getData("text/plain");n.preventDefault(),i.insertRawText(d)}else s!=null&&Kf(i,t,s,n.timeStamp,!0)?(n.preventDefault(),I(r,Kn,s),Hu(s)):o.unprocessedBeforeInputData=s;return o.lastBeforeInputInsertTextTimeStamp=n.timeStamp,!0}switch(n.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":I(r,Kn,n),Hu((n.dataTransfer?n.dataTransfer.getData("text/plain"):null)??n.data);break;case"insertFromComposition":{const d=o.hadOrphanedCompositionEvents;o.hadOrphanedCompositionEvents=!1;const f=r._compositionKey;Be(null),d||I(r,Kn,n),_i(f);break}case"insertLineBreak":Be(null),I(r,vr,!1);break;case"insertParagraph":Be(null),o.isInsertLineBreak&&!En?(o.isInsertLineBreak=!1,I(r,vr,!1)):I(r,Hn);break;case"insertFromPaste":case"insertFromPasteAsQuotation":I(r,Vr,n);break;case"deleteByComposition":(function(d,f){return d!==f||C(d)||C(f)||!Ki(d)||!Ki(f)})(u,c)&&I(r,mi,n);break;case"deleteByDrag":Lr($a),I(r,mi,n);break;case"deleteByCut":I(r,mi,n);break;case"deleteContent":I(r,vn,!1);break;case"deleteWordBackward":I(r,zr,!0);break;case"deleteWordForward":I(r,zr,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":I(r,Or,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":I(r,Or,!1);break;case"formatStrikeThrough":I(r,Ot,"strikethrough");break;case"formatBold":I(r,Ot,"bold");break;case"formatItalic":I(r,Ot,"italic");break;case"formatUnderline":I(r,Ot,"underline");break;case"historyUndo":I(r,cs);break;case"historyRedo":I(r,ds)}return!0}function qm(n){const e=he(),t=e._inputState,r=z(),o=n.data,i=qf(n);let s=!1;if(o!=null&&N(r)){const a=Pe(gt(e)),l=a!==null?ft(a,e._rootElement):null,u=n.inputType==="insertCompositionText"&&t.compositionPhase!=="ending-firefox"&&!e.isComposing();u&&(t.hadOrphanedCompositionEvents=!0);const c=r.anchor.getNode(),d=n.inputType==="insertCompositionText"&&t.compositionPhase!=="ending-firefox"&&e.isComposing()&&D(c)&&Et(c);if(!u&&!d&&Kf(r,i,o,n.timeStamp,!1,l)){if(s=!0,t.compositionPhase==="ending-firefox"){const y=Fi(e,o);if(t.compositionPhase="idle",y)return Lr(Oi),xc(),!0}const f=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;Fr&&!r.isCollapsed()&&D(f)&&l.anchorNode!==null&&f.getTextContent().slice(0,g)+o+f.getTextContent().slice(g+m)===Ah(l.anchorNode)||I(e,Kn,o);const p=o.length;Pt&&p>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(r.anchor.offset-=p,r._cachedNodes=null,r._cachedIsBackward=null),Ei&&e.isComposing()&&(t.lastKeyDownTimeStamp=0,Be(null))}}return s||(Pl(!1,e,o!==null?o:void 0),t.compositionPhase==="ending-firefox"&&(Fi(e,o||void 0),Lr(Oi),t.compositionPhase="idle")),xc(),!0}function Um(n){const e=he(),t=e._inputState,r=z();if(N(r)&&!e.isComposing()){t.compositionPhase="composing",t.hadOrphanedCompositionEvents=!1;const o=r.anchor,i=r.anchor.getNode();if(Be(o.key),Lr(Qf),n.timeStamp<t.lastKeyDownTimeStamp+30||o.type==="element"||!r.isCollapsed()||!Ei&&(i.getFormat()!==r.format||D(i)&&i.getStyle()!==r.style)||D(i)&&(Et(i)||o.offset===0&&!i.canInsertTextBefore()||o.offset===i.getTextContentSize()&&!i.canInsertTextAfter())){I(e,Kn,_l);const s=z();N(s)&&Be(s.anchor.key)}}return!0}function Hm(n){const e=he();return e._inputState.compositionPhase="idle",Fi(e,n.data),Lr(Oi),!0}function _i(n){if(n===null)return;const e=te(n);if(!D(e)||e.getType()==="text"||Et(e)||!e.isAttached())return;const t=z(),r=N(t)&&t.anchor.key===n?t.anchor.offset:null,o=Fe(e.getTextContent());if(o.setFormat(e.getFormat()),o.setStyle(e.getStyle()),e.replace(o),r!==null){const i=Math.min(r,o.getTextContentSize());o.select(i,i)}}function Fi(n,e){const t=n._compositionKey;if(Be(null),t!==null&&e!=null){if(e===""){const o=te(t),i=n.getElementByKey(t),s=i!==null&&D(o)?wn(o,i,n):null;if(s!==null&&s.nodeValue!==null&&D(o)){const a=Pe(gt(n)),l=a&&ft(a,n._rootElement);let u=null,c=null;l!==null&&l.anchorNode===s&&(u=l.anchorOffset,c=l.focusOffset),Ll(o,s.nodeValue,u,c,!0)}return _i(t),!1}if(e[e.length-1]===`
|
|
7
|
+
`){const o=z();if(N(o)||pe(o)){if(N(o)){const i=o.focus;o.anchor.set(i.key,i.offset,i.type)}return I(n,$i,null),_i(t),!1}}const r=te(t);if(r!==null&&D(r)&&Et(r)){r.markDirty();const o=z(),i=r.getTextContentSize(),s=N(o)&&o.anchor.key===t?o.anchor.offset:i;return r.select(s,s).insertText(e),!0}}return Pl(!0,n,e),_i(t),!1}function Jm(n){const e=he(),t=e._inputState;if(n.key==null)return!0;if(t.compositionPhase==="ending-safari"){const r=vc(n);if(r&&wt(e,()=>{Fi(e,t.compositionEndData)}),t.compositionPhase="idle",t.compositionEndData="",r)return!0}if((function(r){return be(r,"ArrowRight",{shiftKey:"any"})})(n))I(e,kl,n);else if((function(r){return be(r,"ArrowRight",{...sn,shiftKey:"any"})})(n))I(e,Of,n);else if((function(r){return be(r,"ArrowLeft",{shiftKey:"any"})})(n))I(e,xl,n);else if((function(r){return be(r,"ArrowLeft",{...sn,shiftKey:"any"})})(n))I(e,Mf,n);else if((function(r){return be(r,"ArrowUp",{altKey:"any",shiftKey:"any"})})(n))I(e,Cl,n);else if((function(r){return be(r,"ArrowDown",{altKey:"any",shiftKey:"any"})})(n))I(e,vl,n);else if((function(r){return be(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(n))t.isInsertLineBreak=!0,I(e,$i,n);else if((function(r){return r.key===" "})(n))I(e,jf,n);else if((function(r){return Ft&&be(r,"o",{ctrlKey:!0})})(n))n.preventDefault(),t.isInsertLineBreak=!0,I(e,vr,!0);else if((function(r){return be(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(n))t.isInsertLineBreak=!1,I(e,$i,n);else if((function(r){return be(r,"Backspace",{shiftKey:"any"})||Ft&&be(r,"h",{ctrlKey:!0})})(n))vc(n)?I(e,hs,n)&&Ju(t):(n.preventDefault(),I(e,vn,!0));else if((function(r){return r.key==="Escape"})(n))I(e,Sl,n);else if((function(r){return be(r,"Delete",{})||Ft&&be(r,"d",{ctrlKey:!0})})(n))(function(r){return r.key==="Delete"})(n)?I(e,wl,n):(n.preventDefault(),I(e,vn,!1));else if((function(r){return be(r,"Backspace",Cc)})(n))n.preventDefault(),I(e,zr,!0);else if((function(r){return be(r,"Delete",Cc)})(n))n.preventDefault(),I(e,zr,!1);else if((function(r){return Ft&&be(r,"Backspace",{metaKey:!0})})(n))n.preventDefault(),I(e,Or,!0);else if((function(r){return Ft&&(be(r,"Delete",{metaKey:!0})||be(r,"k",{ctrlKey:!0}))})(n))n.preventDefault(),I(e,Or,!1);else if((function(r){return be(r,"b",sn)})(n))n.preventDefault(),I(e,Ot,"bold");else if((function(r){return be(r,"u",sn)})(n))n.preventDefault(),I(e,Ot,"underline");else if((function(r){return be(r,"i",sn)})(n))n.preventDefault(),I(e,Ot,"italic");else if((function(r){return be(r,"Tab",{shiftKey:"any"})})(n))I(e,El,n);else if((function(r){return be(r,"z",sn)})(n))n.preventDefault(),I(e,cs);else if((function(r){return Ft?be(r,"z",{metaKey:!0,shiftKey:!0}):be(r,"y",{ctrlKey:!0})||be(r,"z",{ctrlKey:!0,shiftKey:!0})})(n))n.preventDefault(),I(e,ds);else{const r=e._editorState._selection;(function(o){return be(o,"a",sn)})(n)?(n.preventDefault(),I(e,Tl,n)&&Ju(t)):r===null||N(r)||((function(o){return be(o,"c",sn)})(n)?(n.preventDefault(),I(e,Io,n)):(function(o){return be(o,"x",sn)})(n)&&(n.preventDefault(),I(e,gs,n)))}return(function(r){return r.ctrlKey||r.shiftKey||r.altKey||r.metaKey})(n)&&e.dispatchCommand(Im,n),!0}function Hf(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const Sr=new Map;function Vu(n){const e=Ny(n.target);if(e===null)return;const t=Bl(n.target);let r=null,o=null;const i=t!==null?Ai.get(t):void 0;if(t!==null){if(i!==void 0){const d=i.editors;let f=i.hasShadowEditor;if(f===void 0){f=!1;for(const h of d)if(h._rootElement!==null&&Qt(h._rootElement.getRootNode())){f=!0;break}i.hasShadowEditor=f}if(f){let h=null,g=null;for(const m of d){const p=m._rootElement;if(p===null)continue;const y=ft(e,p).anchorNode;if(y!==null&&Er(y)===m){if(Qt(p.getRootNode())){r=m,o=y;break}h===null&&(h=m,g=y)}}r===null&&h!==null&&(r=h,o=g)}else{const h=e.anchorNode;h===null||q(h)&&h.shadowRoot!==null||(r=Er(h),r!==null&&(o=h))}}if(r===null){const d=Br(t);r=d!==null?Er(d):null}}if(r===null)return;if(r._inputState.isSelectionChangeFromMouseDown){if(i!==void 0)for(const d of i.editors)d._inputState.isSelectionChangeFromMouseDown=!1;wt(r,()=>{const d=yt(),f=o??ft(e,r._rootElement).anchorNode;(q(f)||ht(f))&&_e(To(d,e,r,n))})}const s=Rl(r),a=s[s.length-1],l=a._key,u=Sr.get(l),c=u||a;c!==r&&Uu(e,c,!1),Uu(e,r,!0),r!==a?Sr.set(l,r):u&&Sr.delete(l)}function Yu(n){n._lexicalHandled=!0}function Xu(n){return n._lexicalHandled===!0}function Vm(n){const e=Ta.get(n);if(e===void 0)return;const t=Ai.get(e);if(t===void 0)return;Ta.delete(n);const r=Yr(n);qo(r)?((function(i){if(i._parentEditor!==null){const s=Rl(i),a=s[s.length-1]._key;Sr.get(a)===i&&Sr.delete(a)}else Sr.delete(i._key)})(r),t.editors.delete(r),t.hasShadowEditor=void 0,n.__lexicalEditor=null):r&&$(198);const o=Hf(n);for(let i=0;i<o.length;i++)o[i]();n.__lexicalEventHandles=[]}function Na(n,e,t){Ie();const r=n.__key,o=n.getParent();if(o===null)return void(Je(n)!==null&&$(367,r,String(Je(n))));const i=(function(a){const l=z();if(!N(l)||!C(a))return l;const{anchor:u,focus:c}=l,d=u.getNode(),f=c.getNode();return Ir(d,a)&&u.set(a.__key,0,"element"),Ir(f,a)&&c.set(a.__key,0,"element"),l})(n);let s=!1;if(N(i)&&e){const a=i.anchor,l=i.focus;a.key===r&&(ji(a,n,o,n.getPreviousSibling(),n.getNextSibling()),s=!0),l.key===r&&(ji(l,n,o,n.getPreviousSibling(),n.getNextSibling()),s=!0)}else pe(i)&&e&&n.isSelected()&&n.selectPrevious();if(N(i)&&e&&!s){const a=n.getIndexWithinParent();Ut(n),Pn(i,o,a,-1)}else Ut(n);t||Se(o)||o.canBeEmpty()||!o.isEmpty()||Na(o,e),e&&i&&Oe(o)&&o.isEmpty()&&o.selectEnd()}const Jf=Symbol.for("ephemeral");function zi(n){return n[Jf]||!1}const Gu={configurable:!0,enumerable:!1,value:void 0,writable:!0};let lt=class{__type;__key;__parent;__prev;__next;__state;[xo];static getType(){const{ownNodeType:e}=ql(this);return e===void 0&&$(64,this.name),e}static clone(e){$(65,this.name)}$config(){return{}}config(e,t){const r=t.extends||Wh(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",Gu),Object.defineProperty(this,xo,Gu),wh(this,e)}getType(){return this.__type}isInline(){$(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=te(e);if(t===null)break;e=t.__parent!==null?t.__parent:Je(t)}return!1}isSelected(e){const t=e||z();if(t==null)return!1;const r=t.getNodes().some(o=>o.__key===this.__key);if(D(this))return r;if(N(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const o=this.getParent();if(ne(this)&&this.isInline()&&o){const i=t.isBackward()?t.focus:t.anchor;if(o.is(i.getNode())&&i.offset===o.getChildrenSize()&&this.is(o.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:te(e)}getParentOrThrow(){const e=this.getParent();return e===null&&$(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(Se(t)||Je(e)!==null)return C(e)||e===this&&ne(e)||$(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&$(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:te(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:te(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=C(this)?this:this.getParent(),r=C(e)?e:e.getParent(),o=t&&r?La(t,r):null;return o?o.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=La(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?Vh(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&$(279),!1)))}isParentOf(e){return Ir(e,this)}getNodesBetween(e){const t=this.isBefore(e),r=[],o=new Set;let i=this;for(;i!==null;){const s=i.__key;if(o.has(s)||(o.add(s),r.push(i)),i===e)break;const a=C(i)?t?i.getFirstChild():i.getLastChild():null;if(a!==null){i=a;continue}const l=t?i.getNextSibling():i.getPreviousSibling();if(l!==null){i=l;continue}const u=i.getParentOrThrow();if(o.has(u.__key)||r.push(u),u===e)break;let c=null,d=u;do{if(d===null&&$(68),c=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;c!==null||o.has(d.__key)||r.push(d)}while(c===null);i=c}return t||r.reverse(),r}isDirty(){const e=he()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(zi(this))return this;const e=te(this.__key);return e===null&&$(113),e}getWritable(){if(zi(this))return this;Ie();const e=yn(),t=he(),r=e._nodeMap,o=this.__key,i=this.getLatest(),s=t._cloneNotNeeded,a=z();if(a!==null&&a.setCachedNodes(null),s.has(o))return Wi(i),i;const l=Ih(i);return s.add(o),Wi(l),r.set(o,l),l}getTextContent(){return Uh(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){$(70)}updateDOM(e,t,r){$(71)}getDOMSlot(e){return new uf(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){$(18,this.name)}updateFromJSON(e){return(function(t,r){const o=t.getWritable(),i=r.$;let s=i;for(const a of kf(o).flatKeys)a in r&&(s!==void 0&&s!==i||(s={...i}),s[a]=r[a]);return(o.__state||s)&&bf(t).updateFromJSON(s),o})(this,e)}static transform(){return null}remove(e){Na(this,!0,e)}replace(e,t){Ie();let r=z();r!==null&&(r=r.clone()),Ys(this,e);const o=this.getLatest(),i=this.__key,s=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size,c=a.getParent(),d=c!==null?a.getIndexWithinParent():-1;Ut(a),c!==null&&N(r)&&Pn(r,c,d,-1);const f=o.getPreviousSibling(),h=o.getNextSibling(),g=o.__prev,m=o.__next,p=o.__parent;Na(o,!1,!0),f===null?l.__first=s:f.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&&(C(this)&&C(a)||$(139),y=a.getChildrenSize(),a.splice(y,0,this.getChildren()));const _=Tt(this);if(_.length>0){dn(this)&&dn(a)||$(368,this.__key,a.__key);for(const b of _){const k=Xn(this,b);k!==null&&(Uy(this,b),Hh(a,b,k))}}if(N(r)){_e(r);const b=r.anchor,k=r.focus;b.key===i&&(t&&b.type==="element"?b.set(a.__key,y+b.offset,"element"):tc(b,a)),k.key===i&&(t&&k.type==="element"?k.set(a.__key,y+k.offset,"element"):tc(k,a))}return Ht()===i&&Be(s),a}insertAfter(e,t=!0){Ie(),Ys(this,e);const r=this.getWritable(),o=e.getWritable();this.getParentOrThrow();const i=o.getParent(),s=z();let a=!1,l=!1;if(i!==null){const h=e.getIndexWithinParent();if(N(s)){const g=i.__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}Ut(o),t&&N(s)&&Pn(s,i,h,-1)}else Ut(o);const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=o.__key,f=r.__next;if(u===null?c.__last=d:u.getWritable().__prev=d,c.__size++,r.__next=d,o.__next=f,o.__prev=r.__key,o.__parent=r.__parent,t&&N(s)){const h=this.getIndexWithinParent();Pn(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){Ie(),Ys(this,e);const r=this.getWritable(),o=e.getWritable();this.getParentOrThrow();const i=o.__key,s=z(),a=o.getParent(),l=a!==null?o.getIndexWithinParent():-1;Ut(o),a!==null&&t&&N(s)&&Pn(s,a,l,-1);const u=this.getPreviousSibling(),c=this.getParentOrThrow().getWritable(),d=r.__prev,f=this.getIndexWithinParent();return u===null?c.__first=i:u.getWritable().__next=i,c.__size++,r.__prev=i,o.__prev=d,o.__next=r.__key,o.__parent=r.__parent,t&&N(s)&&Pn(s,this.getParentOrThrow(),f),e}isParentRequired(){return!1}createParentElementNode(){return Y()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Ie();const r=St(this);if(r!==null)return r.selectPrevious(e,t);const o=this.getPreviousSibling(),i=this.getParentOrThrow();if(o===null)return i.select(0,0);if(C(o))return o.select();if(!D(o)){const s=o.getIndexWithinParent()+1;return i.select(s,s)}return o.select(e,t)}selectNext(e,t){Ie();const r=St(this);if(r!==null)return r.selectNext(e,t);const o=this.getNextSibling(),i=this.getParentOrThrow();if(o===null)return i.select();if(C(o))return o.select(0,0);if(!D(o)){const s=o.getIndexWithinParent();return i.select(s,s)}return o.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function Vf(n){return n instanceof lt}const Da="historic",Yf="history-push",wr="history-merge",Xf="paste",Gf="cut",Ym="collaboration",Xm="skip-scroll-into-view",Gm="skip-dom-selection",$a="skip-selection-focus",Qf="composition-start",Oi="composition-end",Qm="!important";function Mi(n){const e={};if(!n)return e;let t="",r="",o=null,i=!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(i)g==="*"&&n[h+1]==="/"&&(i=!1,h++);else if(s)c===-1&&(c=h),s=!1;else if(o===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),o=g;else c!==-1&&(a?r+=n.slice(c,h):t+=n.slice(c,h),c=-1),i=!0,h++;else c===-1&&(c=h),g==="\\"?s=!0:g===o&&(o=null)}c!==-1&&(a?r+=n.slice(c,u):t+=n.slice(c,u));const d=t.trim(),f=r.trim();return d!==""&&f!==""&&(e[d]=f),e}function Zm(n,e,t){const r=t.trimEnd(),o=r.length-10;o>=0&&r.slice(o).toLowerCase()===Qm?n.setProperty(e,r.slice(0,o).trim(),"important"):n.setProperty(e,t,"")}function Sn(n,e,t=""){if(e===t)return;const r=Mi(t),o=Mi(e);for(const i in o)delete r[i],Zm(n,i,o[i]);for(const i in r)n.removeProperty(i)}function Bs(n,e){return 16&e?"code":e&yl?"mark":32&e?"sub":64&e?"sup":null}function Ks(n,e){return 1&e?"strong":2&e?"em":"span"}function Zf(n,e,t,r,o){const i=r.classList;let s=Tr(o,"base");s!==void 0&&i.add(...s),s=Tr(o,"underlineStrikethrough");let a=!1;const l=8&e&&4&e;s!==void 0&&(8&t&&4&t?(a=!0,l||i.add(...s)):l&&i.remove(...s));for(const u in hn){const c=hn[u];if(s=Tr(o,u),s!==void 0)if(t&c){if(a&&(u==="underline"||u==="strikethrough")){e&c&&i.remove(...s);continue}((e&c)===0||l&&u==="underline"||u==="strikethrough")&&i.add(...s)}else e&c&&i.remove(...s)}}function eh(n,e,t){const r=t.isComposing(),o=n+(r?ko:""),i=we(),s=vs(i).$getDOMSlot(t,e,i),a=s.getFirstChild();if(a===null||a.nodeType!==Node.TEXT_NODE)return void s.insertChild(ae().createTextNode(o));const l=a,u=l.nodeValue;if(u!==o)if(r||Pt){const[c,d,f]=(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,o);d!==0&&l.deleteData(c,d),l.insertData(c,f)}else l.nodeValue=o}function Qu(n,e,t,r,o,i){eh(o,n,e);const s=i.theme.text;s!==void 0&&Zf(0,0,r,n,s)}function Qo(n,e){const t=ae().createElement(e);return t.appendChild(n),t}function Aa(n){return n!=null&&n.__isInlineFormattable===!0}class gn extends lt{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config("text",{importDOM:{"#text":()=>({conversion:ry,priority:0}),b:()=>({conversion:ty,priority:0}),code:()=>({conversion:on,priority:0}),em:()=>({conversion:on,priority:0}),i:()=>({conversion:on,priority:0}),mark:()=>({conversion:on,priority:0}),s:()=>({conversion:on,priority:0}),span:()=>({conversion:ey,priority:0}),strong:()=>({conversion:on,priority:0}),sub:()=>({conversion:on,priority:0}),sup:()=>({conversion:on,priority:0}),u:()=>({conversion:on,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 bm[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Ht()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=hn[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Jn(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){const r=this.__format,o=Bs(0,r),i=Ks(0,r),s=o===null?i:o,a=ae().createElement(s);let l=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),o!==null&&(l=ae().createElement(i),a.appendChild(l)),Qu(l,this,0,r,this.__text,e);const u=this.__style;return u!==""&&Sn(a.style,u),a}updateDOM(e,t,r){const o=this.__text,i=e.__format,s=this.__format,a=Bs(0,i),l=Bs(0,s),u=Ks(0,i),c=Ks(0,s);if((a===null?u:a)!==(l===null?c:l))return!0;if(a===l&&u!==c){const m=t.firstChild;m==null&&$(48);const p=ae().createElement(c);return Qu(p,this,0,s,o,r),t.replaceChild(p,m),!1}let d=t;l!==null&&a!==null&&(d=t.firstChild,d==null&&$(49)),eh(o,d,this);const f=r.theme.text;f!==void 0&&i!==s&&Zf(0,i,s,d,f);const h=e.__style,g=this.__style;return h!==g&&Sn(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 q(t)||$(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=Qo(t,"b")),this.hasFormat("italic")&&(t=Qo(t,"i")),this.hasFormat("strikethrough")&&(t=Qo(t,"s")),this.hasFormat("underline")&&(t=Qo(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"?hn[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail=typeof e=="string"?mm[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=Jn(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=_m[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){Ie();let r=e,o=t;const i=z(),s=this.getTextContent(),a=this.__key;if(typeof s=="string"){const l=s.length;r===void 0&&(r=l),o===void 0&&(o=l)}else r=0,o=0;if(!N(i))return ch(a,r,a,o,"text","text");{const l=Ht();l!==i.anchor.key&&l!==i.focus.key||Be(a),i.setTextNodeRange(this,r,this,o)}return i}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,o){const i=this.getWritable(),s=i.__text,a=r.length;let l=e;l<0&&(l=a+l,l<0&&(l=0));const u=z();if(o&&N(u)){const d=e+a;u.setTextNodeRange(i,d,i,d)}const c=s.slice(0,l)+r+s.slice(l+t);return i.__text=c,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Ie();const t=this.getLatest(),r=t.getTextContent();if(r==="")return[];const o=t.__key,i=Ht(),s=r.length;e.sort((v,E)=>v-E),e.push(s);const a=[],l=e.length;for(let v=0,E=0;v<s&&E<=l;E++){const A=e[E];A>v&&(a.push(r.slice(v,A)),v=A)}const u=a.length;if(u===1)return[t];const c=a[0],d=t.getParent();let f;const h=t.getFormat(),g=t.getStyle(),m=t.__detail;let p=!1,y=null,_=null;const b=z();if(N(b)){const[v,E]=b.isBackward()?[b.focus,b.anchor]:[b.anchor,b.focus];v.type==="text"&&v.key===o&&(y=v),E.type==="text"&&E.key===o&&(_=E)}t.isSegmented()?(f=Fe(c),f.__format=h,f.__style=g,f.__detail=m,f.__state=zu(t,f),p=!0):f=t.setTextContent(c);const k=[f];for(let v=1;v<u;v++){const E=Fe(a[v]);E.__format=h,E.__style=g,E.__detail=m,E.__state=zu(t,E);const A=E.__key;i===o&&Be(A),k.push(E)}const S=y?y.offset:null,x=_?_.offset:null;let w=0;for(const v of k){if(!y&&!_)break;const E=w+v.getTextContentSize();if(y!==null&&S!==null&&S<=E&&S>=w&&(y.set(v.getKey(),S-w,"text"),S<E&&(y=null)),_!==null&&x!==null&&x<=E&&x>=w){_.set(v.getKey(),x-w,"text");break}w=E}if(d!==null){(function(A){const T=A.getPreviousSibling(),M=A.getNextSibling();T!==null&&Wi(T),M!==null&&Wi(M)})(this);const v=d.getWritable(),E=this.getIndexWithinParent();p?(v.splice(E,0,k),this.remove()):v.splice(E,1,k),N(b)&&Pn(b,d,E,u-1)}return k}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||$(50);const r=this.__key,o=e.__key,i=this.__text,s=i.length;Ht()===o&&Be(r);const a=z();if(N(a)){const d=a.anchor,f=a.focus;d!==null&&d.key===o&&cc(d,t,r,e,s),f!==null&&f.key===o&&cc(f,t,r,e,s)}const l=e.__text,u=t?l+i:i+l;this.setTextContent(u);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function ey(n){return{forChild:Nl(n.style),node:null}}function ty(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:Nl(e.style,t?void 0:"bold"),node:null}}const Zu=new WeakMap;function ny(n){if(!q(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function ry(n){const e=n;n.parentElement===null&&$(129);let t=e.textContent||"";if((function(r){let o,i=r.parentNode;const s=[r];for(;i!==null&&(o=Zu.get(i))===void 0&&!ny(i);)s.push(i),i=i.parentNode;const a=o===void 0?i:o;for(let l=0;l<s.length;l++)Zu.set(s[l],a);return a})(e)!==null)return{node:No(t)};if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,o=!0;for(;r!==null&&(r=ec(r,!1))!==null;){const i=r.textContent||"";if(i.length>0){/[ \t\n]$/.test(i)&&(t=t.slice(1)),o=!1;break}}o&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,o=!0;for(;r!==null&&(r=ec(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){o=!1;break}o&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:Fe(t)}}function ec(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const i=t.parentElement;if(i===null)return null;t=i}if(t=r,q(t)){const i=t.style.display;if(i===""&&!Ui(t)||i!==""&&!i.startsWith("inline"))return null}let o=t;for(;(o=e?t.firstChild:t.lastChild)!==null;)t=o;if(ht(t))return t;if(t.nodeName==="BR")return null}}const oy={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function on(n){const e=oy[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:Nl(n.style,e),node:null}}function Fe(n=""){return tt(new gn(n))}function D(n){return n instanceof gn}function Nl(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),o=t==="700"||t==="bold",i=r.includes("line-through"),s=n.fontStyle==="italic",a=r.includes("underline"),l=n.verticalAlign;return u=>((D(u)||Aa(u))&&(o&&!u.hasFormat("bold")&&u.toggleFormat("bold"),i&&!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 ps extends gn{$config(){return this.config("tab",{extends:gn})}constructor(e=void 0){super(" ",e),this.__detail=2}createDOM(e){const t=super.createDOM(e),r=Tr(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}setTextContent(e){return super.setTextContent(" ")}spliceText(e,t,r,o){return r===""&&t===0||r===" "&&t===1||$(286),this}setDetail(e){return e!==2&&$(127),this}setMode(e){return e!=="normal"&&$(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Bo(){return tt(new ps)}function Mr(n){return n instanceof ps}class iy{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:Fo(Ve(Qe(this,"next")),Ve(Qe(e,"next")))<0}getNode(){const e=te(this.key);return e===null&&$(20),e}set(e,t,r,o){const i=this._selection,s=this.key;o&&this.key===e&&this.offset===t&&this.type===r||(this.key=e,this.offset=t,this.type=r,Tn()||(Ht()===s&&Be(e),i!==null&&(i.setCachedNodes(null),N(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}}function dt(n,e,t){return new iy(n,e,t)}function Ws(n,e){let t=e.__key,r=n.offset,o="element";if(D(e)){o="text";const i=e.getTextContentSize();r>i&&(r=i)}else if(!C(e)){const i=e.getNextSibling();if(D(i))t=i.__key,r=0,o="text";else{const s=e.getParent();s&&(t=s.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,o)}function tc(n,e){if(C(e)){const t=e.getLastDescendant();C(t)||D(t)?Ws(n,t):Ws(n,e)}else Ws(n,e)}function nc(n,e,t,r){const o=n.getNode(),i=o.getChildAtIndex(n.offset),s=Fe();if(s.setFormat(t),s.setStyle(r),en(i))i.splice(0,0,[s]);else if(i!==null){const a=Se(o)?Y().append(s):s;i.insertBefore(a)}else if(Se(o)){const a=o.getLastChild();C(a)&&!a.isInline()&&a.isEmpty()?a.append(s):o.append(Y().append(s))}else o.append(s);n.is(e)&&e.set(s.__key,0,"text"),n.set(s.__key,0,"text")}function rc(n,e,t,r){const o=n.anchor.getNode();D(o)||$(398);const i=n.anchor.offset,s=Fe(e);s.setFormat(t),s.setStyle(r);const a=o.getParentOrThrow();if(i===0)a.isInline()&&!o.__prev?a.insertBefore(s):o.insertBefore(s,!1);else if(i===o.getTextContentSize())a.isInline()&&!o.__next?a.insertAfter(s):o.insertAfter(s,!1);else{const[l]=o.splitText(i);l.insertAfter(s,!1)}o.getTextContent()===""&&o.isAttached()&&o.remove(),s.selectEnd(),s.isComposing()&&n.anchor.type==="text"&&n.anchor.set(n.anchor.key,n.anchor.offset-e.length,n.anchor.type)}class ms{_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(!pe(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(o=>r.has(o))}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 ms(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes().filter(s=>Je(s)===null),r=t.length;if(r===0)return;const o=t[r-1];let i;if(D(o))i=o.select();else{const s=o.getIndexWithinParent()+1;i=o.getParentOrThrow().select(s,s)}i.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 o of t){const i=te(o);i!==null&&r.push(i)}return Tn()||(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=>Je(t)===null);if((z()||yt())===this&&e[0]){const t=ue(e[0],"next");qr(jt(t,t))}for(const t of e)t.remove();th()}}function th(){const n=ge();if(n.isEmpty()){const e=Y();n.append(e),e.select()}}function N(n){return n instanceof rr}class rr{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,r,o){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=r,this.style=o,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 o=[],[i,s]=r.getTextSlices();i&&o.push(i.caret.origin);const a=new Set,l=new Set;for(const u of r)if(Xe(u)){const{origin:c}=u;o.length===0?a.add(c):(l.add(c),o.push(c))}else{const{origin:c}=u;C(c)&&l.has(c)||o.push(c)}if(s&&o.push(s.caret.origin),It(r.focus)&&C(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=Re(r.focus.origin,"previous");Xe(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(o[o.length-1]);u=Zn(u))a.delete(u.origin),o.pop();for(;o.length>1;){const u=o[o.length-1];if(!C(u)||l.has(u)||u.isEmpty()||a.has(u))break;o.pop()}if(o.length===0&&r.isCollapsed()){const u=Ve(r.anchor),c=Ve(r.anchor.getFlipped()),d=h=>Nt(h)?h.origin:h.getNodeAtCaret(),f=d(u)||d(c)||(r.anchor.getNodeAtCaret()?u.origin:c.origin);o.push(f)}return o})(Yl(Ia(this),"next"));return Tn()||(this._cachedNodes=t),t}setTextNodeRange(e,t,r,o){return this.anchor.set(e.__key,t,"text"),this.focus.set(r.__key,o,"text"),this}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],o=this.anchor,i=this.focus,s=o.isBefore(i),[a,l]=Fa(this);let u="",c=!0;for(let d=0;d<e.length;d++){const f=e[d];if(C(f)&&!f.isInline()){c||(u+=`
|
|
8
|
+
`);let h="";for(const g of Tt(f)){const m=Xn(f,g);m!==null&&(h+=m.getTextContent())}h!==""?(u+=h,c=!1):c=!f.isEmpty()}else if(c=!1,D(f)){let h=f.getTextContent();f===t?f===r?o.type==="element"&&i.type==="element"&&i.offset!==o.offset||(h=a<l?h.slice(a,l):h.slice(l,a)):h=s?h.slice(a):h.slice(l):f===r&&(h=s?h.slice(0,l):h.slice(0,a)),u+=h}else!ne(f)&&!We(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(e){const t=he(),r=t.getEditorState()._selection,o=uh(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(o===null)return;const[i,s,a]=o;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(s.key,s.offset,s.type,!0),a&&(this.dirty=!0),Kt(this)}clone(){const e=this.anchor,t=this.focus;return new rr(dt(e.key,e.offset,e.type),dt(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Jn(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=hn[e];return(this.format&t)!==0}insertRawText(e){this.insertNodes(No(e))}insertText(e){let t=this.format,r=this.style;if(!this.isCollapsed()){const d=(this.focus.isBefore(this.anchor)?this.focus:this.anchor).getNode();if(D(d)&&(t=d.getFormat(),r=d.getStyle()),this.removeText(),this.format=t,this.style=r,e==="")return;if(Ht()===null)return this.anchor.type==="element"&&nc(this.anchor,this.focus,t,r),void rc(this,e,t,r)}this.anchor.type==="element"&&nc(this.anchor,this.focus,t,r);const o=this.anchor.getNode();D(o)||$(398);const i=this.anchor.offset,s=o.getParentOrThrow(),a=o.getTextContentSize();if(Et(o)||i===0&&(!o.canInsertTextBefore()||!s.canInsertTextBefore()&&!o.__prev)||i===a&&(!o.canInsertTextAfter()||!s.canInsertTextAfter()&&!o.__next)){if(o.isSegmented()&&i!==0&&i!==a){if(Ht()!==null)o.setMode("normal").setFormat(t).setStyle(r);else{const f=Fe(o.getTextContent());f.setFormat(t),f.setStyle(r),o.replace(f),f.select(i,i)}return void(e!==""&&this.insertText(e))}if(e==="")return;if(i===0){const f=o.getPreviousSibling();if(D(f)&&f.canInsertTextAfter()&&!Et(f))f.select();else{const h=Fe();h.setFormat(t),h.setStyle(r),s.canInsertTextBefore()?o.insertBefore(h):s.insertBefore(h),h.select()}return void this.insertText(e)}if(i===a){const f=o.getNextSibling();if(D(f)&&f.canInsertTextBefore()&&!Et(f))f.select(0,0);else{const h=Fe();h.setFormat(t),h.setStyle(r),s.canInsertTextAfter()?o.insertAfter(h):s.insertAfter(h),h.select(0,0)}return void this.insertText(e)}const d=Fe(e);return d.setFormat(t),d.setStyle(r),o.replace(d),void d.select()}if(e==="")return;const l=s.isInline()&&i===0&&!o.__prev,u=s.isInline()&&i===a&&!o.__next,c=o.getFormat()!==t||o.getStyle()!==r;if(l||u||c){if(o.getTextContent()!==""||l||u)return void rc(this,e,t,r);o.setFormat(t),o.setStyle(r)}o.spliceText(i,0,e,!0),o.isComposing()&&this.anchor.type==="text"&&this.anchor.set(this.anchor.key,this.anchor.offset-e.length,this.anchor.type)}removeText(){const e=z()===this;Ci(this,Zy(Ia(this))),e&&z()!==this&&_e(this)}formatText(e,t=null){rh(this,e,t)}insertNodes(e){if(e.length===0)return;this.isCollapsed()||this.removeText();const t=this.anchor.getNode();if(this.anchor.type==="element"&&C(t)&&Je(t)!==null){let m=t.isShadowRoot()?t.getFirstChild()??t.append(Y()).getFirstChild():t.getFirstChild();if(t.isShadowRoot()&&m!==null&&!C(m)){const p=Y();m.insertBefore(p),m=p}if(m!==null){m.selectStart();const p=z();return N(p)||$(369),p.insertNodes(e)}}if(this.anchor.type==="element"&&Se(t)){const m=Us(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(),o=U(r,Ue);const i=e[e.length-1];if(C(o)&&"__language"in o){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const m=to(this);o.splice(m,0,e),i.selectEnd()}return}if(!e.some(m=>(C(m)||ne(m))&&!m.isInline())){C(o)||$(211,r.constructor.name,r.getType());const m=to(this);return o.splice(m,0,e),void i.selectEnd()}if(C(o)&&Je(o)!==null){const m=to(this),p=Oa(e);o.splice(m,0,p);const y=p[p.length-1];return void(y!==void 0?y.selectEnd():o.select(m,m))}if(o===null){const m=Us(e),p=m.getLastDescendant();let y=Qe(this.anchor,"next");for(const _ of m.getChildren())y=Ns(_,y);return void(p!==null&&p.selectEnd())}if(C(o)&&!o.isParentRequired()&&!Se(o.getParentOrThrow())){const m=to(this),p=Oa(e);o.splice(m,0,p);const y=p[p.length-1];return void(y!==void 0?y.selectEnd():o.select(m,m))}const s=Us(e),a=s.getLastDescendant(),l=s.getChildren(),u=!C(o)||!o.isEmpty()?this.insertParagraph():null;u&&!o.isAttached()&&(r=this.anchor.getNode(),o=U(r,Ue));const c=l[l.length-1];let d=l[0];var f;C(f=d)&&Ue(f)&&!f.isEmpty()&&C(o)&&(!o.isEmpty()||o.canMergeWhenEmpty())&&(C(o)||$(211,r.constructor.name,r.getType()),o.append(...d.getChildren()),d=l[1]),d&&(o===null&&$(212,r.constructor.name,r.getType()),(function(m,p){const y=p.getParentOrThrow().getLastChild();let _=p;const b=[p];for(;_!==y;)_.getNextSibling()||$(140),_=_.getNextSibling(),b.push(_);let k=m;for(const S of b)k=k.insertAfter(S)})(o,d));const h=U(a,Ue);u&&C(h)&&(u.canMergeWhenEmpty()||Ue(c))&&(h.append(...u.getChildren()),u.remove()),C(o)&&o.isEmpty()&&o.remove(),a.selectEnd();const g=C(o)?o.getLastChild():null;We(g)&&h!==o&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if(this.anchor.type==="element"&&Se(e)){const a=Y();return e.splice(this.anchor.offset,0,[a]),a.select(),a}const t=to(this),r=U(this.anchor.getNode(),Ue);if(r!==null&&Je(r)!==null)return null;C(r)||$(213);const o=r.getChildAtIndex(t),i=o?[o,...o.getNextSiblings()]:[],s=r.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(e){const t=Gt();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),o=t.getIndexWithinParent();r.select(o,o)}}extract(){const e=[...this.getNodes()],t=e.length;let r=e[0],o=e[t-1];const[i,s]=Fa(this),a=this.isBackward(),[l,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[c,d]=a?[s,i]:[i,s];if(t===0)return[];if(t===1){if(D(r)&&!this.isCollapsed()){const f=r.splitText(c,d),h=c===0?f[0]:f[1];return h?(l.set(h.getKey(),0,"text"),u.set(h.getKey(),h.getTextContentSize(),"text"),[h]):[]}return[r]}if(D(r)&&(c===r.getTextContentSize()?e.shift():c!==0&&([,r]=r.splitText(c),e[0]=r,l.set(r.getKey(),0,"text"))),D(o)){const f=o.getTextContent().length;d===0?e.pop():d!==f&&([o]=o.splitText(d),e[e.length-1]=o,u.set(o.getKey(),o.getTextContentSize(),"text"))}return e}modify(e,t,r){if(Pi(this,e,t,r))return;const o=e==="move",i=he(),s=Pe(gt(i));if(!s)return;const a=i._blockCursorElement,l=i._rootElement,u=this.focus.getNode();l===null||a===null||!C(u)||u.isInline()||u.canBeEmpty()||qi(a,i,l);const c=Pr(i,this.focus.key);let d=c;if(this.focus.type==="text"&&(d=D(u)?wn(u,c,i):null),this.dirty){const f=Pr(i,this.anchor.key);let h=f;if(this.anchor.type==="text"){const g=this.anchor.getNode();h=D(g)?wn(g,f,i):null}h&&d&&Ri(s,h,this.anchor.offset,d,this.focus.offset)}if(r==="character"&&D(u)&&u.isUnmergeable()&&(t?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const f=ue(u,t?"previous":"next").getNodeAtCaret();if(D(f)){if(!o){const h=f.getTextContentSize();return t?this.focus.set(f.__key,h-1,"text"):this.focus.set(f.__key,1,"text"),void(this.dirty=!0)}{const h=i.getElementByKey(f.getKey()),g=h?wn(f,h,i):null;if(g){const m=t?g.length:0;Ri(s,g,m,g,m)}}}}if(ih(s,e,t?"backward":"forward",r),s.rangeCount>0){const f=Cs(s,i._rootElement),h=f||s.getRangeAt(0),g=this.anchor.getNode(),m=Oe(g)?g:zh(g);this.applyDOMRange(h),this.dirty=!0,!o&&(sh(this,t,m),(f?s.direction!=="backward":s.anchorNode===h.startContainer&&s.anchorOffset===h.startOffset)||oh(this))}r==="lineboundary"&&Pi(this,e,t,r,"decorators")}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&C(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const o=t.getParent(),i=t.getNextSibling()||(o===null?null:o.getNextSibling());if(C(i)&&i.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let o=r.getNode();if(this.forwardDeletion(r,o,e))return;const i=Wr(Qe(r,e?"previous":"next"));if(i.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of i.iterNodeCarets("shadowRoot"))if(Xe(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(C(i.anchor.origin)&&i.anchor.origin.isEmpty()){const u=Ve(l);Ci(this,jt(u,u)),i.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(It(l)){if(C(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(i.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(ne(l.origin)){if(!l.origin.isIsolated())if(Tt(l.origin).length>0){if(C(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();const u=Eo();u.add(l.origin.getKey()),_e(u)}}else if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&C(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();const u=Eo();u.add(l.origin.getKey()),_e(u)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:u}=a;return Tt(u).length>0?void 0:l.origin.isEmpty()&&!u.isEmpty()&&l.origin.getParent()===u.getParent()?void l.origin.remove(!0):(Ci(this,jt(!l.origin.isEmpty()&&u.isEmpty()?Fn(ue(u,l.direction)):i.anchor,l)),this.removeText())}for(let l=r.getNode();l!==null;){if(Je(l)!==null)return;if(C(l)&&l.isShadowRoot())break;l=l.getParent()}}const s=this.focus;if(qs(this,e,"character"),this.isCollapsed()){if(e&&r.offset===0&&ic(this,r.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(o=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,u=a.getTextContentSize();if(a.is(o)||e&&l!==u||!e&&l!==0)return void sc(a,e,l)}else if(o!==null&&o.isSegmented()){const l=r.offset,u=o.getTextContentSize();if(o.is(a)||e&&l!==0||!e&&l!==u)return void sc(o,e,l)}(function(l,u){const c=l.anchor,d=l.focus,f=c.getNode(),h=d.getNode();if(f===h&&c.type==="text"&&d.type==="text"){const g=c.offset,m=d.offset,p=g<m,y=p?g:m,_=p?m:g,b=_-1;y!==b&&(function(k){return!(Dh(k)||ay(k))})(f.getTextContent().slice(y,_))&&(u?d.set(d.key,b,d.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()&&Oe(r.getParent())&&r.getPreviousSibling()===null&&ic(this,r),th()}}deleteLine(e){const t=za(this.anchor);if(t!==null&&ne(St(t)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(e);this.isCollapsed()&&qs(this,e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):U(this.anchor.getNode(),Ue)!==U(this.focus.getNode(),Ue)?(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;qs(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 Tn()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}}function pe(n){return n instanceof ms}function nh(n,e){if(pe(n)){for(const y of n.getNodes())Aa(y)&&y.setFormat(e(y.getFormat()));return}if(n.isCollapsed())return n.setFormat(e(n.format)),void Be(null);const t=[];for(const y of n.getNodes())D(y)?t.push(y):C(y)?y.setTextFormat(e(y.getTextFormat())):Aa(y)&&y.setFormat(e(y.getFormat()));const r=t.length;if(r===0)return n.setFormat(e(n.format)),void Be(null);const o=n.anchor,i=n.focus,s=n.isBackward(),a=s?i:o,l=s?o:i;let u=0,c=t[0],d=a.type==="element"?0:a.offset;if(a.type==="text"&&d===c.getTextContentSize()&&(u=1,c=t[1],d=0),c==null)return;const f=r-1;let h=t[f];const g=l.type==="text"?l.offset:h.getTextContentSize();if(c.is(h)){if(d===g)return;const y=e(c.getFormat());if(Et(c)||d===0&&g===c.getTextContentSize())c.setFormat(y);else{const _=c.splitText(d,g),b=d===0?_[0]:_[1];b.setFormat(y),a.type==="text"&&a.set(b.__key,0,"text"),l.type==="text"&&l.set(b.__key,g-d,"text")}return void(n.format=y)}d===0||Et(c)||([,c]=c.splitText(d),d=0);const m=e(c.getFormat());c.setFormat(m);const p=e(h.getFormat());g>0&&(g===h.getTextContentSize()||Et(h)||([h]=h.splitText(g)),h.setFormat(p));for(let y=u+1;y<f;y++){const _=t[y];_.setFormat(e(_.getFormat()))}a.type==="text"&&a.set(c.__key,d,"text"),l.type==="text"&&l.set(h.__key,g,"text"),n.format=m|p}function sy(n,e){const t=[];for(const[r,o]of Object.entries(e))typeof o=="boolean"&&t.push([r,o]);t.length!==0&&nh(n,r=>{for(const[o,i]of t)r=Jn(r,o,i?hn[o]:0);return r})}function rh(n,e,t=null){const r=t===null&&N(n)?Jn(n.format,e,null):t;nh(n,o=>Jn(o,e,r))}function oc(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function Fa(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]:[oc(t),oc(r)]}function ic(n,e){for(let t=e;t;t=t.getParent()){if(C(t)){if(t.collapseAtStart(n))return!0;if(Se(t))break}if(t.getPreviousSibling())break}return!1}function oh(n){const e=n.focus,t=n.anchor,r=t.key,o=t.offset,i=t.type;t.set(e.key,e.offset,e.type,!0),e.set(r,o,i,!0)}function ih(n,e,t,r){n.modify(e,t,r)}function sh(n,e,t){const r=n.getNodes(),o=r.filter(a=>Ir(a,t));if(o.length===0||o.length===r.length)return!1;const i=e?o[0]:o[o.length-1],s=C(i)?i:i.getParentOrThrow();return e?s.selectStart():s.selectEnd(),!0}function qs(n,e,t){if(Pi(n,"extend",e,t))return;const r=he(),o=Pe(gt(r));if(!o||typeof o.modify!="function")return;const i=r._blockCursorElement,s=r._rootElement,a=n.anchor,l=n.focus.getNode();s===null||i===null||!C(l)||l.isInline()||l.canBeEmpty()||qi(i,r,s);const u=E=>{const A=E.getNode(),T=r.getElementByKey(E.key);return T!==null&&E.type==="text"&&D(A)?wn(A,T,r):T},c=a.getNode(),d=u(a);if(d===null)return;const f=a.offset,h=n.isCollapsed(),g=n.focus,m=h?d:u(g);if(m===null)return;const p=g.offset;if(Ri(o,m,p,m,p),ih(o,"move",e?"backward":"forward",t),o.rangeCount===0)return;const y=Cs(o,s)||o.getRangeAt(0),_=y.startContainer,b=y.startOffset;if(h&&t==="character"&&a.type==="text"&&D(c)&&c.isUnmergeable()&&f===(e?0:c.getTextContentSize())){const E=ue(c,e?"previous":"next").getNodeAtCaret();if(D(E)){const A=e?E.getTextContentSize()-1:1;return n.focus.set(E.__key,A,"text"),void(n.dirty=!0)}}if(h&&t==="character"&&a.type==="text"){const E=e?0:c.getTextContentSize(),A=_===d?b:f!==E?E:-1;if(A>=0)return void(A!==f&&(n.focus.set(a.key,A,"text"),n.dirty=!0))}const[k,S,x,w]=e?[_,b,d,f]:[d,f,_,b],v=Oe(c)?c:zh(c);n.applyDOMRange({collapsed:!1,endContainer:x,endOffset:w,startContainer:k,startOffset:S}),n.dirty=!0,!sh(n,e,v)&&e&&oh(n),t==="lineboundary"&&Pi(n,"extend",e,t,"decorators")}const ay=(()=>{try{const n=new RegExp("\\p{Emoji}","u"),e=n.test.bind(n);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function sc(n,e,t){const r=n,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let s=0,a=0;for(let u=0;u<i;u++){const c=u===i-1;if(a=s,s+=o[u].length,e&&s===t||s>t||c){o.splice(u,1),c&&(a=void 0);break}}const l=o.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function ac(n,e,t,r){let o,i=e,s=!1;if(q(n)){let a=!1;const l=n.childNodes,u=l.length,c=r._blockCursorElement;i===u&&u>0&&(a=!0,i=u-1),Xr(n,r)!==void 0||Ji(n,r)||(s=!0);let d=l[i],f=!1;if(d===c)d=l[i+1],f=!0;else if(c!==null){const h=c.parentNode;n===h&&e>Array.prototype.indexOf.call(h.children,c)&&i--}if(o=br(d),D(o))i=Yt(o,a?"next":"previous");else{let h=br(n);if(h===null)return null;if(C(h)){const g=r.getElementByKey(h.getKey());g===null&&$(214),[h,i]=Dt(h,g,r).resolveChildIndex(h,g,n,e),C(h)||$(215),a&&i>=h.getChildrenSize()&&(i=Math.max(0,h.getChildrenSize()-1));let p=h.getChildAtIndex(i);if(C(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=C(p)?p:p.getParentOrThrow()),i=0}D(p)?(o=p,h=null,i=Yt(p,a?"next":"previous")):p!==h&&a&&!f&&(C(h)||$(216),i=Math.min(h.getChildrenSize(),i+1))}else{const g=St(h),m=g!==null?g:h,p=m.getIndexWithinParent(),y=r.getElementByKey(h.getKey());let _="after";if(y!==null&&br(n)===h){const b=Dt(h,y,r);b.element!==y?_=b.resolveLeafPosition(y,n,e):e===0&&ne(h)&&(_="before")}i=_==="before"?p:p+1,h=m.getParentOrThrow()}if(C(h))return[dt(h.__key,i,"element"),s]}}else o=br(n);return D(o)?[dt(o.__key,Yt(o,i,"clamp"),"text"),s]:null}function lc(n,e,t){const r=n.offset,o=n.getNode();if(r===0){const i=o.getPreviousSibling(),s=o.getParent();if(e){if((t||!e)&&i===null&&C(s)&&s.isInline()){const a=s.getPreviousSibling();D(a)&&n.set(a.__key,a.getTextContent().length,"text")}}else C(i)&&!t&&i.isInline()?n.set(i.__key,i.getChildrenSize(),"element"):D(i)&&!o.isUnmergeable()&&n.set(i.__key,i.getTextContent().length,"text")}else if(r===o.getTextContent().length){const i=o.getNextSibling(),s=o.getParent();if(e&&C(i)&&i.isInline())n.set(i.__key,0,"element");else if((t||e)&&i===null&&C(s)&&s.isInline()&&!s.canInsertTextAfter()&&s.getTextContentSize()>1){const a=s.getNextSibling();D(a)&&n.set(a.__key,0,"text")}}}function za(n){const e=te(n.key);return e===null?null:Ss(e)}function ah(n,e,t){const r=za(n),o=za(e);if(r===o||r!==null&&o!==null&&r.is(o))return!1;const i=t(r,o);if(r!==null)return C(r)?e.set(r.getKey(),i?r.getChildrenSize():0,"element"):e.set(r.getKey(),i?r.getTextContentSize():0,"text"),!0;const s=St(o);if(s===null)return!1;const a=s.getParent();if(a===null)return!1;const l=s.getIndexWithinParent();return e.set(a.getKey(),i?l+1:l,"element"),!0}function lh(n){const e=ah(n.anchor,n.focus,(t,r)=>(function(o,i,s,a){if(s!==null&&a!==null){const c=St(s),d=St(a);if(c!==null&&c.is(d)){for(const f of ws(c).values()){if(f===s.getKey())return!0;if(f===a.getKey())return!1}return!0}return c===null||d===null||c.isBefore(d)}if(s!==null){const c=St(s),d=te(i.key);return c===null||d===null||!(!c.is(d)&&!c.isParentOf(d))||c.isBefore(d)}const l=St(a),u=te(o.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 uh(n,e,t,r,o,i){if(n===null||t===null||!Wo(o,n,t))return null;const s=ac(n,e,N(i)?i.anchor:null,o);if(s===null)return null;const a=ac(t,r,N(i)?i.focus:null,o);if(a===null)return null;const[l,u]=s,[c,d]=a;if(l.type==="element"&&c.type==="element"){const h=br(n),g=br(t);if(ne(h)&&ne(g))return null}const f=o._slotsUsed&&ah(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);lc(h,m,p),lc(g,!m,p),p&&g.set(h.key,h.offset,h.type)}})(l,c),[l,c,u||d||f]}function jr(n){return C(n)&&!n.isInline()}function ch(n,e,t,r,o,i){const s=yn(),a=new rr(dt(n,e,o),dt(t,r,i),0,"");return a.dirty=!0,s._selection=a,a}function Dl(){const n=dt("root",0,"element"),e=dt("root",0,"element");return new rr(n,e,0,"")}function Eo(){return new ms(new Set)}function ly(n,e){return To(null,n,e,null)}function To(n,e,t,r){const o=t._window;if(o===null)return null;const i=r||o.event,s=i?i.type:void 0,a=s==="selectionchange",l=!ya&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&i&&i.detail===3||s==="drop"||s===void 0);let u,c,d,f;if(N(n)&&!l)return n.clone();{if(e===null)return null;const k=ft(e,t._rootElement);if(u=k.anchorNode,c=k.focusNode,d=k.anchorOffset,f=k.focusOffset,(a||s===void 0)&&N(n)&&!Wo(t,u,c))return n.clone()}const h=uh(u,d,c,f,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();D(S)?(y=S.getFormat(),_=S.getStyle()):C(S)&&(y=S.getTextFormat(),_=S.getTextStyle())}}const b=new rr(g,m,y,_);return p&&(b.dirty=!0),b}function z(){return yn()._selection}function yt(){return he()._editorState._selection}function Pn(n,e,t,r=1){const o=n.anchor,i=n.focus,s=o.getNode(),a=i.getNode();if(!e.is(s)&&!e.is(a))return;const l=e.__key;if(n.isCollapsed()){const u=o.offset;if(t<=u&&r>0||t<u&&r<0){const c=Math.max(0,u+r);o.set(l,c,"element"),i.set(l,c,"element"),uc(n)}}else{const u=n.isBackward(),c=u?i:o,d=c.getNode(),f=u?o:i,h=f.getNode();if(e.is(d)){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=f.offset;(t<=g&&r>0||t<g&&r<0)&&f.set(l,Math.max(0,g+r),"element")}}uc(n)}function uc(n){const e=n.anchor,t=e.offset,r=n.focus,o=r.offset,i=e.getNode(),s=r.getNode();if(n.isCollapsed()){if(!C(i))return;const a=i.getChildrenSize(),l=t>=a,u=l?i.getChildAtIndex(a-1):i.getChildAtIndex(t);if(D(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text"),r.set(u.__key,c,"text")}return}if(C(i)){const a=i.getChildrenSize(),l=t>=a,u=l?i.getChildAtIndex(a-1):i.getChildAtIndex(t);if(D(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text")}}if(C(s)){const a=s.getChildrenSize(),l=o>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(o);if(D(u)){let c=0;l&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}function ji(n,e,t,r,o){let i=null,s=0,a=null;r!==null?(i=r.__key,D(r)?(s=r.getTextContentSize(),a="text"):C(r)&&(s=r.getChildrenSize(),a="element")):o!==null&&(i=o.__key,D(o)?a="text":C(o)&&(a="element")),i!==null&&a!==null?n.set(i,s,a):(s=e.getIndexWithinParent(),s===-1&&(s=t.getChildrenSize()),n.set(t.__key,s,"element"))}function cc(n,e,t,r,o){n.type==="text"?n.set(t,n.offset+(e?0:o),"text"):n.offset>r.getIndexWithinParent()&&n.set(n.key,n.offset-1,"element")}function Ri(n,e,t,r,o){try{n.setBaseAndExtent(e,t,r,o)}catch{}}function dc(n,e,t){const r=Pr(n,e.getKey());if(C(e)){const o=Dt(e,r,n);return[o.element,t+o.getFirstChildOffset()]}return[r,t]}function uy(n,e,t,r,o,i){const s=i.getRootNode(),a=$n(s)||Qt(s)?Br(s):null;if(o.has(Ym)&&a!==i||a!==null&&jl(a,a))return;const l=ft(r,i);let u;if(!N(e))return void(n!==null&&Wo(t,l.anchorNode,l.focusNode)&&r.removeAllRanges());const c=e.anchor,d=e.focus,f=c.getNode(),h=d.getNode(),[g,m]=dc(t,f,c.offset),[p,y]=dc(t,h,d.offset),_=e.format,b=e.style,k=e.isCollapsed();let S=g,x=p,w=!1;if(c.type==="text"?(S=D(f)?wn(f,g,t):null,w=f.getFormat()!==_||f.getStyle()!==b):N(n)&&n.anchor.type==="text"&&(w=!0),d.type==="text"&&(x=D(h)?wn(h,p,t):null),S!==null&&x!==null){if(k&&(n===null||w||N(n)&&(n.format!==_||n.style!==b))&&(function(v,E,A,T,M,j){v._inputState.collapsedSelectionFormat={format:E,key:M,offset:T,style:A,timeStamp:j}})(t,_,b,m,c.key,performance.now()),(r.type!=="Range"||!k)&&l.anchorOffset===m&&l.focusOffset===y&&l.anchorNode===S&&l.focusNode===x){if(a===null||!i.contains(a)){const v=a!==null?Er(a):null;v!==null&&v!==t||o.has($a)||i.focus({preventScroll:!0})}if(c.type!=="element")return}if(Ri(r,S,m,x,y),Pt&&e.isCollapsed()&&i!==null&&!o.has($a)){const v=$o(i);if(v===null||!i.contains(v)){const E=Br(i.ownerDocument),A=E!==null?Er(E):null;A!==null&&A!==t||i.focus({preventScroll:!0})}}if(!o.has(Xm)&&e.isCollapsed()&&i!==null&&i===$o(i)){const v=N(e)&&e.anchor.type==="element"?S.childNodes[m]||null:(u===void 0&&(u=Ph(r,i)),u);if(v!==null){let E;if(ht(v)){const A=v.ownerDocument.createRange();A.selectNode(v),E=A.getBoundingClientRect()}else E=v.getBoundingClientRect();(function(A,T,M){const j=Bl(M),R=Kl(j);if(j===null||R===null)return;const B=M.getBoundingClientRect();if(T.bottom<B.top)return;let{top:Q,bottom:ie}=T,Z=0,L=0,P=M;for(;P!==null;){const K=P===j.body;if(K){const ee=R.visualViewport;if(ee){const $e=ee.offsetTop;Z=$e,L=$e+ee.height}else Z=0,L=gt(A).innerHeight;const xe=R.getComputedStyle(j.documentElement),ot=parseFloat(xe.scrollPaddingTop),re=parseFloat(xe.scrollPaddingBottom);isFinite(ot)&&(Z+=ot),isFinite(re)&&(L-=re)}else{const ee=P===M?B:P.getBoundingClientRect();Z=ee.top,L=ee.bottom}let se=0;if(Q<Z?se=-(Z-Q):ie>L&&(se=ie-L),se!==0)if(K)R.scrollBy(0,se);else{const ee=P.scrollTop;P.scrollTop+=se;const xe=P.scrollTop-ee;Q-=xe,ie-=xe}if(K)break;P=or(P)}})(t,E,i)}}(function(v){v._inputState.isSelectionChangeFromDOMUpdate=!0})(t)}}function ys(n){let e=z()||yt();e===null&&(e=ge().selectEnd()),e.insertNodes(n)}function dh(n,e){for(const t of n.split(/(\r?\n|\t)/))t===`
|
|
9
9
|
`||t===`\r
|
|
10
|
-
`?e.linebreak():t===" "?e.tab():t!==""&&e.text(t)}function No(n){const e=[];return dh(n,{linebreak:()=>e.push(Gt()),tab:()=>e.push(Bo()),text:t=>e.push(Fe(t))}),e}function Oa(n){const e=[];for(const t of n)We(t)||(!C(t)&&!ne(t)||t.isInline()?e.push(t):C(t)&&e.push(...Oa(t.getChildren())));return e}function to(n){let e=n;n.isCollapsed()||e.removeText();const t=z();N(t)&&(e=t),N(e)||$(161);const r=e.anchor;let o=r.getNode(),i=r.offset;for(;!Ue(o)&&Je(o)===null;){const s=o;if([o,i]=cy(o,i),s.is(o))break}return i}function cy(n,e){const t=n.getParent();if(!t){const o=Y();return ge().append(o),o.select(),[ge(),0]}if(D(n)){const o=n.splitText(e);if(o.length===0)return[t,n.getIndexWithinParent()];const i=e===0?0:1;return[t,o[0].getIndexWithinParent()+i]}if(!C(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const o=new rr(dt(n.__key,e,"element"),dt(n.__key,e,"element"),0,""),i=n.insertNewAfter(o);i&&i.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}function fc(n){return We(n)||Wl(n)||D(n)||n.isParentRequired()}function Us(n){const e=Y();let t=null;for(let r=0;r<n.length;r++){const o=n[r];if(fc(o)){if(t===null){t=o.createParentElementNode(),e.append(t);const i=n[r+1];if(We(o)&&(i===void 0||!fc(i)))continue}t.append(o)}else e.append(o),t=null}return e}function Pi(n,e,t,r,o="decorators-and-blocks"){if(e==="move"&&r==="character"&&!n.isCollapsed()){const[c,d]=t===n.isBackward()?[n.focus,n.anchor]:[n.anchor,n.focus];return d.set(c.key,c.offset,c.type),!0}const i=Ze(n.focus,t?"previous":"next"),s=r==="lineboundary",a=e==="move";let l=i,u=o==="decorators-and-blocks";if(!Ts(l)){for(const c of l){u=!1;const{origin:d}=c;if(!ne(d)||d.isIsolated()||(l=c,!s||!d.isInline()))break}if(u)for(const c of Wr(i).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(Xe(c))c.origin.isInline()||(l=c);else{if(C(c.origin))continue;ne(c.origin)&&!c.origin.isInline()&&(l=c)}break}}if(l===i)return!1;if(a&&!s&&ne(l.origin)&&l.origin.isKeyboardSelectable()){const c=Eo();return c.add(l.origin.getKey()),_e(c),!0}return l=Ve(l),a&&Mt(n.anchor,l),Mt(n.focus,l),u||!s}let Ke=null,Me=null,ct=!1,Hs=!1,bi=!1;const Js=new Set;let ki=0;const hc={characterData:!0,childList:!0,subtree:!0};function Tn(){return ct||Ke!==null&&Ke._readOnly}function Ie(){ct&&$(13)}function fh(){ki>99&&$(14)}function yn(){return Ke===null&&$(195,gh()),Ke}function dy(n){yn()!==null&&Me===null&&(Me=n),Me!==n&&sf(378)}function he(){return Me===null&&$(337,gh()),Me}function hh(){he()._dirtyType=2}function gh(){let n=0;const e=new Set,t=Rr.version;if(typeof window<"u")for(const o of jh(document)){const i=Yr(o);if(qo(i))n++;else if(i){let s=String(i.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 ph(){return Me}function gc(n,e,t){const r=e.__type,o=vh(n,r);let i=t.get(r);i===void 0&&(i=Array.from(o.transforms),t.set(r,i));const s=i.length;for(let a=0;a<s&&(i[a](e),e.isAttached());a++);}function pc(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function mh(n,e){if(!e)return;const t=n._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const o of r)t.add(o)}function fy(n){return Li(n,he()._nodes)}function Li(n,e){const t=n.type,r=e.get(t);r===void 0&&$(17,t);const o=r.klass;n.type!==o.getType()&&$(18,o.name);const i=o.importJSON(n),s=n.children;if(C(i)&&Array.isArray(s))for(let l=0;l<s.length;l++){const u=Li(s[l],e);i.append(u)}const a=n.$slots;if(a){dn(i)||$(379,o.name);for(const l in a)Hh(i,l,Li(a[l],e))}return i}function mc(n,e,t){const r=Ke,o=ct,i=Me;Ke=e,ct=!0,Me=n;try{return t()}finally{Ke=r,ct=o,Me=i}}function kn(n,e){const t=bi;bi=!0;try{(function(r,o){const i=r._pendingEditorState,s=r._rootElement,a=r._headless||s===null;if(i===null)return void(!r._updating&&r._deferred.length>0&&yc(r,r._deferred));const l=r._editorState,u=l._selection,c=i._selection,d=r._dirtyType!==0,f=Ke,h=ct,g=Me,m=r._updating,p=r._observer;let y=null;if(r._pendingEditorState=null,r._editorState=i,!a&&d&&p!==null){Me=r,Ke=i,ct=!1,r._updating=!0;try{const v=r._dirtyType,E=r._dirtyElements,A=r._dirtyLeaves;p.disconnect(),y=Fm(l,i,r,v,E,A)}catch(v){if(v instanceof Error&&r._onError(v),Hs)throw v;return Ch(r,null,s,i),yf(r),r._dirtyType=2,Hs=!0,kn(r,l),void(Hs=!1)}finally{p.observe(s,hc),r._updating=m,Ke=f,ct=h,Me=g}}i._readOnly||(i._readOnly=!0);const _=r._dirtyLeaves,b=r._dirtyElements,k=r._normalizedNodes,S=r._updateTags;d&&(r._dirtyType=0,r._cloneNotNeeded.clear(),r._dirtyLeaves=new Set,r._dirtyElements=new Map,r._normalizedNodes=new Set),r._updateTags=new Set,(function(v,E){const A=v._decorators;let T=v._pendingDecorators||A;const M=E._nodeMap;let j;for(j in T)M.has(j)||(T===A&&(T=Nh(v)),delete T[j])})(r,i);const x=a?null:Pe(gt(r));if(r._editable&&x!==null&&(d||c===null||c.dirty||!c.is(u))&&s!==null&&!S.has(Gm)){Me=r,Ke=i;try{if(p!==null&&p.disconnect(),d||c===null||c.dirty){const v=r._blockCursorElement;v!==null&&qi(v,r,s),uy(u,c,r,x,S,s)}(function(v,E,A){let T=v._blockCursorElement;if(N(A)&&A.isCollapsed()&&A.anchor.type==="element"&&E.contains($o(E))){const M=A.anchor,j=M.getNode(),R=M.offset;let B=!1,Z=null;if(R===j.getChildrenSize())xi(j.getChildAtIndex(R-1))&&(B=!0);else{const ie=j.getChildAtIndex(R);if(ie!==null&&xi(ie)){const Q=ie.getPreviousSibling();(Q===null||xi(Q))&&(B=!0,Z=v.getElementByKey(ie.__key))}}if(B){const ie=Dt(j,v.getElementByKey(j.__key),v).element;return T===null&&(v._blockCursorElement=T=(function(Q){const L=Q.theme,P=ae().createElement("div");P.contentEditable="false",P.setAttribute("data-lexical-cursor","true");let K=L.blockCursor;if(K!==void 0){if(typeof K=="string"){const se=fn(K);K=L.blockCursor=se}K!==void 0&&P.classList.add(...K)}return P})(v._config)),E.style.caretColor="transparent",void(Z===null?ie.appendChild(T):ie.insertBefore(T,Z))}}T!==null&&qi(T,v,E)})(r,s,c)}finally{p!==null&&p.observe(s,hc),Me=g,Ke=f}}y!==null&&(function(v,E,A,T,M){const j=Array.from(v._listeners.mutation),R=j.length;for(let B=0;B<R;B++){const[Z,ie]=j[B];for(const Q of ie){const L=E.get(Q);L!==void 0&&Z(L,{dirtyLeaves:T,prevEditorState:M,updateTags:A})}}})(r,y,S,_,l),N(c)||c===null||u!==null&&u.is(c)||r.dispatchCommand(qt);const w=r._pendingDecorators;w!==null&&(r._decorators=w,r._pendingDecorators=null,yo("decorator",r,!0,w)),(function(v,E,A){const T=kc(E),M=kc(A);T!==M&&yo("textcontent",v,!0,M)})(r,o||l,i),yo("update",r,!0,{dirtyElements:b,dirtyLeaves:_,editorState:i,mutatedNodes:y,normalizedNodes:k,prevEditorState:o||l,tags:S}),!m&&yc(r,r._deferred),(function(v){const E=v._updates;if(E.length===0)return void(v._cascadeCount=0);if((function(T){Js.has(T)||(Js.add(T),setTimeout(()=>{Js.delete(T),T._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 A=E.shift();if(A){const[T,M]=A;Do(v,T,M)}})(r)})(n,e)}finally{bi=t}}function yo(n,e,t,...r){const o=e._updating;e._updating=t;try{const i=e._listeners[n],s=Array.from(i);for(const[a,l]of s){l&&l();const u=a(...r);i.has(a)?i.set(a,u):u&&u()}}finally{e._updating=o}}function yh(n,e,t,r){const o=Rl(n);let i;if(!bi)for(let s=0;s<o.length;s++)o[s]._updating||(o[s]._cascadeCount=0);for(let s=4;s>=0;s--)for(let a=0;a<o.length;a++){const l=o[a];if(a>0&&l._updating){i=l;break}const u=l._commands.get(e);if(u!==void 0){const c=u[s];if(c.size>0){let d=!1;if(wt(l,()=>{for(const f of c)if(f(t,r))return void(d=!0)}),d)return d}}}return i&&i.update(()=>{yh(i,e,t,r)}),!1}function yc(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 _c(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const o=t.shift();if(o){const[i,s]=o,a=n._pendingEditorState;let l;s!==void 0&&(l=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(a===null&&$(191),a._flushSync=!0),l&&n._deferred.push(l),mh(n,s.tag)),a==null?Do(n,i,s):i()}}return r}function Do(n,e,t){const r=n._updateTags;let o,i=!1,s=!1;t!==void 0&&(o=t.onUpdate,mh(n,t.tag),i=t.skipTransforms||!1,s=t.discrete||!1),o&&n._deferred.push(o);const a=n._editorState;let l=n._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=n._pendingEditorState=_h(l||a),u=!0),l._flushSync=s;const c=Ke,d=ct,f=Me,h=n._updating;Ke=l,ct=!1,n._updating=!0,Me=n;const g=n._headless||n.getRootElement()===null;zl(null);try{u&&(g?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=(function(_,b){const k=_.getEditorState()._selection,S=Pe(gt(_));return N(k)||k==null?To(k,S,_,b):k.clone()})(n,t&&t.event||null));const p=n._compositionKey;e(),i=_c(n,i),(function(_,b){const k=b.getEditorState()._selection,S=_._selection;if(N(S)){const x=S.anchor,w=S.focus;let v;if(x.type==="text"&&(v=x.getNode(),v.selectionTransform(k,S)),w.type==="text"){const E=w.getNode();v!==E&&E.selectionTransform(k,S)}}})(l,n),n._dirtyType!==0&&(i?(function(_,b){const k=b._dirtyLeaves,S=_._nodeMap;for(const x of k){const w=S.get(x);D(w)&&w.isAttached()&&w.isSimpleText()&&!w.isUnmergeable()&&ju(w)}})(l,n):(function(_,b){const k=b._dirtyLeaves,S=b._dirtyElements,x=_._nodeMap,w=Ht(),v=new Map;let E=k,A=E.size,T=S,M=T.size;for(;A>0||M>0;){if(A>0){b._dirtyLeaves=new Set;for(const j of E){const R=x.get(j);D(R)&&R.isAttached()&&R.isSimpleText()&&!R.isUnmergeable()&&ju(R),R!==void 0&&pc(R,w)&&gc(b,R,v),k.add(j)}if(E=b._dirtyLeaves,A=E.size,A>0){ki++;continue}}b._dirtyLeaves=new Set,b._dirtyElements=new Map,T.delete("root")&&T.set("root",!0);for(const j of T){const R=j[0],B=j[1];if(S.set(R,B),!B)continue;const Z=x.get(R);Z!==void 0&&pc(Z,w)&&gc(b,Z,v)}E=b._dirtyLeaves,A=E.size,T=b._dirtyElements,M=T.size,ki++}b._dirtyLeaves=k,b._dirtyElements=S})(l,n),_c(n),(function(_,b,k,S){const x=_._nodeMap,w=b._nodeMap,v=[];for(const[T]of S){const M=w.get(T);M!==void 0&&(M.isAttached()||(C(M)&&Ni(M,T,x,w,v,S),x.has(T)||S.delete(T),v.push(T)))}for(const T of k){const M=w.get(T);M===void 0||M.isAttached()||(dn(M)&&M.__slots!==null&&Ni(M,T,x,w,v,k),x.has(T)||k.delete(T),v.push(T))}for(const T of v)w.delete(T);const E=he(),A=E._compositionKey;A===null||w.has(A)||(E._compositionKey=null)})(a,l,n._dirtyLeaves,n._dirtyElements)),p!==n._compositionKey&&(l._flushSync=!0);const y=l._selection;if(N(y)){n._slotsUsed&&lh(y);const _=l._nodeMap,b=y.anchor.key,k=y.focus.key;_.get(b)!==void 0&&_.get(k)!==void 0||$(19)}else pe(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 kn(n)}finally{Ke=c,ct=d,Me=f,n._updating=h,ki=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,kn(n)):u&&Cy(()=>{kn(n)}):(l._flushSync=!1,u&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function wt(n,e,t){Me===n&&t===void 0?Tn()?Do(n,e,t):e():Do(n,e,t)}function hy(n){if(Se(n)){let e=null;for(const t of n.getChildren())e=t.isInline()?(e||t.replace(t.createParentElementNode())).append(t):null}}class Ee extends lt{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:hy,extends:lt})}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&&$(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 ym[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&&Tt(this).length===0}isDirty(){const e=he()._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 Tt(this)){const o=Xn(this,r);C(o)&&e.push(...o.getAllTextNodes())}let t=this.getFirstChild();for(;t!==null;){if(D(t)&&e.push(t),C(t)){const r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;C(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;C(e);){const t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),r=t.length;if(e>=r){const i=t[r-1];return C(i)&&i.getLastDescendant()||i||null}const o=t[e];return C(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:te(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&$(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:te(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&$(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let r,o;if(e<t/2){for(r=this.getFirstChild(),o=0;r!==null&&o<=e;){if(o===e)return r;r=r.getNextSibling(),o++}return null}for(r=this.getLastChild(),o=t-1;r!==null&&o>=e;){if(o===e)return r;r=r.getPreviousSibling(),o--}return null}getTextContent(){let e=Uh(this);const t=this.getChildren(),r=t.length;for(let o=0;o<r;o++){const i=t[o];e+=i.getTextContent(),C(i)&&o!==r-1&&!i.isInline()&&(e+=In)}return e}getTextContentSize(){let e=(function(o){let i=0;for(const s of Tt(o)){const a=Xn(o,s);a!==null&&(i+=a.getTextContentSize())}return i})(this);const t=this.getChildren(),r=t.length;for(let o=0;o<r;o++){const i=t[o];e+=i.getTextContentSize(),C(i)&&o!==r-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const t=Ti[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){const t=hn[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Jn(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){Ie();const r=z();let o=e,i=t;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const l=this.getFirstChild();if(D(l)||C(l))return l.select(0,0)}else if(!(e!==void 0&&e!==s||t!==void 0&&t!==s)){const l=this.getLastChild();if(D(l)||C(l))return l.select()}}o===void 0&&(o=s),i===void 0&&(i=s);const a=this.__key;return N(r)?(r.anchor.set(a,o,"element"),r.focus.set(a,i,"element"),r.dirty=!0,r):ch(a,o,a,i,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();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!==""&&Ti[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){zi(this)&&$(324,this.__key,this.__type);const o=this.getChildrenSize(),i=this.getWritable();e+t<=o||$(226,String(e),String(t),String(o));for(const h of r);const s=i.__key,a=[],l=[],u=this.getChildAtIndex(e+t);let c=null,d=o-t+r.length;if(e!==0)if(e===o)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&&$(100);const m=h.getNextSibling(),p=h.__key;Ut(h.getWritable()),l.push(p),h=m}}let f=c;for(const h of r){f!==null&&h.is(f)&&(c=f=f.getPreviousSibling());const g=h.getWritable();g.__parent===s&&d--,Ut(g);const m=h.__key;if(f===null)i.__first=m,g.__prev=null;else{const p=f.getWritable();p.__next=m,g.__prev=p.__key}h.__key===s&&$(76),g.__parent=s,a.push(m),f=h}if(e+t===o)f!==null&&(f.getWritable().__next=null,i.__last=f.__key);else if(u!==null){const h=u.getWritable();if(f!==null){const g=f.getWritable();h.__prev=f.__key,g.__next=u.__key}else h.__prev=null}if(i.__size=d,l.length){const h=z();if(N(h)){const g=new Set(l),m=new Set(a),{anchor:p,focus:y}=h;bc(p,g,m)&&ji(p,p.getNode(),this,c,u),bc(y,g,m)&&ji(y,y.getNode(),this,c,u),d!==0||this.canBeEmpty()||Se(this)||this.remove()}}return i}getDOMSlot(e){return new cf(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(q(t)){const r=this.getIndent();r>0&&(t.style.paddingInlineStart=40*r+"px",t.setAttribute("data-lexical-indent",String(r)));const o=this.getDirection();o&&(t.dir=o)}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===""||Se(this)||this.getChildren().some(D)||(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=Dt(this,e,t);let o=r.getFirstChild();for(let i=this.getFirstChild();i;i=i.getNextSibling()){const s=t.getElementByKey(i.getKey());s!==null&&(o==null?(r.insertChild(s),o=s):o!==s&&r.replaceChild(s,o),o=o.nextSibling)}}}function C(n){return n instanceof Ee}function bc(n,e,t){let r=n.getNode();for(;r;){const o=r.__key;if(e.has(o)&&!t.has(o))return!0;r=r.getParent()}return!1}class _s extends lt{__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&&$(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 ne(n){return n instanceof _s}class bs extends Ee{__cachedText;$config(){return this.config("root",{extends:Ee})}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){$(51)}getTextContent(){const e=this.__cachedText;return e===null||!Tn()&&he()._dirtyType!==0?super.getTextContent():e}remove(){$(52)}replace(e){$(53)}insertBefore(e){$(54)}insertAfter(e){$(55)}updateDOM(e,t){return!1}splice(e,t,r){for(const o of r)C(o)||ne(o)||$(282);return super.splice(e,t,r)}static importJSON(e){return ge().updateFromJSON(e)}collapseAtStart(){return!0}}function Oe(n){return n instanceof bs}function _h(n){return new Ko(hf(n._nodeMap),null,n._slotsUsed)}function $l(){return new Ko(new Map([["root",new bs]]),null,!1)}function Ma(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&$(130,t.name),C(n)){const o=e.children;Array.isArray(o)||$(59,t.name);const i=n.getChildren();for(let s=0;s<i.length;s++){const a=Ma(i[s]);o.push(a)}}const r=Tt(n);if(r.length>0){const o={};for(const i of r){const s=Xn(n,i);s===null&&$(366,t.name,i),o[i]=Ma(s)}e.$slots=o}return e}function gy(n){return n instanceof Ko}class Ko{_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 mc(t&&t.editor||null,this,e)}clone(e){const t=new Ko(this._nodeMap,e===void 0?this._selection:e,this._slotsUsed);return t._readOnly=!0,t}toJSON(){return mc(null,this,()=>({root:Ma(ge())}))}}class Al extends Ee{$config(){return this.config("artificial",{extends:Ee})}createDOM(e){return ae().createElement("div")}}class ks extends lt{$config(){return this.config("linebreak",{importDOM:{br:e=>bh(e)||kh(e)?null:{conversion:py,priority:0}}})}getTextContent(){return`
|
|
11
|
-
`}createDOM(){return ae().createElement("br")}updateDOM(){return!1}isInline(){return!0}}function py(n){return{node:Gt()}}function Gt(){return tt(new ks)}function We(n){return n instanceof ks}function bh(n){const e=n.parentElement;if(e!==null&&Kr(e)){const t=e.firstChild;if(t===n||t.nextSibling===n&&Ii(t)){const r=e.lastChild;if(r===n||r.previousSibling===n&&Ii(r))return!0}}return!1}function kh(n){const e=n.parentElement;if(e!==null&&Kr(e)){const t=e.firstChild;if(t===n||t.nextSibling===n&&Ii(t))return!1;const r=e.lastChild;if(r===n||r.previousSibling===n&&Ii(r))return!0}return!1}function Ii(n){return ht(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}class xs extends Ee{$config(){return this.config("paragraph",{extends:Ee,importDOM:{p:()=>({conversion:my,priority:0})}})}createDOM(e){const t=ae().createElement("p"),r=Tr(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(q(t)){this.isEmpty()&&t.append(ae().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(D);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 o=this.getDirection();return r.setDirection(o),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||D(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 my(n){const e=Y();if(tn(e,n),ir(n,e),e.getFormatType()===""){const t=n.getAttribute("align");t&&t&&t in Ti&&e.setFormat(t)}return $t(e,n),{node:e}}function Y(){return tt(new xs)}function en(n){return n instanceof xs}function yy(n){console.warn(n)}const G=0,mt=1,xt=3,xh=4,_y=-8;function Ch(n,e,t,r,o){const i=n._keyToDOMMap;i.clear(),n._editorState=$l(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,o&&o.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="",i.set("root",t),Th(t,n,"root"))}function by(n){const e=new Set,t=new Set;for(const{klass:r,ownNodeConfig:o}of Ul(n)){const i=r.transform;if(!t.has(i)){t.add(i);const s=r.transform();s&&e.add(s)}if(o){const s=o.$transform;s&&e.add(s)}}return e}const Bi={$createDOM:(n,e)=>n.createDOM(e._config,e),$decorateDOM:(n,e,t,r)=>{},$exportDOM:(n,e)=>{const t=Ml(e,n.getType());return t&&t.exportDOM!==void 0?t.exportDOM(e,n):n.exportDOM(e)},$extractWithChild:(n,e,t,r,o)=>C(n)&&n.extractWithChild(e,t,r),$getDOMSlot:(n,e,t)=>n.getDOMSlot(e),$getSlotTargetElement:(n,e,t,r)=>null,$shouldExclude:(n,e,t)=>C(n)&&n.excludeFromCopy("html"),$shouldInclude:(n,e,t)=>!e||n.isSelected(e),$updateDOM:(n,e,t,r)=>n.updateDOM(e,t,r._config)};function Fl(n){const e=n||{},t=ph(),r=e.theme||{},o=n===void 0?t:e.parentEditor||null,i=e.disableEvents||!1,s=$l(),a=e.namespace||(o!==null?o._config.namespace:$h()),l=e.editorState,u=[bs,gn,ks,ps,xs,Al,...e.nodes||[]],{onError:c,onWarn:d,html:f}=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 x=y;y=x.replace,_=x.with,b=x.withKlass||null}if(typeof y!="function"||!y.prototype||!(y===lt||y.prototype instanceof lt)){let x="<unknown>";try{x=JSON.parse(ff)}catch{}$(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(x))}ql(y);const k=y.getType(),S=by(y);g.set(k,{exportDOM:f&&f.export?f.export.get(y):void 0,klass:y,replace:_,replaceWithKlass:b,sharedNodeState:Em(u[p]),transforms:S})}}const m=new Rr(s,o,g,{disableEvents:i,dom:{...Bi,...n&&n.dom},namespace:a,theme:r},c||console.error,d||yy,(function(p,y){const _=new Map,b=new Set,k=S=>{Object.keys(S).forEach(x=>{let w=_.get(x);w===void 0&&(w=[],_.set(x,w)),w.push(S[x])})};return p.forEach(S=>{const x=S.klass.importDOM;if(x==null||b.has(x))return;b.add(x);const w=x.call(S.klass);w!==null&&k(w)}),y&&k(y),_})(g,f?f.import:void 0),h,n);return l!==void 0&&(m._pendingEditorState=l,m._dirtyType=2),(function(p){p.registerCommand($f,Wm,G),p.registerCommand(Af,qm,G),p.registerCommand(Ff,Um,G),p.registerCommand(zf,Hm,G),p.registerCommand(fs,Jm,G)})(m),m}function ky(n,e){const t=n.get(e);n.delete(e),t&&t()}function no(n,e,t){return n.set(e,t),ky.bind(null,n,e)}class Rr{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,o,i,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 ma,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=o,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=$h(),this._onError=i,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 no(this._listeners.update,e)}registerEditableListener(e){return no(this._listeners.editable,e)}registerDecoratorListener(e){return no(this._listeners.decorator,e)}registerTextContentListener(e){return no(this._listeners.textcontent,e)}registerRootListener(e){const t=this._listeners.root;return Qe(no(t,e,e(this._rootElement,null)||void 0),()=>(function(r,o,i){const s=r.get(o);s&&s(),r.set(o,o(...i)||void 0)})(t,e,[null,this._rootElement]))}registerCommand(e,t,r){r===void 0&&$(35);const o=this._commands;o.has(e)||o.set(e,[new eo,new eo,new eo,new eo,new eo]);const i=o.get(e);i===void 0&&$(36,String(e));const s=(function(l){return 7&l})(r),a=i[s];return s!==r?a.addFront(t):a.addBack(t),()=>{a.delete(t),i.every(l=>l.size===0)&&o.delete(e)}}registerMutationListener(e,t,r){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation;let s=i.get(t);s===void 0&&(s=new Set,i.set(t,s)),s.add(o);const a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(t,o),()=>{s.delete(o),s.size===0&&i.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&$(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,o=Ec(r).get(t.getType());if(!o)return;const i=new Map;for(const s of o.keys())i.set(s,"created");i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){const r=this.registerNodeTransformToKlass(e,t),o=[r],i=r.replaceWithKlass;if(i!=null){const s=this.registerNodeTransformToKlass(i,t);o.push(s)}return(function(s,a){const l=Ec(s.getEditorState()),u=[];for(const c of a){const d=l.get(c);d&&u.push(d)}u.length!==0&&s.update(()=>{for(const c of u)for(const d of c.keys()){const f=te(d);f&&f.markDirty()}},s._pendingEditorState===null?{tag:wr}:void 0)})(this,o.map(s=>s.klass.getType())),()=>{o.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 I(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=Tr(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=e,Ch(this,t,e,o,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||Vm(t),r!=null&&t.classList.remove(...r)),e!==null){const i=Kl(e),s=e.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=2,yf(this),this._updateTags.add(wr),kn(this),this._config.disableEvents||(function(a,l){const u=a.ownerDocument;Ta.set(a,u);let c=Ai.get(u);c===void 0&&(c={editors:new Set,hasShadowEditor:void 0},Ai.set(u,c)),c.editors.add(l),c.hasShadowEditor=void 0,a.__lexicalEditor=l;const d=Hf(a);d.push(Km.register(u));for(let f=0;f<Ea.length;f++){const[h,g]=Ea[f],m=typeof g=="function"?p=>{Xu(p)||(Yu(p),(l.isEditable()||h==="click")&&g(p,l))}:p=>{if(Xu(p))return;Yu(p);const y=l.isEditable();switch(h){case"cut":return y&&I(l,gs,p);case"copy":return I(l,Io,p);case"paste":return y&&I(l,Vr,p);case"dragstart":return y&&I(l,Lf,p);case"dragover":return y&&I(l,If,p);case"dragend":return y&&I(l,jm,p);case"focus":return y&&I(l,Bf,p);case"blur":return y&&I(l,Lm,p);case"drop":return y&&I(l,Rf,p)}};d.push(mo(a,h,m))}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(wr),kn(this);yo("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&$(38);let r=e;r._readOnly&&(r=_h(e),r._selection=e._selection?e._selection.clone():null),mf(this);const o=this._pendingEditorState,i=t!==void 0?t.tag:null;o===null||o.isEmpty()||(i!=null&&this._updateTags.add(i),kn(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,wt(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(const[s,a]of r._nodeMap.entries())C(a)?this._dirtyElements.set(s,!0):this._dirtyLeaves.add(s)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return(function(r,o,i){const s=$l(),a=Ke,l=ct,u=Me,c=o._dirtyElements,d=o._dirtyLeaves,f=o._cloneNotNeeded,h=o._dirtyType;o._dirtyElements=new Map,o._dirtyLeaves=new Set,o._cloneNotNeeded=new Set,o._dirtyType=0,Ke=s,ct=!1,Me=o,zl(null);try{const g=o._nodes;Li(r.root,g),i&&i(),s._readOnly=!0,s._parsed=!0}catch(g){g instanceof Error&&o._onError(g)}finally{o._dirtyElements=c,o._dirtyLeaves=d,o._cloneNotNeeded=f,o._dirtyType=h,Ke=a,ct=l,Me=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"&&kn(this),(t==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(r,{editor:this})}update(e,t){(function(r,o,i){r._updating?r._updates.push([o,i]):Do(r,o,i)})(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),wt(this,()=>{const o=z(),i=ge();o!==null?o.dirty||_e(o.clone()):i.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?i.selectStart():i.selectEnd()),Lr("focus"),Ty(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=Pe(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,yo("editable",this,!0,e),this._slotsUsed&&this.update(()=>hh()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Rr.version=ff;let ja=null;function zl(n){ja=n}const Ol=Symbol("INTERNAL_SKIP_AFTER_CLONE_FROM");let xy=1;function vh(n,e){const t=Ml(n,e);return t===void 0&&$(30,e),t}function Ml(n,e){return n._nodes.get(e)}const Cy=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function jl(n,e){const t=e!==void 0?e:(()=>{const i=n.getRootNode();return $n(i)||Zt(i)?Br(i):null})();if(!q(t)||t.hasAttribute("data-lexical-slot"))return!1;const r=Ge(t),o=t.nodeName;return Vf(r)&&(o==="INPUT"||o==="TEXTAREA"||t.contentEditable==="true"&&Yr(t)==null)}function Wo(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 Er(e)===n&&n.read("latest",()=>!jl(e))}function qo(n){return n instanceof Rr}function Er(n){let e=n;for(;e!=null;){const t=Yr(e);if(qo(t))return t;e=or(e)}return null}function Yr(n){return n?n.__lexicalEditor:null}function Ki(n){return Mr(n)||n.isToken()}function Et(n){return Ki(n)||n.isSegmented()}function ht(n){return Lt(n)&&n.nodeType===3}function $n(n){return Lt(n)&&n.nodeType===9}function vy(n){let e=n;for(;e!=null;){if(ht(e))return e;e=e.firstChild}return null}function Jn(n,e,t){const r=hn[e];if(t!==null&&(n&r)===(t&r))return n;let o=n^r;return e==="subscript"?o&=-65:e==="superscript"?o&=-33:e==="lowercase"?(o&=-513,o&=-1025):e==="uppercase"?(o&=-257,o&=-1025):e==="capitalize"&&(o&=-257,o&=-513),o}function Sh(n){return D(n)||We(n)||ne(n)}function wh(n,e){const t=(function(){const s=ja;return ja=null,s})();if((e=e||t&&t.__key)!=null)return void(n.__key=e);Ie(),fh();const r=he(),o=yn(),i=""+xy++;o._nodeMap.set(i,n),C(n)?r._dirtyElements.set(i,!0):r._dirtyLeaves.add(i),r._cloneNotNeeded.add(i),r._dirtyType===0&&(r._dirtyType=1),n.__key=i}function Ut(n){Je(n)!==null&&$(380,n.__key,String(Je(n)));const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),o=n.getPreviousSibling(),i=n.getNextSibling(),s=i!==null?i.__key:null,a=o!==null?o.__key:null,l=o!==null?o.getWritable():null,u=i!==null?i.getWritable():null;o===null&&(r.__first=s),i===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 Wi(n){fh(),zi(n)&&$(323,n.__key,n.__type);const e=n.getLatest(),t=e.__parent!==null?e.__parent:Yn(e)?e.__slotHost:null,r=yn(),o=he(),i=r._nodeMap,s=o._dirtyElements;t!==null&&(function(l,u,c){let d=l;for(;d!==null;){if(c.has(d))return;const f=u.get(d);if(f===void 0)break;c.set(d,!1),d=f.__parent!==null?f.__parent:Yn(f)?f.__slotHost:null}})(t,i,s);const a=e.__key;o._dirtyType===0&&(o._dirtyType=1),C(n)?s.set(a,!0):o._dirtyLeaves.add(a)}function Be(n){Ie();const e=he(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=te(t);r!==null&&r.getWritable()}if(n!==null){const r=te(n);r!==null&&r.getWritable()}}}function Ht(){return Tn()?null:he()._compositionKey}function te(n,e){const t=(e||yn())._nodeMap.get(n);return t===void 0?null:t}function Eh(n,e){const t=Xr(n,he());return t!==void 0?te(t,e):null}function Th(n,e,t){n[`__lexicalKey_${e._key}`]=t}function Xr(n,e){return n[`__lexicalKey_${e._key}`]}function Ge(n,e){let t=n;for(;t!=null;){const r=Eh(t,e);if(r!==null)return r;t=or(t)}return null}function Nh(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function kc(n){return n.read(()=>ge().getTextContent())}function ge(){return yn()._nodeMap.get("root")}function _e(n){Ie();const e=yn();n!==null&&(n.dirty=!0,n.setCachedNodes(null),N(n)&&he()._slotsUsed&&lh(n)),e._selection=n}function xc(){Ie(),mf(he())}function br(n){const e=(function(t,r){let o=t;for(;o!=null;){const i=Xr(o,r);if(i!==void 0)return i;o=or(o)}return null})(n,he());return e===null?null:te(e)}function Dh(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function Rl(n){const e=[];for(let t=n;t!==null;t=t._parentEditor)e.push(t);return e}function $h(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Ah(n){return ht(n)?n.nodeValue:null}function Pl(n,e,t){const r=Pe(gt(e));if(r===null)return;const o=ft(r,e._rootElement),i=o.anchorNode;let{anchorOffset:s,focusOffset:a}=o;if(i!==null){let l=Ah(i);const u=Ge(i);if(l!==null&&D(u)){if((l===ko||l===_l)&&t){const c=t.length;l=t,s=c,a=c}l!==null&&Ll(u,l,s,a,n)}}}function Ll(n,e,t,r,o){let i=n;if(i.isAttached()&&(o||!i.isDirty())){const s=i.isComposing();if(i.isToken()&&s)return;let a=e;if((s||o)&&(e.endsWith(ko)&&(a=e.slice(0,-ko.length)),o)){const u=_l;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=i.getTextContent();if(o||a!==l){const u=z();if(a===""){if(Be(null),jo||En||Ro)i.remove();else{const m=he();Vs(i,"",u),setTimeout(()=>{m.update(()=>{i.isAttached()&&i.getTextContent()===""&&i.remove()})},20)}return}const c=i.getParent(),d=yt(),f=i.getTextContentSize(),h=Ht(),g=i.getKey();if(i.isToken()&&!s||h!==null&&g===h&&!s||N(d)&&(c!==null&&!c.canInsertTextBefore()&&d.anchor.offset===0||d.anchor.key===n.__key&&d.anchor.offset===0&&!i.canInsertTextBefore()&&!s||d.focus.key===n.__key&&d.focus.offset===f&&!i.canInsertTextAfter()&&!s))return void i.markDirty();if(!N(u)||t===null||r===null)return void Vs(i,a,u);if(u.setTextNodeRange(i,t,i,r),i.isSegmented()){const m=Fe(i.getTextContent());i.replace(m),i=m}Vs(i,a,u)}}}function Vs(n,e,t){if(n.setTextContent(e),N(t)){const r=n.getKey();let o=!1;for(const i of["anchor","focus"]){const s=t[i];s.type==="text"&&s.key===r&&(s.offset=Yt(n,s.offset,"clamp"),o=!0)}o&&(t._cachedNodes=null,t._cachedIsBackward=null)}}function Qo(n,e,t){const r=e[t]||!1;return r==="any"||r===n[t]}function Sy(n,e){return Qo(n,e,"altKey")&&Qo(n,e,"ctrlKey")&&Qo(n,e,"shiftKey")&&Qo(n,e,"metaKey")}function be(n,e,t){if(!Sy(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 sn={ctrlKey:!Ft,metaKey:Ft},Cc={altKey:Ft,ctrlKey:!Ft};function vc(n){return n.key==="Backspace"}function wy(n){const e=ge();if(N(n)){const t=n.anchor,r=n.focus,o=t.getNode();if(Oe(o))return t.set(o.getKey(),0,"element"),r.set(o.getKey(),o.getChildrenSize(),"element"),Kt(n),n;const i=o.getTopLevelElementOrThrow(),s=i.getParent();if(s===null)return C(i)&&(t.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Kt(n)),n;const a=s;return t.set(a.getKey(),0,"element"),r.set(a.getKey(),a.getChildrenSize(),"element"),Kt(n),n}{const t=e.select(0,e.getChildrenSize());return _e(Kt(t)),t}}function Tr(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const o=n[e];if(typeof o=="string"){const i=fn(o);return t[e]=i,i}return o}function Il(n,e,t,r,o){if(t.size===0)return;const i=r.__type,s=r.__key,a=e.get(i);a===void 0&&$(33,i);const l=a.klass;let u=n.get(l);u===void 0&&(u=new Map,n.set(l,u));const c=u.get(s),d=c==="destroyed"&&o==="created";(c===void 0||d)&&u.set(s,d?"updated":o)}function Sc(n,e,t){const r=n.getParent();let o=t,i=n;return r!==null&&(t===0&&(o=i.getIndexWithinParent(),i=r)),i.getChildAtIndex(o-1)}function Ey(n,e){const t=n.offset;if(n.type==="element")return Sc(n.getNode(),e,t);{const r=n.getNode();if(t===0||!e){const o=r.getPreviousSibling();return o===null?Sc(r.getParentOrThrow(),e,r.getIndexWithinParent()+0):o}}return null}function Fh(n){const e=gt(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function I(n,e,...t){return yh(n,e,t[0],n)}function Pr(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&$(75,e),t}function or(n){const e=n.assignedSlot||n.parentElement;if(e!==null)return e;const t=n.parentNode;return Zt(t)?t.host:null}function Bl(n){return $n(n)?n:q(n)?n.ownerDocument:null}function Lr(n){Ie(),he()._updateTags.add(n)}function Ty(n){Ie(),he()._deferred.push(n)}function Ir(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function Kl(n){const e=Bl(n);return e?e.defaultView:null}function gt(n){const e=n._window;return e===null&&$(78),e}function Wl(n){return C(n)&&n.isInline()||ne(n)&&n.isInline()}function zh(n){let e=n.getLatest();for(;e!==null;){if(Je(e)!==null&&C(e))return e;const t=e.getParentOrThrow();if(Se(t))return t;e=t}return e}function _o(n){return C(n)&&n.isShadowRoot()}function Se(n){return Oe(n)||_o(n)}function He(n,e=!1){const t=n.constructor.clone(n,Ol);return wh(t,null),t.afterCloneFrom(n),e||t.resetOnCopyNodeFrom(n),t}function tt(n){const e=he(),t=n.getType(),r=Ml(e,t);r===void 0&&$(200,n.constructor.name,t);const{replace:o,replaceWithKlass:i}=r;if(o!==null){const s=o(n),a=s.constructor;return i!==null?s instanceof i||$(201,i.name,i.getType(),a.name,a.getType(),n.constructor.name,t):s instanceof n.constructor&&a!==n.constructor||$(202,a.name,a.getType(),n.constructor.name,t),s.__key===n.__key&&$(203,n.constructor.name,t,a.name,a.getType()),s}return n}function Ys(n,e){!Oe(n.getParent())||C(e)||ne(e)||$(99)}function Oh(n){const e=te(n);return e===null&&$(63,n),e}function xi(n){if(!n||n.isInline())return!1;if(ne(n))return!0;if(C(n)){if(n.isShadowRoot()){const e=n.getParent();return!(C(e)&&e.isShadowRoot())}return!n.canBeEmpty()}return!1}function qi(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function Pe(n){return et?(n||window).getSelection():null}function Ny(n){const e=Kl(n);return e?e.getSelection():null}function Zt(n){return Ra(n)&&"host"in n}const Dy=[];function Mh(n){const e=n.getRootNode();if(e===n||!Zt(e))return Dy;const t=[e];let r=e.host;for(;;){const o=r.getRootNode();if(o===r||!Zt(o))break;t.push(o),r=o.host}return t}function*jh(n){const e=[n];let t;for(;t=e.pop();){yield*t.querySelectorAll('[data-lexical-editor="true"]');const r=($n(t)?t:t.ownerDocument).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);let o;for(;o=r.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function Rh(n){return n!==null?n.ownerDocument:document}function ae(){const n=ph();return Rh(n!==null?n._rootElement:null)}function Cs(n,e){if(e===null||typeof n.getComposedRanges!="function")return null;const t=Mh(e);if(t.length===0)return null;const r=n.getComposedRanges;try{const o=r.call(n,{shadowRoots:t})[0];if(o!==void 0)return o}catch{}try{const o=r.apply(n,t)[0];if(o!==void 0)return o}catch{}return null}function Ph(n,e){const t=Cs(n,e);if(t!==null){const r=$y(t);if(r!==null)return r}return n.rangeCount>0?n.getRangeAt(0):null}function ft(n,e){const t=Cs(n,e);return t===null?n:Ay(t,Fy(n))}function $y(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 Ay(n,e){const{startContainer:t,startOffset:r,endContainer:o,endOffset:i}=n;return e==="backward"?{anchorNode:o,anchorOffset:i,direction:e,focusNode:t,focusOffset:r}:{anchorNode:t,anchorOffset:r,direction:e,focusNode:o,focusOffset:i}}function Fy(n){return n.direction}function $o(n){const e=n.getRootNode();return $n(e)||Zt(e)?e.activeElement:null}function Br(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 Vn(n){const e=n.target;if(e!==null&&q(e)&&e.shadowRoot!==null&&typeof n.composedPath=="function"){const t=n.composedPath();if(t.length>0)return t[0]}return e}function Lh(n){return q(n)&&n.tagName==="A"}function zy(n){return q(n)&&n.tagName==="TR"}function q(n){return Lt(n)&&n.nodeType===1}function Lt(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function Ra(n){return Lt(n)&&n.nodeType===11}const Oy=/^(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 Ui(n){return!(!q(n)||!n.style.display.startsWith("inline"))||Oy.test(n.nodeName)}const My=/^(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 Kr(n){return(!q(n)||!n.style.display.startsWith("inline"))&&My.test(n.nodeName)}function Ue(n){if(ne(n)&&!n.isInline())return!0;if(!C(n)||Se(n))return!1;const e=n.getFirstChild(),t=e===null||We(e)||D(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function we(){return he()}function vs(n=we()){return n._config.dom||Bi}function Dt(n,e,t=we()){const r=vs(t).$getDOMSlot(n,e,t);return C(n)&&(jy(r)||$(344,n.getKey(),n.getType())),r}function jy(n){return n instanceof cf}function wn(n,e,t=we()){return vy(Dt(n,e,t).element)}const wc=new WeakMap,Ry=new Map;function Ec(n){if(!n._readOnly&&n.isEmpty())return Ry;n._readOnly||$(192);let e=wc.get(n);return e||(e=(function(t){const r=new Map;for(const[o,i]of t._nodeMap){const s=i.__type;let a=r.get(s);a||(a=new Map,r.set(s,a)),a.set(o,i)}return r})(n),wc.set(n,e)),e}function Ih(n){const e=n.constructor.clone(n,Ol);return e.afterCloneFrom(n),e}function Py(n){return(e=Ih(n))[Jf]=!0,e;var e}function ir(n,e){const t=n.getAttribute("data-lexical-indent");if(t!==null){const i=parseInt(t,10);if(Number.isFinite(i)&&i>=0)return void e.setIndent(i)}const r=parseInt(n.style.paddingInlineStart,10)||0,o=Math.round(r/40);e.setIndent(o)}function $t(n,e){const t=e.getAttribute("dir");return t==="ltr"||t==="rtl"?n.setDirection(t):n}function tn(n,e){const t=e.style.textAlign;return t&&t in Ti?n.setFormat(t):n}function Hi(n,e){n.__lexicalUnmanaged=!0,e&&e.captureSelection!==void 0&&(n.__lexicalCapturedSelection=e.captureSelection)}function Bh(n){return n.__lexicalUnmanaged===!0}function Ly(n,e=we()){const t=e.isEditable();n.contentEditable=t?"true":"false",t?n.__lexicalEditor=e:delete n.__lexicalEditor}function Ji(n,e){let t=n;for(;t!=null;){if(t.__lexicalCapturedSelection===!0)return!0;if(q(t)&&t.hasAttribute("data-lexical-slot")||Xr(t,e)!==void 0)return!1;t=or(t)}return!1}function ro(n,e){return(function(t,r){return Object.prototype.hasOwnProperty.call(t,r)})(n,e)&&n[e]!==lt[e]}const Tc=new WeakMap,Nc=Symbol("lexical.synthesizedGetType");function ql(n){const e=Tc.get(n);if(e)return e;const t=n.prototype!=null&&Su in n.prototype?n.prototype[Su]():void 0,r=(function(u){if(!(u===lt||u.prototype instanceof lt)){let c="<unknown>",d="<unknown>";try{c=u.getType()}catch{}try{Rr.version&&(d=JSON.parse(Rr.version))}catch{}$(290,u.name,c,d)}return u===_s||u===Ee||u===lt})(n),o=!r&&ro(n,"getType")?n.getType:void 0,i=o&&!(Nc in o)?o.call(n):void 0;let s,a=i;if(t)if(i)s=t[i];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(!ro(n,"getType")){const u=n,c=function(){return this!==u?lt.getType.call(this):a};c[Nc]=!0,n.getType=c}if(ro(n,"clone")||(n.clone=(u,c)=>{zl(u);const d=new n;return c!==Ol&&d.afterCloneFrom(u),d}),ro(n,"importJSON")||(n.importJSON=s&&s.$importJSON||(u=>new n().updateFromJSON(u))),!ro(n,"importDOM")&&s){const{importDOM:u}=s;u&&(n.importDOM=()=>u)}}const l={klass:n,ownNodeConfig:s,ownNodeType:a};return Tc.set(n,l),l}function*Ul(n){for(let e=n;e&&(e===lt||Vf(e.prototype));){const t=ql(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Wh(e)}}function Kh(n){const e=we();return Ie(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(n))).klass}const U=(n,e)=>{let t=n;for(;t!=null&&!Oe(t);){if(e(t))return t;t=t.getParent()}return null};function Vi(n,e){const t=[];let r=n.__first;for(;r!==null;){const o=e===null?te(r):e.get(r);o==null&&$(174),t.push(r),r=o.__next}return t}function Wh(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 qh=new Map;function dn(n){return C(n)||ne(n)}function Yn(n){return C(n)||ne(n)}function Je(n){const e=n.getLatest();return Yn(e)?e.__slotHost:null}function St(n){const e=Je(n);if(e===null)return null;const t=te(e);return C(t)||ne(t)||$(370),t}function Iy(n){const e=St(n);if(e===null)return null;const t=n.getLatest().__key;for(const[r,o]of ws(e))if(o===t)return r;return null}function Ss(n){let e=n.getLatest();for(;e!==null;){if(Je(e)!==null)return e;e=e.getParent()}return null}function ws(n){const e=n.getLatest();return dn(e)&&e.__slots!==null?e.__slots:qh}function Tt(n){return Array.from(ws(n).keys())}function Xn(n,e){const t=ws(n).get(e);return t===void 0?null:te(t)}const By=["__proto__","constructor","prototype"],Dc=Symbol("slotMapOwner");function Pa(n){let e=n.__slots;return e!==null&&e[Dc]===n||(e=new Map(e),e[Dc]=n,n.__slots=e),e}const $c=new WeakMap,Ky=[];function Wy(n){for(const{ownNodeConfig:e}of Ul(n)){const t=e&&e.slots;if(t)return t}return Ky}function Uh(n){let e="";for(const t of Tt(n)){const r=Xn(n,t);r!==null&&(e+=r.getTextContent())}return e}function Ac(n,e,t){const r=t.get(n),o=t.get(e);return r!==void 0?o!==void 0?r-o:-1:o!==void 0?1:n<e?-1:n>e?1:0}function qy(n){const e=n.__slots;if(e===null||e.size<2)return;const t=(function(s){let a=$c.get(s);if(a===void 0){const l=Wy(s),u=new Map;for(const c of l)By.includes(c)&&$(371,s.name,c),u.has(c)&&$(372,s.name,c),u.set(c,u.size);a=u,$c.set(s,a)}return a})(n.constructor);let r=null,o=!0;for(const s of e.keys()){if(r!==null&&Ac(r,s,t)>0){o=!1;break}r=s}if(o)return;const i=Array.from(e).sort(([s],[a])=>Ac(s,a,t));e.clear();for(const[s,a]of i)e.set(s,a)}function Hh(n,e,t){e!=="__proto__"&&e!=="constructor"&&e!=="prototype"||$(373,e);const r=n.getLatest();if(r.__slots!==null&&r.__slots.get(e)===t.getLatest().__key)return r;(!C(t)&&!ne(t)||t.isInline())&&$(374,t.__key);const o=n.getWritable(),i=Pa(o),s=i.get(e);s!==void 0&&Jh(s);const a=t.getWritable(),l=St(a);if(l!==null){const u=Iy(a);u!==null&&Pa(l.getWritable()).delete(u),a.__slotHost=null}return Ut(a),a.__slotHost=o.__key,i.set(e,a.__key),qy(o),(function(){const u=we();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),o}function Uy(n,e){const t=n.getWritable();if(t.__slots===null)return t;const r=t.__slots.get(e);return r!==void 0&&(Jh(r),Pa(t).delete(e)),t}function Jh(n){const e=te(n);if(e===null)return;const t=e.getWritable();Yn(t)||$(377,n),t.__slotHost=null,t.remove()}const Hy={next:"previous",previous:"next"};class Hl{origin;constructor(e){this.origin=e}[Symbol.iterator](){return Es({hasNext:It,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return ue(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return ue(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 o=r===this.direction?t:Array.from(t).reverse();let i=this;const s=this.getParentAtCaret(),a=new Map;for(let l=i.getAdjacentCaret();l!==null&&a.size<e;l=l.getAdjacentCaret()){const u=l.origin.getWritable();a.set(u.getKey(),u)}for(const l of o){if(a.size>0){const u=i.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(l.getKey()),!(u.is(l)||i.origin.is(l))){const c=l.getParent();c&&c.is(s)&&l.remove(),u.replace(l)}}else u===null&&$(263,Array.from(a).join(" "))}else i.insert(l);i=ue(l,this.direction)}for(const l of a.values())l.remove();return this}}class Ao extends Hl{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Re(e,this.direction)}getParentCaret(e="root"){return ue(Jl(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=An(this.direction);return ue(this.getNodeAtCaret(),e)||Re(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof Ao&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const Jy={root:Oe,shadowRoot:Se};function An(n){return Hy[n]}function Jl(n,e="root"){return n===null||Jy[e](n)?null:Je(n)===null?n:null}class Gn extends Hl{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ue(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return C(this.origin)?Re(this.origin,this.direction):null}getParentCaret(e="root"){return ue(Jl(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=An(this.direction);return ue(this.getNodeAtCaret(),e)||Re(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Gn&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Gn||e instanceof Zn)&&this.direction===e.direction&&this.origin.is(e.origin)}}class Zn extends Hl{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Nn(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return ue(Jl(this.getParentAtCaret(),e),this.direction)}getFlipped(){return Nn(this.origin,An(this.direction),this.offset)}isSamePointCaret(e){return e instanceof Zn&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Gn||e instanceof Zn)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return ue(this.origin,this.direction)}}function Nt(n){return n instanceof Zn}function It(n){return n instanceof Gn}function Xe(n){return n instanceof Ao}const Vy={next:class extends Zn{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Zn{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},Yy={next:class extends Gn{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Gn{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},Xy={next:class extends Ao{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(n){return this.origin.splice(0,0,[n]),this}},previous:class extends Ao{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(n){return this.origin.splice(this.origin.getChildrenSize(),0,[n]),this}}};function ue(n,e){return n?new Yy[e](n):null}function Nn(n,e,t){return n?new Vy[e](n,Yt(n,t)):null}function Yt(n,e,t="error"){const r=n.getTextContentSize();let o=e==="next"?r:e==="previous"?0:e;return(o<0||o>r)&&(t!=="clamp"&&sf(284,String(e),String(r),n.getKey()),o=o<0?0:r),o}function Fc(n,e){return new Zy(n,e)}function Re(n,e){return C(n)?new Xy[e](n):null}function Gy(n){return n&&n.getChildCaret()||n}function Qn(n){return n&&Gy(n.getAdjacentCaret())}class Vl{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 Vl(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=o=>{const i=this[o].getLatest();return Nt(i)?(function(s,a){const{direction:l,origin:u}=s,c=Yt(u,a==="focus"?An(l):l);return Fc(s,c-s.offset)})(i,o):null},t=e("anchor"),r=e("focus");if(t&&r){const{caret:o}=t,{caret:i}=r;if(o.isSameNodeCaret(i))return[Fc(o,i.offset-o.offset),null]}return[t,r]}iterNodeCarets(e="root"){const t=Nt(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),o=Nt(r),i=s=>s.isSameNodeCaret(r)?null:Qn(s)||s.getParentCaret(e);return Es({hasNext:s=>s!==null&&!(o&&r.isSameNodeCaret(s)),initial:t.isSameNodeCaret(r)?null:i(t),map:s=>s,step:i})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Zy{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,o]=this.getSliceIndices(),i=e.getTextContent();return Nn(e.setTextContent(i.slice(0,r)+i.slice(o)),t,r)}}function Wr(n){return jt(n,ue(ge(),n.direction))}function Uo(n){return jt(n,n)}function jt(n,e){return n.direction!==e.direction&&$(265),new Vl(n,e,n.direction)}function Es(n){const{initial:e,hasNext:t,step:r,map:o}=n;let i=e;return{[Symbol.iterator](){return this},next(){if(!t(i))return{done:!0,value:void 0};const s={done:!1,value:o(i)};return i=r(i),s}}}function Fo(n,e){const t=La(n.origin,e.origin);switch(t===null&&$(275,n.origin.getKey(),e.origin.getKey()),t.type){case"same":{const r=n.type==="text",o=e.type==="text";return r&&o?(function(i,s){return Math.sign(i-s)})(n.offset,e.offset):n.type===e.type?0:r?-1:o?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 Vh(t)}}function Vh(n){const{a:e,b:t}=n,r=e.__key,o=t.__key;let i=e,s=t;for(;i&&s;i=i.getNextSibling(),s=s.getNextSibling()){if(i.__key===o)return-1;if(s.__key===r)return 1}return i===null?1:-1}function ei(n,e){return e.is(n)}function zc(n){return C(n)?[n.getLatest(),null]:[n.getParent(),n.getLatest()]}function La(n,e){if(n.is(e))return{commonAncestor:n,type:"same"};const t=new Map;for(let[r,o]=zc(n);r;o=r,r=r.getParent())t.set(r,o);for(let[r,o]=zc(e);r;o=r,r=r.getParent()){const i=t.get(r);if(i!==void 0)return i===null?(ei(n,r)||$(276),{commonAncestor:r,type:"ancestor"}):o===null?(ei(e,r)||$(277),{commonAncestor:r,type:"descendant"}):((C(i)||ei(n,i))&&(C(o)||ei(e,o))&&r.is(i.getParent())&&r.is(o.getParent())||$(278),{a:i,b:o,commonAncestor:r,type:"branch"})}return null}function Ze(n,e){const{type:t,key:r,offset:o}=n,i=Oh(n.key);return t==="text"?(D(i)||$(266,i.getType(),r),Nn(i,e,o)):(C(i)||$(267,i.getType(),r),Ba(i,n.offset,e))}function Mt(n,e){const{origin:t,direction:r}=e,o=r==="next";Nt(e)?n.set(t.getKey(),e.offset,"text"):It(e)?D(t)?n.set(t.getKey(),Yt(t,r),"text"):n.set(t.getParentOrThrow().getKey(),t.getIndexWithinParent()+(o?1:0),"element"):(Xe(e)&&C(t)||$(268),n.set(t.getKey(),o?0:t.getChildrenSize(),"element"))}function qr(n){const e=z(),t=N(e)?e:Dl();return Ci(t,n),_e(t),t}function Ci(n,e){Mt(n.anchor,e.anchor),Mt(n.focus,e.focus)}function Ia(n){const{anchor:e,focus:t}=n,r=Ze(e,"next"),o=Ze(t,"next"),i=Fo(r,o)<=0?"next":"previous";return jt(pn(r,i),pn(o,i))}function Fn(n){const{direction:e,origin:t}=n,r=ue(t,An(e)).getNodeAtCaret();return r?ue(r,e):Re(t.getParentOrThrow(),e)}function Oc(n,e="root"){const t=[n];for(let r=Xe(n)?n.getParentCaret(e):n.getSiblingCaret();r!==null;r=r.getParentCaret(e))t.push(Fn(r));return t}function Xs(n){return!!n&&n.origin.isAttached()}function Qy(n,e="removeEmptySlices"){if(n.isCollapsed())return n;const t="root",r="next";let o=e;const i=Yl(n,r),s=Oc(i.anchor,t),a=Oc(i.focus.getFlipped(),t),l=new Set,u=[];for(const m of i.iterNodeCarets(t))if(Xe(m))l.add(m.origin.getKey());else if(It(m)){const{origin:p}=m;C(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),Ut(m)}for(const m of c)!m.canBeEmpty()&&!Se(m)&&m.isEmpty()&&m.isAttached()&&m.remove();for(const m of i.getTextSlices()){if(!m)continue;const{origin:p}=m.caret,y=p.getTextContentSize(),_=Fn(ue(p,r)),b=p.getMode();if(Math.abs(m.distance)===y&&o==="removeEmptySlices"||b==="token"&&m.distance!==0)_.remove();else if(m.distance!==0){o="removeEmptySlices";let k=m.removeTextSlice();const S=m.caret.origin;if(b==="segmented"){const x=k.origin,w=Fe(x.getTextContent()).setStyle(x.getStyle()).setFormat(x.getFormat());_.replaceOrInsert(w),k=Nn(w,r,k.offset)}S.is(s[0].origin)&&(s[0]=k),S.is(a[0].origin)&&(a[0]=k.getFlipped())}}let d,f;for(const m of s)if(Xs(m)){d=Ve(m);break}for(const m of a)if(Xs(m)){f=Ve(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 x=Math.min(k.length,S.length);let w;for(w=0;w<x&&k[w]===S[w];w++);const v=(T,M)=>{let j;for(let R=w;R<T.length;R++){const B=T[R];if(Se(B))return;!j&&M(B)&&(j=B)}return j},E=v(k,Ue),A=E&&v(S,T=>y.has(T.getKey())&&Ue(T));return A&&Tt(A).length>0?null:E&&A?[E,A]:null})(d,f,l);if(h){const[m,p]=h;Re(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(f){const m=(function(_){if(Xe(_)){const b=_.origin;if(Ue(b))return b}else{const b=_.getParentAtCaret();if(b&&Ue(b))return b}return null})(f),p=m&&m.getParent(),y=m&&m.getParents().findLast(_o);if(m&&p&&!Oe(p)&&m.isEmpty()&&l.has(m.getKey())&&Tt(m).length===0&&(!y||l.has(y.getKey()))){m.remove(!0);let _=p;for(;_&&!Oe(_)&&_.isEmpty();){const b=_.getParent();if(b&&Oe(b)&&b.getChildrenSize()<=1)break;const k=_;_=b,k.remove(!0)}}}const g=[d,f,...s,...a].find(Xs);if(g)return Uo(pn(Ve(g),n.direction));$(269,JSON.stringify(s.map(m=>m.origin.__key)))}function Ve(n){const e=(function(o){let i=o;for(;Xe(i);){const s=Qn(i);if(!Xe(s))break;i=s}return i})(n.getLatest()),{direction:t}=e;if(D(e.origin))return Nt(e)?e:Nn(e.origin,t,t);const r=e.getAdjacentCaret();return It(r)&&D(r.origin)?Nn(r.origin,t,An(t)):e}function Ts(n){return Nt(n)&&n.offset!==Yt(n.origin,n.direction)}function pn(n,e){return n.direction===e?n:n.getFlipped()}function Yl(n,e){return n.direction===e?n:jt(pn(n.focus,e),pn(n.anchor,e))}function Ba(n,e,t){let r=Re(n,"next");for(let o=0;o<e;o++){const i=r.getAdjacentCaret();if(i===null)break;r=i}return pn(r,t)}function Yh(n,e="root"){let t=0,r=n,o=Qn(r);for(;o===null;){if(t--,o=r.getParentCaret(e),!o)return null;r=o,o=Qn(r)}return o&&[o,t]}function e_(n){const{origin:e,offset:t,direction:r}=n;if(t===Yt(e,r))return n.getSiblingCaret();if(t===Yt(e,An(r)))return Fn(n.getSiblingCaret());const[o]=e.splitText(t);return D(o)||$(281),pn(ue(o,"next"),r)}function t_(n,e){return!0}function Xh(n,{$copyElementNode:e=He,$splitTextPointCaretNext:t=e_,rootMode:r="shadowRoot",$shouldSplit:o=t_,removeEmptyDestination:i=!1}={}){if(Nt(n))return t(n);const s=n.getParentCaret(r);if(s){const{origin:a}=s;if(Xe(n)){const u=Fn(s);if(i&&a.isEmpty())return a.remove(),u;if(!a.canBeEmpty()||!o(a,"first"))return u}const l=(function(u){const c=[];for(let d=u.getAdjacentCaret();d;d=d.getAdjacentCaret())c.push(d.origin);return c})(n);(l.length>0||!i&&a.canBeEmpty()&&o(a,"last"))&&s.insert(e(a).splice(0,0,l))}return s}function Ns(n,e,t){let r=pn(e,"next");Nt(r)&&(r.offset===0?r=ue(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=ue(r.origin,"next"))),r.origin.is(n)&&(It(r)||$(342,n.getKey(),n.getType()),r=Fn(r)),(n.is(r.getNodeAtCaret())||n.is(r.getFlipped().getNodeAtCaret()))&&n.remove(!0);for(let o=r;o;o=Xh(o,t))r=o;return Nt(r)&&$(283),r.insert(n.isInline()?Y().append(n):n),pn(ue(n.getLatest(),"next"),e.direction)}function Xl(n,e){if(!e||n===e)return n;for(const t in e)if(n[t]!==e[t])return{...n,...e};return n}function fn(...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 Ae(n,...e){const t=fn(...e);t.length>0&&n.classList.add(...t)}function Xt(n,...e){const t=fn(...e);t.length>0&&n.classList.remove(...t)}function Qe(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}function Gh(n){const e=we().getElementByKey(n.getKey());if(e===null)return null;const t=e.ownerDocument.defaultView;return t===null?null:t.getComputedStyle(e)}function Zh(n){return Gh(Oe(n)?n:n.getParentOrThrow())}function ti(n){const e=Zh(n);return e!==null&&e.direction==="rtl"}function Qh(n,e,t="self"){const r=n.getStartEndPoints();if(e.isSelected(n)&&!Et(e)&&r!==null){const[o,i]=r,s=n.isBackward(),a=o.getNode(),l=i.getNode(),u=e.is(a),c=e.is(l);if(u||c){const[d,f]=Fa(n),h=a.is(l),g=e.is(s?l:a),m=e.is(s?a:l);let p,y=0;h?(y=d>f?f:d,p=d>f?d:f):g?(y=s?f:d,p=void 0):m&&(y=0,p=s?d:f);const _=e.__text.slice(y,p);_!==e.__text&&(t==="clone"&&(e=Py(e)),e.__text=_)}}return e}function n_(n,e){const t=n.getFormatType(),r=n.getIndent();t!==e.getFormatType()&&e.setFormat(t),r!==e.getIndent()&&e.setIndent(r)}function r_(n,e,t){let r=Ze(n,t);if(Ts(r))return!1;for(;r;r=r.getParentCaret()){const o=r.getParentAtCaret();if(!o||r.getNodeAtCaret())return!1;if(e.is(o))return!0}return!1}function o_(n,e,t=n_){if(!n)return;const r=n.getStartEndPoints();let o=!1,i=null;const s=new Map;if(r){const[a,l]=r,u=U(a.getNode(),Ue);i=U(l.getNode(),Ue);const c=n.isBackward()?"previous":"next";o=C(i)&&!i.is(u)&&(function(d,f,h){const g=d.getNode();return(!C(g)||!g.isEmpty())&&r_(d,f,h)})(l,i,An(c)),C(u)&&s.set(u.getKey(),u),C(i)&&!o&&s.set(i.getKey(),i)}for(const a of n.getNodes())if(C(a)&&Ue(a)){if(o&&a.is(i))continue;s.set(a.getKey(),a)}else if(!r){const l=U(a,Ue);C(l)&&s.set(l.getKey(),l)}for(const a of s.values()){const l=e();t(a,l),a.replace(l,!0)}}function eg(n){const e=tg(n);return e!==null&&e.writingMode==="vertical-rl"}function tg(n){const e=n.anchor.getNode();return C(e)?Gh(e):Zh(e)}function Mc(n,e){let t=eg(n)?!e:e;ng(n)&&(t=!t);const r=Ze(n.focus,t?"previous":"next");if(Ts(r))return!1;if(Nt(r)&&!Mr(r.origin)&&r.origin.isUnmergeable()){const o=r.getNodeAtCaret();if(D(o)&&!Mr(o))return!0}for(const o of Wr(r)){if(Xe(o))return!o.origin.isInline();if(!C(o.origin)){if(ne(o.origin))return!0;break}}return!1}function i_(n,e,t,r){n.modify(e?"extend":"move",t,r)}function ng(n){const e=tg(n);return e!==null&&e.direction==="rtl"}function jc(n,e,t){const r=ng(n);let o;o=eg(n)||r?!t:t,i_(n,e,o,"character")}function s_(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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,e){return Array.from(l_(n))}function l_(n,e){return c_("next",n)}function u_(n,e){const t=Yh(ue(n,e));return t&&t[0]}function c_(n,e,t){const r=ge(),o=e||r,i=C(o)?Re(o,n):ue(o,n),s=d_(o),a=u_(o,n);let l=s;return Es({hasNext:u=>u!==null,initial:i,map:u=>({depth:l,node:u.origin}),step:u=>{if(u.isSameNodeCaret(a))return null;Xe(u)&&l++;const c=Yh(u);return!c||c[0].isSameNodeCaret(a)?null:(l+=c[1],c[0])}})}function d_(n){let e=-1;for(let t=n;t!==null;t=t.getParent()??St(t))e++;return e}function f_(n,e){let t=n;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function h_(n){const e=U(n,t=>C(t)&&!t.isInline());return C(e)||s_(4,n.__key),e}function g_(n){const e=z()||yt();let t;if(N(e))t=Ze(e.focus,"next");else{if(e!=null){const s=e.getNodes(),a=s[s.length-1];a&&(t=ue(a,"next"))}t=t||Re(ge(),"previous").getFlipped().insert(Y())}const r=Ns(n,t),o=Qn(r),i=Xe(o)?Ve(o):r;return qr(Uo(i)),n.getLatest()}function Jt(n,e){return n!==null&&Object.getPrototypeOf(n).constructor.name===e.name}function ni(n){let e=null;if(Jt(n,DragEvent)?e=n.dataTransfer:Jt(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];const t=e.types,r=t.includes("Files"),o=t.includes("text/html")||t.includes("text/plain");return[r,Array.from(e.files),o]}function Rc(n){const e=z();if(!N(e))return!1;const t=new Set,r=e.getNodes();for(let o=0;o<r.length;o++){const i=r[o],s=i.getKey();if(t.has(s))continue;const a=U(i,u=>C(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 p_(n,e){Re(n,"next").insert(e)}function rg(n,e){return og(n,e,null)}function og(n,e,t){let r=!1;for(const o of ig(n))e(o)?t!==null&&t(o):(r=!0,C(o)&&og(o,e,t||(i=>o.insertAfter(i))),o.remove());return r}function Yi(n,e){const t=[],r=Array.from(n).reverse();for(let o=r.pop();o!==void 0;o=r.pop())if(e(o))t.push(o);else if(C(o))for(const i of ig(o))r.push(i);return t}function ig(n){return m_(Re(n,"previous"))}function m_(n){return Es({hasNext:It,initial:n.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}const y_=Symbol.for("preact-signals");function Gl(){if(Wn>1)return void Wn--;let n,e=!1;for(!(function(){let t=Xi;for(Xi=void 0;t!==void 0;)t.S.v===t.v&&(t.S.i=t.i),t=t.o})();bo!==void 0;){let t=bo;for(bo=void 0,Gi++;t!==void 0;){const r=t.u;if(t.u=void 0,t.f&=-3,!(8&t.f)&&sg(t))try{t.c()}catch(o){e||(n=o,e=!0)}t=r}}if(Gi=0,Wn--,e)throw n}let me,bo;function Pc(n){const e=me;me=void 0;try{return n()}finally{me=e}}let Xi,Wn=0,Gi=0,Lc=0,vi=0;function Ic(n){if(me===void 0)return;let e=n.n;return e===void 0||e.t!==me?(e={i:0,S:n,p:me.s,n:void 0,t:me,e:void 0,x:void 0,r:e},me.s!==void 0&&(me.s.n=e),me.s=e,n.n=e,32&me.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=me.s,e.n=void 0,me.s.n=e,me.s=e),e):void 0}function nt(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 Ho(n,e){return new nt(n,e)}function sg(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 Bc(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 ag(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 lr(n,e){nt.call(this,void 0),this.x=n,this.s=void 0,this.g=vi-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function lg(n){const e=n.m;if(n.m=void 0,typeof e=="function"){Wn++;const t=me;me=void 0;try{e()}catch(r){throw n.f&=-2,n.f|=8,Zl(n),r}finally{me=t,Gl()}}}function Zl(n){for(let e=n.s;e!==void 0;e=e.n)e.S.U(e);n.x=void 0,n.s=void 0,lg(n)}function __(n){if(me!==this)throw new Error("Out-of-order effect");ag(this),me=n,this.f&=-2,8&this.f&&Zl(this),Gl()}function yr(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 Ql(n,e){const t=new yr(n,e);try{t.c()}catch(o){throw t.d(),o}const r=t.d.bind(t);return r[Symbol.dispose]=r,r}function b_(n,e={}){const t={};for(const r in n){const o=e[r],i=Ho(o===void 0?n[r]:o);t[r]=i}return t}nt.prototype.brand=y_,nt.prototype.h=function(){return!0},nt.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:Pc(()=>{var t;(t=this.W)==null||t.call(this)}))},nt.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&&Pc(()=>{var r;(r=this.Z)==null||r.call(this)}))}},nt.prototype.subscribe=function(n){return Ql(()=>{const e=this.value,t=me;me=void 0;try{n(e)}finally{me=t}},{name:"sub"})},nt.prototype.valueOf=function(){return this.value},nt.prototype.toString=function(){return this.value+""},nt.prototype.toJSON=function(){return this.value},nt.prototype.peek=function(){const n=me;me=void 0;try{return this.value}finally{me=n}},Object.defineProperty(nt.prototype,"value",{get(){const n=Ic(this);return n!==void 0&&(n.i=this.i),this.v},set(n){if(n!==this.v){if(Gi>100)throw new Error("Cycle detected");(function(e){Wn!==0&&Gi===0&&e.l!==Lc&&(e.l=Lc,Xi={S:e,v:e.v,i:e.i,o:Xi})})(this),this.v=n,this.i++,vi++,Wn++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Gl()}}}}),lr.prototype=new nt,lr.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===vi))return!0;if(this.g=vi,this.f|=1,this.i>0&&!sg(this))return this.f&=-2,!0;const n=me;try{Bc(this),me=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 me=n,ag(this),this.f&=-2,!0},lr.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)}nt.prototype.S.call(this,n)},lr.prototype.U=function(n){if(this.t!==void 0&&(nt.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)}},lr.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(lr.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const n=Ic(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}}),yr.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()}},yr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,lg(this),Bc(this),Wn++;const n=me;return me=this,__.bind(this,n)},yr.prototype.N=function(){2&this.f||(this.f|=2,this.u=bo,bo=this)},yr.prototype.d=function(){this.f|=8,1&this.f||Zl(this)},yr.prototype.dispose=function(){this.d()};function k_(n){return(typeof n.nodes=="function"?n.nodes():n.nodes)||[]}function x_(n,e){let t;return Ho(n(),{unwatched(){t&&(t(),t=void 0)},watched(){this.value=n(),t=e(this)}})}function ve(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 ug;try{ug="0.49.0+prod.esm"}catch{}const C_=ug??'"<unknown>+source"',v_=new Set(["__proto__","constructor","prototype"]);function cg(n,e){if(n&&e&&!Array.isArray(e)&&typeof n=="object"&&typeof e=="object"){const t=n,r=e;for(const o in r)!v_.has(o)&&Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=cg(t[o],r[o]));return n}return e}const eu=0,Ka=1,dg=2,Gs=3,ri=4,ur=5,Zs=6,oo=7;function Qs(n){return n.id===eu}function fg(n){return n.id===dg}function S_(n){return(function(e){return e.id===Ka})(n)||ve(305,String(n.id),String(Ka)),Object.assign(n,{id:dg})}const w_=new Set;let E_=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:eu}}mergeConfigs(){let e=this.extension.config||{};const t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Xl;for(const r of this.configs)e=t(e,r);return e}init(e){const t=this.state;fg(t)||ve(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)},o={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=(function(a,l,u){return Object.assign(a,{config:l,id:Gs,registerState:u})})(t,this.mergeConfigs(),r);let s;this.state=i,this.extension.init&&(s=this.extension.init(e,i.config,r)),this.state=(function(a,l,u){return Object.assign(a,{id:ri,initResult:l,registerState:u})})(i,s,o)}build(e){const t=this.state;let r;t.id!==ri&&ve(307,String(t.id),String(ur)),this.extension.build&&(r=this.extension.build(e,t.config,t.registerState));const o={...t.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=(function(i,s,a){return Object.assign(i,{id:ur,output:s,registerState:a})})(t,r,o)}register(e,t){this._signal=t;const r=this.state;r.id!==ur&&ve(308,String(r.id),String(ur));const o=this.extension.register&&this.extension.register(e,r.config,r.registerState);return this.state=(function(i){return Object.assign(i,{id:Zs})})(r),()=>{const i=this.state;i.id!==oo&&ve(309,String(r.id),String(oo)),this.state=(function(s){return Object.assign(s,{id:ur})})(i),o&&o()}}afterRegistration(e){const t=this.state;let r;return t.id!==Zs&&ve(310,String(t.id),String(Zs)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=(function(o){return Object.assign(o,{id:oo})})(t),r}getSignal(){return this._signal===void 0&&ve(311),this._signal}getInitResult(){this.extension.init===void 0&&ve(312,this.extension.name);const e=this.state;return(function(t){return t.id>=ri})(e)||ve(313,String(e.id),String(ri)),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>=Gs})(e)||ve(314,String(e.id),String(Gs)),{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&&ve(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&ve(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){const e=this.state;return(function(t){return t.id>=oo})(e)||ve(316,String(e.id),String(oo)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||w_}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>=ur})(e)||ve(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}};const Kc={tag:wr};function T_(){const n=ge();n.isEmpty()&&n.append(Y())}const N_={config:{setOptions:Kc,updateOptions:Kc},init:({$initialEditorState:n=T_})=>({$initialEditorState:n,initialized:!1}),afterRegistration(n,{updateOptions:e,setOptions:t},r){const o=r.getInitResult();if(!o.initialized){o.initialized=!0;const{$initialEditorState:i}=o;if(gy(i))n.setEditorState(i,t);else if(typeof i=="function")n.update(()=>{i(n)},e);else if(i&&(typeof i=="string"||typeof i=="object")){const s=n.parseEditorState(i);n.setEditorState(s,t)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[bs,gn,ks,ps,xs]},Wc=Symbol.for("@lexical/extension/LexicalBuilder");function qc(){}function D_(n){throw n}function oi(n){return Array.isArray(n)?n:[n]}const ea=C_;let hg=class Si{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=ea,this.roots=e;for(const t of e)this.addExtension(t)}static fromExtensions(e){const t=[oi(N_)];for(const r of e)t.push(oi(r));return new Si(t)}static maybeFromEditor(e){const t=e[Wc];return t&&(t.PACKAGE_VERSION!==ea&&ve(292,t.PACKAGE_VERSION,ea),t instanceof Si||ve(293)),t}static fromEditor(e){const t=Si.maybeFromEditor(e);return t===void 0&&ve(294),t}constructEditor(){const{$initialEditorState:e,onError:t,onWarn:r,...o}=this.buildCreateEditorArgs(),i=Object.assign(Fl({...o,...t?{onError:s=>{t(s,i)}}:{},...r?{onWarn:s=>{r(s,i)}}:{}}),{[Wc]:this});for(const s of this.sortedExtensionReps())s.build(i);return i}buildEditor(){let e=qc;function t(){try{e()}finally{e=qc}}const r=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=Qe(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&&ve(295,e.name),t}addEdge(e,t,r){const o=this.outgoingConfigEdges.get(e);o?o.set(t,r):this.outgoingConfigEdges.set(e,new Map([[t,r]]));const i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&ve(296);const t=oi(e),[r]=t;typeof r.name!="string"&&ve(297,typeof r.name);let o=this.extensionNameMap.get(r.name);if(o!==void 0&&o.extension!==r&&ve(298,r.name),!o){o=new E_(this,r),this.extensionNameMap.set(r.name,o);const i=this.conflicts.get(r.name);typeof i=="string"&&ve(299,r.name,i);for(const s of r.conflictsWith||[])this.extensionNameMap.has(s)&&ve(299,r.name,s),this.conflicts.set(s,r.name);for(const s of r.dependencies||[]){const a=oi(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,o)=>{let i=r.state;if(fg(i))return;const s=r.extension.name;var a;Qs(i)||ve(300,s,o||"[unknown]"),Qs(a=i)||ve(304,String(a.id),String(eu)),i=Object.assign(a,{id:Ka}),r.state=i;const l=this.outgoingConfigEdges.get(s);if(l)for(const u of l.keys()){const c=this.extensionNameMap.get(u);c&&t(c,s)}i=S_(i),r.state=i,e.push(r)};for(const r of this.extensionNameMap.values())Qs(r.state)&&t(r);for(const r of e)for(const[o,i]of this.outgoingConfigEdges.get(r.extension.name)||[])if(i.length>0){const s=this.extensionNameMap.get(o);if(s)for(const a of i)s.configs.add(a)}for(const[r,...o]of this.roots)if(o.length>0){const i=this.extensionNameMap.get(r.name);i===void 0&&ve(301,r.name);for(const s of o)i.configs.add(s)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const t=this.sortedExtensionReps(),r=new AbortController,o=[()=>r.abort()],i=r.signal;for(const s of t){const a=s.register(e,i);a&&o.push(a)}for(const s of t){const a=s.afterRegistration(e);a&&o.push(a)}return Qe(...o)}buildCreateEditorArgs(){const e={},t=new Set,r=new Map,o=new Map,i={},s={},a=this.sortedExtensionReps();for(const c of a){const{extension:d}=c;if(d.onError!==void 0&&(e.onError=d.onError),d.onWarn!==void 0&&(e.onWarn=d.onWarn),d.disableEvents!==void 0&&(e.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(e.parentEditor=d.parentEditor),d.editable!==void 0&&(e.editable=d.editable),d.namespace!==void 0&&(e.namespace=d.namespace),d.$initialEditorState!==void 0&&(e.$initialEditorState=d.$initialEditorState),d.nodes)for(const f of k_(d)){if(typeof f!="function"){const h=r.get(f.replace);h&&ve(302,d.name,f.replace.name,h.extension.name),r.set(f.replace,c)}t.add(f)}if(d.html){if(d.html.export)for(const[f,h]of d.html.export.entries())o.set(f,h);d.html.import&&Object.assign(i,d.html.import)}d.theme&&cg(s,d.theme)}Object.keys(s).length>0&&(e.theme=s),t.size&&(e.nodes=[...t]);const l=Object.keys(i).length>0,u=o.size>0;(l||u)&&(e.html={},l&&(e.html.import=i),u&&(e.html.export=o));for(const c of a)c.init(e);return e.onError||(e.onError=D_),e}};function Gr(n,e){const t=hg.maybeFromEditor(n);if(!t)return;const r=t.extensionNameMap.get(e);return r?r.getExtensionDependency():void 0}function $_(n){return Gr(we(),n)}let tu=class extends _s{$config(){return this.config("horizontalrule",{importDOM:{hr:()=>({conversion:A_,priority:0})}})}exportDOM(){return{element:ae().createElement("hr")}}createDOM(e){const t=ae().createElement("hr");return Ae(t,e.theme.hr),t}getTextContent(){return`
|
|
12
|
-
`}isInline(){return!1}updateDOM(){return!1}};function A_(){return{node:gg()}}function gg(){return Kh(tu)}function Zr(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 Nr;function pg(n,e){const{key:t}=e;return n&&t in n?n[t]:e.defaultValue}function mg(n){return Nr&&Nr.editor===n?Nr:void 0}function F_(n,e){if("cfg"in e){const{cfg:t,updater:r}=e;return[t,r(pg(n,t))]}return e}function z_(n,e){let t=e;for(const r of n){const[o,i]=F_(t,r),s=o.key;if(t===e&&pg(t,o)===i)continue;const a=t===e||t===void 0?O_(e):t;a[s]=i,t=a}return t}function O_(n){return Object.create(n||null)}function Zi(n,e){return[n,e]}function M_(n,e,t,r=we()){const o=Nr,i=mg(r);try{return Nr={...i,editor:r,[n]:e},t()}finally{Nr=o}}function j_(n,e=()=>{}){return(t,r=we())=>o=>{const i=mg(r),s=i&&i[n],a=z_(t,s||e(r));return a&&a!==s?M_(n,a,o,r):o()}}function yg(n,e,t,r){return Object.assign(Po(Symbol(e),{isEqual:r,parse:t}),{[n]:!0})}function R_(n){if(!$n(n))return;const e=n;if(e.querySelector("style")===null)return;const t=new Map;function r(o){let i=t.get(o);if(i===void 0){i=new Set;for(let s=0;s<o.style.length;s++)i.add(o.style[s]);t.set(o,i)}return i}try{for(const o of Array.from(e.styleSheets)){let i;try{i=o.cssRules}catch{continue}for(const s of Array.from(i)){if(!Jt(s,CSSStyleRule))continue;let a;try{a=e.querySelectorAll(s.selectorText)}catch{continue}for(const l of Array.from(a)){if(!q(l))continue;const u=r(l);for(let c=0;c<s.style.length;c++){const d=s.style[c];u.has(d)||l.style.setProperty(d,s.style.getPropertyValue(d),s.style.getPropertyPriority(d))}}}}}catch{}}const _g="@lexical/html/DOM",bg=Symbol.for("@lexical/html/DOMExportContext"),P_=Symbol.for("@lexical/html/DOMImportContext");function L_(n,e,t){return yg(bg,n,e,t)}const I_=L_("isExport",Boolean);function B_(n){const e=Gr(n,_g);return e?e.output.defaults:void 0}function K_(n){const e=Gr(n,_g);return e?e.output.runtime:void 0}function W_(n=we()){const e=K_(n);return e?e.getSessionConfig():vs(n)}const q_=j_(bg,B_),Ds=Symbol.for("@lexical/html/SelectorImpl");function zo(n,e){const t={kind:"element",predicate:(r=e,r.length===0?q:r.length===1?r[0]:(i,s)=>{for(const a of r)if(!a(i,s))return!1;return!0}),tags:n};var r;const o=i=>zo(n,[...e,i]);return{[Ds]:t,attr:(i,s,a)=>o(Wa(i,s,a)),classAll:(...i)=>o(xg(i)),classAny:(...i)=>o((function(s){const a=kg(s);return a.length===0?()=>!1:l=>{if(!q(l))return!1;const u=l.classList;for(const c of a)if(u.contains(c))return!0;return!1}})(i)),styleAny:(i,s,a)=>o((function(l,u,c){if(typeof u=="string")return d=>q(d)&&d.style.getPropertyValue(l)===u;if(u instanceof RegExp){const d=c&&c.capture,f=u;return(h,g)=>{if(!q(h))return!1;const m=h.style.getPropertyValue(l);if(!m)return!1;const p=m.match(f);return p!==null&&(d!==void 0&&(g[d]=p),!0)}}Zr(362,JSON.stringify(l))})(i,s,a))}}function kg(n){const e=[];for(const t of n)t&&e.push(t);return e}function xg(n){const e=kg(n);return e.length===0?()=>!0:t=>{if(!q(t))return!1;const r=t.classList;for(const o of e)if(!r.contains(o))return!1;return!0}}function Wa(n,e,t){if(e===!0)return r=>q(r)&&r.hasAttribute(n);if(typeof e=="string")return r=>q(r)&&r.getAttribute(n)===e;if(e instanceof RegExp){const r=t&&t.capture,o=e;return(i,s)=>{if(!q(i))return!1;const a=i.getAttribute(n);if(a==null)return!1;const l=a.match(o);return l!==null&&(r!==void 0&&(s[r]=l),!0)}}Zr(361,JSON.stringify(n))}const U_={kind:"text",predicate:ht,tags:new Set},H_={[Ds]:U_},J_={kind:"comment",predicate:n=>n.nodeType===8,tags:new Set},V_={[Ds]:J_},kr={any:()=>zo(new Set,[]),comment:()=>V_,tag(...n){n.length>0||Zr(363);const e=new Set;for(const t of n)e.add(t.toUpperCase());return zo(e,[])},text:()=>H_};function Cg(n,e){return q(n)&&n.nodeName===e.toUpperCase()}const vg=/[A-Za-z0-9_-]/;class Y_{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()&&vg.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||Zr(364,String(this.pos+1),t,this.source)}}function X_(n){const e=new Set,t=[],r=[];if(n.skipWhitespace(),n.peek()==="*")n.consume();else if(vg.test(n.peek())){const o=n.readIdent();o&&e.add(o.toUpperCase())}for(;!n.eof();){const o=n.peek();if(o==="."){n.consume();const i=n.readIdent();n.assert(i!=="",'expected class name after "."'),r.push(i)}else if(o==="#"){n.consume();const i=n.readIdent();n.assert(i!=="",'expected id after "#"'),t.push(Wa("id",i))}else{if(o!=="[")break;{n.consume(),n.skipWhitespace();const i=n.readIdent();n.assert(i!=="",'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(Wa(i,s))}}}return r.length>0&&t.push(xg(r)),{predicates:t,tags:e}}function G_(n){const e=new Y_(n,0),t=[];for(;;){const o=X_(e);if(t.push(o),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 zo(t[0].tags,t[0].predicates);const r=new Set;if(t.every(o=>o.tags.size>0))for(const o of t)for(const i of o.tags)r.add(i);return zo(r,[(o,i)=>{for(const s of t){const a=o.nodeName;if(s.tags.size>0&&!s.tags.has(a))continue;let l=!0;for(const u of s.predicates)if(!u(o,i)){l=!1;break}if(l)return!0}return!1}])}function nu(n,e,t){return yg(P_,n,e,t)}const Oo=nu("textFormat",()=>0),qa=nu("textStyle",()=>({}));function Z_(n){if(!q(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function Q_(n){if(ht(n))return!0;if(!q(n))return!1;const e=n.style.display;return e?e.startsWith("inline"):!Kr(n)&&Ui(n)}const eb=nu("whitespaceConfig",()=>({isInline:Q_,preservesWhitespace:Z_}));function ru(n){return jr(n)||ne(n)&&!n.isInline()}function Sg(n,e){const t=[];let r=[];const o=()=>{r.length!==0&&(t.push(e().splice(0,0,r)),r=[])};for(const i of n)if(ru(i)){if(o(),C(i)){const s=Sg(i.getChildren(),e);i.splice(0,i.getChildrenSize(),s)}t.push(i)}else r.push(i);return o(),t}function ou(n,e){if(!q(e))return n;const t=e.style.textAlign;if(!iu(t))return n;for(const r of n)jr(r)&&r.getFormatType()===""&&r.setFormat(t);return n}function tb(n,e,t){n.length===1&&We(n[0])&&(n=[]);const r=Y();if(q(t)){const o=t.style.textAlign;iu(o)&&r.setFormat(o)}return[r.splice(0,0,n)]}const wg={$accepts:ru,$packageRun:tb,name:"BlockSchema"},sr=kr,nb=new Set(["center","end","justify","left","right","start"]);function iu(n){return nb.has(n)}const rb={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"}},ob={CODE:um,MARK:yl},ib=new Set(["font-weight","font-style","text-decoration","vertical-align"]),sb={$import:(n,e)=>{const t=n.get(Oo),r=rb[e.nodeName],o=(function(f){return{fontStyle:f.style.fontStyle,fontWeight:f.style.fontWeight,textDecoration:f.style.textDecoration,verticalAlign:f.style.verticalAlign}})(e),i=r?(s=r,{fontStyle:(a=o).fontStyle||s.fontStyle,fontWeight:a.fontWeight||s.fontWeight,textDecoration:a.textDecoration||s.textDecoration,verticalAlign:a.verticalAlign||s.verticalAlign}):o;var s,a;let l=(u=t,c=(function(f){let h=0,g=0;const{fontWeight:m,fontStyle:p,textDecoration:y,verticalAlign:_}=f;if(m==="700"||m==="bold"?h|=fa:m!=="normal"&&m!=="400"||(g|=fa),p==="italic"?h|=ha:p==="normal"&&(g|=ha),y){const b=y.split(" ");b.includes("underline")&&(h|=pa),b.includes("line-through")&&(h|=ga),b.includes("none")&&(g|=pa|ga)}return _==="sub"?(h|=Rs,g|=Ps):_==="super"?(h|=Ps,g|=Rs):_==="baseline"&&(g|=Rs|Ps),{clear:g,set:h}})(i),u&~c.clear|c.set);var u,c;const d=ob[e.nodeName];return d&&(l|=d),l===t?n.$importChildren(e):n.$importChildren(e,{context:[Zi(Oo,l)]})},match:sr.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function Uc(n,e,t){let r=n;for(;;){let o=null;for(;(o=e?r.nextSibling:r.previousSibling)===null;){const s=r.parentNode;if(s===null)return null;r=s}if(r=o,!t.isInline(r))return null;let i=r;for(;(i=e?r.firstChild:r.lastChild)!==null;)r=i;if(ht(r))return r;if(r.nodeName==="BR")return null}}function Hc(n,e){return e!==0&&D(n)?n.setFormat(e):n}function Jc(n,e){if(D(n)){const t=(function(r){let o="";for(const i in r)ib.has(i)||(o+=`${i}: ${r[i]}; `);return o.trimEnd()})(e);t!==""&&n.setStyle(t)}return n}const ab={$import:(n,e)=>{const t=n.get(Oo),r=n.get(qa),o=n.get(eb);if((function(a,l){let u=a.parentNode;for(;u!==null;){if(l.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(e,o)){const a=No(e.textContent||"");for(const l of a)Hc(l,t),Jc(l,r);return a}const i=(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,d=!0;for(;c!==null&&(c=Uc(c,!1,l))!==null;){const f=c.textContent||"";if(f.length>0){/[ \t\n]$/.test(f)&&(u=u.slice(1)),d=!1;break}}d&&(u=u.slice(1))}if(u.length>0&&u[u.length-1]===" "){let c=a,d=!0;for(;c!==null&&(c=Uc(c,!0,l))!==null;)if((c.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){d=!1;break}d&&(u=u.slice(0,-1))}return u})(e,o);if(i==="")return[];const s=Fe(i);return Hc(s,t),Jc(s,r),[s]},match:sr.text(),name:"@lexical/html/#text"},lb={$import:()=>[],match:sr.tag("script","style"),name:"@lexical/html/script-style-ignore"},ub={$import:(n,e)=>bh(e)||kh(e)?[]:[Gt()],match:sr.tag("br"),name:"@lexical/html/br"},cb={$import:(n,e)=>{const t=Y();if(tn(t,e),ir(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&iu(r)&&t.setFormat(r)}return $t(t,e),[t.splice(0,0,n.$importChildren(e))]},match:sr.tag("p"),name:"@lexical/html/p"},db={$import:(n,e,t)=>we().hasNode(tu)?[gg()]:t(),match:sr.tag("hr"),name:"@lexical/html/hr"};sr.any();function fb(n,e){const t=[];let r=0,o=0;for(;r<n.length&&o<e.length;)n[r]<=e[o]?t.push(n[r++]):t.push(e[o++]);for(;r<n.length;)t.push(n[r++]);for(;o<e.length;)t.push(e[o++]);return t}function hb(n){const e=[],t=new Map,r=[],o=[],i=[],s=new Set;n.forEach((l,u)=>{const c=(function(f){const h=f[Ds];return h===void 0&&Zr(360),h})(l.match),d=l.name||(function(f,h){return f.kind==="text"?`#text@${h}`:f.kind==="comment"?`#comment@${h}`:f.tags.size===0?`*@${h}`:`${Array.from(f.tags).join(",").toLowerCase()}@${h}`})(c,u);if(l.name&&s.add(l.name),e.push({$import:l.$import,name:d,predicate:c.predicate}),c.kind==="text")o.push(u);else if(c.kind==="comment")i.push(u);else if(c.tags.size===0)r.push(u);else for(const f of c.tags){let h=t.get(f);h||(h=[],t.set(f,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,fb(u,r));return{byTag:a,commentIndices:i,rules:e,textIndices:o,wildcardIndices:r}}function gb(n){const e=[];for(const t of n)if(pb(t))for(const r of t.rules)e.push(r);else e.push(t);return e}function pb(n){return typeof n=="object"&&n!==null&&"__type"in n&&n.__type==="CompiledOverlayRules"}function Eg(n){const e=gb(n);return{__type:"CompiledOverlayRules",dispatch:hb(e),rules:e}}kr.any();const je={any:kr.any,comment:kr.comment,css:G_,tag:kr.tag,text:kr.text},Tg=new Set(["STYLE","SCRIPT"]);function Ng(n,e){R_(e);const t=$n(e)?e.body.childNodes:e.childNodes,r=[],o=[];for(const i of t)if(!Tg.has(i.nodeName)){const s=$g(i,n,o,!1);if(s!==null)for(const a of s)r.push(a)}return(function(i){for(const s of i)s.getParent()&&s.getNextSibling()instanceof Al&&s.insertAfter(Gt());for(const s of i){const a=s.getParent();a&&a.splice(s.getIndexWithinParent(),1,s.getChildren())}})(o),r}function mb(n,e=null,t=we()){return q_([Zi(I_,!0)],t)(()=>{const r=ge(),o=W_(t),i=N(e)?Ss(e.anchor.getNode()):null,s=n.append.bind(n);for(const a of(C(i)?i:r).getChildren())Dg(t,a,s,e,o);return n})}function su(n,e=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&Zr(338),dy(n),mb(ae().createElement("div"),e,n).innerHTML}function Dg(n,e,t,r=null,o=vs(n)){let i=o.$shouldInclude(e,r,n);const s=o.$shouldExclude(e,r,n);let a=e;r!==null&&D(e)&&(a=Qh(r,e,"clone"));const l=o.$exportDOM(a,n),{element:u,after:c,append:d,$getChildNodes:f}=l;if(!u)return!1;const h=ae().createDocumentFragment(),g=f?f():C(a)?a.getChildren():[],m=i&&pe(r)&&C(e)?null:r,p=h.append.bind(h);for(const y of g){const _=Dg(n,y,p,m,o);!i&&_&&o.$extractWithChild(e,y,r,"html",n)&&(i=!0)}if(i&&!s){if((q(u)||Ra(u))&&(d?d(h):u.append(h)),t(u),c){const y=c.call(a,u);y&&(Ra(u)?u.replaceChildren(y):u.replaceWith(y))}}else t(h);return i}function $g(n,e,t,r,o=new Map,i){const s=[];if(Tg.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 o)if(a=m(a,i),!a)break;a&&s.push(...Array.isArray(g)?g:[a])}u.forChild!=null&&o.set(n.nodeName,u.forChild)}const d=n.childNodes;let f=[];const h=(a==null||!Se(a))&&(a!=null&&jr(a)||r);for(let g=0;g<d.length;g++)f.push(...$g(d[g],e,t,h,new Map(o),a));if(c!=null&&(f=c(f)),Kr(n)&&(f=yb(n,f,h?()=>{const g=new Al;return t.push(g),g}:Y)),a==null)if(f.length>0)for(const g of f)s.push(g);else Kr(n)&&(function(g){return g.nextSibling==null||g.previousSibling==null?!1:Ui(g.nextSibling)&&Ui(g.previousSibling)})(n)&&s.push(Gt());else C(a)&&a.append(...f);return s}function yb(n,e,t){const r=n.style.textAlign,o=[];let i=[];for(let s=0;s<e.length;s++){const a=e[s];if(jr(a))r&&!a.getFormat()&&a.setFormat(r),o.push(a);else if(i.push(a),s===e.length-1||s<e.length-1&&jr(e[s+1])){const l=t();l.setFormat(r),l.append(...i),o.push(l),i=[]}}return o}function _b(n,e){let t=n;for(let r=ue(n,e);r&&(Fg(r.origin)||Mr(r.origin));r=r.getAdjacentCaret())t=r.origin;return t}function bb(n){return _b(n,"previous")}function Ag(n,e){for(const t of n.childNodes)if(q(t)&&t.tagName===e||Ag(t,e))return!0;return!1}const uo="data-language",io="data-highlight-language",ii="data-theme";let $s=class extends Ee{__language;__theme;__isSyntaxHighlightSupported;$config(){return this.config("code",{extends:Ee,importDOM:{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||Ag(e,"BR"))?{conversion:Vc,priority:1}:null,div:()=>({conversion:kb,priority:1}),pre:()=>({conversion:Vc,priority:0}),table:e=>ta(e)?{conversion:xb,priority:3}:null,td:e=>{const t=e,r=t.closest("table");return t.classList.contains("js-file-line")||r&&ta(r)?{conversion:Yc,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&ta(t)?{conversion:Yc,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=ae().createElement("code");Ae(t,e.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(t.setAttribute(uo,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(io,r));const o=this.getTheme();o&&t.setAttribute(ii,o);const i=this.getStyle();return i&&Sn(t.style,i),t}updateDOM(e,t,r){const o=this.__language,i=e.__language;o?o!==i&&t.setAttribute(uo,o):i&&t.removeAttribute(uo);const s=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&i?s&&o?o!==i&&t.setAttribute(io,o):t.removeAttribute(io):s&&o&&t.setAttribute(io,o);const a=this.__theme,l=e.__theme;a?a!==l&&t.setAttribute(ii,a):l&&t.removeAttribute(ii);const u=this.__style,c=e.__style;return u!==c&&Sn(t.style,u,c),!1}exportDOM(e){const t=ae().createElement("pre");Ae(t,e._config.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(t.setAttribute(uo,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(io,r));const o=this.getTheme();o&&t.setAttribute(ii,o);const i=this.getStyle();return i&&Sn(t.style,i),{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(!Gr(we(),"@lexical/code")){const s=Cb(e);if(s)return s}const{anchor:r,focus:o}=e,i=(r.isBefore(o)?r:o).getNode();if(D(i)){let s=bb(i);const a=[];for(;;)if(Mr(s))a.push(Bo()),s=s.getNextSibling();else{if(!Fg(s))break;{let g=0;const m=s.getTextContent(),p=s.getTextContentSize();for(;g<p&&m[g]===" ";)g++;if(g!==0&&a.push(vb(" ".repeat(g))),g!==p)break;s=s.getNextSibling()}}const l=i.splitText(r.offset)[0],u=r.offset===0?0:1,c=l.getIndexWithinParent()+u,d=i.getParentOrThrow(),f=[Gt(),...a];d.splice(c,0,f);const h=a[a.length-1];h?h.select():r.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(au(i)){const{offset:s}=e.anchor;i.splice(s,0,[Gt()]),i.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 ut(n,e){return Kh($s).setLanguage(n).setTheme(e)}function au(n){return n instanceof $s}function Vc(n){return{node:ut(n.getAttribute(uo))}}function kb(n){const e=n,t=Xc(e);return t||(function(r){let o=r.parentElement;for(;o!==null;){if(Xc(o))return!0;o=o.parentElement}return!1})(e)?{node:t?ut():null}:{node:null}}function xb(){return{node:ut()}}function Yc(){return{node:null}}function Xc(n){return n.style.fontFamily.match("monospace")!==null}function ta(n){return n.classList.contains("js-file-line-container")}function Cb(n){const{anchor:e}=n;if(n.isCollapsed()&&e.type==="element"){const t=e.getNode();if(au(t)){const r=t.getChildrenSize();if(r>=2&&e.offset===r){const o=t.getLastChild();if(We(o)&&We(o.getPreviousSibling())){const i=Y();return t.splice(r-2,2,[]).insertAfter(i,!1),i.select(),i}}}}return null}class lu extends gn{__highlightType;constructor(e="",t,r){super(e,r),this.__highlightType=t}$config(){return this.config("code-highlight",{extends:gn})}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=na(e.theme,this.__highlightType);return Ae(t,r),t}updateDOM(e,t,r){const o=super.updateDOM(e,t,r),i=na(r.theme,e.__highlightType),s=na(r.theme,this.__highlightType);return i!==s&&(i&&Xt(t,i),s&&Ae(t,s)),o}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 ut()}}function na(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function vb(n="",e){return tt(new lu(n,e))}function Fg(n){return n instanceof lu}const zg="data-language";function Og(n){return n.style.fontFamily.match("monospace")!==null}function Ua(n){let e=n.parentElement;for(;e!==null;){if(Og(e))return!0;e=e.parentElement}return!1}const Sb=Eg([{$import:(n,e)=>n.$importChildren(e),match:je.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),wb={$import:(n,e)=>[ut(e.getAttribute(zg)).splice(0,0,n.$importChildren(e))],match:je.tag("pre"),name:"@lexical/code/pre"},Eb={$import:(n,e,t)=>{const r=e.textContent||"";return/\r?\n/.test(r)||e.querySelector("br")!==null?[ut(e.getAttribute(zg)).splice(0,0,n.$importChildren(e))]:t()},match:je.tag("code"),name:"@lexical/code/code-multiline"};function si(n){if(!q(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 Tb(n){let e=!1;const t=[];let r="",o=!1;const i=()=>{o&&(t.push(r),r="",o=!1)};for(const s of Array.from(n.childNodes))if(q(s))s.tagName==="DIV"?(i(),t.push(s.textContent||""),e=!0):s.tagName==="BR"?(i(),t.push(""),e=!0):(r+=s.textContent||"",o=!0);else if(ht(s)){const a=s.textContent||"";a.length>0&&(r+=a,o=!0)}return i(),e?t:null}je.tag("div"),je.tag("div","br");const Nb={$import:(n,e,t)=>Og(e)?[ut().splice(0,0,n.$importChildren(e))]:Ua(e)?n.$importChildren(e):t(),match:je.tag("div"),name:"@lexical/code/div"};je.tag("table").classAll("js-file-line-container"),je.tag("td").classAll("js-file-line");const Gc=new Set(["http:","https:","mailto:","sms:","tel:"]);let Dn=class extends Ee{__url;__target;__rel;__title;$config(){return this.config("link",{extends:Ee,importDOM:{a:()=>({conversion:$b,priority:1})}})}constructor(e="",t={},r){super(r);const{target:o=null,rel:i=null,title:s=null}=t;this.__url=e,this.__target=o,this.__rel=i,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=ae().createElement("a");return this.updateLinkDOM(null,t,e),Ae(t,e.theme.link),t}updateLinkDOM(e,t,r){if(Lh(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(const o of["target","rel","title"]){const i=`__${o}`,s=this[i];e&&e[i]===s||(s?t[o]=s:t.removeAttribute(o))}}}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=td(e);try{const r=new URL(td(e));if(!Gc.has(r.protocol))return"about:blank"}catch{const o=t.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(o!=null&&!Gc.has(`${o[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=He(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 o=t.anchor.getNode(),i=t.focus.getNode();return(this.is(o)||this.isParentOf(o))&&(this.is(i)||this.isParentOf(i))&&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 Zc(n){const e=Ze(n,"next");return[e,e.getFlipped()]}function Qc(n,e){for(const t of e)if(t.origin.isAttached()){const r=Ve(t);return void Mt(n,r)}}function Db(n){const e=z();let t=null,r=null;function o(){N(e)&&(Qc(e.anchor,t),Qc(e.focus,r),Kt(e))}N(e)&&(t=Zc(e.anchor),r=Zc(e.focus));let i=!1;for(const a of Re(n,"next")){const l=a.origin;if(C(l)&&!l.isInline()){const u=l.getChildren();if(u.length>0){const c=He(n);c.append(...u),l.append(c),i=!0}Ns(l,Fn(a),{$shouldSplit:()=>!1})}}function s(a,l,u){const[c,d]=a,f=g=>It(g)&&g.origin.is(l);if(!f(c)&&!f(d))return a;const h=Ve(Re(u,"next"));return[h,h.getFlipped()]}if(n.isAttached()){const a=n.getPreviousSibling();if(at(a)&&a.shouldMergeAdjacentLink(n))return t&&(t=s(t,a,n)),r&&(r=s(r,a,n)),a.append(...n.getChildren()),n.remove(),void o();const l=n.getNextSibling();at(l)&&n.shouldMergeAdjacentLink(l)&&(t&&(t=s(t,n,l)),r&&(r=s(r,n,l)),n.append(...l.getChildren()),l.remove(),i=!0)}if(i){if(!n.canBeEmpty()&&n.isEmpty()){const a=n.getParent();n.remove(),a&&a.isEmpty()&&a.remove()}o()}}function $b(n){let e=null;if(Lh(n)){const t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=Mo(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function Mo(n="",e){return tt(new Dn(n,e))}function at(n){return n instanceof Dn}let uu=class extends Dn{__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:Dn})}shouldMergeAdjacentLink(e){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?ae().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=Ab(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}};function Ab(n="",e){return tt(new uu(n,e))}function _r(n){return n instanceof uu}const Ha=W("TOGGLE_LINK_COMMAND");function ed(n,e){if(n.type==="element"){const t=n.getNode();return C(t)||(function(r,...o){const i=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const a of o)s.append("v",a);throw i.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${i.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 ra(n,e={}){let t;if(n&&typeof n=="object"){const{url:c,...d}=n;t=c,e={...d,...e}}else t=n;const{target:r,title:o}=e,i=e.rel===void 0?"noreferrer":e.rel,s=z();if(s===null||!N(s)&&!pe(s))return;if(pe(s)){const c=s.getNodes();return c.length===0?void 0:void c.forEach(d=>{if(t===null){const f=U(d,h=>!_r(h)&&at(h));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{const f=U(d,h=>!_r(h)&&at(h));if(f)f.setURL(t),r!==void 0&&f.setTarget(r),i!==void 0&&f.setRel(i);else{const h=Mo(t,{rel:i,target:r});d.insertBefore(h),h.append(d)}}})}if(s.isCollapsed()&&t===null)for(const c of s.getNodes()){const d=U(c,f=>!_r(f)&&at(f));return void(d!==null&&(d.getParentOrThrow().splice(d.getIndexWithinParent(),0,d.getChildren()),d.remove()))}const a=s.extract();if(t===null){const c=new Set;return void a.forEach(d=>{const f=U(d,h=>!_r(h)&&at(h));if(f!==null){const h=f.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())||C(v)&&m.some(E=>g.isParentOf(E)&&v.isParentOf(E)),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(_),x=k===0,w=S===y.length-1;if(x)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 E=b.length-1;E>=0;E--)g.insertAfter(b[E]);const v=y.slice(S+1);if(v.length>0){const E=He(g);b[b.length-1].insertAfter(E),v.forEach(A=>E.append(A))}}})(f,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),i!==void 0&&c.setRel(i),o!==void 0&&c.setTitle(o))};if(a.length===1){const c=a[0],d=U(c,at);if(d!==null)return u(d)}(function(c){const d=z();if(!N(d))return c();const f=Kt(d),h=f.isBackward(),g=ed(f.anchor,h?-1:0),m=ed(f.focus,h?0:-1);if(c(),g||m){const p=z();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")}_e(Kt(y))}}})(()=>{let c=null;for(const d of a){if(!d.isAttached())continue;const f=U(d,at);if(f){u(f);continue}if(C(d)){if(!d.isInline())continue;if(at(d)){if(!(_r(d)||c!==null&&c.getParentOrThrow().isParentOf(d))){u(d),c=d;continue}for(const g of d.getChildren())d.insertBefore(g);d.remove();continue}}const h=d.getPreviousSibling();at(h)&&h.is(c)?h.append(d):(c=Mo(t,{rel:i,target:r,title:o}),d.insertAfter(c),c.append(d))}})}const Fb=/^\+?[0-9\s()-]{5,}$/;function td(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:Fb.test(n)?`tel:${n}`:`https://${n}`}je.tag("a");function zb(n,e){return Qe(n.registerNodeTransform(Dn,Db),n.registerCommand(Ha,t=>{const r=e.validateUrl.peek(),o=e.attributes.peek();if(t===null)return ra(null),!0;if(typeof t=="string")return!(r!==void 0&&!r(t))&&(ra(t,o),!0);{const{url:i,target:s,rel:a,title:l}=t;return ra(i,{...o,rel:a,target:s,title:l}),!0}},G),Ql(()=>{const t=e.validateUrl.value;if(!t)return;const r=e.attributes.value;return n.registerCommand(Vr,o=>{const i=z();if(!N(i)||i.isCollapsed()||!Jt(o,ClipboardEvent)||o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return t(s)?!i.getNodes().some(a=>C(a)||D(a)&&!a.isSimpleText())&&(n.dispatchCommand(Ha,{...r,url:s}),o.preventDefault(),!0):!1},mt)}))}function bn(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 Ja(n){let e=1,t=n.getParent();for(;t!=null;){if(le(t)){const r=t.getParent();if(V(r)){e++,t=r.getParent();continue}bn(40)}return e}return e}function Va(n){const e=n.getParent();V(e)||bn(40);let t=e,r=e;for(;r!==null;)r=r.getParent(),V(r)&&(t=r);return t}function Mg(n){let e=[];const t=n.getChildren().filter(le);for(let r=0;r<t.length;r++){const o=t[r],i=o.getFirstChild();V(i)?e=e.concat(Mg(i)):e.push(o)}return e}function vt(n){return le(n)&&V(n.getFirstChild())}function jg(n,e){return le(n)&&(e.length===0||e.length===1&&n.is(e[0])&&n.getChildrenSize()===0)}function nd(n){const e=z();if(e!==null){let t=e.getNodes();if(N(e)){const[o]=e.getStartEndPoints(),i=o.getNode(),s=i.getParent();if(Se(i)){const a=i.getFirstChild();if(a)t=a.selectStart().getNodes();else{const l=Y();i.append(l),t=l.select().getNodes()}}else if(jg(i,t)){const a=Rt(n);if(Se(s)){i.replace(a);const l=Qt();C(i)&&(l.setFormat(i.getFormatType()),l.setIndent(i.getIndent())),a.append(l)}else if(le(i)){const l=i.getParentOrThrow();er(a,l.getChildren()),l.replace(a)}return}}const r=new Set;for(let o=0;o<t.length;o++){const i=t[o];if(C(i)&&i.isEmpty()&&!le(i)&&!r.has(i.getKey())){rd(i,n);continue}let s=Sh(i)?i.getParent():le(i)&&i.isEmpty()?i:null;for(;s!=null;){const a=s.getKey();if(V(s)){if(!r.has(a)){const l=Rt(n);er(l,s.getChildren()),s.replace(l),r.add(a)}break}{const l=s.getParent();if(Se(l)&&!r.has(a)){r.add(a),rd(s,n);break}s=l}}}}}function er(n,e){n.splice(n.getChildrenSize(),0,e)}function rd(n,e){if(V(n))return n;const t=n.getPreviousSibling(),r=n.getNextSibling(),o=Qt();let i;if(er(o,n.getChildren()),V(t)&&e===t.getListType())t.append(o),V(r)&&e===r.getListType()&&(er(t,r.getChildren()),r.remove()),i=t;else if(V(r)&&e===r.getListType())r.getFirstChildOrThrow().insertBefore(o),i=r;else{const a=Rt(e);a.append(o),n.replace(a),i=a}o.setFormat(n.getFormatType()),o.setIndent(n.getIndent());const s=z();return N(s)&&(i.getKey()===s.anchor.key&&s.anchor.set(o.getKey(),s.anchor.offset,"element"),i.getKey()===s.focus.key&&s.focus.set(o.getKey(),s.focus.offset,"element")),n.remove(),i}function cu(n,e){const t=n.getLastChild(),r=e.getFirstChild();t&&r&&vt(t)&&vt(r)&&(cu(t.getFirstChild(),r.getFirstChild()),r.remove());const o=e.getChildren();o.length>0&&n.append(...o),e.remove()}function Ob(){const n=z();if(N(n)){const e=new Set,t=n.getNodes(),r=n.anchor.getNode();if(jg(r,t))e.add(Va(r));else for(let o=0;o<t.length;o++){const i=t[o];if(Sh(i)){const s=f_(i,zn);s!=null&&e.add(Va(s))}}for(const o of e){let i=o;const s=Mg(o);for(const a of s){const l=Y().setTextStyle(n.style).setTextFormat(n.format);er(l,a.getChildren()),i.insertAfter(l),i=l,a.__key===n.anchor.key&&Mt(n.anchor,Ve(Re(l,"next"))),a.__key===n.focus.key&&Mt(n.focus,Ve(Re(l,"next"))),a.remove()}o.remove()}}}function Rg(n){const e=n.getListType()!=="check";let t=n.getStart();for(const r of n.getChildren())le(r)&&(r.getValue()!==t&&r.setValue(t),e&&r.getLatest().__checked!=null&&r.setChecked(void 0),V(r.getFirstChild())||t++)}function Mb(n){const e=new Set;if(vt(n)||e.has(n.getKey()))return;const t=n.getParent(),r=n.getNextSibling(),o=n.getPreviousSibling();if(vt(r)&&vt(o)){const i=o.getFirstChild();if(V(i)){i.append(n);const s=r.getFirstChild();V(s)&&(er(i,s.getChildren()),r.remove(),e.add(r.getKey()))}}else if(vt(r)){const i=r.getFirstChild();if(V(i)){const s=i.getFirstChild();s!==null&&s.insertBefore(n)}}else if(vt(o)){const i=o.getFirstChild();V(i)&&i.append(n)}else if(V(t)){const i=He(n),s=He(t);i.append(s),s.append(n),o?o.insertAfter(i):r?r.insertBefore(i):t.append(i)}}function od(n){if(vt(n))return;const e=n.getParent(),t=e?e.getParent():void 0;if(V(t?t.getParent():void 0)&&le(t)&&V(e)){const r=e?e.getFirstChild():void 0,o=e?e.getLastChild():void 0;if(n.is(r))t.insertBefore(n),e.isEmpty()&&t.remove();else if(n.is(o))t.insertAfter(n),e.isEmpty()&&t.remove();else{const i=He(n),s=He(e);i.append(s),n.getPreviousSiblings().forEach(u=>s.append(u));const a=He(n),l=He(e);a.append(l),er(l,n.getNextSiblings()),t.insertBefore(i),t.insertAfter(a),t.replace(n)}}}function jb(n=!1){const e=z();if(!N(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();let r=null;if(le(t)&&t.getChildrenSize()===0)r=t;else if(D(t)){const u=t.getParent();le(u)&&u.getChildren().every(c=>D(c)&&c.getTextContent().trim()==="")&&(r=u)}if(r===null)return!1;const o=Va(r),i=r.getParent();V(i)||bn(40);const s=i.getParent();let a;if(Se(s))a=Y(),o.insertAfter(a);else{if(!le(s))return!1;a=He(s),s.insertAfter(a)}a.setTextStyle(e.style).setTextFormat(e.format).select();const l=r.getNextSiblings();if(l.length>0){const u=n?(function(d,f){return d.getStart()+f.getIndexWithinParent()})(i,r):1,c=He(i).setStart(u);if(le(a)){const d=He(a);d.append(c),a.insertAfter(d)}else a.insertAfter(c);c.append(...l)}return(function(u){let c=u;for(;c.getNextSibling()==null&&c.getPreviousSibling()==null;){const d=c.getParent();if(d==null||!le(d)&&!V(d))break;c=d}c.remove()})(r),!0}let zn=class extends Ee{__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)||bn(340);const o=[e];for(const i of["previous","next"]){o.reverse();for(const{origin:s}of ue(e,i)){if(!le(s))break;o.push(s)}}e.insertBefore(r),r.splice(0,0,o),Se(t)||(Ns(r,Fn(ue(r,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},extends:Ee,importDOM:{li:()=>({conversion:Rb,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=ae().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,d=u.nested&&u.nested.listitem,f=l.getParent(),h=V(f)&&f.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),d!==void 0&&p.push(...fn(d)),p.length>0&&Xt(s,...p);const y=[];if(c!==void 0&&y.push(...fn(c)),h){const _=g?u.listitemChecked:u.listitemUnchecked;_!==void 0&&y.push(_)}d!==void 0&&m&&y.push(...fn(d)),y.length>0&&Ae(s,...y)})(t,r.theme,this);const o=e?e.__style:"",i=this.__style;o!==i&&Sn(t.style,i,o),(function(s,a,l){const u=a.__textStyle,c=l?l.__textStyle:"";if(l!==null&&c===u)return;const d=Mi(u);for(const f in d)s.style.setProperty(`--listitem-marker-${f}`,d[f]);if(c!=="")for(const f in Mi(c))f in d||s.style.removeProperty(`--listitem-marker-${f}`)})(t,this,e)}updateDOM(e,t,r){const o=t;return this.updateListItemDOM(e,o,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 o=this.getDirection();return o&&(t.dir=o),vt(this)?{after(i){if(q(i)){const s=i.previousElementSibling;if(q(s)&&s.nodeName==="LI"){for(;i.firstChild;)s.append(i.firstChild);i.remove()}}return i},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(C(r)&&this.canMergeWith(r)){const o=r.getChildren();this.append(...o),r.remove()}else super.append(r)}return this}replace(e,t){if(le(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=He(r);let a=this.getNextSibling();for(;a;){const l=a;a=a.getNextSibling(),s.append(l)}r.insertAfter(e),e.insertAfter(s)}const o=this.__key;let i=0;if(t&&(C(e)||bn(139),i=e.getChildrenSize(),e.splice(i,0,this.getChildren())),t&&C(e)){const s=z();if(N(s))for(const a of s.getStartEndPoints())a.key===o&&a.type==="element"&&a.set(e.getKey(),i+a.offset,"element")}return this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,t=!0){const r=this.getParentOrThrow();if(V(r)||bn(39),le(e))return super.insertAfter(e,t);const o=this.getNextSiblings();if(r.insertAfter(e,t),o.length!==0){const i=He(r);o.forEach(s=>i.append(s)),e.insertAfter(i,t)}return e}remove(e){const t=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),t&&r&&vt(t)&&vt(r)&&(cu(t.getFirstChild(),r.getFirstChild()),r.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){const r=He(this);return this.insertAfter(r,t),r}collapseAtStart(e){if(vt(this))return!1;const t=this.getParentOrThrow();if(le(t.getParentOrThrow()))return od(this),!0;const r=Y().append(...this.getChildren()),o=this.getNextSiblings();if(o.length>0){const i=He(t);i.append(...o),t.insertAfter(i)}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(;le(t);)t=t.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&bn(117),(e=Math.floor(e))>=0||bn(199);let t=this.getIndent();for(;t!==e;)t<e?(Mb(this),t++):(od(this),t--);return this}canInsertAfter(e){return le(e)}canReplaceWith(e){return le(e)}canMergeWith(e){return le(e)||en(e)}extractWithChild(e,t){if(!N(t))return!1;const r=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(o)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Rt("bullet")}canMergeWhenEmpty(){return!0}};function Rb(n){if(n.classList.contains("task-list-item")){for(const r of n.children)if(r.tagName==="INPUT")return id(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 id(r.children[0])}const e=n.getAttribute("aria-checked"),t=Qt(e==="true"||e!=="false"&&void 0);return tn(t,n),{after:Pg.bind(null,t),node:$t(t,n)}}function id(n){if(n.getAttribute("type")!=="checkbox")return{node:null};const e=Qt(n.hasAttribute("checked"));return{after:Pg.bind(null,e),node:e}}function Pg(n,e){const t=e[0];return e.length===1&&en(t)&&!n.getFormatType()&&t.getFormatType()?(n.setFormat(t.getFormatType()),t.getChildren()):e}function Qt(n){return tt(new zn(void 0,n))}function le(n){return n instanceof zn}let ar=class extends Ee{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{(function(t){const r=t.getNextSibling();V(r)&&t.getListType()===r.getListType()&&cu(t,r)})(e),Rg(e)},extends:Ee,importDOM:{ol:()=>({conversion:ad,priority:0}),ul:()=>({conversion:ad,priority:0})}})}constructor(e="number",t=1,r){super(r);const o=Pb[e]||e;this.__listType=o,this.__tag=o==="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,o=ae().createElement(r);return this.__start!==1&&o.setAttribute("start",String(this.__start)),o.__lexicalListType=this.__listType,sd(o,e.theme,this),o}updateDOM(e,t,r){return e.__tag!==this.__tag||e.__listType!==this.__listType||(sd(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 q(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 o=r;for(let i=0;i<r.length;i++){const s=r[i];le(s)||(o===r&&(o=[...r]),o[i]=this.createListItemNode().append(!C(s)||V(s)||s.isInline()?s:Fe(s.getTextContent())))}return super.splice(e,t,o)}extractWithChild(e){return le(e)}createListItemNode(){return Qt()}};function sd(n,e,t){const r=[],o=[],i=e.list;if(i!==void 0){const s=i[`${t.__tag}Depth`]||[],a=Ja(t)-1,l=a%s.length,u=s[l],c=i[t.__tag];let d;const f=i.nested,h=i.checklist;if(f!==void 0&&f.list&&(d=f.list),c!==void 0&&r.push(c),h!==void 0&&t.__listType==="check"&&r.push(h),u!==void 0){r.push(...fn(u));for(let g=0;g<s.length;g++)g!==l&&o.push(t.__tag+g)}if(d!==void 0){const g=fn(d);a>1?r.push(...g):o.push(...g)}}o.length>0&&Xt(n,...o),r.length>0&&Ae(n,...r)}function ad(n){let e;if((function(t){return q(t)&&t.nodeName.toLowerCase()==="ol"})(n)){const t=n.start;e=Rt("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(q(r)&&r.hasAttribute("aria-checked"))return!0;return!1})(n)?Rt("check"):Rt("bullet");return $t(e,n),{after:t=>(function(r,o){const i=o.createListItemNode.bind(o),s=[];for(let a=0;a<r.length;a++){const l=r[a];if(le(l)){s.push(l);const u=l.getChildren();u.length>1&&u.forEach(c=>{V(c)&&s.push(i().append(c))})}else s.push(i().append(l))}return s})(t,e),node:e}}const Pb={ol:"number",ul:"bullet"};function Rt(n="number",e=1){return tt(new ar(n,e))}function V(n){return n instanceof ar}function Lb(n){const e=[];for(const t of n)if(le(t)){e.push(t);const r=t.getChildren();if(r.length>1)for(const o of r)V(o)&&e.push(Qt().append(o))}else e.push(Qt().append(t));return e}const Ib={$import:(n,e)=>{let t;var r;return Cg(e,"ol")?t=Rt("number",e.start):t=(r=e).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||r.querySelector(":scope > [aria-checked]")!==null?Rt("check"):Rt("bullet"),$t(t,e),[t.splice(0,0,ou(Lb(n.$importChildren(e)),e))]},match:je.tag("ol","ul"),name:"@lexical/list/list"};function Lg(n,e){if(e.length!==1)return e;const t=e[0];return en(t)&&!n.getFormatType()&&t.getFormatType()?(n.setFormat(t.getFormatType()),t.getChildren()):e}function Ig(n){const e=s=>ru(s)&&!V(s);if(!n.some(e))return n;const t=[];let r=[];const o=()=>{r.length>0&&(t.push(r),r=[])};for(const s of n)e(s)?(o(),t.push(C(s)?s.getChildren():[s])):r.push(s);o();const i=[];for(const s of t)i.length>0&&i.push(Gt()),i.push(...s);return i}const Bb={$import:(n,e)=>{const t=e.getAttribute("aria-checked"),r=Qt(t==="true"||t!=="false"&&void 0);return tn(r,e),$t(r,e),[r.splice(0,0,Ig(Lg(r,n.$importChildren(e))))]},match:je.tag("li"),name:"@lexical/list/li"};function ld(n,e,t){const r=Cg(t,"input")?t:t.querySelector('input[type="checkbox"]');if(!r||r.getAttribute("type")!=="checkbox")return[];const o=Qt(r.hasAttribute("checked"));return tn(o,e),$t(o,e),[o.splice(0,0,Ig(Lg(o,n.$importChildren(e))))]}je.tag("li").classAll("task-list-item"),je.tag("li").classAll("joplin-checkbox");const Kb=W("UPDATE_LIST_START_COMMAND"),Wb=W("INSERT_UNORDERED_LIST_COMMAND"),qb=W("INSERT_ORDERED_LIST_COMMAND"),Ub=W("REMOVE_LIST_COMMAND");function ud(n,e){return Qe(n.registerCommand(qb,()=>(nd("number"),!0),mt),n.registerCommand(Kb,t=>{const{listNodeKey:r,newStart:o}=t,i=te(r);return!!V(i)&&(i.getListType()==="number"&&(i.setStart(o),Rg(i)),!0)},mt),n.registerCommand(Wb,()=>(nd("bullet"),!0),mt),n.registerCommand(Ub,()=>(Ob(),!0),mt),n.registerCommand(Hn,()=>jb(!!(e&&e.restoreNumbering)),mt),n.registerCommand(hs,t=>{const r=z();if(!N(r)||!r.isCollapsed())return!1;const{anchor:o}=r;if(o.offset!==0)return!1;let i=o.getNode();for(;!le(i);){if(i.getPreviousSibling()!==null)return!1;const s=i.getParent();if(s===null)return!1;i=s}return!(!le(i)||!i.collapseAtStart(r))&&(t.preventDefault(),!0)},_y),n.registerNodeTransform(zn,t=>{const r=t.getFirstChild();if(r){if(D(r)){const o=r.getStyle(),i=r.getFormat();t.getTextStyle()!==o&&t.setTextStyle(o),t.getTextFormat()!==i&&t.setTextFormat(i)}}else{const o=z();N(o)&&(o.style!==t.getTextStyle()||o.format!==t.getTextFormat())&&o.isCollapsed()&&t.is(o.anchor.getNode())&&t.setTextStyle(o.style).setTextFormat(o.format)}}),n.registerNodeTransform(gn,t=>{const r=t.getParent();if(le(r)&&t.is(r.getFirstChild())){const o=t.getStyle(),i=t.getFormat();o===r.getTextStyle()&&i===r.getTextFormat()||r.setTextStyle(o).setTextFormat(i)}}))}function Hb(n){const e=t=>{const r=t.getParent();if(V(t.getFirstChild())||!V(r))return;const o=U(t,i=>le(i)&&V(i.getParent())&&le(i.getPreviousSibling()));if(o===null&&t.getIndent()>0)t.setIndent(0);else if(le(o)){const i=o.getPreviousSibling();if(le(i)){const s=(function(l){let u=l,c=u.getFirstChild();for(;V(c);){const d=c.getLastChild();if(!le(d))break;u=d,c=u.getFirstChild()}return u})(i),a=s.getParent();if(V(a)){const l=Ja(a);l+1<Ja(r)&&t.setIndent(l)}}}};return n.registerNodeTransform(ar,t=>{const r=[t];for(;r.length>0;){const o=r.shift();if(V(o)){for(const i of o.getChildren())if(le(i)){e(i);const s=i.getFirstChild();V(s)&&r.push(s)}}}})}function Qi(n,e,t=null){const r=Rh(t),o=t?Mh(t):[],i=t!==null&&o.length>0;if(i&&typeof r.caretPositionFromPoint=="function"){const s=r.caretPositionFromPoint(n,e,{shadowRoots:o});if(s!==null&&(function(a,l){for(let u=a;u!==null;){if(u===l)return!0;u=or(u)}return!1})(s.offsetNode,t))return{node:s.offsetNode,offset:s.offset}}if(i){const s=t.getRootNode();if(Zt(s)){const a=s.elementFromPoint(n,e);if(a!==null&&t.contains(a)){const l=(function(u,c,d,f){const h=f.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=f.createTreeWalker(d,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 E=g(v),A=m(v);(E<_||E===_&&A<b)&&(_=E,b=A,y=w)}}if(y===null)return null;let k=0,S=1/0,x=1/0;for(let w=0;w<=y.length;w++){h.setStart(y,w),h.collapse(!0);const v=h.getBoundingClientRect(),E=g(v),A=Math.abs(u-v.left);(E<S||E===S&&A<x)&&(S=E,x=A,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 xr(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 Ya={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Jb(n){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(n):n}const cd=(n,e)=>{if(!N(e))return e.insertRawText(n),!0;const t=r=>{const o=z();N(o)&&r(o)};return dh(n,{linebreak:()=>t(r=>r.insertParagraph()),tab:()=>t(r=>r.insertNodes([Bo()])),text:r=>t(o=>o.insertText(r))}),!0},Xa={"application/x-lexical-editor":[(n,e,t)=>{try{const r=we(),o=JSON.parse(n);if(o&&o.namespace===r._config.namespace&&Array.isArray(o.nodes))return dd(r,tk(o.nodes),e),!0}catch(r){console.error(r)}return t()}],"text/html":[(n,e,t)=>{try{const r=we(),o=new DOMParser().parseFromString(Jb(n),"text/html");return dd(r,Ng(r,o),e),!0}catch(r){return console.error(r),t()}}],"text/plain":[cd],"text/uri-list":[cd]};function Vb(n,e,t,r){if(!n)return!1;const o=i=>!!n[i]&&n[i](e,t,o.bind(null,i-1),r);return o(n.length-1)}function Bg(n,e,t){const r=e.getData("text/plain");for(const o of(function(i){return Object.keys(i.$importMimeType).filter(s=>i.$importMimeType[s]!==void 0).sort((s,a)=>{const l=i.priority[s],u=i.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 i=e.getData(o);if(i&&(o!=="text/html"||i!==r)&&Vb(n.$importMimeType[o],i,t,e))return!0}return!1}const Yb={$importMimeType:Xa,$insertDataTransfer:(n,e)=>Bg({$importMimeType:Xa,priority:Ya},n,e),priority:Ya},Xb={build:(n,e)=>({$importMimeType:e.$importMimeType,$insertDataTransfer:(t,r)=>Bg(e,t,r),priority:e.priority}),config:{$importMimeType:Xa,priority:Ya},mergeConfig(n,e){const t=Xl(n,e);if(e.$importMimeType){const r={...n.$importMimeType};for(const[o,i]of Object.entries(e.$importMimeType))if(i){const s=r[o];r[o]=s?[...s,...i]:i}t.$importMimeType=r}return e.priority&&(t.priority={...n.priority,...e.priority}),t},name:"@lexical/clipboard/Import"};function Kg(n,e=z()){return e==null&&xr(166),N(e)&&e.isCollapsed()||e.getNodes().length===0?"":su(n,e)}function Wg(n,e=z()){return e==null&&xr(166),N(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(ek(n,e))}function Ga(n,e,t){(function(){const r=$_(Xb.name);return r?r.output:Yb})().$insertDataTransfer(n,e)}const qg="application/x-lexical-drag";function Gb(n,e){const t={editorKey:e.getKey()};n.setData(qg,JSON.stringify(t))}function Zb(n,e,t){const r=n.dataTransfer;if(r===null)return!1;const o=(function(u){const c=u.getData(qg);if(!c)return null;let d;try{d=JSON.parse(c)}catch{return null}return(f=d)!==null&&typeof f=="object"&&"editorKey"in f&&typeof f.editorKey=="string"?d:null;var f})(r);if(o===null)return!1;const i=(function(u,c){const d=Qi(u.clientX,u.clientY,c.getRootElement());if(d===null)return null;const f=Ge(d.node);if(f===null)return null;if(D(f))return Nn(f,"next",d.offset);if(C(f))return Ba(f,d.offset,"next");const h=f.getParent();return h===null?null:Ba(h,f.getIndexWithinParent()+1,"next")})(n,e);if(i===null)return!1;const s=Xh(i);if(s===null)return!1;const a=o.editorKey===e.getKey(),l=z();if(a){if(!N(l)||l.isCollapsed())return!1;if((function(u,c){const{anchor:d,focus:f}=Yl(Ia(c),"next");return Fo(d,u)<0&&Fo(u,f)<0})(i,l))return n.preventDefault(),!0;l.removeText()}if(!s.origin.isAttached())return n.preventDefault(),!0;if(t(r,qr(Uo(s)),e),!a){const u=e.getRootElement(),c=u?u.ownerDocument:null,d=c?(function(f,h){for(const g of jh(h)){const m=Yr(g);if(qo(m)&&m.getKey()===f&&q(g))return g}return null})(o.editorKey,c):null;d!==null&&d.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return n.preventDefault(),!0}function Qb(n,e){return Zb(n,e,Ga)}function dd(n,e,t){n.dispatchCommand(Df,{nodes:e,selection:t})||(t.insertNodes(e),(function(r){if(N(r)&&r.isCollapsed()){const o=r.anchor;let i=null;const s=Ze(o,"previous");if(s)if(Nt(s))i=s.origin;else{const a=jt(s,Re(ge(),"next").getFlipped());for(const l of a){if(D(l.origin)){i=l.origin;break}if(C(l.origin)&&!l.origin.isInline())break}}if(i&&D(i)){const a=i.getFormat(),l=i.getStyle();r.format===a&&r.style===l||(r.format=a,r.style=l,r.dirty=!0)}}})(t))}function Za(n,e,t,r=[]){let o=e===null||t.isSelected(e);const i=C(t)&&t.excludeFromCopy("html");let s=t;e!==null&&D(s)&&(s=Qh(e,s,"clone"));const a=C(s)?s.getChildren():[],l=(function(c){const d=c.exportJSON(),f=c.constructor;if(d.type!==f.getType()&&xr(58,f.name),C(c)){const h=d.children;Array.isArray(h)||xr(59,f.name)}return d})(s);D(s)&&s.getTextContentSize()===0&&(o=!1);const u=o&&pe(e)&&C(t)?null:e;for(let c=0;c<a.length;c++){const d=a[c],f=Za(n,u,d,l.children);!o&&C(t)&&f&&t.extractWithChild(d,e,"clone")&&(o=!0)}if(o&&!i){const c=Tt(s);if(c.length>0){const d={};for(const f of c){const h=Xn(s,f);h===null&&xr(366,s.constructor.name,f);const g=[];Za(n,null,h,g),g.length===1&&g[0].type===h.getType()||xr(385,f,s.constructor.name,String(g.length),String(g.length>0?g[0].type:"none")),d[f]=g[0]}l.$slots=d}}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const d=l.children[c];r.push(d)}return o}function ek(n,e){const t=[],r=ge(),o=N(e)?e.anchor.getNode():pe(e)?e.getNodes()[0]??null:null,i=o!==null?Ss(o):null,s=(C(i)?i:r).getChildren();for(let a=0;a<s.length;a++)Za(n,e,s[a],t);return{namespace:n._config.namespace,nodes:t}}function tk(n){const e=[];for(const t of n)e.push(fy(t));return e}let cr=null;async function Qa(n,e,t){if(cr!==null)return!1;if(e!==null)return new Promise((u,c)=>{n.update(()=>{u(fd(n,e,t))})});const r=n.getRootElement(),o=n._window||window,i=o.document,s=Pe(o);if(r===null||s===null)return!1;const a=i.createElement("span");a.style.position="fixed",a.style.top="-1000px",a.append(i.createTextNode("#")),r.append(a);const l=i.createRange();return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((u,c)=>{const d=n.registerCommand(Io,f=>(Jt(f,ClipboardEvent)&&(d(),cr!==null&&(o.clearTimeout(cr),cr=null),u(fd(n,f,t))),!0),xh);cr=o.setTimeout(()=>{d(),cr=null,u(!1)},50),i.execCommand("copy"),a.remove()})}function fd(n,e,t){if(t===void 0){const o=Pe(n._window),i=z();if(!i||i.isCollapsed()||!o)return!1;const s=ft(o,n.getRootElement()),a=s.anchorNode,l=s.focusNode;if(a!==null&&l!==null&&!Wo(n,a,l))return!1;t=du(i)}e.preventDefault();const r=e.clipboardData;return r!==null&&(Ug(r,t),!0)}const nk=[["text/html",Kg],["application/x-lexical-editor",Wg]];function du(n=z()){return(function(e,t){const r={"text/plain":""};for(const[o,i]of Object.entries(e))if(i){const s=ok(i,t);s!==null&&(r[o]=s)}return r})(rk(),n)}function Ug(n,e){for(const[t]of nk)e[t]===void 0&&n.setData(t,"");for(const t in e){const r=e[t];r!==void 0&&n.setData(t,r)}}function rk(n=we()){const e=Gr(n,ik.name);return e?e.output:Hg}const Hg={"application/x-lexical-editor":[(n,e)=>n?Wg(we(),n):e()],"text/html":[(n,e)=>n?Kg(we(),n):e()],"text/plain":[(n,e)=>n?n.getTextContent():e()]};function ok(n,e){const t=r=>n[r]?n[r](e,t.bind(null,r-1)):null;return t(n.length-1)}const ik={build:(n,e,t)=>e.$exportMimeType,config:{$exportMimeType:Hg},mergeConfig(n,e){const t=Xl(n,e);if(e.$exportMimeType){const r={...n.$exportMimeType};for(const[o,i]of Object.entries(e.$exportMimeType))if(i){const s=r[o];r[o]=s?[...s,...i]:i}t.$exportMimeType=r}return t},name:"@lexical/clipboard/GetClipboardData"},sk={bold:"bold",italic:"italic",strikeThrough:"strikethrough",subscript:"subscript",superscript:"superscript",underline:"underline"},es=Symbol.for("@lexical/dragon/WindowState");function ak(n,e,t){const r=(function(o){let i=o[es];return i===void 0&&(i={dispose:()=>{},editors:new Map,installs:new Set},o[es]=i),i})(n);if(r.installs.size===0){const o=ck.bind(n);n.addEventListener("message",o,!0),r.dispose=()=>{n.removeEventListener("message",o,!0)}}if(r.installs.add(e),t){const o=r.editors.get(t)||new Set;o.add(e),r.editors.set(t,o)}return lk.bind(null,n,r,e,t)}function lk(n,e,t,r){if(r){const o=e.editors.get(r);o&&o.delete(t)&&o.size===0&&e.editors.delete(r)}e.installs.delete(t)&&e.installs.size===0&&(e.dispose(),delete n[es])}function hd(n){return n&&n.ownerDocument.defaultView}function uk(n){const e=x_(()=>hd(n.getRootElement()),t=>n.registerRootListener(r=>{t.value=hd(r)}));return Ql(()=>{const t=e.value;if(t)return ak(t,Symbol("@lexical/dragon/editorInstall"),n)})}function ck(n){if(n.origin!==this.location.origin)return;const e=(function(r){const o=r[es];if(o===void 0)return null;const i=Yr(Br(r.document));return qo(i)&&o.editors.has(i)?i: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 o=r.payload;if(o&&o.functionId==="makeChanges"){const i=o.args;if(Array.isArray(i)){const[s,a,l,u,c,d]=i;if(![s,a,u,c].every(Number.isFinite)||typeof l!="string"&&l!==-1)return;e.update(()=>{const f=z();if(N(f)){const h=f.anchor;let g=h.getNode(),m=0,p=0;if(D(g)&&s>=0&&a>=0&&(m=s,p=s+a,f.setTextNodeRange(g,m,g,p)),typeof l!="string"||m===p&&l===""||(f.insertRawText(l),g=h.getNode()),D(g)){const y=g.getTextContentSize();m=Math.min(Math.max(u,0),y),p=u<0||c<0?m:Math.min(u+c,y),f.setTextNodeRange(g,m,g,p)}if(typeof d=="string"&&c>0&&!f.isCollapsed()){const y=sk[d];y!==void 0&&f.formatText(y)}n.stopImmediatePropagation()}})}}}}}const dk={$import:(n,e)=>{const t=Ur(e.nodeName.toLowerCase());return ir(e,t),tn(t,e),$t(t,e),[t.splice(0,0,n.$importChildren(e))]},match:je.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},fk={$import:(n,e)=>{const t=Qr();return tn(t,e),ir(e,t),$t(t,e),[t.splice(0,0,n.$importChildren(e))]},match:je.tag("blockquote"),name:"@lexical/rich-text/blockquote"};je.tag("blockquote");je.tag("p"),je.tag("span");const gd=W("DRAG_DROP_PASTE_FILE"),oa=Po("shadowRoot",{parse:Boolean});class As extends Ee{$config(){return this.config("quote",{extends:Ee,importDOM:{blockquote:()=>({conversion:hk,priority:0})},stateConfigs:[{flat:!0,stateConfig:oa}]})}isShadowRoot(){return Lo(this,oa)}setIsShadowRoot(e){return Cr(this,oa,e)}createDOM(e){const t=ae().createElement("blockquote");return Ae(t,e.theme.quote),t}updateDOM(e,t,r){return!1}exportDOM(e){const{element:t}=super.exportDOM(e);if(q(t)){this.isEmpty()&&t.append(ae().createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const o=this.getDirection();o&&(t.dir=o)}return{element:t}}exportJSON(){return super.exportJSON()}static importJSON(e){return Qr().updateFromJSON(e)}insertNewAfter(e,t){const r=Y(),o=this.getDirection();return r.setDirection(o),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 Qr(n){const e=tt(new As);return n&&n.shadowRoot?e.setIsShadowRoot(!0):e}function ts(n){return n instanceof As}let Fs=class extends Ee{__tag;$config(){return this.config("heading",{extends:Ee,importDOM:{h1:()=>({conversion:dr,priority:0}),h2:()=>({conversion:dr,priority:0}),h3:()=>({conversion:dr,priority:0}),h4:()=>({conversion:dr,priority:0}),h5:()=>({conversion:dr,priority:0}),h6:()=>({conversion:dr,priority:0}),p:e=>{const t=e.firstChild;return t!==null&&pd(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>pd(e)?{conversion:()=>({node:Ur("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=ae().createElement(t),o=e.theme.heading;if(o!==void 0){const i=o[t];Ae(r,i)}return r}updateDOM(e,t,r){return e.__tag!==this.__tag}exportDOM(e){const{element:t}=super.exportDOM(e);if(q(t)){this.isEmpty()&&t.append(ae().createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const o=this.getDirection();o&&(t.dir=o)}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,o=this.getLastDescendant(),i=!o||e&&e.anchor.key===o.getKey()&&r===o.getTextContentSize()||!e?Y():Ur(this.getTag()),s=this.getDirection();if(i.setDirection(s),this.insertAfter(i,t),r===0&&!this.isEmpty()&&e){const a=Y();a.select(),this.replace(a,!0)}return i}collapseAtStart(){if(this.isEmpty()){const e=Y();this.getChildren().forEach(t=>e.append(t)),this.replace(e)}return!0}extractWithChild(){return!0}};function pd(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function dr(n){const e=n.nodeName.toLowerCase();let t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Ur(e),ir(n,t),tn(t,n),$t(t,n)),{node:t}}function hk(n){const e=Qr();return tn(e,n),ir(n,e),$t(e,n),{node:e}}function Ur(n="h1"){return tt(new Fs(n))}function Jg(n){return n instanceof Fs}function md(n){const e=Ge(n);return ne(e)}function fr(n,e,t,r){let o=!1,i=null;if(n.isCollapsed()&&n.anchor.type==="text"){const a=n.anchor.getNode();if(D(a)){i=a;const l=n.anchor.offset,u=l===a.getTextContentSize()&&a.getNextSibling()===null,c=l===0&&a.getPreviousSibling()===null;o=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(!(o&&i&&D(i)&&i.hasFormat(u)))continue;s=!0}n.hasFormat(u)&&n.toggleFormat(u)}s&&n.setStyle("")}const gk={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function ai(n,e){return(function(t,r){if(!t.isCollapsed())return!1;const o=Ze(t.focus,r),i=U(o.origin,_o);if(!i)return!1;const s=t.focus.getNode();if(!i.is(s)&&!Ir(s,i))return!1;const a=jt(o,ue(i,r));if(a.getTextSlices().some(d=>d&&d.getTextContentSize()>0))return!1;const l=jt(a.anchor.getSiblingCaret(),a.focus);let u=l.anchor.origin;for(const d of l){if(!It(d)||!d.origin.is(u.getParent()))return!1;u=d.origin}let c=i;for(const d of Wr(ue(i,r))){if(!d.origin.is(c.getParent())){if(xi(d.origin)){const f=ue(c,r);return qr(jt(f,f)),!0}break}if(!_o(d.origin))break;c=d.origin}return!1})(n,e)||(function(t,r){if(!t.isCollapsed()||t.anchor.type!=="element")return!1;const o=Ze(t.anchor,r).getNodeAtCaret();return!(!_o(o)||o.isInline()||(qr(Uo(Ve(Re(o,r)))),0))})(n,e)}function yd(n){return ne(n)&&!n.isInline()&&!n.isIsolated()&&n.isKeyboardSelectable()}function li(n){const e=Eo();e.add(n),_e(e)}function _d(n,e){if(!n.isCollapsed())return!1;const t=n.focus,r=t.getNode(),o=e?"previous":"next",i=Ze(t,o);if(t.type==="element"&&C(r)&&Se(r)){const y=i.getNodeAtCaret();return!(y===null||!yd(y))&&(li(y.__key),!0)}const s=U(C(r)?r:r.getParentOrThrow(),y=>C(y)&&!y.isInline()&&Se(y.getParent()));if(s===null)return!1;const a=ue(s,o).getNodeAtCaret();if(a===null||!yd(a))return!1;if(s.getTextContentSize()===0)return li(a.__key),!0;const l=we().getRootElement();if(l===null)return!1;const u=Pe(l.ownerDocument.defaultView);if(u===null||u.rangeCount===0)return!1;const c=u.anchorNode,d=u.anchorOffset,f=u.focusNode,h=u.focusOffset;u.modify("move",e?"backward":"forward","line");const g=u.anchorNode,m=u.anchorOffset;if(g===null)return bd(u,c,d,f,h),!1;const p=Ge(g);return bd(u,c,d,f,h),p===null?!1:(g===c&&m===d||!p.is(s)&&!Ir(p,s))&&(li(a.__key),!0)}function bd(n,e,t,r,o){e!==null&&r!==null&&n.setBaseAndExtent(e,t,r,o)}function kd(n,e){if(!n.isCollapsed())return!1;const t=n.focus.getNode(),r=U(C(t)?t:t.getParentOrThrow(),p=>C(p)&&!p.isInline());if(r===null)return!1;const o=we(),i=o.getRootElement();if(i===null)return!1;const s=i.ownerDocument.defaultView;if(s===null)return!1;let a=!1;for(const p of r.getChildren())if(C(p)&&p.isInline()){const y=o.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=ue(r,e?"previous":"next").getNodeAtCaret();if(l===null||!C(l)){if(e){const p=r.getFirstDescendant();D(p)?p.select(0,0):r.select(0,0)}else{const p=r.getLastDescendant();if(D(p)){const y=p.getTextContentSize();p.select(y,y)}else{const y=r.getChildrenSize();r.select(y,y)}}return!0}const u=o.getElementByKey(l.getKey());if(u===null)return!1;const c=Pe(s);if(c===null||c.rangeCount===0)return!1;const d=c.getRangeAt(0).cloneRange();d.collapse(!0);const f=d.getBoundingClientRect(),h=u.getBoundingClientRect(),g=h.top+h.height/2;if(f.height>0){const p=Qi(f.left,g,i);if(p!==null&&u.contains(p.node)){const y=i.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(D(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 ui(n,e){const t=ue(n,e),r=t.getAdjacentCaret();r!==null&&C(r.origin)&&!r.origin.isInline()&&r.origin.isShadowRoot()?qr(Uo(t)):e==="next"?n.selectNext(0,0):n.selectPrevious()}function xd(n,e,t){t.preventDefault(),t.stopPropagation();const r=n.getNodes();if(r.length===0)return!0;const o=r.map(l=>ue(l,"next")).sort(Fo),i=(e?o[0]:o[o.length-1]).origin,s=U(i,l=>l!==i&&C(l)&&!l.isInline())??ge(),a=e?0:s.getChildrenSize();return s.select(a,a),!0}function pk(n,e=Ho(gk)){return Qe(n.registerCommand(us,()=>{const t=z();return pe(t)?(t.clear(),!0):(N(t)&&fr(t,"click","both",e.peek()),!1)},G),n.registerCommand(vn,t=>{const r=z();return N(r)?(r.deleteCharacter(t),!0):!!pe(r)&&(r.deleteNodes(),!0)},G),n.registerCommand(zr,t=>{const r=z();return!!N(r)&&(r.deleteWord(t),!0)},G),n.registerCommand(Or,t=>{const r=z();return!!N(r)&&(r.deleteLine(t),!0)},G),n.registerCommand(Kn,t=>{const r=z();if(typeof t=="string")r!==null&&r.insertText(t);else{if(r===null)return!1;const o=t.dataTransfer;if(o!=null)Ga(o,r);else if(N(r)){const i=t.data;return i&&r.insertText(i),!0}}return!0},G),n.registerCommand(mi,()=>{const t=z();return!!N(t)&&(t.removeText(),!0)},G),n.registerCommand(Ot,t=>{const r=z();return!(!N(r)&&!pe(r))&&(rh(r,t),!0)},G),n.registerCommand(zm,t=>{const r=z();return!(!N(r)&&!pe(r))&&(sy(r,t),!0)},G),n.registerCommand(Pf,t=>{const r=z();if(!N(r)&&!pe(r))return!1;const o=r.getNodes();for(const i of o){const s=U(i,a=>C(a)&&!a.isInline());s!==null&&s.setFormat(t)}return!0},G),n.registerCommand(vr,t=>{const r=z();return!!N(r)&&(r.insertLineBreak(t),!0)},G),n.registerCommand(Hn,()=>{const t=z();return!!N(t)&&(t.insertParagraph(),!0)},G),n.registerCommand(Om,()=>{const t=Bo(),r=z();return N(r)&&(t.setFormat(r.format),t.setStyle(r.style)),ys([t]),!0},G),n.registerCommand(Mm,()=>Rc(t=>{const r=t.getIndent();t.setIndent(r+1)}),G),n.registerCommand(Wu,()=>Rc(t=>{const r=t.getIndent();r>0&&t.setIndent(Math.max(0,r-1))}),G),n.registerCommand(Cl,t=>{const r=z();if(pe(r)){const o=r.getNodes();if(o.length>0)return t.preventDefault(),ui(o[0],"previous"),!0}else if(N(r)&&((function(o){const i=o.focus;return i.key==="root"&&i.offset===0})(r)||!t.shiftKey&&ai(r,"previous")||!t.shiftKey&&_d(r,!0)||!t.shiftKey&&kd(r,!0)))return t.preventDefault(),!0;return!1},G),n.registerCommand(vl,t=>{const r=z();if(pe(r)){const o=r.getNodes();if(o.length>0)return t.preventDefault(),ui(o[0],"next"),!0}else if(N(r)&&((function(o){const i=o.focus;return i.key==="root"&&i.offset===ge().getChildrenSize()})(r)||!t.shiftKey&&ai(r,"next")||!t.shiftKey&&_d(r,!1)||!t.shiftKey&&kd(r,!1)))return t.preventDefault(),!0;return!1},G),n.registerCommand(xl,t=>{const r=z();if(pe(r)){const o=r.getNodes();if(o.length>0)return t.preventDefault(),ui(o[0],ti(o[0])?"next":"previous"),!0}if(!N(r))return!1;if(!t.shiftKey&&ai(r,ti(r.anchor.getNode())?"next":"previous"))return t.preventDefault(),!0;if(t.shiftKey||fr(r,"arrow","start",e.peek()),Mc(r,!0)){const o=t.shiftKey;return t.preventDefault(),jc(r,o,!0),!0}return!1},G),n.registerCommand(kl,t=>{const r=z();if(pe(r)){const o=r.getNodes();if(o.length>0)return t.preventDefault(),ui(o[0],ti(o[0])?"previous":"next"),!0}if(!N(r))return!1;if(!t.shiftKey&&ai(r,ti(r.anchor.getNode())?"previous":"next"))return t.preventDefault(),!0;if(t.shiftKey||fr(r,"arrow","end",e.peek()),Mc(r,!1)){const o=t.shiftKey;return t.preventDefault(),jc(r,o,!1),!0}return!1},G),n.registerCommand(hs,t=>{const r=z();if(!pe(r)&&md(t.target))return!1;if(N(r)){if((function(o){if(!o.isCollapsed())return!1;const{anchor:i}=o;if(i.offset!==0)return!1;const s=i.getNode();if(Oe(s))return!1;const a=h_(s);return a.getIndent()>0&&(a.is(s)||s.is(a.getFirstDescendant()))})(r))return t.preventDefault(),n.dispatchCommand(Wu);if(En&&Fr)return!1}else if(!pe(r))return!1;return t.preventDefault(),n.dispatchCommand(vn,!0)},G),n.registerCommand(wl,t=>{const r=z();return!(!pe(r)&&md(t.target))&&!(!N(r)&&!pe(r))&&(t.preventDefault(),n.dispatchCommand(vn,!1))},G),n.registerCommand($i,t=>{let r=z();if(pe(r)){const o=r.getNodes();o.length===1&&ne(o[0])&&!o[0].isInline()&&(r=o[0].selectNext())}if(!N(r))return!1;if(fr(r,"enter","both",e.peek()),t!==null){if((En||jo||Ro)&&Fr)return!1;if(t.preventDefault(),t.shiftKey)return n.dispatchCommand(vr,!1)}return n.dispatchCommand(Hn)},G),n.registerCommand(Sl,()=>{const t=z();return!!N(t)&&(n.blur(),!0)},G),n.registerCommand(Rf,t=>{const[,r]=ni(t);if(r.length>0){const o=t.clientX,i=t.clientY,s=Qi(o,i,n.getRootElement());if(s!==null){const{offset:a,node:l}=s,u=Ge(l);if(u!==null){const c=Dl();if(D(u))c.anchor.set(u.getKey(),a,"text"),c.focus.set(u.getKey(),a,"text");else{const f=u.getParentOrThrow().getKey(),h=u.getIndexWithinParent()+1;c.anchor.set(f,h,"element"),c.focus.set(f,h,"element")}const d=Kt(c);_e(d)}n.dispatchCommand(gd,r)}return t.preventDefault(),!0}return Qb(t,n)},G),n.registerCommand(Lf,t=>{const[r]=ni(t),o=z();return!(r&&!N(o))&&(N(o)&&!o.isCollapsed()&&t.dataTransfer!==null&&(Ug(t.dataTransfer,du(o)),Gb(t.dataTransfer,n)),!0)},G),n.registerCommand(If,t=>{const[r]=ni(t),o=z();if(r&&!N(o))return!1;const i=t.clientX,s=t.clientY,a=Qi(i,s,n.getRootElement());if(a!==null){const l=Ge(a.node);ne(l)&&t.preventDefault()}return!0},G),n.registerCommand(Tl,()=>{const t=z();return wy(N(t)&&Ss(t.anchor.getNode())!==null?t:null),!0},G),n.registerCommand(Io,t=>(Qa(n,Jt(t,ClipboardEvent)?t:null),!0),G),n.registerCommand(gs,t=>((async function(r,o){await Qa(o,Jt(r,ClipboardEvent)?r:null),o.update(()=>{const i=z();N(i)?i.removeText():pe(i)&&i.getNodes().forEach(s=>s.remove())},{tag:Gf})})(t,n),!0),G),n.registerCommand(Vr,t=>{const[,r,o]=ni(t);return r.length>0&&!o?(n.dispatchCommand(gd,r),!0):Lt(t.target)&&jl(t.target)?!1:z()!==null&&((function(i,s){i.preventDefault(),s.update(()=>{const a=z(),l=Jt(i,InputEvent)||Jt(i,KeyboardEvent)?null:i.clipboardData;l!=null&&a!==null&&Ga(l,a)},{tag:Xf})})(t,n),!0)},G),n.registerCommand(jf,()=>{const t=z();return N(t)&&fr(t,"space","both",e.peek()),!1},G),n.registerCommand(El,()=>{const t=z();return N(t)&&fr(t,"tab","both",e.peek()),!1},G),n.registerCommand(Of,t=>{const r=z();if(pe(r))return xd(r,!1,t);if(!N(r))return!1;const{anchor:o}=r;if(o.type!=="element"||o.offset!==0)return!1;const i=o.getNode();if(!C(i))return!1;const s=i.getFirstChild();if(!ne(s)||!s.isInline())return!1;const a=i.getKey(),l=i.selectEnd();return t.shiftKey&&l.anchor.set(a,0,"element"),t.preventDefault(),t.stopPropagation(),!0},G),n.registerCommand(Mf,t=>{const r=z();if(pe(r))return xd(r,!0,t);if(!N(r))return!1;const{anchor:o,focus:i}=r,s=U(i.getNode(),u=>C(u)&&!u.isInline());if(s===null)return!1;const a=s.getFirstChild();if(!ne(a)||!a.isInline()||U(o.getNode(),u=>C(u)&&!u.isInline())!==s)return!1;const l=s.getKey();return(i.type!=="element"||i.key!==l||i.offset!==0)&&(r.focus.set(l,0,"element"),t.shiftKey||r.anchor.set(l,0,"element"),t.preventDefault(),t.stopPropagation(),!0)},G))}function mk(n,e){const t={};for(const r of n){const o=e(r);o&&(t[o]?t[o].push(r):t[o]=[r])}return t}function Vg(n){const e=mk(n,t=>t.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const Cd=/\s/,el=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,yk=/^\s{0,3}$/;function tl(n){if(!en(n))return!1;const e=n.getFirstChild();return e==null||n.getChildrenSize()===1&&D(e)&&yk.test(e.getTextContent())}function nl(n){return n.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(Number(t)))}const Yg=/^(\s*)(\d{1,})\.\s/,Xg=/^(\s*)[-*+]\s/,_k=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,rl=/^(#{1,6})\s/,Gg=/^>\s/,Zg=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,ol=/^[ \t]*`{3,}$/,bk=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,kk=/^(?:\|)(.+)(?:\|)\s?$/;function Qg(n){if(n[0]!=="|")return!1;const{length:e}=n;let t=1,r=0;for(;t<e;){let o=t;for(n[o]===" "&&o++,n[o]===":"&&o++;n[o]==="-";)o++;if(n[o]===":"&&o++,n[o]===" "&&o++,n[o]!=="|")break;r++,t=o+1}return r>0&&(t===e||t===e-1&&/\s/.test(n[t]))}const vd=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,Sd=/^<\/[a-z_][\w-]*\s*>/i,wd=n=>new RegExp(`(?:${n.source})$`,n.flags),co=Po("mdListMarker",{parse:n=>typeof n=="string"&&/^[-*+]$/.test(n)?n:"-",resetOnCopyNode:!0}),Ed=Po("mdCodeFence",{parse:n=>typeof n=="string"&&/^`{3,}$/.test(n)?n:"```",resetOnCopyNode:!0}),ep=Po("mdHardLineBreak",{parse:n=>typeof n=="string"&&/^(\\| {2,})$/.test(n)?n:"",resetOnCopyNode:!0});function il(n){if(n.endsWith("\\"))return[n.slice(0,-1),"\\"];const e=n.match(/^(.*?\S)( {2,})$/);return e?[e[1],e[2]]:null}function xk(n){const e=n.getChildren(),t=e.length-1,r=e[t];if(!D(r))return null;const o=r.getTextContent(),i=il(o);if(i!==null){const[s,a]=i;return r.setTextContent(s),a}return/^ {2,}$/.test(o)&&(function(s,a){for(let l=a-1;l>=0;l--){if(We(s[l]))return!1;if(/\S/.test(s[l].getTextContent()))return!0}return!1})(e,t)?(r.setTextContent(""),o):null}function tp(n){const e=Gt(),t=xk(n);return t!==null&&Cr(e,ep,t),e}const np=n=>(e,t,r,o)=>{const i=n(r);i.append(...t),e.replace(i),o||i.select(0,0)},rp=n=>(e,t,r,o)=>{if(Jg(e))return!1;const i=e.getPreviousSibling(),s=e.getNextSibling(),a=Qt(n==="check"?r[3]==="x":void 0),l=r[0].trim()[0],u=n!=="bullet"&&n!=="check"||l!==co.parse(l)?void 0:l;if(V(s)&&s.getListType()===n){u&&Cr(s,co,u);const d=s.getFirstChild();d!==null?d.insertBefore(a):s.append(a),n==="number"&&s.setStart(Number(r[2])),e.remove()}else if(V(i)&&i.getListType()===n)u&&Cr(i,co,u),i.append(a),e.remove();else{const d=Rt(n,n==="number"?Number(r[2]):void 0);u&&Cr(d,co,u),d.append(a),e.replace(d)}a.append(...t),o||a.select(0,0);const c=(function(d){const f=d.match(/\t/g),h=d.match(/ /g);let g=0;return f&&(g+=f.length),h&&(g+=Math.floor(h.length/4)),g})(r[1]);c&&a.setIndent(c)},fu=(n,e,t,r)=>{const o=[],i=n.getChildren();let s=0;for(const a of i)if(le(a)){if(a.getChildrenSize()===1){const h=a.getFirstChild();if(V(h)){const g=fu(h,e,t+1,r);g&&o.push(g);continue}}if(r&&!a.getChildren().some(h=>h.isSelected(r)))continue;const l=" ".repeat(4*t),u=n.getListType(),c=Lo(n,co),d=u==="number"?`${n.getStart()+s}. `:u==="check"?`${c} [${a.getChecked()?"x":" "}] `:c+" ";let f=e(a);u!=="number"&&(f=f.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),o.push(l+d+f),s++}return o.join(`
|
|
10
|
+
`?e.linebreak():t===" "?e.tab():t!==""&&e.text(t)}function No(n){const e=[];return dh(n,{linebreak:()=>e.push(Gt()),tab:()=>e.push(Bo()),text:t=>e.push(Fe(t))}),e}function Oa(n){const e=[];for(const t of n)We(t)||(!C(t)&&!ne(t)||t.isInline()?e.push(t):C(t)&&e.push(...Oa(t.getChildren())));return e}function to(n){let e=n;n.isCollapsed()||e.removeText();const t=z();N(t)&&(e=t),N(e)||$(161);const r=e.anchor;let o=r.getNode(),i=r.offset;for(;!Ue(o)&&Je(o)===null;){const s=o;if([o,i]=cy(o,i),s.is(o))break}return i}function cy(n,e){const t=n.getParent();if(!t){const o=Y();return ge().append(o),o.select(),[ge(),0]}if(D(n)){const o=n.splitText(e);if(o.length===0)return[t,n.getIndexWithinParent()];const i=e===0?0:1;return[t,o[0].getIndexWithinParent()+i]}if(!C(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const o=new rr(dt(n.__key,e,"element"),dt(n.__key,e,"element"),0,""),i=n.insertNewAfter(o);i&&i.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}function fc(n){return We(n)||Wl(n)||D(n)||n.isParentRequired()}function Us(n){const e=Y();let t=null;for(let r=0;r<n.length;r++){const o=n[r];if(fc(o)){if(t===null){t=o.createParentElementNode(),e.append(t);const i=n[r+1];if(We(o)&&(i===void 0||!fc(i)))continue}t.append(o)}else e.append(o),t=null}return e}function Pi(n,e,t,r,o="decorators-and-blocks"){if(e==="move"&&r==="character"&&!n.isCollapsed()){const[c,d]=t===n.isBackward()?[n.focus,n.anchor]:[n.anchor,n.focus];return d.set(c.key,c.offset,c.type),!0}const i=Qe(n.focus,t?"previous":"next"),s=r==="lineboundary",a=e==="move";let l=i,u=o==="decorators-and-blocks";if(!Ts(l)){for(const c of l){u=!1;const{origin:d}=c;if(!ne(d)||d.isIsolated()||(l=c,!s||!d.isInline()))break}if(u)for(const c of Wr(i).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(Xe(c))c.origin.isInline()||(l=c);else{if(C(c.origin))continue;ne(c.origin)&&!c.origin.isInline()&&(l=c)}break}}if(l===i)return!1;if(a&&!s&&ne(l.origin)&&l.origin.isKeyboardSelectable()){const c=Eo();return c.add(l.origin.getKey()),_e(c),!0}return l=Ve(l),a&&Mt(n.anchor,l),Mt(n.focus,l),u||!s}let Ke=null,Me=null,ct=!1,Hs=!1,bi=!1;const Js=new Set;let ki=0;const hc={characterData:!0,childList:!0,subtree:!0};function Tn(){return ct||Ke!==null&&Ke._readOnly}function Ie(){ct&&$(13)}function fh(){ki>99&&$(14)}function yn(){return Ke===null&&$(195,gh()),Ke}function dy(n){yn()!==null&&Me===null&&(Me=n),Me!==n&&sf(378)}function he(){return Me===null&&$(337,gh()),Me}function hh(){he()._dirtyType=2}function gh(){let n=0;const e=new Set,t=Rr.version;if(typeof window<"u")for(const o of jh(document)){const i=Yr(o);if(qo(i))n++;else if(i){let s=String(i.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 ph(){return Me}function gc(n,e,t){const r=e.__type,o=vh(n,r);let i=t.get(r);i===void 0&&(i=Array.from(o.transforms),t.set(r,i));const s=i.length;for(let a=0;a<s&&(i[a](e),e.isAttached());a++);}function pc(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function mh(n,e){if(!e)return;const t=n._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const o of r)t.add(o)}function fy(n){return Li(n,he()._nodes)}function Li(n,e){const t=n.type,r=e.get(t);r===void 0&&$(17,t);const o=r.klass;n.type!==o.getType()&&$(18,o.name);const i=o.importJSON(n),s=n.children;if(C(i)&&Array.isArray(s))for(let l=0;l<s.length;l++){const u=Li(s[l],e);i.append(u)}const a=n.$slots;if(a){dn(i)||$(379,o.name);for(const l in a)Hh(i,l,Li(a[l],e))}return i}function mc(n,e,t){const r=Ke,o=ct,i=Me;Ke=e,ct=!0,Me=n;try{return t()}finally{Ke=r,ct=o,Me=i}}function kn(n,e){const t=bi;bi=!0;try{(function(r,o){const i=r._pendingEditorState,s=r._rootElement,a=r._headless||s===null;if(i===null)return void(!r._updating&&r._deferred.length>0&&yc(r,r._deferred));const l=r._editorState,u=l._selection,c=i._selection,d=r._dirtyType!==0,f=Ke,h=ct,g=Me,m=r._updating,p=r._observer;let y=null;if(r._pendingEditorState=null,r._editorState=i,!a&&d&&p!==null){Me=r,Ke=i,ct=!1,r._updating=!0;try{const v=r._dirtyType,E=r._dirtyElements,A=r._dirtyLeaves;p.disconnect(),y=Fm(l,i,r,v,E,A)}catch(v){if(v instanceof Error&&r._onError(v),Hs)throw v;return Ch(r,null,s,i),yf(r),r._dirtyType=2,Hs=!0,kn(r,l),void(Hs=!1)}finally{p.observe(s,hc),r._updating=m,Ke=f,ct=h,Me=g}}i._readOnly||(i._readOnly=!0);const _=r._dirtyLeaves,b=r._dirtyElements,k=r._normalizedNodes,S=r._updateTags;d&&(r._dirtyType=0,r._cloneNotNeeded.clear(),r._dirtyLeaves=new Set,r._dirtyElements=new Map,r._normalizedNodes=new Set),r._updateTags=new Set,(function(v,E){const A=v._decorators;let T=v._pendingDecorators||A;const M=E._nodeMap;let j;for(j in T)M.has(j)||(T===A&&(T=Nh(v)),delete T[j])})(r,i);const x=a?null:Pe(gt(r));if(r._editable&&x!==null&&(d||c===null||c.dirty||!c.is(u))&&s!==null&&!S.has(Gm)){Me=r,Ke=i;try{if(p!==null&&p.disconnect(),d||c===null||c.dirty){const v=r._blockCursorElement;v!==null&&qi(v,r,s),uy(u,c,r,x,S,s)}(function(v,E,A){let T=v._blockCursorElement;if(N(A)&&A.isCollapsed()&&A.anchor.type==="element"&&E.contains($o(E))){const M=A.anchor,j=M.getNode(),R=M.offset;let B=!1,Q=null;if(R===j.getChildrenSize())xi(j.getChildAtIndex(R-1))&&(B=!0);else{const ie=j.getChildAtIndex(R);if(ie!==null&&xi(ie)){const Z=ie.getPreviousSibling();(Z===null||xi(Z))&&(B=!0,Q=v.getElementByKey(ie.__key))}}if(B){const ie=Dt(j,v.getElementByKey(j.__key),v).element;return T===null&&(v._blockCursorElement=T=(function(Z){const L=Z.theme,P=ae().createElement("div");P.contentEditable="false",P.setAttribute("data-lexical-cursor","true");let K=L.blockCursor;if(K!==void 0){if(typeof K=="string"){const se=fn(K);K=L.blockCursor=se}K!==void 0&&P.classList.add(...K)}return P})(v._config)),E.style.caretColor="transparent",void(Q===null?ie.appendChild(T):ie.insertBefore(T,Q))}}T!==null&&qi(T,v,E)})(r,s,c)}finally{p!==null&&p.observe(s,hc),Me=g,Ke=f}}y!==null&&(function(v,E,A,T,M){const j=Array.from(v._listeners.mutation),R=j.length;for(let B=0;B<R;B++){const[Q,ie]=j[B];for(const Z of ie){const L=E.get(Z);L!==void 0&&Q(L,{dirtyLeaves:T,prevEditorState:M,updateTags:A})}}})(r,y,S,_,l),N(c)||c===null||u!==null&&u.is(c)||r.dispatchCommand(qt);const w=r._pendingDecorators;w!==null&&(r._decorators=w,r._pendingDecorators=null,yo("decorator",r,!0,w)),(function(v,E,A){const T=kc(E),M=kc(A);T!==M&&yo("textcontent",v,!0,M)})(r,o||l,i),yo("update",r,!0,{dirtyElements:b,dirtyLeaves:_,editorState:i,mutatedNodes:y,normalizedNodes:k,prevEditorState:o||l,tags:S}),!m&&yc(r,r._deferred),(function(v){const E=v._updates;if(E.length===0)return void(v._cascadeCount=0);if((function(T){Js.has(T)||(Js.add(T),setTimeout(()=>{Js.delete(T),T._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 A=E.shift();if(A){const[T,M]=A;Do(v,T,M)}})(r)})(n,e)}finally{bi=t}}function yo(n,e,t,...r){const o=e._updating;e._updating=t;try{const i=e._listeners[n],s=Array.from(i);for(const[a,l]of s){l&&l();const u=a(...r);i.has(a)?i.set(a,u):u&&u()}}finally{e._updating=o}}function yh(n,e,t,r){const o=Rl(n);let i;if(!bi)for(let s=0;s<o.length;s++)o[s]._updating||(o[s]._cascadeCount=0);for(let s=4;s>=0;s--)for(let a=0;a<o.length;a++){const l=o[a];if(a>0&&l._updating){i=l;break}const u=l._commands.get(e);if(u!==void 0){const c=u[s];if(c.size>0){let d=!1;if(wt(l,()=>{for(const f of c)if(f(t,r))return void(d=!0)}),d)return d}}}return i&&i.update(()=>{yh(i,e,t,r)}),!1}function yc(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 _c(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const o=t.shift();if(o){const[i,s]=o,a=n._pendingEditorState;let l;s!==void 0&&(l=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(a===null&&$(191),a._flushSync=!0),l&&n._deferred.push(l),mh(n,s.tag)),a==null?Do(n,i,s):i()}}return r}function Do(n,e,t){const r=n._updateTags;let o,i=!1,s=!1;t!==void 0&&(o=t.onUpdate,mh(n,t.tag),i=t.skipTransforms||!1,s=t.discrete||!1),o&&n._deferred.push(o);const a=n._editorState;let l=n._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=n._pendingEditorState=_h(l||a),u=!0),l._flushSync=s;const c=Ke,d=ct,f=Me,h=n._updating;Ke=l,ct=!1,n._updating=!0,Me=n;const g=n._headless||n.getRootElement()===null;zl(null);try{u&&(g?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=(function(_,b){const k=_.getEditorState()._selection,S=Pe(gt(_));return N(k)||k==null?To(k,S,_,b):k.clone()})(n,t&&t.event||null));const p=n._compositionKey;e(),i=_c(n,i),(function(_,b){const k=b.getEditorState()._selection,S=_._selection;if(N(S)){const x=S.anchor,w=S.focus;let v;if(x.type==="text"&&(v=x.getNode(),v.selectionTransform(k,S)),w.type==="text"){const E=w.getNode();v!==E&&E.selectionTransform(k,S)}}})(l,n),n._dirtyType!==0&&(i?(function(_,b){const k=b._dirtyLeaves,S=_._nodeMap;for(const x of k){const w=S.get(x);D(w)&&w.isAttached()&&w.isSimpleText()&&!w.isUnmergeable()&&ju(w)}})(l,n):(function(_,b){const k=b._dirtyLeaves,S=b._dirtyElements,x=_._nodeMap,w=Ht(),v=new Map;let E=k,A=E.size,T=S,M=T.size;for(;A>0||M>0;){if(A>0){b._dirtyLeaves=new Set;for(const j of E){const R=x.get(j);D(R)&&R.isAttached()&&R.isSimpleText()&&!R.isUnmergeable()&&ju(R),R!==void 0&&pc(R,w)&&gc(b,R,v),k.add(j)}if(E=b._dirtyLeaves,A=E.size,A>0){ki++;continue}}b._dirtyLeaves=new Set,b._dirtyElements=new Map,T.delete("root")&&T.set("root",!0);for(const j of T){const R=j[0],B=j[1];if(S.set(R,B),!B)continue;const Q=x.get(R);Q!==void 0&&pc(Q,w)&&gc(b,Q,v)}E=b._dirtyLeaves,A=E.size,T=b._dirtyElements,M=T.size,ki++}b._dirtyLeaves=k,b._dirtyElements=S})(l,n),_c(n),(function(_,b,k,S){const x=_._nodeMap,w=b._nodeMap,v=[];for(const[T]of S){const M=w.get(T);M!==void 0&&(M.isAttached()||(C(M)&&Ni(M,T,x,w,v,S),x.has(T)||S.delete(T),v.push(T)))}for(const T of k){const M=w.get(T);M===void 0||M.isAttached()||(dn(M)&&M.__slots!==null&&Ni(M,T,x,w,v,k),x.has(T)||k.delete(T),v.push(T))}for(const T of v)w.delete(T);const E=he(),A=E._compositionKey;A===null||w.has(A)||(E._compositionKey=null)})(a,l,n._dirtyLeaves,n._dirtyElements)),p!==n._compositionKey&&(l._flushSync=!0);const y=l._selection;if(N(y)){n._slotsUsed&&lh(y);const _=l._nodeMap,b=y.anchor.key,k=y.focus.key;_.get(b)!==void 0&&_.get(k)!==void 0||$(19)}else pe(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 kn(n)}finally{Ke=c,ct=d,Me=f,n._updating=h,ki=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,kn(n)):u&&Cy(()=>{kn(n)}):(l._flushSync=!1,u&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function wt(n,e,t){Me===n&&t===void 0?Tn()?Do(n,e,t):e():Do(n,e,t)}function hy(n){if(Se(n)){let e=null;for(const t of n.getChildren())e=t.isInline()?(e||t.replace(t.createParentElementNode())).append(t):null}}class Ee extends lt{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:hy,extends:lt})}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&&$(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 ym[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&&Tt(this).length===0}isDirty(){const e=he()._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 Tt(this)){const o=Xn(this,r);C(o)&&e.push(...o.getAllTextNodes())}let t=this.getFirstChild();for(;t!==null;){if(D(t)&&e.push(t),C(t)){const r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;C(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;C(e);){const t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),r=t.length;if(e>=r){const i=t[r-1];return C(i)&&i.getLastDescendant()||i||null}const o=t[e];return C(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:te(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&$(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:te(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&$(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let r,o;if(e<t/2){for(r=this.getFirstChild(),o=0;r!==null&&o<=e;){if(o===e)return r;r=r.getNextSibling(),o++}return null}for(r=this.getLastChild(),o=t-1;r!==null&&o>=e;){if(o===e)return r;r=r.getPreviousSibling(),o--}return null}getTextContent(){let e=Uh(this);const t=this.getChildren(),r=t.length;for(let o=0;o<r;o++){const i=t[o];e+=i.getTextContent(),C(i)&&o!==r-1&&!i.isInline()&&(e+=In)}return e}getTextContentSize(){let e=(function(o){let i=0;for(const s of Tt(o)){const a=Xn(o,s);a!==null&&(i+=a.getTextContentSize())}return i})(this);const t=this.getChildren(),r=t.length;for(let o=0;o<r;o++){const i=t[o];e+=i.getTextContentSize(),C(i)&&o!==r-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const t=Ti[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){const t=hn[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Jn(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){Ie();const r=z();let o=e,i=t;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const l=this.getFirstChild();if(D(l)||C(l))return l.select(0,0)}else if(!(e!==void 0&&e!==s||t!==void 0&&t!==s)){const l=this.getLastChild();if(D(l)||C(l))return l.select()}}o===void 0&&(o=s),i===void 0&&(i=s);const a=this.__key;return N(r)?(r.anchor.set(a,o,"element"),r.focus.set(a,i,"element"),r.dirty=!0,r):ch(a,o,a,i,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();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!==""&&Ti[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){zi(this)&&$(324,this.__key,this.__type);const o=this.getChildrenSize(),i=this.getWritable();e+t<=o||$(226,String(e),String(t),String(o));for(const h of r);const s=i.__key,a=[],l=[],u=this.getChildAtIndex(e+t);let c=null,d=o-t+r.length;if(e!==0)if(e===o)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&&$(100);const m=h.getNextSibling(),p=h.__key;Ut(h.getWritable()),l.push(p),h=m}}let f=c;for(const h of r){f!==null&&h.is(f)&&(c=f=f.getPreviousSibling());const g=h.getWritable();g.__parent===s&&d--,Ut(g);const m=h.__key;if(f===null)i.__first=m,g.__prev=null;else{const p=f.getWritable();p.__next=m,g.__prev=p.__key}h.__key===s&&$(76),g.__parent=s,a.push(m),f=h}if(e+t===o)f!==null&&(f.getWritable().__next=null,i.__last=f.__key);else if(u!==null){const h=u.getWritable();if(f!==null){const g=f.getWritable();h.__prev=f.__key,g.__next=u.__key}else h.__prev=null}if(i.__size=d,l.length){const h=z();if(N(h)){const g=new Set(l),m=new Set(a),{anchor:p,focus:y}=h;bc(p,g,m)&&ji(p,p.getNode(),this,c,u),bc(y,g,m)&&ji(y,y.getNode(),this,c,u),d!==0||this.canBeEmpty()||Se(this)||this.remove()}}return i}getDOMSlot(e){return new cf(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(q(t)){const r=this.getIndent();r>0&&(t.style.paddingInlineStart=40*r+"px",t.setAttribute("data-lexical-indent",String(r)));const o=this.getDirection();o&&(t.dir=o)}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===""||Se(this)||this.getChildren().some(D)||(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=Dt(this,e,t);let o=r.getFirstChild();for(let i=this.getFirstChild();i;i=i.getNextSibling()){const s=t.getElementByKey(i.getKey());s!==null&&(o==null?(r.insertChild(s),o=s):o!==s&&r.replaceChild(s,o),o=o.nextSibling)}}}function C(n){return n instanceof Ee}function bc(n,e,t){let r=n.getNode();for(;r;){const o=r.__key;if(e.has(o)&&!t.has(o))return!0;r=r.getParent()}return!1}class _s extends lt{__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&&$(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 ne(n){return n instanceof _s}class bs extends Ee{__cachedText;$config(){return this.config("root",{extends:Ee})}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){$(51)}getTextContent(){const e=this.__cachedText;return e===null||!Tn()&&he()._dirtyType!==0?super.getTextContent():e}remove(){$(52)}replace(e){$(53)}insertBefore(e){$(54)}insertAfter(e){$(55)}updateDOM(e,t){return!1}splice(e,t,r){for(const o of r)C(o)||ne(o)||$(282);return super.splice(e,t,r)}static importJSON(e){return ge().updateFromJSON(e)}collapseAtStart(){return!0}}function Oe(n){return n instanceof bs}function _h(n){return new Ko(hf(n._nodeMap),null,n._slotsUsed)}function $l(){return new Ko(new Map([["root",new bs]]),null,!1)}function Ma(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&$(130,t.name),C(n)){const o=e.children;Array.isArray(o)||$(59,t.name);const i=n.getChildren();for(let s=0;s<i.length;s++){const a=Ma(i[s]);o.push(a)}}const r=Tt(n);if(r.length>0){const o={};for(const i of r){const s=Xn(n,i);s===null&&$(366,t.name,i),o[i]=Ma(s)}e.$slots=o}return e}function gy(n){return n instanceof Ko}class Ko{_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 mc(t&&t.editor||null,this,e)}clone(e){const t=new Ko(this._nodeMap,e===void 0?this._selection:e,this._slotsUsed);return t._readOnly=!0,t}toJSON(){return mc(null,this,()=>({root:Ma(ge())}))}}class Al extends Ee{$config(){return this.config("artificial",{extends:Ee})}createDOM(e){return ae().createElement("div")}}class ks extends lt{$config(){return this.config("linebreak",{importDOM:{br:e=>bh(e)||kh(e)?null:{conversion:py,priority:0}}})}getTextContent(){return`
|
|
11
|
+
`}createDOM(){return ae().createElement("br")}updateDOM(){return!1}isInline(){return!0}}function py(n){return{node:Gt()}}function Gt(){return tt(new ks)}function We(n){return n instanceof ks}function bh(n){const e=n.parentElement;if(e!==null&&Kr(e)){const t=e.firstChild;if(t===n||t.nextSibling===n&&Ii(t)){const r=e.lastChild;if(r===n||r.previousSibling===n&&Ii(r))return!0}}return!1}function kh(n){const e=n.parentElement;if(e!==null&&Kr(e)){const t=e.firstChild;if(t===n||t.nextSibling===n&&Ii(t))return!1;const r=e.lastChild;if(r===n||r.previousSibling===n&&Ii(r))return!0}return!1}function Ii(n){return ht(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}class xs extends Ee{$config(){return this.config("paragraph",{extends:Ee,importDOM:{p:()=>({conversion:my,priority:0})}})}createDOM(e){const t=ae().createElement("p"),r=Tr(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(q(t)){this.isEmpty()&&t.append(ae().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(D);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 o=this.getDirection();return r.setDirection(o),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||D(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 my(n){const e=Y();if(tn(e,n),ir(n,e),e.getFormatType()===""){const t=n.getAttribute("align");t&&t&&t in Ti&&e.setFormat(t)}return $t(e,n),{node:e}}function Y(){return tt(new xs)}function en(n){return n instanceof xs}function yy(n){console.warn(n)}const G=0,mt=1,xt=3,xh=4,_y=-8;function Ch(n,e,t,r,o){const i=n._keyToDOMMap;i.clear(),n._editorState=$l(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,o&&o.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="",i.set("root",t),Th(t,n,"root"))}function by(n){const e=new Set,t=new Set;for(const{klass:r,ownNodeConfig:o}of Ul(n)){const i=r.transform;if(!t.has(i)){t.add(i);const s=r.transform();s&&e.add(s)}if(o){const s=o.$transform;s&&e.add(s)}}return e}const Bi={$createDOM:(n,e)=>n.createDOM(e._config,e),$decorateDOM:(n,e,t,r)=>{},$exportDOM:(n,e)=>{const t=Ml(e,n.getType());return t&&t.exportDOM!==void 0?t.exportDOM(e,n):n.exportDOM(e)},$extractWithChild:(n,e,t,r,o)=>C(n)&&n.extractWithChild(e,t,r),$getDOMSlot:(n,e,t)=>n.getDOMSlot(e),$getSlotTargetElement:(n,e,t,r)=>null,$shouldExclude:(n,e,t)=>C(n)&&n.excludeFromCopy("html"),$shouldInclude:(n,e,t)=>!e||n.isSelected(e),$updateDOM:(n,e,t,r)=>n.updateDOM(e,t,r._config)};function Fl(n){const e=n||{},t=ph(),r=e.theme||{},o=n===void 0?t:e.parentEditor||null,i=e.disableEvents||!1,s=$l(),a=e.namespace||(o!==null?o._config.namespace:$h()),l=e.editorState,u=[bs,gn,ks,ps,xs,Al,...e.nodes||[]],{onError:c,onWarn:d,html:f}=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 x=y;y=x.replace,_=x.with,b=x.withKlass||null}if(typeof y!="function"||!y.prototype||!(y===lt||y.prototype instanceof lt)){let x="<unknown>";try{x=JSON.parse(ff)}catch{}$(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(x))}ql(y);const k=y.getType(),S=by(y);g.set(k,{exportDOM:f&&f.export?f.export.get(y):void 0,klass:y,replace:_,replaceWithKlass:b,sharedNodeState:Em(u[p]),transforms:S})}}const m=new Rr(s,o,g,{disableEvents:i,dom:{...Bi,...n&&n.dom},namespace:a,theme:r},c||console.error,d||yy,(function(p,y){const _=new Map,b=new Set,k=S=>{Object.keys(S).forEach(x=>{let w=_.get(x);w===void 0&&(w=[],_.set(x,w)),w.push(S[x])})};return p.forEach(S=>{const x=S.klass.importDOM;if(x==null||b.has(x))return;b.add(x);const w=x.call(S.klass);w!==null&&k(w)}),y&&k(y),_})(g,f?f.import:void 0),h,n);return l!==void 0&&(m._pendingEditorState=l,m._dirtyType=2),(function(p){p.registerCommand($f,Wm,G),p.registerCommand(Af,qm,G),p.registerCommand(Ff,Um,G),p.registerCommand(zf,Hm,G),p.registerCommand(fs,Jm,G)})(m),m}function ky(n,e){const t=n.get(e);n.delete(e),t&&t()}function no(n,e,t){return n.set(e,t),ky.bind(null,n,e)}class Rr{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,o,i,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 ma,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=o,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=$h(),this._onError=i,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 no(this._listeners.update,e)}registerEditableListener(e){return no(this._listeners.editable,e)}registerDecoratorListener(e){return no(this._listeners.decorator,e)}registerTextContentListener(e){return no(this._listeners.textcontent,e)}registerRootListener(e){const t=this._listeners.root;return Ze(no(t,e,e(this._rootElement,null)||void 0),()=>(function(r,o,i){const s=r.get(o);s&&s(),r.set(o,o(...i)||void 0)})(t,e,[null,this._rootElement]))}registerCommand(e,t,r){r===void 0&&$(35);const o=this._commands;o.has(e)||o.set(e,[new eo,new eo,new eo,new eo,new eo]);const i=o.get(e);i===void 0&&$(36,String(e));const s=(function(l){return 7&l})(r),a=i[s];return s!==r?a.addFront(t):a.addBack(t),()=>{a.delete(t),i.every(l=>l.size===0)&&o.delete(e)}}registerMutationListener(e,t,r){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation;let s=i.get(t);s===void 0&&(s=new Set,i.set(t,s)),s.add(o);const a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(t,o),()=>{s.delete(o),s.size===0&&i.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&$(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,o=Ec(r).get(t.getType());if(!o)return;const i=new Map;for(const s of o.keys())i.set(s,"created");i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){const r=this.registerNodeTransformToKlass(e,t),o=[r],i=r.replaceWithKlass;if(i!=null){const s=this.registerNodeTransformToKlass(i,t);o.push(s)}return(function(s,a){const l=Ec(s.getEditorState()),u=[];for(const c of a){const d=l.get(c);d&&u.push(d)}u.length!==0&&s.update(()=>{for(const c of u)for(const d of c.keys()){const f=te(d);f&&f.markDirty()}},s._pendingEditorState===null?{tag:wr}:void 0)})(this,o.map(s=>s.klass.getType())),()=>{o.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 I(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=Tr(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=e,Ch(this,t,e,o,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||Vm(t),r!=null&&t.classList.remove(...r)),e!==null){const i=Kl(e),s=e.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=2,yf(this),this._updateTags.add(wr),kn(this),this._config.disableEvents||(function(a,l){const u=a.ownerDocument;Ta.set(a,u);let c=Ai.get(u);c===void 0&&(c={editors:new Set,hasShadowEditor:void 0},Ai.set(u,c)),c.editors.add(l),c.hasShadowEditor=void 0,a.__lexicalEditor=l;const d=Hf(a);d.push(Km.register(u));for(let f=0;f<Ea.length;f++){const[h,g]=Ea[f],m=typeof g=="function"?p=>{Xu(p)||(Yu(p),(l.isEditable()||h==="click")&&g(p,l))}:p=>{if(Xu(p))return;Yu(p);const y=l.isEditable();switch(h){case"cut":return y&&I(l,gs,p);case"copy":return I(l,Io,p);case"paste":return y&&I(l,Vr,p);case"dragstart":return y&&I(l,Lf,p);case"dragover":return y&&I(l,If,p);case"dragend":return y&&I(l,jm,p);case"focus":return y&&I(l,Bf,p);case"blur":return y&&I(l,Lm,p);case"drop":return y&&I(l,Rf,p)}};d.push(mo(a,h,m))}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(wr),kn(this);yo("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&$(38);let r=e;r._readOnly&&(r=_h(e),r._selection=e._selection?e._selection.clone():null),mf(this);const o=this._pendingEditorState,i=t!==void 0?t.tag:null;o===null||o.isEmpty()||(i!=null&&this._updateTags.add(i),kn(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,wt(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(const[s,a]of r._nodeMap.entries())C(a)?this._dirtyElements.set(s,!0):this._dirtyLeaves.add(s)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return(function(r,o,i){const s=$l(),a=Ke,l=ct,u=Me,c=o._dirtyElements,d=o._dirtyLeaves,f=o._cloneNotNeeded,h=o._dirtyType;o._dirtyElements=new Map,o._dirtyLeaves=new Set,o._cloneNotNeeded=new Set,o._dirtyType=0,Ke=s,ct=!1,Me=o,zl(null);try{const g=o._nodes;Li(r.root,g),i&&i(),s._readOnly=!0,s._parsed=!0}catch(g){g instanceof Error&&o._onError(g)}finally{o._dirtyElements=c,o._dirtyLeaves=d,o._cloneNotNeeded=f,o._dirtyType=h,Ke=a,ct=l,Me=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"&&kn(this),(t==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(r,{editor:this})}update(e,t){(function(r,o,i){r._updating?r._updates.push([o,i]):Do(r,o,i)})(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),wt(this,()=>{const o=z(),i=ge();o!==null?o.dirty||_e(o.clone()):i.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?i.selectStart():i.selectEnd()),Lr("focus"),Ty(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=Pe(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,yo("editable",this,!0,e),this._slotsUsed&&this.update(()=>hh()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Rr.version=ff;let ja=null;function zl(n){ja=n}const Ol=Symbol("INTERNAL_SKIP_AFTER_CLONE_FROM");let xy=1;function vh(n,e){const t=Ml(n,e);return t===void 0&&$(30,e),t}function Ml(n,e){return n._nodes.get(e)}const Cy=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function jl(n,e){const t=e!==void 0?e:(()=>{const i=n.getRootNode();return $n(i)||Qt(i)?Br(i):null})();if(!q(t)||t.hasAttribute("data-lexical-slot"))return!1;const r=Ge(t),o=t.nodeName;return Vf(r)&&(o==="INPUT"||o==="TEXTAREA"||t.contentEditable==="true"&&Yr(t)==null)}function Wo(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 Er(e)===n&&n.read("latest",()=>!jl(e))}function qo(n){return n instanceof Rr}function Er(n){let e=n;for(;e!=null;){const t=Yr(e);if(qo(t))return t;e=or(e)}return null}function Yr(n){return n?n.__lexicalEditor:null}function Ki(n){return Mr(n)||n.isToken()}function Et(n){return Ki(n)||n.isSegmented()}function ht(n){return Lt(n)&&n.nodeType===3}function $n(n){return Lt(n)&&n.nodeType===9}function vy(n){let e=n;for(;e!=null;){if(ht(e))return e;e=e.firstChild}return null}function Jn(n,e,t){const r=hn[e];if(t!==null&&(n&r)===(t&r))return n;let o=n^r;return e==="subscript"?o&=-65:e==="superscript"?o&=-33:e==="lowercase"?(o&=-513,o&=-1025):e==="uppercase"?(o&=-257,o&=-1025):e==="capitalize"&&(o&=-257,o&=-513),o}function Sh(n){return D(n)||We(n)||ne(n)}function wh(n,e){const t=(function(){const s=ja;return ja=null,s})();if((e=e||t&&t.__key)!=null)return void(n.__key=e);Ie(),fh();const r=he(),o=yn(),i=""+xy++;o._nodeMap.set(i,n),C(n)?r._dirtyElements.set(i,!0):r._dirtyLeaves.add(i),r._cloneNotNeeded.add(i),r._dirtyType===0&&(r._dirtyType=1),n.__key=i}function Ut(n){Je(n)!==null&&$(380,n.__key,String(Je(n)));const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),o=n.getPreviousSibling(),i=n.getNextSibling(),s=i!==null?i.__key:null,a=o!==null?o.__key:null,l=o!==null?o.getWritable():null,u=i!==null?i.getWritable():null;o===null&&(r.__first=s),i===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 Wi(n){fh(),zi(n)&&$(323,n.__key,n.__type);const e=n.getLatest(),t=e.__parent!==null?e.__parent:Yn(e)?e.__slotHost:null,r=yn(),o=he(),i=r._nodeMap,s=o._dirtyElements;t!==null&&(function(l,u,c){let d=l;for(;d!==null;){if(c.has(d))return;const f=u.get(d);if(f===void 0)break;c.set(d,!1),d=f.__parent!==null?f.__parent:Yn(f)?f.__slotHost:null}})(t,i,s);const a=e.__key;o._dirtyType===0&&(o._dirtyType=1),C(n)?s.set(a,!0):o._dirtyLeaves.add(a)}function Be(n){Ie();const e=he(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=te(t);r!==null&&r.getWritable()}if(n!==null){const r=te(n);r!==null&&r.getWritable()}}}function Ht(){return Tn()?null:he()._compositionKey}function te(n,e){const t=(e||yn())._nodeMap.get(n);return t===void 0?null:t}function Eh(n,e){const t=Xr(n,he());return t!==void 0?te(t,e):null}function Th(n,e,t){n[`__lexicalKey_${e._key}`]=t}function Xr(n,e){return n[`__lexicalKey_${e._key}`]}function Ge(n,e){let t=n;for(;t!=null;){const r=Eh(t,e);if(r!==null)return r;t=or(t)}return null}function Nh(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function kc(n){return n.read(()=>ge().getTextContent())}function ge(){return yn()._nodeMap.get("root")}function _e(n){Ie();const e=yn();n!==null&&(n.dirty=!0,n.setCachedNodes(null),N(n)&&he()._slotsUsed&&lh(n)),e._selection=n}function xc(){Ie(),mf(he())}function br(n){const e=(function(t,r){let o=t;for(;o!=null;){const i=Xr(o,r);if(i!==void 0)return i;o=or(o)}return null})(n,he());return e===null?null:te(e)}function Dh(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function Rl(n){const e=[];for(let t=n;t!==null;t=t._parentEditor)e.push(t);return e}function $h(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Ah(n){return ht(n)?n.nodeValue:null}function Pl(n,e,t){const r=Pe(gt(e));if(r===null)return;const o=ft(r,e._rootElement),i=o.anchorNode;let{anchorOffset:s,focusOffset:a}=o;if(i!==null){let l=Ah(i);const u=Ge(i);if(l!==null&&D(u)){if((l===ko||l===_l)&&t){const c=t.length;l=t,s=c,a=c}l!==null&&Ll(u,l,s,a,n)}}}function Ll(n,e,t,r,o){let i=n;if(i.isAttached()&&(o||!i.isDirty())){const s=i.isComposing();if(i.isToken()&&s)return;let a=e;if((s||o)&&(e.endsWith(ko)&&(a=e.slice(0,-ko.length)),o)){const u=_l;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=i.getTextContent();if(o||a!==l){const u=z();if(a===""){if(Be(null),jo||En||Ro)i.remove();else{const m=he();Vs(i,"",u),setTimeout(()=>{m.update(()=>{i.isAttached()&&i.getTextContent()===""&&i.remove()})},20)}return}const c=i.getParent(),d=yt(),f=i.getTextContentSize(),h=Ht(),g=i.getKey();if(i.isToken()&&!s||h!==null&&g===h&&!s||N(d)&&(c!==null&&!c.canInsertTextBefore()&&d.anchor.offset===0||d.anchor.key===n.__key&&d.anchor.offset===0&&!i.canInsertTextBefore()&&!s||d.focus.key===n.__key&&d.focus.offset===f&&!i.canInsertTextAfter()&&!s))return void i.markDirty();if(!N(u)||t===null||r===null)return void Vs(i,a,u);if(u.setTextNodeRange(i,t,i,r),i.isSegmented()){const m=Fe(i.getTextContent());i.replace(m),i=m}Vs(i,a,u)}}}function Vs(n,e,t){if(n.setTextContent(e),N(t)){const r=n.getKey();let o=!1;for(const i of["anchor","focus"]){const s=t[i];s.type==="text"&&s.key===r&&(s.offset=Yt(n,s.offset,"clamp"),o=!0)}o&&(t._cachedNodes=null,t._cachedIsBackward=null)}}function Zo(n,e,t){const r=e[t]||!1;return r==="any"||r===n[t]}function Sy(n,e){return Zo(n,e,"altKey")&&Zo(n,e,"ctrlKey")&&Zo(n,e,"shiftKey")&&Zo(n,e,"metaKey")}function be(n,e,t){if(!Sy(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 sn={ctrlKey:!Ft,metaKey:Ft},Cc={altKey:Ft,ctrlKey:!Ft};function vc(n){return n.key==="Backspace"}function wy(n){const e=ge();if(N(n)){const t=n.anchor,r=n.focus,o=t.getNode();if(Oe(o))return t.set(o.getKey(),0,"element"),r.set(o.getKey(),o.getChildrenSize(),"element"),Kt(n),n;const i=o.getTopLevelElementOrThrow(),s=i.getParent();if(s===null)return C(i)&&(t.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Kt(n)),n;const a=s;return t.set(a.getKey(),0,"element"),r.set(a.getKey(),a.getChildrenSize(),"element"),Kt(n),n}{const t=e.select(0,e.getChildrenSize());return _e(Kt(t)),t}}function Tr(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const o=n[e];if(typeof o=="string"){const i=fn(o);return t[e]=i,i}return o}function Il(n,e,t,r,o){if(t.size===0)return;const i=r.__type,s=r.__key,a=e.get(i);a===void 0&&$(33,i);const l=a.klass;let u=n.get(l);u===void 0&&(u=new Map,n.set(l,u));const c=u.get(s),d=c==="destroyed"&&o==="created";(c===void 0||d)&&u.set(s,d?"updated":o)}function Sc(n,e,t){const r=n.getParent();let o=t,i=n;return r!==null&&(t===0&&(o=i.getIndexWithinParent(),i=r)),i.getChildAtIndex(o-1)}function Ey(n,e){const t=n.offset;if(n.type==="element")return Sc(n.getNode(),e,t);{const r=n.getNode();if(t===0||!e){const o=r.getPreviousSibling();return o===null?Sc(r.getParentOrThrow(),e,r.getIndexWithinParent()+0):o}}return null}function Fh(n){const e=gt(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function I(n,e,...t){return yh(n,e,t[0],n)}function Pr(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&$(75,e),t}function or(n){const e=n.assignedSlot||n.parentElement;if(e!==null)return e;const t=n.parentNode;return Qt(t)?t.host:null}function Bl(n){return $n(n)?n:q(n)?n.ownerDocument:null}function Lr(n){Ie(),he()._updateTags.add(n)}function Ty(n){Ie(),he()._deferred.push(n)}function Ir(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function Kl(n){const e=Bl(n);return e?e.defaultView:null}function gt(n){const e=n._window;return e===null&&$(78),e}function Wl(n){return C(n)&&n.isInline()||ne(n)&&n.isInline()}function zh(n){let e=n.getLatest();for(;e!==null;){if(Je(e)!==null&&C(e))return e;const t=e.getParentOrThrow();if(Se(t))return t;e=t}return e}function _o(n){return C(n)&&n.isShadowRoot()}function Se(n){return Oe(n)||_o(n)}function He(n,e=!1){const t=n.constructor.clone(n,Ol);return wh(t,null),t.afterCloneFrom(n),e||t.resetOnCopyNodeFrom(n),t}function tt(n){const e=he(),t=n.getType(),r=Ml(e,t);r===void 0&&$(200,n.constructor.name,t);const{replace:o,replaceWithKlass:i}=r;if(o!==null){const s=o(n),a=s.constructor;return i!==null?s instanceof i||$(201,i.name,i.getType(),a.name,a.getType(),n.constructor.name,t):s instanceof n.constructor&&a!==n.constructor||$(202,a.name,a.getType(),n.constructor.name,t),s.__key===n.__key&&$(203,n.constructor.name,t,a.name,a.getType()),s}return n}function Ys(n,e){!Oe(n.getParent())||C(e)||ne(e)||$(99)}function Oh(n){const e=te(n);return e===null&&$(63,n),e}function xi(n){if(!n||n.isInline())return!1;if(ne(n))return!0;if(C(n)){if(n.isShadowRoot()){const e=n.getParent();return!(C(e)&&e.isShadowRoot())}return!n.canBeEmpty()}return!1}function qi(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function Pe(n){return et?(n||window).getSelection():null}function Ny(n){const e=Kl(n);return e?e.getSelection():null}function Qt(n){return Ra(n)&&"host"in n}const Dy=[];function Mh(n){const e=n.getRootNode();if(e===n||!Qt(e))return Dy;const t=[e];let r=e.host;for(;;){const o=r.getRootNode();if(o===r||!Qt(o))break;t.push(o),r=o.host}return t}function*jh(n){const e=[n];let t;for(;t=e.pop();){yield*t.querySelectorAll('[data-lexical-editor="true"]');const r=($n(t)?t:t.ownerDocument).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);let o;for(;o=r.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function Rh(n){return n!==null?n.ownerDocument:document}function ae(){const n=ph();return Rh(n!==null?n._rootElement:null)}function Cs(n,e){if(e===null||typeof n.getComposedRanges!="function")return null;const t=Mh(e);if(t.length===0)return null;const r=n.getComposedRanges;try{const o=r.call(n,{shadowRoots:t})[0];if(o!==void 0)return o}catch{}try{const o=r.apply(n,t)[0];if(o!==void 0)return o}catch{}return null}function Ph(n,e){const t=Cs(n,e);if(t!==null){const r=$y(t);if(r!==null)return r}return n.rangeCount>0?n.getRangeAt(0):null}function ft(n,e){const t=Cs(n,e);return t===null?n:Ay(t,Fy(n))}function $y(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 Ay(n,e){const{startContainer:t,startOffset:r,endContainer:o,endOffset:i}=n;return e==="backward"?{anchorNode:o,anchorOffset:i,direction:e,focusNode:t,focusOffset:r}:{anchorNode:t,anchorOffset:r,direction:e,focusNode:o,focusOffset:i}}function Fy(n){return n.direction}function $o(n){const e=n.getRootNode();return $n(e)||Qt(e)?e.activeElement:null}function Br(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 Vn(n){const e=n.target;if(e!==null&&q(e)&&e.shadowRoot!==null&&typeof n.composedPath=="function"){const t=n.composedPath();if(t.length>0)return t[0]}return e}function Lh(n){return q(n)&&n.tagName==="A"}function zy(n){return q(n)&&n.tagName==="TR"}function q(n){return Lt(n)&&n.nodeType===1}function Lt(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function Ra(n){return Lt(n)&&n.nodeType===11}const Oy=/^(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 Ui(n){return!(!q(n)||!n.style.display.startsWith("inline"))||Oy.test(n.nodeName)}const My=/^(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 Kr(n){return(!q(n)||!n.style.display.startsWith("inline"))&&My.test(n.nodeName)}function Ue(n){if(ne(n)&&!n.isInline())return!0;if(!C(n)||Se(n))return!1;const e=n.getFirstChild(),t=e===null||We(e)||D(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function we(){return he()}function vs(n=we()){return n._config.dom||Bi}function Dt(n,e,t=we()){const r=vs(t).$getDOMSlot(n,e,t);return C(n)&&(jy(r)||$(344,n.getKey(),n.getType())),r}function jy(n){return n instanceof cf}function wn(n,e,t=we()){return vy(Dt(n,e,t).element)}const wc=new WeakMap,Ry=new Map;function Ec(n){if(!n._readOnly&&n.isEmpty())return Ry;n._readOnly||$(192);let e=wc.get(n);return e||(e=(function(t){const r=new Map;for(const[o,i]of t._nodeMap){const s=i.__type;let a=r.get(s);a||(a=new Map,r.set(s,a)),a.set(o,i)}return r})(n),wc.set(n,e)),e}function Ih(n){const e=n.constructor.clone(n,Ol);return e.afterCloneFrom(n),e}function Py(n){return(e=Ih(n))[Jf]=!0,e;var e}function ir(n,e){const t=n.getAttribute("data-lexical-indent");if(t!==null){const i=parseInt(t,10);if(Number.isFinite(i)&&i>=0)return void e.setIndent(i)}const r=parseInt(n.style.paddingInlineStart,10)||0,o=Math.round(r/40);e.setIndent(o)}function $t(n,e){const t=e.getAttribute("dir");return t==="ltr"||t==="rtl"?n.setDirection(t):n}function tn(n,e){const t=e.style.textAlign;return t&&t in Ti?n.setFormat(t):n}function Hi(n,e){n.__lexicalUnmanaged=!0,e&&e.captureSelection!==void 0&&(n.__lexicalCapturedSelection=e.captureSelection)}function Bh(n){return n.__lexicalUnmanaged===!0}function Ly(n,e=we()){const t=e.isEditable();n.contentEditable=t?"true":"false",t?n.__lexicalEditor=e:delete n.__lexicalEditor}function Ji(n,e){let t=n;for(;t!=null;){if(t.__lexicalCapturedSelection===!0)return!0;if(q(t)&&t.hasAttribute("data-lexical-slot")||Xr(t,e)!==void 0)return!1;t=or(t)}return!1}function ro(n,e){return(function(t,r){return Object.prototype.hasOwnProperty.call(t,r)})(n,e)&&n[e]!==lt[e]}const Tc=new WeakMap,Nc=Symbol("lexical.synthesizedGetType");function ql(n){const e=Tc.get(n);if(e)return e;const t=n.prototype!=null&&Su in n.prototype?n.prototype[Su]():void 0,r=(function(u){if(!(u===lt||u.prototype instanceof lt)){let c="<unknown>",d="<unknown>";try{c=u.getType()}catch{}try{Rr.version&&(d=JSON.parse(Rr.version))}catch{}$(290,u.name,c,d)}return u===_s||u===Ee||u===lt})(n),o=!r&&ro(n,"getType")?n.getType:void 0,i=o&&!(Nc in o)?o.call(n):void 0;let s,a=i;if(t)if(i)s=t[i];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(!ro(n,"getType")){const u=n,c=function(){return this!==u?lt.getType.call(this):a};c[Nc]=!0,n.getType=c}if(ro(n,"clone")||(n.clone=(u,c)=>{zl(u);const d=new n;return c!==Ol&&d.afterCloneFrom(u),d}),ro(n,"importJSON")||(n.importJSON=s&&s.$importJSON||(u=>new n().updateFromJSON(u))),!ro(n,"importDOM")&&s){const{importDOM:u}=s;u&&(n.importDOM=()=>u)}}const l={klass:n,ownNodeConfig:s,ownNodeType:a};return Tc.set(n,l),l}function*Ul(n){for(let e=n;e&&(e===lt||Vf(e.prototype));){const t=ql(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Wh(e)}}function Kh(n){const e=we();return Ie(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(n))).klass}const U=(n,e)=>{let t=n;for(;t!=null&&!Oe(t);){if(e(t))return t;t=t.getParent()}return null};function Vi(n,e){const t=[];let r=n.__first;for(;r!==null;){const o=e===null?te(r):e.get(r);o==null&&$(174),t.push(r),r=o.__next}return t}function Wh(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 qh=new Map;function dn(n){return C(n)||ne(n)}function Yn(n){return C(n)||ne(n)}function Je(n){const e=n.getLatest();return Yn(e)?e.__slotHost:null}function St(n){const e=Je(n);if(e===null)return null;const t=te(e);return C(t)||ne(t)||$(370),t}function Iy(n){const e=St(n);if(e===null)return null;const t=n.getLatest().__key;for(const[r,o]of ws(e))if(o===t)return r;return null}function Ss(n){let e=n.getLatest();for(;e!==null;){if(Je(e)!==null)return e;e=e.getParent()}return null}function ws(n){const e=n.getLatest();return dn(e)&&e.__slots!==null?e.__slots:qh}function Tt(n){return Array.from(ws(n).keys())}function Xn(n,e){const t=ws(n).get(e);return t===void 0?null:te(t)}const By=["__proto__","constructor","prototype"],Dc=Symbol("slotMapOwner");function Pa(n){let e=n.__slots;return e!==null&&e[Dc]===n||(e=new Map(e),e[Dc]=n,n.__slots=e),e}const $c=new WeakMap,Ky=[];function Wy(n){for(const{ownNodeConfig:e}of Ul(n)){const t=e&&e.slots;if(t)return t}return Ky}function Uh(n){let e="";for(const t of Tt(n)){const r=Xn(n,t);r!==null&&(e+=r.getTextContent())}return e}function Ac(n,e,t){const r=t.get(n),o=t.get(e);return r!==void 0?o!==void 0?r-o:-1:o!==void 0?1:n<e?-1:n>e?1:0}function qy(n){const e=n.__slots;if(e===null||e.size<2)return;const t=(function(s){let a=$c.get(s);if(a===void 0){const l=Wy(s),u=new Map;for(const c of l)By.includes(c)&&$(371,s.name,c),u.has(c)&&$(372,s.name,c),u.set(c,u.size);a=u,$c.set(s,a)}return a})(n.constructor);let r=null,o=!0;for(const s of e.keys()){if(r!==null&&Ac(r,s,t)>0){o=!1;break}r=s}if(o)return;const i=Array.from(e).sort(([s],[a])=>Ac(s,a,t));e.clear();for(const[s,a]of i)e.set(s,a)}function Hh(n,e,t){e!=="__proto__"&&e!=="constructor"&&e!=="prototype"||$(373,e);const r=n.getLatest();if(r.__slots!==null&&r.__slots.get(e)===t.getLatest().__key)return r;(!C(t)&&!ne(t)||t.isInline())&&$(374,t.__key);const o=n.getWritable(),i=Pa(o),s=i.get(e);s!==void 0&&Jh(s);const a=t.getWritable(),l=St(a);if(l!==null){const u=Iy(a);u!==null&&Pa(l.getWritable()).delete(u),a.__slotHost=null}return Ut(a),a.__slotHost=o.__key,i.set(e,a.__key),qy(o),(function(){const u=we();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),o}function Uy(n,e){const t=n.getWritable();if(t.__slots===null)return t;const r=t.__slots.get(e);return r!==void 0&&(Jh(r),Pa(t).delete(e)),t}function Jh(n){const e=te(n);if(e===null)return;const t=e.getWritable();Yn(t)||$(377,n),t.__slotHost=null,t.remove()}const Hy={next:"previous",previous:"next"};class Hl{origin;constructor(e){this.origin=e}[Symbol.iterator](){return Es({hasNext:It,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return ue(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return ue(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 o=r===this.direction?t:Array.from(t).reverse();let i=this;const s=this.getParentAtCaret(),a=new Map;for(let l=i.getAdjacentCaret();l!==null&&a.size<e;l=l.getAdjacentCaret()){const u=l.origin.getWritable();a.set(u.getKey(),u)}for(const l of o){if(a.size>0){const u=i.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(l.getKey()),!(u.is(l)||i.origin.is(l))){const c=l.getParent();c&&c.is(s)&&l.remove(),u.replace(l)}}else u===null&&$(263,Array.from(a).join(" "))}else i.insert(l);i=ue(l,this.direction)}for(const l of a.values())l.remove();return this}}class Ao extends Hl{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Re(e,this.direction)}getParentCaret(e="root"){return ue(Jl(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=An(this.direction);return ue(this.getNodeAtCaret(),e)||Re(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof Ao&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const Jy={root:Oe,shadowRoot:Se};function An(n){return Hy[n]}function Jl(n,e="root"){return n===null||Jy[e](n)?null:Je(n)===null?n:null}class Gn extends Hl{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ue(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return C(this.origin)?Re(this.origin,this.direction):null}getParentCaret(e="root"){return ue(Jl(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=An(this.direction);return ue(this.getNodeAtCaret(),e)||Re(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Gn&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Gn||e instanceof Qn)&&this.direction===e.direction&&this.origin.is(e.origin)}}class Qn extends Hl{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Nn(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return ue(Jl(this.getParentAtCaret(),e),this.direction)}getFlipped(){return Nn(this.origin,An(this.direction),this.offset)}isSamePointCaret(e){return e instanceof Qn&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Gn||e instanceof Qn)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return ue(this.origin,this.direction)}}function Nt(n){return n instanceof Qn}function It(n){return n instanceof Gn}function Xe(n){return n instanceof Ao}const Vy={next:class extends Qn{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Qn{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},Yy={next:class extends Gn{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Gn{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},Xy={next:class extends Ao{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(n){return this.origin.splice(0,0,[n]),this}},previous:class extends Ao{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(n){return this.origin.splice(this.origin.getChildrenSize(),0,[n]),this}}};function ue(n,e){return n?new Yy[e](n):null}function Nn(n,e,t){return n?new Vy[e](n,Yt(n,t)):null}function Yt(n,e,t="error"){const r=n.getTextContentSize();let o=e==="next"?r:e==="previous"?0:e;return(o<0||o>r)&&(t!=="clamp"&&sf(284,String(e),String(r),n.getKey()),o=o<0?0:r),o}function Fc(n,e){return new Qy(n,e)}function Re(n,e){return C(n)?new Xy[e](n):null}function Gy(n){return n&&n.getChildCaret()||n}function Zn(n){return n&&Gy(n.getAdjacentCaret())}class Vl{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 Vl(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=o=>{const i=this[o].getLatest();return Nt(i)?(function(s,a){const{direction:l,origin:u}=s,c=Yt(u,a==="focus"?An(l):l);return Fc(s,c-s.offset)})(i,o):null},t=e("anchor"),r=e("focus");if(t&&r){const{caret:o}=t,{caret:i}=r;if(o.isSameNodeCaret(i))return[Fc(o,i.offset-o.offset),null]}return[t,r]}iterNodeCarets(e="root"){const t=Nt(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),o=Nt(r),i=s=>s.isSameNodeCaret(r)?null:Zn(s)||s.getParentCaret(e);return Es({hasNext:s=>s!==null&&!(o&&r.isSameNodeCaret(s)),initial:t.isSameNodeCaret(r)?null:i(t),map:s=>s,step:i})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Qy{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,o]=this.getSliceIndices(),i=e.getTextContent();return Nn(e.setTextContent(i.slice(0,r)+i.slice(o)),t,r)}}function Wr(n){return jt(n,ue(ge(),n.direction))}function Uo(n){return jt(n,n)}function jt(n,e){return n.direction!==e.direction&&$(265),new Vl(n,e,n.direction)}function Es(n){const{initial:e,hasNext:t,step:r,map:o}=n;let i=e;return{[Symbol.iterator](){return this},next(){if(!t(i))return{done:!0,value:void 0};const s={done:!1,value:o(i)};return i=r(i),s}}}function Fo(n,e){const t=La(n.origin,e.origin);switch(t===null&&$(275,n.origin.getKey(),e.origin.getKey()),t.type){case"same":{const r=n.type==="text",o=e.type==="text";return r&&o?(function(i,s){return Math.sign(i-s)})(n.offset,e.offset):n.type===e.type?0:r?-1:o?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 Vh(t)}}function Vh(n){const{a:e,b:t}=n,r=e.__key,o=t.__key;let i=e,s=t;for(;i&&s;i=i.getNextSibling(),s=s.getNextSibling()){if(i.__key===o)return-1;if(s.__key===r)return 1}return i===null?1:-1}function ei(n,e){return e.is(n)}function zc(n){return C(n)?[n.getLatest(),null]:[n.getParent(),n.getLatest()]}function La(n,e){if(n.is(e))return{commonAncestor:n,type:"same"};const t=new Map;for(let[r,o]=zc(n);r;o=r,r=r.getParent())t.set(r,o);for(let[r,o]=zc(e);r;o=r,r=r.getParent()){const i=t.get(r);if(i!==void 0)return i===null?(ei(n,r)||$(276),{commonAncestor:r,type:"ancestor"}):o===null?(ei(e,r)||$(277),{commonAncestor:r,type:"descendant"}):((C(i)||ei(n,i))&&(C(o)||ei(e,o))&&r.is(i.getParent())&&r.is(o.getParent())||$(278),{a:i,b:o,commonAncestor:r,type:"branch"})}return null}function Qe(n,e){const{type:t,key:r,offset:o}=n,i=Oh(n.key);return t==="text"?(D(i)||$(266,i.getType(),r),Nn(i,e,o)):(C(i)||$(267,i.getType(),r),Ba(i,n.offset,e))}function Mt(n,e){const{origin:t,direction:r}=e,o=r==="next";Nt(e)?n.set(t.getKey(),e.offset,"text"):It(e)?D(t)?n.set(t.getKey(),Yt(t,r),"text"):n.set(t.getParentOrThrow().getKey(),t.getIndexWithinParent()+(o?1:0),"element"):(Xe(e)&&C(t)||$(268),n.set(t.getKey(),o?0:t.getChildrenSize(),"element"))}function qr(n){const e=z(),t=N(e)?e:Dl();return Ci(t,n),_e(t),t}function Ci(n,e){Mt(n.anchor,e.anchor),Mt(n.focus,e.focus)}function Ia(n){const{anchor:e,focus:t}=n,r=Qe(e,"next"),o=Qe(t,"next"),i=Fo(r,o)<=0?"next":"previous";return jt(pn(r,i),pn(o,i))}function Fn(n){const{direction:e,origin:t}=n,r=ue(t,An(e)).getNodeAtCaret();return r?ue(r,e):Re(t.getParentOrThrow(),e)}function Oc(n,e="root"){const t=[n];for(let r=Xe(n)?n.getParentCaret(e):n.getSiblingCaret();r!==null;r=r.getParentCaret(e))t.push(Fn(r));return t}function Xs(n){return!!n&&n.origin.isAttached()}function Zy(n,e="removeEmptySlices"){if(n.isCollapsed())return n;const t="root",r="next";let o=e;const i=Yl(n,r),s=Oc(i.anchor,t),a=Oc(i.focus.getFlipped(),t),l=new Set,u=[];for(const m of i.iterNodeCarets(t))if(Xe(m))l.add(m.origin.getKey());else if(It(m)){const{origin:p}=m;C(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),Ut(m)}for(const m of c)!m.canBeEmpty()&&!Se(m)&&m.isEmpty()&&m.isAttached()&&m.remove();for(const m of i.getTextSlices()){if(!m)continue;const{origin:p}=m.caret,y=p.getTextContentSize(),_=Fn(ue(p,r)),b=p.getMode();if(Math.abs(m.distance)===y&&o==="removeEmptySlices"||b==="token"&&m.distance!==0)_.remove();else if(m.distance!==0){o="removeEmptySlices";let k=m.removeTextSlice();const S=m.caret.origin;if(b==="segmented"){const x=k.origin,w=Fe(x.getTextContent()).setStyle(x.getStyle()).setFormat(x.getFormat());_.replaceOrInsert(w),k=Nn(w,r,k.offset)}S.is(s[0].origin)&&(s[0]=k),S.is(a[0].origin)&&(a[0]=k.getFlipped())}}let d,f;for(const m of s)if(Xs(m)){d=Ve(m);break}for(const m of a)if(Xs(m)){f=Ve(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 x=Math.min(k.length,S.length);let w;for(w=0;w<x&&k[w]===S[w];w++);const v=(T,M)=>{let j;for(let R=w;R<T.length;R++){const B=T[R];if(Se(B))return;!j&&M(B)&&(j=B)}return j},E=v(k,Ue),A=E&&v(S,T=>y.has(T.getKey())&&Ue(T));return A&&Tt(A).length>0?null:E&&A?[E,A]:null})(d,f,l);if(h){const[m,p]=h;Re(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(f){const m=(function(_){if(Xe(_)){const b=_.origin;if(Ue(b))return b}else{const b=_.getParentAtCaret();if(b&&Ue(b))return b}return null})(f),p=m&&m.getParent(),y=m&&m.getParents().findLast(_o);if(m&&p&&!Oe(p)&&m.isEmpty()&&l.has(m.getKey())&&Tt(m).length===0&&(!y||l.has(y.getKey()))){m.remove(!0);let _=p;for(;_&&!Oe(_)&&_.isEmpty();){const b=_.getParent();if(b&&Oe(b)&&b.getChildrenSize()<=1)break;const k=_;_=b,k.remove(!0)}}}const g=[d,f,...s,...a].find(Xs);if(g)return Uo(pn(Ve(g),n.direction));$(269,JSON.stringify(s.map(m=>m.origin.__key)))}function Ve(n){const e=(function(o){let i=o;for(;Xe(i);){const s=Zn(i);if(!Xe(s))break;i=s}return i})(n.getLatest()),{direction:t}=e;if(D(e.origin))return Nt(e)?e:Nn(e.origin,t,t);const r=e.getAdjacentCaret();return It(r)&&D(r.origin)?Nn(r.origin,t,An(t)):e}function Ts(n){return Nt(n)&&n.offset!==Yt(n.origin,n.direction)}function pn(n,e){return n.direction===e?n:n.getFlipped()}function Yl(n,e){return n.direction===e?n:jt(pn(n.focus,e),pn(n.anchor,e))}function Ba(n,e,t){let r=Re(n,"next");for(let o=0;o<e;o++){const i=r.getAdjacentCaret();if(i===null)break;r=i}return pn(r,t)}function Yh(n,e="root"){let t=0,r=n,o=Zn(r);for(;o===null;){if(t--,o=r.getParentCaret(e),!o)return null;r=o,o=Zn(r)}return o&&[o,t]}function e_(n){const{origin:e,offset:t,direction:r}=n;if(t===Yt(e,r))return n.getSiblingCaret();if(t===Yt(e,An(r)))return Fn(n.getSiblingCaret());const[o]=e.splitText(t);return D(o)||$(281),pn(ue(o,"next"),r)}function t_(n,e){return!0}function Xh(n,{$copyElementNode:e=He,$splitTextPointCaretNext:t=e_,rootMode:r="shadowRoot",$shouldSplit:o=t_,removeEmptyDestination:i=!1}={}){if(Nt(n))return t(n);const s=n.getParentCaret(r);if(s){const{origin:a}=s;if(Xe(n)){const u=Fn(s);if(i&&a.isEmpty())return a.remove(),u;if(!a.canBeEmpty()||!o(a,"first"))return u}const l=(function(u){const c=[];for(let d=u.getAdjacentCaret();d;d=d.getAdjacentCaret())c.push(d.origin);return c})(n);(l.length>0||!i&&a.canBeEmpty()&&o(a,"last"))&&s.insert(e(a).splice(0,0,l))}return s}function Ns(n,e,t){let r=pn(e,"next");Nt(r)&&(r.offset===0?r=ue(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=ue(r.origin,"next"))),r.origin.is(n)&&(It(r)||$(342,n.getKey(),n.getType()),r=Fn(r)),(n.is(r.getNodeAtCaret())||n.is(r.getFlipped().getNodeAtCaret()))&&n.remove(!0);for(let o=r;o;o=Xh(o,t))r=o;return Nt(r)&&$(283),r.insert(n.isInline()?Y().append(n):n),pn(ue(n.getLatest(),"next"),e.direction)}function Xl(n,e){if(!e||n===e)return n;for(const t in e)if(n[t]!==e[t])return{...n,...e};return n}function fn(...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 Ae(n,...e){const t=fn(...e);t.length>0&&n.classList.add(...t)}function Xt(n,...e){const t=fn(...e);t.length>0&&n.classList.remove(...t)}function Ze(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}function Gh(n){const e=we().getElementByKey(n.getKey());if(e===null)return null;const t=e.ownerDocument.defaultView;return t===null?null:t.getComputedStyle(e)}function Qh(n){return Gh(Oe(n)?n:n.getParentOrThrow())}function ti(n){const e=Qh(n);return e!==null&&e.direction==="rtl"}function Zh(n,e,t="self"){const r=n.getStartEndPoints();if(e.isSelected(n)&&!Et(e)&&r!==null){const[o,i]=r,s=n.isBackward(),a=o.getNode(),l=i.getNode(),u=e.is(a),c=e.is(l);if(u||c){const[d,f]=Fa(n),h=a.is(l),g=e.is(s?l:a),m=e.is(s?a:l);let p,y=0;h?(y=d>f?f:d,p=d>f?d:f):g?(y=s?f:d,p=void 0):m&&(y=0,p=s?d:f);const _=e.__text.slice(y,p);_!==e.__text&&(t==="clone"&&(e=Py(e)),e.__text=_)}}return e}function n_(n,e){const t=n.getFormatType(),r=n.getIndent();t!==e.getFormatType()&&e.setFormat(t),r!==e.getIndent()&&e.setIndent(r)}function r_(n,e,t){let r=Qe(n,t);if(Ts(r))return!1;for(;r;r=r.getParentCaret()){const o=r.getParentAtCaret();if(!o||r.getNodeAtCaret())return!1;if(e.is(o))return!0}return!1}function o_(n,e,t=n_){if(!n)return;const r=n.getStartEndPoints();let o=!1,i=null;const s=new Map;if(r){const[a,l]=r,u=U(a.getNode(),Ue);i=U(l.getNode(),Ue);const c=n.isBackward()?"previous":"next";o=C(i)&&!i.is(u)&&(function(d,f,h){const g=d.getNode();return(!C(g)||!g.isEmpty())&&r_(d,f,h)})(l,i,An(c)),C(u)&&s.set(u.getKey(),u),C(i)&&!o&&s.set(i.getKey(),i)}for(const a of n.getNodes())if(C(a)&&Ue(a)){if(o&&a.is(i))continue;s.set(a.getKey(),a)}else if(!r){const l=U(a,Ue);C(l)&&s.set(l.getKey(),l)}for(const a of s.values()){const l=e();t(a,l),a.replace(l,!0)}}function eg(n){const e=tg(n);return e!==null&&e.writingMode==="vertical-rl"}function tg(n){const e=n.anchor.getNode();return C(e)?Gh(e):Qh(e)}function Mc(n,e){let t=eg(n)?!e:e;ng(n)&&(t=!t);const r=Qe(n.focus,t?"previous":"next");if(Ts(r))return!1;if(Nt(r)&&!Mr(r.origin)&&r.origin.isUnmergeable()){const o=r.getNodeAtCaret();if(D(o)&&!Mr(o))return!0}for(const o of Wr(r)){if(Xe(o))return!o.origin.isInline();if(!C(o.origin)){if(ne(o.origin))return!0;break}}return!1}function i_(n,e,t,r){n.modify(e?"extend":"move",t,r)}function ng(n){const e=tg(n);return e!==null&&e.direction==="rtl"}function jc(n,e,t){const r=ng(n);let o;o=eg(n)||r?!t:t,i_(n,e,o,"character")}function s_(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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,e){return Array.from(l_(n))}function l_(n,e){return c_("next",n)}function u_(n,e){const t=Yh(ue(n,e));return t&&t[0]}function c_(n,e,t){const r=ge(),o=e||r,i=C(o)?Re(o,n):ue(o,n),s=d_(o),a=u_(o,n);let l=s;return Es({hasNext:u=>u!==null,initial:i,map:u=>({depth:l,node:u.origin}),step:u=>{if(u.isSameNodeCaret(a))return null;Xe(u)&&l++;const c=Yh(u);return!c||c[0].isSameNodeCaret(a)?null:(l+=c[1],c[0])}})}function d_(n){let e=-1;for(let t=n;t!==null;t=t.getParent()??St(t))e++;return e}function f_(n,e){let t=n;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function h_(n){const e=U(n,t=>C(t)&&!t.isInline());return C(e)||s_(4,n.__key),e}function g_(n){const e=z()||yt();let t;if(N(e))t=Qe(e.focus,"next");else{if(e!=null){const s=e.getNodes(),a=s[s.length-1];a&&(t=ue(a,"next"))}t=t||Re(ge(),"previous").getFlipped().insert(Y())}const r=Ns(n,t),o=Zn(r),i=Xe(o)?Ve(o):r;return qr(Uo(i)),n.getLatest()}function Jt(n,e){return n!==null&&Object.getPrototypeOf(n).constructor.name===e.name}function ni(n){let e=null;if(Jt(n,DragEvent)?e=n.dataTransfer:Jt(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];const t=e.types,r=t.includes("Files"),o=t.includes("text/html")||t.includes("text/plain");return[r,Array.from(e.files),o]}function Rc(n){const e=z();if(!N(e))return!1;const t=new Set,r=e.getNodes();for(let o=0;o<r.length;o++){const i=r[o],s=i.getKey();if(t.has(s))continue;const a=U(i,u=>C(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 p_(n,e){Re(n,"next").insert(e)}function rg(n,e){return og(n,e,null)}function og(n,e,t){let r=!1;for(const o of ig(n))e(o)?t!==null&&t(o):(r=!0,C(o)&&og(o,e,t||(i=>o.insertAfter(i))),o.remove());return r}function Yi(n,e){const t=[],r=Array.from(n).reverse();for(let o=r.pop();o!==void 0;o=r.pop())if(e(o))t.push(o);else if(C(o))for(const i of ig(o))r.push(i);return t}function ig(n){return m_(Re(n,"previous"))}function m_(n){return Es({hasNext:It,initial:n.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}const y_=Symbol.for("preact-signals");function Gl(){if(Wn>1)return void Wn--;let n,e=!1;for(!(function(){let t=Xi;for(Xi=void 0;t!==void 0;)t.S.v===t.v&&(t.S.i=t.i),t=t.o})();bo!==void 0;){let t=bo;for(bo=void 0,Gi++;t!==void 0;){const r=t.u;if(t.u=void 0,t.f&=-3,!(8&t.f)&&sg(t))try{t.c()}catch(o){e||(n=o,e=!0)}t=r}}if(Gi=0,Wn--,e)throw n}let me,bo;function Pc(n){const e=me;me=void 0;try{return n()}finally{me=e}}let Xi,Wn=0,Gi=0,Lc=0,vi=0;function Ic(n){if(me===void 0)return;let e=n.n;return e===void 0||e.t!==me?(e={i:0,S:n,p:me.s,n:void 0,t:me,e:void 0,x:void 0,r:e},me.s!==void 0&&(me.s.n=e),me.s=e,n.n=e,32&me.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=me.s,e.n=void 0,me.s.n=e,me.s=e),e):void 0}function nt(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 Ho(n,e){return new nt(n,e)}function sg(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 Bc(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 ag(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 lr(n,e){nt.call(this,void 0),this.x=n,this.s=void 0,this.g=vi-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function lg(n){const e=n.m;if(n.m=void 0,typeof e=="function"){Wn++;const t=me;me=void 0;try{e()}catch(r){throw n.f&=-2,n.f|=8,Ql(n),r}finally{me=t,Gl()}}}function Ql(n){for(let e=n.s;e!==void 0;e=e.n)e.S.U(e);n.x=void 0,n.s=void 0,lg(n)}function __(n){if(me!==this)throw new Error("Out-of-order effect");ag(this),me=n,this.f&=-2,8&this.f&&Ql(this),Gl()}function yr(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 Zl(n,e){const t=new yr(n,e);try{t.c()}catch(o){throw t.d(),o}const r=t.d.bind(t);return r[Symbol.dispose]=r,r}function b_(n,e={}){const t={};for(const r in n){const o=e[r],i=Ho(o===void 0?n[r]:o);t[r]=i}return t}nt.prototype.brand=y_,nt.prototype.h=function(){return!0},nt.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:Pc(()=>{var t;(t=this.W)==null||t.call(this)}))},nt.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&&Pc(()=>{var r;(r=this.Z)==null||r.call(this)}))}},nt.prototype.subscribe=function(n){return Zl(()=>{const e=this.value,t=me;me=void 0;try{n(e)}finally{me=t}},{name:"sub"})},nt.prototype.valueOf=function(){return this.value},nt.prototype.toString=function(){return this.value+""},nt.prototype.toJSON=function(){return this.value},nt.prototype.peek=function(){const n=me;me=void 0;try{return this.value}finally{me=n}},Object.defineProperty(nt.prototype,"value",{get(){const n=Ic(this);return n!==void 0&&(n.i=this.i),this.v},set(n){if(n!==this.v){if(Gi>100)throw new Error("Cycle detected");(function(e){Wn!==0&&Gi===0&&e.l!==Lc&&(e.l=Lc,Xi={S:e,v:e.v,i:e.i,o:Xi})})(this),this.v=n,this.i++,vi++,Wn++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Gl()}}}}),lr.prototype=new nt,lr.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===vi))return!0;if(this.g=vi,this.f|=1,this.i>0&&!sg(this))return this.f&=-2,!0;const n=me;try{Bc(this),me=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 me=n,ag(this),this.f&=-2,!0},lr.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)}nt.prototype.S.call(this,n)},lr.prototype.U=function(n){if(this.t!==void 0&&(nt.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)}},lr.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(lr.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const n=Ic(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}}),yr.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()}},yr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,lg(this),Bc(this),Wn++;const n=me;return me=this,__.bind(this,n)},yr.prototype.N=function(){2&this.f||(this.f|=2,this.u=bo,bo=this)},yr.prototype.d=function(){this.f|=8,1&this.f||Ql(this)},yr.prototype.dispose=function(){this.d()};function k_(n){return(typeof n.nodes=="function"?n.nodes():n.nodes)||[]}function x_(n,e){let t;return Ho(n(),{unwatched(){t&&(t(),t=void 0)},watched(){this.value=n(),t=e(this)}})}function ve(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 ug;try{ug="0.49.0+prod.esm"}catch{}const C_=ug??'"<unknown>+source"',v_=new Set(["__proto__","constructor","prototype"]);function cg(n,e){if(n&&e&&!Array.isArray(e)&&typeof n=="object"&&typeof e=="object"){const t=n,r=e;for(const o in r)!v_.has(o)&&Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=cg(t[o],r[o]));return n}return e}const eu=0,Ka=1,dg=2,Gs=3,ri=4,ur=5,Qs=6,oo=7;function Zs(n){return n.id===eu}function fg(n){return n.id===dg}function S_(n){return(function(e){return e.id===Ka})(n)||ve(305,String(n.id),String(Ka)),Object.assign(n,{id:dg})}const w_=new Set;let E_=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:eu}}mergeConfigs(){let e=this.extension.config||{};const t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Xl;for(const r of this.configs)e=t(e,r);return e}init(e){const t=this.state;fg(t)||ve(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)},o={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=(function(a,l,u){return Object.assign(a,{config:l,id:Gs,registerState:u})})(t,this.mergeConfigs(),r);let s;this.state=i,this.extension.init&&(s=this.extension.init(e,i.config,r)),this.state=(function(a,l,u){return Object.assign(a,{id:ri,initResult:l,registerState:u})})(i,s,o)}build(e){const t=this.state;let r;t.id!==ri&&ve(307,String(t.id),String(ur)),this.extension.build&&(r=this.extension.build(e,t.config,t.registerState));const o={...t.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=(function(i,s,a){return Object.assign(i,{id:ur,output:s,registerState:a})})(t,r,o)}register(e,t){this._signal=t;const r=this.state;r.id!==ur&&ve(308,String(r.id),String(ur));const o=this.extension.register&&this.extension.register(e,r.config,r.registerState);return this.state=(function(i){return Object.assign(i,{id:Qs})})(r),()=>{const i=this.state;i.id!==oo&&ve(309,String(r.id),String(oo)),this.state=(function(s){return Object.assign(s,{id:ur})})(i),o&&o()}}afterRegistration(e){const t=this.state;let r;return t.id!==Qs&&ve(310,String(t.id),String(Qs)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=(function(o){return Object.assign(o,{id:oo})})(t),r}getSignal(){return this._signal===void 0&&ve(311),this._signal}getInitResult(){this.extension.init===void 0&&ve(312,this.extension.name);const e=this.state;return(function(t){return t.id>=ri})(e)||ve(313,String(e.id),String(ri)),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>=Gs})(e)||ve(314,String(e.id),String(Gs)),{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&&ve(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&ve(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){const e=this.state;return(function(t){return t.id>=oo})(e)||ve(316,String(e.id),String(oo)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||w_}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>=ur})(e)||ve(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}};const Kc={tag:wr};function T_(){const n=ge();n.isEmpty()&&n.append(Y())}const N_={config:{setOptions:Kc,updateOptions:Kc},init:({$initialEditorState:n=T_})=>({$initialEditorState:n,initialized:!1}),afterRegistration(n,{updateOptions:e,setOptions:t},r){const o=r.getInitResult();if(!o.initialized){o.initialized=!0;const{$initialEditorState:i}=o;if(gy(i))n.setEditorState(i,t);else if(typeof i=="function")n.update(()=>{i(n)},e);else if(i&&(typeof i=="string"||typeof i=="object")){const s=n.parseEditorState(i);n.setEditorState(s,t)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[bs,gn,ks,ps,xs]},Wc=Symbol.for("@lexical/extension/LexicalBuilder");function qc(){}function D_(n){throw n}function oi(n){return Array.isArray(n)?n:[n]}const ea=C_;let hg=class Si{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=ea,this.roots=e;for(const t of e)this.addExtension(t)}static fromExtensions(e){const t=[oi(N_)];for(const r of e)t.push(oi(r));return new Si(t)}static maybeFromEditor(e){const t=e[Wc];return t&&(t.PACKAGE_VERSION!==ea&&ve(292,t.PACKAGE_VERSION,ea),t instanceof Si||ve(293)),t}static fromEditor(e){const t=Si.maybeFromEditor(e);return t===void 0&&ve(294),t}constructEditor(){const{$initialEditorState:e,onError:t,onWarn:r,...o}=this.buildCreateEditorArgs(),i=Object.assign(Fl({...o,...t?{onError:s=>{t(s,i)}}:{},...r?{onWarn:s=>{r(s,i)}}:{}}),{[Wc]:this});for(const s of this.sortedExtensionReps())s.build(i);return i}buildEditor(){let e=qc;function t(){try{e()}finally{e=qc}}const r=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=Ze(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&&ve(295,e.name),t}addEdge(e,t,r){const o=this.outgoingConfigEdges.get(e);o?o.set(t,r):this.outgoingConfigEdges.set(e,new Map([[t,r]]));const i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&ve(296);const t=oi(e),[r]=t;typeof r.name!="string"&&ve(297,typeof r.name);let o=this.extensionNameMap.get(r.name);if(o!==void 0&&o.extension!==r&&ve(298,r.name),!o){o=new E_(this,r),this.extensionNameMap.set(r.name,o);const i=this.conflicts.get(r.name);typeof i=="string"&&ve(299,r.name,i);for(const s of r.conflictsWith||[])this.extensionNameMap.has(s)&&ve(299,r.name,s),this.conflicts.set(s,r.name);for(const s of r.dependencies||[]){const a=oi(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,o)=>{let i=r.state;if(fg(i))return;const s=r.extension.name;var a;Zs(i)||ve(300,s,o||"[unknown]"),Zs(a=i)||ve(304,String(a.id),String(eu)),i=Object.assign(a,{id:Ka}),r.state=i;const l=this.outgoingConfigEdges.get(s);if(l)for(const u of l.keys()){const c=this.extensionNameMap.get(u);c&&t(c,s)}i=S_(i),r.state=i,e.push(r)};for(const r of this.extensionNameMap.values())Zs(r.state)&&t(r);for(const r of e)for(const[o,i]of this.outgoingConfigEdges.get(r.extension.name)||[])if(i.length>0){const s=this.extensionNameMap.get(o);if(s)for(const a of i)s.configs.add(a)}for(const[r,...o]of this.roots)if(o.length>0){const i=this.extensionNameMap.get(r.name);i===void 0&&ve(301,r.name);for(const s of o)i.configs.add(s)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const t=this.sortedExtensionReps(),r=new AbortController,o=[()=>r.abort()],i=r.signal;for(const s of t){const a=s.register(e,i);a&&o.push(a)}for(const s of t){const a=s.afterRegistration(e);a&&o.push(a)}return Ze(...o)}buildCreateEditorArgs(){const e={},t=new Set,r=new Map,o=new Map,i={},s={},a=this.sortedExtensionReps();for(const c of a){const{extension:d}=c;if(d.onError!==void 0&&(e.onError=d.onError),d.onWarn!==void 0&&(e.onWarn=d.onWarn),d.disableEvents!==void 0&&(e.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(e.parentEditor=d.parentEditor),d.editable!==void 0&&(e.editable=d.editable),d.namespace!==void 0&&(e.namespace=d.namespace),d.$initialEditorState!==void 0&&(e.$initialEditorState=d.$initialEditorState),d.nodes)for(const f of k_(d)){if(typeof f!="function"){const h=r.get(f.replace);h&&ve(302,d.name,f.replace.name,h.extension.name),r.set(f.replace,c)}t.add(f)}if(d.html){if(d.html.export)for(const[f,h]of d.html.export.entries())o.set(f,h);d.html.import&&Object.assign(i,d.html.import)}d.theme&&cg(s,d.theme)}Object.keys(s).length>0&&(e.theme=s),t.size&&(e.nodes=[...t]);const l=Object.keys(i).length>0,u=o.size>0;(l||u)&&(e.html={},l&&(e.html.import=i),u&&(e.html.export=o));for(const c of a)c.init(e);return e.onError||(e.onError=D_),e}};function Gr(n,e){const t=hg.maybeFromEditor(n);if(!t)return;const r=t.extensionNameMap.get(e);return r?r.getExtensionDependency():void 0}function $_(n){return Gr(we(),n)}let tu=class extends _s{$config(){return this.config("horizontalrule",{importDOM:{hr:()=>({conversion:A_,priority:0})}})}exportDOM(){return{element:ae().createElement("hr")}}createDOM(e){const t=ae().createElement("hr");return Ae(t,e.theme.hr),t}getTextContent(){return`
|
|
12
|
+
`}isInline(){return!1}updateDOM(){return!1}};function A_(){return{node:gg()}}function gg(){return Kh(tu)}function Qr(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 Nr;function pg(n,e){const{key:t}=e;return n&&t in n?n[t]:e.defaultValue}function mg(n){return Nr&&Nr.editor===n?Nr:void 0}function F_(n,e){if("cfg"in e){const{cfg:t,updater:r}=e;return[t,r(pg(n,t))]}return e}function z_(n,e){let t=e;for(const r of n){const[o,i]=F_(t,r),s=o.key;if(t===e&&pg(t,o)===i)continue;const a=t===e||t===void 0?O_(e):t;a[s]=i,t=a}return t}function O_(n){return Object.create(n||null)}function Qi(n,e){return[n,e]}function M_(n,e,t,r=we()){const o=Nr,i=mg(r);try{return Nr={...i,editor:r,[n]:e},t()}finally{Nr=o}}function j_(n,e=()=>{}){return(t,r=we())=>o=>{const i=mg(r),s=i&&i[n],a=z_(t,s||e(r));return a&&a!==s?M_(n,a,o,r):o()}}function yg(n,e,t,r){return Object.assign(Po(Symbol(e),{isEqual:r,parse:t}),{[n]:!0})}function R_(n){if(!$n(n))return;const e=n;if(e.querySelector("style")===null)return;const t=new Map;function r(o){let i=t.get(o);if(i===void 0){i=new Set;for(let s=0;s<o.style.length;s++)i.add(o.style[s]);t.set(o,i)}return i}try{for(const o of Array.from(e.styleSheets)){let i;try{i=o.cssRules}catch{continue}for(const s of Array.from(i)){if(!Jt(s,CSSStyleRule))continue;let a;try{a=e.querySelectorAll(s.selectorText)}catch{continue}for(const l of Array.from(a)){if(!q(l))continue;const u=r(l);for(let c=0;c<s.style.length;c++){const d=s.style[c];u.has(d)||l.style.setProperty(d,s.style.getPropertyValue(d),s.style.getPropertyPriority(d))}}}}}catch{}}const _g="@lexical/html/DOM",bg=Symbol.for("@lexical/html/DOMExportContext"),P_=Symbol.for("@lexical/html/DOMImportContext");function L_(n,e,t){return yg(bg,n,e,t)}const I_=L_("isExport",Boolean);function B_(n){const e=Gr(n,_g);return e?e.output.defaults:void 0}function K_(n){const e=Gr(n,_g);return e?e.output.runtime:void 0}function W_(n=we()){const e=K_(n);return e?e.getSessionConfig():vs(n)}const q_=j_(bg,B_),Ds=Symbol.for("@lexical/html/SelectorImpl");function zo(n,e){const t={kind:"element",predicate:(r=e,r.length===0?q:r.length===1?r[0]:(i,s)=>{for(const a of r)if(!a(i,s))return!1;return!0}),tags:n};var r;const o=i=>zo(n,[...e,i]);return{[Ds]:t,attr:(i,s,a)=>o(Wa(i,s,a)),classAll:(...i)=>o(xg(i)),classAny:(...i)=>o((function(s){const a=kg(s);return a.length===0?()=>!1:l=>{if(!q(l))return!1;const u=l.classList;for(const c of a)if(u.contains(c))return!0;return!1}})(i)),styleAny:(i,s,a)=>o((function(l,u,c){if(typeof u=="string")return d=>q(d)&&d.style.getPropertyValue(l)===u;if(u instanceof RegExp){const d=c&&c.capture,f=u;return(h,g)=>{if(!q(h))return!1;const m=h.style.getPropertyValue(l);if(!m)return!1;const p=m.match(f);return p!==null&&(d!==void 0&&(g[d]=p),!0)}}Qr(362,JSON.stringify(l))})(i,s,a))}}function kg(n){const e=[];for(const t of n)t&&e.push(t);return e}function xg(n){const e=kg(n);return e.length===0?()=>!0:t=>{if(!q(t))return!1;const r=t.classList;for(const o of e)if(!r.contains(o))return!1;return!0}}function Wa(n,e,t){if(e===!0)return r=>q(r)&&r.hasAttribute(n);if(typeof e=="string")return r=>q(r)&&r.getAttribute(n)===e;if(e instanceof RegExp){const r=t&&t.capture,o=e;return(i,s)=>{if(!q(i))return!1;const a=i.getAttribute(n);if(a==null)return!1;const l=a.match(o);return l!==null&&(r!==void 0&&(s[r]=l),!0)}}Qr(361,JSON.stringify(n))}const U_={kind:"text",predicate:ht,tags:new Set},H_={[Ds]:U_},J_={kind:"comment",predicate:n=>n.nodeType===8,tags:new Set},V_={[Ds]:J_},kr={any:()=>zo(new Set,[]),comment:()=>V_,tag(...n){n.length>0||Qr(363);const e=new Set;for(const t of n)e.add(t.toUpperCase());return zo(e,[])},text:()=>H_};function Cg(n,e){return q(n)&&n.nodeName===e.toUpperCase()}const vg=/[A-Za-z0-9_-]/;class Y_{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()&&vg.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||Qr(364,String(this.pos+1),t,this.source)}}function X_(n){const e=new Set,t=[],r=[];if(n.skipWhitespace(),n.peek()==="*")n.consume();else if(vg.test(n.peek())){const o=n.readIdent();o&&e.add(o.toUpperCase())}for(;!n.eof();){const o=n.peek();if(o==="."){n.consume();const i=n.readIdent();n.assert(i!=="",'expected class name after "."'),r.push(i)}else if(o==="#"){n.consume();const i=n.readIdent();n.assert(i!=="",'expected id after "#"'),t.push(Wa("id",i))}else{if(o!=="[")break;{n.consume(),n.skipWhitespace();const i=n.readIdent();n.assert(i!=="",'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(Wa(i,s))}}}return r.length>0&&t.push(xg(r)),{predicates:t,tags:e}}function G_(n){const e=new Y_(n,0),t=[];for(;;){const o=X_(e);if(t.push(o),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 zo(t[0].tags,t[0].predicates);const r=new Set;if(t.every(o=>o.tags.size>0))for(const o of t)for(const i of o.tags)r.add(i);return zo(r,[(o,i)=>{for(const s of t){const a=o.nodeName;if(s.tags.size>0&&!s.tags.has(a))continue;let l=!0;for(const u of s.predicates)if(!u(o,i)){l=!1;break}if(l)return!0}return!1}])}function nu(n,e,t){return yg(P_,n,e,t)}const Oo=nu("textFormat",()=>0),qa=nu("textStyle",()=>({}));function Q_(n){if(!q(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function Z_(n){if(ht(n))return!0;if(!q(n))return!1;const e=n.style.display;return e?e.startsWith("inline"):!Kr(n)&&Ui(n)}const eb=nu("whitespaceConfig",()=>({isInline:Z_,preservesWhitespace:Q_}));function ru(n){return jr(n)||ne(n)&&!n.isInline()}function Sg(n,e){const t=[];let r=[];const o=()=>{r.length!==0&&(t.push(e().splice(0,0,r)),r=[])};for(const i of n)if(ru(i)){if(o(),C(i)){const s=Sg(i.getChildren(),e);i.splice(0,i.getChildrenSize(),s)}t.push(i)}else r.push(i);return o(),t}function ou(n,e){if(!q(e))return n;const t=e.style.textAlign;if(!iu(t))return n;for(const r of n)jr(r)&&r.getFormatType()===""&&r.setFormat(t);return n}function tb(n,e,t){n.length===1&&We(n[0])&&(n=[]);const r=Y();if(q(t)){const o=t.style.textAlign;iu(o)&&r.setFormat(o)}return[r.splice(0,0,n)]}const wg={$accepts:ru,$packageRun:tb,name:"BlockSchema"},sr=kr,nb=new Set(["center","end","justify","left","right","start"]);function iu(n){return nb.has(n)}const rb={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"}},ob={CODE:um,MARK:yl},ib=new Set(["font-weight","font-style","text-decoration","vertical-align"]),sb={$import:(n,e)=>{const t=n.get(Oo),r=rb[e.nodeName],o=(function(f){return{fontStyle:f.style.fontStyle,fontWeight:f.style.fontWeight,textDecoration:f.style.textDecoration,verticalAlign:f.style.verticalAlign}})(e),i=r?(s=r,{fontStyle:(a=o).fontStyle||s.fontStyle,fontWeight:a.fontWeight||s.fontWeight,textDecoration:a.textDecoration||s.textDecoration,verticalAlign:a.verticalAlign||s.verticalAlign}):o;var s,a;let l=(u=t,c=(function(f){let h=0,g=0;const{fontWeight:m,fontStyle:p,textDecoration:y,verticalAlign:_}=f;if(m==="700"||m==="bold"?h|=fa:m!=="normal"&&m!=="400"||(g|=fa),p==="italic"?h|=ha:p==="normal"&&(g|=ha),y){const b=y.split(" ");b.includes("underline")&&(h|=pa),b.includes("line-through")&&(h|=ga),b.includes("none")&&(g|=pa|ga)}return _==="sub"?(h|=Rs,g|=Ps):_==="super"?(h|=Ps,g|=Rs):_==="baseline"&&(g|=Rs|Ps),{clear:g,set:h}})(i),u&~c.clear|c.set);var u,c;const d=ob[e.nodeName];return d&&(l|=d),l===t?n.$importChildren(e):n.$importChildren(e,{context:[Qi(Oo,l)]})},match:sr.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function Uc(n,e,t){let r=n;for(;;){let o=null;for(;(o=e?r.nextSibling:r.previousSibling)===null;){const s=r.parentNode;if(s===null)return null;r=s}if(r=o,!t.isInline(r))return null;let i=r;for(;(i=e?r.firstChild:r.lastChild)!==null;)r=i;if(ht(r))return r;if(r.nodeName==="BR")return null}}function Hc(n,e){return e!==0&&D(n)?n.setFormat(e):n}function Jc(n,e){if(D(n)){const t=(function(r){let o="";for(const i in r)ib.has(i)||(o+=`${i}: ${r[i]}; `);return o.trimEnd()})(e);t!==""&&n.setStyle(t)}return n}const ab={$import:(n,e)=>{const t=n.get(Oo),r=n.get(qa),o=n.get(eb);if((function(a,l){let u=a.parentNode;for(;u!==null;){if(l.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(e,o)){const a=No(e.textContent||"");for(const l of a)Hc(l,t),Jc(l,r);return a}const i=(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,d=!0;for(;c!==null&&(c=Uc(c,!1,l))!==null;){const f=c.textContent||"";if(f.length>0){/[ \t\n]$/.test(f)&&(u=u.slice(1)),d=!1;break}}d&&(u=u.slice(1))}if(u.length>0&&u[u.length-1]===" "){let c=a,d=!0;for(;c!==null&&(c=Uc(c,!0,l))!==null;)if((c.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){d=!1;break}d&&(u=u.slice(0,-1))}return u})(e,o);if(i==="")return[];const s=Fe(i);return Hc(s,t),Jc(s,r),[s]},match:sr.text(),name:"@lexical/html/#text"},lb={$import:()=>[],match:sr.tag("script","style"),name:"@lexical/html/script-style-ignore"},ub={$import:(n,e)=>bh(e)||kh(e)?[]:[Gt()],match:sr.tag("br"),name:"@lexical/html/br"},cb={$import:(n,e)=>{const t=Y();if(tn(t,e),ir(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&iu(r)&&t.setFormat(r)}return $t(t,e),[t.splice(0,0,n.$importChildren(e))]},match:sr.tag("p"),name:"@lexical/html/p"},db={$import:(n,e,t)=>we().hasNode(tu)?[gg()]:t(),match:sr.tag("hr"),name:"@lexical/html/hr"};sr.any();function fb(n,e){const t=[];let r=0,o=0;for(;r<n.length&&o<e.length;)n[r]<=e[o]?t.push(n[r++]):t.push(e[o++]);for(;r<n.length;)t.push(n[r++]);for(;o<e.length;)t.push(e[o++]);return t}function hb(n){const e=[],t=new Map,r=[],o=[],i=[],s=new Set;n.forEach((l,u)=>{const c=(function(f){const h=f[Ds];return h===void 0&&Qr(360),h})(l.match),d=l.name||(function(f,h){return f.kind==="text"?`#text@${h}`:f.kind==="comment"?`#comment@${h}`:f.tags.size===0?`*@${h}`:`${Array.from(f.tags).join(",").toLowerCase()}@${h}`})(c,u);if(l.name&&s.add(l.name),e.push({$import:l.$import,name:d,predicate:c.predicate}),c.kind==="text")o.push(u);else if(c.kind==="comment")i.push(u);else if(c.tags.size===0)r.push(u);else for(const f of c.tags){let h=t.get(f);h||(h=[],t.set(f,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,fb(u,r));return{byTag:a,commentIndices:i,rules:e,textIndices:o,wildcardIndices:r}}function gb(n){const e=[];for(const t of n)if(pb(t))for(const r of t.rules)e.push(r);else e.push(t);return e}function pb(n){return typeof n=="object"&&n!==null&&"__type"in n&&n.__type==="CompiledOverlayRules"}function Eg(n){const e=gb(n);return{__type:"CompiledOverlayRules",dispatch:hb(e),rules:e}}kr.any();const je={any:kr.any,comment:kr.comment,css:G_,tag:kr.tag,text:kr.text},Tg=new Set(["STYLE","SCRIPT"]);function Ng(n,e){R_(e);const t=$n(e)?e.body.childNodes:e.childNodes,r=[],o=[];for(const i of t)if(!Tg.has(i.nodeName)){const s=$g(i,n,o,!1);if(s!==null)for(const a of s)r.push(a)}return(function(i){for(const s of i)s.getParent()&&s.getNextSibling()instanceof Al&&s.insertAfter(Gt());for(const s of i){const a=s.getParent();a&&a.splice(s.getIndexWithinParent(),1,s.getChildren())}})(o),r}function mb(n,e=null,t=we()){return q_([Qi(I_,!0)],t)(()=>{const r=ge(),o=W_(t),i=N(e)?Ss(e.anchor.getNode()):null,s=n.append.bind(n);for(const a of(C(i)?i:r).getChildren())Dg(t,a,s,e,o);return n})}function su(n,e=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&Qr(338),dy(n),mb(ae().createElement("div"),e,n).innerHTML}function Dg(n,e,t,r=null,o=vs(n)){let i=o.$shouldInclude(e,r,n);const s=o.$shouldExclude(e,r,n);let a=e;r!==null&&D(e)&&(a=Zh(r,e,"clone"));const l=o.$exportDOM(a,n),{element:u,after:c,append:d,$getChildNodes:f}=l;if(!u)return!1;const h=ae().createDocumentFragment(),g=f?f():C(a)?a.getChildren():[],m=i&&pe(r)&&C(e)?null:r,p=h.append.bind(h);for(const y of g){const _=Dg(n,y,p,m,o);!i&&_&&o.$extractWithChild(e,y,r,"html",n)&&(i=!0)}if(i&&!s){if((q(u)||Ra(u))&&(d?d(h):u.append(h)),t(u),c){const y=c.call(a,u);y&&(Ra(u)?u.replaceChildren(y):u.replaceWith(y))}}else t(h);return i}function $g(n,e,t,r,o=new Map,i){const s=[];if(Tg.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 o)if(a=m(a,i),!a)break;a&&s.push(...Array.isArray(g)?g:[a])}u.forChild!=null&&o.set(n.nodeName,u.forChild)}const d=n.childNodes;let f=[];const h=(a==null||!Se(a))&&(a!=null&&jr(a)||r);for(let g=0;g<d.length;g++)f.push(...$g(d[g],e,t,h,new Map(o),a));if(c!=null&&(f=c(f)),Kr(n)&&(f=yb(n,f,h?()=>{const g=new Al;return t.push(g),g}:Y)),a==null)if(f.length>0)for(const g of f)s.push(g);else Kr(n)&&(function(g){return g.nextSibling==null||g.previousSibling==null?!1:Ui(g.nextSibling)&&Ui(g.previousSibling)})(n)&&s.push(Gt());else C(a)&&a.append(...f);return s}function yb(n,e,t){const r=n.style.textAlign,o=[];let i=[];for(let s=0;s<e.length;s++){const a=e[s];if(jr(a))r&&!a.getFormat()&&a.setFormat(r),o.push(a);else if(i.push(a),s===e.length-1||s<e.length-1&&jr(e[s+1])){const l=t();l.setFormat(r),l.append(...i),o.push(l),i=[]}}return o}function _b(n,e){let t=n;for(let r=ue(n,e);r&&(Fg(r.origin)||Mr(r.origin));r=r.getAdjacentCaret())t=r.origin;return t}function bb(n){return _b(n,"previous")}function Ag(n,e){for(const t of n.childNodes)if(q(t)&&t.tagName===e||Ag(t,e))return!0;return!1}const uo="data-language",io="data-highlight-language",ii="data-theme";let $s=class extends Ee{__language;__theme;__isSyntaxHighlightSupported;$config(){return this.config("code",{extends:Ee,importDOM:{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||Ag(e,"BR"))?{conversion:Vc,priority:1}:null,div:()=>({conversion:kb,priority:1}),pre:()=>({conversion:Vc,priority:0}),table:e=>ta(e)?{conversion:xb,priority:3}:null,td:e=>{const t=e,r=t.closest("table");return t.classList.contains("js-file-line")||r&&ta(r)?{conversion:Yc,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&ta(t)?{conversion:Yc,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=ae().createElement("code");Ae(t,e.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(t.setAttribute(uo,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(io,r));const o=this.getTheme();o&&t.setAttribute(ii,o);const i=this.getStyle();return i&&Sn(t.style,i),t}updateDOM(e,t,r){const o=this.__language,i=e.__language;o?o!==i&&t.setAttribute(uo,o):i&&t.removeAttribute(uo);const s=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&i?s&&o?o!==i&&t.setAttribute(io,o):t.removeAttribute(io):s&&o&&t.setAttribute(io,o);const a=this.__theme,l=e.__theme;a?a!==l&&t.setAttribute(ii,a):l&&t.removeAttribute(ii);const u=this.__style,c=e.__style;return u!==c&&Sn(t.style,u,c),!1}exportDOM(e){const t=ae().createElement("pre");Ae(t,e._config.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(t.setAttribute(uo,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(io,r));const o=this.getTheme();o&&t.setAttribute(ii,o);const i=this.getStyle();return i&&Sn(t.style,i),{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(!Gr(we(),"@lexical/code")){const s=Cb(e);if(s)return s}const{anchor:r,focus:o}=e,i=(r.isBefore(o)?r:o).getNode();if(D(i)){let s=bb(i);const a=[];for(;;)if(Mr(s))a.push(Bo()),s=s.getNextSibling();else{if(!Fg(s))break;{let g=0;const m=s.getTextContent(),p=s.getTextContentSize();for(;g<p&&m[g]===" ";)g++;if(g!==0&&a.push(vb(" ".repeat(g))),g!==p)break;s=s.getNextSibling()}}const l=i.splitText(r.offset)[0],u=r.offset===0?0:1,c=l.getIndexWithinParent()+u,d=i.getParentOrThrow(),f=[Gt(),...a];d.splice(c,0,f);const h=a[a.length-1];h?h.select():r.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(au(i)){const{offset:s}=e.anchor;i.splice(s,0,[Gt()]),i.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 ut(n,e){return Kh($s).setLanguage(n).setTheme(e)}function au(n){return n instanceof $s}function Vc(n){return{node:ut(n.getAttribute(uo))}}function kb(n){const e=n,t=Xc(e);return t||(function(r){let o=r.parentElement;for(;o!==null;){if(Xc(o))return!0;o=o.parentElement}return!1})(e)?{node:t?ut():null}:{node:null}}function xb(){return{node:ut()}}function Yc(){return{node:null}}function Xc(n){return n.style.fontFamily.match("monospace")!==null}function ta(n){return n.classList.contains("js-file-line-container")}function Cb(n){const{anchor:e}=n;if(n.isCollapsed()&&e.type==="element"){const t=e.getNode();if(au(t)){const r=t.getChildrenSize();if(r>=2&&e.offset===r){const o=t.getLastChild();if(We(o)&&We(o.getPreviousSibling())){const i=Y();return t.splice(r-2,2,[]).insertAfter(i,!1),i.select(),i}}}}return null}class lu extends gn{__highlightType;constructor(e="",t,r){super(e,r),this.__highlightType=t}$config(){return this.config("code-highlight",{extends:gn})}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=na(e.theme,this.__highlightType);return Ae(t,r),t}updateDOM(e,t,r){const o=super.updateDOM(e,t,r),i=na(r.theme,e.__highlightType),s=na(r.theme,this.__highlightType);return i!==s&&(i&&Xt(t,i),s&&Ae(t,s)),o}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 ut()}}function na(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function vb(n="",e){return tt(new lu(n,e))}function Fg(n){return n instanceof lu}const zg="data-language";function Og(n){return n.style.fontFamily.match("monospace")!==null}function Ua(n){let e=n.parentElement;for(;e!==null;){if(Og(e))return!0;e=e.parentElement}return!1}const Sb=Eg([{$import:(n,e)=>n.$importChildren(e),match:je.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),wb={$import:(n,e)=>[ut(e.getAttribute(zg)).splice(0,0,n.$importChildren(e))],match:je.tag("pre"),name:"@lexical/code/pre"},Eb={$import:(n,e,t)=>{const r=e.textContent||"";return/\r?\n/.test(r)||e.querySelector("br")!==null?[ut(e.getAttribute(zg)).splice(0,0,n.$importChildren(e))]:t()},match:je.tag("code"),name:"@lexical/code/code-multiline"};function si(n){if(!q(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 Tb(n){let e=!1;const t=[];let r="",o=!1;const i=()=>{o&&(t.push(r),r="",o=!1)};for(const s of Array.from(n.childNodes))if(q(s))s.tagName==="DIV"?(i(),t.push(s.textContent||""),e=!0):s.tagName==="BR"?(i(),t.push(""),e=!0):(r+=s.textContent||"",o=!0);else if(ht(s)){const a=s.textContent||"";a.length>0&&(r+=a,o=!0)}return i(),e?t:null}je.tag("div"),je.tag("div","br");const Nb={$import:(n,e,t)=>Og(e)?[ut().splice(0,0,n.$importChildren(e))]:Ua(e)?n.$importChildren(e):t(),match:je.tag("div"),name:"@lexical/code/div"};je.tag("table").classAll("js-file-line-container"),je.tag("td").classAll("js-file-line");const Gc=new Set(["http:","https:","mailto:","sms:","tel:"]);let Dn=class extends Ee{__url;__target;__rel;__title;$config(){return this.config("link",{extends:Ee,importDOM:{a:()=>({conversion:$b,priority:1})}})}constructor(e="",t={},r){super(r);const{target:o=null,rel:i=null,title:s=null}=t;this.__url=e,this.__target=o,this.__rel=i,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=ae().createElement("a");return this.updateLinkDOM(null,t,e),Ae(t,e.theme.link),t}updateLinkDOM(e,t,r){if(Lh(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(const o of["target","rel","title"]){const i=`__${o}`,s=this[i];e&&e[i]===s||(s?t[o]=s:t.removeAttribute(o))}}}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=td(e);try{const r=new URL(td(e));if(!Gc.has(r.protocol))return"about:blank"}catch{const o=t.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(o!=null&&!Gc.has(`${o[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=He(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 o=t.anchor.getNode(),i=t.focus.getNode();return(this.is(o)||this.isParentOf(o))&&(this.is(i)||this.isParentOf(i))&&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 Qc(n){const e=Qe(n,"next");return[e,e.getFlipped()]}function Zc(n,e){for(const t of e)if(t.origin.isAttached()){const r=Ve(t);return void Mt(n,r)}}function Db(n){const e=z();let t=null,r=null;function o(){N(e)&&(Zc(e.anchor,t),Zc(e.focus,r),Kt(e))}N(e)&&(t=Qc(e.anchor),r=Qc(e.focus));let i=!1;for(const a of Re(n,"next")){const l=a.origin;if(C(l)&&!l.isInline()){const u=l.getChildren();if(u.length>0){const c=He(n);c.append(...u),l.append(c),i=!0}Ns(l,Fn(a),{$shouldSplit:()=>!1})}}function s(a,l,u){const[c,d]=a,f=g=>It(g)&&g.origin.is(l);if(!f(c)&&!f(d))return a;const h=Ve(Re(u,"next"));return[h,h.getFlipped()]}if(n.isAttached()){const a=n.getPreviousSibling();if(at(a)&&a.shouldMergeAdjacentLink(n))return t&&(t=s(t,a,n)),r&&(r=s(r,a,n)),a.append(...n.getChildren()),n.remove(),void o();const l=n.getNextSibling();at(l)&&n.shouldMergeAdjacentLink(l)&&(t&&(t=s(t,n,l)),r&&(r=s(r,n,l)),n.append(...l.getChildren()),l.remove(),i=!0)}if(i){if(!n.canBeEmpty()&&n.isEmpty()){const a=n.getParent();n.remove(),a&&a.isEmpty()&&a.remove()}o()}}function $b(n){let e=null;if(Lh(n)){const t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=Mo(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function Mo(n="",e){return tt(new Dn(n,e))}function at(n){return n instanceof Dn}let uu=class extends Dn{__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:Dn})}shouldMergeAdjacentLink(e){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?ae().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=Ab(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}};function Ab(n="",e){return tt(new uu(n,e))}function _r(n){return n instanceof uu}const Ha=W("TOGGLE_LINK_COMMAND");function ed(n,e){if(n.type==="element"){const t=n.getNode();return C(t)||(function(r,...o){const i=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const a of o)s.append("v",a);throw i.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${i.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 ra(n,e={}){let t;if(n&&typeof n=="object"){const{url:c,...d}=n;t=c,e={...d,...e}}else t=n;const{target:r,title:o}=e,i=e.rel===void 0?"noreferrer":e.rel,s=z();if(s===null||!N(s)&&!pe(s))return;if(pe(s)){const c=s.getNodes();return c.length===0?void 0:void c.forEach(d=>{if(t===null){const f=U(d,h=>!_r(h)&&at(h));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{const f=U(d,h=>!_r(h)&&at(h));if(f)f.setURL(t),r!==void 0&&f.setTarget(r),i!==void 0&&f.setRel(i);else{const h=Mo(t,{rel:i,target:r});d.insertBefore(h),h.append(d)}}})}if(s.isCollapsed()&&t===null)for(const c of s.getNodes()){const d=U(c,f=>!_r(f)&&at(f));return void(d!==null&&(d.getParentOrThrow().splice(d.getIndexWithinParent(),0,d.getChildren()),d.remove()))}const a=s.extract();if(t===null){const c=new Set;return void a.forEach(d=>{const f=U(d,h=>!_r(h)&&at(h));if(f!==null){const h=f.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())||C(v)&&m.some(E=>g.isParentOf(E)&&v.isParentOf(E)),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(_),x=k===0,w=S===y.length-1;if(x)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 E=b.length-1;E>=0;E--)g.insertAfter(b[E]);const v=y.slice(S+1);if(v.length>0){const E=He(g);b[b.length-1].insertAfter(E),v.forEach(A=>E.append(A))}}})(f,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),i!==void 0&&c.setRel(i),o!==void 0&&c.setTitle(o))};if(a.length===1){const c=a[0],d=U(c,at);if(d!==null)return u(d)}(function(c){const d=z();if(!N(d))return c();const f=Kt(d),h=f.isBackward(),g=ed(f.anchor,h?-1:0),m=ed(f.focus,h?0:-1);if(c(),g||m){const p=z();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")}_e(Kt(y))}}})(()=>{let c=null;for(const d of a){if(!d.isAttached())continue;const f=U(d,at);if(f){u(f);continue}if(C(d)){if(!d.isInline())continue;if(at(d)){if(!(_r(d)||c!==null&&c.getParentOrThrow().isParentOf(d))){u(d),c=d;continue}for(const g of d.getChildren())d.insertBefore(g);d.remove();continue}}const h=d.getPreviousSibling();at(h)&&h.is(c)?h.append(d):(c=Mo(t,{rel:i,target:r,title:o}),d.insertAfter(c),c.append(d))}})}const Fb=/^\+?[0-9\s()-]{5,}$/;function td(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:Fb.test(n)?`tel:${n}`:`https://${n}`}je.tag("a");function zb(n,e){return Ze(n.registerNodeTransform(Dn,Db),n.registerCommand(Ha,t=>{const r=e.validateUrl.peek(),o=e.attributes.peek();if(t===null)return ra(null),!0;if(typeof t=="string")return!(r!==void 0&&!r(t))&&(ra(t,o),!0);{const{url:i,target:s,rel:a,title:l}=t;return ra(i,{...o,rel:a,target:s,title:l}),!0}},G),Zl(()=>{const t=e.validateUrl.value;if(!t)return;const r=e.attributes.value;return n.registerCommand(Vr,o=>{const i=z();if(!N(i)||i.isCollapsed()||!Jt(o,ClipboardEvent)||o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return t(s)?!i.getNodes().some(a=>C(a)||D(a)&&!a.isSimpleText())&&(n.dispatchCommand(Ha,{...r,url:s}),o.preventDefault(),!0):!1},mt)}))}function bn(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 Ja(n){let e=1,t=n.getParent();for(;t!=null;){if(le(t)){const r=t.getParent();if(V(r)){e++,t=r.getParent();continue}bn(40)}return e}return e}function Va(n){const e=n.getParent();V(e)||bn(40);let t=e,r=e;for(;r!==null;)r=r.getParent(),V(r)&&(t=r);return t}function Mg(n){let e=[];const t=n.getChildren().filter(le);for(let r=0;r<t.length;r++){const o=t[r],i=o.getFirstChild();V(i)?e=e.concat(Mg(i)):e.push(o)}return e}function vt(n){return le(n)&&V(n.getFirstChild())}function jg(n,e){return le(n)&&(e.length===0||e.length===1&&n.is(e[0])&&n.getChildrenSize()===0)}function nd(n){const e=z();if(e!==null){let t=e.getNodes();if(N(e)){const[o]=e.getStartEndPoints(),i=o.getNode(),s=i.getParent();if(Se(i)){const a=i.getFirstChild();if(a)t=a.selectStart().getNodes();else{const l=Y();i.append(l),t=l.select().getNodes()}}else if(jg(i,t)){const a=Rt(n);if(Se(s)){i.replace(a);const l=Zt();C(i)&&(l.setFormat(i.getFormatType()),l.setIndent(i.getIndent())),a.append(l)}else if(le(i)){const l=i.getParentOrThrow();er(a,l.getChildren()),l.replace(a)}return}}const r=new Set;for(let o=0;o<t.length;o++){const i=t[o];if(C(i)&&i.isEmpty()&&!le(i)&&!r.has(i.getKey())){rd(i,n);continue}let s=Sh(i)?i.getParent():le(i)&&i.isEmpty()?i:null;for(;s!=null;){const a=s.getKey();if(V(s)){if(!r.has(a)){const l=Rt(n);er(l,s.getChildren()),s.replace(l),r.add(a)}break}{const l=s.getParent();if(Se(l)&&!r.has(a)){r.add(a),rd(s,n);break}s=l}}}}}function er(n,e){n.splice(n.getChildrenSize(),0,e)}function rd(n,e){if(V(n))return n;const t=n.getPreviousSibling(),r=n.getNextSibling(),o=Zt();let i;if(er(o,n.getChildren()),V(t)&&e===t.getListType())t.append(o),V(r)&&e===r.getListType()&&(er(t,r.getChildren()),r.remove()),i=t;else if(V(r)&&e===r.getListType())r.getFirstChildOrThrow().insertBefore(o),i=r;else{const a=Rt(e);a.append(o),n.replace(a),i=a}o.setFormat(n.getFormatType()),o.setIndent(n.getIndent());const s=z();return N(s)&&(i.getKey()===s.anchor.key&&s.anchor.set(o.getKey(),s.anchor.offset,"element"),i.getKey()===s.focus.key&&s.focus.set(o.getKey(),s.focus.offset,"element")),n.remove(),i}function cu(n,e){const t=n.getLastChild(),r=e.getFirstChild();t&&r&&vt(t)&&vt(r)&&(cu(t.getFirstChild(),r.getFirstChild()),r.remove());const o=e.getChildren();o.length>0&&n.append(...o),e.remove()}function Ob(){const n=z();if(N(n)){const e=new Set,t=n.getNodes(),r=n.anchor.getNode();if(jg(r,t))e.add(Va(r));else for(let o=0;o<t.length;o++){const i=t[o];if(Sh(i)){const s=f_(i,zn);s!=null&&e.add(Va(s))}}for(const o of e){let i=o;const s=Mg(o);for(const a of s){const l=Y().setTextStyle(n.style).setTextFormat(n.format);er(l,a.getChildren()),i.insertAfter(l),i=l,a.__key===n.anchor.key&&Mt(n.anchor,Ve(Re(l,"next"))),a.__key===n.focus.key&&Mt(n.focus,Ve(Re(l,"next"))),a.remove()}o.remove()}}}function Rg(n){const e=n.getListType()!=="check";let t=n.getStart();for(const r of n.getChildren())le(r)&&(r.getValue()!==t&&r.setValue(t),e&&r.getLatest().__checked!=null&&r.setChecked(void 0),V(r.getFirstChild())||t++)}function Mb(n){const e=new Set;if(vt(n)||e.has(n.getKey()))return;const t=n.getParent(),r=n.getNextSibling(),o=n.getPreviousSibling();if(vt(r)&&vt(o)){const i=o.getFirstChild();if(V(i)){i.append(n);const s=r.getFirstChild();V(s)&&(er(i,s.getChildren()),r.remove(),e.add(r.getKey()))}}else if(vt(r)){const i=r.getFirstChild();if(V(i)){const s=i.getFirstChild();s!==null&&s.insertBefore(n)}}else if(vt(o)){const i=o.getFirstChild();V(i)&&i.append(n)}else if(V(t)){const i=He(n),s=He(t);i.append(s),s.append(n),o?o.insertAfter(i):r?r.insertBefore(i):t.append(i)}}function od(n){if(vt(n))return;const e=n.getParent(),t=e?e.getParent():void 0;if(V(t?t.getParent():void 0)&&le(t)&&V(e)){const r=e?e.getFirstChild():void 0,o=e?e.getLastChild():void 0;if(n.is(r))t.insertBefore(n),e.isEmpty()&&t.remove();else if(n.is(o))t.insertAfter(n),e.isEmpty()&&t.remove();else{const i=He(n),s=He(e);i.append(s),n.getPreviousSiblings().forEach(u=>s.append(u));const a=He(n),l=He(e);a.append(l),er(l,n.getNextSiblings()),t.insertBefore(i),t.insertAfter(a),t.replace(n)}}}function jb(n=!1){const e=z();if(!N(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();let r=null;if(le(t)&&t.getChildrenSize()===0)r=t;else if(D(t)){const u=t.getParent();le(u)&&u.getChildren().every(c=>D(c)&&c.getTextContent().trim()==="")&&(r=u)}if(r===null)return!1;const o=Va(r),i=r.getParent();V(i)||bn(40);const s=i.getParent();let a;if(Se(s))a=Y(),o.insertAfter(a);else{if(!le(s))return!1;a=He(s),s.insertAfter(a)}a.setTextStyle(e.style).setTextFormat(e.format).select();const l=r.getNextSiblings();if(l.length>0){const u=n?(function(d,f){return d.getStart()+f.getIndexWithinParent()})(i,r):1,c=He(i).setStart(u);if(le(a)){const d=He(a);d.append(c),a.insertAfter(d)}else a.insertAfter(c);c.append(...l)}return(function(u){let c=u;for(;c.getNextSibling()==null&&c.getPreviousSibling()==null;){const d=c.getParent();if(d==null||!le(d)&&!V(d))break;c=d}c.remove()})(r),!0}let zn=class extends Ee{__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)||bn(340);const o=[e];for(const i of["previous","next"]){o.reverse();for(const{origin:s}of ue(e,i)){if(!le(s))break;o.push(s)}}e.insertBefore(r),r.splice(0,0,o),Se(t)||(Ns(r,Fn(ue(r,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},extends:Ee,importDOM:{li:()=>({conversion:Rb,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=ae().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,d=u.nested&&u.nested.listitem,f=l.getParent(),h=V(f)&&f.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),d!==void 0&&p.push(...fn(d)),p.length>0&&Xt(s,...p);const y=[];if(c!==void 0&&y.push(...fn(c)),h){const _=g?u.listitemChecked:u.listitemUnchecked;_!==void 0&&y.push(_)}d!==void 0&&m&&y.push(...fn(d)),y.length>0&&Ae(s,...y)})(t,r.theme,this);const o=e?e.__style:"",i=this.__style;o!==i&&Sn(t.style,i,o),(function(s,a,l){const u=a.__textStyle,c=l?l.__textStyle:"";if(l!==null&&c===u)return;const d=Mi(u);for(const f in d)s.style.setProperty(`--listitem-marker-${f}`,d[f]);if(c!=="")for(const f in Mi(c))f in d||s.style.removeProperty(`--listitem-marker-${f}`)})(t,this,e)}updateDOM(e,t,r){const o=t;return this.updateListItemDOM(e,o,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 o=this.getDirection();return o&&(t.dir=o),vt(this)?{after(i){if(q(i)){const s=i.previousElementSibling;if(q(s)&&s.nodeName==="LI"){for(;i.firstChild;)s.append(i.firstChild);i.remove()}}return i},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(C(r)&&this.canMergeWith(r)){const o=r.getChildren();this.append(...o),r.remove()}else super.append(r)}return this}replace(e,t){if(le(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=He(r);let a=this.getNextSibling();for(;a;){const l=a;a=a.getNextSibling(),s.append(l)}r.insertAfter(e),e.insertAfter(s)}const o=this.__key;let i=0;if(t&&(C(e)||bn(139),i=e.getChildrenSize(),e.splice(i,0,this.getChildren())),t&&C(e)){const s=z();if(N(s))for(const a of s.getStartEndPoints())a.key===o&&a.type==="element"&&a.set(e.getKey(),i+a.offset,"element")}return this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,t=!0){const r=this.getParentOrThrow();if(V(r)||bn(39),le(e))return super.insertAfter(e,t);const o=this.getNextSiblings();if(r.insertAfter(e,t),o.length!==0){const i=He(r);o.forEach(s=>i.append(s)),e.insertAfter(i,t)}return e}remove(e){const t=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),t&&r&&vt(t)&&vt(r)&&(cu(t.getFirstChild(),r.getFirstChild()),r.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){const r=He(this);return this.insertAfter(r,t),r}collapseAtStart(e){if(vt(this))return!1;const t=this.getParentOrThrow();if(le(t.getParentOrThrow()))return od(this),!0;const r=Y().append(...this.getChildren()),o=this.getNextSiblings();if(o.length>0){const i=He(t);i.append(...o),t.insertAfter(i)}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(;le(t);)t=t.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&bn(117),(e=Math.floor(e))>=0||bn(199);let t=this.getIndent();for(;t!==e;)t<e?(Mb(this),t++):(od(this),t--);return this}canInsertAfter(e){return le(e)}canReplaceWith(e){return le(e)}canMergeWith(e){return le(e)||en(e)}extractWithChild(e,t){if(!N(t))return!1;const r=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(o)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Rt("bullet")}canMergeWhenEmpty(){return!0}};function Rb(n){if(n.classList.contains("task-list-item")){for(const r of n.children)if(r.tagName==="INPUT")return id(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 id(r.children[0])}const e=n.getAttribute("aria-checked"),t=Zt(e==="true"||e!=="false"&&void 0);return tn(t,n),{after:Pg.bind(null,t),node:$t(t,n)}}function id(n){if(n.getAttribute("type")!=="checkbox")return{node:null};const e=Zt(n.hasAttribute("checked"));return{after:Pg.bind(null,e),node:e}}function Pg(n,e){const t=e[0];return e.length===1&&en(t)&&!n.getFormatType()&&t.getFormatType()?(n.setFormat(t.getFormatType()),t.getChildren()):e}function Zt(n){return tt(new zn(void 0,n))}function le(n){return n instanceof zn}let ar=class extends Ee{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{(function(t){const r=t.getNextSibling();V(r)&&t.getListType()===r.getListType()&&cu(t,r)})(e),Rg(e)},extends:Ee,importDOM:{ol:()=>({conversion:ad,priority:0}),ul:()=>({conversion:ad,priority:0})}})}constructor(e="number",t=1,r){super(r);const o=Pb[e]||e;this.__listType=o,this.__tag=o==="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,o=ae().createElement(r);return this.__start!==1&&o.setAttribute("start",String(this.__start)),o.__lexicalListType=this.__listType,sd(o,e.theme,this),o}updateDOM(e,t,r){return e.__tag!==this.__tag||e.__listType!==this.__listType||(sd(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 q(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 o=r;for(let i=0;i<r.length;i++){const s=r[i];le(s)||(o===r&&(o=[...r]),o[i]=this.createListItemNode().append(!C(s)||V(s)||s.isInline()?s:Fe(s.getTextContent())))}return super.splice(e,t,o)}extractWithChild(e){return le(e)}createListItemNode(){return Zt()}};function sd(n,e,t){const r=[],o=[],i=e.list;if(i!==void 0){const s=i[`${t.__tag}Depth`]||[],a=Ja(t)-1,l=a%s.length,u=s[l],c=i[t.__tag];let d;const f=i.nested,h=i.checklist;if(f!==void 0&&f.list&&(d=f.list),c!==void 0&&r.push(c),h!==void 0&&t.__listType==="check"&&r.push(h),u!==void 0){r.push(...fn(u));for(let g=0;g<s.length;g++)g!==l&&o.push(t.__tag+g)}if(d!==void 0){const g=fn(d);a>1?r.push(...g):o.push(...g)}}o.length>0&&Xt(n,...o),r.length>0&&Ae(n,...r)}function ad(n){let e;if((function(t){return q(t)&&t.nodeName.toLowerCase()==="ol"})(n)){const t=n.start;e=Rt("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(q(r)&&r.hasAttribute("aria-checked"))return!0;return!1})(n)?Rt("check"):Rt("bullet");return $t(e,n),{after:t=>(function(r,o){const i=o.createListItemNode.bind(o),s=[];for(let a=0;a<r.length;a++){const l=r[a];if(le(l)){s.push(l);const u=l.getChildren();u.length>1&&u.forEach(c=>{V(c)&&s.push(i().append(c))})}else s.push(i().append(l))}return s})(t,e),node:e}}const Pb={ol:"number",ul:"bullet"};function Rt(n="number",e=1){return tt(new ar(n,e))}function V(n){return n instanceof ar}function Lb(n){const e=[];for(const t of n)if(le(t)){e.push(t);const r=t.getChildren();if(r.length>1)for(const o of r)V(o)&&e.push(Zt().append(o))}else e.push(Zt().append(t));return e}const Ib={$import:(n,e)=>{let t;var r;return Cg(e,"ol")?t=Rt("number",e.start):t=(r=e).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||r.querySelector(":scope > [aria-checked]")!==null?Rt("check"):Rt("bullet"),$t(t,e),[t.splice(0,0,ou(Lb(n.$importChildren(e)),e))]},match:je.tag("ol","ul"),name:"@lexical/list/list"};function Lg(n,e){if(e.length!==1)return e;const t=e[0];return en(t)&&!n.getFormatType()&&t.getFormatType()?(n.setFormat(t.getFormatType()),t.getChildren()):e}function Ig(n){const e=s=>ru(s)&&!V(s);if(!n.some(e))return n;const t=[];let r=[];const o=()=>{r.length>0&&(t.push(r),r=[])};for(const s of n)e(s)?(o(),t.push(C(s)?s.getChildren():[s])):r.push(s);o();const i=[];for(const s of t)i.length>0&&i.push(Gt()),i.push(...s);return i}const Bb={$import:(n,e)=>{const t=e.getAttribute("aria-checked"),r=Zt(t==="true"||t!=="false"&&void 0);return tn(r,e),$t(r,e),[r.splice(0,0,Ig(Lg(r,n.$importChildren(e))))]},match:je.tag("li"),name:"@lexical/list/li"};function ld(n,e,t){const r=Cg(t,"input")?t:t.querySelector('input[type="checkbox"]');if(!r||r.getAttribute("type")!=="checkbox")return[];const o=Zt(r.hasAttribute("checked"));return tn(o,e),$t(o,e),[o.splice(0,0,Ig(Lg(o,n.$importChildren(e))))]}je.tag("li").classAll("task-list-item"),je.tag("li").classAll("joplin-checkbox");const Kb=W("UPDATE_LIST_START_COMMAND"),Wb=W("INSERT_UNORDERED_LIST_COMMAND"),qb=W("INSERT_ORDERED_LIST_COMMAND"),Ub=W("REMOVE_LIST_COMMAND");function ud(n,e){return Ze(n.registerCommand(qb,()=>(nd("number"),!0),mt),n.registerCommand(Kb,t=>{const{listNodeKey:r,newStart:o}=t,i=te(r);return!!V(i)&&(i.getListType()==="number"&&(i.setStart(o),Rg(i)),!0)},mt),n.registerCommand(Wb,()=>(nd("bullet"),!0),mt),n.registerCommand(Ub,()=>(Ob(),!0),mt),n.registerCommand(Hn,()=>jb(!!(e&&e.restoreNumbering)),mt),n.registerCommand(hs,t=>{const r=z();if(!N(r)||!r.isCollapsed())return!1;const{anchor:o}=r;if(o.offset!==0)return!1;let i=o.getNode();for(;!le(i);){if(i.getPreviousSibling()!==null)return!1;const s=i.getParent();if(s===null)return!1;i=s}return!(!le(i)||!i.collapseAtStart(r))&&(t.preventDefault(),!0)},_y),n.registerNodeTransform(zn,t=>{const r=t.getFirstChild();if(r){if(D(r)){const o=r.getStyle(),i=r.getFormat();t.getTextStyle()!==o&&t.setTextStyle(o),t.getTextFormat()!==i&&t.setTextFormat(i)}}else{const o=z();N(o)&&(o.style!==t.getTextStyle()||o.format!==t.getTextFormat())&&o.isCollapsed()&&t.is(o.anchor.getNode())&&t.setTextStyle(o.style).setTextFormat(o.format)}}),n.registerNodeTransform(gn,t=>{const r=t.getParent();if(le(r)&&t.is(r.getFirstChild())){const o=t.getStyle(),i=t.getFormat();o===r.getTextStyle()&&i===r.getTextFormat()||r.setTextStyle(o).setTextFormat(i)}}))}function Hb(n){const e=t=>{const r=t.getParent();if(V(t.getFirstChild())||!V(r))return;const o=U(t,i=>le(i)&&V(i.getParent())&&le(i.getPreviousSibling()));if(o===null&&t.getIndent()>0)t.setIndent(0);else if(le(o)){const i=o.getPreviousSibling();if(le(i)){const s=(function(l){let u=l,c=u.getFirstChild();for(;V(c);){const d=c.getLastChild();if(!le(d))break;u=d,c=u.getFirstChild()}return u})(i),a=s.getParent();if(V(a)){const l=Ja(a);l+1<Ja(r)&&t.setIndent(l)}}}};return n.registerNodeTransform(ar,t=>{const r=[t];for(;r.length>0;){const o=r.shift();if(V(o)){for(const i of o.getChildren())if(le(i)){e(i);const s=i.getFirstChild();V(s)&&r.push(s)}}}})}function Zi(n,e,t=null){const r=Rh(t),o=t?Mh(t):[],i=t!==null&&o.length>0;if(i&&typeof r.caretPositionFromPoint=="function"){const s=r.caretPositionFromPoint(n,e,{shadowRoots:o});if(s!==null&&(function(a,l){for(let u=a;u!==null;){if(u===l)return!0;u=or(u)}return!1})(s.offsetNode,t))return{node:s.offsetNode,offset:s.offset}}if(i){const s=t.getRootNode();if(Qt(s)){const a=s.elementFromPoint(n,e);if(a!==null&&t.contains(a)){const l=(function(u,c,d,f){const h=f.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=f.createTreeWalker(d,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 E=g(v),A=m(v);(E<_||E===_&&A<b)&&(_=E,b=A,y=w)}}if(y===null)return null;let k=0,S=1/0,x=1/0;for(let w=0;w<=y.length;w++){h.setStart(y,w),h.collapse(!0);const v=h.getBoundingClientRect(),E=g(v),A=Math.abs(u-v.left);(E<S||E===S&&A<x)&&(S=E,x=A,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 xr(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 Ya={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Jb(n){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(n):n}const cd=(n,e)=>{if(!N(e))return e.insertRawText(n),!0;const t=r=>{const o=z();N(o)&&r(o)};return dh(n,{linebreak:()=>t(r=>r.insertParagraph()),tab:()=>t(r=>r.insertNodes([Bo()])),text:r=>t(o=>o.insertText(r))}),!0},Xa={"application/x-lexical-editor":[(n,e,t)=>{try{const r=we(),o=JSON.parse(n);if(o&&o.namespace===r._config.namespace&&Array.isArray(o.nodes))return dd(r,tk(o.nodes),e),!0}catch(r){console.error(r)}return t()}],"text/html":[(n,e,t)=>{try{const r=we(),o=new DOMParser().parseFromString(Jb(n),"text/html");return dd(r,Ng(r,o),e),!0}catch(r){return console.error(r),t()}}],"text/plain":[cd],"text/uri-list":[cd]};function Vb(n,e,t,r){if(!n)return!1;const o=i=>!!n[i]&&n[i](e,t,o.bind(null,i-1),r);return o(n.length-1)}function Bg(n,e,t){const r=e.getData("text/plain");for(const o of(function(i){return Object.keys(i.$importMimeType).filter(s=>i.$importMimeType[s]!==void 0).sort((s,a)=>{const l=i.priority[s],u=i.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 i=e.getData(o);if(i&&(o!=="text/html"||i!==r)&&Vb(n.$importMimeType[o],i,t,e))return!0}return!1}const Yb={$importMimeType:Xa,$insertDataTransfer:(n,e)=>Bg({$importMimeType:Xa,priority:Ya},n,e),priority:Ya},Xb={build:(n,e)=>({$importMimeType:e.$importMimeType,$insertDataTransfer:(t,r)=>Bg(e,t,r),priority:e.priority}),config:{$importMimeType:Xa,priority:Ya},mergeConfig(n,e){const t=Xl(n,e);if(e.$importMimeType){const r={...n.$importMimeType};for(const[o,i]of Object.entries(e.$importMimeType))if(i){const s=r[o];r[o]=s?[...s,...i]:i}t.$importMimeType=r}return e.priority&&(t.priority={...n.priority,...e.priority}),t},name:"@lexical/clipboard/Import"};function Kg(n,e=z()){return e==null&&xr(166),N(e)&&e.isCollapsed()||e.getNodes().length===0?"":su(n,e)}function Wg(n,e=z()){return e==null&&xr(166),N(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(ek(n,e))}function Ga(n,e,t){(function(){const r=$_(Xb.name);return r?r.output:Yb})().$insertDataTransfer(n,e)}const qg="application/x-lexical-drag";function Gb(n,e){const t={editorKey:e.getKey()};n.setData(qg,JSON.stringify(t))}function Qb(n,e,t){const r=n.dataTransfer;if(r===null)return!1;const o=(function(u){const c=u.getData(qg);if(!c)return null;let d;try{d=JSON.parse(c)}catch{return null}return(f=d)!==null&&typeof f=="object"&&"editorKey"in f&&typeof f.editorKey=="string"?d:null;var f})(r);if(o===null)return!1;const i=(function(u,c){const d=Zi(u.clientX,u.clientY,c.getRootElement());if(d===null)return null;const f=Ge(d.node);if(f===null)return null;if(D(f))return Nn(f,"next",d.offset);if(C(f))return Ba(f,d.offset,"next");const h=f.getParent();return h===null?null:Ba(h,f.getIndexWithinParent()+1,"next")})(n,e);if(i===null)return!1;const s=Xh(i);if(s===null)return!1;const a=o.editorKey===e.getKey(),l=z();if(a){if(!N(l)||l.isCollapsed())return!1;if((function(u,c){const{anchor:d,focus:f}=Yl(Ia(c),"next");return Fo(d,u)<0&&Fo(u,f)<0})(i,l))return n.preventDefault(),!0;l.removeText()}if(!s.origin.isAttached())return n.preventDefault(),!0;if(t(r,qr(Uo(s)),e),!a){const u=e.getRootElement(),c=u?u.ownerDocument:null,d=c?(function(f,h){for(const g of jh(h)){const m=Yr(g);if(qo(m)&&m.getKey()===f&&q(g))return g}return null})(o.editorKey,c):null;d!==null&&d.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return n.preventDefault(),!0}function Zb(n,e){return Qb(n,e,Ga)}function dd(n,e,t){n.dispatchCommand(Df,{nodes:e,selection:t})||(t.insertNodes(e),(function(r){if(N(r)&&r.isCollapsed()){const o=r.anchor;let i=null;const s=Qe(o,"previous");if(s)if(Nt(s))i=s.origin;else{const a=jt(s,Re(ge(),"next").getFlipped());for(const l of a){if(D(l.origin)){i=l.origin;break}if(C(l.origin)&&!l.origin.isInline())break}}if(i&&D(i)){const a=i.getFormat(),l=i.getStyle();r.format===a&&r.style===l||(r.format=a,r.style=l,r.dirty=!0)}}})(t))}function Qa(n,e,t,r=[]){let o=e===null||t.isSelected(e);const i=C(t)&&t.excludeFromCopy("html");let s=t;e!==null&&D(s)&&(s=Zh(e,s,"clone"));const a=C(s)?s.getChildren():[],l=(function(c){const d=c.exportJSON(),f=c.constructor;if(d.type!==f.getType()&&xr(58,f.name),C(c)){const h=d.children;Array.isArray(h)||xr(59,f.name)}return d})(s);D(s)&&s.getTextContentSize()===0&&(o=!1);const u=o&&pe(e)&&C(t)?null:e;for(let c=0;c<a.length;c++){const d=a[c],f=Qa(n,u,d,l.children);!o&&C(t)&&f&&t.extractWithChild(d,e,"clone")&&(o=!0)}if(o&&!i){const c=Tt(s);if(c.length>0){const d={};for(const f of c){const h=Xn(s,f);h===null&&xr(366,s.constructor.name,f);const g=[];Qa(n,null,h,g),g.length===1&&g[0].type===h.getType()||xr(385,f,s.constructor.name,String(g.length),String(g.length>0?g[0].type:"none")),d[f]=g[0]}l.$slots=d}}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const d=l.children[c];r.push(d)}return o}function ek(n,e){const t=[],r=ge(),o=N(e)?e.anchor.getNode():pe(e)?e.getNodes()[0]??null:null,i=o!==null?Ss(o):null,s=(C(i)?i:r).getChildren();for(let a=0;a<s.length;a++)Qa(n,e,s[a],t);return{namespace:n._config.namespace,nodes:t}}function tk(n){const e=[];for(const t of n)e.push(fy(t));return e}let cr=null;async function Za(n,e,t){if(cr!==null)return!1;if(e!==null)return new Promise((u,c)=>{n.update(()=>{u(fd(n,e,t))})});const r=n.getRootElement(),o=n._window||window,i=o.document,s=Pe(o);if(r===null||s===null)return!1;const a=i.createElement("span");a.style.position="fixed",a.style.top="-1000px",a.append(i.createTextNode("#")),r.append(a);const l=i.createRange();return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((u,c)=>{const d=n.registerCommand(Io,f=>(Jt(f,ClipboardEvent)&&(d(),cr!==null&&(o.clearTimeout(cr),cr=null),u(fd(n,f,t))),!0),xh);cr=o.setTimeout(()=>{d(),cr=null,u(!1)},50),i.execCommand("copy"),a.remove()})}function fd(n,e,t){if(t===void 0){const o=Pe(n._window),i=z();if(!i||i.isCollapsed()||!o)return!1;const s=ft(o,n.getRootElement()),a=s.anchorNode,l=s.focusNode;if(a!==null&&l!==null&&!Wo(n,a,l))return!1;t=du(i)}e.preventDefault();const r=e.clipboardData;return r!==null&&(Ug(r,t),!0)}const nk=[["text/html",Kg],["application/x-lexical-editor",Wg]];function du(n=z()){return(function(e,t){const r={"text/plain":""};for(const[o,i]of Object.entries(e))if(i){const s=ok(i,t);s!==null&&(r[o]=s)}return r})(rk(),n)}function Ug(n,e){for(const[t]of nk)e[t]===void 0&&n.setData(t,"");for(const t in e){const r=e[t];r!==void 0&&n.setData(t,r)}}function rk(n=we()){const e=Gr(n,ik.name);return e?e.output:Hg}const Hg={"application/x-lexical-editor":[(n,e)=>n?Wg(we(),n):e()],"text/html":[(n,e)=>n?Kg(we(),n):e()],"text/plain":[(n,e)=>n?n.getTextContent():e()]};function ok(n,e){const t=r=>n[r]?n[r](e,t.bind(null,r-1)):null;return t(n.length-1)}const ik={build:(n,e,t)=>e.$exportMimeType,config:{$exportMimeType:Hg},mergeConfig(n,e){const t=Xl(n,e);if(e.$exportMimeType){const r={...n.$exportMimeType};for(const[o,i]of Object.entries(e.$exportMimeType))if(i){const s=r[o];r[o]=s?[...s,...i]:i}t.$exportMimeType=r}return t},name:"@lexical/clipboard/GetClipboardData"},sk={bold:"bold",italic:"italic",strikeThrough:"strikethrough",subscript:"subscript",superscript:"superscript",underline:"underline"},es=Symbol.for("@lexical/dragon/WindowState");function ak(n,e,t){const r=(function(o){let i=o[es];return i===void 0&&(i={dispose:()=>{},editors:new Map,installs:new Set},o[es]=i),i})(n);if(r.installs.size===0){const o=ck.bind(n);n.addEventListener("message",o,!0),r.dispose=()=>{n.removeEventListener("message",o,!0)}}if(r.installs.add(e),t){const o=r.editors.get(t)||new Set;o.add(e),r.editors.set(t,o)}return lk.bind(null,n,r,e,t)}function lk(n,e,t,r){if(r){const o=e.editors.get(r);o&&o.delete(t)&&o.size===0&&e.editors.delete(r)}e.installs.delete(t)&&e.installs.size===0&&(e.dispose(),delete n[es])}function hd(n){return n&&n.ownerDocument.defaultView}function uk(n){const e=x_(()=>hd(n.getRootElement()),t=>n.registerRootListener(r=>{t.value=hd(r)}));return Zl(()=>{const t=e.value;if(t)return ak(t,Symbol("@lexical/dragon/editorInstall"),n)})}function ck(n){if(n.origin!==this.location.origin)return;const e=(function(r){const o=r[es];if(o===void 0)return null;const i=Yr(Br(r.document));return qo(i)&&o.editors.has(i)?i: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 o=r.payload;if(o&&o.functionId==="makeChanges"){const i=o.args;if(Array.isArray(i)){const[s,a,l,u,c,d]=i;if(![s,a,u,c].every(Number.isFinite)||typeof l!="string"&&l!==-1)return;e.update(()=>{const f=z();if(N(f)){const h=f.anchor;let g=h.getNode(),m=0,p=0;if(D(g)&&s>=0&&a>=0&&(m=s,p=s+a,f.setTextNodeRange(g,m,g,p)),typeof l!="string"||m===p&&l===""||(f.insertRawText(l),g=h.getNode()),D(g)){const y=g.getTextContentSize();m=Math.min(Math.max(u,0),y),p=u<0||c<0?m:Math.min(u+c,y),f.setTextNodeRange(g,m,g,p)}if(typeof d=="string"&&c>0&&!f.isCollapsed()){const y=sk[d];y!==void 0&&f.formatText(y)}n.stopImmediatePropagation()}})}}}}}const dk={$import:(n,e)=>{const t=Ur(e.nodeName.toLowerCase());return ir(e,t),tn(t,e),$t(t,e),[t.splice(0,0,n.$importChildren(e))]},match:je.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},fk={$import:(n,e)=>{const t=Zr();return tn(t,e),ir(e,t),$t(t,e),[t.splice(0,0,n.$importChildren(e))]},match:je.tag("blockquote"),name:"@lexical/rich-text/blockquote"};je.tag("blockquote");je.tag("p"),je.tag("span");const gd=W("DRAG_DROP_PASTE_FILE"),oa=Po("shadowRoot",{parse:Boolean});class As extends Ee{$config(){return this.config("quote",{extends:Ee,importDOM:{blockquote:()=>({conversion:hk,priority:0})},stateConfigs:[{flat:!0,stateConfig:oa}]})}isShadowRoot(){return Lo(this,oa)}setIsShadowRoot(e){return Cr(this,oa,e)}createDOM(e){const t=ae().createElement("blockquote");return Ae(t,e.theme.quote),t}updateDOM(e,t,r){return!1}exportDOM(e){const{element:t}=super.exportDOM(e);if(q(t)){this.isEmpty()&&t.append(ae().createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const o=this.getDirection();o&&(t.dir=o)}return{element:t}}exportJSON(){return super.exportJSON()}static importJSON(e){return Zr().updateFromJSON(e)}insertNewAfter(e,t){const r=Y(),o=this.getDirection();return r.setDirection(o),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 Zr(n){const e=tt(new As);return n&&n.shadowRoot?e.setIsShadowRoot(!0):e}function ts(n){return n instanceof As}let Fs=class extends Ee{__tag;$config(){return this.config("heading",{extends:Ee,importDOM:{h1:()=>({conversion:dr,priority:0}),h2:()=>({conversion:dr,priority:0}),h3:()=>({conversion:dr,priority:0}),h4:()=>({conversion:dr,priority:0}),h5:()=>({conversion:dr,priority:0}),h6:()=>({conversion:dr,priority:0}),p:e=>{const t=e.firstChild;return t!==null&&pd(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>pd(e)?{conversion:()=>({node:Ur("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=ae().createElement(t),o=e.theme.heading;if(o!==void 0){const i=o[t];Ae(r,i)}return r}updateDOM(e,t,r){return e.__tag!==this.__tag}exportDOM(e){const{element:t}=super.exportDOM(e);if(q(t)){this.isEmpty()&&t.append(ae().createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const o=this.getDirection();o&&(t.dir=o)}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,o=this.getLastDescendant(),i=!o||e&&e.anchor.key===o.getKey()&&r===o.getTextContentSize()||!e?Y():Ur(this.getTag()),s=this.getDirection();if(i.setDirection(s),this.insertAfter(i,t),r===0&&!this.isEmpty()&&e){const a=Y();a.select(),this.replace(a,!0)}return i}collapseAtStart(){if(this.isEmpty()){const e=Y();this.getChildren().forEach(t=>e.append(t)),this.replace(e)}return!0}extractWithChild(){return!0}};function pd(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function dr(n){const e=n.nodeName.toLowerCase();let t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Ur(e),ir(n,t),tn(t,n),$t(t,n)),{node:t}}function hk(n){const e=Zr();return tn(e,n),ir(n,e),$t(e,n),{node:e}}function Ur(n="h1"){return tt(new Fs(n))}function Jg(n){return n instanceof Fs}function md(n){const e=Ge(n);return ne(e)}function fr(n,e,t,r){let o=!1,i=null;if(n.isCollapsed()&&n.anchor.type==="text"){const a=n.anchor.getNode();if(D(a)){i=a;const l=n.anchor.offset,u=l===a.getTextContentSize()&&a.getNextSibling()===null,c=l===0&&a.getPreviousSibling()===null;o=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(!(o&&i&&D(i)&&i.hasFormat(u)))continue;s=!0}n.hasFormat(u)&&n.toggleFormat(u)}s&&n.setStyle("")}const gk={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function ai(n,e){return(function(t,r){if(!t.isCollapsed())return!1;const o=Qe(t.focus,r),i=U(o.origin,_o);if(!i)return!1;const s=t.focus.getNode();if(!i.is(s)&&!Ir(s,i))return!1;const a=jt(o,ue(i,r));if(a.getTextSlices().some(d=>d&&d.getTextContentSize()>0))return!1;const l=jt(a.anchor.getSiblingCaret(),a.focus);let u=l.anchor.origin;for(const d of l){if(!It(d)||!d.origin.is(u.getParent()))return!1;u=d.origin}let c=i;for(const d of Wr(ue(i,r))){if(!d.origin.is(c.getParent())){if(xi(d.origin)){const f=ue(c,r);return qr(jt(f,f)),!0}break}if(!_o(d.origin))break;c=d.origin}return!1})(n,e)||(function(t,r){if(!t.isCollapsed()||t.anchor.type!=="element")return!1;const o=Qe(t.anchor,r).getNodeAtCaret();return!(!_o(o)||o.isInline()||(qr(Uo(Ve(Re(o,r)))),0))})(n,e)}function yd(n){return ne(n)&&!n.isInline()&&!n.isIsolated()&&n.isKeyboardSelectable()}function li(n){const e=Eo();e.add(n),_e(e)}function _d(n,e){if(!n.isCollapsed())return!1;const t=n.focus,r=t.getNode(),o=e?"previous":"next",i=Qe(t,o);if(t.type==="element"&&C(r)&&Se(r)){const y=i.getNodeAtCaret();return!(y===null||!yd(y))&&(li(y.__key),!0)}const s=U(C(r)?r:r.getParentOrThrow(),y=>C(y)&&!y.isInline()&&Se(y.getParent()));if(s===null)return!1;const a=ue(s,o).getNodeAtCaret();if(a===null||!yd(a))return!1;if(s.getTextContentSize()===0)return li(a.__key),!0;const l=we().getRootElement();if(l===null)return!1;const u=Pe(l.ownerDocument.defaultView);if(u===null||u.rangeCount===0)return!1;const c=u.anchorNode,d=u.anchorOffset,f=u.focusNode,h=u.focusOffset;u.modify("move",e?"backward":"forward","line");const g=u.anchorNode,m=u.anchorOffset;if(g===null)return bd(u,c,d,f,h),!1;const p=Ge(g);return bd(u,c,d,f,h),p===null?!1:(g===c&&m===d||!p.is(s)&&!Ir(p,s))&&(li(a.__key),!0)}function bd(n,e,t,r,o){e!==null&&r!==null&&n.setBaseAndExtent(e,t,r,o)}function kd(n,e){if(!n.isCollapsed())return!1;const t=n.focus.getNode(),r=U(C(t)?t:t.getParentOrThrow(),p=>C(p)&&!p.isInline());if(r===null)return!1;const o=we(),i=o.getRootElement();if(i===null)return!1;const s=i.ownerDocument.defaultView;if(s===null)return!1;let a=!1;for(const p of r.getChildren())if(C(p)&&p.isInline()){const y=o.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=ue(r,e?"previous":"next").getNodeAtCaret();if(l===null||!C(l)){if(e){const p=r.getFirstDescendant();D(p)?p.select(0,0):r.select(0,0)}else{const p=r.getLastDescendant();if(D(p)){const y=p.getTextContentSize();p.select(y,y)}else{const y=r.getChildrenSize();r.select(y,y)}}return!0}const u=o.getElementByKey(l.getKey());if(u===null)return!1;const c=Pe(s);if(c===null||c.rangeCount===0)return!1;const d=c.getRangeAt(0).cloneRange();d.collapse(!0);const f=d.getBoundingClientRect(),h=u.getBoundingClientRect(),g=h.top+h.height/2;if(f.height>0){const p=Zi(f.left,g,i);if(p!==null&&u.contains(p.node)){const y=i.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(D(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 ui(n,e){const t=ue(n,e),r=t.getAdjacentCaret();r!==null&&C(r.origin)&&!r.origin.isInline()&&r.origin.isShadowRoot()?qr(Uo(t)):e==="next"?n.selectNext(0,0):n.selectPrevious()}function xd(n,e,t){t.preventDefault(),t.stopPropagation();const r=n.getNodes();if(r.length===0)return!0;const o=r.map(l=>ue(l,"next")).sort(Fo),i=(e?o[0]:o[o.length-1]).origin,s=U(i,l=>l!==i&&C(l)&&!l.isInline())??ge(),a=e?0:s.getChildrenSize();return s.select(a,a),!0}function pk(n,e=Ho(gk)){return Ze(n.registerCommand(us,()=>{const t=z();return pe(t)?(t.clear(),!0):(N(t)&&fr(t,"click","both",e.peek()),!1)},G),n.registerCommand(vn,t=>{const r=z();return N(r)?(r.deleteCharacter(t),!0):!!pe(r)&&(r.deleteNodes(),!0)},G),n.registerCommand(zr,t=>{const r=z();return!!N(r)&&(r.deleteWord(t),!0)},G),n.registerCommand(Or,t=>{const r=z();return!!N(r)&&(r.deleteLine(t),!0)},G),n.registerCommand(Kn,t=>{const r=z();if(typeof t=="string")r!==null&&r.insertText(t);else{if(r===null)return!1;const o=t.dataTransfer;if(o!=null)Ga(o,r);else if(N(r)){const i=t.data;return i&&r.insertText(i),!0}}return!0},G),n.registerCommand(mi,()=>{const t=z();return!!N(t)&&(t.removeText(),!0)},G),n.registerCommand(Ot,t=>{const r=z();return!(!N(r)&&!pe(r))&&(rh(r,t),!0)},G),n.registerCommand(zm,t=>{const r=z();return!(!N(r)&&!pe(r))&&(sy(r,t),!0)},G),n.registerCommand(Pf,t=>{const r=z();if(!N(r)&&!pe(r))return!1;const o=r.getNodes();for(const i of o){const s=U(i,a=>C(a)&&!a.isInline());s!==null&&s.setFormat(t)}return!0},G),n.registerCommand(vr,t=>{const r=z();return!!N(r)&&(r.insertLineBreak(t),!0)},G),n.registerCommand(Hn,()=>{const t=z();return!!N(t)&&(t.insertParagraph(),!0)},G),n.registerCommand(Om,()=>{const t=Bo(),r=z();return N(r)&&(t.setFormat(r.format),t.setStyle(r.style)),ys([t]),!0},G),n.registerCommand(Mm,()=>Rc(t=>{const r=t.getIndent();t.setIndent(r+1)}),G),n.registerCommand(Wu,()=>Rc(t=>{const r=t.getIndent();r>0&&t.setIndent(Math.max(0,r-1))}),G),n.registerCommand(Cl,t=>{const r=z();if(pe(r)){const o=r.getNodes();if(o.length>0)return t.preventDefault(),ui(o[0],"previous"),!0}else if(N(r)&&((function(o){const i=o.focus;return i.key==="root"&&i.offset===0})(r)||!t.shiftKey&&ai(r,"previous")||!t.shiftKey&&_d(r,!0)||!t.shiftKey&&kd(r,!0)))return t.preventDefault(),!0;return!1},G),n.registerCommand(vl,t=>{const r=z();if(pe(r)){const o=r.getNodes();if(o.length>0)return t.preventDefault(),ui(o[0],"next"),!0}else if(N(r)&&((function(o){const i=o.focus;return i.key==="root"&&i.offset===ge().getChildrenSize()})(r)||!t.shiftKey&&ai(r,"next")||!t.shiftKey&&_d(r,!1)||!t.shiftKey&&kd(r,!1)))return t.preventDefault(),!0;return!1},G),n.registerCommand(xl,t=>{const r=z();if(pe(r)){const o=r.getNodes();if(o.length>0)return t.preventDefault(),ui(o[0],ti(o[0])?"next":"previous"),!0}if(!N(r))return!1;if(!t.shiftKey&&ai(r,ti(r.anchor.getNode())?"next":"previous"))return t.preventDefault(),!0;if(t.shiftKey||fr(r,"arrow","start",e.peek()),Mc(r,!0)){const o=t.shiftKey;return t.preventDefault(),jc(r,o,!0),!0}return!1},G),n.registerCommand(kl,t=>{const r=z();if(pe(r)){const o=r.getNodes();if(o.length>0)return t.preventDefault(),ui(o[0],ti(o[0])?"previous":"next"),!0}if(!N(r))return!1;if(!t.shiftKey&&ai(r,ti(r.anchor.getNode())?"previous":"next"))return t.preventDefault(),!0;if(t.shiftKey||fr(r,"arrow","end",e.peek()),Mc(r,!1)){const o=t.shiftKey;return t.preventDefault(),jc(r,o,!1),!0}return!1},G),n.registerCommand(hs,t=>{const r=z();if(!pe(r)&&md(t.target))return!1;if(N(r)){if((function(o){if(!o.isCollapsed())return!1;const{anchor:i}=o;if(i.offset!==0)return!1;const s=i.getNode();if(Oe(s))return!1;const a=h_(s);return a.getIndent()>0&&(a.is(s)||s.is(a.getFirstDescendant()))})(r))return t.preventDefault(),n.dispatchCommand(Wu);if(En&&Fr)return!1}else if(!pe(r))return!1;return t.preventDefault(),n.dispatchCommand(vn,!0)},G),n.registerCommand(wl,t=>{const r=z();return!(!pe(r)&&md(t.target))&&!(!N(r)&&!pe(r))&&(t.preventDefault(),n.dispatchCommand(vn,!1))},G),n.registerCommand($i,t=>{let r=z();if(pe(r)){const o=r.getNodes();o.length===1&&ne(o[0])&&!o[0].isInline()&&(r=o[0].selectNext())}if(!N(r))return!1;if(fr(r,"enter","both",e.peek()),t!==null){if((En||jo||Ro)&&Fr)return!1;if(t.preventDefault(),t.shiftKey)return n.dispatchCommand(vr,!1)}return n.dispatchCommand(Hn)},G),n.registerCommand(Sl,()=>{const t=z();return!!N(t)&&(n.blur(),!0)},G),n.registerCommand(Rf,t=>{const[,r]=ni(t);if(r.length>0){const o=t.clientX,i=t.clientY,s=Zi(o,i,n.getRootElement());if(s!==null){const{offset:a,node:l}=s,u=Ge(l);if(u!==null){const c=Dl();if(D(u))c.anchor.set(u.getKey(),a,"text"),c.focus.set(u.getKey(),a,"text");else{const f=u.getParentOrThrow().getKey(),h=u.getIndexWithinParent()+1;c.anchor.set(f,h,"element"),c.focus.set(f,h,"element")}const d=Kt(c);_e(d)}n.dispatchCommand(gd,r)}return t.preventDefault(),!0}return Zb(t,n)},G),n.registerCommand(Lf,t=>{const[r]=ni(t),o=z();return!(r&&!N(o))&&(N(o)&&!o.isCollapsed()&&t.dataTransfer!==null&&(Ug(t.dataTransfer,du(o)),Gb(t.dataTransfer,n)),!0)},G),n.registerCommand(If,t=>{const[r]=ni(t),o=z();if(r&&!N(o))return!1;const i=t.clientX,s=t.clientY,a=Zi(i,s,n.getRootElement());if(a!==null){const l=Ge(a.node);ne(l)&&t.preventDefault()}return!0},G),n.registerCommand(Tl,()=>{const t=z();return wy(N(t)&&Ss(t.anchor.getNode())!==null?t:null),!0},G),n.registerCommand(Io,t=>(Za(n,Jt(t,ClipboardEvent)?t:null),!0),G),n.registerCommand(gs,t=>((async function(r,o){await Za(o,Jt(r,ClipboardEvent)?r:null),o.update(()=>{const i=z();N(i)?i.removeText():pe(i)&&i.getNodes().forEach(s=>s.remove())},{tag:Gf})})(t,n),!0),G),n.registerCommand(Vr,t=>{const[,r,o]=ni(t);return r.length>0&&!o?(n.dispatchCommand(gd,r),!0):Lt(t.target)&&jl(t.target)?!1:z()!==null&&((function(i,s){i.preventDefault(),s.update(()=>{const a=z(),l=Jt(i,InputEvent)||Jt(i,KeyboardEvent)?null:i.clipboardData;l!=null&&a!==null&&Ga(l,a)},{tag:Xf})})(t,n),!0)},G),n.registerCommand(jf,()=>{const t=z();return N(t)&&fr(t,"space","both",e.peek()),!1},G),n.registerCommand(El,()=>{const t=z();return N(t)&&fr(t,"tab","both",e.peek()),!1},G),n.registerCommand(Of,t=>{const r=z();if(pe(r))return xd(r,!1,t);if(!N(r))return!1;const{anchor:o}=r;if(o.type!=="element"||o.offset!==0)return!1;const i=o.getNode();if(!C(i))return!1;const s=i.getFirstChild();if(!ne(s)||!s.isInline())return!1;const a=i.getKey(),l=i.selectEnd();return t.shiftKey&&l.anchor.set(a,0,"element"),t.preventDefault(),t.stopPropagation(),!0},G),n.registerCommand(Mf,t=>{const r=z();if(pe(r))return xd(r,!0,t);if(!N(r))return!1;const{anchor:o,focus:i}=r,s=U(i.getNode(),u=>C(u)&&!u.isInline());if(s===null)return!1;const a=s.getFirstChild();if(!ne(a)||!a.isInline()||U(o.getNode(),u=>C(u)&&!u.isInline())!==s)return!1;const l=s.getKey();return(i.type!=="element"||i.key!==l||i.offset!==0)&&(r.focus.set(l,0,"element"),t.shiftKey||r.anchor.set(l,0,"element"),t.preventDefault(),t.stopPropagation(),!0)},G))}function mk(n,e){const t={};for(const r of n){const o=e(r);o&&(t[o]?t[o].push(r):t[o]=[r])}return t}function Vg(n){const e=mk(n,t=>t.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const Cd=/\s/,el=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,yk=/^\s{0,3}$/;function tl(n){if(!en(n))return!1;const e=n.getFirstChild();return e==null||n.getChildrenSize()===1&&D(e)&&yk.test(e.getTextContent())}function nl(n){return n.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(Number(t)))}const Yg=/^(\s*)(\d{1,})\.\s/,Xg=/^(\s*)[-*+]\s/,_k=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,rl=/^(#{1,6})\s/,Gg=/^>\s/,Qg=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,ol=/^[ \t]*`{3,}$/,bk=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,kk=/^(?:\|)(.+)(?:\|)\s?$/;function Zg(n){if(n[0]!=="|")return!1;const{length:e}=n;let t=1,r=0;for(;t<e;){let o=t;for(n[o]===" "&&o++,n[o]===":"&&o++;n[o]==="-";)o++;if(n[o]===":"&&o++,n[o]===" "&&o++,n[o]!=="|")break;r++,t=o+1}return r>0&&(t===e||t===e-1&&/\s/.test(n[t]))}const vd=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,Sd=/^<\/[a-z_][\w-]*\s*>/i,wd=n=>new RegExp(`(?:${n.source})$`,n.flags),co=Po("mdListMarker",{parse:n=>typeof n=="string"&&/^[-*+]$/.test(n)?n:"-",resetOnCopyNode:!0}),Ed=Po("mdCodeFence",{parse:n=>typeof n=="string"&&/^`{3,}$/.test(n)?n:"```",resetOnCopyNode:!0}),ep=Po("mdHardLineBreak",{parse:n=>typeof n=="string"&&/^(\\| {2,})$/.test(n)?n:"",resetOnCopyNode:!0});function il(n){if(n.endsWith("\\"))return[n.slice(0,-1),"\\"];const e=n.match(/^(.*?\S)( {2,})$/);return e?[e[1],e[2]]:null}function xk(n){const e=n.getChildren(),t=e.length-1,r=e[t];if(!D(r))return null;const o=r.getTextContent(),i=il(o);if(i!==null){const[s,a]=i;return r.setTextContent(s),a}return/^ {2,}$/.test(o)&&(function(s,a){for(let l=a-1;l>=0;l--){if(We(s[l]))return!1;if(/\S/.test(s[l].getTextContent()))return!0}return!1})(e,t)?(r.setTextContent(""),o):null}function tp(n){const e=Gt(),t=xk(n);return t!==null&&Cr(e,ep,t),e}const np=n=>(e,t,r,o)=>{const i=n(r);i.append(...t),e.replace(i),o||i.select(0,0)},rp=n=>(e,t,r,o)=>{if(Jg(e))return!1;const i=e.getPreviousSibling(),s=e.getNextSibling(),a=Zt(n==="check"?r[3]==="x":void 0),l=r[0].trim()[0],u=n!=="bullet"&&n!=="check"||l!==co.parse(l)?void 0:l;if(V(s)&&s.getListType()===n){u&&Cr(s,co,u);const d=s.getFirstChild();d!==null?d.insertBefore(a):s.append(a),n==="number"&&s.setStart(Number(r[2])),e.remove()}else if(V(i)&&i.getListType()===n)u&&Cr(i,co,u),i.append(a),e.remove();else{const d=Rt(n,n==="number"?Number(r[2]):void 0);u&&Cr(d,co,u),d.append(a),e.replace(d)}a.append(...t),o||a.select(0,0);const c=(function(d){const f=d.match(/\t/g),h=d.match(/ /g);let g=0;return f&&(g+=f.length),h&&(g+=Math.floor(h.length/4)),g})(r[1]);c&&a.setIndent(c)},fu=(n,e,t,r)=>{const o=[],i=n.getChildren();let s=0;for(const a of i)if(le(a)){if(a.getChildrenSize()===1){const h=a.getFirstChild();if(V(h)){const g=fu(h,e,t+1,r);g&&o.push(g);continue}}if(r&&!a.getChildren().some(h=>h.isSelected(r)))continue;const l=" ".repeat(4*t),u=n.getListType(),c=Lo(n,co),d=u==="number"?`${n.getStart()+s}. `:u==="check"?`${c} [${a.getChecked()?"x":" "}] `:c+" ";let f=e(a);u!=="number"&&(f=f.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),o.push(l+d+f),s++}return o.join(`
|
|
13
13
|
`)},Ck={dependencies:[Fs],export:(n,e)=>{if(!Jg(n))return null;const t=Number(n.getTag().slice(1));return"#".repeat(t)+" "+e(n)},regExp:rl,replace:np(n=>{const e="h"+n[1].length;return Ur(e)}),triggerOnEnter:!0,type:"element"},vk={dependencies:[As],export:(n,e)=>{if(!ts(n))return null;const t=e(n).split(`
|
|
14
14
|
`),r=[];for(const o of t)r.push("> "+o);return r.join(`
|
|
15
|
-
`)},regExp:Gg,replace:(n,e,t,r)=>{if(r){const i=n.getPreviousSibling();if(ts(i))return i.splice(i.getChildrenSize(),0,[tp(i),...e]),void n.remove()}const o=
|
|
15
|
+
`)},regExp:Gg,replace:(n,e,t,r)=>{if(r){const i=n.getPreviousSibling();if(ts(i))return i.splice(i.getChildrenSize(),0,[tp(i),...e]),void n.remove()}const o=Zr();o.append(...e),n.replace(o),r||o.select(0,0)},triggerOnEnter:!0,type:"element"},wi={dependencies:[$s],export:n=>{if(!au(n))return null;const e=n.getTextContent();let t=Lo(n,Ed);if(e.indexOf(t)>-1){const r=e.match(/`{3,}/g);if(r){const o=Math.max(...r.map(i=>i.length));t="`".repeat(o+1)}}return t+(n.getLanguage()||"")+(e?`
|
|
16
16
|
`+e:"")+`
|
|
17
|
-
`+t},handleImportAfterStartMatch:({lines:n,rootNode:e,startLineIndex:t,startMatch:r})=>{const o=r[1],i=o.trim().length,s=n[t],a=r.index+o.length,l=s.slice(a),u=new RegExp(`\`{${i},}$`);if(u.test(l)){const h=l.match(u),g=l.slice(0,l.lastIndexOf(h[0])),m=[...r];return m[2]="",wi.replace(e,null,m,h,[g],!0),[!0,t]}const c=new RegExp(`^[ \\t]*\`{${i},}$`);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),wi.replace(e,null,r,m,p,!0),[!0,h]}}const d=n.slice(t+1),f=s.slice(r[0].length);return f.length>0&&d.unshift(f),wi.replace(e,null,r,null,d,!0),[!0,n.length-1]},regExpEnd:{optional:!0,regExp:ol},regExpStart:
|
|
17
|
+
`+t},handleImportAfterStartMatch:({lines:n,rootNode:e,startLineIndex:t,startMatch:r})=>{const o=r[1],i=o.trim().length,s=n[t],a=r.index+o.length,l=s.slice(a),u=new RegExp(`\`{${i},}$`);if(u.test(l)){const h=l.match(u),g=l.slice(0,l.lastIndexOf(h[0])),m=[...r];return m[2]="",wi.replace(e,null,m,h,[g],!0),[!0,t]}const c=new RegExp(`^[ \\t]*\`{${i},}$`);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),wi.replace(e,null,r,m,p,!0),[!0,h]}}const d=n.slice(t+1),f=s.slice(r[0].length);return f.length>0&&d.unshift(f),wi.replace(e,null,r,null,d,!0),[!0,n.length-1]},regExpEnd:{optional:!0,regExp:ol},regExpStart:Qg,replace:(n,e,t,r,o,i)=>{let s,a;const l=t[1]?t[1].trim():"```",u=t[2]||void 0;if(!e&&o){if(o.length===1)r?(s=ut(u),a=o[0]):(s=ut(u),a=o[0].startsWith(" ")?o[0].slice(1):o[0]);else{for(s=ut(u),o.length>0&&(o[0].trim().length===0?o.shift():o[0].startsWith(" ")&&(o[0]=o[0].slice(1)));o.length>0&&!o[o.length-1].length;)o.pop();a=o.join(`
|
|
18
18
|
`)}Cr(s,Ed,l);const c=Fe(a);s.append(c),n.append(s)}else e&&np(c=>ut(c?c[2]:void 0))(n,e,t,i)},type:"multiline-element"},Sk={dependencies:[ar,zn],export:(n,e,t)=>V(n)?fu(n,e,0,t):null,regExp:Xg,replace:rp("bullet"),triggerOnEnter:!0,type:"element"},wk={dependencies:[ar,zn],export:(n,e,t)=>V(n)?fu(n,e,0,t):null,regExp:Yg,replace:rp("number"),triggerOnEnter:!0,type:"element"},Ek={format:["code"],tag:"`",type:"text-format"},Tk={format:["highlight"],tag:"==",type:"text-format"},Nk={format:["bold","italic"],tag:"***",type:"text-format"},Dk={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},$k={format:["bold"],tag:"**",type:"text-format"},Ak={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Fk={format:["strikethrough"],tag:"~~",type:"text-format"},zk={format:["italic"],tag:"*",type:"text-format"},Ok={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Mk={dependencies:[Dn],export:(n,e,t)=>{if(!at(n)||_r(n))return null;const r=e(n);let o=n.getTitle();return o!=null&&(o=o.replace(/([\\"])/g,"\\$1")),o?`[${r}](${n.getURL()} "${o}")`:`[${r}](${n.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(n,e)=>{if(U(n,at))return;const[,t,r,o]=e,i=r!=null?nl(r):void 0,s=o!=null?nl(o):void 0,a=Mo(i,{title:s}),l=t.split("[").length-1,u=t.split("]").length-1;let c=t,d="";if(l<u)return;if(l>u){const h=t.split("[");d="["+h[0],c=h.slice(1).join("[")}const f=Fe(c);return f.setFormat(n.getFormat()),a.append(f),n.replace(a),d&&a.insertBefore(Fe(d)),f},trigger:")",type:"text-match"},jk=[Ck,vk,Sk,wk],Rk=[wi],Pk=[Ek,Nk,Dk,$k,Ak,Tk,zk,Ok,Fk],Lk=[Mk],hu=[...jk,...Rk,...Pk,...Lk];function Ik(n,e=!1){const t=n.split(`
|
|
19
|
-
`);let r=0;const o=[];for(let i=0;i<t.length;i++){const s=t[i],a=s.trimEnd(),l=o[o.length-1],u=i<t.length-1?il(s):null,c=l!==void 0&&il(l)!==null;if(bk.test(a))o.push(a);else if(r===0){{const d=a.match(
|
|
19
|
+
`);let r=0;const o=[];for(let i=0;i<t.length;i++){const s=t[i],a=s.trimEnd(),l=o[o.length-1],u=i<t.length-1?il(s):null,c=l!==void 0&&il(l)!==null;if(bk.test(a))o.push(a);else if(r===0){{const d=a.match(Qg);if(d){r=d[1].trim().length,o.push(a);continue}}a===""||l===""||!l||rl.test(l)||rl.test(a)||Gg.test(a)||Yg.test(a)||Xg.test(a)||_k.test(a)||kk.test(a)||Zg(a)||c||!e||vd.test(a)||Sd.test(a)||wd(Sd).test(l)||wd(vd).test(l)||ol.test(l)?o.push(!e&&a!==""||u!==null?s:a):o[o.length-1]=l+" "+(u===null?a:s).trimStart()}else{if(ol.test(a)&&a.trim().length>=r){r=0,o.push(a);continue}o.push(s)}}return o.join(`
|
|
20
20
|
`)}function Bk(n,e,t,r,o){for(const i of e){if(!i.export)continue;const s=i.export(n,a=>ns(a,t,r,void 0,void 0,o));if(s!=null)return s}return C(n)?ns(n,t,r,void 0,void 0,o):ne(n)?n.getTextContent():null}function ns(n,e,t,r,o,i=!1){const s=[],a=n.getChildren();r||(r=[]),o||(o=[]);e:for(const l of a){for(const u of t){if(!u.export)continue;const c=u.export(l,d=>ns(d,e,t,r,[...o,...r],i),(d,f)=>Td(d,f,e,r,o,i));if(c!=null){s.push(c);continue e}}We(l)?s.push(Kk(l)):D(l)?s.push(Td(l,l.getTextContent(),e,r,o,i)):C(l)?s.push(ns(l,e,t,r,o,i)):ne(l)&&s.push(l.getTextContent())}return s.join("")}function Kk(n){return Lo(n,ep)+`
|
|
21
21
|
`}function Td(n,e,t,r,o,i=!1){const s=n.hasFormat("code");let a,l,u,c,d=e;if(s||(d=i?d.replace(/([*_`~])/g,"\\$1"):d.replace(/([*_`~\\])/g,"\\$1")),s){const{fence:_,padded:b}=(function(k){const S=k.match(/`+/g),x=S?Math.max(...S.map(w=>w.length)):0;return{fence:"`".repeat(x+1),padded:k.length===0||k.includes("`")||/^\s/.test(k)&&/\s$/.test(k)?` ${k} `:k}})(e);a="",u="",l=_+b+_,c=!1}else{const _=d.match(/^(\s*)(.*?)(\s*)$/s)||["","",d,""];a=_[1],l=_[2],u=_[3],c=l===""}let f="",h="",g="";const m=Nd(n,!0),p=Nd(n,!1),y=new Set;for(const _ of t){const b=_.format[0],k=_.tag;b!=="code"&&Dd(n,b)&&!y.has(b)&&(y.add(b),Dd(m,b)&&r.find(S=>S.tag===k)||(r.push({format:b,tag:k}),f+=k))}for(let _=0;_<r.length;_++){const b=sl(n,r[_].format),k=sl(p,r[_].format);if(b&&k)continue;const S=[...r];for(;S.length>_;){const x=S.pop();o&&x&&o.find(w=>w.tag===x.tag)||(x&&typeof x.tag=="string"&&(b?k||(g+=x.tag):h+=x.tag),r.pop())}break}return c&&!n.hasFormat("code")?h+d:h+a+f+l+g+u}function Nd(n,e){const t=e?n.getPreviousSibling():n.getNextSibling();return D(t)?t:null}function sl(n,e){return D(n)&&n.hasFormat(e)}function Dd(n,e){return!!sl(n,e)&&(e==="code"||!n||!/^\s*$/.test(n.getTextContent()))}function Wk(n,e){const t=n.getTextContent(),r=e.transformersByTag["`"],o=[];let i=null;if(r){const d=(function(f){const h=_=>{let b=0;for(let k=_-1;k>=0&&f[k]==="\\";k--)b++;return b%2==1},g=[];let m=0;for(;m<f.length;)if(f[m]==="`"){let _=1;for(;m+_<f.length&&f[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 x=y+1;x<g.length;x++)if(g[x].length===_.length){b=x;break}if(b===-1){y++;continue}const k=g[b];let S=f.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 f of d)i||(i={content:f.content,endIndex:f.endIndex,startIndex:f.startIndex,tag:"`"}),o.push({end:f.endIndex,start:f.startIndex})}const s=(function(d,f,h=[]){const g=[],m=new Set(Object.keys(f.transformersByTag).filter(b=>b[0]!=="`").map(b=>b[0])),p=b=>{let k=0;for(let S=b-1;S>=0&&d[S]==="\\";S--)k++;return k%2==1},y=b=>h.some(k=>b>=k.start&&b<k.end);let _=0;for(;_<d.length;){const b=d[_];if(!m.has(b)||p(_)||y(_)){_++;continue}let k=1;for(;_+k<d.length&&d[_+k]===b;)k++;const S=$d(b,d,_,k,!0),x=$d(b,d,_,k,!1);(S||x)&&g.push({active:!0,canClose:x,canOpen:S,char:b,index:_,length:k}),_+=k}return g})(t,e,o),a=s.length>0?(function(d,f,h){const g={};let m=0,p=null;for(;m<f.length;){const y=f[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 x=f[S];if(!x.active||!x.canOpen||x.length===0||x.char!==y.char||(x.canClose||y.canOpen)&&(x.length+y.length)%3==0&&x.length%3!=0&&y.length%3!=0)continue;const w=Math.min(x.length,y.length),v=Object.keys(h.transformersByTag).filter(T=>T[0]===x.char&&T.length<=w).sort((T,M)=>M.length-T.length)[0];if(!v)continue;k=!0;const E=v.length,A={content:d.slice(x.index+x.length,y.index),endIndex:y.index+E,startIndex:x.index+(x.length-E),tag:v};(!p||A.startIndex<p.startIndex||A.startIndex===p.startIndex&&A.endIndex>p.endIndex)&&(p=A);for(let T=S+1;T<m;T++)f[T].active=!1;x.length-=E,y.length-=E,x.active=x.length>0,y.length>0?y.index+=E:(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(i&&a?a.startIndex<=i.startIndex&&a.endIndex>=i.endIndex?(l=a,u=e.transformersByTag[a.tag]):(l=i,u=r):i?(l=i,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 $d(n,e,t,r,o){if(!Ad(e,t,r,o))return!1;if(n==="*")return!0;if(n==="_"){if(!Ad(e,t,r,!o))return!0;const i=o?e[t-1]:e[t+r];return i!==void 0&&el.test(i)}return!0}function Ad(n,e,t,r){const o=n[e-1],i=n[e+t],[s,a]=r?[i,o]:[o,i];return s!==void 0&&!Cd.test(s)&&(!el.test(s)||a===void 0||Cd.test(a)||el.test(a))}function hr(n){return D(n)&&!n.hasFormat("code")}function Rn(n,e,t){let r=Wk(n,e),o=(function(s,a){const l=s;let u,c,d,f;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,d=h,f=g)}return u===void 0||c===void 0||d===void 0||f===void 0?null:{endIndex:c,match:f,startIndex:u,transformer:d}})(n,t);if(r&&o&&(r.isCodeSpan?o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex?r=null:o=null:r.startIndex<=o.startIndex&&r.endIndex>=o.endIndex||o.startIndex>r.endIndex?o=null:r=null),r){const s=(function(a,l,u,c,d){const f=a.getTextContent();let h,g,m;if(d[0]===f?h=a:l===0?[h,g]=a.splitText(u):[m,h,g]=a.splitText(l,u),h.setTextContent(d[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);hr(s.nodeAfter)&&Rn(s.nodeAfter,e,t),hr(s.nodeBefore)&&Rn(s.nodeBefore,e,t),hr(s.transformedNode)&&Rn(s.transformedNode,e,t)}else if(o){const s=(function(a,l,u,c,d){let f,h,g;return l===0?[f,h]=a.splitText(u):[g,f,h]=a.splitText(l,u),c.replace?{nodeAfter:h,nodeBefore:g,transformedNode:c.replace(f,d)||void 0}:null})(n,o.startIndex,o.endIndex,o.transformer,o.match);if(!s)return;hr(s.nodeAfter)&&Rn(s.nodeAfter,e,t),hr(s.nodeBefore)&&Rn(s.nodeBefore,e,t),hr(s.transformedNode)&&Rn(s.transformedNode,e,t)}const i=nl(n.getTextContent());n.setTextContent(i)}function qk(n,e,t,r=!1){const o=Vg(t),i=(function(u){const c={},d={},f=[];for(const h of u){const{tag:g}=h;c[g]=h;const m=g.replace(/(\*|\^|\+)/g,"\\$1");f.push(m),g.length===1?d[g]=g==="`"?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${m}])(${m})((\\\\${m})?.*?[^${m}\\s](\\\\${m})?)(${m})(?![\\\\${m}])`):d[g]=new RegExp(`(^|[^\\\\])(${m})((\\\\${m})?.*?[^\\s](\\\\${m})?)(${m})(?!\\\\)`)}return{fullMatchRegExpByTag:d,openTagsRegExp:new RegExp(`(${f.join("|")})`,"g"),transformersByTag:c}})(o.textFormat),s=n.split(`
|
|
22
22
|
`),a=s.length;for(let u=0;u<a;u++){const c=s[u],[d,f]=Uk(s,u,o.multilineElement,e);d?u=f:Hk(c,e,o.element,i,o.textMatch,r)}const l=e.getChildren();for(const u of l)if(!r&&tl(u)&&e.getChildrenSize()>1)u.remove();else if(C(u))for(const c of u.getAllTextNodes())Jk(c)}function Uk(n,e,t,r){for(const o of t){const{handleImportAfterStartMatch:i,regExpEnd:s,regExpStart:a,replace:l}=o,u=n[e].match(a);if(!u)continue;if(i){const g=i({lines:n,rootNode:r,startLineIndex:e,startMatch:u,transformer:o});if(g===null)continue;if(g)return g}const c=typeof s=="object"&&"regExp"in s?s.regExp:s,d=s&&typeof s=="object"&&"optional"in s?s.optional:!s;let f=e;const h=n.length;for(;f<h;){const g=c?n[f].match(c):null;if(!g&&(!d||d&&f<h-1)){f++;continue}if(g&&e===f&&g.index===u.index){f++;continue}const m=[];if(g&&e===f)m.push(n[e].slice(u[0].length,-g[0].length));else for(let p=e;p<=f;p++)if(p===e){const y=n[p].slice(u[0].length);m.push(y)}else if(p===f&&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,f];break}}return[!1,e]}function Hk(n,e,t,r,o,i){const s=Fe(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(Rn(s,r,o),a.getParent()!==null&&n.length>0){const l=a.getPreviousSibling();if(!i&&(en(l)||ts(l)||V(l))){let u=l;if(V(l)){const c=l.getLastDescendant();u=c==null?null:U(c,le)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[tp(u),...a.getChildren()]),a.remove())}}}function Jk(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(o=>{o.getTextContent()===" "&&o.replace(Bo())})}function op(n,e=hu,t,r=!1,o=!1){const i=r?n:Ik(n,o),s=t||ge();s.clear(),qk(i,s,e,r),z()!==null&&s.selectStart()}function gu(n=hu,e,t=!1){return(function(o,i=!1){const s=Vg(o),a=[...s.multilineElement,...s.element],l=!i,u=s.textFormat.filter(c=>c.format.length===1).sort((c,d)=>Number(c.format.includes("code"))-Number(d.format.includes("code")));return c=>{const d=[],f=(c||ge()).getChildren();for(let h=0;h<f.length;h++){const g=f[h],m=Bk(g,a,u,s.textMatch,i);m!=null&&d.push(l&&h>0&&!tl(g)&&!tl(f[h-1])?`
|
|
23
23
|
`.concat(m):m)}return d.join(`
|
|
24
|
-
`)}})(n,t)(e)}const Dr=/^(\d+(?:\.\d+)?)px$/,ce={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class On extends Ee{__colSpan;__rowSpan;__headerState;__width;__backgroundColor;__verticalAlign;$config(){return this.config("tablecell",{extends:Ee,importDOM:{td:()=>({conversion:Fd,priority:0}),th:()=>({conversion:Fd,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=ce.NO_STATUS,t=1,r,o){super(o),this.__colSpan=t,this.__rowSpan=1,this.__headerState=e,this.__width=r,this.__backgroundColor=null,this.__verticalAlign=void 0}createDOM(e){const t=ae().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),al(this.__verticalAlign)&&(t.style.verticalAlign=this.__verticalAlign),Ae(t,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),t}exportDOM(e){const t=super.exportDOM(e);if(q(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(),...al(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=ce.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!==ce.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 al(n){return n==="middle"||n==="bottom"}function Fd(n){const e=n,t=n.nodeName.toLowerCase();let r;Dr.test(e.style.width)&&(r=parseFloat(e.style.width));let o=ce.NO_STATUS;if(t==="th"){const m=e.getAttribute("scope");if(m==="col")o=ce.COLUMN;else if(m==="row")o=ce.ROW;else{const p=e.parentElement,y=q(p)&&p.nodeName.toLowerCase()==="tr"&&q(p.parentElement)&&(p.parentElement.nodeName.toLowerCase()==="thead"||p.rowIndex===0),_=e.cellIndex===0;y&&(o|=ce.ROW),_&&(o|=ce.COLUMN),o===ce.NO_STATUS&&(o=ce.ROW)}}const i=_t(o,e.colSpan,r);i.__rowSpan=e.rowSpan;const s=e.style.backgroundColor;s!==""&&(i.__backgroundColor=s);const a=e.style.verticalAlign;al(a)&&(i.__verticalAlign=a);const l=e.style,u=(l&&l.textDecoration||"").split(" "),c=l.fontWeight==="700"||l.fontWeight==="bold",d=u.includes("line-through"),f=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();We(b)&&y.getChildrenSize()===1&&b.remove()}};for(const b of m)if(Wl(b)||D(b)||We(b)){if(D(b)&&(c&&b.toggleFormat("bold"),d&&b.toggleFormat("strikethrough"),f&&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:i}}function _t(n=ce.NO_STATUS,e=1,t){return tt(new On(n,e,t))}function J(n){return n instanceof On}const Vk=W("INSERT_TABLE_COMMAND");function H(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 Jo extends Ee{__height;$config(){return this.config("tablerow",{extends:Ee,importDOM:{tr:()=>({conversion:Yk,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=ae().createElement("tr");return this.__height&&(t.style.height=`${this.__height}px`),Ae(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 Yk(n){const e=n;let t;return Dr.test(e.style.height)&&(t=parseFloat(e.style.height)),{after:r=>Yi(r,J),node:tr(t)}}function tr(n){return tt(new Jo(n))}function Ce(n){return n instanceof Jo}function Xk(n,e,t=!0){const r=Vo();for(let o=0;o<n;o++){const i=tr();for(let s=0;s<e;s++){let a=ce.NO_STATUS;typeof t=="object"?(o===0&&t.rows&&(a|=ce.ROW),s===0&&t.columns&&(a|=ce.COLUMN)):t&&(o===0&&(a|=ce.ROW),s===0&&(a|=ce.COLUMN));const l=_t(a),u=Y();u.append(Fe()),l.append(u),i.append(l)}r.append(i)}return r}function Gk(n){const e=U(n,t=>ye(t));if(ye(e))return e;throw new Error("Expected table cell to be inside of table.")}const ll=(n,e)=>n===ce.BOTH||n===e?e:ce.NO_STATUS;function Zk(n,e=!0){const[,,t]=Vt(n),[r,o]=Bt(t,n,n),i=r[0].length,{startRow:s}=o;let a=null;if(e){const l=s+n.__rowSpan-1,u=r[l],c=tr();for(let f=0;f<i;f++){const{cell:h,startRow:g}=u[f];if(g+h.__rowSpan-1<=l){const m=u[f].cell.__headerState,p=ll(m,ce.COLUMN);c.append(_t(p).append(Y()))}else h.setRowSpan(h.__rowSpan+1)}const d=t.getChildAtIndex(l);Ce(d)||H(256),d.insertAfter(c),a=c}else{const l=s,u=r[l],c=tr();for(let f=0;f<i;f++){const{cell:h,startRow:g}=u[f];if(g===l){const m=u[f].cell.__headerState,p=ll(m,ce.COLUMN);c.append(_t(p).append(Y()))}else h.setRowSpan(h.__rowSpan+1)}const d=t.getChildAtIndex(l);Ce(d)||H(257),d.insertBefore(c),a=c}return a}function Qk(n,e=!0,t=!0){const[,,r]=Vt(n),[o,i]=Bt(r,n,n),s=o.length,{startColumn:a}=i,l=e?a+n.__colSpan-1:a-1,u=r.getFirstChild();Ce(u)||H(120);let c=null;function d(g=ce.NO_STATUS){const m=_t(g).append(Y());return c===null&&(c=m),m}let f=u;e:for(let g=0;g<s;g++){if(g!==0){const S=f.getNextSibling();Ce(S)||H(121),f=S}const m=o[g],p=m[l<0?0:l].cell.__headerState,y=ll(p,ce.ROW);if(l<0){ip(f,d(y));continue}const{cell:_,startColumn:b,startRow:k}=m[l];if(b+_.__colSpan-1<=l){let S=_,x=k,w=l;for(;x!==g&&S.__rowSpan>1;){if(w-=_.__colSpan,!(w>=0)){f.append(d(y));continue e}{const{cell:v,startRow:E}=m[w];S=v,x=E}}S.insertAfter(d(y))}else _.setColSpan(_.__colSpan+1)}c!==null&&t&&e0(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 e0(n){const e=n.getFirstDescendant();e==null?n.selectStart():e.getParentOrThrow().selectStart()}function ip(n,e){const t=n.getFirstChild();t!==null?t.insertBefore(e):n.append(e)}function t0(n){if(n.length===0)return null;const e=Gk(n[0]),[t]=cn(e,null,null);let r=1/0,o=-1/0,i=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),o=Math.max(o,p+_-1),i=Math.min(i,y),s=Math.max(s,y+b-1)}}if(r===1/0||i===1/0)return null;const l=o-r+1,u=s-i+1,c=t[r][i];if(!c.cell)return null;const d=c.cell;d.setColSpan(u),d.setRowSpan(l);const f=new Set([d.getKey()]);for(let h=r;h<=o;h++)for(let g=i;g<=s;g++){const m=t[h][g];if(!m.cell)continue;const p=m.cell,y=p.getKey();f.has(y)||(f.add(y),n0(p)||d.append(...p.getChildren()),p.remove())}return d.getChildrenSize()===0&&d.append(Y()),d}function n0(n){if(n.getChildrenSize()!==1)return!1;const e=n.getFirstChildOrThrow();return!(!en(e)||!e.isEmpty())}function r0(n){const[e,t,r]=Vt(n),o=e.__colSpan,i=e.__rowSpan;if(o===1&&i===1)return;const[s,a]=Bt(r,e,e),{startColumn:l,startRow:u}=a,c=e.__headerState&ce.COLUMN,d=Array.from({length:o},(g,m)=>{let p=c;for(let y=0;p!==0&&y<s.length;y++)p&=s[y][m+l].cell.__headerState;return p}),f=e.__headerState&ce.ROW,h=Array.from({length:i},(g,m)=>{let p=f;for(let y=0;p!==0&&y<s[0].length;y++)p&=s[m+u][y].cell.__headerState;return p});if(o>1){for(let g=1;g<o;g++)e.insertAfter(_t(d[g]|h[0]).append(Y()));e.setColSpan(1)}if(i>1){let g;for(let m=1;m<i;m++){const p=u+m,y=s[p];g=(g||t).getNextSibling(),Ce(g)||H(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=o-1;b>=0;b--)ip(g,_t(d[b]|h[m]).append(Y()));else for(let b=o-1;b>=0;b--)_.insertAfter(_t(d[b]|h[m]).append(Y()))}e.setRowSpan(1)}}function Bt(n,e,t){const[r,o,i]=cn(n,e,t);return o===null&&H(207),i===null&&H(208),[r,o,i]}function cn(n,e,t){const r=[];let o=null,i=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];Ce(u)||H(209);const c=s(l);for(let d=u.getFirstChild(),f=0;d!=null;d=d.getNextSibling()){for(J(d)||H(147);c[f]!==void 0;)f++;const h={cell:d,startColumn:f,startRow:l},{__rowSpan:g,__colSpan:m}=d;for(let p=0;p<g&&!(l+p>=a.length);p++){const y=s(l+p);for(let _=0;_<m;_++)y[f+_]=h}e!==null&&o===null&&e.is(d)&&(o=h),t!==null&&i===null&&t.is(d)&&(i=h)}}return[r,o,i]}function Vt(n){let e;if(n instanceof On)e=n;else if("__type"in n){const o=U(n,J);J(o)||H(148),e=o}else{const o=U(n.getNode(),J);J(o)||H(148),e=o}const t=e.getParent();Ce(t)||H(149);const r=t.getParent();return ye(r)||H(210),[e,t,r]}function rs(n,e,t){let r,o=Math.min(e.startColumn,t.startColumn),i=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 d=c.startColumn+c.cell.__colSpan-1,f=c.startRow+c.cell.__rowSpan-1,h=c.startColumn<=s&&d>=o,g=c.startRow<=a&&f>=i;if(h&&g){const m=Math.min(o,c.startColumn),p=Math.max(s,d),y=Math.min(i,c.startRow),_=Math.max(a,f);m===o&&p===s&&y===i&&_===a||(o=m,s=p,i=y,a=_,r=!0)}}}while(r);return{maxColumn:s,maxRow:a,minColumn:o,minRow:i}}function zd(n){const[e,,t]=Vt(n),r=t.getChildren().filter(Ce),o=r.length,i=r[0].getChildren().length,s=new Array(o);for(let a=0;a<o;a++)s[a]=new Array(i);for(let a=0;a<o;a++){const l=r[a].getChildren().filter(J);let u=0;for(let c=0;c<l.length;c++){for(;s[a][u];)u++;const d=l[c],f=d.__rowSpan||1,h=d.__colSpan||1;for(let g=0;g<f;g++)for(let m=0;m<h;m++)s[a+g][u+m]=d;if(e===d)return{colSpan:h,columnIndex:u,rowIndex:a,rowSpan:f};u+=h}}return null}function sp(n,e){const t=e.getStartEndPoints(),r=ke(e);if(t===null)return!1;const[o,i]=t,[s,a,l]=Vt(o),u=U(i.getNode(),T=>J(T));if(!(J(s)&&J(u)&&Ce(a)&&ye(l)))return!1;const[c,d,f]=Bt(l,s,u),[h]=cn(n,null,null),g=c.length,m=g>0?c[0].length:0;let p=d.startRow,y=d.startColumn,_=h.length,b=_>0?h[0].length:0;if(r){const T=rs(c,d,f),M=T.maxRow-T.minRow+1,j=T.maxColumn-T.minColumn+1;p=T.minRow,y=T.minColumn,_=Math.min(_,M),b=Math.min(b,j)}let k=!1;const S=Math.min(g,p+_)-1,x=Math.min(m,y+b)-1,w=new Set;for(let T=p;T<=S;T++)for(let M=y;M<=x;M++){const j=c[T][M];w.has(j.cell.getKey())||j.cell.__rowSpan===1&&j.cell.__colSpan===1||(r0(j.cell),w.add(j.cell.getKey()),k=!0)}let[v]=cn(l.getWritable(),null,null);const E=_-g+p;for(let T=0;T<E;T++)Zk(v[g-1][0].cell);const A=b-m+y;for(let T=0;T<A;T++)Qk(v[0][m-1].cell,!0,!1);[v]=cn(l.getWritable(),null,null);for(let T=p;T<p+_;T++)for(let M=y;M<y+b;M++){const j=T-p,R=M-y,B=h[j][R];if(B.startRow!==j||B.startColumn!==R)continue;const Z=B.cell;if(Z.__rowSpan!==1||Z.__colSpan!==1){const P=[],K=Math.min(T+Z.__rowSpan,p+_)-1,se=Math.min(M+Z.__colSpan,y+b)-1;for(let ee=T;ee<=K;ee++)for(let xe=M;xe<=se;xe++){const ot=v[ee][xe];P.push(ot.cell)}t0(P),k=!0}const{cell:ie}=v[T][M],Q=Z.getBackgroundColor();Q!=null&&ie.setBackgroundColor(Q);const L=ie.getChildren();Z.getChildren().forEach(P=>{D(P)&&Y().append(P),ie.append(P)}),L.forEach(P=>P.remove())}if(r&&k){const[T]=cn(l.getWritable(),null,null);T[d.startRow][d.startColumn].cell.selectEnd()}return!0}function ia(n){const[[e,t,r,o],[i,s,a,l]]=["anchor","focus"].map(u=>{const c=n[u].getNode(),d=U(c,J);J(d)||H(238,u,c.getKey(),c.getType());const f=d.getParent();Ce(f)||H(239,u);const h=f.getParent();return ye(h)||H(240,u),[c,d,f,h]});return o.is(l)||H(241),{anchorCell:t,anchorNode:e,anchorRow:r,anchorTable:o,focusCell:s,focusNode:i,focusRow:a,focusTable:l}}class zs{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=te(this.tableKey),t=te(this.anchor.key),r=te(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 ke(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 zs(this.tableKey,dt(this.anchor.key,this.anchor.offset,this.anchor.type),dt(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(`
|
|
24
|
+
`)}})(n,t)(e)}const Dr=/^(\d+(?:\.\d+)?)px$/,ce={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class On extends Ee{__colSpan;__rowSpan;__headerState;__width;__backgroundColor;__verticalAlign;$config(){return this.config("tablecell",{extends:Ee,importDOM:{td:()=>({conversion:Fd,priority:0}),th:()=>({conversion:Fd,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=ce.NO_STATUS,t=1,r,o){super(o),this.__colSpan=t,this.__rowSpan=1,this.__headerState=e,this.__width=r,this.__backgroundColor=null,this.__verticalAlign=void 0}createDOM(e){const t=ae().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),al(this.__verticalAlign)&&(t.style.verticalAlign=this.__verticalAlign),Ae(t,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),t}exportDOM(e){const t=super.exportDOM(e);if(q(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(),...al(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=ce.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!==ce.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 al(n){return n==="middle"||n==="bottom"}function Fd(n){const e=n,t=n.nodeName.toLowerCase();let r;Dr.test(e.style.width)&&(r=parseFloat(e.style.width));let o=ce.NO_STATUS;if(t==="th"){const m=e.getAttribute("scope");if(m==="col")o=ce.COLUMN;else if(m==="row")o=ce.ROW;else{const p=e.parentElement,y=q(p)&&p.nodeName.toLowerCase()==="tr"&&q(p.parentElement)&&(p.parentElement.nodeName.toLowerCase()==="thead"||p.rowIndex===0),_=e.cellIndex===0;y&&(o|=ce.ROW),_&&(o|=ce.COLUMN),o===ce.NO_STATUS&&(o=ce.ROW)}}const i=_t(o,e.colSpan,r);i.__rowSpan=e.rowSpan;const s=e.style.backgroundColor;s!==""&&(i.__backgroundColor=s);const a=e.style.verticalAlign;al(a)&&(i.__verticalAlign=a);const l=e.style,u=(l&&l.textDecoration||"").split(" "),c=l.fontWeight==="700"||l.fontWeight==="bold",d=u.includes("line-through"),f=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();We(b)&&y.getChildrenSize()===1&&b.remove()}};for(const b of m)if(Wl(b)||D(b)||We(b)){if(D(b)&&(c&&b.toggleFormat("bold"),d&&b.toggleFormat("strikethrough"),f&&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:i}}function _t(n=ce.NO_STATUS,e=1,t){return tt(new On(n,e,t))}function J(n){return n instanceof On}const Vk=W("INSERT_TABLE_COMMAND");function H(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 Jo extends Ee{__height;$config(){return this.config("tablerow",{extends:Ee,importDOM:{tr:()=>({conversion:Yk,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=ae().createElement("tr");return this.__height&&(t.style.height=`${this.__height}px`),Ae(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 Yk(n){const e=n;let t;return Dr.test(e.style.height)&&(t=parseFloat(e.style.height)),{after:r=>Yi(r,J),node:tr(t)}}function tr(n){return tt(new Jo(n))}function Ce(n){return n instanceof Jo}function Xk(n,e,t=!0){const r=Vo();for(let o=0;o<n;o++){const i=tr();for(let s=0;s<e;s++){let a=ce.NO_STATUS;typeof t=="object"?(o===0&&t.rows&&(a|=ce.ROW),s===0&&t.columns&&(a|=ce.COLUMN)):t&&(o===0&&(a|=ce.ROW),s===0&&(a|=ce.COLUMN));const l=_t(a),u=Y();u.append(Fe()),l.append(u),i.append(l)}r.append(i)}return r}function Gk(n){const e=U(n,t=>ye(t));if(ye(e))return e;throw new Error("Expected table cell to be inside of table.")}const ll=(n,e)=>n===ce.BOTH||n===e?e:ce.NO_STATUS;function Qk(n,e=!0){const[,,t]=Vt(n),[r,o]=Bt(t,n,n),i=r[0].length,{startRow:s}=o;let a=null;if(e){const l=s+n.__rowSpan-1,u=r[l],c=tr();for(let f=0;f<i;f++){const{cell:h,startRow:g}=u[f];if(g+h.__rowSpan-1<=l){const m=u[f].cell.__headerState,p=ll(m,ce.COLUMN);c.append(_t(p).append(Y()))}else h.setRowSpan(h.__rowSpan+1)}const d=t.getChildAtIndex(l);Ce(d)||H(256),d.insertAfter(c),a=c}else{const l=s,u=r[l],c=tr();for(let f=0;f<i;f++){const{cell:h,startRow:g}=u[f];if(g===l){const m=u[f].cell.__headerState,p=ll(m,ce.COLUMN);c.append(_t(p).append(Y()))}else h.setRowSpan(h.__rowSpan+1)}const d=t.getChildAtIndex(l);Ce(d)||H(257),d.insertBefore(c),a=c}return a}function Zk(n,e=!0,t=!0){const[,,r]=Vt(n),[o,i]=Bt(r,n,n),s=o.length,{startColumn:a}=i,l=e?a+n.__colSpan-1:a-1,u=r.getFirstChild();Ce(u)||H(120);let c=null;function d(g=ce.NO_STATUS){const m=_t(g).append(Y());return c===null&&(c=m),m}let f=u;e:for(let g=0;g<s;g++){if(g!==0){const S=f.getNextSibling();Ce(S)||H(121),f=S}const m=o[g],p=m[l<0?0:l].cell.__headerState,y=ll(p,ce.ROW);if(l<0){ip(f,d(y));continue}const{cell:_,startColumn:b,startRow:k}=m[l];if(b+_.__colSpan-1<=l){let S=_,x=k,w=l;for(;x!==g&&S.__rowSpan>1;){if(w-=_.__colSpan,!(w>=0)){f.append(d(y));continue e}{const{cell:v,startRow:E}=m[w];S=v,x=E}}S.insertAfter(d(y))}else _.setColSpan(_.__colSpan+1)}c!==null&&t&&e0(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 e0(n){const e=n.getFirstDescendant();e==null?n.selectStart():e.getParentOrThrow().selectStart()}function ip(n,e){const t=n.getFirstChild();t!==null?t.insertBefore(e):n.append(e)}function t0(n){if(n.length===0)return null;const e=Gk(n[0]),[t]=cn(e,null,null);let r=1/0,o=-1/0,i=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),o=Math.max(o,p+_-1),i=Math.min(i,y),s=Math.max(s,y+b-1)}}if(r===1/0||i===1/0)return null;const l=o-r+1,u=s-i+1,c=t[r][i];if(!c.cell)return null;const d=c.cell;d.setColSpan(u),d.setRowSpan(l);const f=new Set([d.getKey()]);for(let h=r;h<=o;h++)for(let g=i;g<=s;g++){const m=t[h][g];if(!m.cell)continue;const p=m.cell,y=p.getKey();f.has(y)||(f.add(y),n0(p)||d.append(...p.getChildren()),p.remove())}return d.getChildrenSize()===0&&d.append(Y()),d}function n0(n){if(n.getChildrenSize()!==1)return!1;const e=n.getFirstChildOrThrow();return!(!en(e)||!e.isEmpty())}function r0(n){const[e,t,r]=Vt(n),o=e.__colSpan,i=e.__rowSpan;if(o===1&&i===1)return;const[s,a]=Bt(r,e,e),{startColumn:l,startRow:u}=a,c=e.__headerState&ce.COLUMN,d=Array.from({length:o},(g,m)=>{let p=c;for(let y=0;p!==0&&y<s.length;y++)p&=s[y][m+l].cell.__headerState;return p}),f=e.__headerState&ce.ROW,h=Array.from({length:i},(g,m)=>{let p=f;for(let y=0;p!==0&&y<s[0].length;y++)p&=s[m+u][y].cell.__headerState;return p});if(o>1){for(let g=1;g<o;g++)e.insertAfter(_t(d[g]|h[0]).append(Y()));e.setColSpan(1)}if(i>1){let g;for(let m=1;m<i;m++){const p=u+m,y=s[p];g=(g||t).getNextSibling(),Ce(g)||H(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=o-1;b>=0;b--)ip(g,_t(d[b]|h[m]).append(Y()));else for(let b=o-1;b>=0;b--)_.insertAfter(_t(d[b]|h[m]).append(Y()))}e.setRowSpan(1)}}function Bt(n,e,t){const[r,o,i]=cn(n,e,t);return o===null&&H(207),i===null&&H(208),[r,o,i]}function cn(n,e,t){const r=[];let o=null,i=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];Ce(u)||H(209);const c=s(l);for(let d=u.getFirstChild(),f=0;d!=null;d=d.getNextSibling()){for(J(d)||H(147);c[f]!==void 0;)f++;const h={cell:d,startColumn:f,startRow:l},{__rowSpan:g,__colSpan:m}=d;for(let p=0;p<g&&!(l+p>=a.length);p++){const y=s(l+p);for(let _=0;_<m;_++)y[f+_]=h}e!==null&&o===null&&e.is(d)&&(o=h),t!==null&&i===null&&t.is(d)&&(i=h)}}return[r,o,i]}function Vt(n){let e;if(n instanceof On)e=n;else if("__type"in n){const o=U(n,J);J(o)||H(148),e=o}else{const o=U(n.getNode(),J);J(o)||H(148),e=o}const t=e.getParent();Ce(t)||H(149);const r=t.getParent();return ye(r)||H(210),[e,t,r]}function rs(n,e,t){let r,o=Math.min(e.startColumn,t.startColumn),i=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 d=c.startColumn+c.cell.__colSpan-1,f=c.startRow+c.cell.__rowSpan-1,h=c.startColumn<=s&&d>=o,g=c.startRow<=a&&f>=i;if(h&&g){const m=Math.min(o,c.startColumn),p=Math.max(s,d),y=Math.min(i,c.startRow),_=Math.max(a,f);m===o&&p===s&&y===i&&_===a||(o=m,s=p,i=y,a=_,r=!0)}}}while(r);return{maxColumn:s,maxRow:a,minColumn:o,minRow:i}}function zd(n){const[e,,t]=Vt(n),r=t.getChildren().filter(Ce),o=r.length,i=r[0].getChildren().length,s=new Array(o);for(let a=0;a<o;a++)s[a]=new Array(i);for(let a=0;a<o;a++){const l=r[a].getChildren().filter(J);let u=0;for(let c=0;c<l.length;c++){for(;s[a][u];)u++;const d=l[c],f=d.__rowSpan||1,h=d.__colSpan||1;for(let g=0;g<f;g++)for(let m=0;m<h;m++)s[a+g][u+m]=d;if(e===d)return{colSpan:h,columnIndex:u,rowIndex:a,rowSpan:f};u+=h}}return null}function sp(n,e){const t=e.getStartEndPoints(),r=ke(e);if(t===null)return!1;const[o,i]=t,[s,a,l]=Vt(o),u=U(i.getNode(),T=>J(T));if(!(J(s)&&J(u)&&Ce(a)&&ye(l)))return!1;const[c,d,f]=Bt(l,s,u),[h]=cn(n,null,null),g=c.length,m=g>0?c[0].length:0;let p=d.startRow,y=d.startColumn,_=h.length,b=_>0?h[0].length:0;if(r){const T=rs(c,d,f),M=T.maxRow-T.minRow+1,j=T.maxColumn-T.minColumn+1;p=T.minRow,y=T.minColumn,_=Math.min(_,M),b=Math.min(b,j)}let k=!1;const S=Math.min(g,p+_)-1,x=Math.min(m,y+b)-1,w=new Set;for(let T=p;T<=S;T++)for(let M=y;M<=x;M++){const j=c[T][M];w.has(j.cell.getKey())||j.cell.__rowSpan===1&&j.cell.__colSpan===1||(r0(j.cell),w.add(j.cell.getKey()),k=!0)}let[v]=cn(l.getWritable(),null,null);const E=_-g+p;for(let T=0;T<E;T++)Qk(v[g-1][0].cell);const A=b-m+y;for(let T=0;T<A;T++)Zk(v[0][m-1].cell,!0,!1);[v]=cn(l.getWritable(),null,null);for(let T=p;T<p+_;T++)for(let M=y;M<y+b;M++){const j=T-p,R=M-y,B=h[j][R];if(B.startRow!==j||B.startColumn!==R)continue;const Q=B.cell;if(Q.__rowSpan!==1||Q.__colSpan!==1){const P=[],K=Math.min(T+Q.__rowSpan,p+_)-1,se=Math.min(M+Q.__colSpan,y+b)-1;for(let ee=T;ee<=K;ee++)for(let xe=M;xe<=se;xe++){const ot=v[ee][xe];P.push(ot.cell)}t0(P),k=!0}const{cell:ie}=v[T][M],Z=Q.getBackgroundColor();Z!=null&&ie.setBackgroundColor(Z);const L=ie.getChildren();Q.getChildren().forEach(P=>{D(P)&&Y().append(P),ie.append(P)}),L.forEach(P=>P.remove())}if(r&&k){const[T]=cn(l.getWritable(),null,null);T[d.startRow][d.startColumn].cell.selectEnd()}return!0}function ia(n){const[[e,t,r,o],[i,s,a,l]]=["anchor","focus"].map(u=>{const c=n[u].getNode(),d=U(c,J);J(d)||H(238,u,c.getKey(),c.getType());const f=d.getParent();Ce(f)||H(239,u);const h=f.getParent();return ye(h)||H(240,u),[c,d,f,h]});return o.is(l)||H(241),{anchorCell:t,anchorNode:e,anchorRow:r,anchorTable:o,focusCell:s,focusNode:i,focusRow:a,focusTable:l}}class zs{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=te(this.tableKey),t=te(this.anchor.key),r=te(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 ke(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 zs(this.tableKey,dt(this.anchor.key,this.anchor.offset,this.anchor.type),dt(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
25
|
`)?e.slice(0,-1):e).split(`
|
|
26
26
|
`).map(i=>i.split(" ")),r=Vo();for(const i of t){const s=tr();for(const a of i){const l=_t(ce.NO_STATUS),u=Y();a&&u.append(Fe(a)),l.append(u),s.append(l)}r.append(s)}const{anchorCell:o}=ia(this);sp(r,o.select(0,o.getChildrenSize()))}insertText(){}hasFormat(e){let t=0;this.getNodes().filter(J).forEach(o=>{const i=o.getFirstChild();en(i)&&(t|=i.getTextFormat())});const r=hn[e];return(t&r)!==0}insertNodes(e){const t=this.focus.getNode();C(t)||H(151),Kt(t.select(0,t.getChildrenSize())).insertNodes(e)}getShape(){const{anchorCell:e,focusCell:t}=ia(this),r=zd(e);r===null&&H(153);const o=zd(t);o===null&&H(155);const i=Math.min(r.columnIndex,o.columnIndex),s=Math.max(r.columnIndex+r.colSpan-1,o.columnIndex+o.colSpan-1),a=Math.min(r.rowIndex,o.rowIndex),l=Math.max(r.rowIndex+r.rowSpan-1,o.rowIndex+o.rowSpan-1);return{fromX:Math.min(i,s),fromY:Math.min(a,l),toX:Math.max(i,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:o}=ia(this),i=o.getParents()[1];if(i!==t){if(t.isParentOf(o)){const p=i.getParent();p==null&&H(159),this.set(this.tableKey,o.getKey(),p.getKey())}else{const p=t.getParent();p==null&&H(158),this.set(this.tableKey,p.getKey(),o.getKey())}return this.getNodes()}const[s,a,l]=Bt(t,r,o),{minColumn:u,maxColumn:c,minRow:d,maxRow:f}=rs(s,a,l),h=new Map([[t.getKey(),t]]);let g=null;for(let p=d;p<=f;p++)for(let y=u;y<=c;y++){const{cell:_}=s[p][y],b=_.getParent();Ce(b)||H(160),b!==g&&(h.set(b.getKey(),b),g=b),h.has(_.getKey())||o0(_,k=>{h.set(k.getKey(),k)})}const m=Array.from(h.values());return Tn()||(this._cachedNodes=m),m}getTextContent(){const e=this.getNodes().filter(r=>J(r));let t="";for(let r=0;r<e.length;r++){const o=e[r],i=o.__parent,s=(e[r+1]||{}).__parent;t+=o.getTextContent()+(s!==i?`
|
|
27
|
-
`:" ")}return t}}function ke(n){return n instanceof zs}function ul(n,e,t){n.getKey(),e.getKey(),t.getKey();const r=z(),o=ke(r)?r.clone():new zs("root",dt("root",0,"element"),dt("root",0,"element"));return o.set(n.getKey(),e.getKey(),t.getKey()),o}function o0(n,e){const t=[[n]];for(let r=t.at(-1);r!==void 0&&t.length>0;r=t.at(-1)){const o=r.pop();o===void 0?t.pop():e(o)!==!1&&C(o)&&t.push(o.getChildren())}}function ap(n,e=we()){const t=te(n);ye(t)||H(231,n);const r=mn(t,e.getElementByKey(n));return r===null&&H(232,n),{tableElement:r,tableNode:t}}class i0{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 o=te(t);ye(o)?e.push([o,r]):this.removeObserver(t)}return e}}class s0{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 ap(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:o,tableElement:i}=this.$lookup();this.table=Ar(o,i)})});this.editor.read("latest",()=>{const{tableNode:t,tableElement:r}=this.$lookup();this.table=Ar(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:o}=this.$lookup();ci(t,Ar(r,o),null),e&&z()!==null&&(_e(null),t.dispatchCommand(qt))}$enableHighlightStyle(){const e=this.editor,{tableElement:t}=this.$lookup();Xt(t,e._config.theme.tableSelection),t.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}$disableHighlightStyle(){const{tableElement:e}=this.$lookup();Ae(e,this.editor._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}$updateTableTableSelection(e){if(e!==null){e.tableKey!==this.tableNodeKey&&H(233,e.tableKey,this.tableNodeKey);const t=this.editor;this.tableSelection=e,this.isHighlightingCells=!0,this.$disableHighlightStyle(),this.updateDOMSelection(),ci(t,this.table,this.tableSelection)}else this.$clearHighlight()}updateDOMSelection(){if(this.anchorCell!==null&&this.focusCell!==null){const e=Pe(this.editor._window);e&&e.rangeCount>0&&e.removeAllRanges()}}$setFocusCellForSelection(e,t=!1){const r=this.editor,{tableNode:o}=this.$lookup(),i=e.x,s=e.y;if(this.focusCell=e,!this.isHighlightingCells&&(t||this.anchorX!==i||this.anchorY!==s||this.tableSelection!=null&&this.anchorCellNodeKey!=null)&&(this.isHighlightingCells=!0,this.$disableHighlightStyle()),this.focusX!==-1&&this.focusY!==-1&&i===this.focusX&&s===this.focusY)return!1;if(this.focusX=i,this.focusY=s,this.isHighlightingCells){const a=dl(o,e.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null){let l=a;if(l===null&&t&&(l=o.getCellNodeFromCords(i,s,this.table)),l!==null){const u=this.$getAnchorTableCellOrThrow();return this.focusCellNodeKey=l.getKey(),this.tableSelection=ul(o,u,l),_e(this.tableSelection),r.dispatchCommand(qt),ci(r,this.table,this.tableSelection),!0}}}return!1}$getAnchorTableCell(){const e=this.anchorCellNodeKey?te(this.anchorCellNodeKey):null;return J(e)?e:null}$getAnchorTableCellOrThrow(){const e=this.$getAnchorTableCell();return e===null&&H(234),e}$getFocusTableCell(){const e=this.focusCellNodeKey?te(this.focusCellNodeKey):null;return J(e)?e:null}$getFocusTableCellOrThrow(){const e=this.$getFocusTableCell();return e===null&&H(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=dl(t,e.elem);if(r!==null){const o=r.getKey();this.tableSelection!=null?(this.tableSelection=this.tableSelection.clone(),this.tableSelection.set(t.getKey(),o,o)):this.tableSelection=ul(t,r,r),this.anchorCellNodeKey=o}}$formatCells(e){const t=z();ke(t)||H(236);const r=Dl(),o=r.anchor,i=r.focus,s=t.getNodes().filter(J);s.length>0||H(237);const a=s[0].getFirstChild(),l=en(a)?a.getFormatFlags(e,null):null;s.forEach(u=>{o.set(u.getKey(),0,"element"),i.set(u.getKey(),u.getChildrenSize(),"element"),r.formatText(e,l)}),_e(t),this.editor.dispatchCommand(qt)}$clearText(){const{editor:e}=this,t=te(this.tableNodeKey);if(!ye(t))throw new Error("Expected TableNode.");const r=z();ke(r)||H(253);const o=r.getNodes().filter(J),i=t.getFirstChild(),s=t.getLastChild();if(o.length>0&&i!==null&&s!==null&&Ce(i)&&Ce(s)&&o[0]===i.getFirstChild()&&o[o.length-1]===s.getLastChild()){t.selectPrevious();const a=t.getParent();return t.remove(),void(Oe(a)&&a.isEmpty()&&e.dispatchCommand(Hn))}o.forEach(a=>{if(C(a)){const l=Y(),u=Fe();l.append(u),a.append(l),a.getChildren().forEach(c=>{c!==l&&c.remove()})}}),ci(e,this.table,null),_e(null),e.dispatchCommand(qt)}}const $r="__lexicalTableSelection";function lp(n){const e=Oh(n);return ye(e)||H(386,n),e}const gr=40;function sa(n,e,t){const r=o=>Math.max(1,Math.ceil(Math.min(gr,o)/gr*18));return n<=e+gr?-r(e+gr-n):n>=t-gr?r(n-(t-gr)):0}function Ln(n){return q(n)&&n.nodeName==="TABLE"}function mn(n,e){if(!e)return e;const t=Ln(e)?e:e.querySelector("table");return Ln(t)||H(341,n.constructor.name,n.getType(),n.getKey(),e.nodeName),t}function Os(n){return n._window}function Ms(n,e){for(let t=e,r=null;t!==null;t=t.getParent()){if(n.is(t))return r;J(t)&&(r=t)}return null}const a0=[[vl,"down"],[Cl,"up"],[xl,"backward"],[kl,"forward"]],l0=[zr,Or,vn],u0=[hs,wl];function c0(n,e){return n.registerRootListener(t=>{if(t===null)return;const r=n._window;if(r!==null)return mo(r,"pointerdown",o=>{const i=Vn(o);if(o.button!==0||!Lt(i)||!t.contains(i))return;const s=(function(a){const l=os(a);if(l===null)return null;let u=l.elem;for(;u!=null;){if(u.nodeName==="TABLE"&&$r in u&&u[$r])return{cellElement:l,tableElement:u,tableObserver:u[$r]};u=u.parentNode}return null})(i);n.update(()=>{if(ke(z())){for(const[c]of e.observers.values())c.$clearHighlight(!1);_e(null),n.dispatchCommand(qt)}if(!s)return;const{tableObserver:a,tableElement:l,cellElement:u}=s;(function(c,d,f,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=d.clientX,x=d.clientY,w=null;const v=()=>{g.isSelecting=!1,w!==null&&(p.cancelAnimationFrame(w),w=null),p.removeEventListener("pointerup",ie),p.removeEventListener("pointermove",Q)},E=(L,P)=>{const K=h.getRootNode();if(!$n(K)&&!Zt(K))return null;for(const se of K.elementsFromPoint(L,P)){const ee=Md(h,se);if(ee)return ee}return null},A=(L,P)=>{g.anchorCell===null&&c.update(()=>{g.$setAnchorCellForSelection(L)}),g.focusCell!==null&&L.elem===g.focusCell.elem||(m.setNextFocus({focusCell:L,override:P,tableKey:g.tableNodeKey}),c.dispatchCommand(qt))},T=L=>{for(let P=h.parentElement;P;P=P.parentElement)if(L==="x"?P.scrollWidth>P.clientWidth:P.scrollHeight>P.clientHeight){const K=p.getComputedStyle(P),se=L==="x"?K.overflowX:K.overflowY;if(se==="auto"||se==="scroll")return P}return null},M=(L,P,K)=>{let se,ee;if(L===null)se=0,ee=K==="x"?p.innerWidth:p.innerHeight;else{const re=L.getBoundingClientRect();se=K==="x"?re.left:re.top,ee=K==="x"?re.right:re.bottom}const xe=sa(P,se,ee);if(xe===0)return!1;if(L===null){const re=K==="x"?p.scrollX:p.scrollY;return p.scrollBy(K==="x"?xe:0,K==="x"?0:xe),(K==="x"?p.scrollX:p.scrollY)!==re}if(K==="x"){const re=L.scrollLeft;return L.scrollLeft+=xe,L.scrollLeft!==re}const ot=L.scrollTop;return L.scrollTop+=xe,L.scrollTop!==ot},j=(L,P)=>{let K=S,se=x;if(L===null)K=Math.min(Math.max(K,1),p.innerWidth-1);else{const ee=L.getBoundingClientRect();K=Math.min(Math.max(K,ee.left+1),ee.right-1)}if(P===null)se=Math.min(Math.max(se,1),p.innerHeight-1);else{const ee=P.getBoundingClientRect();se=Math.min(Math.max(se,ee.top+1),ee.bottom-1)}return[K,se]},R=()=>{const L=T("x");if(L!==null){const ee=L.getBoundingClientRect();if(sa(S,ee.left,ee.right)!==0)return!0}const P=T("y"),K=P===null?0:P.getBoundingClientRect().top,se=P===null?p.innerHeight:P.getBoundingClientRect().bottom;return sa(x,K,se)!==0},B=()=>{if(w=null,!g.isSelecting)return;const L=T("x"),P=T("y"),K=L!==null&&M(L,S,"x"),se=M(P,x,"y");if(K||se){const[ee,xe]=j(L,P),ot=E(ee,xe);ot&&A(ot,!1),w=p.requestAnimationFrame(B)}},Z=()=>{w===null&&g.pointerType!=="touch"&&R()&&(w=p.requestAnimationFrame(B))},ie=()=>{v()},Q=L=>{if(!(ee=>!(1&~ee.buttons))(L)&&g.isSelecting)return void v();const P=Vn(L);if(!Lt(P))return;S=L.clientX,x=L.clientY;let K=null;const se=!(Pt||h.contains(P));K=se?Md(h,P):E(L.clientX,L.clientY),K&&A(K,se),Z()};p.addEventListener("pointerup",ie,g.listenerOptions),p.addEventListener("pointermove",Q,g.listenerOptions)};g.pointerType=d.pointerType;const _=lp(g.tableNodeKey),b=yt();if(Pt&&d.shiftKey&&At(b,_)&&(N(b)||ke(b))){const k=b.anchor.getNode(),S=Ms(_,b.anchor.getNode());S?(g.$setAnchorCellForSelection(Bn(g,S)),g.$setFocusCellForSelection(f),un(d)):(_.isBefore(k)?_.selectStart():_.selectEnd()).anchor.set(b.anchor.key,b.anchor.offset,b.anchor.type)}else d.pointerType!=="touch"&&g.$setAnchorCellForSelection(f);y(f)})(n,o,u,l,a,e)})})})}function d0(n,e,t,r,o){const i=t.getRootElement(),s=Os(t);i!==null&&s!==null||H(246);const a=new s0(t,n.getKey()),l=mn(n,e);(function(f,h){Od(f)!==null&&H(205),f[$r]=h})(l,a),a.listenersToRemove.add(()=>(function(f,h){Od(f)===h&&delete f[$r]})(l,a)),a.listenersToRemove.add(mo(l,"mousedown",f=>{const h=Vn(f);f.detail>=3&&Lt(h)&&os(h)!==null&&f.preventDefault()},a.listenerOptions));for(const[f,h]of a0)a.listenersToRemove.add(t.registerCommand(f,g=>dp(t,g,h,n,a,o),xt));a.listenersToRemove.add(t.registerCommand(Sl,f=>{const h=z();if(ke(h)){const g=Ms(n,h.focus.getNode());if(g!==null)return un(f),g.selectEnd(),!0}return!1},xt));const u=()=>{const f=z();return!!At(f,n)&&!!ke(f)&&(a.$clearText(),!0)};for(const f of l0)a.listenersToRemove.add(t.registerCommand(f,u,xt));const c=f=>{const h=z();if(!ke(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!!At(h,n)&&!!ke(h)&&(f&&(f.preventDefault(),f.stopPropagation()),a.$clearText(),!0)};for(const f of u0)a.listenersToRemove.add(t.registerCommand(f,c,xt));a.listenersToRemove.add(t.registerCommand(gs,f=>{const h=z();if(h){if(!ke(h)&&!N(h))return!1;Qa(t,Jt(f,ClipboardEvent)?f:null,du(h));const g=c(f);return N(h)?(h.removeText(),!0):g}return!1},xt));const d=i.ownerDocument;return a.listenersToRemove.add(mo(d,"paste",f=>{f.defaultPrevented||t.read("latest",()=>{const h=z();return i.contains(d.activeElement)&&ke(h)&&At(h,n)})&&(f.preventDefault(),t.dispatchCommand(Vr,f))})),a.listenersToRemove.add(mo(d,"copy",f=>{if(f.defaultPrevented)return;const h=Vn(f);h===i||Lt(h)&&i.contains(h)||t.read("latest",()=>{const g=z();return i.contains($o(i))&&ke(g)&&At(g,n)})&&(f.preventDefault(),t.dispatchCommand(Io,f))})),a.listenersToRemove.add(t.registerCommand(Ot,f=>{const h=z();return!!At(h,n)&&!!ke(h)&&(a.$formatCells(f),!0)},xt)),a.listenersToRemove.add(t.registerCommand(Pf,f=>{const h=z();if(!ke(h)||!At(h,n))return!1;const g=h.anchor.getNode(),m=h.focus.getNode();if(!J(g)||!J(m))return!1;const[p,y,_]=Bt(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),x=Math.min(y.startColumn,_.startColumn);if(S===0&&x===0&&b===p.length-1&&k===p[0].length-1)return n.setFormat(f),!0;const w=new Set;for(let v=S;v<=b;v++)for(let E=x;E<=k;E++){const A=p[v][E].cell;if(w.has(A))continue;w.add(A),A.setFormat(f);const T=A.getChildren();for(let M=0;M<T.length;M++){const j=T[M];C(j)&&!j.isInline()&&j.setFormat(f)}}return!0},xt)),a.listenersToRemove.add(t.registerCommand(Kn,f=>{const h=z();if(!At(h,n))return!1;if(ke(h))return a.$clearHighlight(),!1;if(N(h)){const g=U(h.anchor.getNode(),m=>J(m));if(!J(g))return!1;if(typeof f=="string"){const m=Rd(t,h,n);if(m)return jd(m,n,[Fe(f)]),!0}}return!1},xt)),r&&a.listenersToRemove.add(t.registerCommand(El,f=>{const h=z();if(!N(h)||!h.isCollapsed()||!At(h,n))return!1;const g=fo(h.anchor.getNode());return!(g===null||!n.is(Hr(g)))&&(un(f),(function(m,p){const y=p==="next"?"getNextSibling":"getPreviousSibling",_=p==="next"?"getFirstChild":"getLastChild",b=m[y]();if(C(b))return b.selectEnd();const k=U(m,Ce);k===null&&H(247);for(let x=k[y]();Ce(x);x=x[y]()){const w=x[_]();if(C(w))return w.selectEnd()}const S=U(k,ye);S===null&&H(248),p==="next"?S.selectNext():S.selectPrevious()})(g,f.shiftKey?"previous":"next"),!0)},xt)),a.listenersToRemove.add(t.registerCommand(Bf,f=>n.isSelected(),xt)),a.listenersToRemove.add(t.registerCommand(Hn,()=>{const f=z();if(!N(f)||!f.isCollapsed()||!At(f,n))return!1;const h=Rd(t,f,n);return!!h&&(jd(h,n),!0)},xt)),a}function f0(n,e){const t=z(),r=yt(),o=n.getAndClearNextFocus();if(o!==null){const{tableKey:s,focusCell:a}=o,l=n.observers.get(s);l||H(335,s);const[u]=l;if(ke(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 i=n.getAndClearShouldCheckSelectionForTable();if(i&&N(r)&&N(t)&&t.isCollapsed()){const s=te(i);if(ye(s)){const a=t.anchor.getNode(),l=s.getFirstChild(),u=fo(a);if(u!==null&&Ce(l)){const c=l.getFirstChild();if(J(c)&&s.is(U(u,d=>d.is(s)||d.is(c))))return c.selectStart(),!0}}}ke(t)&&(function(s,a){const l=Os(s),u=yt();if(!a.is(u))return;const c=lp(a.tableKey),d=Pe(l),f=d&&ft(d,s.getRootElement());if(d&&f&&f.anchorNode&&f.focusNode){const h=Ge(f.focusNode),g=h&&!c.isParentOf(h),m=Ge(f.anchorNode),p=m&&c.isParentOf(m);if(g&&p&&d.rangeCount>0){const y=ly(d,s);y&&(y.anchor.set(c.getKey(),a.isBackward()?c.getChildrenSize():0,"element"),d.removeAllRanges(),_e(y))}}})(e,t),N(t)&&(function(s,a){const l=yt(),{anchor:u,focus:c}=s,d=u.getNode(),f=c.getNode(),h=fo(d),g=fo(f),m=h?Hr(h):null,p=g?Hr(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(),[x]=Bt(p,g,g),w=x[0][0].cell,v=x[x.length-1].at(-1).cell;S.focus.set(y?w.getKey():v.getKey(),y?0:v.getChildrenSize(),"element"),_e(S)}else if(k){const S=s.clone(),[x]=Bt(m,h,h),w=x[0][0].cell,v=x[x.length-1].at(-1).cell;S.anchor.set(y?v.getKey():w.getKey(),y?v.getChildrenSize():0,"element"),_e(S)}else if(_){const S=a.observers.get(m.getKey());S||H(335,m.getKey());const[x]=S;if(h.is(g)||(x.$setAnchorCellForSelection(Bn(x,h)),x.$setFocusCellForSelection(Bn(x,g),!0)),x.pointerType==="touch"&&x.isSelecting&&s.isCollapsed()&&N(l)&&l.isCollapsed()){const w=fo(l.anchor.getNode());w&&!w.is(g)&&(x.$setAnchorCellForSelection(Bn(x,w)),x.$setFocusCellForSelection(Bn(x,g),!0),x.pointerType=null)}}})(t,n);for(const[s,a]of n.$getTableNodesAndObservers())h0(e,s,a);return!1}function h0(n,e,t){const r=z(),o=yt();r&&!r.is(o)&&(ke(r)||ke(o))&&t.tableSelection&&!t.tableSelection.is(o)&&(ke(r)&&r.tableKey===t.tableNodeKey?t.$updateTableTableSelection(r):!ke(r)&&ke(o)&&o.tableKey===t.tableNodeKey&&t.$updateTableTableSelection(null)),t.hasHijackedSelectionStyles&&!e.isSelected()?(function(i,s){s.$enableHighlightStyle(),cl(s.table,a=>{const l=a.elem;a.highlighted=!1,cp(i,a),l.getAttribute("style")||l.removeAttribute("style")})})(n,t):!t.hasHijackedSelectionStyles&&e.isSelected()&&(function(i,s){s.$disableHighlightStyle(),cl(s.table,a=>{a.highlighted=!0,up(i,a)})})(n,t)}function Od(n){return n[$r]||null}function os(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 Md(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 o=r.nodeName;o!=="TD"&&o!=="TH"||(t=r._cell||null)}return null}function Ar(n,e){const t=[],r={columns:0,domRows:t,rows:0};let o=mn(n,e).querySelector("tr"),i=0,s=0;for(t.length=0;o!=null;){const a=o.nodeName;if(a==="TD"||a==="TH"){const c={elem:o,hasBackgroundColor:o.style.backgroundColor!=="",highlighted:!1,x:i,y:s};o._cell=c;let d=t[s];d===void 0&&(d=t[s]=[]),d[i]=c}else{const c=o.firstChild;if(c!=null){o=c;continue}}const l=o.nextSibling;if(l!=null){i++,o=l;continue}const u=o.parentNode;if(u!=null){const c=u.nextSibling;if(c==null)break;s++,i=0,o=c}}return r.columns=i+1,r.rows=s+1,r}function ci(n,e,t){const r=new Set(t?t.getNodes():[]);cl(e,(o,i)=>{const s=o.elem;r.has(i)?(o.highlighted=!0,up(n,o)):(o.highlighted=!1,cp(n,o),s.getAttribute("style")||s.removeAttribute("style"))})}function cl(n,e){const{domRows:t}=n;for(let r=0;r<t.length;r++){const o=t[r];if(o)for(let i=0;i<o.length;i++){const s=o[i];if(!s)continue;const a=Ge(s.elem);a!==null&&e(s,a,{x:i,y:r})}}}const g0=(n,e,t,r,o)=>{const i=o==="forward";switch(o){case"backward":case"forward":return t!==(i?n.table.columns-1:0)?fi(e.getCellNodeFromCordsOrThrow(t+(i?1:-1),r,n.table),i):r!==(i?n.table.rows-1:0)?fi(e.getCellNodeFromCordsOrThrow(i?0:n.table.columns-1,r+(i?1:-1),n.table),i):i?e.selectNext():e.selectPrevious(),!0;case"up":return r!==0?fi(e.getCellNodeFromCordsOrThrow(t,r-1,n.table),!1):e.selectPrevious(),!0;case"down":return r!==n.table.rows-1?fi(e.getCellNodeFromCordsOrThrow(t,r+1,n.table),!0):e.selectNext(),!0;default:return!1}};function aa(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 di([n,e]){return[n==="minColumn"?"maxColumn":"minColumn",e==="minRow"?"maxRow":"minRow"]}function pr(n,e,[t,r]){const o=e[r],i=n[o];i===void 0&&H(250,r,String(o));const s=e[t],a=i[s];return a===void 0&&H(250,t,String(s)),a}function p0(n,e,t,r,o){const i=rs(e,t,r),s=(function(x,w){const{minColumn:v,maxColumn:E,minRow:A,maxRow:T}=w;let M=1,j=1,R=1,B=1;const Z=x[A],ie=x[T];for(let Q=v;Q<=E;Q++)M=Math.max(M,Z[Q].cell.__rowSpan),B=Math.max(B,ie[Q].cell.__rowSpan);for(let Q=A;Q<=T;Q++)j=Math.max(j,x[Q][v].cell.__colSpan),R=Math.max(R,x[Q][E].cell.__colSpan);return{bottomSpan:B,leftSpan:j,rightSpan:R,topSpan:M}})(e,i),{topSpan:a,leftSpan:l,bottomSpan:u,rightSpan:c}=s,d=(function(x,w){const v=aa(x,w);return v===null&&H(249,w.cell.getKey()),v})(i,t),[f,h]=di(d);let g=i[f],m=i[h];o==="forward"?g+=f==="maxColumn"?1:l:o==="backward"?g-=f==="minColumn"?1:c:o==="down"?m+=h==="maxRow"?1:a:o==="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(x,w,v){const E=rs(x,w,v),A=aa(E,w);if(A)return[pr(x,E,A),pr(x,E,di(A))];const T=aa(E,v);if(T)return[pr(x,E,di(T)),pr(x,E,T)];const M=["minColumn","minRow"];return[pr(x,E,M),pr(x,E,di(M))]})(e,t,y),k=Bn(n,_.cell),S=Bn(n,b.cell);return n.$setAnchorCellForSelection(k),n.$setFocusCellForSelection(S,!0),!0}function At(n,e){if(N(n)||ke(n)){const t=e.isParentOf(n.anchor.getNode()),r=e.isParentOf(n.focus.getNode());return t&&r}return!1}function fi(n,e){e?n.selectStart():n.selectEnd()}function up(n,e){const t=e.elem,r=n._config.theme;J(Ge(t))||H(131),Ae(t,r.tableCellSelected)}function cp(n,e){const t=e.elem;J(Ge(t))||H(131);const r=n._config.theme;Xt(t,r.tableCellSelected)}function fo(n){const e=U(n,J);return J(e)?e:null}function Hr(n){const e=U(n,ye);return ye(e)?e:null}function m0(n,e,t,r,o,i,s){const a=Ze(t.focus,o?"previous":"next");if(Ts(a))return!1;let l=a;for(const p of Wr(a).iterNodeCarets("shadowRoot")){if(!It(p)||!C(p.origin))return!1;l=p}const u=l.getParentAtCaret();if(!J(u))return!1;const c=u,d=(function(p){for(const y of Wr(p).iterNodeCarets("root")){const{origin:_}=y;if(J(_)){if(Xe(y))return Re(_,p.direction)}else if(!Ce(_))break}return null})(ue(c,l.direction)),f=U(c,ye);if(!f||!f.is(i))return!1;const h=n.getElementByKey(c.getKey()),g=os(h);if(!h||!g)return!1;const m=_0(n,f);if(s.table=m,d)if(r==="extend"){const p=os(n.getElementByKey(d.origin.getKey()));if(!p)return!1;s.$setAnchorCellForSelection(g),s.$setFocusCellForSelection(p,!0)}else{const p=Ve(d);Mt(t.anchor,p),Mt(t.focus,p)}else if(r==="extend")s.$setAnchorCellForSelection(g),s.$setFocusCellForSelection(g,!0);else{const p=(function(y){const _=Qn(y);return Xe(_)?Ve(_):y})(ue(f,a.direction));Mt(t.anchor,p),Mt(t.focus,p)}return un(e),!0}function dp(n,e,t,r,o,i){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=z();if(!At(s,r)){if(N(s)){if(t==="backward"){if(s.focus.offset>0)return!1;const a=(function(u){for(let c=u,d=u;d!==null;c=d,d=d.getParent())if(C(d)){if(d!==c&&d.getFirstChild()!==c)return null;if(!d.isInline())return d}return null})(s.focus.getNode());if(!a)return!1;const l=a.getPreviousSibling();return!!ye(l)&&(un(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=U(a,h=>ye(h));if(J(l)&&(l=U(l,ye)),l!==r||!l)return!1;const u=t==="down"?l.getNextSibling():l.getPreviousSibling();if(!u)return!1;let c=0;t==="up"&&C(u)&&(c=u.getChildrenSize());let d=u;t==="up"&&C(u)&&(d=u.getLastChild()||u,c=D(d)?d.getTextContentSize():0);const f=s.clone();return f.focus.set(d.getKey(),c,D(d)?"text":"element"),_e(f),un(e),!0}if(Se(a)){const l=t==="up"?s.getNodes()[s.getNodes().length-1]:s.getNodes()[0];if(l&&Ms(r,l)!==null){const u=r.getFirstDescendant(),c=r.getLastDescendant();if(!u||!c)return!1;const[d]=Vt(u),[f]=Vt(c),h=r.getCordsFromCellNode(d,o.table),g=r.getCordsFromCellNode(f,o.table),m=r.getDOMCellFromCordsOrThrow(h.x,h.y,o.table),p=r.getDOMCellFromCordsOrThrow(g.x,g.y,o.table);return o.$setAnchorCellForSelection(m),o.$setFocusCellForSelection(p,!0),!0}return!1}{let l=U(a,c=>C(c)&&!c.isInline());if(J(l)&&(l=U(l,ye)),!l)return!1;const u=t==="down"?l.getNextSibling():l.getPreviousSibling();if(ye(u)&&o.tableNodeKey===u.getKey()){const c=u.getFirstDescendant(),d=u.getLastDescendant();if(!c||!d)return!1;const[f]=Vt(c),[h]=Vt(d),g=s.clone();return g.focus.set((t==="up"?f:h).getKey(),t==="up"?0:h.getChildrenSize(),"element"),un(e),_e(g),!0}}}}return t==="down"&&is(n)&&i.setShouldCheckSelectionForTable(r.getKey()),!1}if(N(s)){if(t==="backward"||t==="forward")return m0(n,e,s,e.shiftKey?"extend":"move",t==="backward",r,o);if(s.isCollapsed()){const{anchor:a,focus:l}=s,u=U(a.getNode(),J),c=U(l.getNode(),J);if(!J(u)||!u.is(c))return!1;const d=Hr(u);if(d!==r&&d!=null){const _=mn(d,n.getElementByKey(d.getKey()));if(_!=null)return o.table=Ar(d,_),dp(n,e,t,d,o,i)}const f=n.getElementByKey(u.__key),h=n.getElementByKey(a.key);if(h==null||f==null)return!1;let g;if(a.type==="element")g=h.getBoundingClientRect();else{const _=Pe(Os(n));if(_===null||_.rangeCount===0)return!1;const b=Ph(_,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){un(e);const _=r.getCordsFromCellNode(u,o.table);if(!e.shiftKey)return g0(o,r,_.x,_.y,t);{const b=r.getDOMCellFromCordsOrThrow(_.x,_.y,o.table);o.$setAnchorCellForSelection(b),o.$setFocusCellForSelection(b,!0)}return!0}}}else if(ke(s)){const{anchor:a,focus:l,tableKey:u}=s;if(u!==r.getKey())return!1;const c=U(a.getNode(),J),d=U(l.getNode(),J),[f]=s.getNodes();ye(f)||H(251);const h=mn(f,n.getElementByKey(f.getKey()));if(!J(c)||!J(d)||!ye(f)||h==null)return!1;o.$updateTableTableSelection(s);const g=Ar(f,h),m=r.getCordsFromCellNode(c,g),p=r.getDOMCellFromCordsOrThrow(m.x,m.y,g);if(o.$setAnchorCellForSelection(p),un(e),e.shiftKey){const[y,_,b]=Bt(r,c,d);return p0(o,y,_,b,t)}return d.selectEnd(),!0}return!1}function un(n){n.preventDefault(),n.stopImmediatePropagation(),n.stopPropagation()}function jd(n,e,t){const r=Y();n==="first"?e.insertBefore(r):e.insertAfter(r),r.append(...t||[]),r.selectEnd()}function Rd(n,e,t){const r=t.getParent();if(!r)return;const o=Pe(Os(n));if(!o)return;const i=ft(o,n.getRootElement()).anchorNode,s=n.getElementByKey(r.getKey()),a=mn(t,n.getElementByKey(t.getKey()));if(!i||!s||!a||!s.contains(i)||a.contains(i))return;const l=U(e.anchor.getNode(),_=>J(_));if(!l)return;const u=U(l,_=>ye(_));if(!ye(u)||!u.is(t))return;const[c,d]=Bt(t,l,l),f=c[0][0],h=c[c.length-1][c[0].length-1],{startRow:g,startColumn:m}=d,p=g===f.startRow&&m===f.startColumn,y=g===h.startRow&&m===h.startColumn;return p?"first":y?"last":void 0}function Bn(n,e){const{tableNode:t}=n.$lookup(),r=t.getCordsFromCellNode(e,n.table);return t.getDOMCellFromCordsOrThrow(r.x,r.y,n.table)}function dl(n,e,t){return Ms(n,Ge(e,t))}function Pd(n){return q(n)&&n.nodeName==="DIV"}function Ld(n,e,t){let r=n.querySelector(":scope > colgroup");if(!t)return void(r&&r.remove());r||(r=ae().createElement("colgroup"),Hi(r),n.insertBefore(r,n.firstChild));const o=[];for(let i=0;i<e;i++){const s=ae().createElement("col"),a=t[i];a&&(s.style.width=`${a}px`),o.push(s)}r.replaceChildren(...o)}function Id(n,e,t){if(!e.theme.tableAlignment)return;const r=[],o=[];for(const i of["center","right"]){const s=e.theme.tableAlignment[i];s&&(i===t?o:r).push(s)}Xt(n,...r),Ae(n,...o)}const fl=new WeakSet;function is(n=we()){return fl.has(n)}function Bd(n=we()){const e=Gr(n,"@lexical/table/Table");return!!e&&e.output.hasStickyScrollbar.peek()&&e.output.hasHorizontalScroll.peek()}function y0(n,e){e?fl.add(n):fl.delete(n)}class nr extends Ee{__rowStriping=!1;__frozenColumnCount=0;__frozenRowCount=0;__colWidths=void 0;$config(){return this.config("table",{extends:Ee,importDOM:{table:()=>({conversion:b0,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=Ln(e)?e:e.querySelector("table");return Ln(t)||H(229),super.getDOMSlot(e).withElement(t).withAfter(t.querySelector(":scope > colgroup"))}createDOM(e,t){const r=ae().createElement("table");if(this.__style&&Sn(r.style,this.__style),this.getColWidths()){const o=ae().createElement("colgroup");r.appendChild(o),Hi(o)}if(Ae(r,e.theme.table),this.updateTableElement(null,r,e),is(t)){const o=Bd(t),i=(function(s,a,l){const u=ae().createElement("div"),c=a.theme.tableScrollableWrapper;return c?Ae(u,c):u.style.overflowX="auto",l&&(u.style.scrollbarWidth="none"),u.appendChild(s),u})(r,e,o);if(this.updateTableWrapper(null,i,r,e),o){const s=(function(l){const u=ae(),c=u.createElement("div"),d=l.theme.tableStickyScrollbar;d?Ae(c,d):(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 f=u.createElement("div");return f.style.height="1px",f.style.width="0px",c.appendChild(f),c})(e),a=ae().createElement("div");return a.setAttribute("data-lexical-sticky-scrollbar","true"),a.appendChild(i),a.appendChild(s),Hi(s),a}return i}return r}updateTableWrapper(e,t,r,o){this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&(function(i,s,a,l){l>0?(Ae(i,a.theme.tableFrozenColumn),s.setAttribute("data-lexical-frozen-column","true")):(Xt(i,a.theme.tableFrozenColumn),s.removeAttribute("data-lexical-frozen-column"))})(t,r,o,this.__frozenColumnCount),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&(function(i,s,a,l){l>0?(Ae(i,a.theme.tableFrozenRow),s.setAttribute("data-lexical-frozen-row","true")):(Xt(i,a.theme.tableFrozenRow),s.removeAttribute("data-lexical-frozen-row"))})(t,r,o,this.__frozenRowCount)}updateTableElement(e,t,r){this.__style!==(e?e.__style:"")&&Sn(t.style,this.__style,e?e.__style:""),this.__rowStriping!==(!!e&&e.__rowStriping)&&(function(s,a,l){l?(Ae(s,a.theme.tableRowStriping),s.setAttribute("data-lexical-row-striping","true")):(Xt(s,a.theme.tableRowStriping),s.removeAttribute("data-lexical-row-striping"))})(t,r,this.__rowStriping);const o=e?e.getColumnCount():0,i=e?e.__colWidths:void 0;this.getColumnCount()===o&&this.getColWidths()===i||Ld(t,this.getColumnCount(),this.getColWidths()),Id(t,r,this.getFormatType())}updateDOM(e,t,r){const o=mn(this,t);if(t===o===is())return!0;if(Pd(t)){if(t.hasAttribute("data-lexical-sticky-scrollbar")!==Bd())return!0;const i=o.parentElement;Pd(i)&&this.updateTableWrapper(e,i,o,r)}return this.updateTableElement(e,o,r),!1}scaleDOMColWidths(e,t){const r=this.getColWidths();r&&Ld(mn(this,e),this.getColumnCount(),r.map(o=>o*t))}exportDOM(e){const t=super.exportDOM(e),{element:r}=t;return{after:o=>{if(t.after&&(o=t.after(o)),!Ln(o)&&q(o)&&(o=o.querySelector("table")),!Ln(o))return null;Id(o,e._config,this.getFormatType());const[i]=cn(this,null,null),s=new Map;for(const c of i)for(const d of c){const f=d.cell.getKey();s.has(f)||s.set(f,{colSpan:d.cell.getColSpan(),startColumn:d.startColumn})}const a=new Set;for(const c of o.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){const d=c.getAttribute("data-temporary-table-cell-lexical-key");if(d){const f=s.get(d);if(c.removeAttribute("data-temporary-table-cell-lexical-key"),f){s.delete(d);for(let h=0;h<f.colSpan;h++)a.add(h+f.startColumn)}}}const l=o.querySelector(":scope > colgroup");if(l){const c=Array.from(o.querySelectorAll(":scope > colgroup > col")).filter((d,f)=>a.has(f));l.replaceChildren(...c)}const u=o.querySelectorAll(":scope > tr");if(u.length>0){const c=ae().createElement("tbody");for(const d of u)c.appendChild(d);o.append(c)}return o},element:!Ln(r)&&q(r)?r.querySelector("table"):r}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,t){const{rows:r,domRows:o}=t;for(let i=0;i<r;i++){const s=o[i];if(s!=null)for(let a=0;a<s.length;a++){const l=s[a];if(l==null)continue;const{elem:u}=l,c=dl(this,u);if(c!==null&&e.is(c))return{x:a,y:i}}}throw new Error("Cell not found in table.")}getDOMCellFromCords(e,t,r){const{domRows:o}=r,i=o[t];if(i==null)return null;const s=i[e<i.length?e:i.length-1];return s??null}getDOMCellFromCordsOrThrow(e,t,r){const o=this.getDOMCellFromCords(e,t,r);if(!o)throw new Error("Cell not found at cords.");return o}getCellNodeFromCords(e,t,r){const o=this.getDOMCellFromCords(e,t,r);if(o==null)return null;const i=Ge(o.elem);return J(i)?i:null}getCellNodeFromCordsOrThrow(e,t,r){const o=this.getCellNodeFromCords(e,t,r);if(!o)throw new Error("Node at cords not TableCellNode.");return o}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(!Ce(e))return 0;let t=0;return e.getChildren().forEach(r=>{J(r)&&(t+=r.getColSpan())}),t}}function _0(n,e){const t=n.getElementByKey(e.getKey());return t===null&&H(230),Ar(e,t)}function b0(n){const e=Vo();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 o of t.querySelectorAll(":scope > col")){let i=o.style.width||"";if(!Dr.test(i)&&(i=o.getAttribute("width")||"",!/^\d+$/.test(i))){r=void 0;break}r.push(parseFloat(i))}r&&e.setColWidths(r)}return{after:r=>Yi(r,Ce),node:e}}function Vo(){return tt(new nr)}function ye(n){return n instanceof nr}function k0(n){Ce(n.getParent())?n.isEmpty()&&n.append(Y()):n.remove()}function x0(n){ye(n.getParent())?rg(n,J):n.remove()}function C0(n){rg(n,Ce);const[e]=cn(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;Ce(a)||H(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=_t();c.append(Y()),a.append(c)}}const o=n.getColWidths(),i=n.getColumnCount();if(o&&o.length!==i){let s;if(i<o.length)s=o.slice(0,i);else if(o.length>0){const a=o[o.length-1];s=[...o,...Array(i-o.length).fill(a)]}n.setColWidths(s)}}function v0(n){if(n.detail<3||!Lt(n.target))return!1;const e=Ge(n.target);if(e===null)return!1;const t=U(e,r=>C(r)&&!r.isInline());return t===null?!1:!!J(t.getParent())&&(t.select(0),!0)}function S0(){const n=z();if(!N(n))return!1;const e=Hr(n.anchor.getNode());if(e===null)return!1;const t=ge();if(!t.is(e.getParent())||t.getChildrenSize()!==1)return!1;const[r]=cn(e,null,null);if(r.length===0||r[0].length===0)return!1;const o=r[0][0];if(!o||!o.cell)return!1;const i=r[r.length-1],s=i[i.length-1];if(!s||!s.cell)return!1;const a=ul(e,o.cell,s.cell);return _e(a),!0}function w0(n){return n.registerNodeTransform(On,e=>{if(e.getColSpan()>1||e.getRowSpan()>1){const[,,t]=Vt(e),[r]=Bt(t,e,e),o=r.length,i=r[0].length;let s=t.getFirstChild();Ce(s)||H(175);const a=[];for(let l=0;l<o;l++){l!==0&&(s=s.getNextSibling(),Ce(s)||H(175));let u=null;for(let c=0;c<i;c++){const d=r[l][c],f=d.cell;if(d.startRow===l&&d.startColumn===c)u=f,a.push(f);else if(f.getColSpan()>1||f.getRowSpan()>1){J(f)||H(176);const h=_t(f.__headerState);u!==null?u.insertAfter(h):p_(s,h)}}}for(const l of a)l.setColSpan(1),l.setRowSpan(1)}})}function E0(n,e=!0){const t=new i0,r=(o,i,s)=>{const a=mn(o,s),l=d0(o,a,n,e,t);t.observers.set(i,[l,a])};return Qe(c0(n,t),n.registerCommand(qt,()=>f0(t,n),xt),n.registerMutationListener(nr,o=>{n.read("latest",()=>{for(const[i,s]of o){const a=t.observers.get(i);if(s==="created"||s==="updated"){const{tableNode:l,tableElement:u}=ap(i);a===void 0?r(l,i,u):u!==a[1]&&(t.removeObserver(i),r(l,i,u))}else s==="destroyed"&&t.removeObserver(i)}})},{skipInitialization:!1}),()=>{t.removeAllObservers()})}function T0(n,e){n.hasNodes([nr])||H(255);const{hasNestedTables:t=Ho(!1)}=e??{};return Qe(n.registerCommand(Vk,r=>(function({rows:o,columns:i,includeHeaders:s},a){const l=z()||yt();if(!l||!N(l)||!a&&Hr(l.anchor.getNode()))return!1;const u=Xk(Number(o),Number(i),s);g_(u);const c=u.getFirstDescendant();return D(c)&&c.select(),!0})(r,t.peek()),G),n.registerCommand(Df,(r,o)=>n===o&&(function(i,s){const{nodes:a,selection:l}=i;if(!a.some(d=>ye(d)||a_(d).some(f=>ye(f.node)))){if(ke(l)){let d="",f=!1;for(const h of a){const g=C(h)&&!h.isInline();d.length>0&&(g||f)&&(d+=`
|
|
27
|
+
`:" ")}return t}}function ke(n){return n instanceof zs}function ul(n,e,t){n.getKey(),e.getKey(),t.getKey();const r=z(),o=ke(r)?r.clone():new zs("root",dt("root",0,"element"),dt("root",0,"element"));return o.set(n.getKey(),e.getKey(),t.getKey()),o}function o0(n,e){const t=[[n]];for(let r=t.at(-1);r!==void 0&&t.length>0;r=t.at(-1)){const o=r.pop();o===void 0?t.pop():e(o)!==!1&&C(o)&&t.push(o.getChildren())}}function ap(n,e=we()){const t=te(n);ye(t)||H(231,n);const r=mn(t,e.getElementByKey(n));return r===null&&H(232,n),{tableElement:r,tableNode:t}}class i0{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 o=te(t);ye(o)?e.push([o,r]):this.removeObserver(t)}return e}}class s0{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 ap(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:o,tableElement:i}=this.$lookup();this.table=Ar(o,i)})});this.editor.read("latest",()=>{const{tableNode:t,tableElement:r}=this.$lookup();this.table=Ar(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:o}=this.$lookup();ci(t,Ar(r,o),null),e&&z()!==null&&(_e(null),t.dispatchCommand(qt))}$enableHighlightStyle(){const e=this.editor,{tableElement:t}=this.$lookup();Xt(t,e._config.theme.tableSelection),t.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}$disableHighlightStyle(){const{tableElement:e}=this.$lookup();Ae(e,this.editor._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}$updateTableTableSelection(e){if(e!==null){e.tableKey!==this.tableNodeKey&&H(233,e.tableKey,this.tableNodeKey);const t=this.editor;this.tableSelection=e,this.isHighlightingCells=!0,this.$disableHighlightStyle(),this.updateDOMSelection(),ci(t,this.table,this.tableSelection)}else this.$clearHighlight()}updateDOMSelection(){if(this.anchorCell!==null&&this.focusCell!==null){const e=Pe(this.editor._window);e&&e.rangeCount>0&&e.removeAllRanges()}}$setFocusCellForSelection(e,t=!1){const r=this.editor,{tableNode:o}=this.$lookup(),i=e.x,s=e.y;if(this.focusCell=e,!this.isHighlightingCells&&(t||this.anchorX!==i||this.anchorY!==s||this.tableSelection!=null&&this.anchorCellNodeKey!=null)&&(this.isHighlightingCells=!0,this.$disableHighlightStyle()),this.focusX!==-1&&this.focusY!==-1&&i===this.focusX&&s===this.focusY)return!1;if(this.focusX=i,this.focusY=s,this.isHighlightingCells){const a=dl(o,e.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null){let l=a;if(l===null&&t&&(l=o.getCellNodeFromCords(i,s,this.table)),l!==null){const u=this.$getAnchorTableCellOrThrow();return this.focusCellNodeKey=l.getKey(),this.tableSelection=ul(o,u,l),_e(this.tableSelection),r.dispatchCommand(qt),ci(r,this.table,this.tableSelection),!0}}}return!1}$getAnchorTableCell(){const e=this.anchorCellNodeKey?te(this.anchorCellNodeKey):null;return J(e)?e:null}$getAnchorTableCellOrThrow(){const e=this.$getAnchorTableCell();return e===null&&H(234),e}$getFocusTableCell(){const e=this.focusCellNodeKey?te(this.focusCellNodeKey):null;return J(e)?e:null}$getFocusTableCellOrThrow(){const e=this.$getFocusTableCell();return e===null&&H(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=dl(t,e.elem);if(r!==null){const o=r.getKey();this.tableSelection!=null?(this.tableSelection=this.tableSelection.clone(),this.tableSelection.set(t.getKey(),o,o)):this.tableSelection=ul(t,r,r),this.anchorCellNodeKey=o}}$formatCells(e){const t=z();ke(t)||H(236);const r=Dl(),o=r.anchor,i=r.focus,s=t.getNodes().filter(J);s.length>0||H(237);const a=s[0].getFirstChild(),l=en(a)?a.getFormatFlags(e,null):null;s.forEach(u=>{o.set(u.getKey(),0,"element"),i.set(u.getKey(),u.getChildrenSize(),"element"),r.formatText(e,l)}),_e(t),this.editor.dispatchCommand(qt)}$clearText(){const{editor:e}=this,t=te(this.tableNodeKey);if(!ye(t))throw new Error("Expected TableNode.");const r=z();ke(r)||H(253);const o=r.getNodes().filter(J),i=t.getFirstChild(),s=t.getLastChild();if(o.length>0&&i!==null&&s!==null&&Ce(i)&&Ce(s)&&o[0]===i.getFirstChild()&&o[o.length-1]===s.getLastChild()){t.selectPrevious();const a=t.getParent();return t.remove(),void(Oe(a)&&a.isEmpty()&&e.dispatchCommand(Hn))}o.forEach(a=>{if(C(a)){const l=Y(),u=Fe();l.append(u),a.append(l),a.getChildren().forEach(c=>{c!==l&&c.remove()})}}),ci(e,this.table,null),_e(null),e.dispatchCommand(qt)}}const $r="__lexicalTableSelection";function lp(n){const e=Oh(n);return ye(e)||H(386,n),e}const gr=40;function sa(n,e,t){const r=o=>Math.max(1,Math.ceil(Math.min(gr,o)/gr*18));return n<=e+gr?-r(e+gr-n):n>=t-gr?r(n-(t-gr)):0}function Ln(n){return q(n)&&n.nodeName==="TABLE"}function mn(n,e){if(!e)return e;const t=Ln(e)?e:e.querySelector("table");return Ln(t)||H(341,n.constructor.name,n.getType(),n.getKey(),e.nodeName),t}function Os(n){return n._window}function Ms(n,e){for(let t=e,r=null;t!==null;t=t.getParent()){if(n.is(t))return r;J(t)&&(r=t)}return null}const a0=[[vl,"down"],[Cl,"up"],[xl,"backward"],[kl,"forward"]],l0=[zr,Or,vn],u0=[hs,wl];function c0(n,e){return n.registerRootListener(t=>{if(t===null)return;const r=n._window;if(r!==null)return mo(r,"pointerdown",o=>{const i=Vn(o);if(o.button!==0||!Lt(i)||!t.contains(i))return;const s=(function(a){const l=os(a);if(l===null)return null;let u=l.elem;for(;u!=null;){if(u.nodeName==="TABLE"&&$r in u&&u[$r])return{cellElement:l,tableElement:u,tableObserver:u[$r]};u=u.parentNode}return null})(i);n.update(()=>{if(ke(z())){for(const[c]of e.observers.values())c.$clearHighlight(!1);_e(null),n.dispatchCommand(qt)}if(!s)return;const{tableObserver:a,tableElement:l,cellElement:u}=s;(function(c,d,f,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=d.clientX,x=d.clientY,w=null;const v=()=>{g.isSelecting=!1,w!==null&&(p.cancelAnimationFrame(w),w=null),p.removeEventListener("pointerup",ie),p.removeEventListener("pointermove",Z)},E=(L,P)=>{const K=h.getRootNode();if(!$n(K)&&!Qt(K))return null;for(const se of K.elementsFromPoint(L,P)){const ee=Md(h,se);if(ee)return ee}return null},A=(L,P)=>{g.anchorCell===null&&c.update(()=>{g.$setAnchorCellForSelection(L)}),g.focusCell!==null&&L.elem===g.focusCell.elem||(m.setNextFocus({focusCell:L,override:P,tableKey:g.tableNodeKey}),c.dispatchCommand(qt))},T=L=>{for(let P=h.parentElement;P;P=P.parentElement)if(L==="x"?P.scrollWidth>P.clientWidth:P.scrollHeight>P.clientHeight){const K=p.getComputedStyle(P),se=L==="x"?K.overflowX:K.overflowY;if(se==="auto"||se==="scroll")return P}return null},M=(L,P,K)=>{let se,ee;if(L===null)se=0,ee=K==="x"?p.innerWidth:p.innerHeight;else{const re=L.getBoundingClientRect();se=K==="x"?re.left:re.top,ee=K==="x"?re.right:re.bottom}const xe=sa(P,se,ee);if(xe===0)return!1;if(L===null){const re=K==="x"?p.scrollX:p.scrollY;return p.scrollBy(K==="x"?xe:0,K==="x"?0:xe),(K==="x"?p.scrollX:p.scrollY)!==re}if(K==="x"){const re=L.scrollLeft;return L.scrollLeft+=xe,L.scrollLeft!==re}const ot=L.scrollTop;return L.scrollTop+=xe,L.scrollTop!==ot},j=(L,P)=>{let K=S,se=x;if(L===null)K=Math.min(Math.max(K,1),p.innerWidth-1);else{const ee=L.getBoundingClientRect();K=Math.min(Math.max(K,ee.left+1),ee.right-1)}if(P===null)se=Math.min(Math.max(se,1),p.innerHeight-1);else{const ee=P.getBoundingClientRect();se=Math.min(Math.max(se,ee.top+1),ee.bottom-1)}return[K,se]},R=()=>{const L=T("x");if(L!==null){const ee=L.getBoundingClientRect();if(sa(S,ee.left,ee.right)!==0)return!0}const P=T("y"),K=P===null?0:P.getBoundingClientRect().top,se=P===null?p.innerHeight:P.getBoundingClientRect().bottom;return sa(x,K,se)!==0},B=()=>{if(w=null,!g.isSelecting)return;const L=T("x"),P=T("y"),K=L!==null&&M(L,S,"x"),se=M(P,x,"y");if(K||se){const[ee,xe]=j(L,P),ot=E(ee,xe);ot&&A(ot,!1),w=p.requestAnimationFrame(B)}},Q=()=>{w===null&&g.pointerType!=="touch"&&R()&&(w=p.requestAnimationFrame(B))},ie=()=>{v()},Z=L=>{if(!(ee=>!(1&~ee.buttons))(L)&&g.isSelecting)return void v();const P=Vn(L);if(!Lt(P))return;S=L.clientX,x=L.clientY;let K=null;const se=!(Pt||h.contains(P));K=se?Md(h,P):E(L.clientX,L.clientY),K&&A(K,se),Q()};p.addEventListener("pointerup",ie,g.listenerOptions),p.addEventListener("pointermove",Z,g.listenerOptions)};g.pointerType=d.pointerType;const _=lp(g.tableNodeKey),b=yt();if(Pt&&d.shiftKey&&At(b,_)&&(N(b)||ke(b))){const k=b.anchor.getNode(),S=Ms(_,b.anchor.getNode());S?(g.$setAnchorCellForSelection(Bn(g,S)),g.$setFocusCellForSelection(f),un(d)):(_.isBefore(k)?_.selectStart():_.selectEnd()).anchor.set(b.anchor.key,b.anchor.offset,b.anchor.type)}else d.pointerType!=="touch"&&g.$setAnchorCellForSelection(f);y(f)})(n,o,u,l,a,e)})})})}function d0(n,e,t,r,o){const i=t.getRootElement(),s=Os(t);i!==null&&s!==null||H(246);const a=new s0(t,n.getKey()),l=mn(n,e);(function(f,h){Od(f)!==null&&H(205),f[$r]=h})(l,a),a.listenersToRemove.add(()=>(function(f,h){Od(f)===h&&delete f[$r]})(l,a)),a.listenersToRemove.add(mo(l,"mousedown",f=>{const h=Vn(f);f.detail>=3&&Lt(h)&&os(h)!==null&&f.preventDefault()},a.listenerOptions));for(const[f,h]of a0)a.listenersToRemove.add(t.registerCommand(f,g=>dp(t,g,h,n,a,o),xt));a.listenersToRemove.add(t.registerCommand(Sl,f=>{const h=z();if(ke(h)){const g=Ms(n,h.focus.getNode());if(g!==null)return un(f),g.selectEnd(),!0}return!1},xt));const u=()=>{const f=z();return!!At(f,n)&&!!ke(f)&&(a.$clearText(),!0)};for(const f of l0)a.listenersToRemove.add(t.registerCommand(f,u,xt));const c=f=>{const h=z();if(!ke(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!!At(h,n)&&!!ke(h)&&(f&&(f.preventDefault(),f.stopPropagation()),a.$clearText(),!0)};for(const f of u0)a.listenersToRemove.add(t.registerCommand(f,c,xt));a.listenersToRemove.add(t.registerCommand(gs,f=>{const h=z();if(h){if(!ke(h)&&!N(h))return!1;Za(t,Jt(f,ClipboardEvent)?f:null,du(h));const g=c(f);return N(h)?(h.removeText(),!0):g}return!1},xt));const d=i.ownerDocument;return a.listenersToRemove.add(mo(d,"paste",f=>{f.defaultPrevented||t.read("latest",()=>{const h=z();return i.contains(d.activeElement)&&ke(h)&&At(h,n)})&&(f.preventDefault(),t.dispatchCommand(Vr,f))})),a.listenersToRemove.add(mo(d,"copy",f=>{if(f.defaultPrevented)return;const h=Vn(f);h===i||Lt(h)&&i.contains(h)||t.read("latest",()=>{const g=z();return i.contains($o(i))&&ke(g)&&At(g,n)})&&(f.preventDefault(),t.dispatchCommand(Io,f))})),a.listenersToRemove.add(t.registerCommand(Ot,f=>{const h=z();return!!At(h,n)&&!!ke(h)&&(a.$formatCells(f),!0)},xt)),a.listenersToRemove.add(t.registerCommand(Pf,f=>{const h=z();if(!ke(h)||!At(h,n))return!1;const g=h.anchor.getNode(),m=h.focus.getNode();if(!J(g)||!J(m))return!1;const[p,y,_]=Bt(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),x=Math.min(y.startColumn,_.startColumn);if(S===0&&x===0&&b===p.length-1&&k===p[0].length-1)return n.setFormat(f),!0;const w=new Set;for(let v=S;v<=b;v++)for(let E=x;E<=k;E++){const A=p[v][E].cell;if(w.has(A))continue;w.add(A),A.setFormat(f);const T=A.getChildren();for(let M=0;M<T.length;M++){const j=T[M];C(j)&&!j.isInline()&&j.setFormat(f)}}return!0},xt)),a.listenersToRemove.add(t.registerCommand(Kn,f=>{const h=z();if(!At(h,n))return!1;if(ke(h))return a.$clearHighlight(),!1;if(N(h)){const g=U(h.anchor.getNode(),m=>J(m));if(!J(g))return!1;if(typeof f=="string"){const m=Rd(t,h,n);if(m)return jd(m,n,[Fe(f)]),!0}}return!1},xt)),r&&a.listenersToRemove.add(t.registerCommand(El,f=>{const h=z();if(!N(h)||!h.isCollapsed()||!At(h,n))return!1;const g=fo(h.anchor.getNode());return!(g===null||!n.is(Hr(g)))&&(un(f),(function(m,p){const y=p==="next"?"getNextSibling":"getPreviousSibling",_=p==="next"?"getFirstChild":"getLastChild",b=m[y]();if(C(b))return b.selectEnd();const k=U(m,Ce);k===null&&H(247);for(let x=k[y]();Ce(x);x=x[y]()){const w=x[_]();if(C(w))return w.selectEnd()}const S=U(k,ye);S===null&&H(248),p==="next"?S.selectNext():S.selectPrevious()})(g,f.shiftKey?"previous":"next"),!0)},xt)),a.listenersToRemove.add(t.registerCommand(Bf,f=>n.isSelected(),xt)),a.listenersToRemove.add(t.registerCommand(Hn,()=>{const f=z();if(!N(f)||!f.isCollapsed()||!At(f,n))return!1;const h=Rd(t,f,n);return!!h&&(jd(h,n),!0)},xt)),a}function f0(n,e){const t=z(),r=yt(),o=n.getAndClearNextFocus();if(o!==null){const{tableKey:s,focusCell:a}=o,l=n.observers.get(s);l||H(335,s);const[u]=l;if(ke(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 i=n.getAndClearShouldCheckSelectionForTable();if(i&&N(r)&&N(t)&&t.isCollapsed()){const s=te(i);if(ye(s)){const a=t.anchor.getNode(),l=s.getFirstChild(),u=fo(a);if(u!==null&&Ce(l)){const c=l.getFirstChild();if(J(c)&&s.is(U(u,d=>d.is(s)||d.is(c))))return c.selectStart(),!0}}}ke(t)&&(function(s,a){const l=Os(s),u=yt();if(!a.is(u))return;const c=lp(a.tableKey),d=Pe(l),f=d&&ft(d,s.getRootElement());if(d&&f&&f.anchorNode&&f.focusNode){const h=Ge(f.focusNode),g=h&&!c.isParentOf(h),m=Ge(f.anchorNode),p=m&&c.isParentOf(m);if(g&&p&&d.rangeCount>0){const y=ly(d,s);y&&(y.anchor.set(c.getKey(),a.isBackward()?c.getChildrenSize():0,"element"),d.removeAllRanges(),_e(y))}}})(e,t),N(t)&&(function(s,a){const l=yt(),{anchor:u,focus:c}=s,d=u.getNode(),f=c.getNode(),h=fo(d),g=fo(f),m=h?Hr(h):null,p=g?Hr(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(),[x]=Bt(p,g,g),w=x[0][0].cell,v=x[x.length-1].at(-1).cell;S.focus.set(y?w.getKey():v.getKey(),y?0:v.getChildrenSize(),"element"),_e(S)}else if(k){const S=s.clone(),[x]=Bt(m,h,h),w=x[0][0].cell,v=x[x.length-1].at(-1).cell;S.anchor.set(y?v.getKey():w.getKey(),y?v.getChildrenSize():0,"element"),_e(S)}else if(_){const S=a.observers.get(m.getKey());S||H(335,m.getKey());const[x]=S;if(h.is(g)||(x.$setAnchorCellForSelection(Bn(x,h)),x.$setFocusCellForSelection(Bn(x,g),!0)),x.pointerType==="touch"&&x.isSelecting&&s.isCollapsed()&&N(l)&&l.isCollapsed()){const w=fo(l.anchor.getNode());w&&!w.is(g)&&(x.$setAnchorCellForSelection(Bn(x,w)),x.$setFocusCellForSelection(Bn(x,g),!0),x.pointerType=null)}}})(t,n);for(const[s,a]of n.$getTableNodesAndObservers())h0(e,s,a);return!1}function h0(n,e,t){const r=z(),o=yt();r&&!r.is(o)&&(ke(r)||ke(o))&&t.tableSelection&&!t.tableSelection.is(o)&&(ke(r)&&r.tableKey===t.tableNodeKey?t.$updateTableTableSelection(r):!ke(r)&&ke(o)&&o.tableKey===t.tableNodeKey&&t.$updateTableTableSelection(null)),t.hasHijackedSelectionStyles&&!e.isSelected()?(function(i,s){s.$enableHighlightStyle(),cl(s.table,a=>{const l=a.elem;a.highlighted=!1,cp(i,a),l.getAttribute("style")||l.removeAttribute("style")})})(n,t):!t.hasHijackedSelectionStyles&&e.isSelected()&&(function(i,s){s.$disableHighlightStyle(),cl(s.table,a=>{a.highlighted=!0,up(i,a)})})(n,t)}function Od(n){return n[$r]||null}function os(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 Md(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 o=r.nodeName;o!=="TD"&&o!=="TH"||(t=r._cell||null)}return null}function Ar(n,e){const t=[],r={columns:0,domRows:t,rows:0};let o=mn(n,e).querySelector("tr"),i=0,s=0;for(t.length=0;o!=null;){const a=o.nodeName;if(a==="TD"||a==="TH"){const c={elem:o,hasBackgroundColor:o.style.backgroundColor!=="",highlighted:!1,x:i,y:s};o._cell=c;let d=t[s];d===void 0&&(d=t[s]=[]),d[i]=c}else{const c=o.firstChild;if(c!=null){o=c;continue}}const l=o.nextSibling;if(l!=null){i++,o=l;continue}const u=o.parentNode;if(u!=null){const c=u.nextSibling;if(c==null)break;s++,i=0,o=c}}return r.columns=i+1,r.rows=s+1,r}function ci(n,e,t){const r=new Set(t?t.getNodes():[]);cl(e,(o,i)=>{const s=o.elem;r.has(i)?(o.highlighted=!0,up(n,o)):(o.highlighted=!1,cp(n,o),s.getAttribute("style")||s.removeAttribute("style"))})}function cl(n,e){const{domRows:t}=n;for(let r=0;r<t.length;r++){const o=t[r];if(o)for(let i=0;i<o.length;i++){const s=o[i];if(!s)continue;const a=Ge(s.elem);a!==null&&e(s,a,{x:i,y:r})}}}const g0=(n,e,t,r,o)=>{const i=o==="forward";switch(o){case"backward":case"forward":return t!==(i?n.table.columns-1:0)?fi(e.getCellNodeFromCordsOrThrow(t+(i?1:-1),r,n.table),i):r!==(i?n.table.rows-1:0)?fi(e.getCellNodeFromCordsOrThrow(i?0:n.table.columns-1,r+(i?1:-1),n.table),i):i?e.selectNext():e.selectPrevious(),!0;case"up":return r!==0?fi(e.getCellNodeFromCordsOrThrow(t,r-1,n.table),!1):e.selectPrevious(),!0;case"down":return r!==n.table.rows-1?fi(e.getCellNodeFromCordsOrThrow(t,r+1,n.table),!0):e.selectNext(),!0;default:return!1}};function aa(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 di([n,e]){return[n==="minColumn"?"maxColumn":"minColumn",e==="minRow"?"maxRow":"minRow"]}function pr(n,e,[t,r]){const o=e[r],i=n[o];i===void 0&&H(250,r,String(o));const s=e[t],a=i[s];return a===void 0&&H(250,t,String(s)),a}function p0(n,e,t,r,o){const i=rs(e,t,r),s=(function(x,w){const{minColumn:v,maxColumn:E,minRow:A,maxRow:T}=w;let M=1,j=1,R=1,B=1;const Q=x[A],ie=x[T];for(let Z=v;Z<=E;Z++)M=Math.max(M,Q[Z].cell.__rowSpan),B=Math.max(B,ie[Z].cell.__rowSpan);for(let Z=A;Z<=T;Z++)j=Math.max(j,x[Z][v].cell.__colSpan),R=Math.max(R,x[Z][E].cell.__colSpan);return{bottomSpan:B,leftSpan:j,rightSpan:R,topSpan:M}})(e,i),{topSpan:a,leftSpan:l,bottomSpan:u,rightSpan:c}=s,d=(function(x,w){const v=aa(x,w);return v===null&&H(249,w.cell.getKey()),v})(i,t),[f,h]=di(d);let g=i[f],m=i[h];o==="forward"?g+=f==="maxColumn"?1:l:o==="backward"?g-=f==="minColumn"?1:c:o==="down"?m+=h==="maxRow"?1:a:o==="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(x,w,v){const E=rs(x,w,v),A=aa(E,w);if(A)return[pr(x,E,A),pr(x,E,di(A))];const T=aa(E,v);if(T)return[pr(x,E,di(T)),pr(x,E,T)];const M=["minColumn","minRow"];return[pr(x,E,M),pr(x,E,di(M))]})(e,t,y),k=Bn(n,_.cell),S=Bn(n,b.cell);return n.$setAnchorCellForSelection(k),n.$setFocusCellForSelection(S,!0),!0}function At(n,e){if(N(n)||ke(n)){const t=e.isParentOf(n.anchor.getNode()),r=e.isParentOf(n.focus.getNode());return t&&r}return!1}function fi(n,e){e?n.selectStart():n.selectEnd()}function up(n,e){const t=e.elem,r=n._config.theme;J(Ge(t))||H(131),Ae(t,r.tableCellSelected)}function cp(n,e){const t=e.elem;J(Ge(t))||H(131);const r=n._config.theme;Xt(t,r.tableCellSelected)}function fo(n){const e=U(n,J);return J(e)?e:null}function Hr(n){const e=U(n,ye);return ye(e)?e:null}function m0(n,e,t,r,o,i,s){const a=Qe(t.focus,o?"previous":"next");if(Ts(a))return!1;let l=a;for(const p of Wr(a).iterNodeCarets("shadowRoot")){if(!It(p)||!C(p.origin))return!1;l=p}const u=l.getParentAtCaret();if(!J(u))return!1;const c=u,d=(function(p){for(const y of Wr(p).iterNodeCarets("root")){const{origin:_}=y;if(J(_)){if(Xe(y))return Re(_,p.direction)}else if(!Ce(_))break}return null})(ue(c,l.direction)),f=U(c,ye);if(!f||!f.is(i))return!1;const h=n.getElementByKey(c.getKey()),g=os(h);if(!h||!g)return!1;const m=_0(n,f);if(s.table=m,d)if(r==="extend"){const p=os(n.getElementByKey(d.origin.getKey()));if(!p)return!1;s.$setAnchorCellForSelection(g),s.$setFocusCellForSelection(p,!0)}else{const p=Ve(d);Mt(t.anchor,p),Mt(t.focus,p)}else if(r==="extend")s.$setAnchorCellForSelection(g),s.$setFocusCellForSelection(g,!0);else{const p=(function(y){const _=Zn(y);return Xe(_)?Ve(_):y})(ue(f,a.direction));Mt(t.anchor,p),Mt(t.focus,p)}return un(e),!0}function dp(n,e,t,r,o,i){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=z();if(!At(s,r)){if(N(s)){if(t==="backward"){if(s.focus.offset>0)return!1;const a=(function(u){for(let c=u,d=u;d!==null;c=d,d=d.getParent())if(C(d)){if(d!==c&&d.getFirstChild()!==c)return null;if(!d.isInline())return d}return null})(s.focus.getNode());if(!a)return!1;const l=a.getPreviousSibling();return!!ye(l)&&(un(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=U(a,h=>ye(h));if(J(l)&&(l=U(l,ye)),l!==r||!l)return!1;const u=t==="down"?l.getNextSibling():l.getPreviousSibling();if(!u)return!1;let c=0;t==="up"&&C(u)&&(c=u.getChildrenSize());let d=u;t==="up"&&C(u)&&(d=u.getLastChild()||u,c=D(d)?d.getTextContentSize():0);const f=s.clone();return f.focus.set(d.getKey(),c,D(d)?"text":"element"),_e(f),un(e),!0}if(Se(a)){const l=t==="up"?s.getNodes()[s.getNodes().length-1]:s.getNodes()[0];if(l&&Ms(r,l)!==null){const u=r.getFirstDescendant(),c=r.getLastDescendant();if(!u||!c)return!1;const[d]=Vt(u),[f]=Vt(c),h=r.getCordsFromCellNode(d,o.table),g=r.getCordsFromCellNode(f,o.table),m=r.getDOMCellFromCordsOrThrow(h.x,h.y,o.table),p=r.getDOMCellFromCordsOrThrow(g.x,g.y,o.table);return o.$setAnchorCellForSelection(m),o.$setFocusCellForSelection(p,!0),!0}return!1}{let l=U(a,c=>C(c)&&!c.isInline());if(J(l)&&(l=U(l,ye)),!l)return!1;const u=t==="down"?l.getNextSibling():l.getPreviousSibling();if(ye(u)&&o.tableNodeKey===u.getKey()){const c=u.getFirstDescendant(),d=u.getLastDescendant();if(!c||!d)return!1;const[f]=Vt(c),[h]=Vt(d),g=s.clone();return g.focus.set((t==="up"?f:h).getKey(),t==="up"?0:h.getChildrenSize(),"element"),un(e),_e(g),!0}}}}return t==="down"&&is(n)&&i.setShouldCheckSelectionForTable(r.getKey()),!1}if(N(s)){if(t==="backward"||t==="forward")return m0(n,e,s,e.shiftKey?"extend":"move",t==="backward",r,o);if(s.isCollapsed()){const{anchor:a,focus:l}=s,u=U(a.getNode(),J),c=U(l.getNode(),J);if(!J(u)||!u.is(c))return!1;const d=Hr(u);if(d!==r&&d!=null){const _=mn(d,n.getElementByKey(d.getKey()));if(_!=null)return o.table=Ar(d,_),dp(n,e,t,d,o,i)}const f=n.getElementByKey(u.__key),h=n.getElementByKey(a.key);if(h==null||f==null)return!1;let g;if(a.type==="element")g=h.getBoundingClientRect();else{const _=Pe(Os(n));if(_===null||_.rangeCount===0)return!1;const b=Ph(_,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){un(e);const _=r.getCordsFromCellNode(u,o.table);if(!e.shiftKey)return g0(o,r,_.x,_.y,t);{const b=r.getDOMCellFromCordsOrThrow(_.x,_.y,o.table);o.$setAnchorCellForSelection(b),o.$setFocusCellForSelection(b,!0)}return!0}}}else if(ke(s)){const{anchor:a,focus:l,tableKey:u}=s;if(u!==r.getKey())return!1;const c=U(a.getNode(),J),d=U(l.getNode(),J),[f]=s.getNodes();ye(f)||H(251);const h=mn(f,n.getElementByKey(f.getKey()));if(!J(c)||!J(d)||!ye(f)||h==null)return!1;o.$updateTableTableSelection(s);const g=Ar(f,h),m=r.getCordsFromCellNode(c,g),p=r.getDOMCellFromCordsOrThrow(m.x,m.y,g);if(o.$setAnchorCellForSelection(p),un(e),e.shiftKey){const[y,_,b]=Bt(r,c,d);return p0(o,y,_,b,t)}return d.selectEnd(),!0}return!1}function un(n){n.preventDefault(),n.stopImmediatePropagation(),n.stopPropagation()}function jd(n,e,t){const r=Y();n==="first"?e.insertBefore(r):e.insertAfter(r),r.append(...t||[]),r.selectEnd()}function Rd(n,e,t){const r=t.getParent();if(!r)return;const o=Pe(Os(n));if(!o)return;const i=ft(o,n.getRootElement()).anchorNode,s=n.getElementByKey(r.getKey()),a=mn(t,n.getElementByKey(t.getKey()));if(!i||!s||!a||!s.contains(i)||a.contains(i))return;const l=U(e.anchor.getNode(),_=>J(_));if(!l)return;const u=U(l,_=>ye(_));if(!ye(u)||!u.is(t))return;const[c,d]=Bt(t,l,l),f=c[0][0],h=c[c.length-1][c[0].length-1],{startRow:g,startColumn:m}=d,p=g===f.startRow&&m===f.startColumn,y=g===h.startRow&&m===h.startColumn;return p?"first":y?"last":void 0}function Bn(n,e){const{tableNode:t}=n.$lookup(),r=t.getCordsFromCellNode(e,n.table);return t.getDOMCellFromCordsOrThrow(r.x,r.y,n.table)}function dl(n,e,t){return Ms(n,Ge(e,t))}function Pd(n){return q(n)&&n.nodeName==="DIV"}function Ld(n,e,t){let r=n.querySelector(":scope > colgroup");if(!t)return void(r&&r.remove());r||(r=ae().createElement("colgroup"),Hi(r),n.insertBefore(r,n.firstChild));const o=[];for(let i=0;i<e;i++){const s=ae().createElement("col"),a=t[i];a&&(s.style.width=`${a}px`),o.push(s)}r.replaceChildren(...o)}function Id(n,e,t){if(!e.theme.tableAlignment)return;const r=[],o=[];for(const i of["center","right"]){const s=e.theme.tableAlignment[i];s&&(i===t?o:r).push(s)}Xt(n,...r),Ae(n,...o)}const fl=new WeakSet;function is(n=we()){return fl.has(n)}function Bd(n=we()){const e=Gr(n,"@lexical/table/Table");return!!e&&e.output.hasStickyScrollbar.peek()&&e.output.hasHorizontalScroll.peek()}function y0(n,e){e?fl.add(n):fl.delete(n)}class nr extends Ee{__rowStriping=!1;__frozenColumnCount=0;__frozenRowCount=0;__colWidths=void 0;$config(){return this.config("table",{extends:Ee,importDOM:{table:()=>({conversion:b0,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=Ln(e)?e:e.querySelector("table");return Ln(t)||H(229),super.getDOMSlot(e).withElement(t).withAfter(t.querySelector(":scope > colgroup"))}createDOM(e,t){const r=ae().createElement("table");if(this.__style&&Sn(r.style,this.__style),this.getColWidths()){const o=ae().createElement("colgroup");r.appendChild(o),Hi(o)}if(Ae(r,e.theme.table),this.updateTableElement(null,r,e),is(t)){const o=Bd(t),i=(function(s,a,l){const u=ae().createElement("div"),c=a.theme.tableScrollableWrapper;return c?Ae(u,c):u.style.overflowX="auto",l&&(u.style.scrollbarWidth="none"),u.appendChild(s),u})(r,e,o);if(this.updateTableWrapper(null,i,r,e),o){const s=(function(l){const u=ae(),c=u.createElement("div"),d=l.theme.tableStickyScrollbar;d?Ae(c,d):(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 f=u.createElement("div");return f.style.height="1px",f.style.width="0px",c.appendChild(f),c})(e),a=ae().createElement("div");return a.setAttribute("data-lexical-sticky-scrollbar","true"),a.appendChild(i),a.appendChild(s),Hi(s),a}return i}return r}updateTableWrapper(e,t,r,o){this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&(function(i,s,a,l){l>0?(Ae(i,a.theme.tableFrozenColumn),s.setAttribute("data-lexical-frozen-column","true")):(Xt(i,a.theme.tableFrozenColumn),s.removeAttribute("data-lexical-frozen-column"))})(t,r,o,this.__frozenColumnCount),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&(function(i,s,a,l){l>0?(Ae(i,a.theme.tableFrozenRow),s.setAttribute("data-lexical-frozen-row","true")):(Xt(i,a.theme.tableFrozenRow),s.removeAttribute("data-lexical-frozen-row"))})(t,r,o,this.__frozenRowCount)}updateTableElement(e,t,r){this.__style!==(e?e.__style:"")&&Sn(t.style,this.__style,e?e.__style:""),this.__rowStriping!==(!!e&&e.__rowStriping)&&(function(s,a,l){l?(Ae(s,a.theme.tableRowStriping),s.setAttribute("data-lexical-row-striping","true")):(Xt(s,a.theme.tableRowStriping),s.removeAttribute("data-lexical-row-striping"))})(t,r,this.__rowStriping);const o=e?e.getColumnCount():0,i=e?e.__colWidths:void 0;this.getColumnCount()===o&&this.getColWidths()===i||Ld(t,this.getColumnCount(),this.getColWidths()),Id(t,r,this.getFormatType())}updateDOM(e,t,r){const o=mn(this,t);if(t===o===is())return!0;if(Pd(t)){if(t.hasAttribute("data-lexical-sticky-scrollbar")!==Bd())return!0;const i=o.parentElement;Pd(i)&&this.updateTableWrapper(e,i,o,r)}return this.updateTableElement(e,o,r),!1}scaleDOMColWidths(e,t){const r=this.getColWidths();r&&Ld(mn(this,e),this.getColumnCount(),r.map(o=>o*t))}exportDOM(e){const t=super.exportDOM(e),{element:r}=t;return{after:o=>{if(t.after&&(o=t.after(o)),!Ln(o)&&q(o)&&(o=o.querySelector("table")),!Ln(o))return null;Id(o,e._config,this.getFormatType());const[i]=cn(this,null,null),s=new Map;for(const c of i)for(const d of c){const f=d.cell.getKey();s.has(f)||s.set(f,{colSpan:d.cell.getColSpan(),startColumn:d.startColumn})}const a=new Set;for(const c of o.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){const d=c.getAttribute("data-temporary-table-cell-lexical-key");if(d){const f=s.get(d);if(c.removeAttribute("data-temporary-table-cell-lexical-key"),f){s.delete(d);for(let h=0;h<f.colSpan;h++)a.add(h+f.startColumn)}}}const l=o.querySelector(":scope > colgroup");if(l){const c=Array.from(o.querySelectorAll(":scope > colgroup > col")).filter((d,f)=>a.has(f));l.replaceChildren(...c)}const u=o.querySelectorAll(":scope > tr");if(u.length>0){const c=ae().createElement("tbody");for(const d of u)c.appendChild(d);o.append(c)}return o},element:!Ln(r)&&q(r)?r.querySelector("table"):r}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,t){const{rows:r,domRows:o}=t;for(let i=0;i<r;i++){const s=o[i];if(s!=null)for(let a=0;a<s.length;a++){const l=s[a];if(l==null)continue;const{elem:u}=l,c=dl(this,u);if(c!==null&&e.is(c))return{x:a,y:i}}}throw new Error("Cell not found in table.")}getDOMCellFromCords(e,t,r){const{domRows:o}=r,i=o[t];if(i==null)return null;const s=i[e<i.length?e:i.length-1];return s??null}getDOMCellFromCordsOrThrow(e,t,r){const o=this.getDOMCellFromCords(e,t,r);if(!o)throw new Error("Cell not found at cords.");return o}getCellNodeFromCords(e,t,r){const o=this.getDOMCellFromCords(e,t,r);if(o==null)return null;const i=Ge(o.elem);return J(i)?i:null}getCellNodeFromCordsOrThrow(e,t,r){const o=this.getCellNodeFromCords(e,t,r);if(!o)throw new Error("Node at cords not TableCellNode.");return o}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(!Ce(e))return 0;let t=0;return e.getChildren().forEach(r=>{J(r)&&(t+=r.getColSpan())}),t}}function _0(n,e){const t=n.getElementByKey(e.getKey());return t===null&&H(230),Ar(e,t)}function b0(n){const e=Vo();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 o of t.querySelectorAll(":scope > col")){let i=o.style.width||"";if(!Dr.test(i)&&(i=o.getAttribute("width")||"",!/^\d+$/.test(i))){r=void 0;break}r.push(parseFloat(i))}r&&e.setColWidths(r)}return{after:r=>Yi(r,Ce),node:e}}function Vo(){return tt(new nr)}function ye(n){return n instanceof nr}function k0(n){Ce(n.getParent())?n.isEmpty()&&n.append(Y()):n.remove()}function x0(n){ye(n.getParent())?rg(n,J):n.remove()}function C0(n){rg(n,Ce);const[e]=cn(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;Ce(a)||H(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=_t();c.append(Y()),a.append(c)}}const o=n.getColWidths(),i=n.getColumnCount();if(o&&o.length!==i){let s;if(i<o.length)s=o.slice(0,i);else if(o.length>0){const a=o[o.length-1];s=[...o,...Array(i-o.length).fill(a)]}n.setColWidths(s)}}function v0(n){if(n.detail<3||!Lt(n.target))return!1;const e=Ge(n.target);if(e===null)return!1;const t=U(e,r=>C(r)&&!r.isInline());return t===null?!1:!!J(t.getParent())&&(t.select(0),!0)}function S0(){const n=z();if(!N(n))return!1;const e=Hr(n.anchor.getNode());if(e===null)return!1;const t=ge();if(!t.is(e.getParent())||t.getChildrenSize()!==1)return!1;const[r]=cn(e,null,null);if(r.length===0||r[0].length===0)return!1;const o=r[0][0];if(!o||!o.cell)return!1;const i=r[r.length-1],s=i[i.length-1];if(!s||!s.cell)return!1;const a=ul(e,o.cell,s.cell);return _e(a),!0}function w0(n){return n.registerNodeTransform(On,e=>{if(e.getColSpan()>1||e.getRowSpan()>1){const[,,t]=Vt(e),[r]=Bt(t,e,e),o=r.length,i=r[0].length;let s=t.getFirstChild();Ce(s)||H(175);const a=[];for(let l=0;l<o;l++){l!==0&&(s=s.getNextSibling(),Ce(s)||H(175));let u=null;for(let c=0;c<i;c++){const d=r[l][c],f=d.cell;if(d.startRow===l&&d.startColumn===c)u=f,a.push(f);else if(f.getColSpan()>1||f.getRowSpan()>1){J(f)||H(176);const h=_t(f.__headerState);u!==null?u.insertAfter(h):p_(s,h)}}}for(const l of a)l.setColSpan(1),l.setRowSpan(1)}})}function E0(n,e=!0){const t=new i0,r=(o,i,s)=>{const a=mn(o,s),l=d0(o,a,n,e,t);t.observers.set(i,[l,a])};return Ze(c0(n,t),n.registerCommand(qt,()=>f0(t,n),xt),n.registerMutationListener(nr,o=>{n.read("latest",()=>{for(const[i,s]of o){const a=t.observers.get(i);if(s==="created"||s==="updated"){const{tableNode:l,tableElement:u}=ap(i);a===void 0?r(l,i,u):u!==a[1]&&(t.removeObserver(i),r(l,i,u))}else s==="destroyed"&&t.removeObserver(i)}})},{skipInitialization:!1}),()=>{t.removeAllObservers()})}function T0(n,e){n.hasNodes([nr])||H(255);const{hasNestedTables:t=Ho(!1)}=e??{};return Ze(n.registerCommand(Vk,r=>(function({rows:o,columns:i,includeHeaders:s},a){const l=z()||yt();if(!l||!N(l)||!a&&Hr(l.anchor.getNode()))return!1;const u=Xk(Number(o),Number(i),s);g_(u);const c=u.getFirstDescendant();return D(c)&&c.select(),!0})(r,t.peek()),G),n.registerCommand(Df,(r,o)=>n===o&&(function(i,s){const{nodes:a,selection:l}=i;if(!a.some(d=>ye(d)||a_(d).some(f=>ye(f.node)))){if(ke(l)){let d="",f=!1;for(const h of a){const g=C(h)&&!h.isInline();d.length>0&&(g||f)&&(d+=`
|
|
28
28
|
`),d+=h.getTextContent(),f=g}return l.insertRawText(d),!0}return!1}const u=ke(l),c=N(l);return c&&U(l.anchor.getNode(),d=>J(d))!==null&&U(l.focus.getNode(),d=>J(d))!==null||u?a.length===1&&ye(a[0])?sp(a[0],l):!(c&&s.peek()&&!(function(d){return!!(ke(d)&&!d.focus.getNode().is(d.anchor.getNode())||N(d)&&J(d.anchor.getNode())&&!d.anchor.getNode().is(d.focus.getNode()))})(l)):!1})(r,t),G),n.registerCommand(Tl,S0,mt),n.registerCommand(us,v0,G),n.registerNodeTransform(nr,C0),n.registerNodeTransform(Jo,x0),n.registerNodeTransform(On,k0))}je.tag("table"),je.tag("tr"),je.tag("td","th");const N0=/^\|(.+)\|\s*$/,D0=n=>gu(Yo,n).replace(/\n+/g," ").replace(/\|/g,"\\|").trim(),$0=n=>{const e=n.trim().replace(/^\|/,"").replace(/\|$/,""),t=[];let r="";for(let o=0;o<e.length;o++){const i=e[o];if(i==="\\"&&e[o+1]==="|"){r+="|",o++;continue}if(i==="|"){t.push(r),r="";continue}r+=i}return t.push(r),t},A0=n=>{const e=_t(ce.NO_STATUS);return op(n.trim(),Yo,e),e},Kd=(n,e)=>{const t=tr();for(let r=0;r<e;r++)t.append(A0(n[r]??""));return t},F0=n=>{const e=n.getFirstChild();return Ce(e)?e.getChildrenSize():0},z0=n=>{const e=n.getFirstChild();if(Ce(e))for(const t of e.getChildren())J(t)&&t.setHeaderStyles(ce.ROW,ce.ROW)},O0={dependencies:[nr,Jo,On],export:n=>{if(!ye(n))return null;const e=[];for(const t of n.getChildren()){if(!Ce(t))continue;const r=t.getChildren().filter(J);r.length!==0&&(e.push(`| ${r.map(D0).join(" | ")} |`),e.length===1&&e.push(`| ${r.map(()=>"---").join(" | ")} |`))}return e.length===0?null:e.join(`
|
|
29
|
-
`)},regExp:N0,replace:(n,e,t)=>{const r=t[0].trimEnd(),o=n.getPreviousSibling();if(Qg(r)){if(ye(o)){z0(o),n.remove();return}const a=e[0];D(a)&&a.setTextContent(r);return}const i=$0(r);if(ye(o)){o.append(Kd(i,F0(o))),n.remove();return}const s=Vo();s.append(Kd(i,i.length)),n.replace(s)},type:"element"},Yo=[O0,...hu],fp=O.createContext(null);function M0(n,e){return{getTheme:function(){return e??null}}}function rt(){const n=O.useContext(fp);return n==null&&(function(e,...t){const r=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const i of t)o.append("v",i);throw r.search=o.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 Wd(n,e){return n.read("latest",()=>{const t=te(e);return t!==null&&t.isSelected()})}function j0(n){const[e]=rt(),[t,r]=O.useState(()=>Wd(e,n));return O.useEffect(()=>{let o=!0;const i=e.registerUpdateListener(()=>{o&&r(Wd(e,n))});return()=>{o=!1,i()}},[e,n]),[t,O.useCallback(o=>{e.update(()=>{let i=z();pe(i)||(i=Eo(),_e(i)),pe(i)&&(o?i.add(n):i.delete(n))})},[e,n]),O.useCallback(()=>{e.update(()=>{const o=z();pe(o)&&o.clear()})},[e])]}function R0({nodeKey:n}){const[e]=rt(),[t,r,o]=j0(n);return O.useEffect(()=>Qe(e.registerCommand(us,i=>{const s=e.getElementByKey(n);return Vn(i)===s&&(i.shiftKey||o(),r(!t),!0)},mt)),[o,e,t,n,r]),O.useEffect(()=>{const i=e.getElementByKey(n),s=e._config.theme.hrSelected??"selected";i!==null&&(t?Ae(i,s):Xt(i,s))},[e,t,n]),null}let hp=class extends tu{$config(){return this.config("horizontalrule",{importDOM:{hr:()=>({conversion:P0,priority:0})}})}decorate(){return F.jsx(R0,{nodeKey:this.__key})}};function P0(){return{node:L0()}}function L0(){return tt(new hp)}class gp extends _s{__src;__alt;$config(){return this.config("image",{importDOM:{img:()=>({conversion:I0,priority:0})}})}constructor(e="",t="",r){super(r),this.__src=e,this.__alt=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__src=e.__src,this.__alt=e.__alt}createDOM(e){const t=this.buildImage();return Ae(t,e.theme.image),t}updateDOM(e,t){return e.__src!==this.__src&&t.setAttribute("src",this.__src),e.__alt!==this.__alt&&t.setAttribute("alt",this.__alt),!1}exportDOM(){return{element:this.buildImage()}}exportJSON(){return{...super.exportJSON(),alt:this.getAlt(),src:this.getSrc()}}updateFromJSON(e){return super.updateFromJSON(e).setSrc(e.src).setAlt(e.alt)}getSrc(){return this.getLatest().__src}setSrc(e){const t=this.getWritable();return t.__src=e,t}getAlt(){return this.getLatest().__alt}setAlt(e){const t=this.getWritable();return t.__alt=e,t}getTextContent(){return this.getAlt()}isInline(){return!0}buildImage(){const e=ae().createElement("img");return e.setAttribute("src",this.__src),e.setAttribute("alt",this.__alt),e}}const I0=n=>({node:tt(new gp(n.getAttribute("src")??"",n.getAttribute("alt")??""))}),pp=[Fs,As,ar,zn,Dn,uu,nr,Jo,On,$s,lu,hp,gp],B0={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",image:"inline-block h-auto max-w-full align-bottom",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"}},pu=(n,e)=>{const t=new DOMParser().parseFromString(ml(e),"text/html");return Ng(n,t)},K0=new Set(["root","paragraph","text","linebreak"]),W0=["bold","italic","strikethrough","underline","code","subscript","superscript","highlight"],q0=()=>{const n=new Set,e=t=>{const r=t.getType();if(K0.has(r)||n.add(r),D(t))for(const o of W0)t.hasFormat(o)&&n.add(o);if(C(t))for(const o of t.getChildren())e(o)};return e(ge()),[...n].sort()},U0=n=>({html:ml(su(n,null)),text:gu(Yo),formatting:q0()}),mp=()=>Fl({namespace:"compose-conversion",nodes:[...pp],onError:n=>{throw n}}),H0=n=>{const e=mp();return e.update(()=>{const t=ge();t.clear(),t.select(),ys(pu(e,n))},{discrete:!0}),e.read(()=>gu(Yo))},J0=n=>{const e=mp();return e.update(()=>{op(n,Yo)},{discrete:!0}),e.read(()=>ml(su(e,null)))},V0="Nothing to paste. The copied content was an image, or had no text in it.",Y0=(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}},X0=({value:n,onChange:e,onSubmit:t,initialCaret:r,placeholder:o="Write your message…",ariaLabel:i="Message body",trailing:s,lang:a})=>{const l=O.useRef(null),u=O.useRef(null),c=O.useRef(!1),[d,f]=O.useState(!1);O.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]),O.useEffect(()=>{if(!r)return;const m=l.current;if(!m)return;const p=setTimeout(()=>{if(of(m))return;m.focus();const y=r==="start"?0: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?H0(k):"")||b;if(S===""){f(!0);return}f(!1);const x=Y0(y,S);x&&(u.current=x.caret,e(x.value))};return F.jsxs("div",{className:"flex shrink-0 grow flex-col",children:[F.jsx("div",{className:"sticky top-0 z-10 border-b border-line bg-canvas",children:F.jsxs("div",{className:"flex items-center gap-2 px-3 py-1",children:[F.jsx("span",{className:"min-w-0 truncate py-2 text-xs text-fg-muted",children:"Markdown"}),s&&F.jsx("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:s})]})}),d&&F.jsx(zp,{tone:"info",variant:"soft",onDismiss:()=>f(!1),className:"mx-3 mt-2",children:V0}),F.jsx("textarea",{ref:l,value:n,onChange:m=>e(m.target.value),onKeyDown:h,onPaste:g,lang:a,"aria-label":i,placeholder:o,"data-testid":"compose-body-plain",spellCheck:!0,className:"w-full shrink-0 grow resize-none whitespace-pre-wrap break-words bg-canvas px-3 py-2 font-mono text-base text-fg outline-none placeholder:text-fg-subtle"})]})},G0=et?O.useLayoutEffect:O.useEffect,hi={tag:wr};function Z0({initialConfig:n,children:e}){const t=O.useMemo(()=>{const{theme:r,namespace:o,nodes:i,onError:s,onWarn:a,editorState:l,html:u}=n,c=M0(null,r),d=Fl({editable:n.editable,html:u,namespace:o,nodes:i,onError:f=>s(f,d),...a?{onWarn:f=>a(f,d)}:{},theme:r});return(function(f,h){if(h!==null){if(h===void 0)f.update(()=>{const g=ge();if(g.isEmpty()){const m=Y();g.append(m);const p=f.getRootElement(),y=et&&p!==null?$o(p):null;(z()!==null||y!==null&&y===p)&&m.select()}},hi);else if(h!==null)switch(typeof h){case"string":{const g=f.parseEditorState(h);f.setEditorState(g,hi);break}case"object":f.setEditorState(h,hi);break;case"function":f.update(()=>{ge().isEmpty()&&h(f)},hi)}}})(d,l),[d,c]},[]);return G0(()=>{const r=n.editable,[o]=t;o.setEditable(r===void 0||r)},[]),F.jsx(fp.Provider,{value:t,children:e})}function Q0(){return ge().getTextContent()}function ex(n,e=!0){if(n)return!1;let t=Q0();return e&&(t=t.trim()),t===""}function tx(n){if(!ex(n,!1))return!1;const e=ge().getChildren(),t=e.length;if(t>1)return!1;for(let r=0;r<t;r++){const o=e[r];if(ne(o))return!1;if(C(o)){if(!en(o)||o.__indent!==0)return!1;const i=o.getChildren(),s=i.length;for(let a=0;a<s;a++){const l=i[r];if(!D(l))return!1}}}return!0}function yp(n){return()=>tx(n)}const _p=et?O.useLayoutEffect:O.useEffect;function nx({editor:n,ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:r,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:d,ariaRequired:f,autoCapitalize:h,className:g,id:m,role:p="textbox",spellCheck:y=!0,style:_,tabIndex:b,"data-testid":k,...S},x){const[w,v]=O.useState(n.isEditable()),E=O.useCallback(T=>{T&&T.ownerDocument&&T.ownerDocument.defaultView?n.setRootElement(T):n.setRootElement(null)},[n]),A=O.useMemo(()=>(function(...T){return M=>{for(const j of T)typeof j=="function"?j(M):j!=null&&(j.current=M)}})(x,E),[E,x]);return _p(()=>(v(n.isEditable()),n.registerEditableListener(T=>{v(T)})),[n]),F.jsx("div",{"aria-activedescendant":w?e:void 0,"aria-autocomplete":w?t:"none","aria-controls":w?r:void 0,"aria-describedby":o,...i!=null?{"aria-errormessage":i}:{},"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?d:void 0,"aria-readonly":!w||void 0,"aria-required":f,autoCapitalize:h,className:g,contentEditable:w,"data-testid":k,id:m,ref:A,role:p,spellCheck:y,style:_,tabIndex:b??(w?void 0:-1),...S})}const rx=O.forwardRef(nx);function qd(n){return n.read("latest",yp(n.isComposing()))}const ox=O.forwardRef(ix);function ix(n,e){const{placeholder:t,...r}=n,[o]=rt();return F.jsxs(F.Fragment,{children:[F.jsx(rx,{editor:o,...r,ref:e}),t!=null&&F.jsx(sx,{editor:o,content:t})]})}function sx({content:n,editor:e}){const t=(function(s){const[a,l]=O.useState(()=>qd(s));return _p(()=>{function u(){const c=qd(s);l(c)}return u(),Qe(s.registerUpdateListener(()=>{u()}),s.registerEditableListener(()=>{u()}))},[s]),a})(e),[r,o]=O.useState(e.isEditable());if(O.useLayoutEffect(()=>(o(e.isEditable()),e.registerEditableListener(s=>{o(s)})),[e]),!t)return null;let i=null;return typeof n=="function"?i=n(r):n!==null&&(i=n),i===null?null:F.jsx("div",{"aria-hidden":!0,children:i})}class ax extends O.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 lx({children:n,fallback:e,onError:t}){return F.jsx(ax,{fallback:e===void 0?F.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}):e,onError:t,children:n})}function ux(n,e,t,r,o){if(n===null||t.size===0&&r.size===0&&!o)return 0;const i=e._selection,s=n._selection;if(o)return 1;if(!(N(i)&&N(s)&&s.isCollapsed()&&i.isCollapsed()))return 0;const a=(function(y,_,b){const k=y._nodeMap,S=[];for(const x of _){const w=k.get(x);w!==void 0&&S.push(w)}for(const[x,w]of b){if(!w)continue;const v=k.get(x);v===void 0||Oe(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(i.anchor.key),b=y.get(s.anchor.key);return _&&b&&!n._nodeMap.has(_.__key)&&D(_)&&_.__text.length===1&&i.anchor.offset===1?2:0}const l=a[0],u=n._nodeMap.get(l.__key);if(!D(u)||!D(l)||u.__mode!==l.__mode)return 0;const c=u.__text,d=l.__text;if(c===d)return 0;const f=i.anchor,h=s.anchor;if(f.key!==h.key||f.type!=="text")return 0;const g=f.offset,m=h.offset,p=d.length-c.length;return p===1&&m===g-1?2:p===-1&&m===g+1?3:p===-1&&m===g?4:0}function cx(n,e,t){let r=t(),o=0,i=r,s=0,a=null;return(l,u,c,d,f,h)=>{const g=t();if(h.has(Zf)&&(i=r,s=o,a=l),h.has(Da))return o=0,r=g,2;h.has(Oi)&&a&&(r=i,o=s,l=a);const m=h.has(Xf)||h.has(Gf)?0:ux(l,u,d,f,n.isComposing()),p=(()=>{const y=c===null||c.editor===n,_=h.has(Yf);if(!_&&y&&h.has(wr))return 0;if(m===1)return 2;if(l===null)return 1;const b=u._selection;if(!(d.size>0||f.size>0))return b!==null?0:2;const k=typeof e=="number"?e:e.peek();return _===!1&&m!==0&&m===o&&g<r+k&&y||d.size===1&&(function(S,x,w){const v=x._nodeMap.get(S),E=w._nodeMap.get(S),A=x._selection,T=w._selection;return!(N(A)&&N(T)&&A.anchor.type==="element"&&A.focus.type==="element"&&T.anchor.type==="text"&&T.focus.type==="text"||!D(v)||!D(E)||v.__parent!==E.__parent)&&JSON.stringify(x.read(()=>v.exportJSON()))===JSON.stringify(w.read(()=>E.exportJSON()))})(Array.from(d)[0],l,u)?0:1})();return r=g,o=m,p}}function Ud(n,e){n.undoStack=[],n.redoStack=[],n.current=null}function dx(n,e,t,r=Date.now,o,i=null){const s=cx(n,t,r);return Qe(n.registerCommand(cs,()=>((function(a,l,u){const c=l.redoStack,d=l.undoStack;if(d.length!==0){const f=l.current,h=d.pop();f!==null&&(c.push(f),a.dispatchCommand(ao,!0)),d.length===0&&a.dispatchCommand(lo,!1),l.current=h||null,h&&h.editor.setEditorState(h.editorState,{tag:Da})}})(n,e),!0),G),n.registerCommand(ds,()=>((function(a,l,u){const c=l.redoStack,d=l.undoStack;if(c.length!==0){const f=l.current;f!==null&&(d.push(f),a.dispatchCommand(lo,!0));const h=c.pop();c.length===0&&a.dispatchCommand(ao,!1),l.current=h||null,h&&h.editor.setEditorState(h.editorState,{tag:Da})}})(n,e),!0),G),n.registerCommand(Rm,()=>(Ud(e),!1),G),n.registerCommand(Pm,()=>(Ud(e),n.dispatchCommand(ao,!1),n.dispatchCommand(lo,!1),!0),G),n.registerUpdateListener(({editorState:a,prevEditorState:l,dirtyLeaves:u,dirtyElements:c,tags:d})=>{const f=e.current,h=e.redoStack,g=e.undoStack,m=f===null?null:f.editorState;if(f!==null&&a===m)return;const p=s(l,a,f,u,c,d);if(p===1){if(h.length!==0&&(e.redoStack=[],n.dispatchCommand(ao,!1)),f!==null){g.push({...f});const y=typeof i=="number"||i===null?i:i.peek();y!==null&&g.length>y&&g.splice(0,g.length-y),n.dispatchCommand(lo,!0)}}else if(p===2)return;e.current={editor:n,editorState:a}}))}function fx(){return{current:null,redoStack:[],undoStack:[]}}function hx({delay:n,externalHistoryState:e}){const[t]=rt();return(function(r,o,i=1e3){const s=O.useMemo(()=>o||fx(),[o]);O.useEffect(()=>dx(r,s,i),[i,r,s])})(t,e,n),null}function gx({validateUrl:n,attributes:e}){const[t]=rt();return O.useEffect(()=>{if(!t.hasNodes([Dn]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),O.useEffect(()=>zb(t,b_({attributes:e,validateUrl:n})),[t,n,e]),null}function px({hasStrictIndent:n=!1,shouldPreserveNumbering:e=!1}){const[t]=rt();return O.useEffect(()=>{if(!t.hasNodes([ar,zn]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),O.useEffect(()=>Qe(ud(t,{restoreNumbering:e}),n?Hb(t):()=>{}),[t,n,e]),(function(r){O.useEffect(()=>ud(r),[r])})(t),null}const mx=et?O.useLayoutEffect:O.useEffect;function yx(n){return{initialValueFn:()=>n.isEditable(),subscribe:e=>n.registerEditableListener(e)}}function _x(){return(function(n){const[e]=rt(),t=O.useMemo(()=>n(e),[e,n]),[r,o]=O.useState(()=>t.initialValueFn()),i=O.useRef(r);return mx(()=>{const{initialValueFn:s,subscribe:a}=t,l=s();return i.current!==l&&(i.current=l,o(l)),a(u=>{i.current=u,o(u)})},[t,n]),r})(yx)}const bx={name:"@lexical/react/ReactProvider"};function kx(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 mu=et?O.useLayoutEffect:O.useEffect;function xx({editor:n,ErrorBoundary:e}){return(function(t,r){const[o,i]=O.useState(()=>t.getDecorators());return mu(()=>t.registerDecoratorListener(s=>{xu.flushSync(()=>{i(s)})}),[t]),O.useEffect(()=>{i(t.getDecorators())},[t]),O.useMemo(()=>{const s=[],a=Object.keys(o);for(let l=0;l<a.length;l++){const u=a[l],c=F.jsx(r,{onError:f=>t._onError(f),children:F.jsx(O.Suspense,{fallback:null,children:o[u]})}),d=t.getElementByKey(u);d!==null&&s.push(xu.createPortal(c,d,u))}return s},[r,o,t])})(n,e)}function Cx({editor:n,ErrorBoundary:e}){return(function(t){const r=hg.maybeFromEditor(t);if(r&&r.hasExtensionByName(bx.name)){for(const o of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(o)&&kx(320,o);return!0}return!1})(n)?null:F.jsx(xx,{editor:n,ErrorBoundary:e})}function Hd(n){return n.read("latest",yp(n.isComposing()))}function vx({contentEditable:n,placeholder:e=null,ErrorBoundary:t}){const[r]=rt();return(function(o){mu(()=>Qe(pk(o),uk(o)),[o])})(r),F.jsxs(F.Fragment,{children:[n,F.jsx(Sx,{content:e}),F.jsx(Cx,{editor:r,ErrorBoundary:t})]})}function Sx({content:n}){const[e]=rt(),t=(function(o){const[i,s]=O.useState(()=>Hd(o));return mu(()=>{function a(){const l=Hd(o);s(l)}return a(),Qe(o.registerUpdateListener(()=>{a()}),o.registerEditableListener(()=>{a()}))},[o]),i})(e),r=_x();return t?typeof n=="function"?n(r):n:null}function wx({hasCellMerge:n=!0,hasCellBackgroundColor:e=!0,hasTabHandler:t=!0,hasHorizontalScroll:r=!1,hasNestedTables:o=!1}){const[i]=rt();O.useEffect(()=>{is(i)!==r&&(y0(i,r),i.update(hh))},[i,r]);const s=(function(a){const[l]=O.useState(()=>Ho(a));return l.peek()!==a&&(l.value=a),l})(o);return O.useEffect(()=>T0(i,{hasNestedTables:s}),[i,s]),O.useEffect(()=>E0(i,t),[i,t]),O.useEffect(()=>{if(!n)return w0(i)},[i,n]),O.useEffect(()=>{if(!e)return i.registerNodeTransform(On,a=>{a.getBackgroundColor()!==null&&a.setBackgroundColor(null)})},[i,e,n]),null}const Ex=["w-28","w-20","w-24"],Jd=({word:n,suggestions:e,failure:t,language:r,onReplace:o,onIgnore:i,onAddWord:s})=>F.jsxs(F.Fragment,{children:[F.jsx("p",{lang:r,"data-testid":"spell-word",className:"px-4 pb-1 pt-1.5 text-xs font-medium text-fg-subtle",children:n}),e===null&&t===null?Ex.map(a=>F.jsx("div",{"aria-hidden":"true","data-testid":"spell-suggestion-skeleton",className:"flex min-h-11 items-center px-4 py-2.5",children:F.jsx("span",{className:`h-3 animate-pulse rounded bg-surface-sunken ${a}`})},a)):null,t!==null&&F.jsxs("p",{role:"alert","data-testid":"spell-suggestions-failed",className:"px-4 py-2 text-sm text-danger",children:["No suggestions came back: ",t]}),e?.length===0&&F.jsx("p",{"data-testid":"spell-no-suggestions",className:"px-4 py-2 text-sm text-fg-muted",children:"No suggestions for this word."}),e?.map(a=>F.jsx(js,{label:a,lang:r,"data-testid":"spell-suggestion",className:"font-medium",onSelect:()=>o(a)},a)),F.jsx("hr",{className:"my-1 border-line"}),F.jsx(js,{label:"Ignore for now",icon:F.jsx(Pp,{className:"size-4"}),"data-testid":"spell-ignore",onSelect:i}),s&&F.jsx(js,{label:"Add to dictionary",icon:F.jsx(Yp,{className:"size-4"}),"data-testid":"spell-add-word",onSelect:s})]}),Tx=({anchor:n,onDismiss:e,...t})=>{const r=Op(Mp),o=O.useRef(null);jp({containerRef:o,itemSelector:'[role="menuitem"]'}),O.useEffect(()=>{o.current?.focus()},[]),Rp({id:"correction-menu",open:r,answers:{back:()=>e(!0)}}),O.useEffect(()=>{if(!r)return;const s=a=>{o.current?.contains(a.target)||e(!1)};return document.addEventListener("pointerdown",s),()=>document.removeEventListener("pointerdown",s)},[r,e]);const i=s=>{s.key!=="Escape"&&s.key!=="Tab"||(s.preventDefault(),s.stopPropagation(),e(!0))};return r?F.jsx(Up,{open:!0,align:"start",panelRef:o,getAnchor:()=>n,children:F.jsx(Hp,{ref:o,label:`Corrections for ${t.word}`,onKeyDown:i,"data-testid":"spell-menu",className:"max-w-64",children:F.jsx(Jd,{...t})})}):F.jsx(qp,{open:!0,onClose:()=>e(!0),dismissLabel:"Close corrections",children:F.jsx("div",{ref:o,role:"menu","aria-label":`Corrections for ${t.word}`,tabIndex:-1,onKeyDown:i,"data-testid":"spell-menu",className:"flex flex-col overflow-y-auto pb-4 outline-none",children:F.jsx(Jd,{...t})})})},Nx=5e3,Dx="https://github.com/remit-mail/reader/issues/new",$x=(n,e)=>{const t=`Spellcheck dictionary failed to load (${n})`,r=[`Language: ${n}`,`What happened: ${e}`,"","What I was doing:"].join(`
|
|
30
|
-
`);return`${Dx}?title=${encodeURIComponent(t)}&body=${encodeURIComponent(r)}`},la=({tone:n,children:e})=>F.jsx("div",{role:"status","data-testid":"spellcheck-notice",className:`flex items-start gap-2 border-t px-3 py-1.5 text-xs ${n==="danger"?"border-danger/30 bg-danger-soft":"border-border bg-surface-sunken"}`,children:e});function Ax({status:n,standDown:e,onCancel:t,onRetry:r}){const[o,i]=O.useState(!1),s=n.state==="opening";return O.useEffect(()=>{if(!s){i(!1);return}const a=setTimeout(()=>i(!0),Nx);return()=>clearTimeout(a)},[s]),e?F.jsxs(la,{tone:"quiet",children:[F.jsxs("p",{className:"min-w-0 flex-1 text-fg-muted",children:[ho(n.language)," spelling is left to the browser."]}),F.jsx("button",{type:"button",onClick:r,"data-testid":"spellcheck-retry",className:"shrink-0 font-medium text-accent hover:underline",children:"Download again"})]}):n.state==="failed"?F.jsxs(la,{tone:"danger",children:[F.jsx(Lp,{className:"mt-0.5 size-3.5 shrink-0 text-danger","aria-hidden":!0}),F.jsxs("div",{className:"min-w-0 flex-1",children:[F.jsxs("p",{className:"font-medium text-danger",children:["The ",ho(n.language)," dictionary did not load."]}),F.jsxs("p",{className:"mt-0.5 text-fg-muted","data-testid":"spellcheck-detail",children:[n.detail,". The browser is still checking your spelling."]})]}),F.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[F.jsx("button",{type:"button",onClick:r,"data-testid":"spellcheck-retry",className:"font-medium text-accent hover:underline",children:"Try again"}),F.jsx("a",{href:$x(n.language,n.detail),target:"_blank",rel:"noreferrer","data-testid":"spellcheck-report",className:"font-medium text-accent hover:underline",children:"Report this"})]})]}):!s||!o?null:F.jsxs(la,{tone:"quiet",children:[F.jsx(Ip,{className:"mt-0.5 size-3.5 shrink-0 animate-spin text-fg-subtle","aria-hidden":!0}),F.jsxs("p",{className:"min-w-0 flex-1 text-fg-muted",children:["Downloading the ",ho(n.language)," dictionary",n.bytesTotal>0?` (${vu(n.bytesTotal)})`:"","… ",F.jsxs("span",{"data-testid":"spellcheck-progress",children:[vu(n.bytesLoaded)," so far"]})]}),F.jsx("button",{type:"button",onClick:t,"data-testid":"spellcheck-cancel",className:"shrink-0 font-medium text-accent hover:underline",children:"Cancel"})]})}const Fx=5,hl=n=>n.toLowerCase().replace(/’/g,"'"),zx=n=>{const e=new RegExp("\\p{L}[\\p{L}\\p{M}'’]*","gu"),t=[];let r=e.exec(n);for(;r;)r[0].length>1&&t.push({start:r.index,end:r.index+r[0].length}),r=e.exec(n);return t},KC=(n,e)=>zx(n).filter(t=>!e(n.slice(t.start,t.end))),mr=({isActive:n,onClick:e,children:t,title:r})=>F.jsx("button",{type:"button",onMouseDown:o=>{o.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}),Ox={bold:!1,italic:!1,quote:!1,link:null,canUndo:!1,canRedo:!1},Mx=({trailing:n})=>{const[e]=rt(),[t,r]=O.useState(Ox),[o,i]=O.useState(null),s=O.useRef(null),a=O.useCallback(()=>{const c=z();if(!N(c))return;const d=c.anchor.getNode(),f=U(d,at),h=U(d,ts);r(g=>({...g,bold:c.hasFormat("bold"),italic:c.hasFormat("italic"),quote:h!==null,link:at(f)?f.getURL():null}))},[]);O.useEffect(()=>Qe(e.registerUpdateListener(({editorState:c})=>{c.read(a)}),e.registerCommand(qt,()=>(a(),!1),mt),e.registerCommand(lo,c=>(r(d=>({...d,canUndo:c})),!1),mt),e.registerCommand(ao,c=>(r(d=>({...d,canRedo:c})),!1),mt)),[e,a]),O.useEffect(()=>{o!==null&&s.current?.focus()},[o]);const l=()=>{e.update(()=>{const c=z();N(c)&&o_(c,()=>t.quote?Y():Qr())})},u=c=>{const d=c.trim();e.dispatchCommand(Ha,d===""?null:d),i(null),e.focus()};return F.jsxs("div",{className:"sticky top-0 z-10 border-b border-line bg-canvas",children:[F.jsxs("div",{className:"flex items-center gap-2 px-3 py-1",children:[F.jsxs("div",{"data-testid":"compose-format-cluster",className:"flex min-w-0 items-center gap-0.5 overflow-x-auto",children:[F.jsx(mr,{isActive:t.bold,onClick:()=>e.dispatchCommand(Ot,"bold"),title:"Bold (Ctrl+B)",children:F.jsx(Vp,{className:"size-4"})}),F.jsx(mr,{isActive:t.italic,onClick:()=>e.dispatchCommand(Ot,"italic"),title:"Italic (Ctrl+I)",children:F.jsx(Xp,{className:"size-4"})}),F.jsx(mr,{isActive:t.link!==null,onClick:()=>i(t.link??"https://"),title:"Link (Ctrl+K)",children:F.jsx(Gp,{className:"size-4"})}),F.jsx(mr,{isActive:t.quote,onClick:l,title:"Blockquote",children:F.jsx(Zp,{className:"size-4"})}),F.jsx("div",{className:"mx-1.5 h-4 w-px shrink-0 bg-line"}),F.jsx(mr,{isActive:!1,onClick:()=>e.dispatchCommand(cs,void 0),title:"Undo (Ctrl+Z)",children:F.jsx(Jp,{className:`size-4 ${t.canUndo?"":"opacity-40"}`})}),F.jsx(mr,{isActive:!1,onClick:()=>e.dispatchCommand(ds,void 0),title:"Redo (Ctrl+Y)",children:F.jsx(Qp,{className:`size-4 ${t.canRedo?"":"opacity-40"}`})})]}),n&&F.jsx("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:n})]}),o!==null&&F.jsxs("div",{className:"flex items-center gap-2 border-t border-line px-3 py-1.5",children:[F.jsx("input",{ref:s,type:"url",value:o,"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=>i(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),u(o)),c.key==="Escape"&&(c.preventDefault(),i(null),e.focus())}}),F.jsx("button",{type:"button",className:"text-xs text-accent hover:underline",onClick:()=>u(o),children:"Apply"}),t.link!==null&&F.jsx("button",{type:"button",className:"text-xs text-fg-muted hover:text-fg",onClick:()=>u(""),children:"Remove"})]})]})},jx=()=>{const[n]=rt(),e=O.useRef(!1);return O.useEffect(()=>Qe(n.registerCommand(fs,t=>((t.metaKey||t.ctrlKey)&&t.key.toLowerCase()==="v"&&(e.current=t.shiftKey),!1),mt),n.registerCommand(Vr,t=>{if(!(t instanceof ClipboardEvent))return!1;const r=t.clipboardData;if(!r)return!1;const o=e.current;if(e.current=!1,o){const s=z();return N(s)?(t.preventDefault(),s.insertRawText(r.getData("text/plain")),!0):!1}const i=r.getData("text/html");return i?(t.preventDefault(),ys(pu(n,i)),!0):!1},xh)),[n]),null},Rx=({onChange:n})=>{const[e]=rt(),t=O.useRef(n);return O.useEffect(()=>{t.current=n},[n]),O.useEffect(()=>{const r=()=>t.current(e.read(()=>U0(e)));return r(),e.registerUpdateListener(({dirtyElements:o,dirtyLeaves:i})=>{o.size===0&&i.size===0||r()})},[e]),null},Px=250,gl="spell-error",bp=()=>globalThis,Vd=()=>{const n=bp();return!!n.CSS?.highlights&&typeof n.Highlight=="function"},ua=new Map,Yd=(n,e)=>{const t=bp(),r=t.CSS?.highlights,o=t.Highlight;if(!r||!o)return;e.length===0?ua.delete(n):ua.set(n,e);const i=new o;let s=0;for(const a of ua.values())for(const l of a)i.add(l),s+=1;if(s===0){r.delete(gl);return}r.set(gl,i)},kp=n=>{if(n.nodeType===Node.TEXT_NODE)return n;for(let e=n.firstChild;e;e=e.nextSibling){const t=kp(e);if(t)return t}return null},Xd=(n,e,t,r)=>{const o=n.getElementByKey(e),i=o?kp(o):null;if(!i||r>(i.textContent?.length??0))return null;const s=i.ownerDocument?.createRange();return s?(s.setStart(i,t),s.setEnd(i,r),s):null},Lx=(n,e,t)=>{const r=n,o=r.caretPositionFromPoint?.(e,t);if(o)return{node:o.offsetNode,offset:o.offset};const i=r.caretRangeFromPoint?.(e,t);if(i)return{node:i.startContainer,offset:i.startOffset};const s=n.getSelection();return s?.focusNode?{node:s.focusNode,offset:s.focusOffset}:null},Gd=(n,e)=>e>n.start&&e<=n.end,Ix=(n,e)=>e>=n.start&&e<n.end,Zd=6,Bx=(n,e,t)=>{n.read(()=>{for(const[r,o]of e){const i=te(r);if(!D(i))continue;const s=i.getTextContent(),a=o.filter(l=>!t.has(hl(s.slice(l.start,l.end))));if(a.length!==o.length){if(a.length===0){e.delete(r);continue}e.set(r,a)}}})},Kx=({language:n,options:e,hostRef:t,onReady:r})=>{const[o]=rt(),i=O.useRef(e),s=O.useRef(r),a=O.useRef(new Map),l=O.useRef(new Set),u=O.useRef(null),c=O.useRef(()=>{}),d=O.useRef(0),[f,h]=O.useState(null),[g,m]=O.useState(null),[p,y]=O.useState(null),[_,b]=O.useState(0),[k,S]=O.useState(!1),[x,w]=O.useState({state:"opening",language:n,bytesLoaded:0,bytesTotal:0}),[v]=O.useState(Vd);O.useEffect(()=>{i.current=e,s.current=r},[e,r]),O.useEffect(()=>{if(!Vd()||k)return;const j=Symbol(gl),R=a.current,B=new Set;let Z,ie,Q=!0,L="opening",P=0,K=0,se=null,ee=!1;const xe=()=>{const X=[];o.read(()=>{const fe=z(),Te=!ee&&N(fe)&&fe.isCollapsed()?fe.anchor:null;for(const[Le,st]of R){const bt=te(Le);if(!D(bt)){R.delete(Le);continue}for(const kt of st){if(Te?.key===Le&&Gd(kt,Te.offset))continue;const Ne=Xd(o,Le,kt.start,kt.end);Ne&&X.push(Ne)}}}),Yd(j,X)};c.current=xe;const ot=()=>{const X=u.current;if(!X||L!=="ready")return;const fe=[...B];B.clear();const Te=[];if(o.read(()=>{for(const st of fe){const bt=te(st);if(!D(bt)){R.delete(st);continue}Te.push({spanId:st,text:bt.getTextContent()})}}),Te.length===0){xe();return}K+=1;const Le=P;X.check({requestId:`${_}:${K}`,language:n,revision:Le,spans:Te}).then(st=>{if(!Q)return;if(st.revision!==P){for(const Ne of Te)B.add(Ne.spanId);re();return}const bt=new Map(Te.map(Ne=>[Ne.spanId,Ne.text])),kt=new Map;for(const Ne of st.findings){const Go=bt.get(Ne.spanId);if(!Go)continue;const $p=Go.slice(Ne.start,Ne.end);if(l.current.has(hl($p)))continue;const bu=kt.get(Ne.spanId);if(bu){bu.push(Ne);continue}kt.set(Ne.spanId,[Ne])}for(const Ne of Te)R.delete(Ne.spanId);for(const[Ne,Go]of kt)R.set(Ne,Go);xe()})},re=()=>{clearTimeout(ie),ie=setTimeout(ot,Px)},$e=(X,fe,Te)=>{const Le=(R.get(X)??[]).find(Ne=>Te(Ne,fe));if(!Le||!t.current)return!1;const st=Xd(o,X,Le.start,Le.end),bt=o.read(()=>{const Ne=te(X);return D(Ne)?Ne.getTextContent().slice(Le.start,Le.end):""});if(!st||!bt)return!1;const kt=st.getBoundingClientRect();return h({key:X,start:Le.start,end:Le.end,word:bt,left:kt.left,right:kt.right,top:kt.top,bottom:kt.bottom}),!0},it=(X,fe)=>{const Te=o.getRootElement()?.ownerDocument;if(!Te)return!1;const Le=Lx(Te,X,fe);if(!Le)return!1;const st=o.read(()=>{const bt=Ge(Le.node);return D(bt)?bt.getKey():null});return st?$e(st,Le.offset,Ix):!1},nn=X=>{ee=!0,se=X.button===0?{x:X.clientX,y:X.clientY}:null},_n=X=>{const fe=se;if(se=null,!fe||Math.abs(X.clientX-fe.x)>Zd||Math.abs(X.clientY-fe.y)>Zd)return;const Te=o.getRootElement()?.ownerDocument.getSelection();Te&&!Te.isCollapsed||it(X.clientX,X.clientY)},yu=()=>{se=null},_u=()=>{ee&&(ee=!1,xe())},Ep=o.registerRootListener((X,fe)=>{fe?.removeEventListener("pointerdown",nn),fe?.removeEventListener("pointerup",_n),fe?.removeEventListener("pointercancel",yu),fe?.removeEventListener("keydown",_u),X?.addEventListener("pointerdown",nn),X?.addEventListener("pointerup",_n),X?.addEventListener("pointercancel",yu),X?.addEventListener("keydown",_u)}),Tp=o.registerCommand(fs,X=>{if(!(X.metaKey||X.ctrlKey)||X.key!==".")return!1;const fe=o.read(()=>{const Te=z();return!N(Te)||!Te.isCollapsed()?null:{key:Te.anchor.key,offset:Te.anchor.offset}});return!fe||!$e(fe.key,fe.offset,Gd)?!1:(X.preventDefault(),!0)},mt),Np=o.registerUpdateListener(({dirtyLeaves:X})=>{if(X.size===0){xe();return}P+=1,ee=!1,h(null);for(const fe of X)R.delete(fe),B.add(fe);xe(),re()}),Xo=X=>{w(X),i.current.onStatus?.(X)},Dp=X=>{Xo({state:"failed",language:n,reason:"worker",detail:X}),s.current(!1)};return Xo({state:"opening",language:n,bytesLoaded:0,bytesTotal:0}),i.current.provider(n).then(X=>{if(!Q){X?.close();return}if(u.current=X,!X){Xo({state:"unavailable",language:n}),s.current(!1);return}Z=X.onStatus(fe=>{L=fe.state,Xo(fe);const Te=fe.state==="ready";if(s.current(Te),Te){re();return}fe.state!=="opening"&&(R.clear(),B.clear(),h(null),xe())}),o.read(()=>{for(const fe of ge().getAllTextNodes())B.add(fe.getKey())}),re()}).catch(X=>{Q&&Dp(X instanceof Error?X.message:String(X))}),()=>{Q=!1,clearTimeout(ie),Np(),Ep(),Tp(),Z?.(),u.current?.close(),u.current=null,R.clear(),h(null),s.current(!1),Yd(j,[])}},[o,n,t,_,k]),O.useEffect(()=>{if(!f)return;m(null),y(null);const j=u.current;if(!j){y("the checker is not running");return}let R=!0;return d.current+=1,j.suggest({requestId:`suggest-${d.current}`,language:n,word:f.word}).then(B=>{R&&m(B.suggestions.slice(0,Fx))}).catch(B=>{R&&y(B instanceof Error?B.message:String(B))}),()=>{R=!1}},[f,n]);const E=O.useCallback(j=>{h(null),j&&(o.focus(),o.getRootElement()?.focus())},[o]),A=O.useCallback(j=>{l.current.add(hl(j)),Bx(o,a.current,l.current),c.current(),E(!0)},[o,E]),T=j=>{f&&(o.update(()=>{const R=te(f.key);if(!D(R)||R.getTextContent().slice(f.start,f.end)!==f.word)return;const B=R.spliceText(f.start,f.end-f.start,j),Z=f.start+j.length;B.select(Z,Z)},{tag:Yf}),E(!0))},M=()=>{f&&(i.current.onAddWord?.(f.word),A(f.word))};return F.jsxs(F.Fragment,{children:[v?F.jsx(Ax,{status:x,standDown:k,onCancel:()=>S(!0),onRetry:()=>{S(!1),b(j=>j+1)}}):null,f?F.jsx(Tx,{word:f.word,suggestions:g,failure:p,anchor:{left:f.left,right:f.right,top:f.top,bottom:f.bottom},language:n,onReplace:T,onIgnore:()=>A(f.word),onAddWord:e.onAddWord?M:void 0,onDismiss:E}):null]})},Wx=({caret:n})=>{const[e]=rt();return O.useEffect(()=>{if(!n)return;const t=setTimeout(()=>{of(e.getRootElement())||e.update(()=>{const r=ge();if(n==="start"){r.selectStart();return}r.selectEnd()},{onUpdate:()=>e.focus()})},0);return()=>clearTimeout(t)},[e,n]),null},qx=n=>e=>{const t=pu(e,n);t.length!==0&&(ge().select(),ys(t))},Ux=({initialHtml:n,onChange:e,onSubmit:t,initialCaret:r,placeholder:o="Write your message…",ariaLabel:i="Message body",trailing:s,lang:a,spellcheck:l})=>{const[u,c]=O.useState(!1),d=O.useRef(null);return F.jsxs(Z0,{initialConfig:{namespace:"compose",nodes:pp,theme:B0,editorState:n?qx(n):void 0,onError:f=>{throw f}},children:[F.jsxs("div",{className:"flex shrink-0 grow flex-col",children:[F.jsx(Mx,{trailing:s}),F.jsxs("div",{ref:d,className:"relative flex shrink-0 grow flex-col",children:[F.jsx(vx,{contentEditable:F.jsx(ox,{lang:a,spellCheck:l?!u:void 0,"aria-label":i,"aria-placeholder":o,"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:F.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 px-3 py-2 text-sm text-fg-subtle",children:o}),onKeyDown:f=>{t&&(!(f.metaKey||f.ctrlKey)||f.key!=="Enter"||(f.preventDefault(),t()))}}),ErrorBoundary:lx}),l&&a?F.jsx(Kx,{language:a,options:l,hostRef:d,onReady:c}):null]})]}),F.jsx(hx,{}),F.jsx(px,{}),F.jsx(gx,{}),F.jsx(wx,{}),F.jsx(jx,{}),F.jsx(Wx,{caret:r}),e&&F.jsx(Rx,{onChange:e})]})};xp(2);const Hx=xp(3);function xp(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 o=typeof t.slice=="function"?t:String(t);let i=o.length-n+1;if(i<1)return r;for(;i--;)r[i]=o.slice(i,i+n);return r}}const Jx=/\s+/g,Vx=/[\t\n\v\f\r ]+/g;function Yx(n,e){e?typeof e=="string"&&(e={style:e}):e={};const t=e.preserveLineEndings?Xx:Gx;return String(n).replace(e.style==="html"?Vx:Jx,e.trim?Zx(t):t)}function Xx(n){const e=/\r?\n|\r/.exec(n);return e?e[0]:" "}function Gx(){return" "}function Zx(n){return e;function e(t,r,o){return r===0||r+t.length===o.length?"":n(t)}}const Cp={}.hasOwnProperty;function Qx(n){return n==null?"":Yx(String(n).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function eC(n){return Hx(" "+Qx(n)+" ")}function tC(n){const e=eC(n),t={};let r=-1;for(;++r<e.length;)Cp.call(t,e[r])?t[e[r]]++:t[e[r]]=1;return t}function nC(n){const e=tC(n),t=[];let r;for(r in e)Cp.call(e,r)&&t.push([r,e[r]]);return t.sort(rC),t}function rC(n,e){return n[1]-e[1]}const oC={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},ca={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:" के|के |ार | हई|कार|ई। |हई।|िका|े अ|धिक|अधि| अध|र ह|े क|और | और|ा क|े स|सब | सब| कर|ें |था |में| मे|तथा| तथ|िक | हो| सम|क्ष|ना |ब क|र स| सं|ा स|कर | भी|। स| सा| से| का| अप|्रा|प्र| प्|से |भी | को|त क| पर|रा |क ह|पन |अपन| सक|या |ति |र क|ी क| या|करे| जा|रे | ओक|्त |सक |नो |ान |मान|ओकर|ा प|न क|ेल | ना|। क|रक्| स्|ही |होए| एक|पर |दी |ट्र|ता |व्य|हई | शा|े उ| दे|त्र|ादी| रा| ही|कान|ित |म क|ल ज|ाम |ी स|े भ|न स|माज|ष्ट|षा | ले|क स|बे |वे |ावे|मिल|र म|्य |ा ह|ला |प्त|नून|ानू|जा |ेकर|्षा|्रत|ंत्|र औ|ोई |कोई|्ट्|ाष्|राष| मा|रो | जे|करा|ोए |ाप्|राप|समा|ून |ो स|स्व|्ति|साम|ोनो|कोन| व्|र अ|्म | वि| सह|े म|क्त|योग|र व|काम|ल ह| नि|देश|पूर|वार| इ |ंरक|संर|ए क|र प| सु|तंत|वतं|्वत|ा म|व क|े व|ाथ |साथ| दो|होब| पा|ो क|े ब|ोग | उप|स्त|परि|न प|े त|्तर|लेल|े ओ|चाह| चा|य क|वा |ेश |य स|न ह|षण |ा ब|। त|एक |एल |ीय |केक|े ह|र आ|ि क|स्थ|जिक|ाजि|ामा|रीय|्री|तिक|ाति| बि|चार|े आ|ास | उच|ा त|यक्|्यक|िल |मय |समय|शाद|पयो|उपय|े ख|रिव| पू|े ल|े च|ौनो|कौन| कौ|ं क|संग|न द|ं स|ण प|्षण|र न|े न|ो भ|करो|ा औ|रता|ाव |भाव|क औ|र्म|ोसर|दोस|ण क|े प|न औ|ब ह|िक्|शिक| शि|ाबे|निय|चित|उचि|ित्|ग क|े। |त स|ी श|ं श|एकर|। ए|तन | ओ |री |्र |जे |क क| सी|सन |िवा| अन|ूरा| बच|ए। | बे|त ह| तक| मि|धार|थवा|अथव| अथ|िला|्वा|ि म| आद|ने |कएल| कए|्या"}},iC=2048,sC=10,vp=300,ss={}.hasOwnProperty;let so;const as={};for(so in ca)if(ss.call(ca,so)){const n=ca[so];let e;as[so]={};for(e in n)if(ss.call(n,e)){const t=n[e].split("|"),r={};let o=t.length;for(;o--;)r[t[o]]=o;as[so][e]=r}}function aC(n,e){return lC(n,e)[0][0]}function lC(n,e={}){const t=[...e.whitelist||[],...e.only||[]],r=[...e.blacklist||[],...e.ignore||[]],o=e.minLength!==null&&e.minLength!==void 0?e.minLength:sC;if(!n||n.length<o)return pl();n=n.slice(0,iC);const i=cC(n,oC);return!i[0]||!(i[0]in as)?!i[0]||i[1]===0||!Sp(i[0],t,r)?pl():wp(i[0]):uC(n,fC(nC(n),as[i[0]],t,r))}function uC(n,e){const t=e[0][1],r=n.length*vp-t;let o=-1;for(;++o<e.length;)e[o][1]=1-(e[o][1]-t)/r||0;return e}function cC(n,e){let t=-1,r,o;for(o in e)if(ss.call(e,o)){const i=dC(n,e[o]);i>t&&(t=i,r=o)}return[r,t]}function dC(n,e){const t=n.match(e);return(t?t.length:0)/n.length||0}function fC(n,e,t,r){e=gC(e,t,r);const o=[];let i;if(e)for(i in e)ss.call(e,i)&&o.push([i,hC(n,e[i])]);return o.length===0?pl():o.sort(pC)}function hC(n,e){let t=0,r=-1;for(;++r<n.length;){const o=n[r];let i=vp;o[0]in e&&(i=o[1]-e[o[0]]-1,i<0&&(i=-i)),t+=i}return t}function gC(n,e,t){if(e.length===0&&t.length===0)return n;const r={};let o;for(o in n)Sp(o,e,t)&&(r[o]=n[o]);return r}function Sp(n,e,t){return e.length===0&&t.length===0?!0:(e.length===0||e.includes(n))&&!t.includes(n)}function pl(){return wp("und")}function wp(n){return[[n,1]]}function pC(n,e){return n[1]-e[1]}const Qd=20,mC=(n,e)=>{const t=n.trim();if(t.length<Qd)return null;const r=new Map;for(const i of e){const s=Bp(i);s&&!r.has(s)&&r.set(s,i)}if(r.size<2)return null;const o=aC(t,{only:[...r.keys()],minLength:Qd});return r.get(o)??null},yC=({languages:n,text:e,initialLanguage:t,debounceMs:r=400})=>{const o=n.join(","),i=O.useMemo(()=>o.split(",").filter(d=>d!==""),[o]),s=i[0]??"en",[a,l]=O.useState(()=>t?{language:t,source:"manual"}:{language:s,source:"account"}),u=a.source==="manual";O.useEffect(()=>{if(u)return;const d=setTimeout(()=>{const f=mC(e,i),h=f??s,g=f?"detected":"account";l(m=>m.source==="manual"||m.language===h&&m.source===g?m:{language:h,source:g})},r);return()=>clearTimeout(d)},[u,e,i,s,r]);const c=O.useCallback(d=>{l({language:d,source:"manual"})},[]);return{...a,choose:c}},_C={toPlain:n=>n.text,toRich:n=>J0(n)},ef=n=>new DOMParser().parseFromString(n,"text/html").body.textContent??"",tf=n=>({html:"",text:n,formatting:[]}),WC=({mode:n,onModeChange:e,initialHtml:t,initialText:r,onChange:o,onSubmit:i,initialCaret:s,onConversionError:a,conversions:l=_C,languages:u,initialLanguage:c,onLanguageChange:d,spellcheck:f})=>{const[h,g]=O.useState(t),[m,p]=O.useState(0),[y,_]=O.useState(r),[b,k]=O.useState(r),[S,x]=O.useState(!1),[w,v]=O.useState(!1),E=O.useRef({html:t,text:r,formatting:[]}),{language:A,source:T,choose:M}=yC({languages:u,text:b,initialLanguage:c});O.useEffect(()=>{d(A)},[A,d]);const j=L=>{E.current=L,k(L.text),o(L)},R=L=>{_(L),k(L),o(tf(L))},B=()=>{const L=E.current,P=l.toPlain(L),K=Cu("plain",ef(L.html),P);if(K.outcome==="blocked"){a(K);return}_(P),k(P),v(!0),o(tf(P)),e("plain")},Z=()=>{const L=l.toRich(y),P=Cu("rich",y,ef(L));if(P.outcome==="blocked"){a(P);return}g(L),p(K=>K+1),v(!0),e("rich")},ie=()=>{if(n==="plain"){Z();return}if(Kp("plain",E.current.formatting)){x(!0);return}B()},Q=F.jsxs(F.Fragment,{children:[F.jsx(tm,{language:A,languages:u,source:T,onSelect:M}),F.jsx(nm,{mode:n,onToggle:ie})]});return F.jsxs(F.Fragment,{children:[n==="plain"?F.jsx(X0,{value:y,onChange:R,onSubmit:i,initialCaret:w?"end":s,lang:A,trailing:Q}):F.jsx(Ux,{initialHtml:h,onChange:j,onSubmit:i,initialCaret:w?"end":s,lang:A,trailing:Q,spellcheck:f},m),F.jsx(Wp,{isOpen:S,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:()=>{x(!1),B()},onCancel:()=>x(!1)})]})};export{Yo as COMPOSE_TRANSFORMERS,WC as ComposeBody,tm as ComposeLanguageChip,nm as ComposeModeToggle,_C as DEFAULT_COMPOSE_CONVERSIONS,Qd as DETECTION_MIN_LENGTH,DC as EMPTY_RICH_TEXT,X0 as PlainTextEditor,Tx as RichTextCorrectionMenu,Ux as RichTextEditor,Fx as SUGGESTION_LIMIT,mC as detectComposeLanguage,KC as findMisspellings,H0 as htmlToMarkdown,J0 as markdownToHtml,hl as normaliseWord,HC as openSpellProvider,yC as useComposeLanguage};
|
|
29
|
+
`)},regExp:N0,replace:(n,e,t)=>{const r=t[0].trimEnd(),o=n.getPreviousSibling();if(Zg(r)){if(ye(o)){z0(o),n.remove();return}const a=e[0];D(a)&&a.setTextContent(r);return}const i=$0(r);if(ye(o)){o.append(Kd(i,F0(o))),n.remove();return}const s=Vo();s.append(Kd(i,i.length)),n.replace(s)},type:"element"},Yo=[O0,...hu],fp=O.createContext(null);function M0(n,e){return{getTheme:function(){return e??null}}}function rt(){const n=O.useContext(fp);return n==null&&(function(e,...t){const r=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const i of t)o.append("v",i);throw r.search=o.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 Wd(n,e){return n.read("latest",()=>{const t=te(e);return t!==null&&t.isSelected()})}function j0(n){const[e]=rt(),[t,r]=O.useState(()=>Wd(e,n));return O.useEffect(()=>{let o=!0;const i=e.registerUpdateListener(()=>{o&&r(Wd(e,n))});return()=>{o=!1,i()}},[e,n]),[t,O.useCallback(o=>{e.update(()=>{let i=z();pe(i)||(i=Eo(),_e(i)),pe(i)&&(o?i.add(n):i.delete(n))})},[e,n]),O.useCallback(()=>{e.update(()=>{const o=z();pe(o)&&o.clear()})},[e])]}function R0({nodeKey:n}){const[e]=rt(),[t,r,o]=j0(n);return O.useEffect(()=>Ze(e.registerCommand(us,i=>{const s=e.getElementByKey(n);return Vn(i)===s&&(i.shiftKey||o(),r(!t),!0)},mt)),[o,e,t,n,r]),O.useEffect(()=>{const i=e.getElementByKey(n),s=e._config.theme.hrSelected??"selected";i!==null&&(t?Ae(i,s):Xt(i,s))},[e,t,n]),null}let hp=class extends tu{$config(){return this.config("horizontalrule",{importDOM:{hr:()=>({conversion:P0,priority:0})}})}decorate(){return F.jsx(R0,{nodeKey:this.__key})}};function P0(){return{node:L0()}}function L0(){return tt(new hp)}class gp extends _s{__src;__alt;$config(){return this.config("image",{importDOM:{img:()=>({conversion:I0,priority:0})}})}constructor(e="",t="",r){super(r),this.__src=e,this.__alt=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__src=e.__src,this.__alt=e.__alt}createDOM(e){const t=this.buildImage();return Ae(t,e.theme.image),t}updateDOM(e,t){return e.__src!==this.__src&&t.setAttribute("src",this.__src),e.__alt!==this.__alt&&t.setAttribute("alt",this.__alt),!1}exportDOM(){return{element:this.buildImage()}}exportJSON(){return{...super.exportJSON(),alt:this.getAlt(),src:this.getSrc()}}updateFromJSON(e){return super.updateFromJSON(e).setSrc(e.src).setAlt(e.alt)}getSrc(){return this.getLatest().__src}setSrc(e){const t=this.getWritable();return t.__src=e,t}getAlt(){return this.getLatest().__alt}setAlt(e){const t=this.getWritable();return t.__alt=e,t}getTextContent(){return this.getAlt()}isInline(){return!0}buildImage(){const e=ae().createElement("img");return e.setAttribute("src",this.__src),e.setAttribute("alt",this.__alt),e}}const I0=n=>({node:tt(new gp(n.getAttribute("src")??"",n.getAttribute("alt")??""))}),pp=[Fs,As,ar,zn,Dn,uu,nr,Jo,On,$s,lu,hp,gp],B0={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",image:"inline-block h-auto max-w-full align-bottom",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"}},pu=(n,e)=>{const t=new DOMParser().parseFromString(ml(e),"text/html");return Ng(n,t)},K0=new Set(["root","paragraph","text","linebreak"]),W0=["bold","italic","strikethrough","underline","code","subscript","superscript","highlight"],q0=()=>{const n=new Set,e=t=>{const r=t.getType();if(K0.has(r)||n.add(r),D(t))for(const o of W0)t.hasFormat(o)&&n.add(o);if(C(t))for(const o of t.getChildren())e(o)};return e(ge()),[...n].sort()},U0=n=>({html:ml(su(n,null)),text:gu(Yo),formatting:q0()}),mp=()=>Fl({namespace:"compose-conversion",nodes:[...pp],onError:n=>{throw n}}),H0=n=>{const e=mp();return e.update(()=>{const t=ge();t.clear(),t.select(),ys(pu(e,n))},{discrete:!0}),e.read(()=>gu(Yo))},J0=n=>{const e=mp();return e.update(()=>{op(n,Yo)},{discrete:!0}),e.read(()=>ml(su(e,null)))},V0="Nothing to paste. The copied content was an image, or had no text in it.",Y0=(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}},X0=({value:n,onChange:e,onSubmit:t,initialCaret:r,placeholder:o="Write your message…",ariaLabel:i="Message body",trailing:s,lang:a})=>{const l=O.useRef(null),u=O.useRef(null),c=O.useRef(!1),[d,f]=O.useState(!1);O.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]),O.useEffect(()=>{if(!r)return;const m=l.current;if(!m)return;const p=setTimeout(()=>{if(of(m))return;m.focus();const y=r==="start"?0: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?H0(k):"")||b;if(S===""){f(!0);return}f(!1);const x=Y0(y,S);x&&(u.current=x.caret,e(x.value))};return F.jsxs("div",{className:"flex shrink-0 grow flex-col",children:[F.jsx("div",{className:"sticky top-0 z-10 border-b border-line bg-canvas",children:F.jsxs("div",{className:"flex items-center gap-2 px-3 py-1",children:[F.jsx("span",{className:"min-w-0 truncate py-2 text-xs text-fg-muted",children:"Markdown"}),s&&F.jsx("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:s})]})}),d&&F.jsx(zp,{tone:"info",variant:"soft",onDismiss:()=>f(!1),className:"mx-3 mt-2",children:V0}),F.jsx("textarea",{ref:l,value:n,onChange:m=>e(m.target.value),onKeyDown:h,onPaste:g,lang:a,"aria-label":i,placeholder:o,"data-testid":"compose-body-plain",spellCheck:!0,className:"w-full shrink-0 grow resize-none whitespace-pre-wrap break-words bg-canvas px-3 py-2 font-mono text-base text-fg outline-none placeholder:text-fg-subtle"})]})},G0=et?O.useLayoutEffect:O.useEffect,hi={tag:wr};function Q0({initialConfig:n,children:e}){const t=O.useMemo(()=>{const{theme:r,namespace:o,nodes:i,onError:s,onWarn:a,editorState:l,html:u}=n,c=M0(null,r),d=Fl({editable:n.editable,html:u,namespace:o,nodes:i,onError:f=>s(f,d),...a?{onWarn:f=>a(f,d)}:{},theme:r});return(function(f,h){if(h!==null){if(h===void 0)f.update(()=>{const g=ge();if(g.isEmpty()){const m=Y();g.append(m);const p=f.getRootElement(),y=et&&p!==null?$o(p):null;(z()!==null||y!==null&&y===p)&&m.select()}},hi);else if(h!==null)switch(typeof h){case"string":{const g=f.parseEditorState(h);f.setEditorState(g,hi);break}case"object":f.setEditorState(h,hi);break;case"function":f.update(()=>{ge().isEmpty()&&h(f)},hi)}}})(d,l),[d,c]},[]);return G0(()=>{const r=n.editable,[o]=t;o.setEditable(r===void 0||r)},[]),F.jsx(fp.Provider,{value:t,children:e})}function Z0(){return ge().getTextContent()}function ex(n,e=!0){if(n)return!1;let t=Z0();return e&&(t=t.trim()),t===""}function tx(n){if(!ex(n,!1))return!1;const e=ge().getChildren(),t=e.length;if(t>1)return!1;for(let r=0;r<t;r++){const o=e[r];if(ne(o))return!1;if(C(o)){if(!en(o)||o.__indent!==0)return!1;const i=o.getChildren(),s=i.length;for(let a=0;a<s;a++){const l=i[r];if(!D(l))return!1}}}return!0}function yp(n){return()=>tx(n)}const _p=et?O.useLayoutEffect:O.useEffect;function nx({editor:n,ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:r,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:d,ariaRequired:f,autoCapitalize:h,className:g,id:m,role:p="textbox",spellCheck:y=!0,style:_,tabIndex:b,"data-testid":k,...S},x){const[w,v]=O.useState(n.isEditable()),E=O.useCallback(T=>{T&&T.ownerDocument&&T.ownerDocument.defaultView?n.setRootElement(T):n.setRootElement(null)},[n]),A=O.useMemo(()=>(function(...T){return M=>{for(const j of T)typeof j=="function"?j(M):j!=null&&(j.current=M)}})(x,E),[E,x]);return _p(()=>(v(n.isEditable()),n.registerEditableListener(T=>{v(T)})),[n]),F.jsx("div",{"aria-activedescendant":w?e:void 0,"aria-autocomplete":w?t:"none","aria-controls":w?r:void 0,"aria-describedby":o,...i!=null?{"aria-errormessage":i}:{},"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?d:void 0,"aria-readonly":!w||void 0,"aria-required":f,autoCapitalize:h,className:g,contentEditable:w,"data-testid":k,id:m,ref:A,role:p,spellCheck:y,style:_,tabIndex:b??(w?void 0:-1),...S})}const rx=O.forwardRef(nx);function qd(n){return n.read("latest",yp(n.isComposing()))}const ox=O.forwardRef(ix);function ix(n,e){const{placeholder:t,...r}=n,[o]=rt();return F.jsxs(F.Fragment,{children:[F.jsx(rx,{editor:o,...r,ref:e}),t!=null&&F.jsx(sx,{editor:o,content:t})]})}function sx({content:n,editor:e}){const t=(function(s){const[a,l]=O.useState(()=>qd(s));return _p(()=>{function u(){const c=qd(s);l(c)}return u(),Ze(s.registerUpdateListener(()=>{u()}),s.registerEditableListener(()=>{u()}))},[s]),a})(e),[r,o]=O.useState(e.isEditable());if(O.useLayoutEffect(()=>(o(e.isEditable()),e.registerEditableListener(s=>{o(s)})),[e]),!t)return null;let i=null;return typeof n=="function"?i=n(r):n!==null&&(i=n),i===null?null:F.jsx("div",{"aria-hidden":!0,children:i})}class ax extends O.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 lx({children:n,fallback:e,onError:t}){return F.jsx(ax,{fallback:e===void 0?F.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}):e,onError:t,children:n})}function ux(n,e,t,r,o){if(n===null||t.size===0&&r.size===0&&!o)return 0;const i=e._selection,s=n._selection;if(o)return 1;if(!(N(i)&&N(s)&&s.isCollapsed()&&i.isCollapsed()))return 0;const a=(function(y,_,b){const k=y._nodeMap,S=[];for(const x of _){const w=k.get(x);w!==void 0&&S.push(w)}for(const[x,w]of b){if(!w)continue;const v=k.get(x);v===void 0||Oe(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(i.anchor.key),b=y.get(s.anchor.key);return _&&b&&!n._nodeMap.has(_.__key)&&D(_)&&_.__text.length===1&&i.anchor.offset===1?2:0}const l=a[0],u=n._nodeMap.get(l.__key);if(!D(u)||!D(l)||u.__mode!==l.__mode)return 0;const c=u.__text,d=l.__text;if(c===d)return 0;const f=i.anchor,h=s.anchor;if(f.key!==h.key||f.type!=="text")return 0;const g=f.offset,m=h.offset,p=d.length-c.length;return p===1&&m===g-1?2:p===-1&&m===g+1?3:p===-1&&m===g?4:0}function cx(n,e,t){let r=t(),o=0,i=r,s=0,a=null;return(l,u,c,d,f,h)=>{const g=t();if(h.has(Qf)&&(i=r,s=o,a=l),h.has(Da))return o=0,r=g,2;h.has(Oi)&&a&&(r=i,o=s,l=a);const m=h.has(Xf)||h.has(Gf)?0:ux(l,u,d,f,n.isComposing()),p=(()=>{const y=c===null||c.editor===n,_=h.has(Yf);if(!_&&y&&h.has(wr))return 0;if(m===1)return 2;if(l===null)return 1;const b=u._selection;if(!(d.size>0||f.size>0))return b!==null?0:2;const k=typeof e=="number"?e:e.peek();return _===!1&&m!==0&&m===o&&g<r+k&&y||d.size===1&&(function(S,x,w){const v=x._nodeMap.get(S),E=w._nodeMap.get(S),A=x._selection,T=w._selection;return!(N(A)&&N(T)&&A.anchor.type==="element"&&A.focus.type==="element"&&T.anchor.type==="text"&&T.focus.type==="text"||!D(v)||!D(E)||v.__parent!==E.__parent)&&JSON.stringify(x.read(()=>v.exportJSON()))===JSON.stringify(w.read(()=>E.exportJSON()))})(Array.from(d)[0],l,u)?0:1})();return r=g,o=m,p}}function Ud(n,e){n.undoStack=[],n.redoStack=[],n.current=null}function dx(n,e,t,r=Date.now,o,i=null){const s=cx(n,t,r);return Ze(n.registerCommand(cs,()=>((function(a,l,u){const c=l.redoStack,d=l.undoStack;if(d.length!==0){const f=l.current,h=d.pop();f!==null&&(c.push(f),a.dispatchCommand(ao,!0)),d.length===0&&a.dispatchCommand(lo,!1),l.current=h||null,h&&h.editor.setEditorState(h.editorState,{tag:Da})}})(n,e),!0),G),n.registerCommand(ds,()=>((function(a,l,u){const c=l.redoStack,d=l.undoStack;if(c.length!==0){const f=l.current;f!==null&&(d.push(f),a.dispatchCommand(lo,!0));const h=c.pop();c.length===0&&a.dispatchCommand(ao,!1),l.current=h||null,h&&h.editor.setEditorState(h.editorState,{tag:Da})}})(n,e),!0),G),n.registerCommand(Rm,()=>(Ud(e),!1),G),n.registerCommand(Pm,()=>(Ud(e),n.dispatchCommand(ao,!1),n.dispatchCommand(lo,!1),!0),G),n.registerUpdateListener(({editorState:a,prevEditorState:l,dirtyLeaves:u,dirtyElements:c,tags:d})=>{const f=e.current,h=e.redoStack,g=e.undoStack,m=f===null?null:f.editorState;if(f!==null&&a===m)return;const p=s(l,a,f,u,c,d);if(p===1){if(h.length!==0&&(e.redoStack=[],n.dispatchCommand(ao,!1)),f!==null){g.push({...f});const y=typeof i=="number"||i===null?i:i.peek();y!==null&&g.length>y&&g.splice(0,g.length-y),n.dispatchCommand(lo,!0)}}else if(p===2)return;e.current={editor:n,editorState:a}}))}function fx(){return{current:null,redoStack:[],undoStack:[]}}function hx({delay:n,externalHistoryState:e}){const[t]=rt();return(function(r,o,i=1e3){const s=O.useMemo(()=>o||fx(),[o]);O.useEffect(()=>dx(r,s,i),[i,r,s])})(t,e,n),null}function gx({validateUrl:n,attributes:e}){const[t]=rt();return O.useEffect(()=>{if(!t.hasNodes([Dn]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),O.useEffect(()=>zb(t,b_({attributes:e,validateUrl:n})),[t,n,e]),null}function px({hasStrictIndent:n=!1,shouldPreserveNumbering:e=!1}){const[t]=rt();return O.useEffect(()=>{if(!t.hasNodes([ar,zn]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),O.useEffect(()=>Ze(ud(t,{restoreNumbering:e}),n?Hb(t):()=>{}),[t,n,e]),(function(r){O.useEffect(()=>ud(r),[r])})(t),null}const mx=et?O.useLayoutEffect:O.useEffect;function yx(n){return{initialValueFn:()=>n.isEditable(),subscribe:e=>n.registerEditableListener(e)}}function _x(){return(function(n){const[e]=rt(),t=O.useMemo(()=>n(e),[e,n]),[r,o]=O.useState(()=>t.initialValueFn()),i=O.useRef(r);return mx(()=>{const{initialValueFn:s,subscribe:a}=t,l=s();return i.current!==l&&(i.current=l,o(l)),a(u=>{i.current=u,o(u)})},[t,n]),r})(yx)}const bx={name:"@lexical/react/ReactProvider"};function kx(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);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 mu=et?O.useLayoutEffect:O.useEffect;function xx({editor:n,ErrorBoundary:e}){return(function(t,r){const[o,i]=O.useState(()=>t.getDecorators());return mu(()=>t.registerDecoratorListener(s=>{xu.flushSync(()=>{i(s)})}),[t]),O.useEffect(()=>{i(t.getDecorators())},[t]),O.useMemo(()=>{const s=[],a=Object.keys(o);for(let l=0;l<a.length;l++){const u=a[l],c=F.jsx(r,{onError:f=>t._onError(f),children:F.jsx(O.Suspense,{fallback:null,children:o[u]})}),d=t.getElementByKey(u);d!==null&&s.push(xu.createPortal(c,d,u))}return s},[r,o,t])})(n,e)}function Cx({editor:n,ErrorBoundary:e}){return(function(t){const r=hg.maybeFromEditor(t);if(r&&r.hasExtensionByName(bx.name)){for(const o of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(o)&&kx(320,o);return!0}return!1})(n)?null:F.jsx(xx,{editor:n,ErrorBoundary:e})}function Hd(n){return n.read("latest",yp(n.isComposing()))}function vx({contentEditable:n,placeholder:e=null,ErrorBoundary:t}){const[r]=rt();return(function(o){mu(()=>Ze(pk(o),uk(o)),[o])})(r),F.jsxs(F.Fragment,{children:[n,F.jsx(Sx,{content:e}),F.jsx(Cx,{editor:r,ErrorBoundary:t})]})}function Sx({content:n}){const[e]=rt(),t=(function(o){const[i,s]=O.useState(()=>Hd(o));return mu(()=>{function a(){const l=Hd(o);s(l)}return a(),Ze(o.registerUpdateListener(()=>{a()}),o.registerEditableListener(()=>{a()}))},[o]),i})(e),r=_x();return t?typeof n=="function"?n(r):n:null}function wx({hasCellMerge:n=!0,hasCellBackgroundColor:e=!0,hasTabHandler:t=!0,hasHorizontalScroll:r=!1,hasNestedTables:o=!1}){const[i]=rt();O.useEffect(()=>{is(i)!==r&&(y0(i,r),i.update(hh))},[i,r]);const s=(function(a){const[l]=O.useState(()=>Ho(a));return l.peek()!==a&&(l.value=a),l})(o);return O.useEffect(()=>T0(i,{hasNestedTables:s}),[i,s]),O.useEffect(()=>E0(i,t),[i,t]),O.useEffect(()=>{if(!n)return w0(i)},[i,n]),O.useEffect(()=>{if(!e)return i.registerNodeTransform(On,a=>{a.getBackgroundColor()!==null&&a.setBackgroundColor(null)})},[i,e,n]),null}const Ex=["w-28","w-20","w-24"],Jd=({word:n,suggestions:e,failure:t,language:r,onReplace:o,onIgnore:i,onAddWord:s})=>F.jsxs(F.Fragment,{children:[F.jsx("p",{lang:r,"data-testid":"spell-word",className:"px-4 pb-1 pt-1.5 text-xs font-medium text-fg-subtle",children:n}),e===null&&t===null?Ex.map(a=>F.jsx("div",{"aria-hidden":"true","data-testid":"spell-suggestion-skeleton",className:"flex min-h-11 items-center px-4 py-2.5",children:F.jsx("span",{className:`h-3 animate-pulse rounded bg-surface-sunken ${a}`})},a)):null,t!==null&&F.jsxs("p",{role:"alert","data-testid":"spell-suggestions-failed",className:"px-4 py-2 text-sm text-danger",children:["No suggestions came back: ",t]}),e?.length===0&&F.jsx("p",{"data-testid":"spell-no-suggestions",className:"px-4 py-2 text-sm text-fg-muted",children:"No suggestions for this word."}),e?.map(a=>F.jsx(js,{label:a,lang:r,"data-testid":"spell-suggestion",className:"font-medium",onSelect:()=>o(a)},a)),F.jsx("hr",{className:"my-1 border-line"}),F.jsx(js,{label:"Ignore for now",icon:F.jsx(Pp,{className:"size-4"}),"data-testid":"spell-ignore",onSelect:i}),s&&F.jsx(js,{label:"Add to dictionary",icon:F.jsx(Yp,{className:"size-4"}),"data-testid":"spell-add-word",onSelect:s})]}),Tx=({anchor:n,onDismiss:e,...t})=>{const r=Op(Mp),o=O.useRef(null);jp({containerRef:o,itemSelector:'[role="menuitem"]'}),O.useEffect(()=>{o.current?.focus()},[]),Rp({id:"correction-menu",open:r,answers:{back:()=>e(!0)}}),O.useEffect(()=>{if(!r)return;const s=a=>{o.current?.contains(a.target)||e(!1)};return document.addEventListener("pointerdown",s),()=>document.removeEventListener("pointerdown",s)},[r,e]);const i=s=>{s.key!=="Escape"&&s.key!=="Tab"||(s.preventDefault(),s.stopPropagation(),e(!0))};return r?F.jsx(Up,{open:!0,align:"start",panelRef:o,getAnchor:()=>n,children:F.jsx(Hp,{ref:o,label:`Corrections for ${t.word}`,onKeyDown:i,"data-testid":"spell-menu",className:"max-w-64",children:F.jsx(Jd,{...t})})}):F.jsx(qp,{open:!0,onClose:()=>e(!0),dismissLabel:"Close corrections",children:F.jsx("div",{ref:o,role:"menu","aria-label":`Corrections for ${t.word}`,tabIndex:-1,onKeyDown:i,"data-testid":"spell-menu",className:"flex flex-col overflow-y-auto pb-4 outline-none",children:F.jsx(Jd,{...t})})})},Nx=5e3,Dx="https://github.com/remit-mail/reader/issues/new",$x=(n,e)=>{const t=`Spellcheck dictionary failed to load (${n})`,r=[`Language: ${n}`,`What happened: ${e}`,"","What I was doing:"].join(`
|
|
30
|
+
`);return`${Dx}?title=${encodeURIComponent(t)}&body=${encodeURIComponent(r)}`},la=({tone:n,children:e})=>F.jsx("div",{role:"status","data-testid":"spellcheck-notice",className:`flex items-start gap-2 border-t px-3 py-1.5 text-xs ${n==="danger"?"border-danger/30 bg-danger-soft":"border-border bg-surface-sunken"}`,children:e});function Ax({status:n,standDown:e,onCancel:t,onRetry:r}){const[o,i]=O.useState(!1),s=n.state==="opening";return O.useEffect(()=>{if(!s){i(!1);return}const a=setTimeout(()=>i(!0),Nx);return()=>clearTimeout(a)},[s]),e?F.jsxs(la,{tone:"quiet",children:[F.jsxs("p",{className:"min-w-0 flex-1 text-fg-muted",children:[ho(n.language)," spelling is left to the browser."]}),F.jsx("button",{type:"button",onClick:r,"data-testid":"spellcheck-retry",className:"shrink-0 font-medium text-accent hover:underline",children:"Download again"})]}):n.state==="failed"?F.jsxs(la,{tone:"danger",children:[F.jsx(Lp,{className:"mt-0.5 size-3.5 shrink-0 text-danger","aria-hidden":!0}),F.jsxs("div",{className:"min-w-0 flex-1",children:[F.jsxs("p",{className:"font-medium text-danger",children:["The ",ho(n.language)," dictionary did not load."]}),F.jsxs("p",{className:"mt-0.5 text-fg-muted","data-testid":"spellcheck-detail",children:[n.detail,". The browser is still checking your spelling."]})]}),F.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[F.jsx("button",{type:"button",onClick:r,"data-testid":"spellcheck-retry",className:"font-medium text-accent hover:underline",children:"Try again"}),F.jsx("a",{href:$x(n.language,n.detail),target:"_blank",rel:"noreferrer","data-testid":"spellcheck-report",className:"font-medium text-accent hover:underline",children:"Report this"})]})]}):!s||!o?null:F.jsxs(la,{tone:"quiet",children:[F.jsx(Ip,{className:"mt-0.5 size-3.5 shrink-0 animate-spin text-fg-subtle","aria-hidden":!0}),F.jsxs("p",{className:"min-w-0 flex-1 text-fg-muted",children:["Downloading the ",ho(n.language)," dictionary",n.bytesTotal>0?` (${vu(n.bytesTotal)})`:"","… ",F.jsxs("span",{"data-testid":"spellcheck-progress",children:[vu(n.bytesLoaded)," so far"]})]}),F.jsx("button",{type:"button",onClick:t,"data-testid":"spellcheck-cancel",className:"shrink-0 font-medium text-accent hover:underline",children:"Cancel"})]})}const Fx=5,hl=n=>n.toLowerCase().replace(/’/g,"'"),zx=n=>{const e=new RegExp("\\p{L}[\\p{L}\\p{M}'’]*","gu"),t=[];let r=e.exec(n);for(;r;)r[0].length>1&&t.push({start:r.index,end:r.index+r[0].length}),r=e.exec(n);return t},WC=(n,e)=>zx(n).filter(t=>!e(n.slice(t.start,t.end))),mr=({isActive:n,onClick:e,children:t,title:r})=>F.jsx("button",{type:"button",onMouseDown:o=>{o.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}),Ox={bold:!1,italic:!1,quote:!1,link:null,canUndo:!1,canRedo:!1},Mx=({trailing:n})=>{const[e]=rt(),[t,r]=O.useState(Ox),[o,i]=O.useState(null),s=O.useRef(null),a=O.useCallback(()=>{const c=z();if(!N(c))return;const d=c.anchor.getNode(),f=U(d,at),h=U(d,ts);r(g=>({...g,bold:c.hasFormat("bold"),italic:c.hasFormat("italic"),quote:h!==null,link:at(f)?f.getURL():null}))},[]);O.useEffect(()=>Ze(e.registerUpdateListener(({editorState:c})=>{c.read(a)}),e.registerCommand(qt,()=>(a(),!1),mt),e.registerCommand(lo,c=>(r(d=>({...d,canUndo:c})),!1),mt),e.registerCommand(ao,c=>(r(d=>({...d,canRedo:c})),!1),mt)),[e,a]),O.useEffect(()=>{o!==null&&s.current?.focus()},[o]);const l=()=>{e.update(()=>{const c=z();N(c)&&o_(c,()=>t.quote?Y():Zr())})},u=c=>{const d=c.trim();e.dispatchCommand(Ha,d===""?null:d),i(null),e.focus()};return F.jsxs("div",{className:"sticky top-0 z-10 border-b border-line bg-canvas",children:[F.jsxs("div",{className:"flex items-center gap-2 px-3 py-1",children:[F.jsxs("div",{"data-testid":"compose-format-cluster",className:"flex min-w-0 items-center gap-0.5 overflow-x-auto",children:[F.jsx(mr,{isActive:t.bold,onClick:()=>e.dispatchCommand(Ot,"bold"),title:"Bold (Ctrl+B)",children:F.jsx(Vp,{className:"size-4"})}),F.jsx(mr,{isActive:t.italic,onClick:()=>e.dispatchCommand(Ot,"italic"),title:"Italic (Ctrl+I)",children:F.jsx(Xp,{className:"size-4"})}),F.jsx(mr,{isActive:t.link!==null,onClick:()=>i(t.link??"https://"),title:"Link (Ctrl+K)",children:F.jsx(Gp,{className:"size-4"})}),F.jsx(mr,{isActive:t.quote,onClick:l,title:"Blockquote",children:F.jsx(Qp,{className:"size-4"})}),F.jsx("div",{className:"mx-1.5 h-4 w-px shrink-0 bg-line"}),F.jsx(mr,{isActive:!1,onClick:()=>e.dispatchCommand(cs,void 0),title:"Undo (Ctrl+Z)",children:F.jsx(Jp,{className:`size-4 ${t.canUndo?"":"opacity-40"}`})}),F.jsx(mr,{isActive:!1,onClick:()=>e.dispatchCommand(ds,void 0),title:"Redo (Ctrl+Y)",children:F.jsx(Zp,{className:`size-4 ${t.canRedo?"":"opacity-40"}`})})]}),n&&F.jsx("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:n})]}),o!==null&&F.jsxs("div",{className:"flex items-center gap-2 border-t border-line px-3 py-1.5",children:[F.jsx("input",{ref:s,type:"url",value:o,"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=>i(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),u(o)),c.key==="Escape"&&(c.preventDefault(),i(null),e.focus())}}),F.jsx("button",{type:"button",className:"text-xs text-accent hover:underline",onClick:()=>u(o),children:"Apply"}),t.link!==null&&F.jsx("button",{type:"button",className:"text-xs text-fg-muted hover:text-fg",onClick:()=>u(""),children:"Remove"})]})]})},jx=()=>{const[n]=rt(),e=O.useRef(!1);return O.useEffect(()=>Ze(n.registerCommand(fs,t=>((t.metaKey||t.ctrlKey)&&t.key.toLowerCase()==="v"&&(e.current=t.shiftKey),!1),mt),n.registerCommand(Vr,t=>{if(!(t instanceof ClipboardEvent))return!1;const r=t.clipboardData;if(!r)return!1;const o=e.current;if(e.current=!1,o){const s=z();return N(s)?(t.preventDefault(),s.insertRawText(r.getData("text/plain")),!0):!1}const i=r.getData("text/html");return i?(t.preventDefault(),ys(pu(n,i)),!0):!1},xh)),[n]),null},Rx=({onChange:n})=>{const[e]=rt(),t=O.useRef(n);return O.useEffect(()=>{t.current=n},[n]),O.useEffect(()=>{const r=()=>t.current(e.read(()=>U0(e)));return r(),e.registerUpdateListener(({dirtyElements:o,dirtyLeaves:i})=>{o.size===0&&i.size===0||r()})},[e]),null},Px=250,gl="spell-error",bp=()=>globalThis,Vd=()=>{const n=bp();return!!n.CSS?.highlights&&typeof n.Highlight=="function"},ua=new Map,Yd=(n,e)=>{const t=bp(),r=t.CSS?.highlights,o=t.Highlight;if(!r||!o)return;e.length===0?ua.delete(n):ua.set(n,e);const i=new o;let s=0;for(const a of ua.values())for(const l of a)i.add(l),s+=1;if(s===0){r.delete(gl);return}r.set(gl,i)},kp=n=>{if(n.nodeType===Node.TEXT_NODE)return n;for(let e=n.firstChild;e;e=e.nextSibling){const t=kp(e);if(t)return t}return null},Xd=(n,e,t,r)=>{const o=n.getElementByKey(e),i=o?kp(o):null;if(!i||r>(i.textContent?.length??0))return null;const s=i.ownerDocument?.createRange();return s?(s.setStart(i,t),s.setEnd(i,r),s):null},Lx=(n,e,t)=>{const r=n,o=r.caretPositionFromPoint?.(e,t);if(o)return{node:o.offsetNode,offset:o.offset};const i=r.caretRangeFromPoint?.(e,t);if(i)return{node:i.startContainer,offset:i.startOffset};const s=n.getSelection();return s?.focusNode?{node:s.focusNode,offset:s.focusOffset}:null},Gd=(n,e)=>e>n.start&&e<=n.end,Ix=(n,e)=>e>=n.start&&e<n.end,Qd=6,Bx=(n,e,t)=>{n.read(()=>{for(const[r,o]of e){const i=te(r);if(!D(i))continue;const s=i.getTextContent(),a=o.filter(l=>!t.has(hl(s.slice(l.start,l.end))));if(a.length!==o.length){if(a.length===0){e.delete(r);continue}e.set(r,a)}}})},Kx=({language:n,options:e,hostRef:t,onReady:r})=>{const[o]=rt(),i=O.useRef(e),s=O.useRef(r),a=O.useRef(new Map),l=O.useRef(new Set),u=O.useRef(null),c=O.useRef(()=>{}),d=O.useRef(0),[f,h]=O.useState(null),[g,m]=O.useState(null),[p,y]=O.useState(null),[_,b]=O.useState(0),[k,S]=O.useState(!1),[x,w]=O.useState({state:"opening",language:n,bytesLoaded:0,bytesTotal:0}),[v]=O.useState(Vd);O.useEffect(()=>{i.current=e,s.current=r},[e,r]),O.useEffect(()=>{if(!Vd()||k)return;const j=Symbol(gl),R=a.current,B=new Set;let Q,ie,Z=!0,L="opening",P=0,K=0,se=null,ee=!1;const xe=()=>{const X=[];o.read(()=>{const fe=z(),Te=!ee&&N(fe)&&fe.isCollapsed()?fe.anchor:null;for(const[Le,st]of R){const bt=te(Le);if(!D(bt)){R.delete(Le);continue}for(const kt of st){if(Te?.key===Le&&Gd(kt,Te.offset))continue;const Ne=Xd(o,Le,kt.start,kt.end);Ne&&X.push(Ne)}}}),Yd(j,X)};c.current=xe;const ot=()=>{const X=u.current;if(!X||L!=="ready")return;const fe=[...B];B.clear();const Te=[];if(o.read(()=>{for(const st of fe){const bt=te(st);if(!D(bt)){R.delete(st);continue}Te.push({spanId:st,text:bt.getTextContent()})}}),Te.length===0){xe();return}K+=1;const Le=P;X.check({requestId:`${_}:${K}`,language:n,revision:Le,spans:Te}).then(st=>{if(!Z)return;if(st.revision!==P){for(const Ne of Te)B.add(Ne.spanId);re();return}const bt=new Map(Te.map(Ne=>[Ne.spanId,Ne.text])),kt=new Map;for(const Ne of st.findings){const Go=bt.get(Ne.spanId);if(!Go)continue;const $p=Go.slice(Ne.start,Ne.end);if(l.current.has(hl($p)))continue;const bu=kt.get(Ne.spanId);if(bu){bu.push(Ne);continue}kt.set(Ne.spanId,[Ne])}for(const Ne of Te)R.delete(Ne.spanId);for(const[Ne,Go]of kt)R.set(Ne,Go);xe()})},re=()=>{clearTimeout(ie),ie=setTimeout(ot,Px)},$e=(X,fe,Te)=>{const Le=(R.get(X)??[]).find(Ne=>Te(Ne,fe));if(!Le||!t.current)return!1;const st=Xd(o,X,Le.start,Le.end),bt=o.read(()=>{const Ne=te(X);return D(Ne)?Ne.getTextContent().slice(Le.start,Le.end):""});if(!st||!bt)return!1;const kt=st.getBoundingClientRect();return h({key:X,start:Le.start,end:Le.end,word:bt,left:kt.left,right:kt.right,top:kt.top,bottom:kt.bottom}),!0},it=(X,fe)=>{const Te=o.getRootElement()?.ownerDocument;if(!Te)return!1;const Le=Lx(Te,X,fe);if(!Le)return!1;const st=o.read(()=>{const bt=Ge(Le.node);return D(bt)?bt.getKey():null});return st?$e(st,Le.offset,Ix):!1},nn=X=>{ee=!0,se=X.button===0?{x:X.clientX,y:X.clientY}:null},_n=X=>{const fe=se;if(se=null,!fe||Math.abs(X.clientX-fe.x)>Qd||Math.abs(X.clientY-fe.y)>Qd)return;const Te=o.getRootElement()?.ownerDocument.getSelection();Te&&!Te.isCollapsed||it(X.clientX,X.clientY)},yu=()=>{se=null},_u=()=>{ee&&(ee=!1,xe())},Ep=o.registerRootListener((X,fe)=>{fe?.removeEventListener("pointerdown",nn),fe?.removeEventListener("pointerup",_n),fe?.removeEventListener("pointercancel",yu),fe?.removeEventListener("keydown",_u),X?.addEventListener("pointerdown",nn),X?.addEventListener("pointerup",_n),X?.addEventListener("pointercancel",yu),X?.addEventListener("keydown",_u)}),Tp=o.registerCommand(fs,X=>{if(!(X.metaKey||X.ctrlKey)||X.key!==".")return!1;const fe=o.read(()=>{const Te=z();return!N(Te)||!Te.isCollapsed()?null:{key:Te.anchor.key,offset:Te.anchor.offset}});return!fe||!$e(fe.key,fe.offset,Gd)?!1:(X.preventDefault(),!0)},mt),Np=o.registerUpdateListener(({dirtyLeaves:X})=>{if(X.size===0){xe();return}P+=1,ee=!1,h(null);for(const fe of X)R.delete(fe),B.add(fe);xe(),re()}),Xo=X=>{w(X),i.current.onStatus?.(X)},Dp=X=>{Xo({state:"failed",language:n,reason:"worker",detail:X}),s.current(!1)};return Xo({state:"opening",language:n,bytesLoaded:0,bytesTotal:0}),i.current.provider(n).then(X=>{if(!Z){X?.close();return}if(u.current=X,!X){Xo({state:"unavailable",language:n}),s.current(!1);return}Q=X.onStatus(fe=>{L=fe.state,Xo(fe);const Te=fe.state==="ready";if(s.current(Te),Te){re();return}fe.state!=="opening"&&(R.clear(),B.clear(),h(null),xe())}),o.read(()=>{for(const fe of ge().getAllTextNodes())B.add(fe.getKey())}),re()}).catch(X=>{Z&&Dp(X instanceof Error?X.message:String(X))}),()=>{Z=!1,clearTimeout(ie),Np(),Ep(),Tp(),Q?.(),u.current?.close(),u.current=null,R.clear(),h(null),s.current(!1),Yd(j,[])}},[o,n,t,_,k]),O.useEffect(()=>{if(!f)return;m(null),y(null);const j=u.current;if(!j){y("the checker is not running");return}let R=!0;return d.current+=1,j.suggest({requestId:`suggest-${d.current}`,language:n,word:f.word}).then(B=>{R&&m(B.suggestions.slice(0,Fx))}).catch(B=>{R&&y(B instanceof Error?B.message:String(B))}),()=>{R=!1}},[f,n]);const E=O.useCallback(j=>{h(null),j&&(o.focus(),o.getRootElement()?.focus())},[o]),A=O.useCallback(j=>{l.current.add(hl(j)),Bx(o,a.current,l.current),c.current(),E(!0)},[o,E]),T=j=>{f&&(o.update(()=>{const R=te(f.key);if(!D(R)||R.getTextContent().slice(f.start,f.end)!==f.word)return;const B=R.spliceText(f.start,f.end-f.start,j),Q=f.start+j.length;B.select(Q,Q)},{tag:Yf}),E(!0))},M=()=>{f&&(i.current.onAddWord?.(f.word),A(f.word))};return F.jsxs(F.Fragment,{children:[v?F.jsx(Ax,{status:x,standDown:k,onCancel:()=>S(!0),onRetry:()=>{S(!1),b(j=>j+1)}}):null,f?F.jsx(Tx,{word:f.word,suggestions:g,failure:p,anchor:{left:f.left,right:f.right,top:f.top,bottom:f.bottom},language:n,onReplace:T,onIgnore:()=>A(f.word),onAddWord:e.onAddWord?M:void 0,onDismiss:E}):null]})},Wx=({caret:n})=>{const[e]=rt();return O.useEffect(()=>{if(!n)return;const t=setTimeout(()=>{of(e.getRootElement())||e.update(()=>{const r=ge();if(n==="start"){r.selectStart();return}r.selectEnd()},{onUpdate:()=>e.focus()})},0);return()=>clearTimeout(t)},[e,n]),null},qx=n=>e=>{const t=pu(e,n);t.length!==0&&(ge().select(),ys(t))},Ux=({initialHtml:n,onChange:e,onSubmit:t,initialCaret:r,placeholder:o="Write your message…",ariaLabel:i="Message body",trailing:s,lang:a,spellcheck:l})=>{const[u,c]=O.useState(!1),d=O.useRef(null);return F.jsxs(Q0,{initialConfig:{namespace:"compose",nodes:pp,theme:B0,editorState:n?qx(n):void 0,onError:f=>{throw f}},children:[F.jsxs("div",{className:"flex shrink-0 grow flex-col",children:[F.jsx(Mx,{trailing:s}),F.jsxs("div",{ref:d,className:"relative flex shrink-0 grow flex-col",children:[F.jsx(vx,{contentEditable:F.jsx(ox,{lang:a,spellCheck:l?!u:void 0,"aria-label":i,"aria-placeholder":o,"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:F.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 px-3 py-2 text-sm text-fg-subtle",children:o}),onKeyDown:f=>{t&&(!(f.metaKey||f.ctrlKey)||f.key!=="Enter"||(f.preventDefault(),t()))}}),ErrorBoundary:lx}),l&&a?F.jsx(Kx,{language:a,options:l,hostRef:d,onReady:c}):null]})]}),F.jsx(hx,{}),F.jsx(px,{}),F.jsx(gx,{}),F.jsx(wx,{}),F.jsx(jx,{}),F.jsx(Wx,{caret:r}),e&&F.jsx(Rx,{onChange:e})]})};xp(2);const Hx=xp(3);function xp(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 o=typeof t.slice=="function"?t:String(t);let i=o.length-n+1;if(i<1)return r;for(;i--;)r[i]=o.slice(i,i+n);return r}}const Jx=/\s+/g,Vx=/[\t\n\v\f\r ]+/g;function Yx(n,e){e?typeof e=="string"&&(e={style:e}):e={};const t=e.preserveLineEndings?Xx:Gx;return String(n).replace(e.style==="html"?Vx:Jx,e.trim?Qx(t):t)}function Xx(n){const e=/\r?\n|\r/.exec(n);return e?e[0]:" "}function Gx(){return" "}function Qx(n){return e;function e(t,r,o){return r===0||r+t.length===o.length?"":n(t)}}const Cp={}.hasOwnProperty;function Zx(n){return n==null?"":Yx(String(n).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function eC(n){return Hx(" "+Zx(n)+" ")}function tC(n){const e=eC(n),t={};let r=-1;for(;++r<e.length;)Cp.call(t,e[r])?t[e[r]]++:t[e[r]]=1;return t}function nC(n){const e=tC(n),t=[];let r;for(r in e)Cp.call(e,r)&&t.push([r,e[r]]);return t.sort(rC),t}function rC(n,e){return n[1]-e[1]}const oC={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},ca={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:" के|के |ार | हई|कार|ई। |हई।|िका|े अ|धिक|अधि| अध|र ह|े क|और | और|ा क|े स|सब | सब| कर|ें |था |में| मे|तथा| तथ|िक | हो| सम|क्ष|ना |ब क|र स| सं|ा स|कर | भी|। स| सा| से| का| अप|्रा|प्र| प्|से |भी | को|त क| पर|रा |क ह|पन |अपन| सक|या |ति |र क|ी क| या|करे| जा|रे | ओक|्त |सक |नो |ान |मान|ओकर|ा प|न क|ेल | ना|। क|रक्| स्|ही |होए| एक|पर |दी |ट्र|ता |व्य|हई | शा|े उ| दे|त्र|ादी| रा| ही|कान|ित |म क|ल ज|ाम |ी स|े भ|न स|माज|ष्ट|षा | ले|क स|बे |वे |ावे|मिल|र म|्य |ा ह|ला |प्त|नून|ानू|जा |ेकर|्षा|्रत|ंत्|र औ|ोई |कोई|्ट्|ाष्|राष| मा|रो | जे|करा|ोए |ाप्|राप|समा|ून |ो स|स्व|्ति|साम|ोनो|कोन| व्|र अ|्म | वि| सह|े म|क्त|योग|र व|काम|ल ह| नि|देश|पूर|वार| इ |ंरक|संर|ए क|र प| सु|तंत|वतं|्वत|ा म|व क|े व|ाथ |साथ| दो|होब| पा|ो क|े ब|ोग | उप|स्त|परि|न प|े त|्तर|लेल|े ओ|चाह| चा|य क|वा |ेश |य स|न ह|षण |ा ब|। त|एक |एल |ीय |केक|े ह|र आ|ि क|स्थ|जिक|ाजि|ामा|रीय|्री|तिक|ाति| बि|चार|े आ|ास | उच|ा त|यक्|्यक|िल |मय |समय|शाद|पयो|उपय|े ख|रिव| पू|े ल|े च|ौनो|कौन| कौ|ं क|संग|न द|ं स|ण प|्षण|र न|े न|ो भ|करो|ा औ|रता|ाव |भाव|क औ|र्म|ोसर|दोस|ण क|े प|न औ|ब ह|िक्|शिक| शि|ाबे|निय|चित|उचि|ित्|ग क|े। |त स|ी श|ं श|एकर|। ए|तन | ओ |री |्र |जे |क क| सी|सन |िवा| अन|ूरा| बच|ए। | बे|त ह| तक| मि|धार|थवा|अथव| अथ|िला|्वा|ि म| आद|ने |कएल| कए|्या"}},iC=2048,sC=10,vp=300,ss={}.hasOwnProperty;let so;const as={};for(so in ca)if(ss.call(ca,so)){const n=ca[so];let e;as[so]={};for(e in n)if(ss.call(n,e)){const t=n[e].split("|"),r={};let o=t.length;for(;o--;)r[t[o]]=o;as[so][e]=r}}function aC(n,e){return lC(n,e)[0][0]}function lC(n,e={}){const t=[...e.whitelist||[],...e.only||[]],r=[...e.blacklist||[],...e.ignore||[]],o=e.minLength!==null&&e.minLength!==void 0?e.minLength:sC;if(!n||n.length<o)return pl();n=n.slice(0,iC);const i=cC(n,oC);return!i[0]||!(i[0]in as)?!i[0]||i[1]===0||!Sp(i[0],t,r)?pl():wp(i[0]):uC(n,fC(nC(n),as[i[0]],t,r))}function uC(n,e){const t=e[0][1],r=n.length*vp-t;let o=-1;for(;++o<e.length;)e[o][1]=1-(e[o][1]-t)/r||0;return e}function cC(n,e){let t=-1,r,o;for(o in e)if(ss.call(e,o)){const i=dC(n,e[o]);i>t&&(t=i,r=o)}return[r,t]}function dC(n,e){const t=n.match(e);return(t?t.length:0)/n.length||0}function fC(n,e,t,r){e=gC(e,t,r);const o=[];let i;if(e)for(i in e)ss.call(e,i)&&o.push([i,hC(n,e[i])]);return o.length===0?pl():o.sort(pC)}function hC(n,e){let t=0,r=-1;for(;++r<n.length;){const o=n[r];let i=vp;o[0]in e&&(i=o[1]-e[o[0]]-1,i<0&&(i=-i)),t+=i}return t}function gC(n,e,t){if(e.length===0&&t.length===0)return n;const r={};let o;for(o in n)Sp(o,e,t)&&(r[o]=n[o]);return r}function Sp(n,e,t){return e.length===0&&t.length===0?!0:(e.length===0||e.includes(n))&&!t.includes(n)}function pl(){return wp("und")}function wp(n){return[[n,1]]}function pC(n,e){return n[1]-e[1]}const Zd=20,mC=(n,e)=>{const t=n.trim();if(t.length<Zd)return null;const r=new Map;for(const i of e){const s=Bp(i);s&&!r.has(s)&&r.set(s,i)}if(r.size<2)return null;const o=aC(t,{only:[...r.keys()],minLength:Zd});return r.get(o)??null},yC=({languages:n,text:e,initialLanguage:t,debounceMs:r=400})=>{const o=n.join(","),i=O.useMemo(()=>o.split(",").filter(d=>d!==""),[o]),s=i[0]??"en",[a,l]=O.useState(()=>t?{language:t,source:"manual"}:{language:s,source:"account"}),u=a.source==="manual";O.useEffect(()=>{if(u)return;const d=setTimeout(()=>{const f=mC(e,i),h=f??s,g=f?"detected":"account";l(m=>m.source==="manual"||m.language===h&&m.source===g?m:{language:h,source:g})},r);return()=>clearTimeout(d)},[u,e,i,s,r]);const c=O.useCallback(d=>{l({language:d,source:"manual"})},[]);return{...a,choose:c}},_C={toPlain:n=>n.text,toRich:n=>J0(n)},ef=n=>new DOMParser().parseFromString(n,"text/html").body.textContent??"",tf=n=>({html:"",text:n,formatting:[]}),qC=({mode:n,onModeChange:e,initialHtml:t,initialText:r,onChange:o,onSubmit:i,initialCaret:s,onConversionError:a,conversions:l=_C,languages:u,initialLanguage:c,onLanguageChange:d,spellcheck:f})=>{const[h,g]=O.useState(t),[m,p]=O.useState(0),[y,_]=O.useState(r),[b,k]=O.useState(r),[S,x]=O.useState(!1),[w,v]=O.useState(!1),E=O.useRef({html:t,text:r,formatting:[]}),{language:A,source:T,choose:M}=yC({languages:u,text:b,initialLanguage:c});O.useEffect(()=>{d(A)},[A,d]);const j=L=>{E.current=L,k(L.text),o(L)},R=L=>{_(L),k(L),o(tf(L))},B=()=>{const L=E.current,P=l.toPlain(L),K=Cu("plain",ef(L.html),P);if(K.outcome==="blocked"){a(K);return}_(P),k(P),v(!0),o(tf(P)),e("plain")},Q=()=>{const L=l.toRich(y),P=Cu("rich",y,ef(L));if(P.outcome==="blocked"){a(P);return}g(L),p(K=>K+1),v(!0),e("rich")},ie=()=>{if(n==="plain"){Q();return}if(Kp("plain",E.current.formatting)){x(!0);return}B()},Z=F.jsxs(F.Fragment,{children:[F.jsx(tm,{language:A,languages:u,source:T,onSelect:M}),F.jsx(nm,{mode:n,onToggle:ie})]});return F.jsxs(F.Fragment,{children:[n==="plain"?F.jsx(X0,{value:y,onChange:R,onSubmit:i,initialCaret:w?"end":s,lang:A,trailing:Z}):F.jsx(Ux,{initialHtml:h,onChange:j,onSubmit:i,initialCaret:w?"end":s,lang:A,trailing:Z,spellcheck:f},m),F.jsx(Wp,{isOpen:S,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:()=>{x(!1),B()},onCancel:()=>x(!1)})]})};export{Yo as COMPOSE_TRANSFORMERS,qC as ComposeBody,tm as ComposeLanguageChip,nm as ComposeModeToggle,_C as DEFAULT_COMPOSE_CONVERSIONS,Zd as DETECTION_MIN_LENGTH,$C as EMPTY_RICH_TEXT,X0 as PlainTextEditor,Tx as RichTextCorrectionMenu,Ux as RichTextEditor,Fx as SUGGESTION_LIMIT,mC as detectComposeLanguage,WC as findMisspellings,H0 as htmlToMarkdown,J0 as markdownToHtml,hl as normaliseWord,JC as openSpellProvider,yC as useComposeLanguage};
|