ryugi-artifacts 1.96.0 → 1.97.0
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/dist/cli.cjs +4 -4
- package/dist/server.cjs +1 -1
- package/dist/viewer/{ActionBar-CBg5Lbhq.js → ActionBar-BEJ066Ej.js} +1 -1
- package/dist/viewer/{ActionIcon-Cc4tIoPf.js → ActionIcon-CelD6ljd.js} +1 -1
- package/dist/viewer/{AgentStatusPill-D0Rec9af.js → AgentStatusPill-B2LrXApc.js} +1 -1
- package/dist/viewer/{ArtboardLayout-C5pqwr8S.js → ArtboardLayout-DuPhmI2p.js} +1 -1
- package/dist/viewer/{ArtifactList-CXK1wKgO.js → ArtifactList-Cp_4E7tp.js} +1 -1
- package/dist/viewer/{ArtifactModal-DtAhWCXJ.js → ArtifactModal-D3ScY6_n.js} +1 -1
- package/dist/viewer/{Avatar-BkXEFoPL.js → Avatar-Bl67MCxf.js} +1 -1
- package/dist/viewer/{BottomSheet-BQW1npWE.js → BottomSheet-7r3g6yRy.js} +1 -1
- package/dist/viewer/{Canvas-BvgS7RZe.js → Canvas-BaCiqx37.js} +1 -1
- package/dist/viewer/{CloudLegalNotice-DqoeWQE4.js → CloudLegalNotice-C-lwr2NX.js} +1 -1
- package/dist/viewer/{Composer-t4_HrD_Y.js → Composer-DtmsJM8R.js} +1 -1
- package/dist/viewer/{CompositeItem-CPyga1ao.js → CompositeItem-r7w86f_k.js} +1 -1
- package/dist/viewer/{DocumentExportMenu-ChgnP6GL.js → DocumentExportMenu-DHSPKzzP.js} +1 -1
- package/dist/viewer/DocumentLayout-CJoYGdTu.js +2 -0
- package/dist/viewer/DocumentPage-CTXWOPjh.js +3 -0
- package/dist/viewer/{DraggablePanel-9ifKjt_G.js → DraggablePanel-DZLHeUmg.js} +1 -1
- package/dist/viewer/{DropdownMenu-COqNosvu.js → DropdownMenu-CJwUBLlC.js} +1 -1
- package/dist/viewer/{FieldControl-DGCh5UaB.js → FieldControl-CHQD9IDx.js} +1 -1
- package/dist/viewer/{GroupVerdict-CRdehNar.js → GroupVerdict-YCGvEg4H.js} +1 -1
- package/dist/viewer/{HtmlLayout-BtGbMait.js → HtmlLayout-L2YY8RF2.js} +1 -1
- package/dist/viewer/{Input-CbJjyKLA.js → Input-C4lfMDT0.js} +1 -1
- package/dist/viewer/{MenuTrigger-DeOY467Q.js → MenuTrigger-BP8vj2dt.js} +1 -1
- package/dist/viewer/{PhoneArtboardBar-D_NFOSi-.js → PhoneArtboardBar-BZpLfQYf.js} +1 -1
- package/dist/viewer/{PhoneSheet-hPziEorx.js → PhoneSheet-Dyg85WID.js} +1 -1
- package/dist/viewer/{Popover-mA0ZatAs.js → Popover-B_c2R3tb.js} +1 -1
- package/dist/viewer/{PreviewLayout-D6i9jAsH.js → PreviewLayout-Z9Q--w6E.js} +2 -2
- package/dist/viewer/{PublishMenu-VLSbq_cl.js → PublishMenu-eV9uW7Kg.js} +1 -1
- package/dist/viewer/{ReportLayout-TkIi9O3f.js → ReportLayout-DjlI-WU4.js} +1 -1
- package/dist/viewer/{Segmented-BqrFveQI.js → Segmented-xJdCLm-b.js} +1 -1
- package/dist/viewer/{Select-DOC2P1EA.js → Select-TB8D_2Ak.js} +1 -1
- package/dist/viewer/{SlidesLayout-Bgur5-Ez.js → SlidesLayout-DrnbCy4l.js} +3 -3
- package/dist/viewer/{SnapshotDocument-C0rk-m6N.js → SnapshotDocument-DeGHYbT2.js} +1 -1
- package/dist/viewer/{SplitFrame-CFXC7W03.js → SplitFrame-C8XTBMoN.js} +1 -1
- package/dist/viewer/{ThreadView-SodgS7UN.js → ThreadView-De_p-Sr1.js} +1 -1
- package/dist/viewer/{VerifyLayout-MN-8cJN7.js → VerifyLayout-Calc3qn5.js} +1 -1
- package/dist/viewer/{VirtualizedEditor-uWe43zaI-C1g9cCyX.js → VirtualizedEditor-uWe43zaI-CBFaNcDc.js} +1 -1
- package/dist/viewer/{VirtualizedRenderer-C_d95FXi-CiVdUIgQ.js → VirtualizedRenderer-C_d95FXi-Cg_8Iwar.js} +1 -1
- package/dist/viewer/{WarningsBadge-CFeZv8N3.js → WarningsBadge-BXOR30h4.js} +1 -1
- package/dist/viewer/{WhiteboardEditor-cZ32fLqJ-BHWo4yCF.js → WhiteboardEditor-cZ32fLqJ-BAVFcyMv.js} +1 -1
- package/dist/viewer/{WhiteboardLayout-Q-bMT-_q.js → WhiteboardLayout-CAcGLV3D.js} +1 -1
- package/dist/viewer/{WritingCursor-BDXPMRMS.js → WritingCursor-Bcmcf9RW.js} +1 -1
- package/dist/viewer/{api-DFo4Oqef.js → api-BCnpPU7U.js} +1 -1
- package/dist/viewer/{artifact-list-BWgn_fzw.js → artifact-list-BgZnDmry.js} +1 -1
- package/dist/viewer/{auto-publish-DHavv7el.js → auto-publish-CPtZZlz2.js} +1 -1
- package/dist/viewer/{channel-Cpar5IxH.js → channel-DM-J4UvB.js} +3 -3
- package/dist/viewer/{dist-rgEZOa2B.js → dist-0G4T7khJ.js} +1 -1
- package/dist/viewer/{dist-Bx1NxgVp.js → dist-B078fYsG.js} +1 -1
- package/dist/viewer/{dist-CQntsSqO.js → dist-B2eKRzdt.js} +1 -1
- package/dist/viewer/{dist-Xr1petIf.js → dist-BBkRo6YU.js} +1 -1
- package/dist/viewer/{dist-Du-e0WIr.js → dist-BKu_xDQJ.js} +1 -1
- package/dist/viewer/{dist-BZN2zA0y.js → dist-BQ9e4trY.js} +1 -1
- package/dist/viewer/{dist-CXUXyLWP.js → dist-BhEA0j6b.js} +1 -1
- package/dist/viewer/{dist-B9SEPjM9.js → dist-C5cT_f2R.js} +1 -1
- package/dist/viewer/{dist-C1vS2Suq.js → dist-CCL9krh0.js} +1 -1
- package/dist/viewer/{dist-DzarOfqM.js → dist-CFZeMEUu.js} +1 -1
- package/dist/viewer/{dist-DSX_HUxH.js → dist-CSznh8aj.js} +1 -1
- package/dist/viewer/{dist-DdZ3SfkZ.js → dist-CUM1f5sU.js} +1 -1
- package/dist/viewer/{dist-FYz4i8cO.js → dist-D4wETyt-.js} +2 -2
- package/dist/viewer/{dist-wKW8P0Oo.js → dist-D9vKXn61.js} +1 -1
- package/dist/viewer/{dist-CIwGvFo3.js → dist-DBdwPP9-.js} +1 -1
- package/dist/viewer/{dist-Cz69vRDy.js → dist-DE3_RTOy.js} +1 -1
- package/dist/viewer/{dist-DGge8ohf.js → dist-DJseCf4V.js} +1 -1
- package/dist/viewer/{dist-CQrf_3of.js → dist-DNArnIBh.js} +1 -1
- package/dist/viewer/{dist-CpL5hsD6.js → dist-DREvUDL0.js} +1 -1
- package/dist/viewer/{dist-Bpl4yhU-.js → dist-DkQsTfmV.js} +1 -1
- package/dist/viewer/{dist-bweeVyVC.js → dist-DtW-Vysc.js} +1 -1
- package/dist/viewer/{dist-DcDXtIp4.js → dist-DxWVxZGy.js} +1 -1
- package/dist/viewer/{dist-BXpWiPzV.js → dist-Dym_bxcg.js} +1 -1
- package/dist/viewer/{dist-BM4VNWsZ.js → dist-anZFdtZb.js} +1 -1
- package/dist/viewer/{editor-CkCjGIni.js → editor-CcqMiLz3.js} +4 -4
- package/dist/viewer/{icons-CvaVFQTZ.js → icons-DrkFjhmy.js} +1 -1
- package/dist/viewer/index.html +3 -3
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/{local-split-host-1U6JgPrf.js → local-split-host-Dl9rlSsp.js} +1 -1
- package/dist/viewer/preview.html +5 -5
- package/dist/viewer/preview.js +1 -1
- package/dist/viewer/{printDocument-m74qXcoZ.js → printDocument-UiN1Tkyp.js} +1 -1
- package/dist/viewer/{read-resolutions-UVCd7r_y.js → read-resolutions-CyYzExQ1.js} +1 -1
- package/dist/viewer/{ref-Bu4VUCqZ.js → ref-CVmDwuKG.js} +1 -1
- package/dist/viewer/{route-GGJyt0jy.js → route-CBDn8aA_.js} +2 -2
- package/dist/viewer/{route-messages-C6xnnJlF.js → route-messages-hJ8pJxir.js} +1 -1
- package/dist/viewer/{settings-BVzw2sWx.js → settings-CnSJna4w.js} +1 -1
- package/dist/viewer/{snap-Bt8K5ih5.js → snap-BpI2bGh5.js} +1 -1
- package/dist/viewer/{split-BVOyh9Pb.js → split-B6eupXjE.js} +2 -2
- package/dist/viewer/{tokens.stylex-B10cCmJn.js → tokens.stylex-4hFgkDcQ.js} +1 -1
- package/dist/viewer/{url-DUdroRW6.js → url-D2nInhsE.js} +1 -1
- package/dist/viewer/{useArtifactFeed-ByaH7dmh.js → useArtifactFeed-r3p9_j2-.js} +1 -1
- package/dist/viewer/{useCloudStatus-Dt6-7IpT.js → useCloudStatus-_QzffzLo.js} +1 -1
- package/dist/viewer/{useScrollLock-KLGnvBoH.js → useScrollLock-DQ9j79Pm.js} +1 -1
- package/dist/viewer/{useTranslation-EB04DdQ1.js → useTranslation-UGm7Uo4m.js} +1 -1
- package/dist/viewer/{useTriggerFocusGuards-BeyIvwv6.js → useTriggerFocusGuards-qc8VJB2K.js} +1 -1
- package/dist/viewer/{view-DbJjmh_I.js → view-BVogu64x.js} +1 -1
- package/dist/viewer/{viewport-CFJHn_Y6-CLkou4bB.js → viewport-CFJHn_Y6-C9yC5trU.js} +1 -1
- package/package.json +1 -1
- package/dist/viewer/DocumentLayout-Deg-ZGA1.js +0 -2
- package/dist/viewer/DocumentPage-DhlG_hX7.js +0 -3
package/dist/viewer/{WhiteboardEditor-cZ32fLqJ-BHWo4yCF.js → WhiteboardEditor-cZ32fLqJ-BAVFcyMv.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{b as t,v as n,w as r}from"./route-GGJyt0jy.js";import{t as i}from"./react-DlmbjZJV.js";import{An as a,Cn as o,Cr as s,Ct as c,Dn as l,En as u,Er as d,G as f,H as p,J as m,Jn as h,K as g,On as _,Ot as v,Sn as y,St as b,Tn as x,Tr as S,Tt as C,U as w,W as T,Yn as E,_n as D,_t as ee,at as te,bt as ne,dr as re,ft as ie,gt as ae,hr as oe,ht as se,it as ce,lt as le,nt as ue,ot as de,pt as fe,q as pe,qn as me,rt as he,tr as ge,tt as _e,ut as ve,vn as ye,vt as be,wn as xe,wr as Se,wt as Ce,xn as we,xr as Te,xt as Ee,yt as De}from"./url-DUdroRW6.js";import{t as Oe}from"./jsx-runtime-LKYXHABd.js";import{$ as ke,B as Ae,G as je,Q as Me,S as Ne,T as Pe,V as Fe,X as Ie,Z as Le,_ as Re,c as ze,d as Be,et as Ve,h as He,k as Ue,nt as We,o as Ge,q as Ke,rt as qe,tt as Je,w as Ye,x as Xe,z as Ze}from"./mergeRefs-DM4719JU.js";import{An as Qe,C as $e,Cn as et,E as tt,Gt as nt,I as rt,In as it,Jn as at,K as ot,Nt as st,Pt as ct,R as lt,Tn as ut,Ut as dt,Vn as ft,Z as pt,Zn as mt,an as ht,b as gt,bn as _t,dt as vt,g as yt,gn as bt,hn as xt,in as St,n as Ct,on as wt,ot as Tt,pn as Et,rn as Dt,un as Ot,z as kt}from"./useScrollLock-KLGnvBoH.js";import{Tt as At}from"./MotionConfigContext-B3czw3wn.js";import{$ as jt,B as Mt,C as Nt,F as Pt,H as Ft,I as It,J as Lt,K as Rt,L as zt,P as Bt,Q as Vt,R as Ht,S as Ut,T as Wt,U as Gt,V as Kt,X as qt,Y as Jt,Z as Yt,_ as Xt,a as Zt,at as Qt,b as $t,c as en,d as tn,et as nn,f as O,g as rn,h as an,i as on,it as sn,l as cn,lt as ln,m as un,n as dn,o as fn,p as pn,q as mn,r as hn,rt as gn,s as _n,st as vn,tt as yn,ut as bn,v as xn,x as Sn,y as Cn,z as wn}from"./Popover-mA0ZatAs.js";import{t as k}from"./arrow-up-kdcWAnXX.js";import{d as Tn,f as En}from"./useTriggerFocusGuards-BeyIvwv6.js";import{n as Dn,t as On}from"./type-DA3yqyzM.js";import{a as kn,i as An,n as jn,r as Mn,t as Nn}from"./minus-YVaskeP9.js";import{a as Pn,i as Fn,n as In,o as Ln,r as Rn,s as zn,t as Bn}from"./stringifyLocale-vuEzlEs6.js";import{t as Vn}from"./code-DZDLeByL.js";import{a as Hn,c as Un,i as Wn,l as Gn,n as Kn,o as qn,r as Jn,s as Yn,t as Xn,u as Zn}from"./trash-E1jt4Cuh.js";import{a as Qn,i as $n,n as er,t as tr}from"./ruler-C-6kncvn.js";import{t as nr}from"./image-DSbKs3OG.js";import{t as rr}from"./maximize-2-BEWXAYRs.js";import{t as ir}from"./MenuTrigger-DeOY467Q.js";var ar={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};ar.node;var or=At(ar),sr={name:`arrow-down-to-line`,size:24,node:[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]};sr.node;var cr=At(sr),lr={name:`arrow-up-to-line`,size:24,node:[[`path`,{d:`M5 3h14`,key:`7usisc`}],[`path`,{d:`m18 13-6-6-6 6`,key:`1kf1n9`}],[`path`,{d:`M12 7v14`,key:`1akyts`}]]};lr.node;var ur=At(lr),dr={name:`diamond`,size:24,node:[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]};dr.node;var fr=At(dr),pr={name:`dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]};pr.node;var mr=At(pr),hr={name:`equal`,size:24,node:[[`line`,{x1:`5`,x2:`19`,y1:`9`,y2:`9`,key:`1nwqeh`}],[`line`,{x1:`5`,x2:`19`,y1:`15`,y2:`15`,key:`g8yjpy`}]]};hr.node;var gr=At(hr),_r={name:`grip-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`9`,r:`1`,key:`124mty`}],[`circle`,{cx:`19`,cy:`9`,r:`1`,key:`1ruzo2`}],[`circle`,{cx:`5`,cy:`9`,r:`1`,key:`1a8b28`}],[`circle`,{cx:`12`,cy:`15`,r:`1`,key:`1e56xg`}],[`circle`,{cx:`19`,cy:`15`,r:`1`,key:`1a92ep`}],[`circle`,{cx:`5`,cy:`15`,r:`1`,key:`5r1jwy`}]]};_r.node;var vr=At(_r),yr={name:`group`,size:24,node:[[`path`,{d:`M3 7V5c0-1.1.9-2 2-2h2`,key:`adw53z`}],[`path`,{d:`M17 3h2c1.1 0 2 .9 2 2v2`,key:`an4l38`}],[`path`,{d:`M21 17v2c0 1.1-.9 2-2 2h-2`,key:`144t0e`}],[`path`,{d:`M7 21H5c-1.1 0-2-.9-2-2v-2`,key:`rtnfgi`}],[`rect`,{width:`7`,height:`5`,x:`7`,y:`7`,rx:`1`,key:`1eyiv7`}],[`rect`,{width:`7`,height:`5`,x:`10`,y:`12`,rx:`1`,key:`1qlmkx`}]]};yr.node;var br=At(yr),xr={name:`hash`,size:24,node:[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]};xr.node;var Sr=At(xr),Cr={name:`highlighter`,size:24,node:[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]};Cr.node;var wr=At(Cr),Tr={name:`letter-h`,size:24,node:[[`path`,{d:`M18 20V4`,key:`o2hl4u`}],[`path`,{d:`M6 12H18`,key:`1fx1vx`}],[`path`,{d:`M6 20V4`,key:`1w1bmo`}]],aliases:[`heading`]};Tr.node;var Er=At(Tr),Dr={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};Dr.node;var Or=At(Dr),kr={name:`lock-open`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]],aliases:[`unlock`]};kr.node;var Ar=At(kr),jr={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};jr.node;var Mr=At(jr),Nr={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};Nr.node;var Pr=At(Nr),Fr={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Fr.node;var Ir=At(Fr),Lr={name:`scan-search`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]};Lr.node;var Rr=At(Lr),zr={name:`slash`,size:24,node:[[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}]]};zr.node;var Br=At(zr),Vr={name:`spline`,size:24,node:[[`circle`,{cx:`19`,cy:`5`,r:`2`,key:`mhkx31`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}],[`path`,{d:`M5 17A12 12 0 0 1 17 5`,key:`1okkup`}]]};Vr.node;var Hr=At(Vr),Ur={name:`squircle`,size:24,node:[[`path`,{d:`M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9`,key:`garfkc`}]]};Ur.node;var Wr=At(Ur),Gr={name:`strikethrough`,size:24,node:[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]};Gr.node;var Kr=At(Gr),qr={name:`ungroup`,size:24,node:[[`rect`,{x:`11`,y:`14`,width:`10`,height:`7`,rx:`2`,key:`nfm8rk`}],[`rect`,{x:`3`,y:`3`,width:`10`,height:`7`,rx:`2`,key:`1ljebb`}]]};qr.node;var Jr=At(qr),Yr={name:`waypoints`,size:24,node:[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]};Yr.node;var Xr=At(Yr),Zr={name:`zoom-in`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};Zr.node;var Qr=At(Zr),$r={name:`zoom-out`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};$r.node;var ei=At($r),A=e(i(),1),j=Oe(),ti=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=A.useMemo(()=>({open:t,close:n}),[t,n]);return(0,j.jsx)(qt.Provider,{value:t,children:(0,j.jsx)(yn,{delay:i,timeoutMs:r,children:e.children})})},ni=class extends nn{constructor(){super(Vt(),`Tooltip`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function ri(){return new ni}var ii=A.createContext(void 0);function ai(){let e=A.useContext(ii);if(e===void 0)throw Error(Le(34));return e}var oi=A.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l,...u}=e,[f,p]=A.useState(void 0),[m,h]=d({controlled:i,default:a,name:`MenuRadioGroup`}),g=We((e,t)=>{o?.(e,t),t.isCanceled||h(e)}),_=je(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-labelledby":l??f,"aria-disabled":s||void 0,...u}}),v=A.useMemo(()=>({value:m,setValue:g,disabled:s}),[m,g,s]);return(0,j.jsx)(be.Provider,{value:p,children:(0,j.jsx)(ii.Provider,{value:v,children:_})})}),si=A.memo(A.forwardRef(function(e,t){let n=Ce()?.RadioGroup??oi;return(0,j.jsx)(n,{...e,ref:t})})),ci=A.createContext(void 0);function li(){let e=A.useContext(ci);if(e===void 0)throw Error(Le(35));return e}var ui=A.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:l=!1,value:u,style:d,...f}=e,{store:p}=v(),{value:m,setValue:h,disabled:g}=ai(),_=Se({guess:!0,label:a}),y=Fe(i),x=p.useState(`isActive`,_.index),S=p.useState(`floatingNodeId`),C=p.useState(`itemProps`),w=p.useState(`disabled`),T=s||g||w,E=m===u,{getItemProps:D,itemRef:ee}=c({closeOnClick:l,disabled:T,highlighted:x,id:y,store:p,nativeButton:o,nodeId:S,itemMetadata:b}),te=A.useMemo(()=>({disabled:T,highlighted:x,checked:E}),[T,x,E]);function ne(e){let t=Ze(Pe,e.nativeEvent,void 0,{preventUnmountOnClose:Je});h(u,t)}let re=je(`div`,e,{state:te,stateAttributesMapping:Ee,props:[C,{role:`menuitemradio`,"aria-checked":E,onClick:ne},f,D],ref:[ee,t,_.ref]});return(0,j.jsx)(ci.Provider,{value:te,children:re})}),di=A.forwardRef(function(e,t){let n=C(e,t);return n.visible?(0,j.jsx)(ui,{...e,ref:n.ref}):null}),fi=A.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=li(),c=A.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=mt(s.checked);_t({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return je(`span`,e,{state:f,stateAttributesMapping:Ee,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),pi=e(r(),1),mi=new Map;function hi(e={}){let{locale:t,...n}=e,r={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...n},i=`${Bn(t)}|${JSON.stringify(r)}`,a=mi.get(i);if(a)return a;let o=new Intl.Collator(t,r),s={contains(e,t,n){if(!t)return!0;let r=Ft(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(o.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Ft(e,n);return o.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Ft(e,n),i=t.length;return r.length>=i&&o.compare(r.slice(r.length-i),t)===0}};return mi.set(i,s),s}var gi=``;function _i(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function vi(e=!0){let t=ze(),n=A.useRef(null);return A.useEffect(()=>{if(!e||bt)return;let r=n.current;if(r==null)return;let i=_i(r);if(i==null)return;let a=i.data,o=`${a}${gi}`;return i.nodeValue=o,t.start(200,()=>{i.nodeValue===o&&(i.nodeValue=a)}),()=>{t.clear(),i.nodeValue===o&&(i.nodeValue=a)}},[e,n,t]),n}function yi(e,t,n,r,i,a,o,s,c,l=2){let u=Tt(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return vt(n.current,u)?void 0:u}var bi=A.createContext(void 0),xi=A.createContext(void 0),Si=A.createContext(void 0),Ci=A.createContext(!1),wi=A.createContext(``);function Ti(){let e=A.useContext(bi);if(!e)throw Error(Le(22));return e}function Ei(){let e=A.useContext(xi);if(!e)throw Error(Le(23));return e}function Di(){let e=A.useContext(Si);if(!e)throw Error(Le(24));return e}function Oi(){return A.useContext(wi)}function ki(){return A.useContext(Ci)}var Ai={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?Mt(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>rn(t,e,n)):rn(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};function ji(e){return e==null?void 0:`${e}-popup`}function Mi(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}var Ni=hi;function Pi(e,t=!1){let{overflowY:n}=Qe(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var Fi=Symbol(`none`),Ii={value:Fi,index:-1};function Li(e,t,n){let r=e.get(t);if(r!==void 0||n===Xt)return r;for(let[r,i]of e)if(rn(r,t,n))return i}function Ri(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:s,inputValue:c,open:u,defaultOpen:f=!1,selectionMode:p,onItemHighlighted:m,name:h,form:g,disabled:_=!1,readOnly:v=!1,required:b=!1,inputRef:x,grid:S=!1,items:C,filteredItems:w,filter:T,filterQuery:E,openOnInputClick:ee=!0,autoHighlight:ne=!1,keepHighlight:ie=!1,highlightItemOnHover:ae=!0,loopFocus:se=!0,itemToStringLabel:ce,itemToStringValue:le,isItemEqualToValue:ue=Xt,virtualized:fe=!1,inline:pe=!1,fillInputOnItemPress:me=!0,modal:he=!1,limit:_e=-1,autoComplete:ve=`list`,formAutoComplete:be,locale:xe,submitOnItemClick:Se=!1}=e,{clearErrors:Ce}=y(),{setDirty:we,validityData:Te,setFilled:Ee,name:De,disabled:Oe,setTouched:je,setFocused:Fe,validationMode:ze,validation:Be}=l(),He=ge(),Ge=ye({id:t}),Qe=Ni({locale:xe}),nt=Array.isArray(C)?null:C;if(nt&&typeof nt.label!=`function`)throw Error(Le(100));let at=nt?nt.data:C,ot=nt?.value,ut=ot?void 0:at,dt=A.useMemo(()=>{if(!w||!ot)return;let e=wn(w),t=e.map(ot),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return Li(n,r,i)}}},[w,ot]),pt=A.useMemo(()=>nt?e=>nt.label(e,ue,e=>{let t=dt?.findItem(e,ue);return t==null?Ft(e,ce):nt.itemLabel(t)}):ce,[nt,ce,dt,ue]),mt=A.useMemo(()=>nt?Object.assign(e=>nt.itemLabel(e),{selected:e=>Ft(e,pt)}):ce,[nt,pt,ce]);function _t(e){return Ft(e,pt)}let[vt,yt]=A.useState(!1),[bt,xt]=A.useState(null),Ct=A.useRef(bt),Tt=A.useRef([]),Et=A.useRef([]),Ot=A.useRef(null),kt=A.useRef(null),At=A.useRef(null),Mt=A.useRef(null),Pt=A.useRef(null),It=A.useRef(!1),Lt=A.useRef(null),Rt=A.useRef(null),zt=A.useRef(null),Bt=A.useRef(Ii),Vt=A.useRef(null),Ht=A.useRef([]),Ut=A.useRef(null),qt=Oe||_,Jt=De??h,Yt=p===`multiple`,Zt=p===`single`,Qt=c!==void 0||s!==void 0,en=at!==void 0,tn=w!==void 0,nn;nn=ne===`always`?`always`:ne?`input-change`:!1;let[O,an]=d({controlled:i,default:Yt?r??ke:r,name:`Combobox`,state:`selectedValue`}),on=A.useMemo(()=>T===null?()=>!0:T===void 0?Mi(Qe,mt):T,[T,Qe,mt]),sn=qe(()=>Qt?s??``:Zt?_t(O):``).current,[cn,ln]=d({controlled:c,default:sn,name:`Combobox`,state:`inputValue`}),[un,dn]=d({controlled:u,default:f,name:`Combobox`,state:`open`}),fn=Kt(at),pn=!un&&bt!==null?bt:String(cn).trim(),mn=Zt?_t(O):``,hn=Zt&&!vt&&pn!==``&&mn.length===pn.length&&Qe.contains(mn,pn),gn=hn?``:E??pn,_n=en&&tn&&hn&&(!nt||nt.hasValue(O,ue)),vn=A.useMemo(()=>at?wn(at):ke,[at]),yn=A.useMemo(()=>{if(w&&!_n)return w;if(!at)return ke;if(fn){let e=at,t=[],n=0;for(let r of e){if(_e>-1&&n>=_e)break;let e=_e>-1?_e-n:1/0,i=gn===``?r.items.slice(0,e):[];if(gn!==``)for(let t of r.items){if(i.length>=e)break;on(t,gn,mt)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(gn===``)return _e>-1?vn.slice(0,_e):vn;let e=[];for(let t of vn){if(_e>-1&&e.length>=_e)break;on(t,gn,mt)&&e.push(t)}return e},[w,_n,at,fn,gn,_e,on,mt,vn]),bn=A.useMemo(()=>{if(dt&&yn===w)return dt.values;let e=wn(yn);return ot?e.map(e=>ot(e)):e},[yn,w,dt,ot]),k=qe(()=>{let e=null;return pe&&un&&en&&p!==`none`&&(e=Cn(bn,O,ue,Yt)),new gt({id:Ge,labelId:void 0,selectedValue:O,open:un,items:ut,selectionMode:p,name:Jt,form:g,disabled:qt,readOnly:v,required:b,grid:S,virtualized:fe,openOnInputClick:ee,itemToStringLabel:pt,isItemEqualToValue:ue,modal:he,autoHighlight:nn,submitOnItemClick:Se,hasInputValue:Qt,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:pe,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:Ve,id:Ge,selectionMode:p,disabled:qt,readOnly:v,isItemEqualToValue:ue},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:p===`none`},{onOpenChangeComplete:Je,setOpen:Je,setInputValue:Je,setSelectedValue:Je,setIndices:Je,handleSelection:Je,forceMount:Je,requestSubmit:Je,listRef:Tt,labelsRef:Et,popupRef:Ot,emptyRef:Pt,inputRef:kt,startDismissRef:At,endDismissRef:Mt,chipsContainerRef:Lt,clearRef:Rt,valuesRef:Ht,pointerDownItemRef:Ut,selectionEventRef:zt},Ai)}).current,Tn=p===`none`?cn:O,En=A.useMemo(()=>p===`none`?Tn:Array.isArray(O)?O.map(e=>Gt(e,le)):Gt(O,le),[Tn,le,p,O]),Dn=We(m),On=We(n),kn=k.useState(`activeIndex`),An=k.useState(`selectedIndex`),jn=k.useState(`positionerElement`),Mn=k.useState(`listElement`),Nn=k.useState(`triggerElement`),Pn=k.useState(`inputElement`),Fn=k.useState(`inputGroupElement`),In=k.useState(`inline`),Ln=k.useState(`inputInsidePopup`),Rn=k.useState(`inputOwnsFormValue`),zn=Zt&&!Ln&&cn===mn,Bn=et(Nn),{openMethod:Vn,triggerProps:Hn}=de(un),Un=We(()=>En);o(Ln?Bn:kt,Ge,Tn,Un,!qt,h);let Wn=We(()=>{at?Et.current=bn.map(_t):k.set(`forceMounted`,!0)}),Gn=We((e,t,n,r)=>{if(t===-1){if(Bt.current===Ii)return;Bt.current=Ii}else Bt.current={value:e,index:t};Dn(e,Ae(n,r,{index:t}))}),Kn=We(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),k.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?Gn(void 0,-1,r,e.event):Gn(Ht.current[n],n,r,e.event)}),qn=We((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(It.current=n.reason===Ne,n.reason===`input-change`){un&&bt!==null&&xt(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&yt(!0),Vt.current={hasQuery:e};let n=k.state.listElement;if(!k.state.virtualized&&n){let e=Ot.current;for(let t of it(n.firstElementChild??n)){if(!ft(t)||(e?!ht(e,t):t.getAttribute(`role`)===`dialog`))break;if(Pi(t)){t.scrollTop=0;break}}}e&&nn&&k.state.activeIndex==null&&(un||In)&&k.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&k.state.inputInsidePopup&&(Vt.current={hasQuery:!1,selection:!0});ln(t)}}),Jn=We(e=>{let t=!e&&Ln&&!In&&cn!==``&&(String(cn).trim()===bt||cn===mn);!e&&(t||cn===``||zn)&&yt(!1),xt(null),t&&qn(``,Ze(Ne))}),[Yn,Xn]=A.useState(!1),Zn=We((t,n)=>{if(un===t)return;n.reason===`escape-key`&&en&&bn.length===0&&!Pt.current&&n.allowPropagation();let r=n,i=tt(r);if(e.onOpenChange?.(t,r),Vt.current?.hasQuery&&n.reason===`input-change`===n.isCanceled&&(Vt.current=null),!n.isCanceled&&(t&&bt!==null&&Jn(n.reason===Xe),!t&&vt&&(Zt?(In||xt(pn),pn===``&&yt(!1)):Yt&&(In||xt(pn),Ln&&Kn({activeIndex:null}),(!Ln||In)&&qn(``,Ze(Ne,n.event,void 0,{isItemPress:n.reason===Pe})))),t||Xn(i()),dn(t),!t&&Ln&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(je(!0),Fe(!1),ze===`onBlur`))){let e=p===`none`?cn:O;Be.commit(e)}}),Qn=We((e,t)=>{a?.(e,t),t.isCanceled||(an(e),(p===`none`&&Ot.current&&me||Zt&&!k.state.inputInsidePopup)&&qn(_t(e),Ze(t.reason,t.event)))}),$n=We((e,t)=>{let n=wt(e),r=zt.current??e;zt.current=null;let i=Ze(Pe,r),a=St(n,`a`)?.getAttribute(`href`);if(a)a.startsWith(`#`)&&Zn(!1,i);else if(Yt){let e=Array.isArray(O)?O:[],n=Nt(e,t,ue),r=n?Sn(e,t,ue):[...e,t];if(Qn(r,i),i.isCanceled||!(kt.current&&kt.current.value.trim()!==``))return;if(k.state.inputInsidePopup){qn(``,Ze(Ne,i.event,void 0,{isItemPress:!0}));let e=Vt.current;e&&!n&&(e.toggledValue=t)}else Zn(!1,i)}else{if(Qn(t,i),i.isCanceled)return;Zn(!1,i)}}),er=We(()=>{let e=Be.inputRef.current?.form??k.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),tr=We(()=>{if(On?.(!1),yt(!1),xt(null),Kn(p===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Yt&&kt.current&&kt.current.value!==``&&!It.current&&qn(``,Ze(Ne)),Zt){if(k.state.inputInsidePopup)kt.current&&kt.current.value!==``&&qn(``,Ze(Ne));else{let e=_t(O);kt.current&&kt.current.value!==e&&qn(e,Ze(e===``?Ne:Ue))}}}),nr=A.useMemo(()=>In&&jn?{current:St(jn,`[role="dialog"]`)}:Ot,[In,jn]),{mounted:rr,transitionStatus:ir,forceUnmount:ar}=rt({open:un,ref:nr,preventUnmountOnClose:Yn,setPreventUnmountOnClose:Xn,onUnmount:tr});A.useImperativeHandle(e.actionsRef,()=>({unmount:ar,close:()=>Zn(!1,Ze(Re))}),[ar,Zn]),Me(function(){let e=Ct.current!==null&&bt===null;if(Ct.current=bt,un&&(!e||!en)||(un||(Ut.current=null),p===`none`))return;let t=en?bn:Ht.current;Kn({selectedIndex:Cn(t,O,ue,Yt)})},[un,bt,O,p,Yt,en,bn,ue,Kn]),Me(()=>{at&&(Ht.current=bn,Tt.current.length=bn.length)},[at,bn]),Me(()=>{!un&&Vt.current?.hasQuery&&(Vt.current=null)},[un]),Me(()=>{if(!un&&In&&nr.current){Vt.current=null;return}let e=en||tn?bn:Ht.current,t=Vt.current;if(t){let n=un||In||k.state.positionerElement?.hidden===!1;if(t.hasQuery){let t=kt.current;!nn||String(cn).trim()===``||In&&nn!==`always`&&(!t||Dt(t.ownerDocument)!==t)?Vt.current=null:n&&(e[0]!==void 0||!en&&!tn)&&(k.set(`activeIndex`,0),Vt.current=null)}else if(String(cn).trim()===``&&(Vt.current=null,n)){let e=t.selection;nn===`always`&&!e&&k.state.selectionMode===`none`&&k.set(`activeIndex`,0),queueMicrotask(()=>{if(!k.state.open&&(!k.state.inline||nr.current)||kt.current&&kt.current.value.trim()!==``)return;let n=k.state.selectedValue,r=k.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:k.state.selectionMode!==`none`&&n!=null){let e=en||tn?bn:Ht.current,i=xn(e,t.toggledValue,k.state.isItemEqualToValue);k.set(`activeIndex`,i===-1?Cn(e,n,k.state.isItemEqualToValue,r):i)}else e?k.set(`activeIndex`,null):nn===`always`&&k.set(`activeIndex`,0)})}}if(!un&&!In)return;let n=k.state.activeIndex;if(n==null){if(nn===`always`&&e.length>0){k.set(`activeIndex`,0);return}Gn(void 0,-1,Ue);return}if(n>=e.length){Gn(void 0,-1,Ue),k.set(`activeIndex`,null);return}let r=e[n],i=Bt.current.value,a=i!==Fi&&rn(r,i,k.state.isItemEqualToValue);Bt.current.index===n&&a||Gn(r,n,Ue)},[kn,nn,Gn,tn,en,bn,In,un,nr,k,cn]),Me(()=>{Ee(p===`none`?String(cn)!==``:Yt?Array.isArray(O)&&O.length>0:O!=null)},[Ee,p,cn,O,Yt]),A.useEffect(()=>{en&&nn&&bn.length===0&&Kn({activeIndex:null})},[en,nn,bn.length,Kn]);function or(){un&&pn!==``&&pn!==String(sn)&&!zn&&yt(!0)}function sr(){un&&bt!==null&&Jn(!1)}let cr=!1;function lr(){!cr&&cn!==mn&&(cr=!0,qn(mn,Ze(Ue)))}function ur(){p!==`none`&&(Ce(Jt),we($t(O,Te.initialValue,ue)),Be.change(O),Zt&&!Qt&&!Ln&&lr())}function dr(){Zt&&!Qt&&!Ln&&!vt&&lr()}function fr(){p===`none`&&(Ce(Jt),we(cn!==Te.initialValue),Be.change(cn))}D(pn,or),D(un,sr),D(O,ur),D(mn,dr),D(at,dr),D(cn,fr);let pr=jt({open:In?!0:un,onOpenChange:Zn,elements:{reference:Ln?Nn:Pn,floating:jn}}),mr=S?`grid`:`listbox`,hr=un||In,gr=hr?`true`:`false`,_r=A.useMemo(()=>{let e=Pn?.tagName===`INPUT`,t=Pn==null||e,n=t||hr,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=gr,r[`aria-haspopup`]=mr,r[`aria-controls`]=hr?Mn?.id:void 0,r[`aria-autocomplete`]=v?`none`:ve),{reference:r,floating:{role:`presentation`}}},[Pn,hr,gr,mr,Mn?.id,ve,v]),vr=oe(pr,{enabled:!qt&&ee,event:`mousedown-only`,toggle:!1,touchOpenDelay:Ln?0:100,reason:Ye}),yr=lt(pr,{enabled:!qt&&!In,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:In?!0:void 0,outsidePress(e){let t=wt(e);return!ht(Nn,t)&&!ht(Rt.current,t)&&!ht(Lt.current,t)&&!ht(Fn,t)}}),br=re(pr,{enabled:!qt,id:Ge,listRef:Tt,activeIndex:kn,selectedIndex:An,virtual:!0,loopFocus:se,allowEscape:se&&!nn,focusItemOnOpen:vt||p===`none`&&!nn?!1:`auto`,focusItemOnHover:ae,resetOnPointerLeave:!ie,orientation:S?`horizontal`:void 0,rtl:He===`rtl`,disabledIndices:ke,grid:S?yi:void 0,onNavigate(e,t){(t||un||In&&e===null)&&ir!==`ending`&&Kn({activeIndex:e,type:te(t),event:t?.nativeEvent})}}),xr=A.useMemo(()=>Ke(br.reference,{onKeyDown(e){S&&k.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},yr.reference,vr.reference,_r.reference),[br.reference,yr.reference,vr.reference,_r.reference,S,k]),Sr=A.useMemo(()=>Ke($e,yr.floating),[yr.floating]),Cr=A.useMemo(()=>Ke(br.floating,_r.floating),[br.floating,_r.floating]),wr=A.useMemo(()=>{let e=br.item;return{props:e?{...e,onFocus:void 0}:Ve,id:Ge,selectionMode:p,disabled:qt,readOnly:v,isItemEqualToValue:ue}},[br.item,Ge,p,qt,v,ue]);k.useContextCallback(`setOpen`,Zn),k.useContextCallback(`setInputValue`,qn),k.useContextCallback(`setSelectedValue`,Qn),k.useContextCallback(`setIndices`,Kn),k.useContextCallback(`handleSelection`,$n),k.useContextCallback(`forceMount`,Wn),k.useContextCallback(`requestSubmit`,er),k.useContextCallback(`onOpenChangeComplete`,n),Wt(()=>{k.update({inline:pe,popupProps:Sr,listProps:Cr,inputProps:xr,triggerProps:Hn,itemRoot:wr})});let Tr={id:Ge,selectedValue:O,open:un,mounted:rr,transitionStatus:ir,items:ut,inline:pe,popupProps:Sr,listProps:Cr,inputProps:xr,triggerProps:Hn,itemRoot:wr,openMethod:Vn,selectionMode:p,name:Jt,form:g,disabled:qt,readOnly:v,required:b,grid:S,virtualized:fe,openOnInputClick:ee,itemToStringLabel:pt,modal:he,autoHighlight:nn,isItemEqualToValue:ue,submitOnItemClick:Se,hasInputValue:Qt};Me(()=>{k.update({...Tr,inputOwnsFormValue:p===`none`&&(pe||!k.state.inputInsidePopup)})},[k,...Object.values(Tr)]);let Er=Ie(x,Be.inputRef),Dr=A.useMemo(()=>({query:pn,hasItems:en,filteredItems:yn,flatFilteredValues:bn}),[pn,en,yn,bn]),Or=A.useMemo(()=>Array.isArray(Tn)?``:Gt(Tn,le),[Tn,le]),kr=Yt&&Array.isArray(O)&&O.length>0,Ar=Yt||p===`none`&&Rn?void 0:Jt,jr=A.useMemo(()=>!Yt||!Array.isArray(O)||!Jt?null:O.map(e=>{let t=Gt(e,le);return(0,j.jsx)(`input`,{type:`hidden`,form:g,name:Jt,value:t,disabled:qt},t)}),[Yt,O,g,Jt,le,qt]),Mr=(0,j.jsxs)(A.Fragment,{children:[e.children,(0,j.jsx)(`input`,{...Be.getValidationProps(qt,{onFocus(){Ln?Nn?.focus():(kt.current||Nn)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||qt||v)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=Ze(Ue,e.nativeEvent),i=()=>Ht.current.findIndex(e=>Gt(e,le).toLowerCase()===n||_t(e).toLowerCase()===n);function a(){if(Yt)return;if(p===`none`){qn(t,r);return}let e=i();e===-1&&(e=Ht.current.findIndex((e,t)=>{let r=Et.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Ht.current[e];a!=null&&Qn?.(a,r)}Zt&&(Wn(),at&&i()===-1&&k.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:Ge&&Ar==null?`${Ge}-hidden-input`:void 0,form:g,name:Ar,autoComplete:be,disabled:qt,required:b&&!kr,readOnly:v,value:Or,ref:Er,style:Ar?ct:st,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),jr]});return(0,j.jsx)(bi.Provider,{value:k,children:(0,j.jsx)(xi.Provider,{value:pr,children:(0,j.jsx)(Ci.Provider,{value:en,children:(0,j.jsx)(Si.Provider,{value:Dr,children:(0,j.jsx)(wi.Provider,{value:cn,children:Mr})})})})})}var zi=`data-popup-side`,Bi=`data-list-empty`,Vi={...nt,...a,popupSide:e=>e?{[zi]:e}:null,listEmpty:e=>e?{[Bi]:``}:null};function Hi(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function Ui(){return Di().filteredItems.length===0}function Wi(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function Gi(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var Ki=A.createContext(void 0);function qi(){return A.useContext(Ki)}var Ji=A.createContext(void 0);function Yi(e){let t=A.useContext(Ji);if(t===void 0&&!e)throw Error(Le(21));return t}var Xi=A.forwardRef(function(e,t){let n=Ti(),{buttonRef:r,getButtonProps:i}=ut({native:!1}),a=Ie(t,r);function o(e){n.context.setOpen(!1,Ze(Be,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,j.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:ct})}),Zi=A.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:d,setTouched:f,validationMode:p,validation:m}=l(),{labelId:h}=we(),g=qi(),v=!!Yi(!0),y=Ti(),b=Oi(),S=ge(),C=y.useState(`required`),w=y.useState(`disabled`),T=y.useState(`readOnly`),E=y.useState(`name`),D=y.useState(`form`),ee=y.useState(`selectionMode`),ne=y.useState(`autoHighlight`),re=y.useState(`inputProps`),ie=y.useState(`triggerProps`),ae=y.useState(`open`),oe=y.useState(`mounted`),se=y.useState(`selectedValue`),ce=y.useState(`id`),le=y.useState(`inline`),ue=y.useState(`modal`),de=!!ne,fe=Hi(y),pe=d||w||i,me=Ui(),he=xe(pe,y.context.inputRef),_e=v||le,ve=!_e||ue,ye=Fe(a??(_e?void 0:ce)),be=v?_:c,[Se,Ce]=A.useState(null),Te=A.useRef(!1),Ee=A.useRef(null);Me(()=>{ae||(Ee.current=null)},[ae]);let De=ee===`none`&&!v,Oe=We(e=>{let t=v||y.state.inline;t&&!y.state.hasInputValue&&y.context.setInputValue(``,Ze(Ue)),y.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:De})}),ke=v?s:m.getValidationProps(pe,s);function Ae(e){y.context.setIndices({activeIndex:null,selectedIndex:null,type:te(e),event:e})}let Pe={...be,open:ae,disabled:pe,readOnly:T,popupSide:fe,listEmpty:me};function Ie(e){if(!g)return;let t,n=g.chipsRef.current.length,[r]=Wi(S);return e.key===r&&(e.currentTarget.selectionStart??0)===0&&se.length>0&&(e.preventDefault(),t=n>0?n-1:void 0),t}let Le=je(`input`,e,{state:Pe,ref:[t,y.context.inputRef,Oe],props:[re,ie,{value:Se??b,"aria-readonly":T||void 0,"aria-required":C||void 0,"aria-labelledby":h,disabled:pe,readOnly:T,required:ee===`none`?C:void 0,form:D,...De&&E&&{name:E},id:ye,onFocus(){if(he(!0),!le)return;let e=Ee.current;Ee.current=null,e!=null&&Object.hasOwn(y.context.valuesRef.current,e)&&y.context.setIndices({activeIndex:e})},onBlur(){f(!0),he(!1);let e=y.state.activeIndex;if(le&&e!==null&&ne!==`always`&&(Ee.current=e,y.context.setIndices({activeIndex:null})),p===`onBlur`){let e=ee===`none`?b:se;m.commit(e)}},onCompositionStart(e){xt||(Te.current=!0,Ce(e.currentTarget.value))},onCompositionEnd(e){Te.current=!1;let t=e.currentTarget.value;Ce(null),y.context.setInputValue(t,Ze(Xe,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=Te.current||!r;function a(e){!T&&!pe&&e&&i&&(y.context.setOpen(!0,Ze(Xe,t)),de||Ae(t))}if(Te.current){let n=e.currentTarget.value;Ce(n),n===``&&!y.state.openOnInputClick&&!y.state.inputInsidePopup&&y.context.setOpen(!1,Ze(Ne,t));let r=n.trim(),i=de&&r!==``;a(r),ae&&y.state.activeIndex!==null&&!i&&Ae(t);return}let o=Ze(Xe,t);if(y.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=Ze(Ne,t);s&&!y.state.inputInsidePopup&&(ee===`single`&&y.context.setSelectedValue(null,c),y.state.openOnInputClick||y.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),ae&&y.state.activeIndex!==null&&!de&&Ae(t)},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(pe||T){T&&e.key===`Enter`&&ae&&y.state.activeIndex!==null&&Ot(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=S===`rtl`;if(e.key===`Home`){Ot(e);let n=Et&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){Ot(e);let i=Et&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!oe&&e.key===`Escape`){let t=ee===`multiple`&&Array.isArray(se)?se.length===0:se===null,n=Ze(He,e.nativeEvent),r=ee===`multiple`?[]:null;y.context.setInputValue(``,n),y.context.setSelectedValue(r,n),t||y.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(g&&e.key===`Backspace`&&t.value===``&&Array.isArray(se)&&se.length>0){let t=g.chipsRef.current.length,n=t>0?t-1:se.length-1,r=se.filter((e,t)=>t!==n);Ae(e.nativeEvent),y.context.setSelectedValue(r,Ze(Ue,e.nativeEvent));return}let i=Ie(e);if(i!==void 0&&g?.chipsRef.current[i]?.focus(),e.which!==229&&e.key===`Enter`&&ae){let t=y.state.activeIndex,n=e.nativeEvent;if(t===null){if(le)return;y.context.setOpen(!1,Ze(Ue,n));return}Ot(e),Gi(y,t,n)}}},ke],stateAttributesMapping:Vi}),Re=v?(0,j.jsx)(u.Provider,{value:x,children:Le}):Le;return(0,j.jsxs)(A.Fragment,{children:[ae&&ve&&(0,j.jsx)(Xi,{ref:y.context.startDismissRef}),Re]})}),Qi=A.createContext(null);function $i(){return A.useContext(Qi)}function ea(e){let{children:t}=e,{filteredItems:n}=Di(),r=$i(),i=r?r.items:n;return(0,j.jsx)(A.Fragment,{children:i.map(t)})}var ta=A.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=Ti(),l=Ei(),u=!!Yi(!0),{filteredItems:d,hasItems:f}=Di(),p=c.useState(`selectionMode`),m=c.useState(`grid`),h=c.useState(`readOnly`),g=c.useState(`listProps`),_=c.useState(`virtualized`),v=c.useState(`forceMounted`),y=p===`multiple`,b=d.length===0,x=We(e=>{c.set(`positionerElement`,e)}),C=We(e=>{c.set(`listElement`,e)}),w=A.useMemo(()=>typeof o==`function`?n||=(0,j.jsx)(ea,{children:o}):o,[o]),T={empty:b},E=l.useState(`floatingId`),D=je(`div`,e,{state:T,ref:[t,C,u?null:x],props:[g,{children:w,tabIndex:-1,id:E,role:m?`grid`:`listbox`,"aria-multiselectable":y?`true`:void 0,"aria-readonly":!m&&h?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;Ot(e),Gi(c,t,e.nativeEvent)}}},s]});if(_)return D;let ee=f&&!v?void 0:c.context.labelsRef;return(0,j.jsx)(S,{elementsRef:c.context.listRef,labelsRef:ee,children:D})}),na=A.createContext(void 0);function ra(){let e=A.useContext(na);if(e===void 0)throw Error(Le(20));return e}var ia=A.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Ti(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,j.jsx)(na.Provider,{value:n,children:(0,j.jsx)(ot,{ref:t,...r})}):null}),aa=A.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m=!1,collisionAvoidance:h=pt,style:g,..._}=e,v=Ti(),y=Ei(),b=ra(),x=v.useState(`modal`),S=v.useState(`open`),C=v.useState(`mounted`),w=v.useState(`openMethod`),T=v.useState(`positionerElement`),D=v.useState(`triggerElement`),ee=v.useState(`inputElement`),te=v.useState(`inputGroupElement`),ne=v.useState(`inputInsidePopup`),re=v.useState(`transitionStatus`),ie=Ui(),ae=E({anchor:i??(ne?D:te??ee),floatingRootContext:y,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,lazyFlip:!0});ve(S&&x,w===`touch`,T,D);let oe={open:S,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,empty:ie};Me(()=>{v.set(`popupSide`,ae.side)},[v,ae.side]);let se=We(e=>{v.set(`positionerElement`,e)}),ce=me(e,oe,{styles:ae.positionerStyles,transitionStatus:re,props:_,refs:[t,se],hidden:!C,inert:!S});return(0,j.jsxs)(Ji.Provider,{value:ae,children:[C&&x&&(0,j.jsx)(Ct,{inert:yt(!S),cutout:te??ee??D}),ce]})}),oa={...dt,...at},sa=A.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=Ti(),l=Yi(),u=Ei(),d=c.useState(`mounted`),f=c.useState(`open`),p=c.useState(`openMethod`),m=c.useState(`popupProps`),g=c.useState(`transitionStatus`),_=c.useState(`inputInsidePopup`),v=c.useState(`inputElement`),y=c.useState(`modal`),b=c.useState(`id`),x=Ui(),S=s.id??(_?ji(b):void 0);Me(()=>(c.set(`popupId`,c.context.popupRef.current?.id||S),()=>{c.set(`popupId`,void 0)}),[c,S]),_t({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let C={open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:g,empty:x},w=je(`div`,e,{state:C,ref:[t,c.context.popupRef],props:[m,{id:S,role:_?`dialog`:`presentation`,onFocus(e){let t=wt(e.nativeEvent);p!==`touch`&&(ht(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},h(g),s],stateAttributesMapping:oa}),T=a===void 0?_?e=>e===`touch`?c.context.popupRef.current:v:!1:a,E;E=o??(_?void 0:!1);let D=!_||y;return(0,j.jsx)(kt,{context:u,disabled:!d,modal:D,openInteractionType:p,initialFocus:T,returnFocus:E,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,j.jsxs)(A.Fragment,{children:[w,D&&(0,j.jsx)(Xi,{ref:c.context.endDismissRef})]})})}),ca=A.createContext(void 0),la=A.createContext(!1);function ua(){return A.useContext(la)}function da(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...f}=t,p=A.useRef(null),m=Se({guess:!0,index:l,textRef:p}),h=Ti(),g=ua(),_=ki(),{props:v,id:y,selectionMode:b,disabled:x,readOnly:S,isItemEqualToValue:C}=h.useState(`itemRoot`),w=x||u,T=b!==`none`,E=l??i??m.index,D=E!==-1,ee=h.useState(`isActive`,E),te=h.useState(`isSelected`,c),ne=A.useRef(null),re=y!=null&&D?`${y}-${E}`:void 0,ie=te&&T;Me(()=>{if(!D||!r&&l==null)return;let e=h.context.listRef.current;return e[E]=ne.current,()=>{delete e[E]}},[D,r,E,l,h]),Me(()=>{if(!D||_)return;let e=h.context.valuesRef.current;return e[E]=c,()=>{delete e[E]}},[D,_,E,c,h]),Me(()=>{if(!D||_)return;let e=h.state.selectedValue,t=h.state.selectedIndex;h.state.selectionMode===`multiple`&&Array.isArray(e)?t=Ut(E,c,h.context.valuesRef.current,e,C,t):rn(c,e,C)&&(t=E),h.set(`selectedIndex`,t)},[D,_,h,E,c,C]);let{getButtonProps:ae,buttonRef:oe}=ut({disabled:w,focusableWhenDisabled:!0,native:d,composite:!0}),se={disabled:w,selected:ie,highlighted:ee};function ce(e){function t(){h.context.handleSelection(e,c)}h.state.submitOnItemClick?(pi.flushSync(t),h.context.requestSubmit()):t()}let le={id:re,role:g?`gridcell`:`option`,"aria-selected":T?ie:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(h.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){w||S||ce(e.nativeEvent)},onMouseUp(e){let t=h.context.pointerDownItemRef.current===e.currentTarget;h.context.pointerDownItemRef.current=null,w||S||e.button!==0||t||!ee||ce(e.nativeEvent)}},ue=je(`div`,t,{ref:[oe,n,m.ref,ne],state:se,props:[v,le,f,ae]}),de=A.useMemo(()=>({selected:ie,textRef:p}),[ie,p]);return(0,j.jsx)(ca.Provider,{value:de,children:ue})}function fa(e){let{componentProps:t,forwardedRef:n}=e,r=Ti().useState(`isItemEqualToValue`),{flatFilteredValues:i}=Di(),a=t.value??null,o=xn(i,a,r);return(0,j.jsx)(da,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:o})}var pa=A.memo(A.forwardRef(function(e,t){let n=Ti().useState(`virtualized`);return n&&e.index==null?(0,j.jsx)(fa,{componentProps:e,forwardedRef:t}):(0,j.jsx)(da,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),ma=A.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=Di(),c=Ti(),l=vi(),u=s.length===0?a:null;return je(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),ha=n(),ga=(0,A.createContext)(null);function _a(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n==null?null:n.getTheme())}}}function va(){let e=(0,A.useContext)(ga);return e??function(e,...t){throw function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e,...t)}(8),e}function ya(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function M(e,...t){throw ya(e,...t)}function ba(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function xa(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var Sa=xa();function Ca(){return Sa&&`documentMode`in document?document.documentMode:null}var wa=Ca();function Ta(e){return Sa&&e.test(navigator.platform)}function Ea(e){return Sa&&e.test(navigator.userAgent)}var Da=Ta(/Mac|iPod|iPhone|iPad/),Oa=Ea(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function ka(){return!(!Sa||!(`InputEvent`in window)||wa)&&`getTargetRanges`in new window.InputEvent(`input`)}var Aa=ka();function ja(){return Sa&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var Ma=ja(),Na=Ea(/Android/),Pa=Ea(/Version\/[\d.]+.*Safari/)&&!Na,Fa=Ea(/^(?=.*Chrome).*/i),Ia=Sa&&Na&&Fa,La=Ea(/AppleWebKit\/[\d.]+/)&&Da&&!Fa;function Ra(){return 2047}var za=Ra(),Ba=Pa||Ma||La?`\xA0`:``,Va=`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{b as t,v as n,w as r}from"./route-CBDn8aA_.js";import{t as i}from"./react-DlmbjZJV.js";import{An as a,Cn as o,Cr as s,Ct as c,Dn as l,En as u,Er as d,G as f,H as p,J as m,Jn as h,K as g,On as _,Ot as v,Sn as y,St as b,Tn as x,Tr as S,Tt as C,U as w,W as T,Yn as E,_n as D,_t as ee,at as te,bt as ne,dr as re,ft as ie,gt as ae,hr as oe,ht as se,it as ce,lt as le,nt as ue,ot as de,pt as fe,q as pe,qn as me,rt as he,tr as ge,tt as _e,ut as ve,vn as ye,vt as be,wn as xe,wr as Se,wt as Ce,xn as we,xr as Te,xt as Ee,yt as De}from"./url-D2nInhsE.js";import{t as Oe}from"./jsx-runtime-LKYXHABd.js";import{$ as ke,B as Ae,G as je,Q as Me,S as Ne,T as Pe,V as Fe,X as Ie,Z as Le,_ as Re,c as ze,d as Be,et as Ve,h as He,k as Ue,nt as We,o as Ge,q as Ke,rt as qe,tt as Je,w as Ye,x as Xe,z as Ze}from"./mergeRefs-DM4719JU.js";import{An as Qe,C as $e,Cn as et,E as tt,Gt as nt,I as rt,In as it,Jn as at,K as ot,Nt as st,Pt as ct,R as lt,Tn as ut,Ut as dt,Vn as ft,Z as pt,Zn as mt,an as ht,b as gt,bn as _t,dt as vt,g as yt,gn as bt,hn as xt,in as St,n as Ct,on as wt,ot as Tt,pn as Et,rn as Dt,un as Ot,z as kt}from"./useScrollLock-DQ9j79Pm.js";import{Tt as At}from"./MotionConfigContext-B3czw3wn.js";import{$ as jt,B as Mt,C as Nt,F as Pt,H as Ft,I as It,J as Lt,K as Rt,L as zt,P as Bt,Q as Vt,R as Ht,S as Ut,T as Wt,U as Gt,V as Kt,X as qt,Y as Jt,Z as Yt,_ as Xt,a as Zt,at as Qt,b as $t,c as en,d as tn,et as nn,f as O,g as rn,h as an,i as on,it as sn,l as cn,lt as ln,m as un,n as dn,o as fn,p as pn,q as mn,r as hn,rt as gn,s as _n,st as vn,tt as yn,ut as bn,v as xn,x as Sn,y as Cn,z as wn}from"./Popover-B_c2R3tb.js";import{t as k}from"./arrow-up-kdcWAnXX.js";import{d as Tn,f as En}from"./useTriggerFocusGuards-qc8VJB2K.js";import{n as Dn,t as On}from"./type-DA3yqyzM.js";import{a as kn,i as An,n as jn,r as Mn,t as Nn}from"./minus-YVaskeP9.js";import{a as Pn,i as Fn,n as In,o as Ln,r as Rn,s as zn,t as Bn}from"./stringifyLocale-vuEzlEs6.js";import{t as Vn}from"./code-DZDLeByL.js";import{a as Hn,c as Un,i as Wn,l as Gn,n as Kn,o as qn,r as Jn,s as Yn,t as Xn,u as Zn}from"./trash-E1jt4Cuh.js";import{a as Qn,i as $n,n as er,t as tr}from"./ruler-C-6kncvn.js";import{t as nr}from"./image-DSbKs3OG.js";import{t as rr}from"./maximize-2-BEWXAYRs.js";import{t as ir}from"./MenuTrigger-BP8vj2dt.js";var ar={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};ar.node;var or=At(ar),sr={name:`arrow-down-to-line`,size:24,node:[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]};sr.node;var cr=At(sr),lr={name:`arrow-up-to-line`,size:24,node:[[`path`,{d:`M5 3h14`,key:`7usisc`}],[`path`,{d:`m18 13-6-6-6 6`,key:`1kf1n9`}],[`path`,{d:`M12 7v14`,key:`1akyts`}]]};lr.node;var ur=At(lr),dr={name:`diamond`,size:24,node:[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]};dr.node;var fr=At(dr),pr={name:`dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]};pr.node;var mr=At(pr),hr={name:`equal`,size:24,node:[[`line`,{x1:`5`,x2:`19`,y1:`9`,y2:`9`,key:`1nwqeh`}],[`line`,{x1:`5`,x2:`19`,y1:`15`,y2:`15`,key:`g8yjpy`}]]};hr.node;var gr=At(hr),_r={name:`grip-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`9`,r:`1`,key:`124mty`}],[`circle`,{cx:`19`,cy:`9`,r:`1`,key:`1ruzo2`}],[`circle`,{cx:`5`,cy:`9`,r:`1`,key:`1a8b28`}],[`circle`,{cx:`12`,cy:`15`,r:`1`,key:`1e56xg`}],[`circle`,{cx:`19`,cy:`15`,r:`1`,key:`1a92ep`}],[`circle`,{cx:`5`,cy:`15`,r:`1`,key:`5r1jwy`}]]};_r.node;var vr=At(_r),yr={name:`group`,size:24,node:[[`path`,{d:`M3 7V5c0-1.1.9-2 2-2h2`,key:`adw53z`}],[`path`,{d:`M17 3h2c1.1 0 2 .9 2 2v2`,key:`an4l38`}],[`path`,{d:`M21 17v2c0 1.1-.9 2-2 2h-2`,key:`144t0e`}],[`path`,{d:`M7 21H5c-1.1 0-2-.9-2-2v-2`,key:`rtnfgi`}],[`rect`,{width:`7`,height:`5`,x:`7`,y:`7`,rx:`1`,key:`1eyiv7`}],[`rect`,{width:`7`,height:`5`,x:`10`,y:`12`,rx:`1`,key:`1qlmkx`}]]};yr.node;var br=At(yr),xr={name:`hash`,size:24,node:[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]};xr.node;var Sr=At(xr),Cr={name:`highlighter`,size:24,node:[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]};Cr.node;var wr=At(Cr),Tr={name:`letter-h`,size:24,node:[[`path`,{d:`M18 20V4`,key:`o2hl4u`}],[`path`,{d:`M6 12H18`,key:`1fx1vx`}],[`path`,{d:`M6 20V4`,key:`1w1bmo`}]],aliases:[`heading`]};Tr.node;var Er=At(Tr),Dr={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};Dr.node;var Or=At(Dr),kr={name:`lock-open`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]],aliases:[`unlock`]};kr.node;var Ar=At(kr),jr={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};jr.node;var Mr=At(jr),Nr={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};Nr.node;var Pr=At(Nr),Fr={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Fr.node;var Ir=At(Fr),Lr={name:`scan-search`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]};Lr.node;var Rr=At(Lr),zr={name:`slash`,size:24,node:[[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}]]};zr.node;var Br=At(zr),Vr={name:`spline`,size:24,node:[[`circle`,{cx:`19`,cy:`5`,r:`2`,key:`mhkx31`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}],[`path`,{d:`M5 17A12 12 0 0 1 17 5`,key:`1okkup`}]]};Vr.node;var Hr=At(Vr),Ur={name:`squircle`,size:24,node:[[`path`,{d:`M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9`,key:`garfkc`}]]};Ur.node;var Wr=At(Ur),Gr={name:`strikethrough`,size:24,node:[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]};Gr.node;var Kr=At(Gr),qr={name:`ungroup`,size:24,node:[[`rect`,{x:`11`,y:`14`,width:`10`,height:`7`,rx:`2`,key:`nfm8rk`}],[`rect`,{x:`3`,y:`3`,width:`10`,height:`7`,rx:`2`,key:`1ljebb`}]]};qr.node;var Jr=At(qr),Yr={name:`waypoints`,size:24,node:[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]};Yr.node;var Xr=At(Yr),Zr={name:`zoom-in`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};Zr.node;var Qr=At(Zr),$r={name:`zoom-out`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};$r.node;var ei=At($r),A=e(i(),1),j=Oe(),ti=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=A.useMemo(()=>({open:t,close:n}),[t,n]);return(0,j.jsx)(qt.Provider,{value:t,children:(0,j.jsx)(yn,{delay:i,timeoutMs:r,children:e.children})})},ni=class extends nn{constructor(){super(Vt(),`Tooltip`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function ri(){return new ni}var ii=A.createContext(void 0);function ai(){let e=A.useContext(ii);if(e===void 0)throw Error(Le(34));return e}var oi=A.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l,...u}=e,[f,p]=A.useState(void 0),[m,h]=d({controlled:i,default:a,name:`MenuRadioGroup`}),g=We((e,t)=>{o?.(e,t),t.isCanceled||h(e)}),_=je(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-labelledby":l??f,"aria-disabled":s||void 0,...u}}),v=A.useMemo(()=>({value:m,setValue:g,disabled:s}),[m,g,s]);return(0,j.jsx)(be.Provider,{value:p,children:(0,j.jsx)(ii.Provider,{value:v,children:_})})}),si=A.memo(A.forwardRef(function(e,t){let n=Ce()?.RadioGroup??oi;return(0,j.jsx)(n,{...e,ref:t})})),ci=A.createContext(void 0);function li(){let e=A.useContext(ci);if(e===void 0)throw Error(Le(35));return e}var ui=A.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:l=!1,value:u,style:d,...f}=e,{store:p}=v(),{value:m,setValue:h,disabled:g}=ai(),_=Se({guess:!0,label:a}),y=Fe(i),x=p.useState(`isActive`,_.index),S=p.useState(`floatingNodeId`),C=p.useState(`itemProps`),w=p.useState(`disabled`),T=s||g||w,E=m===u,{getItemProps:D,itemRef:ee}=c({closeOnClick:l,disabled:T,highlighted:x,id:y,store:p,nativeButton:o,nodeId:S,itemMetadata:b}),te=A.useMemo(()=>({disabled:T,highlighted:x,checked:E}),[T,x,E]);function ne(e){let t=Ze(Pe,e.nativeEvent,void 0,{preventUnmountOnClose:Je});h(u,t)}let re=je(`div`,e,{state:te,stateAttributesMapping:Ee,props:[C,{role:`menuitemradio`,"aria-checked":E,onClick:ne},f,D],ref:[ee,t,_.ref]});return(0,j.jsx)(ci.Provider,{value:te,children:re})}),di=A.forwardRef(function(e,t){let n=C(e,t);return n.visible?(0,j.jsx)(ui,{...e,ref:n.ref}):null}),fi=A.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=li(),c=A.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=mt(s.checked);_t({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return je(`span`,e,{state:f,stateAttributesMapping:Ee,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),pi=e(r(),1),mi=new Map;function hi(e={}){let{locale:t,...n}=e,r={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...n},i=`${Bn(t)}|${JSON.stringify(r)}`,a=mi.get(i);if(a)return a;let o=new Intl.Collator(t,r),s={contains(e,t,n){if(!t)return!0;let r=Ft(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(o.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Ft(e,n);return o.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Ft(e,n),i=t.length;return r.length>=i&&o.compare(r.slice(r.length-i),t)===0}};return mi.set(i,s),s}var gi=``;function _i(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function vi(e=!0){let t=ze(),n=A.useRef(null);return A.useEffect(()=>{if(!e||bt)return;let r=n.current;if(r==null)return;let i=_i(r);if(i==null)return;let a=i.data,o=`${a}${gi}`;return i.nodeValue=o,t.start(200,()=>{i.nodeValue===o&&(i.nodeValue=a)}),()=>{t.clear(),i.nodeValue===o&&(i.nodeValue=a)}},[e,n,t]),n}function yi(e,t,n,r,i,a,o,s,c,l=2){let u=Tt(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return vt(n.current,u)?void 0:u}var bi=A.createContext(void 0),xi=A.createContext(void 0),Si=A.createContext(void 0),Ci=A.createContext(!1),wi=A.createContext(``);function Ti(){let e=A.useContext(bi);if(!e)throw Error(Le(22));return e}function Ei(){let e=A.useContext(xi);if(!e)throw Error(Le(23));return e}function Di(){let e=A.useContext(Si);if(!e)throw Error(Le(24));return e}function Oi(){return A.useContext(wi)}function ki(){return A.useContext(Ci)}var Ai={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?Mt(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>rn(t,e,n)):rn(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};function ji(e){return e==null?void 0:`${e}-popup`}function Mi(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}var Ni=hi;function Pi(e,t=!1){let{overflowY:n}=Qe(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var Fi=Symbol(`none`),Ii={value:Fi,index:-1};function Li(e,t,n){let r=e.get(t);if(r!==void 0||n===Xt)return r;for(let[r,i]of e)if(rn(r,t,n))return i}function Ri(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:s,inputValue:c,open:u,defaultOpen:f=!1,selectionMode:p,onItemHighlighted:m,name:h,form:g,disabled:_=!1,readOnly:v=!1,required:b=!1,inputRef:x,grid:S=!1,items:C,filteredItems:w,filter:T,filterQuery:E,openOnInputClick:ee=!0,autoHighlight:ne=!1,keepHighlight:ie=!1,highlightItemOnHover:ae=!0,loopFocus:se=!0,itemToStringLabel:ce,itemToStringValue:le,isItemEqualToValue:ue=Xt,virtualized:fe=!1,inline:pe=!1,fillInputOnItemPress:me=!0,modal:he=!1,limit:_e=-1,autoComplete:ve=`list`,formAutoComplete:be,locale:xe,submitOnItemClick:Se=!1}=e,{clearErrors:Ce}=y(),{setDirty:we,validityData:Te,setFilled:Ee,name:De,disabled:Oe,setTouched:je,setFocused:Fe,validationMode:ze,validation:Be}=l(),He=ge(),Ge=ye({id:t}),Qe=Ni({locale:xe}),nt=Array.isArray(C)?null:C;if(nt&&typeof nt.label!=`function`)throw Error(Le(100));let at=nt?nt.data:C,ot=nt?.value,ut=ot?void 0:at,dt=A.useMemo(()=>{if(!w||!ot)return;let e=wn(w),t=e.map(ot),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return Li(n,r,i)}}},[w,ot]),pt=A.useMemo(()=>nt?e=>nt.label(e,ue,e=>{let t=dt?.findItem(e,ue);return t==null?Ft(e,ce):nt.itemLabel(t)}):ce,[nt,ce,dt,ue]),mt=A.useMemo(()=>nt?Object.assign(e=>nt.itemLabel(e),{selected:e=>Ft(e,pt)}):ce,[nt,pt,ce]);function _t(e){return Ft(e,pt)}let[vt,yt]=A.useState(!1),[bt,xt]=A.useState(null),Ct=A.useRef(bt),Tt=A.useRef([]),Et=A.useRef([]),Ot=A.useRef(null),kt=A.useRef(null),At=A.useRef(null),Mt=A.useRef(null),Pt=A.useRef(null),It=A.useRef(!1),Lt=A.useRef(null),Rt=A.useRef(null),zt=A.useRef(null),Bt=A.useRef(Ii),Vt=A.useRef(null),Ht=A.useRef([]),Ut=A.useRef(null),qt=Oe||_,Jt=De??h,Yt=p===`multiple`,Zt=p===`single`,Qt=c!==void 0||s!==void 0,en=at!==void 0,tn=w!==void 0,nn;nn=ne===`always`?`always`:ne?`input-change`:!1;let[O,an]=d({controlled:i,default:Yt?r??ke:r,name:`Combobox`,state:`selectedValue`}),on=A.useMemo(()=>T===null?()=>!0:T===void 0?Mi(Qe,mt):T,[T,Qe,mt]),sn=qe(()=>Qt?s??``:Zt?_t(O):``).current,[cn,ln]=d({controlled:c,default:sn,name:`Combobox`,state:`inputValue`}),[un,dn]=d({controlled:u,default:f,name:`Combobox`,state:`open`}),fn=Kt(at),pn=!un&&bt!==null?bt:String(cn).trim(),mn=Zt?_t(O):``,hn=Zt&&!vt&&pn!==``&&mn.length===pn.length&&Qe.contains(mn,pn),gn=hn?``:E??pn,_n=en&&tn&&hn&&(!nt||nt.hasValue(O,ue)),vn=A.useMemo(()=>at?wn(at):ke,[at]),yn=A.useMemo(()=>{if(w&&!_n)return w;if(!at)return ke;if(fn){let e=at,t=[],n=0;for(let r of e){if(_e>-1&&n>=_e)break;let e=_e>-1?_e-n:1/0,i=gn===``?r.items.slice(0,e):[];if(gn!==``)for(let t of r.items){if(i.length>=e)break;on(t,gn,mt)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(gn===``)return _e>-1?vn.slice(0,_e):vn;let e=[];for(let t of vn){if(_e>-1&&e.length>=_e)break;on(t,gn,mt)&&e.push(t)}return e},[w,_n,at,fn,gn,_e,on,mt,vn]),bn=A.useMemo(()=>{if(dt&&yn===w)return dt.values;let e=wn(yn);return ot?e.map(e=>ot(e)):e},[yn,w,dt,ot]),k=qe(()=>{let e=null;return pe&&un&&en&&p!==`none`&&(e=Cn(bn,O,ue,Yt)),new gt({id:Ge,labelId:void 0,selectedValue:O,open:un,items:ut,selectionMode:p,name:Jt,form:g,disabled:qt,readOnly:v,required:b,grid:S,virtualized:fe,openOnInputClick:ee,itemToStringLabel:pt,isItemEqualToValue:ue,modal:he,autoHighlight:nn,submitOnItemClick:Se,hasInputValue:Qt,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:pe,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:Ve,id:Ge,selectionMode:p,disabled:qt,readOnly:v,isItemEqualToValue:ue},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:p===`none`},{onOpenChangeComplete:Je,setOpen:Je,setInputValue:Je,setSelectedValue:Je,setIndices:Je,handleSelection:Je,forceMount:Je,requestSubmit:Je,listRef:Tt,labelsRef:Et,popupRef:Ot,emptyRef:Pt,inputRef:kt,startDismissRef:At,endDismissRef:Mt,chipsContainerRef:Lt,clearRef:Rt,valuesRef:Ht,pointerDownItemRef:Ut,selectionEventRef:zt},Ai)}).current,Tn=p===`none`?cn:O,En=A.useMemo(()=>p===`none`?Tn:Array.isArray(O)?O.map(e=>Gt(e,le)):Gt(O,le),[Tn,le,p,O]),Dn=We(m),On=We(n),kn=k.useState(`activeIndex`),An=k.useState(`selectedIndex`),jn=k.useState(`positionerElement`),Mn=k.useState(`listElement`),Nn=k.useState(`triggerElement`),Pn=k.useState(`inputElement`),Fn=k.useState(`inputGroupElement`),In=k.useState(`inline`),Ln=k.useState(`inputInsidePopup`),Rn=k.useState(`inputOwnsFormValue`),zn=Zt&&!Ln&&cn===mn,Bn=et(Nn),{openMethod:Vn,triggerProps:Hn}=de(un),Un=We(()=>En);o(Ln?Bn:kt,Ge,Tn,Un,!qt,h);let Wn=We(()=>{at?Et.current=bn.map(_t):k.set(`forceMounted`,!0)}),Gn=We((e,t,n,r)=>{if(t===-1){if(Bt.current===Ii)return;Bt.current=Ii}else Bt.current={value:e,index:t};Dn(e,Ae(n,r,{index:t}))}),Kn=We(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),k.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?Gn(void 0,-1,r,e.event):Gn(Ht.current[n],n,r,e.event)}),qn=We((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(It.current=n.reason===Ne,n.reason===`input-change`){un&&bt!==null&&xt(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&yt(!0),Vt.current={hasQuery:e};let n=k.state.listElement;if(!k.state.virtualized&&n){let e=Ot.current;for(let t of it(n.firstElementChild??n)){if(!ft(t)||(e?!ht(e,t):t.getAttribute(`role`)===`dialog`))break;if(Pi(t)){t.scrollTop=0;break}}}e&&nn&&k.state.activeIndex==null&&(un||In)&&k.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&k.state.inputInsidePopup&&(Vt.current={hasQuery:!1,selection:!0});ln(t)}}),Jn=We(e=>{let t=!e&&Ln&&!In&&cn!==``&&(String(cn).trim()===bt||cn===mn);!e&&(t||cn===``||zn)&&yt(!1),xt(null),t&&qn(``,Ze(Ne))}),[Yn,Xn]=A.useState(!1),Zn=We((t,n)=>{if(un===t)return;n.reason===`escape-key`&&en&&bn.length===0&&!Pt.current&&n.allowPropagation();let r=n,i=tt(r);if(e.onOpenChange?.(t,r),Vt.current?.hasQuery&&n.reason===`input-change`===n.isCanceled&&(Vt.current=null),!n.isCanceled&&(t&&bt!==null&&Jn(n.reason===Xe),!t&&vt&&(Zt?(In||xt(pn),pn===``&&yt(!1)):Yt&&(In||xt(pn),Ln&&Kn({activeIndex:null}),(!Ln||In)&&qn(``,Ze(Ne,n.event,void 0,{isItemPress:n.reason===Pe})))),t||Xn(i()),dn(t),!t&&Ln&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(je(!0),Fe(!1),ze===`onBlur`))){let e=p===`none`?cn:O;Be.commit(e)}}),Qn=We((e,t)=>{a?.(e,t),t.isCanceled||(an(e),(p===`none`&&Ot.current&&me||Zt&&!k.state.inputInsidePopup)&&qn(_t(e),Ze(t.reason,t.event)))}),$n=We((e,t)=>{let n=wt(e),r=zt.current??e;zt.current=null;let i=Ze(Pe,r),a=St(n,`a`)?.getAttribute(`href`);if(a)a.startsWith(`#`)&&Zn(!1,i);else if(Yt){let e=Array.isArray(O)?O:[],n=Nt(e,t,ue),r=n?Sn(e,t,ue):[...e,t];if(Qn(r,i),i.isCanceled||!(kt.current&&kt.current.value.trim()!==``))return;if(k.state.inputInsidePopup){qn(``,Ze(Ne,i.event,void 0,{isItemPress:!0}));let e=Vt.current;e&&!n&&(e.toggledValue=t)}else Zn(!1,i)}else{if(Qn(t,i),i.isCanceled)return;Zn(!1,i)}}),er=We(()=>{let e=Be.inputRef.current?.form??k.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),tr=We(()=>{if(On?.(!1),yt(!1),xt(null),Kn(p===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Yt&&kt.current&&kt.current.value!==``&&!It.current&&qn(``,Ze(Ne)),Zt){if(k.state.inputInsidePopup)kt.current&&kt.current.value!==``&&qn(``,Ze(Ne));else{let e=_t(O);kt.current&&kt.current.value!==e&&qn(e,Ze(e===``?Ne:Ue))}}}),nr=A.useMemo(()=>In&&jn?{current:St(jn,`[role="dialog"]`)}:Ot,[In,jn]),{mounted:rr,transitionStatus:ir,forceUnmount:ar}=rt({open:un,ref:nr,preventUnmountOnClose:Yn,setPreventUnmountOnClose:Xn,onUnmount:tr});A.useImperativeHandle(e.actionsRef,()=>({unmount:ar,close:()=>Zn(!1,Ze(Re))}),[ar,Zn]),Me(function(){let e=Ct.current!==null&&bt===null;if(Ct.current=bt,un&&(!e||!en)||(un||(Ut.current=null),p===`none`))return;let t=en?bn:Ht.current;Kn({selectedIndex:Cn(t,O,ue,Yt)})},[un,bt,O,p,Yt,en,bn,ue,Kn]),Me(()=>{at&&(Ht.current=bn,Tt.current.length=bn.length)},[at,bn]),Me(()=>{!un&&Vt.current?.hasQuery&&(Vt.current=null)},[un]),Me(()=>{if(!un&&In&&nr.current){Vt.current=null;return}let e=en||tn?bn:Ht.current,t=Vt.current;if(t){let n=un||In||k.state.positionerElement?.hidden===!1;if(t.hasQuery){let t=kt.current;!nn||String(cn).trim()===``||In&&nn!==`always`&&(!t||Dt(t.ownerDocument)!==t)?Vt.current=null:n&&(e[0]!==void 0||!en&&!tn)&&(k.set(`activeIndex`,0),Vt.current=null)}else if(String(cn).trim()===``&&(Vt.current=null,n)){let e=t.selection;nn===`always`&&!e&&k.state.selectionMode===`none`&&k.set(`activeIndex`,0),queueMicrotask(()=>{if(!k.state.open&&(!k.state.inline||nr.current)||kt.current&&kt.current.value.trim()!==``)return;let n=k.state.selectedValue,r=k.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:k.state.selectionMode!==`none`&&n!=null){let e=en||tn?bn:Ht.current,i=xn(e,t.toggledValue,k.state.isItemEqualToValue);k.set(`activeIndex`,i===-1?Cn(e,n,k.state.isItemEqualToValue,r):i)}else e?k.set(`activeIndex`,null):nn===`always`&&k.set(`activeIndex`,0)})}}if(!un&&!In)return;let n=k.state.activeIndex;if(n==null){if(nn===`always`&&e.length>0){k.set(`activeIndex`,0);return}Gn(void 0,-1,Ue);return}if(n>=e.length){Gn(void 0,-1,Ue),k.set(`activeIndex`,null);return}let r=e[n],i=Bt.current.value,a=i!==Fi&&rn(r,i,k.state.isItemEqualToValue);Bt.current.index===n&&a||Gn(r,n,Ue)},[kn,nn,Gn,tn,en,bn,In,un,nr,k,cn]),Me(()=>{Ee(p===`none`?String(cn)!==``:Yt?Array.isArray(O)&&O.length>0:O!=null)},[Ee,p,cn,O,Yt]),A.useEffect(()=>{en&&nn&&bn.length===0&&Kn({activeIndex:null})},[en,nn,bn.length,Kn]);function or(){un&&pn!==``&&pn!==String(sn)&&!zn&&yt(!0)}function sr(){un&&bt!==null&&Jn(!1)}let cr=!1;function lr(){!cr&&cn!==mn&&(cr=!0,qn(mn,Ze(Ue)))}function ur(){p!==`none`&&(Ce(Jt),we($t(O,Te.initialValue,ue)),Be.change(O),Zt&&!Qt&&!Ln&&lr())}function dr(){Zt&&!Qt&&!Ln&&!vt&&lr()}function fr(){p===`none`&&(Ce(Jt),we(cn!==Te.initialValue),Be.change(cn))}D(pn,or),D(un,sr),D(O,ur),D(mn,dr),D(at,dr),D(cn,fr);let pr=jt({open:In?!0:un,onOpenChange:Zn,elements:{reference:Ln?Nn:Pn,floating:jn}}),mr=S?`grid`:`listbox`,hr=un||In,gr=hr?`true`:`false`,_r=A.useMemo(()=>{let e=Pn?.tagName===`INPUT`,t=Pn==null||e,n=t||hr,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=gr,r[`aria-haspopup`]=mr,r[`aria-controls`]=hr?Mn?.id:void 0,r[`aria-autocomplete`]=v?`none`:ve),{reference:r,floating:{role:`presentation`}}},[Pn,hr,gr,mr,Mn?.id,ve,v]),vr=oe(pr,{enabled:!qt&&ee,event:`mousedown-only`,toggle:!1,touchOpenDelay:Ln?0:100,reason:Ye}),yr=lt(pr,{enabled:!qt&&!In,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:In?!0:void 0,outsidePress(e){let t=wt(e);return!ht(Nn,t)&&!ht(Rt.current,t)&&!ht(Lt.current,t)&&!ht(Fn,t)}}),br=re(pr,{enabled:!qt,id:Ge,listRef:Tt,activeIndex:kn,selectedIndex:An,virtual:!0,loopFocus:se,allowEscape:se&&!nn,focusItemOnOpen:vt||p===`none`&&!nn?!1:`auto`,focusItemOnHover:ae,resetOnPointerLeave:!ie,orientation:S?`horizontal`:void 0,rtl:He===`rtl`,disabledIndices:ke,grid:S?yi:void 0,onNavigate(e,t){(t||un||In&&e===null)&&ir!==`ending`&&Kn({activeIndex:e,type:te(t),event:t?.nativeEvent})}}),xr=A.useMemo(()=>Ke(br.reference,{onKeyDown(e){S&&k.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},yr.reference,vr.reference,_r.reference),[br.reference,yr.reference,vr.reference,_r.reference,S,k]),Sr=A.useMemo(()=>Ke($e,yr.floating),[yr.floating]),Cr=A.useMemo(()=>Ke(br.floating,_r.floating),[br.floating,_r.floating]),wr=A.useMemo(()=>{let e=br.item;return{props:e?{...e,onFocus:void 0}:Ve,id:Ge,selectionMode:p,disabled:qt,readOnly:v,isItemEqualToValue:ue}},[br.item,Ge,p,qt,v,ue]);k.useContextCallback(`setOpen`,Zn),k.useContextCallback(`setInputValue`,qn),k.useContextCallback(`setSelectedValue`,Qn),k.useContextCallback(`setIndices`,Kn),k.useContextCallback(`handleSelection`,$n),k.useContextCallback(`forceMount`,Wn),k.useContextCallback(`requestSubmit`,er),k.useContextCallback(`onOpenChangeComplete`,n),Wt(()=>{k.update({inline:pe,popupProps:Sr,listProps:Cr,inputProps:xr,triggerProps:Hn,itemRoot:wr})});let Tr={id:Ge,selectedValue:O,open:un,mounted:rr,transitionStatus:ir,items:ut,inline:pe,popupProps:Sr,listProps:Cr,inputProps:xr,triggerProps:Hn,itemRoot:wr,openMethod:Vn,selectionMode:p,name:Jt,form:g,disabled:qt,readOnly:v,required:b,grid:S,virtualized:fe,openOnInputClick:ee,itemToStringLabel:pt,modal:he,autoHighlight:nn,isItemEqualToValue:ue,submitOnItemClick:Se,hasInputValue:Qt};Me(()=>{k.update({...Tr,inputOwnsFormValue:p===`none`&&(pe||!k.state.inputInsidePopup)})},[k,...Object.values(Tr)]);let Er=Ie(x,Be.inputRef),Dr=A.useMemo(()=>({query:pn,hasItems:en,filteredItems:yn,flatFilteredValues:bn}),[pn,en,yn,bn]),Or=A.useMemo(()=>Array.isArray(Tn)?``:Gt(Tn,le),[Tn,le]),kr=Yt&&Array.isArray(O)&&O.length>0,Ar=Yt||p===`none`&&Rn?void 0:Jt,jr=A.useMemo(()=>!Yt||!Array.isArray(O)||!Jt?null:O.map(e=>{let t=Gt(e,le);return(0,j.jsx)(`input`,{type:`hidden`,form:g,name:Jt,value:t,disabled:qt},t)}),[Yt,O,g,Jt,le,qt]),Mr=(0,j.jsxs)(A.Fragment,{children:[e.children,(0,j.jsx)(`input`,{...Be.getValidationProps(qt,{onFocus(){Ln?Nn?.focus():(kt.current||Nn)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||qt||v)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=Ze(Ue,e.nativeEvent),i=()=>Ht.current.findIndex(e=>Gt(e,le).toLowerCase()===n||_t(e).toLowerCase()===n);function a(){if(Yt)return;if(p===`none`){qn(t,r);return}let e=i();e===-1&&(e=Ht.current.findIndex((e,t)=>{let r=Et.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Ht.current[e];a!=null&&Qn?.(a,r)}Zt&&(Wn(),at&&i()===-1&&k.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:Ge&&Ar==null?`${Ge}-hidden-input`:void 0,form:g,name:Ar,autoComplete:be,disabled:qt,required:b&&!kr,readOnly:v,value:Or,ref:Er,style:Ar?ct:st,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),jr]});return(0,j.jsx)(bi.Provider,{value:k,children:(0,j.jsx)(xi.Provider,{value:pr,children:(0,j.jsx)(Ci.Provider,{value:en,children:(0,j.jsx)(Si.Provider,{value:Dr,children:(0,j.jsx)(wi.Provider,{value:cn,children:Mr})})})})})}var zi=`data-popup-side`,Bi=`data-list-empty`,Vi={...nt,...a,popupSide:e=>e?{[zi]:e}:null,listEmpty:e=>e?{[Bi]:``}:null};function Hi(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function Ui(){return Di().filteredItems.length===0}function Wi(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function Gi(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var Ki=A.createContext(void 0);function qi(){return A.useContext(Ki)}var Ji=A.createContext(void 0);function Yi(e){let t=A.useContext(Ji);if(t===void 0&&!e)throw Error(Le(21));return t}var Xi=A.forwardRef(function(e,t){let n=Ti(),{buttonRef:r,getButtonProps:i}=ut({native:!1}),a=Ie(t,r);function o(e){n.context.setOpen(!1,Ze(Be,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,j.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:ct})}),Zi=A.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:d,setTouched:f,validationMode:p,validation:m}=l(),{labelId:h}=we(),g=qi(),v=!!Yi(!0),y=Ti(),b=Oi(),S=ge(),C=y.useState(`required`),w=y.useState(`disabled`),T=y.useState(`readOnly`),E=y.useState(`name`),D=y.useState(`form`),ee=y.useState(`selectionMode`),ne=y.useState(`autoHighlight`),re=y.useState(`inputProps`),ie=y.useState(`triggerProps`),ae=y.useState(`open`),oe=y.useState(`mounted`),se=y.useState(`selectedValue`),ce=y.useState(`id`),le=y.useState(`inline`),ue=y.useState(`modal`),de=!!ne,fe=Hi(y),pe=d||w||i,me=Ui(),he=xe(pe,y.context.inputRef),_e=v||le,ve=!_e||ue,ye=Fe(a??(_e?void 0:ce)),be=v?_:c,[Se,Ce]=A.useState(null),Te=A.useRef(!1),Ee=A.useRef(null);Me(()=>{ae||(Ee.current=null)},[ae]);let De=ee===`none`&&!v,Oe=We(e=>{let t=v||y.state.inline;t&&!y.state.hasInputValue&&y.context.setInputValue(``,Ze(Ue)),y.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:De})}),ke=v?s:m.getValidationProps(pe,s);function Ae(e){y.context.setIndices({activeIndex:null,selectedIndex:null,type:te(e),event:e})}let Pe={...be,open:ae,disabled:pe,readOnly:T,popupSide:fe,listEmpty:me};function Ie(e){if(!g)return;let t,n=g.chipsRef.current.length,[r]=Wi(S);return e.key===r&&(e.currentTarget.selectionStart??0)===0&&se.length>0&&(e.preventDefault(),t=n>0?n-1:void 0),t}let Le=je(`input`,e,{state:Pe,ref:[t,y.context.inputRef,Oe],props:[re,ie,{value:Se??b,"aria-readonly":T||void 0,"aria-required":C||void 0,"aria-labelledby":h,disabled:pe,readOnly:T,required:ee===`none`?C:void 0,form:D,...De&&E&&{name:E},id:ye,onFocus(){if(he(!0),!le)return;let e=Ee.current;Ee.current=null,e!=null&&Object.hasOwn(y.context.valuesRef.current,e)&&y.context.setIndices({activeIndex:e})},onBlur(){f(!0),he(!1);let e=y.state.activeIndex;if(le&&e!==null&&ne!==`always`&&(Ee.current=e,y.context.setIndices({activeIndex:null})),p===`onBlur`){let e=ee===`none`?b:se;m.commit(e)}},onCompositionStart(e){xt||(Te.current=!0,Ce(e.currentTarget.value))},onCompositionEnd(e){Te.current=!1;let t=e.currentTarget.value;Ce(null),y.context.setInputValue(t,Ze(Xe,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=Te.current||!r;function a(e){!T&&!pe&&e&&i&&(y.context.setOpen(!0,Ze(Xe,t)),de||Ae(t))}if(Te.current){let n=e.currentTarget.value;Ce(n),n===``&&!y.state.openOnInputClick&&!y.state.inputInsidePopup&&y.context.setOpen(!1,Ze(Ne,t));let r=n.trim(),i=de&&r!==``;a(r),ae&&y.state.activeIndex!==null&&!i&&Ae(t);return}let o=Ze(Xe,t);if(y.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=Ze(Ne,t);s&&!y.state.inputInsidePopup&&(ee===`single`&&y.context.setSelectedValue(null,c),y.state.openOnInputClick||y.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),ae&&y.state.activeIndex!==null&&!de&&Ae(t)},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(pe||T){T&&e.key===`Enter`&&ae&&y.state.activeIndex!==null&&Ot(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=S===`rtl`;if(e.key===`Home`){Ot(e);let n=Et&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){Ot(e);let i=Et&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!oe&&e.key===`Escape`){let t=ee===`multiple`&&Array.isArray(se)?se.length===0:se===null,n=Ze(He,e.nativeEvent),r=ee===`multiple`?[]:null;y.context.setInputValue(``,n),y.context.setSelectedValue(r,n),t||y.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(g&&e.key===`Backspace`&&t.value===``&&Array.isArray(se)&&se.length>0){let t=g.chipsRef.current.length,n=t>0?t-1:se.length-1,r=se.filter((e,t)=>t!==n);Ae(e.nativeEvent),y.context.setSelectedValue(r,Ze(Ue,e.nativeEvent));return}let i=Ie(e);if(i!==void 0&&g?.chipsRef.current[i]?.focus(),e.which!==229&&e.key===`Enter`&&ae){let t=y.state.activeIndex,n=e.nativeEvent;if(t===null){if(le)return;y.context.setOpen(!1,Ze(Ue,n));return}Ot(e),Gi(y,t,n)}}},ke],stateAttributesMapping:Vi}),Re=v?(0,j.jsx)(u.Provider,{value:x,children:Le}):Le;return(0,j.jsxs)(A.Fragment,{children:[ae&&ve&&(0,j.jsx)(Xi,{ref:y.context.startDismissRef}),Re]})}),Qi=A.createContext(null);function $i(){return A.useContext(Qi)}function ea(e){let{children:t}=e,{filteredItems:n}=Di(),r=$i(),i=r?r.items:n;return(0,j.jsx)(A.Fragment,{children:i.map(t)})}var ta=A.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=Ti(),l=Ei(),u=!!Yi(!0),{filteredItems:d,hasItems:f}=Di(),p=c.useState(`selectionMode`),m=c.useState(`grid`),h=c.useState(`readOnly`),g=c.useState(`listProps`),_=c.useState(`virtualized`),v=c.useState(`forceMounted`),y=p===`multiple`,b=d.length===0,x=We(e=>{c.set(`positionerElement`,e)}),C=We(e=>{c.set(`listElement`,e)}),w=A.useMemo(()=>typeof o==`function`?n||=(0,j.jsx)(ea,{children:o}):o,[o]),T={empty:b},E=l.useState(`floatingId`),D=je(`div`,e,{state:T,ref:[t,C,u?null:x],props:[g,{children:w,tabIndex:-1,id:E,role:m?`grid`:`listbox`,"aria-multiselectable":y?`true`:void 0,"aria-readonly":!m&&h?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;Ot(e),Gi(c,t,e.nativeEvent)}}},s]});if(_)return D;let ee=f&&!v?void 0:c.context.labelsRef;return(0,j.jsx)(S,{elementsRef:c.context.listRef,labelsRef:ee,children:D})}),na=A.createContext(void 0);function ra(){let e=A.useContext(na);if(e===void 0)throw Error(Le(20));return e}var ia=A.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Ti(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,j.jsx)(na.Provider,{value:n,children:(0,j.jsx)(ot,{ref:t,...r})}):null}),aa=A.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m=!1,collisionAvoidance:h=pt,style:g,..._}=e,v=Ti(),y=Ei(),b=ra(),x=v.useState(`modal`),S=v.useState(`open`),C=v.useState(`mounted`),w=v.useState(`openMethod`),T=v.useState(`positionerElement`),D=v.useState(`triggerElement`),ee=v.useState(`inputElement`),te=v.useState(`inputGroupElement`),ne=v.useState(`inputInsidePopup`),re=v.useState(`transitionStatus`),ie=Ui(),ae=E({anchor:i??(ne?D:te??ee),floatingRootContext:y,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,lazyFlip:!0});ve(S&&x,w===`touch`,T,D);let oe={open:S,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,empty:ie};Me(()=>{v.set(`popupSide`,ae.side)},[v,ae.side]);let se=We(e=>{v.set(`positionerElement`,e)}),ce=me(e,oe,{styles:ae.positionerStyles,transitionStatus:re,props:_,refs:[t,se],hidden:!C,inert:!S});return(0,j.jsxs)(Ji.Provider,{value:ae,children:[C&&x&&(0,j.jsx)(Ct,{inert:yt(!S),cutout:te??ee??D}),ce]})}),oa={...dt,...at},sa=A.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=Ti(),l=Yi(),u=Ei(),d=c.useState(`mounted`),f=c.useState(`open`),p=c.useState(`openMethod`),m=c.useState(`popupProps`),g=c.useState(`transitionStatus`),_=c.useState(`inputInsidePopup`),v=c.useState(`inputElement`),y=c.useState(`modal`),b=c.useState(`id`),x=Ui(),S=s.id??(_?ji(b):void 0);Me(()=>(c.set(`popupId`,c.context.popupRef.current?.id||S),()=>{c.set(`popupId`,void 0)}),[c,S]),_t({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let C={open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:g,empty:x},w=je(`div`,e,{state:C,ref:[t,c.context.popupRef],props:[m,{id:S,role:_?`dialog`:`presentation`,onFocus(e){let t=wt(e.nativeEvent);p!==`touch`&&(ht(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},h(g),s],stateAttributesMapping:oa}),T=a===void 0?_?e=>e===`touch`?c.context.popupRef.current:v:!1:a,E;E=o??(_?void 0:!1);let D=!_||y;return(0,j.jsx)(kt,{context:u,disabled:!d,modal:D,openInteractionType:p,initialFocus:T,returnFocus:E,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,j.jsxs)(A.Fragment,{children:[w,D&&(0,j.jsx)(Xi,{ref:c.context.endDismissRef})]})})}),ca=A.createContext(void 0),la=A.createContext(!1);function ua(){return A.useContext(la)}function da(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...f}=t,p=A.useRef(null),m=Se({guess:!0,index:l,textRef:p}),h=Ti(),g=ua(),_=ki(),{props:v,id:y,selectionMode:b,disabled:x,readOnly:S,isItemEqualToValue:C}=h.useState(`itemRoot`),w=x||u,T=b!==`none`,E=l??i??m.index,D=E!==-1,ee=h.useState(`isActive`,E),te=h.useState(`isSelected`,c),ne=A.useRef(null),re=y!=null&&D?`${y}-${E}`:void 0,ie=te&&T;Me(()=>{if(!D||!r&&l==null)return;let e=h.context.listRef.current;return e[E]=ne.current,()=>{delete e[E]}},[D,r,E,l,h]),Me(()=>{if(!D||_)return;let e=h.context.valuesRef.current;return e[E]=c,()=>{delete e[E]}},[D,_,E,c,h]),Me(()=>{if(!D||_)return;let e=h.state.selectedValue,t=h.state.selectedIndex;h.state.selectionMode===`multiple`&&Array.isArray(e)?t=Ut(E,c,h.context.valuesRef.current,e,C,t):rn(c,e,C)&&(t=E),h.set(`selectedIndex`,t)},[D,_,h,E,c,C]);let{getButtonProps:ae,buttonRef:oe}=ut({disabled:w,focusableWhenDisabled:!0,native:d,composite:!0}),se={disabled:w,selected:ie,highlighted:ee};function ce(e){function t(){h.context.handleSelection(e,c)}h.state.submitOnItemClick?(pi.flushSync(t),h.context.requestSubmit()):t()}let le={id:re,role:g?`gridcell`:`option`,"aria-selected":T?ie:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(h.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){w||S||ce(e.nativeEvent)},onMouseUp(e){let t=h.context.pointerDownItemRef.current===e.currentTarget;h.context.pointerDownItemRef.current=null,w||S||e.button!==0||t||!ee||ce(e.nativeEvent)}},ue=je(`div`,t,{ref:[oe,n,m.ref,ne],state:se,props:[v,le,f,ae]}),de=A.useMemo(()=>({selected:ie,textRef:p}),[ie,p]);return(0,j.jsx)(ca.Provider,{value:de,children:ue})}function fa(e){let{componentProps:t,forwardedRef:n}=e,r=Ti().useState(`isItemEqualToValue`),{flatFilteredValues:i}=Di(),a=t.value??null,o=xn(i,a,r);return(0,j.jsx)(da,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:o})}var pa=A.memo(A.forwardRef(function(e,t){let n=Ti().useState(`virtualized`);return n&&e.index==null?(0,j.jsx)(fa,{componentProps:e,forwardedRef:t}):(0,j.jsx)(da,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),ma=A.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=Di(),c=Ti(),l=vi(),u=s.length===0?a:null;return je(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),ha=n(),ga=(0,A.createContext)(null);function _a(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n==null?null:n.getTheme())}}}function va(){let e=(0,A.useContext)(ga);return e??function(e,...t){throw function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e,...t)}(8),e}function ya(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function M(e,...t){throw ya(e,...t)}function ba(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function xa(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var Sa=xa();function Ca(){return Sa&&`documentMode`in document?document.documentMode:null}var wa=Ca();function Ta(e){return Sa&&e.test(navigator.platform)}function Ea(e){return Sa&&e.test(navigator.userAgent)}var Da=Ta(/Mac|iPod|iPhone|iPad/),Oa=Ea(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function ka(){return!(!Sa||!(`InputEvent`in window)||wa)&&`getTargetRanges`in new window.InputEvent(`input`)}var Aa=ka();function ja(){return Sa&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var Ma=ja(),Na=Ea(/Android/),Pa=Ea(/Version\/[\d.]+.*Safari/)&&!Na,Fa=Ea(/^(?=.*Chrome).*/i),Ia=Sa&&Na&&Fa,La=Ea(/AppleWebKit\/[\d.]+/)&&Da&&!Fa;function Ra(){return 2047}var za=Ra(),Ba=Pa||Ma||La?`\xA0`:``,Va=`
|
|
2
2
|
|
|
3
3
|
`,Ha=Oa?`\xA0`:Ba,Ua={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Wa={directionless:1,unmergeable:2},Ga={center:2,end:6,justify:4,left:1,right:3,start:5};function Ka(e){let t={};for(let n of Object.keys(e))t[e[n]]=n;return t}var qa=Ka(Ga),Ja={normal:0,segmented:2,token:1},Ya=Ka(Ja),Xa=Symbol.for(`@lexical/ctrlOrOtherKey`),Za=`$config`;function Qa(e){return()=>{}}function N(e){return{type:e}}var $a=N(`SELECTION_CHANGE_COMMAND`),eo=N(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),to=N(`CLICK_COMMAND`),no=N(`BEFORE_INPUT_COMMAND`),ro=N(`INPUT_COMMAND`),io=N(`COMPOSITION_START_COMMAND`),ao=N(`COMPOSITION_END_COMMAND`),oo=N(`DELETE_CHARACTER_COMMAND`),so=N(`INSERT_LINE_BREAK_COMMAND`),co=N(`INSERT_PARAGRAPH_COMMAND`),lo=N(`CONTROLLED_TEXT_INSERTION_COMMAND`),uo=N(`PASTE_COMMAND`),fo=N(`REMOVE_TEXT_COMMAND`),po=N(`DELETE_WORD_COMMAND`),mo=N(`DELETE_LINE_COMMAND`),ho=N(`FORMAT_TEXT_COMMAND`),go=N(`SET_TEXT_FORMAT_COMMAND`),_o=N(`UNDO_COMMAND`),vo=N(`REDO_COMMAND`),yo=N(`KEYDOWN_COMMAND`),bo=N(`KEY_ARROW_RIGHT_COMMAND`),xo=N(`MOVE_TO_END`),So=N(`KEY_ARROW_LEFT_COMMAND`),Co=N(`MOVE_TO_START`),wo=N(`KEY_ARROW_UP_COMMAND`),To=N(`KEY_ARROW_DOWN_COMMAND`),Eo=N(`KEY_ENTER_COMMAND`),Do=N(`KEY_SPACE_COMMAND`),Oo=N(`KEY_BACKSPACE_COMMAND`),ko=N(`KEY_ESCAPE_COMMAND`),Ao=N(`KEY_DELETE_COMMAND`),jo=N(`KEY_TAB_COMMAND`),Mo=N(`INSERT_TAB_COMMAND`),No=N(`INDENT_CONTENT_COMMAND`),Po=N(`OUTDENT_CONTENT_COMMAND`),Fo=N(`DROP_COMMAND`),Io=N(`FORMAT_ELEMENT_COMMAND`),Lo=N(`DRAGSTART_COMMAND`),Ro=N(`DRAGOVER_COMMAND`),zo=N(`DRAGEND_COMMAND`),Bo=N(`COPY_COMMAND`),Vo=N(`CUT_COMMAND`),Ho=N(`SELECT_ALL_COMMAND`),Uo=N(`CLEAR_EDITOR_COMMAND`),Wo=N(`CLEAR_HISTORY_COMMAND`),Go=N(`CAN_REDO_COMMAND`),Ko=N(`CAN_UNDO_COMMAND`),qo=N(`FOCUS_COMMAND`),Jo=N(`BLUR_COMMAND`),Yo=N(`KEY_MODIFIER_COMMAND`);function Xo(e,t){return{...t,[Xa]:e}}var Zo=Xo(`metaKey`,{ctrlKey:!Da,metaKey:Da}),Qo=Xo(`altKey`,{altKey:Da,ctrlKey:!Da}),$o=[[`altKey`,1],[`ctrlKey`,2],[`metaKey`,4],[`shiftKey`,8]];function es(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var ts=class{byKey=new Map;byCode=new Map;add(e){let{key:t,modifiers:n={}}=e;t.length>0||M(399);let r=t.toLowerCase();for(let i of function(e){let t=[0];for(let[n,r]of $o){let i=e[n]||!1;i===`any`?t=t.concat(t.map(e=>e|r)):i&&(t=t.map(e=>e|r))}return t}(n))es(this.byKey,`${i}:${r}`,e),t.length===1&&(/[0-9]/.test(t)?es(this.byCode,`${i}:Digit${t}`,e):/[a-z]/.test(r)&&es(this.byCode,`${i}:Key${r.toUpperCase()}`,e));return this}matches(e){let t=e.key;if(!t)return[];let n=function(e){let t=0;for(let[n,r]of $o)e[n]&&(t|=r);return t}(e),r=this.byKey.get(`${n}:${t.toLowerCase()}`),i=r?r.slice():[];if(this.byCode.size>0&&!(t.length===1&&t.charCodeAt(0)<=127)){let t=this.byCode.get(`${n}:${e.code}`);t&&i.push(...t)}return i}match(e){return this.matches(e)[0]}};function ns(e){let t=new ts;for(let n of e)t.add(n);return t}function rs(e){let t=new Map;return{dispose(){for(let e of t.values())e.dispose();t.clear()},register(n,r){let i=t.get(n);i===void 0&&(i={dispose:e(n,r),holders:new Set},t.set(n,i));let a=()=>{let e=t.get(n);e&&e.holders.delete(a)&&e.holders.size===0&&(t.delete(n),e.dispose())};return i.holders.add(a),a}}}function is(){let e;try{e=`0.53.0+prod.esm`}catch{}return e??`"<unknown>+source"`}var as=is(),os=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(){let e=Array.from(this._front).reverse();for(let 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]()}},ss=null;function cs(e,t=1e3){return e instanceof ls?e.clone():e.size<t?new Map(e):new ls().init(new Map(e),void 0,e.size)}var ls=class e{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e().init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return t===void 0?this._old&&this._old.get(e):t}get(e){let t=this.getWithTombstone(e);return t===ss?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())){let e=new Map(this._old);for(let[t,n]of this._nursery)n===ss?e.delete(t):e.set(t,n);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return n!==ss&&n!==void 0||(this._size++,n===ss&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,ss),this._size--),t}getOrInsert(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}getOrInsertComputed(e,t){let n=this.get(e);if(n!==void 0)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(e){if(t)for(let n of t){let t=n[0],r=e.get(t);r!==ss&&(r!==void 0&&(n[1]=r),yield n)}for(let n of e)n[1]===ss||t&&t.has(n[0])||(yield n)}else t&&(yield*t)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.entries())e(n,t,this)}get[Symbol.toStringTag](){return`GenMap`}[Symbol.iterator](){return this.entries()}},us=!1;function ds(e,t,...n){let r=us,i;try{us=e,i=t()}finally{us=r}var a;return(a=i)===null||typeof a!=`object`&&typeof a!=`function`||typeof a.then!=`function`||M(421),i}function fs(){return us}function ps(e){let t=e.exportJSON(us),n=e.constructor;return t.type!==n.getType()&&M(130,n.name),I(e)&&!Array.isArray(t.children)&&M(59,n.name),t}function ms(){return Zf()._blockCursorElement}function hs(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-slot`)}var gs=La||Ma||Pa;function _s(){let e=Nf().createElement(`img`);e.setAttribute(`data-lexical-decorator-boundary`,`true`),e.alt=``;for(let[t,n]of[[`position`,`absolute`],[`width`,`0px`],[`height`,`0px`],[`border`,`0px`],[`margin`,`0px`],[`padding`,`0px`]])e.style.setProperty(t,n,`important`);return e}function vs(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-decorator-boundary`)}var ys=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&M(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&M(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&M(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&n===0?`before`:`after`;let r=bs(e,this.element);if(r===null)return`after`;let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return`after`;if(t===e)return n<=i?`before`:`after`;let a=bs(e,t);if(a===null)return`after`;let o=Array.prototype.indexOf.call(e.childNodes,a);return o>=0&&o<=i?`before`:`after`}getInsertionAnchor(){return this.before}};function bs(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var xs=class e extends ys{withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()||this.getDecoratorBoundaryAnchor(`trailing`)}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;hs(t);)e=t,t=t.nextSibling;vs(t)&&(e=t,t=t.nextSibling);let n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===ms()?n:e}getDecoratorBoundaryAnchor(e){let t;if(e===`leading`){let e=super.getFirstChildAnchor();for(t=e?e.nextSibling:this.element.firstChild;hs(t);)t=t.nextSibling}else t=this.before?this.before.previousSibling:this.element.lastChild,t!==null&&t===ms()&&(t=t.previousSibling);return vs(t)?t:null}setDecoratorBoundaryAnchor(e,t){let n=this.getDecoratorBoundaryAnchor(e);if(t!==(n!==null)){if(n!==null)this.element.removeChild(n);else if(e===`leading`){let e=this.getFirstChildAnchor();this.element.insertBefore(_s(),e?e.nextSibling:this.element.firstChild)}else this.element.insertBefore(_s(),this.before)}}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){let t=this.element,n=this.after===null?t.firstChild:this.after.nextSibling,r=e===`empty`&&hs(n)?null:e;if(t.__lexicalLastChildKind!==r){if(t.__lexicalLastChildKind=r,r===null)this.removeManagedLineBreak();else{let e=r===`decorator`&&gs;this.insertManagedLineBreak(e)}}}removeManagedLineBreak(){let e=this.element,t=this.getManagedLineBreak();if(t){t.remove();for(let t of e.querySelectorAll(`:scope > [data-lexical-managed-linebreak]`))t.remove();e.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.element,n=this.getManagedLineBreak();if(n){let r=e?n.nextSibling:n;if(r&&r===t.querySelector(`:scope > br[data-lexical-managed-linebreak]`))return;this.removeManagedLineBreak()}let r=this.before||this.getDecoratorBoundaryAnchor(`trailing`),i=Nf().createElement(`br`);if(i.setAttribute(`data-lexical-managed-linebreak`,`true`),t.insertBefore(i,r),e){let e=Nf().createElement(`img`);e.setAttribute(`data-lexical-managed-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,t.insertBefore(e,i),t.__lexicalLineBreak=e}else t.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=ms(),i=this.element.childNodes,a=Math.min(r,i.length),o=0;for(let e=t;e<a;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=Ss(t,n);i.push(r);let a=Ss(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function Ss(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&M(225),n.reverse()}var Cs=!1,ws=0;function Ts(){ws=performance.now()}function Es(e){return W(e)&&e.hasAttribute(`data-lexical-managed-linebreak`)}function Ds(e,t,n){let r=Ef(gf(n)),i=r&&If(r,n._rootElement),a=null,o=null;i!==null&&i.anchorNode===e&&(a=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;s!==null&&Jd(t,s,a,o,!1)}function Os(e,t,n){if(q(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return bd(t)&&n.isAttached()}function ks(e,t,n){for(let r=e;r&&!dp(r);r=cf(r)){let e=Nd(r,t);if(e!==void 0){let t=B(e,n);if(t)return L(t)||!W(r)?void 0:[r,t]}}}function As(e,t,n,r){Cs=!0;let i=e._inputState.unprocessedBeforeInputData===null&&performance.now()-ws>100;try{rh(e,()=>{let a=J()||function(e){return e.read(`latest`,()=>{let e=J();return e===null?null:e.clone()})}(e),o=new Map,s=e._editorState,c=e._blockCursorElement,l=!1,u=``;for(let n of t){let t=n.type,d=n.target,f=ks(d,e,s);if(!f)continue;let[p,m]=f;if(t===`characterData`)r?R(m)&&m.isAttached()&&m.markDirty():i&&R(m)&&bd(d)&&Os(a,d,m)&&Ds(d,m,e);else{l=!0;for(let t of n.addedNodes){let n=Nd(t,e);if(t!==c&&t.parentNode===d&&(n?e.getElementByKey(n)!==t:!(e._slotsUsed&&W(t)&&t.hasAttribute(`data-lexical-slot`)||dp(t)))){if(Oa){let e=(W(t)?t.innerText:null)||t.nodeValue;e&&(u+=e)}d.removeChild(t)}}for(let e of n.removedNodes){let t=c===e;if(t||vs(e)||Es(e)){let t=n.nextSibling,r=n.previousSibling;d.insertBefore(e,t&&t.parentNode!==d?r?r.parentNode===d?r.nextSibling:null:d.firstChild:t)}t||o.set(p,m)}}}for(let[t,n]of o)n.reconcileObservedMutation(t,e);let d=n.takeRecords();for(let t of d)for(let n of t.addedNodes)n.nodeName!==`BR`||Nd(n,e)||Es(n)||n.remove();n.takeRecords(),a!==null&&(l&&zd(a),Oa&&of(e)&&a.insertRawText(u))})}finally{Cs=!1}}function js(e,t,n){let r=e._observer;if(r!==null){let i=r.takeRecords();(!n||i.length>0)&&As(e,i,r,t)}}function Ms(e){(function(e){gf(e).addEventListener(`textInput`,Ts,!0)})(e),e._observer=new MutationObserver((t,n)=>{As(e,t,n)})}function Ns(e,t,n){let{isEqual:r}=e;return t===n||r!==void 0&&r(t,n)}function Ps(e,t){return Ns(e,t,e.defaultValue)}function Fs(e){return typeof e==`object`&&!!e}function Is(e,t){let n=Vs(e,t).getter;return Fs(n)&&n.getterTable!==void 0||M(405,t),Bs(n.getterTable)}function Ls(e,t){let n=Vs(e,t).setter;return Fs(n)&&n.setterTable!==void 0||M(406,t),Bs(n.setterTable)}function Rs(e,t,n){let{meta:r}=Vs(e,t);for(let e=0;;)if(r.kind===`aliased`){if(e===n)return Bs(r.aliases);e++,r=r.inner.meta}else r.kind===`nullable`||r.kind===`optional`?r=r.inner.meta:r.kind===`array`?r=r.item.meta:M(407,t,String(n))}function zs(e,t){let n=Vs(e,t),{setter:r}=n;Fs(r)&&r.setterTable!==void 0||M(408,t);let i=String(n.defaultValue);return Xs(r.setterTable,i)||M(409,t,i),r.setterTable[i]}function Bs(e){return Object.assign(Object.create(null),e)}function Vs(e,t){let n=e.get(t);return n===void 0&&M(410,t),n}function Hs(e,t,n,r,i){i!==void 0&&Us.add(i);let a=n===void 0,o=a?e(void 0):n;return a&&Ks(o),Object.assign(e,{accepts:i,defaultValue:o,isEqual:r,meta:t})}var Us=new WeakSet,Ws=new WeakSet;function Gs(e){return typeof e==`object`&&e&&Ws.add(e),e}function Ks(e){if(typeof e==`object`&&e&&!Object.isFrozen(e)&&!Ws.has(e)){Object.freeze(e);for(let t of Object.values(e))Ks(t)}}function qs(e){let{isEqual:t}=e;return t===void 0?void 0:(e,n)=>e==null||n==null?e===n:t(e,n)}function Js(e,t){return n=>t(n)||Ys(e,n)}function Ys(e,t){let{accepts:n}=e;return n===void 0?function(e,t){let{accepts:n}=e;if(n!==void 0)return Ys(e,t)?{parsed:e(t)}:void 0;let r=e(t);return Ps(e,r)&&t!==e.defaultValue?void 0:{parsed:r}}(e,t)!==void 0:n.call(e,t)}function Xs(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Zs(e=``){return Hs(t=>typeof t==`string`?t:e,{kind:`string`},void 0,void 0,e=>typeof e==`string`)}var Qs=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function $s(e=0,t={}){let{integer:n,clamp:r}=t,i=n&&t.min!==void 0?Math.ceil(t.min):t.min,a=n&&t.max!==void 0?Math.floor(t.max):t.max,o=e=>typeof e==`string`&&Qs.test(e)?Number(e):e,s=e=>typeof e==`number`&&Number.isFinite(e)&&(!n||Number.isInteger(e)),c=e=>s(e)&&(i===void 0||e>=i)&&(a===void 0||e<=a);return Hs(t=>{let n=o(t);return r&&s(n)?i!==void 0&&n<i?i:a!==void 0&&n>a?a:n:c(n)?n:e},{clamp:r,integer:n,kind:`number`,max:a,min:i},void 0,void 0,e=>r?s(o(e)):c(o(e)))}function ec(e=!1){return Hs(t=>typeof t==`boolean`?t:e,{kind:`boolean`},void 0,void 0,e=>typeof e==`boolean`)}function tc(e,...t){let n=Gs(t.length===0?e[0]:t[0]),r=new Set(e);return Hs(e=>e!==void 0&&r.has(e)?e:n,{kind:`enum`,values:e},n,void 0,e=>r.has(e)&&(e!==void 0||n===void 0))}function nc(e,t={}){let{defaultAsNull:n}=t;return Hs(t=>{if(t==null)return null;let r=e(t);return n&&Ps(e,r)?null:r},{defaultAsNull:n,inner:e,kind:`nullable`},void 0,qs(e),Js(e,e=>e==null))}function rc(e,t={}){let{omitDefault:n}=t;return Hs(t=>{if(t===void 0)return;let r=e(t);return n&&Ps(e,r)?void 0:r},{inner:e,kind:`optional`,omitDefault:n},void 0,qs(e),Js(e,e=>e===void 0))}function ic(){return e=>function(e){return{meta:{fields:e,kind:`node`}}}(e)}function ac(e,t){let n=e=>typeof e==`string`&&Xs(t,e);return Hs(r=>n(r)?t[r]:e(r),{aliases:t,inner:e,kind:`aliased`},e.defaultValue,e.isEqual,t=>n(t)||Ys(e,t))}function oc(e){return Hs(t=>{if(!Array.isArray(t))return[];let n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e(t[r]);return n},{item:e,kind:`array`},void 0,(t,n)=>{if(!Array.isArray(t)||!Array.isArray(n)||t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!Ns(e,t[r],n[r]))return!1;return!0},e=>Array.isArray(e))}function sc(e,t){return lc(0,e,{getter:{field:t.field,getterTable:t.getterTable,method:t.getter,when:t.when},setter:{field:t.field,method:t.setter,setterTable:t.setterTable}},!0===t.derived)}function cc(e,t){return lc(0,e,{getter:t.getter,setter:t.setter},!0===t.derived)}function lc(e,t,n,r=!1){return Object.assign(e=>t(e),{accepts:t.accepts,defaultValue:t.defaultValue,...r?{derived:!0}:{},getter:n.getter,isEqual:t.isEqual,meta:t.meta,setter:n.setter})}var uc=`latest`,dc=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;derived;schema;constructor(e,t){this.key=e,this.derived=!0===t.derived;let n=`meta`in(r=t.parse)&&typeof r.meta==`object`&&r.meta!==null&&`kind`in r.meta&&typeof r.meta.kind==`string`&&`defaultValue`in r?t.parse:void 0;var r;this.schema=n,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Sc).bind(t),this.isEqual=t.isEqual?t.isEqual.bind(t):n!==void 0&&n.isEqual!==void 0?(e,t)=>Ns(n,e,t):Object.is,this.defaultValue=n===void 0?this.parse(void 0):n.defaultValue,this.resetOnCopyNode=t.resetOnCopyNode||!1}};function fc(e,t){return new dc(e,t)}function pc(e,t,n=uc){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function mc(e,t,n){let r;if(Im(),typeof n==`function`){let i=e.getLatest(),a=pc(i,t);if(r=hc(t,n(a)),t.isEqual(a,r))return i}else r=hc(t,n);let i=e.getWritable();return yc(i).updateFromKnown(t,r),i}function hc(e,t){let{schema:n}=e;return n!==void 0&&n.meta.kind===`set`?e.parse(t):t}function gc(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of Up(typeof e==`function`?e:e.replace))if(r&&r.stateConfigs)for(let e of r.stateConfigs){let r;`stateConfig`in e?(r=e.stateConfig,e.flat&&n.add(r.key)):r=e,t.set(r.key,r)}return{flatKeys:n,sharedConfigMap:t}}var _c=new Set([`__proto__`,`constructor`,`prototype`]),vc=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.knownState.set(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return xc(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){if(_c.has(i))continue;let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;i&&n in i?(delete i[n],this.unknownState=xc(i)):r.has(e)||this.size++,r.set(e,t)}updateFromUnknown(e,t){if(_c.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function yc(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new vc(t,function(e){return e.__state?e.__state.sharedNodeState:ld(Zf(),e.getType()).sharedNodeState}(t));return t.__state=n,n}function bc(e,t){let n=e.getWritable(),r=t.$;return(n.__state||r)&&yc(e).updateFromJSON(r),n}function xc(e){if(e)for(let t in e)return e}function Sc(e){return e}function Cc(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function wc(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function Tc(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function Ec(e){return!su(e)&&e.getTextContent!==nu.prototype.getTextContent}var Dc=Symbol.for(`@lexical/CachedTextSize`);function Oc(e,t){return Uc.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=Hc.get(r);if(i===void 0&&M(345,r),I(i)){let a=Wc.get(r);if(a!==void 0&&I(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=Gc.get(r),t=e&&e.__lexicalTextContent;typeof t!=`string`&&M(346,i.getType()),n+=t.length}e<t-1&&!i.isInline()&&(n+=2)}else if(sl(i).size>0)n+=i.getTextContentSize();else{let e=i[Dc];e===void 0&&M(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:P})}function kc(e){I(e)||sl(e).size>0||e[Dc]===void 0&&(e[Dc]=R(e)?e.__text.length:e.getTextContentSize())}var Ac=4,jc,P,Mc,F=``,Nc=null,Pc=null,Fc=null;function Ic(){return{firstTextKey:Fc,format:Nc,style:Pc}}function Lc(e){e.firstTextKey!==null&&(Nc=e.format,Pc=e.style,Fc=e.firstTextKey)}function Rc(e){if(Fc!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&M(348),t===null)return;let n=Wc.get(t);R(n)&&(Nc=n.getFormat(),Pc=n.getStyle(),Fc=t)}var zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc=!1,Xc=!1;function Zc(e,t){let n=Hc.get(e),r=Wc.has(e);if(t!==null){let n=Sl(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(P._keyToDOMMap.delete(e),I(n)){let e=Gp(n,Hc);Qc(e,0,e.length-1,null)}if(n!==void 0){for(let e of sl(n).values()){let t=ll(e);Zc(e,null),t!==null&&t.remove()}tf(qc,Mc,zc,n,`destroyed`)}}}function Qc(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&Zc(t,r)}}function $c(e,t){e.setProperty(`text-align`,t)}var el=`40px`;function tl(e,t){let n=jc.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty(`padding-inline-start`,t===0?``:`calc(${t} * var(--lexical-indent-base-value, ${el}))`),$d(e,`class`),$d(e,`style`)}function nl(e,t){let n=e.style;t===0?$c(n,``):t===1?$c(n,`left`):t===2?$c(n,`center`):t===3?$c(n,`right`):t===4?$c(n,`justify`):t===5?$c(n,`start`):t===6&&$c(n,`end`),$d(e,`style`)}function rl(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(su(e))return null;let n=e.getParent();return n===null||U(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function il(e){let t=Nf().createElement(`div`);return t.setAttribute(`data-lexical-slot`,e),t.style.display=`none`,t}function al(e,t,n){t||e.contentEditable===`false`?fp(n,P):n.removeAttribute(`contenteditable`)}function ol(e,t,n){let r=F,i=Ic();F=``;let a=``,o=L(e);for(let[r,i]of n){let n=il(r);al(t,o,n),t.appendChild(n),F=``;let s=Ic();dl(i,$f(e,n,P)),Lc(s),cl(e,r,t,n),a+=F}return Lc(i),F=r,a}function sl(e){return m_(e)&&e.__slots!==null?e.__slots:p_}function cl(e,t,n,r){let i=Jc.$getSlotTargetElement(e,t,n,P);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=``)}function ll(e){let t=Gc.get(e);return t===void 0?null:t.parentElement}function ul(e,t,n){let r=sl(e),i=sl(t);for(let[e,t]of r)if(!i.has(e)){let e=ll(t);Zc(t,null),e!==null&&e.remove()}let a=F,o=Ic(),s=``,c=null,l=L(t);for(let[e,a]of i){let i=r.get(e),o=i===void 0?null:ll(i);F=``;let u=Ic();if(o===null){o=il(e);let r=null;for(let e of n.children)if(!e.hasAttribute(`data-lexical-slot`)){r=e;break}n.insertBefore(o,r),dl(a,$f(t,o,P))}else i===a?_l(a,o):(i!==void 0&&Zc(i,o),dl(a,$f(t,o,P)));if(Lc(u),al(n,l,o),cl(t,e,n,o),s+=F,o.parentElement===n){let e=c===null?n.firstChild:c.nextSibling;e!==o&&n.insertBefore(o,e),c=o}}return Lc(o),F=a,s}function dl(e,t){let n=Wc.get(e);if(n===void 0&&M(60),t!==null){let r=Hc.get(e);if(r!==void 0){let i=Gc.get(e);if(i!==void 0){let a=h_(r)?r.__slotHost:null,o=h_(n)?n.__slotHost:null,s=r.__parent!==n.__parent||a!==o,c=o!==null&&i.parentElement!==t.element;if(s||c)return t.insertChild(i),_l(e,t.element)}}}let r=Jc.$createDOM(n,P);if(function(e,t,n){let r=n._keyToDOMMap;Md(t,n,e),r.set(e,t)}(e,r,P),R(n)?r.setAttribute(`data-lexical-text`,`true`):L(n)&&(r.setAttribute(`data-lexical-decorator`,`true`),up(r,{captureSelection:!0})),I(n)){let e=F,t=n.__indent,i=n.__size;rl(r,n),t!==0&&tl(r,t);let a=sl(n),o=a.size>0?ol(n,r,a):``;if(i===0)r.__lexicalTextContent=o,r.__lexicalFirstTextKey=null,F+=o,a.size>0&&(r.__lexicalSlotTextLength=o.length);else{let t=i-1;if(fl(Gp(n,Wc),n,0,t,$f(n,r,P)),o!==``){let t=r.__lexicalTextContent||``;r.__lexicalTextContent=o+t,F=e+o+t}a.size>0&&(r.__lexicalSlotTextLength=o.length)}if(Ec(n)){let t=n.getTextContent();r.__lexicalTextContent=t,F=e+t}let s=n.__format;s!==0&&nl(r,s),n.isInline()||(hl(0,n,r),ml(n,r))}else{let t=n.getTextContent();if(L(n)){let t=n.decorate(P,jc);t!==null&&vl(e,t),r.contentEditable=`false`;let i=sl(n);i.size>0&&ol(n,r,i)}F+=t}return t!==null&&t.insertChild(r),Jc.$decorateDOM(n,null,r,P),kc(n),tf(qc,Mc,zc,n,`created`),r}function fl(e,t,n,r,i){let a=F,o=Ic();F=``,Nc=null,Pc=null,Fc=null;let s=n;for(;s<=r;++s){let t=Ic();dl(e[s],i);let n=Wc.get(e[s]);n!==null&&R(n)?Nc===null&&(Nc=n.getFormat(),Pc=n.getStyle(),Fc=n.__key):I(n)&&s<r&&!n.isInline()&&(F+=Va),Lc(t)}let c=P._keyToDOMMap.get(t.__key);c===void 0&&M(349,t.__key),c.__lexicalTextContent=F,c.__lexicalFirstTextKey=Fc,F=a+F,Lc(o)}function pl(e){return L(e)&&!e.isInline()}function ml(e,t,n=$f(e,t,P)){n.setDecoratorBoundaryAnchor(`leading`,pl(e.getFirstChild())),n.setDecoratorBoundaryAnchor(`trailing`,pl(e.getLastChild()))}function hl(e,t,n){let r=$f(t,n,P),i=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return fm(e)?`line-break`:L(e)&&e.isInline()?`decorator`:null}return`empty`}return null}(t,Wc);r.setManagedLineBreak(i)}function gl(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=Wc.get(i);if(e===void 0){i=null;break}if(e.__parent===t)break;i=e.__parent}if(i!==null&&!n.has(i)){let e=Wc.get(r);if(R(e))return Nc=e.getFormat(),void(Pc=e.getStyle())}}t.__lexicalFirstTextKey=Fc}function _l(e,t){let n=Hc.get(e),r=Wc.get(e);n!==void 0&&r!==void 0||M(61);let i=Yc||Vc.has(e)||Bc.has(e),a=sf(P,e);if(n===r&&!i){let e;if(I(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&M(355,n.getType()),e=t,Rc(a)}else e=n.getTextContent();return F+=e,a}if(n!==r&&i&&tf(qc,Mc,zc,r,`updated`),Jc.$updateDOM(r,n,a,P)){let n=dl(e,null);return t===null&&M(62),t.replaceChild(n,a),Zc(e,null),n}if(I(n)){I(r)||M(334,e);let t=r.__indent;(Yc||t!==n.__indent)&&tl(a,t);let o=r.__format;(Yc||o!==n.__format)&&nl(a,o);let s=i&&(sl(r).size>0||sl(n).size>0)?ul(n,r,a):``;if(i){let e=F;if(function(e,t,n){var r;Nc=null,Pc=null,Fc=null,function(e,t,n){let r=F,i=e.__size,a=t.__size;F=``;let o=n.element,s=P._keyToDOMMap.get(t.__key);s===void 0&&M(351,t.__key);let c=a-i;if(!Yc&&Math.abs(c)<=1&&i>=Ac&&e.__first===t.__first&&(c!==0||!P._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=Kc.get(e.__key);if(!Yc&&!Ec(t)&&typeof i==`string`&&l!==void 0){let a=function(e,t){let n=t.size;if(n===0||n>=e.__size)return null;let r=e.__last,i=null,a=0;for(;r!==null&&a<n;){if(!t.has(r))return null;i=r;let e=Wc.get(r);if(e===void 0)return null;r=e.__prev,a++}return a!==n||r!==null&&t.has(r)?null:i}(t,l);if(a!==null){let u=l.size;if(c===0){let e=Oc(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=Wc.get(n);if(e===void 0)break;let t=Ic();_l(n,o),R(e)&&Nc===null&&(Nc=e.getFormat(),Pc=e.getStyle(),Fc=e.__key),Lc(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=Wc.get(n);if(e===void 0)break;let t;if(I(e)){let r=P._keyToDOMMap.get(n),i=r&&r.__lexicalTextContent;typeof i!=`string`&&M(352,e.getType()),t=i}else t=e.getTextContent();d+=t,c<u-1&&I(e)&&!e.isInline()&&(d+=Va),n=e.__next,c++}let f=s.__lexicalSlotTextLength||0,p=f>0?i.slice(f):i,m=p.slice(0,p.length-e)+d;s.__lexicalTextContent=m,F=r+m,gl(t,s,l);return}if(function(e,t,n,r,i,a,o,s){if(s!==1&&s!==-1||o!==(s===1?2:1))return!1;let c=o-s,l=e.__last;for(let e=0;e<c-1;e++){if(l===null)return!1;let e=Hc.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=Wc.get(a),d=Hc.get(l);if(u===void 0||d===void 0||u.__prev!==d.__prev)return!1;let f=[],p=a;for(let e=0;e<o;e++){if(p===null)return!1;f.push(p);let e=Wc.get(p);p=e?e.__next:null}let m=[];p=l;for(let e=0;e<c;e++){if(p===null)return!1;m.push(p);let e=Hc.get(p);p=e?e.__next:null}let h=new Set(m),g=new Set(f),_=[],v=0,y=0;for(;v<c&&y<o;)if(f[y]===m[v])_.push({key:f[y],kind:`reconcile`}),v++,y++;else if(g.has(m[v])){if(h.has(f[y]))return!1;_.push({key:f[y],kind:`create`,nextIndex:y}),y++}else _.push({key:m[v],kind:`destroy`}),v++;for(;v<c;)_.push({key:m[v++],kind:`destroy`});for(;y<o;)_.push({key:f[y],kind:`create`,nextIndex:y}),y++;let b=Oc(l,c);for(let e of _){let t=Ic();if(e.kind===`reconcile`)_l(e.key,n.element);else if(e.kind===`destroy`)Zc(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<o;n++){let e=P._keyToDOMMap.get(f[n]);if(e!==void 0){t=e;break}}dl(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=Wc.get(e.key);t&&R(t)&&Nc===null&&(Nc=t.getFormat(),Pc=t.getStyle(),Fc=t.__key)}Lc(t)}let x=``;for(let e=0;e<o;e++){let t=Wc.get(f[e]);if(t===void 0)return!1;let n;if(I(t)){let r=P._keyToDOMMap.get(f[e]),i=r&&r.__lexicalTextContent;typeof i!=`string`&&M(350,t.getType()),n=i}else n=t.getTextContent();x+=n,e<o-1&&I(t)&&!t.isInline()&&(x+=Va)}let S=r.__lexicalSlotTextLength||0,C=S>0?i.slice(S):i;return r.__lexicalTextContent=C.slice(0,C.length-b)+x,!0}(e,0,n,s,i,a,u,c)){let e=s.__lexicalTextContent;typeof e!=`string`&&M(353),F=r+e,gl(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=Wc.get(t);if(e===void 0)break;let r=Yc||Vc.has(t)||Bc.has(t),i=Ic();if(r)_l(t,o);else{let n,r;if(I(e)){r=Gc.get(t);let i=r&&r.__lexicalTextContent;typeof i!=`string`&&M(354,e.getType()),n=i}else n=e.getTextContent();F+=n,r!==void 0&&Rc(r)}R(e)?Nc===null&&(Nc=e.getFormat(),Pc=e.getStyle(),Fc=e.__key):I(e)&&n<a-1&&!e.isInline()&&(F+=Va),Lc(i),t=e.__next,n++}s.__lexicalTextContent=F,s.__lexicalFirstTextKey=Fc,F=r+F;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)_l(r,o);else{let e=Sl(r),t=dl(i,null);try{e.parentNode===o?o.replaceChild(t,e):n.insertChild(t)}catch(n){if(typeof n==`object`&&n){let a=`${n.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw Error(a)}throw n}Zc(r,null)}let a=Wc.get(i);R(a)&&Nc===null&&(Nc=a.getFormat(),Pc=a.getStyle(),Fc=a.__key)}else{let r=Gp(e,Hc),s=Gp(t,Wc);if(r.length!==i&&M(227),s.length!==a&&M(228),i===0)a!==0&&fl(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&sl(t).size===0&&n.element.__lexicalLineBreak==null;Qc(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f],i=Ic();if(e===r)u=yl(_l(r,a.element)),d++,f++;else{if(l===void 0&&(l=bl(n,f)),c===void 0)c=bl(t,d);else if(!c.has(e)){d++,Lc(i);continue}if(!l.has(e)){let t=Sl(e);t.parentNode===a.element&&(u=yl(t)),Zc(e,a.element),d++,c.delete(e),Lc(i);continue}if(c.has(r)){let e=sf(P,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=yl(_l(r,a.element)),d++,f++}else dl(r,a.withBefore(u??a.before)),f++}let o=Wc.get(r);o!==null&&R(o)?Nc===null&&(Nc=o.getFormat(),Pc=o.getStyle(),Fc=o.__key):I(o)&&f<=s&&!o.isInline()&&(F+=Va),Lc(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:P.getElementByKey(t);fl(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&Qc(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=F,s.__lexicalFirstTextKey=Fc,F=r+F}(e,t,$f(t,n,P)),U(t)||(r=t,Nc==null||Nc===r.__textFormat||Xc||r.setTextFormat(Nc),function(e){Pc==null||Pc===e.__textStyle||Xc||e.setTextStyle(Pc)}(t))}(n,r,a),r.isInline()||(su(r)||hl(0,r,a),ml(r,a)),s!==``){let t=a.__lexicalTextContent||``;a.__lexicalTextContent=s+t,F=e+s+t,a.__lexicalSlotTextLength=s.length}else(sl(r).size>0||sl(n).size>0)&&(a.__lexicalSlotTextLength=0);if(Ec(r)){let t=r.getTextContent();a.__lexicalTextContent=t,F=e+t}}else{let e=a.__lexicalTextContent;typeof e!=`string`&&M(356,n.getType()),F+=e,Rc(a)}if((Yc||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(rl(a,r),su(r)&&!Yc))for(let e of r.getChildren())I(e)&&rl(sf(P,e.getKey()),e)}else{let t=r.getTextContent();if(L(r)){let t=r.decorate(P,jc);t!==null&&vl(e,t),i&&(sl(r).size>0||sl(n).size>0)&&ul(n,r,a)}F+=t}if(!Xc&&su(r)){let e=r.getLatest();if(e.__cachedText!==F){let t=e.getWritable();t.__cachedText=F,r=t}}return Jc.$decorateDOM(r,n,a,P),kc(r),a}function vl(e,t){let n=P._pendingDecorators,r=P._decorators;if(n===null){if(r[e]===t)return;n=Fd(P)}n[e]=t}function yl(e){let t=e.nextSibling;return t!==null&&t===P._blockCursorElement&&(t=t.nextSibling),t}function bl(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function xl(e,t,n,r,i,a){F=``,Nc=null,Pc=null,Fc=null,Yc=r===2,P=n,jc=n._config,Jc=n._config.dom||ym,Mc=n._nodes,zc=P._listeners.mutation,Bc=i,Vc=a,Hc=e._nodeMap,Uc=e,Wc=t._nodeMap,Xc=t._readOnly,Gc=cs(n._keyToDOMMap),Kc=function(){let e=new Map,t=t=>{for(let n of t){let t=Wc.get(n);if(t===void 0)continue;let r=t.__parent;if(r===null)continue;let i=e.get(r);i===void 0&&(i=new Set,e.set(r,i)),i.add(n)}};return t(Bc.keys()),t(Vc),e}();let o=new Map;return qc=o,_l(`root`,null),P=void 0,Mc=void 0,Bc=void 0,Vc=void 0,Hc=void 0,Uc=void 0,Wc=void 0,jc=void 0,Gc=void 0,Kc=void 0,qc=void 0,Jc=ym,o}function Sl(e){let t=Gc.get(e);return t===void 0&&M(75,e),t}function Cl(e,t,n){Im();let r=e.__key,i=e.getParent();if(i===null)return void(g_(e)!==null&&M(367,r,String(g_(e))));let a=function(e){let t=J();if(!q(t)||!I(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return mf(i,e)&&n.set(e.__key,0,`element`),mf(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(q(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&(Gg(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(Gg(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else fg(a)&&t&&e.isSelected()&&e.selectPrevious();l_(e.getWritable(),t&&!o&&q(a)?a:null),n||U(i)||i.canBeEmpty()||!i.isEmpty()||Cl(i,t),t&&a&&su(i)&&i.isEmpty()&&i.selectEnd()}function wl(e){return e}var Tl=Symbol.for(`ephemeral`);function El(e){return e[Tl]||!1}var Dl={configurable:!0,enumerable:!1,value:void 0,writable:!0},Ol=class{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=Fp(this);return e===void 0&&M(64,this.name),e}static clone(e){M(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||Kp(this.constructor);return Object.assign(t,{extends:n}),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.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",Dl),Object.defineProperty(this,Dc,Dl),Td(this,e)}getType(){return this.__type}isInline(){M(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=B(e);if(t===null)break;e=t.__parent===null?g_(t):t.__parent}return!1}isSelected(e){let t=e||J();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(R(this))return n;if(q(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(L(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:B(e)}getParentOrThrow(){let e=this.getParent();return e===null&&M(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(U(t)||g_(e)!==null)return I(e)||e===this&&L(e)||M(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&M(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:B(e)}getPreviousSiblings(){return f_(this.getPreviousSibling(),`previous`).reverse()}getNextSibling(){let e=this.getLatest().__next;return e===null?null:B(e)}getNextSiblings(){return f_(this.getNextSibling(),`next`)}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=mv(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?dv(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&M(279),!1)))}isParentOf(e){return mf(e,this)}getNodesBetween(e){let t=this.isBefore(e),n=[],r=this,i=!0,a=0;for(;r!==null&&((i||a===0)&&n.push(r),!r.is(e));){!i&&a>0&&a--;let e=i&&I(r)?t?r.getFirstChild():r.getLastChild():null;e!==null&&a++;let n=e||(t?r.getNextSibling():r.getPreviousSibling());i=n!==null,r=n||r.getParent()}return t?n:n.reverse()}isDirty(){let e=K()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(El(this))return this;let e=B(this.__key);return e===null&&M(442,this.__key,this.__type),e}getWritable(){if(El(this))return this;Im();let e=Rm(),t=K(),n=this.__key,r=t._cloneNotNeeded,i=r.get(n),a=e._selection;if(a!==null&&a.setCachedNodes(null),i!==void 0)return Dd(i),i;let o=e._nodeMap,s=o.get(n);s===void 0&&M(442,n,this.__type);let c=ap(s);return r.set(n,c),o.set(n,c),Dd(c),c}getTextContent(){return A_(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){M(70)}updateDOM(e,t,n){M(71)}getDOMSlot(e){return new ys(e)}exportDOM(e){return{element:Qf(e).$createDOM(this,e)}}exportJSON(e=!1){let t=function(e,t){let n=_p(gp(e.constructor)),{generated:r,isCompactDefault:i}=n,a=r===null?void 0:t?r.exportCompactJSON:r.exportJSON;return a===void 0?function(e,t,n){let r=n?{type:e.__type}:{};return I(e)&&(r.children=[]),function(e,t,n,r){for(let i=0;i<t.length;i++){let a=t[i];if(r&&a.derived)continue;let o;if(a.kind===`ownField`){let t=Ap(e)[a.field];o=a.getterTable===void 0?t:Xs(a.getterTable,t)?a.getterTable[t]:void 0}else o=a.getter.call(e);a.kind===`ownField`&&a.when!==void 0&&(!jp(a,o)&&a.when.call(e)||(o=void 0)),r&&jp(a,o)||(n[a.key]=o)}}(e,t,r,n),n||(r.type=e.__type,r.version=1),r}(e,n.getters,t):t?a(e,i):a(e)}(this,e),n=this.__state?this.__state.toJSON():void 0;return n!==void 0&&Object.assign(t,n),t}static importJSON(e){M(18,this.name)}updateFromJSON(e){return Pp(bc(this,e),e)}static transform(){return null}remove(e){Cl(this,!0,e)}replace(e,t){Im();let n=J();n!==null&&(n=n.clone()),Sf(this,e);let r=this.getLatest(),i=this.__key,a=__(r);a!==null&&M(400,i,r.getType(),a.getKey(),a.getType());let o=e.__key,s=e.getWritable(),c=this.getParentOrThrow().getWritable(),l=c.__size,u=s.getParent();l_(s,q(n)?n:null);let d=r.getPreviousSibling(),f=r.getNextSibling();Cl(r,!1,!0),s_(c,s,d&&d.getWritable(),f&&f.getWritable()),c.__size=u!==null&&u.is(c)?l-1:l;let p=0;if(t&&(I(this)&&I(s)||M(139),p=s.getChildrenSize(),s.splice(p,0,this.getChildren())),q(n)){zd(n);for(let e of[n.anchor,n.focus])e.key===i&&(t&&e.type===`element`?e.set(s.__key,p+e.offset,`element`):ag(e,s))}return kd()===i&&Od(o),s}insertAfter(e,t=!0){return u_(this,`next`,e,t)}insertBefore(e,t=!0){return u_(this,`previous`,e,t)}isParentRequired(){return!1}createParentElementNode(){return z()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){return d_(Y(this,`previous`),e,t)}selectNext(e,t){return d_(Y(this,`next`),e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function kl(e){return e instanceof Ol}function Al(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&Cc(n,e,t)||t&&Cc(n,t,e)||e&&wc(n,e,t)||t&&wc(n,t,e))}(c,l))}function jl(e,t){let n=e.mergeWithSibling(t),r=K()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Ml(e){let t,n,r=e;if(!Ad(r)){if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&R(t)&&t.isSimpleText()&&!t.isUnmergeable()&&!Ad(t);){if(t.__text!==``){if(Al(t,r)){r=jl(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&R(n)&&n.isSimpleText()&&!n.isUnmergeable()&&!Ad(n);){if(n.__text!==``){if(Al(r,n)){r=jl(r,n);break}break}n.remove()}}else r.remove()}}function Nl(e){return Pl(e.anchor),Pl(e.focus),e}function Pl(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),R(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!I(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var Fl=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Il(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!Fl.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function Ll(e,t,n,r,i){let a=Il(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}var Rl=e=>{let t=Is(e,`format`),n=Ls(e,`format`),r=zs(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=Ll(t.indent,0,0,1/0),e.__textFormat=Il(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}};function zl(e,t){e.__detail=t.__detail,e.__format=t.__format,e.__mode=t.__mode,e.__style=t.__style,e.__text=t.__text}var Bl=e=>{let t=Is(e,`mode`),n=Rs(e,`detail`,0),r=Rs(e,`format`,0),i=Ls(e,`mode`),a=zs(e,`mode`);return{exportJSON:function(e){return{detail:e.__detail,format:e.__format,mode:t[e.__mode],style:e.__style,text:e.__text,type:e.__type,version:1}},exportCompactJSON:function(e){let n={type:e.__type},r=e.__detail;r!==void 0&&r!==0&&(n.detail=r);let i=e.__format;i!==void 0&&i!==0&&(n.format=i);let a=t[e.__mode];a!==void 0&&a!==`normal`&&(n.mode=a);let o=e.__style;o!==void 0&&o!==``&&(n.style=o);let s=e.__text;return s!==void 0&&s!==``&&(n.text=s),n},updateFromJSON:function(e,t){let o=t.detail;e.__detail=typeof o==`string`&&o in n?n[o]:Il(o,0);let s=t.format;e.__format=typeof s==`string`&&s in r?r[s]:Il(s,0);let c=t.mode;e.__mode=typeof c==`string`&&c in i?i[c]:a;let l=t.style;e.__style=typeof l==`string`?l:``;let u=t.text;return e.__text=typeof u==`string`?u:``,e},afterCloneFrom:zl}},Vl=e=>{let t=Is(e,`format`),n=Ls(e,`format`),r=zs(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=Ll(t.indent,0,0,1/0),e.__textFormat=Il(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}},Hl=()=>({exportJSON:function(e){return{type:e.__type,version:1}},exportCompactJSON:function(e){return{type:e.__type}}}),Ul=e=>{let t=Is(e,`mode`),n=Rs(e,`format`,0);return{exportJSON:function(e){return{detail:e.__detail,mode:t[e.__mode],text:e.__text,format:e.__format,style:e.__style,type:e.__type,version:1}},exportCompactJSON:function(e){let t={type:e.__type},n=e.__format;n!==void 0&&n!==0&&(t.format=n);let r=e.__style;return r!==void 0&&r!==``&&(t.style=r),t},updateFromJSON:function(e,t){let r=t.format;e.__format=typeof r==`string`&&r in n?n[r]:Il(r,0);let i=t.style;return e.__style=typeof i==`string`?i:``,e}}},Wl=new WeakMap;function Gl(e,t){for(let n=e;n!==null&&n!==t;n=Object.getPrototypeOf(n)){let t=n.prototype;if(t!==void 0&&Object.prototype.hasOwnProperty.call(t,`isInline`)&&typeof t.isInline==`function`&&!Rp(t.isInline))try{let t=e.prototype.isInline.call(Object.create(e.prototype));return typeof t==`boolean`?t:null}catch{return null}}}function Kl(e){for(let{ownNodeConfig:t}of Up(e))if(t&&t.children!==void 0)return t.children}function ql(e){let t=Wl.get(e);if(t===void 0){let n={},r={},i=!1;for(let{klass:t,ownNodeConfig:a}of Up(e))a&&(r.inline===void 0&&a.inline!==void 0&&(n.inline=a.inline,r.inline=t),r.children===void 0&&a.children!==void 0&&(n.children=a.children,r.children=t),i||a.mergeAdjacent===void 0||(i=!0,!1!==a.mergeAdjacent&&(n.mergeAdjacent=a.mergeAdjacent,r.mergeAdjacent=t)));let a=function(e){let t=new Set,n=Ep(e);for(let e of Object.keys(n))!0===n[e].derived&&t.add(e);for(let{ownNodeConfig:n}of Up(e)){let e=n&&n.stateConfigs;if(e)for(let n of e){let e=n instanceof dc?n:n.stateConfig;e.derived&&t.add(e.key)}}return t}(e);r.inline!==void 0&&r.inline!==e&&Gl(e,r.inline)!==void 0&&Gl(e,r.inline)!==n.inline&&(delete n.inline,delete r.inline),r.mergeAdjacent===void 0||r.mergeAdjacent===e||function(e,t,n){let r=Ep(e);for(let e of t.by)if(typeof e==`string`){if(!(e in r))return{entry:e,reason:`unknown`};if(n.has(e))return{entry:e,reason:`derived`}}else if(e.derived)return{entry:String(e.key),reason:`derived-state`};return null}(e,n.mergeAdjacent,a)===null&&function(e,t){if(!Array.isArray(t)||t.includes(`inline`))return null;for(let n of t){if(n===`inline`)continue;let t=Kl(n);if(!(t===`inline`||Array.isArray(t)&&t.includes(`inline`)&&t.every(t=>t===`inline`||t===e||e.prototype instanceof t)))return n}return null}(e,n.children)===null||(delete n.mergeAdjacent,delete r.mergeAdjacent),t=Object.freeze({...n,declaredBy:Object.freeze(r),derived:a,derivedNames:a}),Wl.set(e,t)}return t}function Jl(e){let{derivedNames:t,...n}=ql(e);return Object.freeze({...n,derived:new Set(t)})}function Yl(e){return!1}function Xl(){return{...qa,0:``}}function Zl(){return{...Ga,"":0}}var Ql=Xl(),$l=Zl(),eu=ic()({direction:sc(tc([null,`ltr`,`rtl`]),{field:`__dir`}),format:sc(tc([``,`left`,`start`,`center`,`right`,`end`,`justify`]),{field:`__format`,getter:`getFormatType`,getterTable:Ql,setter:`setFormat`,setterTable:$l}),indent:sc($s(0,{integer:!0,min:0}),{field:`__indent`}),textFormat:cc($s(),{getter:{field:`__textFormat`,method:`getSerializedTextFormat`,when:`shouldSerializeTextStyles`},setter:{field:`__textFormat`}}),textStyle:cc(Zs(),{getter:{field:`__textStyle`,method:`getSerializedTextStyle`,when:`shouldSerializeTextStyles`},setter:{field:`__textStyle`}})});function tu(e){if(U(e)&&!Yl(K())){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}var nu=class extends Ol{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for(`ElementNode`),{$transform:tu,extends:Ol,generated:Rl,json:eu})}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&&M(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__style=e.__style,function(e,t){e.__dir=t.__dir,e.__format=t.__format,e.__indent=t.__indent,e.__textFormat=t.__textFormat,e.__textStyle=t.__textStyle}(this,e)}getFormat(){return this.getLatest().__format}getFormatType(){return qa[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){return f_(this.getFirstChild(),`next`)}getChildrenKeys(){let e=[],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&&S_(this).length===0}isDirty(){let e=K()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[];for(let t of S_(this)){let n=C_(this,t);if(I(n))for(let t of n.getAllTextNodes())e.push(t)}let t=this.getFirstChild();for(;t!==null;){if(R(t)&&e.push(t),I(t))for(let n of t.getAllTextNodes())e.push(n);t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;I(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;I(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=e>=this.getChildrenSize(),n=t?this.getLastChild():this.getChildAtIndex(e);return I(n)&&(t?n.getLastDescendant():n.getFirstDescendant())||n}getFirstChild(){let e=this.getLatest().__first;return e===null?null:B(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&M(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:B(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&M(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=A_(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),I(i)&&r!==n-1&&!i.isInline()&&(e+=Va)}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of x_(e).values()){let e=B(n);e!==null&&(t+=e.getTextContentSize())}return t}(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),I(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=Ga[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=Ua[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Cd(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){Im();let n=J(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(R(e)||I(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(R(e)||I(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return q(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):Fg(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){let t=this.getWritable();return t.__format=e!==``&&Ga[e]||0,t}setStyle(e){let t=this.getWritable();return t.__style=e||``,t}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){let t=this.getWritable();return t.__indent=e,t}splice(e,t,n){El(this)&&M(324,this.__key,this.__type);let r=this.getChildrenSize(),i=this.getWritable();e+t<=r||M(226,String(e),String(t),String(r));for(let e of n);let a=i.__key,o=[],s=[],c=this.getChildAtIndex(e+t),l=null,u=r-t+n.length;if(e!==0){if(e===r)l=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(l=t.getPreviousSibling())}}t>0&&(s=function(e,t,n,r){let i=[],a=t;for(let e=0;e<n;e++){a===null&&M(100);let e=a.getNextSibling();i.push(a.getWritable()),a=e}return a_(e,r&&r.getWritable(),a&&a.getWritable()),e.__size-=i.length,i.map(e=>(o_(e),e.__prev=null,e.__next=null,e.__parent=null,e.__key))}(i,l===null?this.getFirstChild():l.getNextSibling(),t,l));let d=n.length>0&&l!==null?l.getWritable():null;for(let e of n){d!==null&&e.is(d)&&(l=d.getPreviousSibling(),d=l&&l.getWritable()),c!==null&&e.is(c)&&(c=c.getNextSibling());let t=e.getWritable();t.__parent===a&&u--,c_(t);let n=e.__key;s_(i,t,d,c&&c.getWritable()),e.__key===a&&M(76),o.push(n),d=t}if(i.__size=u,s.length){let e=J();if(q(e)){let t=new Set(s),n=new Set(o);for(let r of[e.anchor,e.focus])ru(r,t,n)&&Gg(r,r.getNode(),this,l,c);u!==0||this.canBeEmpty()||U(this)||this.remove()}}return i}getDOMSlot(e){return new xs(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(W(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`,t.setAttribute(`data-lexical-indent`,String(e)));let n=this.getDirection();n&&(t.dir=n)}return{element:t}}shouldSerializeTextStyles(){if(U(this))return!1;for(let e=this.getFirstChild();e!==null;e=e.getNextSibling())if(R(e))return!1;return!0}getSerializedTextFormat(){let e=this.getTextFormat();return e!==0&&this.shouldSerializeTextStyles()?e:void 0}getSerializedTextStyle(){let e=this.getTextStyle();return e!==``&&this.shouldSerializeTextStyles()?e:void 0}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,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){t.read(`latest`,()=>{let n=$f(this,e,t),r=n.element;n.after&&n.after.parentNode!==r&&(n=n.withAfter(null)),n.before&&n.before.parentNode!==r&&(n=n.withBefore(null));let i=n.getManagedLineBreak();i&&n.insertManagedLineBreak(i.nodeName===`IMG`);let a=n.getFirstChild();for(let e of this.getChildrenKeys()){let i=t.getElementByKey(e);if(!i)continue;let o,s=a;for(;s&&!(o=Nd(s,t))&&dp(s);)s=s.nextSibling;s!==i&&r.insertBefore(i,o?s:a||n.getInsertionAnchor()),a=i.nextSibling}ml(this,e,n)})}};function I(e){return e instanceof nu}function ru(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var iu=class extends Ol{__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&&M(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 L(e){return e instanceof iu}function au(e){let t=e.getLatest().__cachedText;return t===null||!Fm()&&K()._dirtyType!==0?null:t}var ou=class extends nu{__cachedText;$config(){return this.config(`root`,{extends:nu})}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){M(51)}getTextContent(){let e=au(this);return e===null?super.getTextContent():e}getTextContentSize(){let e=au(this);return e===null?super.getTextContentSize():e.length}remove(){M(52)}replace(e){M(53)}insertBefore(e){M(54)}insertAfter(e){M(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)I(e)||L(e)||M(282);return super.splice(e,t,n)}static importJSON(e){return V().updateFromJSON(e)}collapseAtStart(){return!0}};function su(e){return e instanceof ou}function cu(e){let t={};if(!e)return t;let n=``,r=``,i=null,a=!1,o=!1,s=!1,c=0,l=e.length,u=-1;for(let d=0;d<l;d++){let l=e[d];if(a)l===`*`&&e[d+1]===`/`&&(a=!1,d++);else if(o)u===-1&&(u=d),o=!1;else if(i===null){if(l!==`/`||e[d+1]!==`*`){if(l!==`"`&&l!==`'`){if(l!==`(`){if(l!==`)`){if(s||l!==`:`||c!==0){if(l===`;`&&c===0){u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1);let i=n.trim(),a=r.trim();i!==``&&a!==``&&(t[i]=a),n=``,r=``,s=!1;continue}u===-1&&(u=d)}else u!==-1&&(n+=e.slice(u,d),u=-1),s=!0}else u===-1&&(u=d),c=Math.max(0,c-1)}else u===-1&&(u=d),c++}else u===-1&&(u=d),i=l}else u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1),a=!0,d++}else u===-1&&(u=d),l===`\\`?o=!0:l===i&&(i=null)}u!==-1&&(s?r+=e.slice(u,l):n+=e.slice(u,l));let d=n.trim(),f=r.trim();return d!==``&&f!==``&&(t[d]=f),t}function lu(e,t,n){let r=n.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===`!important`?e.setProperty(t,r.slice(0,i).trim(),`important`):e.setProperty(t,n,``)}function uu(e,t,n=``){if(t===n)return;let r=cu(n),i=cu(t);for(let t in i)delete r[t],lu(e,t,i[t]);for(let t in r)e.removeProperty(t)}var du=ic()({detail:sc(ac($s(),Wa),{field:`__detail`}),format:sc(ac($s(),Ua),{field:`__format`}),mode:sc(tc([`normal`,`token`,`segmented`]),{field:`__mode`,getterTable:Ya,setterTable:Ja}),style:sc(Zs(),{field:`__style`}),text:sc(Zs(),{field:`__text`,getter:`getTextContent`,setter:`setTextContent`})});function fu(e,t){return 16&t?`code`:128&t?`mark`:32&t?`sub`:64&t?`sup`:null}function pu(e,t){return 1&t?`strong`:2&t?`em`:`span`}function mu(e,t,n,r,i){let a=r.classList,o=ef(i,`base`);o!==void 0&&a.add(...o),o=ef(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in Ua){let r=Ua[e];if(o=ef(i,e),o!==void 0){if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}$d(r,`class`)}function hu(e,t,n){let r=n.isComposing(),i=e+(r?Ba:``),a=Zf(),o=Qf(a).$getDOMSlot(n,t,a),s=o.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(Nf().createTextNode(i));let c=s,l=c.nodeValue;if(l!==i){if(r||Oa||Fa){let[e,t,n]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(l,i);c.replaceData(e,t,n)}else c.nodeValue=i}}function gu(e,t,n,r,i,a){hu(i,e,t);let o=a.theme.text;o!==void 0&&mu(0,0,r,e,o)}function _u(e,t){let n=Nf().createElement(t);return n.appendChild(e),n}function vu(e){return e!=null&&!0===e.__isInlineFormattable}var yu=class extends Ol{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config(`text`,{extends:Ol,generated:Bl,importDOM:{"#text":()=>({conversion:wu,priority:0}),b:()=>({conversion:xu,priority:0}),code:()=>({conversion:Du,priority:0}),em:()=>({conversion:Du,priority:0}),i:()=>({conversion:Du,priority:0}),mark:()=>({conversion:Du,priority:0}),s:()=>({conversion:Du,priority:0}),span:()=>({conversion:bu,priority:0}),strong:()=>({conversion:Du,priority:0}),sub:()=>({conversion:Du,priority:0}),sup:()=>({conversion:Du,priority:0}),u:()=>({conversion:Du,priority:0})},json:du})}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(){return Ya[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===kd()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=Ua[e];return(this.getFormat()&t)!==0}isSimpleText(){let e=this.getLatest();return e.__type===`text`&&e.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Cd(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=fu(0,n),i=pu(0,n),a=r===null?i:r,o=Nf().createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=Nf().createElement(i),o.appendChild(s)),gu(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&uu(o.style,c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=fu(0,i),s=fu(0,a),c=pu(0,i),l=pu(0,a);if((o===null?c:o)!==(s===null?l:s))return!0;if(o===s&&c!==l){let e=t.firstChild;e??M(48);let i=Nf().createElement(l);return gu(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??M(49)),hu(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&mu(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&(uu(t.style,p,f),$d(t,`style`)),!1}exportDOM(e){let{element:t}=super.exportDOM(e);return W(t)||M(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=_u(t,`b`)),this.hasFormat(`italic`)&&(t=_u(t,`i`)),this.hasFormat(`strikethrough`)&&(t=_u(t,`s`)),this.hasFormat(`underline`)&&(t=_u(t,`u`)),{element:t}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?Ua[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?Wa[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=Cd(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=Ja[e];if(this.getLatest().__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.getLatest().__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){Im();let n=e,r=t,i=J(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!q(i))return Fg(o,n,o,r,`text`,`text`);{let e=kd();e!==i.anchor.key&&e!==i.focus.key||Od(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=J();if(r&&q(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Im();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=kd(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=J();if(q(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=Ou(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=Tc(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=Ou(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=Tc(t,n);let a=n.__key;i===r&&Od(a),y.push(n)}let b=g?g.offset:null,x=_?_.offset:null,S=0;for(let e of y){if(!g&&!_)break;let t=S+e.getTextContentSize();if(g!==null&&b!==null&&b<=t&&b>=S&&(g.set(e.getKey(),b-S,`text`),b<t&&(g=null)),_!==null&&x!==null&&x<=t&&x>=S){_.set(e.getKey(),x-S,`text`);break}S=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&Dd(t),n!==null&&Dd(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),q(v)&&Wg(v,u,t,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||M(50);let n=this.__key,r=e.__key,i=this.__text,a=i.length;kd()===r&&Od(n);let o=J();if(q(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&Kg(i,t,n,e,a),s!==null&&s.key===r&&Kg(s,t,n,e,a)}let s=e.__text,c=t?s+i:i+s;this.setTextContent(c);let l=this.getWritable();return e.remove(),l}isTextEntity(){return!1}};function bu(e){return{forChild:ku(e.style),node:null}}function xu(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:ku(t.style,n?void 0:`bold`),node:null}}var Su=new WeakMap;function Cu(e){if(!W(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function wu(e){let t=e;e.parentElement===null&&M(129);let n=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=Su.get(n))===void 0&&!Cu(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)Su.set(r[e],i);return i}(t)!==null)return{node:Qg(n)};if(n=n.replace(/\r/g,``).replace(/[ \t\n]+/g,` `),n===``)return{node:null};if(n[0]===` `){let e=t,r=!0;for(;e!==null&&(e=Tu(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===` `){let e=t,r=!0;for(;e!==null&&(e=Tu(e,!0))!==null;)if((e.textContent||``).replace(/^( |\t|\r?\n)+/,``).length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===``?{node:null}:{node:Ou(n)}}function Tu(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,W(n)){let e=n.style.display;if(e===``&&!qf(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(bd(n))return n;if(n.nodeName===`BR`)return null}}var Eu={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function Du(e){let t=Eu[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:ku(e.style,t),node:null}}function Ou(e=``){return xf(new yu(e))}function R(e){return e instanceof yu}function ku(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign,l=e.textTransform;return e=>((R(e)||vu(e))&&(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),l!==`lowercase`&&l!==`uppercase`&&l!==`capitalize`||e.hasFormat(l)||e.toggleFormat(l),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}function Au(e,t){let{type:n,key:r,offset:i}=e,a=Cf(e.key);return n===`text`?(R(a)||M(266,a.getType(),r),J_(a,t,i)):(I(a)||M(267,a.getType(),r),Uu(a,e.offset,t))}function ju(e,t){let{origin:n,direction:r}=t,i=r===`next`;H_(t)?e.set(n.getKey(),t.offset,`text`):U_(t)?R(n)?e.set(n.getKey(),Y_(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(W_(t)&&I(n)||M(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function Mu(e){let t=J(),n=q(t)?t:Ig();return Nu(n,e),zd(n),n}function Nu(e,t){ju(e.anchor,t.anchor),ju(e.focus,t.focus)}function Pu(e){let{anchor:t,focus:n}=e,r=Au(t,`next`),i=Au(n,`next`),a=cv(r,i)<=0?`next`:`previous`;return ov(rv(r,a),rv(i,a))}function Fu(e){let{direction:t,origin:n}=e,r=Y(n,R_(t)).getNodeAtCaret();return r?Y(r,t):Z_(n.getParentOrThrow(),t)}function Iu(e,t=`root`){let n=[e];for(let r=W_(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Fu(r));return n}function Lu(e){return!!e&&e.origin.isAttached()}function Ru(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=Hu(e,r),o=a.anchor.origin;for(;o!==null&&!U(o);)o=o.getParent();let s=I(o)?o.getFirstChild():null,c=Iu(a.anchor,n),l=Iu(a.focus.getFlipped(),n),u=new Set,d=[];for(let e of a.iterNodeCarets(n))if(W_(e))u.add(e.origin.getKey());else if(U_(e)){let{origin:t}=e;I(t)&&!u.has(t.getKey())||d.push(t)}let f=new Set;for(let e of d){let t=e.getParent();t===null||u.has(t.getKey())||f.add(t),Ed(e)}for(let e of f)!e.canBeEmpty()&&!U(e)&&e.isEmpty()&&e.isAttached()&&e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),a=Fu(Y(t,r)),o=t.getMode();if(Math.abs(e.distance)===n&&i===`removeEmptySlices`||o===`token`&&e.distance!==0)a.remove();else if(e.distance!==0){i=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(o===`segmented`){let e=t.origin,n=Ou(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=J_(n,r,t.offset)}n.is(c[0].origin)&&(c[0]=t),n.is(l[0].origin)&&(l[0]=t.getFlipped())}}let p=zu(c),m=zu(l),h=function(e,t,n){let r=e&&e.getParentAtCaret(),i=t&&t.getParentAtCaret(),a=r&&i&&mv(r,i);if(!a||a.type!==`branch`)return null;let o=(e,t)=>{let r;for(let i=e;i&&!i.is(a.commonAncestor);i=i.getParent()){if(U(i))return;t&&!n.has(i.__key)||!Xf(i)||(r=i)}return r},s=o(r,!1),c=s&&o(i,!0);return s&&c&&S_(c).length===0?[s,c]:null}(p,m,u);if(h){let[e,t]=h;Z_(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}else if(m){let e=function(e){if(W_(e)){let t=e.origin;if(Xf(t))return t}else{let t=e.getParentAtCaret();if(t&&Xf(t))return t}return null}(m),t=e&&e.getParent(),n=e&&e.getParents().findLast(yf);if(e&&t&&!su(t)&&e.isEmpty()&&u.has(e.getKey())&&S_(e).length===0&&(!n||u.has(n.getKey()))){e.remove(!0);let n=t;for(;n&&!su(n)&&n.isEmpty();){let e=n.getParent();if(e&&su(e)&&e.getChildrenSize()<=1&&n.canBeEmpty())break;let t=n;n=e,t.remove(!0)}}}Rd(o,s)!==null||o===null||o.isAttached()||Rd(V(),null);let g=zu([p,m,...c,...l]);if(g)return av(rv(g,e.direction));M(269,JSON.stringify(c.map(e=>e.origin.__key)))}function zu(e){let t=e.find(Lu);return t&&Bu(t)}function Bu(e){let t=function(e){let t=e;for(;W_(t);){let e=$_(t);if(!W_(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(R(t.origin))return H_(t)?t:J_(t.origin,n,n);let r=t.getAdjacentCaret();return U_(r)&&R(r.origin)?J_(r.origin,n,R_(n)):t}function Vu(e){return H_(e)&&e.offset!==Y_(e.origin,e.direction)}function Hu(e,t){return e.direction===t?e:ov(rv(e.focus,t),rv(e.anchor,t))}function Uu(e,t,n){let r=e.getChildrenSize(),i=(t>0?Math.min(Math.ceil(t),r):0)-+(n===`next`),a=i<0||i>=r?null:e.getChildAtIndex(i);return a===null?Z_(e,n):Y(a,n)}function Wu(e,t=`root`){let n=0,r=e,i=$_(r);for(;i===null;){if(n--,i=r.getParentCaret(t),!i)return null;r=i,i=$_(r)}return i&&[i,n]}function Gu(e){let{origin:t,offset:n,direction:r}=e;if(n===Y_(t,r))return e.getSiblingCaret();if(n===Y_(t,R_(r)))return Fu(e.getSiblingCaret());let[i]=t.splitText(n);return R(i)||M(281),rv(Y(i,`next`),r)}function Ku(e,t){for(let n of e)if(n!==null&&n.caret.origin.is(t))return n}function qu(e,t=null){let{origin:n}=e.caret,[r,i]=e.getSliceIndices();if(r===i)return null;if(r===0&&i===n.getTextContentSize())return n;let a=n.getParent(),o=t&&a&&Ug(t,a)?n.getIndexWithinParent():-1,s=t?[t.anchor,t.focus].map(e=>[e,e.key===n.__key&&e.type===`text`?e.offset-r:a!==null&&e.key===a.__key&&e.offset===o?0:null]):[],c=n.splitText(r,i),l=c[r===0?0:1];a&&t&&t!==J()&&Wg(t,a,o,c.length-1);for(let[e,t]of s)t!==null&&e.set(l.__key,t,`text`);return l}function Ju(e,t){return!0}function Yu(e,{$copyElementNode:t=bf,$splitTextPointCaretNext:n=Gu,rootMode:r=`shadowRoot`,$shouldSplit:i=Ju,removeEmptyDestination:a=!1}={}){if(H_(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(W_(e)){let e=Fu(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=f_((s=e).getNodeAtCaret(),s.direction);(r.length>0||!a&&n.canBeEmpty()&&i(n,`last`))&&o.insert(t(n).splice(0,0,r))}var s;return o}function Xu(e,t,n){let r=rv(t,`next`);H_(r)&&(r.offset===0?r=Y(r.origin,`previous`).getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Y(r.origin,`next`))),r.origin.is(e)&&(U_(r)||M(342,e.getKey(),e.getType()),r=Fu(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=Yu(e,n))r=e;return H_(r)&&M(283),r.insert(e.isInline()?z().append(e):e),rv(Y(e.getLatest(),`next`),t.direction)}function Zu(e,t){let n=Hu(q(t)?Pu(t):t,`next`),r=y_(n.anchor.origin),i=y_(e.getLatest());if(r===null?i!==null:!r.is(i))return!1;let a=Bu(Z_(e,`next`)),o=rv(Bu(Z_(e,`previous`)),`next`);return cv(n.anchor,a)<=0&&cv(n.focus,o)>=0}var Qu=class extends nu{$config(){return this.config(`paragraph`,{children:`inline`,extends:nu,generated:Vl,importDOM:{p:()=>({conversion:$u,priority:0})}})}createDOM(e){let t=Nf().createElement(`p`),n=ef(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(W(t)){this.isEmpty()&&t.append(Nf().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}exportJSON(e=!1){let t=super.exportJSON(e);if(t.textFormat===void 0||t.textStyle===void 0){let n=this.getChildren().find(R),r=n?n.getFormat():this.getTextFormat(),i=n?n.getStyle():this.getTextStyle();e&&r===0||(t.textFormat=r),e&&i===``||(t.textStyle=i)}return t}extractWithChild(e,t,n){if(!q(t)||this.getFormatType()===``&&this.getIndent()===0&&this.getStyle()===``)return!1;if(Zu(this,t)){let e=this.getTextContent();return e!==``&&t.getTextContent()===e}return!1}insertNewAfter(e,t){let n=z();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){if(this.getChildren().every(e=>R(e)&&!/\S/.test(e.getTextContent()))){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function $u(e){let t=z();if(lp(t,e),sp(e,t),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in Ga&&t.setFormat(n)}return cp(t,e),{node:t}}function z(){return xf(new Qu)}function ed(e){return e instanceof Qu}var td=ic()({detail:cc($s(2),{getter:{field:`__detail`},setter:null}),mode:cc(tc([`normal`]),{getter:{field:`__mode`,getterTable:{0:`normal`}},setter:null}),text:cc(Zs(` `),{getter:{field:`__text`,method:`getTextContent`},setter:null})}),nd=class extends yu{$config(){return this.config(`tab`,{extends:yu,generated:Ul,json:td})}constructor(e=void 0){super(` `,e),this.__detail=2}createDOM(e){let t=super.createDOM(e),n=ef(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}setTextContent(e){return super.setTextContent(` `)}spliceText(e,t,n,r){return n===``&&t===0||n===` `&&t===1||M(286),this}setDetail(e){return e!==2&&M(127),this}setMode(e){return e!==`normal`&&M(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function rd(){return xf(new nd)}function id(e){return e instanceof nd}var ad=null;function od(e){ad=e}var sd=Symbol(`INTERNAL_SKIP_AFTER_CLONE_FROM`),cd=1;function ld(e,t){let n=ud(e,t);return n===void 0&&M(30,t),n}function ud(e,t){return e._nodes.get(t)}var dd=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function fd(e,t){let n=t===void 0?(()=>{let t=e.getRootNode();return xd(t)||Of(t)?Vf(t):null})():t;if(!W(n)||n.hasAttribute(`data-lexical-slot`))return!1;let r=Pd(n),i=n.nodeName;return kl(r)&&(i===`INPUT`||i===`TEXTAREA`||n.contentEditable===`true`&&_d(n)==null)}function pd(e){let t=e===null?null:Hf(e);return Wf(t)&&fd(t)}function md(e,t,n){let r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch{return!1}return gd(t)===e&&e.read(`latest`,()=>!fd(t))}function hd(e){return e instanceof Cm}function gd(e){let t=e;for(;t!=null;){let e=_d(t);if(hd(e))return e;t=cf(t)}return null}function _d(e){return e?e.__lexicalEditor:null}function vd(e){return id(e)||e.isToken()}function yd(e){return vd(e)||e.isSegmented()}function bd(e){return Wf(e)&&e.nodeType===3}function xd(e){return Wf(e)&&e.nodeType===9}function Sd(e){let t=e;for(;t!=null;){if(bd(t))return t;t=t.firstChild}return null}function Cd(e,t,n){let r=Ua[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~Ua.superscript:t===`superscript`?i&=~Ua.subscript:t===`lowercase`?(i&=~Ua.uppercase,i&=~Ua.capitalize):t===`uppercase`?(i&=~Ua.lowercase,i&=~Ua.capitalize):t===`capitalize`&&(i&=~Ua.lowercase,i&=~Ua.uppercase),i}function wd(e){return R(e)||fm(e)||L(e)}function Td(e,t){let n=function(){let e=ad;return ad=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);Im(),Lm();let r=K(),i=Rm(),a=``+cd++;i._nodeMap.set(a,e),I(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.set(a,e),r._dirtyType===0&&(r._dirtyType=1),e.__key=a}function Ed(e){c_(e.getParent()===null?e:e.getWritable())}function Dd(e){Lm(),El(e)&&M(323,e.__key,e.__type);let t=e.__parent===null?h_(e)?e.__slotHost:null:e.__parent,n=Rm(),r=K(),i=n._nodeMap,a=r._dirtyElements;t!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent===null?h_(e)?e.__slotHost:null:e.__parent}}(t,i,a);let o=e.__key;r._dirtyType===0&&(r._dirtyType=1),I(e)?a.set(o,!0):r._dirtyLeaves.add(o)}function Od(e){Im();let t=K(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=B(n);e!==null&&e.getWritable()}if(e!==null){let t=B(e);t!==null&&t.getWritable()}}}function kd(){return Fm()?null:K()._compositionKey}function Ad(e){return!Ma&&(Pa||La)&&e.__text===``&&e.__key===K()._compositionKey}function B(e,t){let n=(t||Rm())._nodeMap.get(e);return n===void 0?null:n}function jd(e,t){let n=Nd(e,K());return n===void 0?null:B(n,t)}function Md(e,t,n){e[`__lexicalKey_${t._key}`]=n}function Nd(e,t){return e[`__lexicalKey_${t._key}`]}function Pd(e,t){let n=e;for(;n!=null;){let e=jd(n,t);if(e!==null)return e;n=cf(n)}return null}function Fd(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Id(e){return e.read(()=>V().getTextContent())}function Ld(e,t){let n=ip(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=B(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:`history-merge`}:void 0)}function V(){return Rm()._nodeMap.get(`root`)}function Rd(e,t){if(!(U(e)&&e.isAttached()&&(su(e)?e.getChildrenSize()===0:e.isEmpty())&&(su(e)||t!==null&&Xf(t))))return null;let n=z();return e.append(n),n}function zd(e){Im();let t=Rm();e!==null&&(e.dirty=!0,e.setCachedNodes(null),q(e)&&K()._slotsUsed&&jg(e)),t._selection=e}function Bd(e){Im(),js(K(),e)}function Vd(e){let t=function(e,t){let n=e;for(;n!=null;){let e=Nd(n,t);if(e!==void 0)return e;n=cf(n)}return null}(e,K());return t===null?null:B(t)}function Hd(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Ud(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}var Wd=0;function Gd(){return Sa?Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5):`s${(++Wd).toString(36)}`}function Kd(e){return bd(e)?e.nodeValue:null}function qd(e,t,n){let r=Ef(gf(t));if(r===null)return;let i=If(r,t._rootElement),a=i.anchorNode,{anchorOffset:o,focusOffset:s}=i;if(a!==null){let t=Kd(a),r=Pd(a);if(t!==null&&R(r)){if((t===Ba||t===Ha)&&n){let e=n.length;t=n,o=e,s=e}t!==null&&Jd(r,t,o,s,e)}}}function Jd(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing(),s=!Ma&&(Pa||La);if(a.isToken()&&o)return;let c=t;if((o||i)&&(!t.endsWith(Ba)||s&&t===a.getTextContent()||(c=t.slice(0,-Ba.length)),i&&!s)){let e=Ha,t;for(;(t=c.indexOf(e))!==-1;)c=c.slice(0,t)+c.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let l=a.getTextContent();if(i||c!==l){let t=J();if(c===``){if(o&&!i&&s)return void Yd(a,``,t);if(Od(null),Pa||Ma||La)a.remove();else{let e=K();Yd(a,``,t),setTimeout(()=>{e.update(()=>{a.isAttached()&&a.getTextContent()===``&&a.remove()})},20)}return}let l=a.getParent(),u=Hg(),d=a.getTextContentSize(),f=kd(),p=a.getKey();if(a.isToken()&&!o||f!==null&&p===f&&!o||q(u)&&(l!==null&&!l.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===e.__key&&u.anchor.offset===0&&!a.canInsertTextBefore()&&!o||u.focus.key===e.__key&&u.focus.offset===d&&!a.canInsertTextAfter()&&!o))return void a.markDirty();if(!q(t)||n===null||r===null)return void Yd(a,c,t);if(t.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=Ou(a.getTextContent());a.replace(e),a=e}Yd(a,c,t)}}}function Yd(e,t,n){if(e.setTextContent(t),q(n)){let t=e.getKey(),r=!1;for(let i of[`anchor`,`focus`]){let a=n[i];a.type===`text`&&a.key===t&&(a.offset=Y_(e,a.offset,`clamp`),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function Xd(e){let t=e;for(;t!==null;){let e=t.getParent();if(e===null)return null;if(su(e))return t;t=e}return null}function Zd(e,t){let{anchor:n,focus:r}=e,i=n.key,a=n.offset,o=n.type,s=r.key,c=r.offset,l=r.type;if(Nl(e),!su(t))return e;let u=Xd(n.getNode());return I(u)&&u.isShadowRoot()&&u.is(Xd(r.getNode()))&&(n.set(i,a,o),r.set(s,c,l)),e}function Qd(e){let t=V();if(q(e)){let t=e.anchor,n=e.focus,r=t.getNode();if(su(r))return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),Zd(e,r),e;let i=r.getTopLevelElementOrThrow(),a=i.getParent();return a===null?(I(i)&&(t.set(i.getKey(),0,`element`),n.set(i.getKey(),i.getChildrenSize(),`element`),Zd(e,i)),e):(t.set(a.getKey(),0,`element`),n.set(a.getKey(),a.getChildrenSize(),`element`),Zd(e,a),e)}{let e=t.select(0,t.getChildrenSize());return zd(Zd(e,t)),e}}function $d(e,t){e.getAttribute(t)===``&&e.removeAttribute(t)}function ef(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=gv(i);return n[t]=e,e}return i}function tf(e,t,n,r,i){if(n.size===0)return;let a=r.__type,o=r.__key,s=t.get(a);s===void 0&&M(33,a);let c=s.klass,l=e.get(c);l===void 0&&(l=new Map,e.set(c,l));let u=l.get(o),d=u===`destroyed`&&i===`created`;(u===void 0||d)&&l.set(o,d?`updated`:i)}function nf(e){let t=e.getType(),n=Rm();if(n._readOnly){let e=ip(n).get(t);return e?Array.from(e.values()):[]}let r=n._nodeMap,i=[];for(let[,n]of r)n instanceof e&&n.__type===t&&n.isAttached()&&i.push(n);return i}function rf(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function af(e,t){let n=e.offset;if(e.type===`element`)return rf(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?rf(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function of(e){let t=gf(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function H(e,t,...n){return Qm(e,t,n[0],e)}function sf(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&M(75,t),n}function cf(e){let t=e.assignedSlot||e.parentElement;if(t!==null)return t;let n=e.parentNode;return Of(n)?n.host:null}function lf(e){return xd(e)?e:W(e)?e.ownerDocument:null}function uf(e,t){let n=parseFloat(e);return isFinite(n)?e.endsWith(`%`)?n*t/100:n:0}function df(e,t,n,r){let i=t.clientWidth,a=t.scrollWidth-i;if(a<=0)return 0;let o=e.getComputedStyle(t);if(o.overflowX!==`auto`&&o.overflowX!==`scroll`)return 0;let s=t.getBoundingClientRect(),c=t.offsetWidth,l=c>0&&Math.abs(s.width-c)>1?s.width/c:1,u=o.direction===`rtl`,d=s.left+t.clientLeft*l,f=d+uf(o.scrollPaddingLeft,i)*l,p=d+(i-uf(o.scrollPaddingRight,i))*l,m=n,h=Math.max(r,n+1);h-m>p-f&&(u?m=h-1:h=m+1);let g=0;if(m<f?g=m-f:h>p&&(g=h-p),g===0)return 0;let _=t.scrollLeft,v=_+g/l,y=g>0?Math.ceil(v):Math.floor(v),b=u?Math.min(0,Math.max(-a,y)):Math.max(0,Math.min(a,y)),x=_*l;return Math.abs(b)<Math.abs(_)&&m+x>=f&&h+x<=p&&(b=0),b===_?0:(t.scrollLeft=b,(t.scrollLeft-_)*l)}function ff(e){Im(),K()._updateTags.add(e)}function pf(e){Im(),K()._deferred.push(e)}function mf(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function hf(e){let t=lf(e);return t?t.defaultView:null}function gf(e){let t=e._window;return t===null&&M(78),t}function _f(e){return I(e)&&e.isInline()||L(e)&&e.isInline()}function vf(e){let t=e.getLatest();for(;t!==null;){if(g_(t)!==null&&I(t))return t;let e=t.getParentOrThrow();if(U(e))return e;t=e}return t}function yf(e){return I(e)&&e.isShadowRoot()}function U(e){return su(e)||yf(e)}function bf(e,t=!1){let n=e.constructor.clone(e,sd);return Td(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function xf(e){let t=K(),n=e.getType(),r=ud(t,n);r===void 0&&M(200,e.constructor.name,n);let{replace:i,replaceWithKlass:a}=r;if(i!==null){let t=i(e),r=t.constructor;return a===null?t instanceof e.constructor&&r!==e.constructor||M(202,r.name,r.getType(),e.constructor.name,n):t instanceof a||M(201,a.name,a.getType(),r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&M(203,e.constructor.name,n,r.name,r.getType()),t}return e}function Sf(e,t){!su(e.getParent())||I(t)||L(t)||M(99)}function Cf(e){let t=B(e);return t===null&&M(63,e),t}function wf(e){if(!e||e.isInline())return!1;if(L(e))return!0;if(I(e)){if(e.isShadowRoot()){let t=e.getParent();return!(I(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function Tf(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function Ef(e){return Sa?(e||window).getSelection():null}function Df(e){let t=hf(e);return t?t.getSelection():null}function Of(e){return Gf(e)&&`host`in e}var kf=[];function Af(e){let t=e.getRootNode();if(t===e||!Of(t))return kf;let n=[t],r=t.host;for(;;){let e=r.getRootNode();if(e===r||!Of(e))break;n.push(e),r=e.host}return n}function*jf(e){let t=[e],n;for(;n=t.pop();){yield*n.querySelectorAll(`[data-lexical-editor="true"]`);let e=(xd(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r;for(;r=e.nextNode();)r.shadowRoot&&t.push(r.shadowRoot)}}function Mf(e){return e===null?document:e.ownerDocument}function Nf(){let e=Hm();return Mf(e===null?null:e._rootElement)}function Pf(e,t){if(t===null||typeof e.getComposedRanges!=`function`)return null;let n=Af(t);if(n.length===0)return null;let r=e.getComposedRanges;try{let t=r.call(e,{shadowRoots:n})[0];if(t!==void 0)return t}catch{}try{let t=r.apply(e,n)[0];if(t!==void 0)return t}catch{}return null}function Ff(e,t){let n=Pf(e,t);if(n!==null){let e=Lf(n);if(e!==null)return e}return e.rangeCount>0?e.getRangeAt(0):null}function If(e,t){let n=Pf(e,t);return n===null?e:Rf(n,zf(e))}function Lf(e){let t=e.startContainer.ownerDocument;if(t===null)return null;let n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch{return null}}function Rf(e,t){let{startContainer:n,startOffset:r,endContainer:i,endOffset:a}=e;return t===`backward`?{anchorNode:i,anchorOffset:a,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:a}}function zf(e){return e.direction}function Bf(e){let t=e.getRootNode();return xd(t)||Of(t)?t.activeElement:null}function Vf(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){let e=t.shadowRoot.activeElement;if(e===null)break;t=e}return t}function Hf(e){let t=e.target;if(t!==null&&W(t)&&t.shadowRoot!==null&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0)return t[0]}return t}function Uf(e){return W(e)&&e.tagName===`A`}function W(e){return Wf(e)&&e.nodeType===1}function Wf(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function Gf(e){return Wf(e)&&e.nodeType===11}var Kf=/^(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 qf(e){return!(!W(e)||!e.style.display.startsWith(`inline`))||Kf.test(e.nodeName)}var Jf=/^(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 Yf(e){return(!W(e)||!e.style.display.startsWith(`inline`))&&Jf.test(e.nodeName)}function Xf(e){if(L(e)&&!e.isInline())return!0;if(!I(e)||U(e))return!1;let t=e.getFirstChild(),n=t===null||fm(t)||R(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Zf(){return K()}function Qf(e=Zf()){return e._config.dom||ym}function $f(e,t,n=Zf()){let r=Qf(n).$getDOMSlot(e,t,n);return I(e)&&(ep(r)||M(344,e.getKey(),e.getType())),r}function ep(e){return e instanceof xs}function tp(e,t,n=Zf()){return Sd($f(e,t,n).element)}var np=new WeakMap,rp=new Map;function ip(e){if(!e._readOnly&&e.isEmpty())return rp;e._readOnly||M(192);let t=np.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),np.set(e,t)),t}function ap(e){let t=e.constructor.clone(e,sd);return t.afterCloneFrom(e),t}function op(e){return(t=ap(e))[Tl]=!0,t;var t}function sp(e,t){let n=e.getAttribute(`data-lexical-indent`);if(n!==null){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}function cp(e,t){let n=t.getAttribute(`dir`);return n===`ltr`||n===`rtl`?e.setDirection(n):e}function lp(e,t){let n=t.style.textAlign;return n&&n in Ga?e.setFormat(n):e}function up(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function dp(e){return!0===e.__lexicalUnmanaged}function fp(e,t=Zf()){let n=t.isEditable();e.contentEditable=n?`true`:`false`,n?e.__lexicalEditor=t:delete e.__lexicalEditor}function pp(e,t){let n=e;for(;n!=null;){if(!0===n.__lexicalCapturedSelection)return!0;if(W(n)&&n.hasAttribute(`data-lexical-slot`)||Nd(n,t)!==void 0)return!1;n=cf(n)}return!1}function mp(e,t){return Xs(e,t)&&e[t]!==Ol[t]}var hp=new WeakMap;function gp(e){let t=hp.get(e);return t===void 0?function(e){let t=e.prototype!=null&&Za in e.prototype?e.prototype[Za]():void 0,n=function(e){if(!(e===Ol||e.prototype instanceof Ol)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{Cm.version&&(n=JSON.parse(Cm.version))}catch{}M(290,e.name,t,n)}return e===iu||e===nu||e===Ol}(e),r=!n&&mp(e,`getType`)?e.getType:void 0,i=r&&!(vp in r)?r.call(e):void 0,a,o=i;if(t){if(i)a=t[i];else{for(let[e,n]of Object.entries(t))o=e,a=n;if(!a)for(let e of Object.getOwnPropertySymbols(t)){let n=t[e];if(n){a=n;break}}}}let s={compiled:void 0,composed:void 0,config:{declaresOwnConfig:Xs(e.prototype,Za),klass:e,ownNodeConfig:a,ownNodeType:o},ownFieldsValidated:!1};hp.set(e,s);try{let t=function(e){let t=e.prototype,n=new Map,{fieldsBaseFirst:r}=Tp(e);for(let[i,a]of r){let r=kp(e,i,a);if(r===null)continue;if(Fs(r)){let t=r.field;if(t===`__proto__`&&M(430,e.name,i),r.setterTable!==void 0){let{setterTable:t}=r,{meta:n}=a;for(let r of n.kind===`enum`?n.values:[a.defaultValue])Xs(t,String(r))||M(431,e.name,i,JSON.stringify(r))}n.set(i,{field:t,key:i,kind:`ownField`,schema:a,setterTable:r.setterTable});continue}let o=t[r];typeof o!=`function`&&M(432,e.name,i,r),n.set(i,{key:i,kind:`field`,schema:a,setter:o})}return n.size===0?yp:[...n.values()]}(e),r=function(e){let t=e.prototype,n=new Map;for(let[r,i]of Tp(e).fieldsDerivedFirst){let a=Op(e,r,i);if(a===null)continue;if(Fs(a)){let o=a.field;o===`__proto__`&&M(426,e.name,r);let s=a.when,c;if(s!==void 0){let n=t[s];typeof n!=`function`&&M(427,e.name,r,s),c=n}n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,field:o,getterTable:a.getterTable,isEqual:i.isEqual,key:r,kind:`ownField`,schema:i,when:c});continue}let o=t[a];typeof o!=`function`&&M(428,e.name,r,a),n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,getter:o,isEqual:i.isEqual,key:r,kind:`method`,schema:i})}return n.size===0?Dp:[...n.values()]}(e),i=Tp(e),c=function(e,t,n){let r,i=e;for(let{klass:t,ownNodeConfig:n}of Up(e))n&&n.generated!==void 0&&(r===void 0?(r=n.generated,i=t):n.generated===r&&(i=t));return r===void 0?null:i===e||function(e,t){if(e.getters.length!==t.getters.length||e.setters.length!==t.setters.length)return!1;for(let n=0;n<e.getters.length;n++){let r=e.getters[n],i=t.getters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.derived!==i.derived||r.isEqual!==i.isEqual||!Object.is(r.defaultValue,i.defaultValue)||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.getterTable===void 0!=(i.getterTable===void 0)))return!1}for(let n=0;n<e.setters.length;n++){let r=e.setters[n],i=t.setters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.setterTable===void 0!=(i.setterTable===void 0)))return!1}return!0}(n,_p(gp(i)))?r:null}(e,0,{getters:r,setters:t});s.compiled={flatStates:i.flatStates,generated:c===null?null:c(i.fields),getters:r,isCompactDefault:Mp(r),setters:t},function(e,t,n,r){if(!t&&n){if(!mp(e,`getType`)){let t=e,r=function(){return this===t?n:Ol.getType.call(this)};r[vp]=!0,e.getType=r}if(mp(e,`clone`)||(e.clone=(t,n)=>{od(t);let r=new e;return n!==sd&&r.afterCloneFrom(t),r}),mp(e,`importJSON`)||(e.importJSON=r&&r.$importJSON||function(e){return t=>{let n=Wp(e);return n.updateFromJSON===Ol.prototype.updateFromJSON?function(e,t){return Pp(e.__state||t.$!==void 0?bc(e,t):e,t)}(n,t):n.updateFromJSON(t)}}(e)),!mp(e,`importDOM`)&&r){let{importDOM:t}=r;t&&(e.importDOM=()=>t)}let t=e.prototype;Xs(t,`getTextContent`)&&!Xs(t,`getTextContentSize`)&&(e.prototype.getTextContentSize=Ol.prototype.getTextContentSize)}}(e,n,o,a),function(e){for(let{klass:t,ownNodeConfig:n}of Up(e)){let e=t.prototype;if(Xs(e,`afterCloneFrom`))continue;let r=Hp(t);if(r.length===0)continue;let i=Object.getPrototypeOf(e),a=n&&n.generated!==void 0?_p(gp(t)).generated:null,o=a!==null&&a.afterCloneFrom||((e,t)=>{let n=e,i=t;for(let e=0;e<r.length;e++){let t=r[e];n[t]=i[t]}});e.afterCloneFrom=function(e){i.afterCloneFrom.call(this,e),o(this,e)},e.afterCloneFrom[Bp]=!0}}(e),function(e,t){t&&t.inline!==void 0&&Xs(e.prototype,Za)&&!Object.prototype.hasOwnProperty.call(e.prototype,`isInline`)&&Object.defineProperty(e.prototype,"isInline",{configurable:!0,value:t.inline?Ip:Lp,writable:!0})}(e,a)}catch(t){throw hp.delete(e),t}return s}(e):t}function _p(e){let{compiled:t}=e;return t===void 0&&M(422,e.config.klass.name),t}var vp=Symbol(`lexical.synthesizedGetType`),yp=[];function bp(e,t,n,r){let i=n.method===void 0?r:n.method,a=Tp(e).declaredBy.get(t);if(a===void 0)return n;let o=e.prototype,s=a.prototype;return xp(o,s,i)&&xp(o,s,r)?n:i}function xp(e,t,n){return e[n]===t[n]}function Sp(e){return`set${e.charAt(0).toUpperCase()}${e.slice(1)}`}function Cp(e){return`get${e.charAt(0).toUpperCase()}${e.slice(1)}`}var wp={declaredBy:new Map,fields:new Map,fieldsBaseFirst:[],fieldsDerivedFirst:[],flatStates:[]};function Tp(e){let t=gp(e);return t.composed===void 0&&(t.composed=function(e){let t=[],n=[],r=[];for(let{klass:i,ownNodeConfig:a}of Up(e)){let e=a&&a.json;n.push(i),t.push(e&&e.meta.kind===`node`?Object.entries(e.meta.fields):[]);let o=[];if(a&&a.stateConfigs)for(let e of a.stateConfigs)`stateConfig`in e&&e.flat&&o.push(e.stateConfig);r.push(o)}let i=new Map;for(let e=0;e<t.length;e++)for(let[n,r]of t[e])i.has(n)||i.set(n,r);let a=new Map,o=new Map,s=new Map;for(let e=t.length-1;e>=0;e--){for(let[r,s]of t[e]){let t=i.get(r);t===void 0||a.has(r)||a.set(r,t),t===void 0||s!==t||o.has(r)||o.set(r,n[e])}for(let t of r[e])s.has(t.key)||s.set(t.key,t)}return i.size===0&&s.size===0?wp:{declaredBy:o,fields:a,fieldsBaseFirst:[...a],fieldsDerivedFirst:[...i],flatStates:[...s.values()]}}(e)),t.composed}function Ep(e){let{fieldsDerivedFirst:t,flatStates:n}=Tp(e),r={};for(let e of n)e.schema&&(r[e.key]=e.schema);for(let[e,n]of t)r[e]=n;return r}var Dp=[];function Op(e,t,n){let r=n.getter;if(r===null)return null;let i=r===void 0?Cp(t):r;return Fs(i)?bp(e,t,i,Cp(t)):i}function kp(e,t,n){let r=n.setter;if(r===null)return null;let i=r===void 0?Sp(t):r;return Fs(i)?bp(e,t,i,Sp(t)):i}function Ap(e){return e}function jp(e,t){let{defaultValue:n,isEqual:r}=e;return t===void 0||t===n||r!==void 0&&r(t,n)}function Mp(e){let t;return(n,r)=>{t===void 0&&(t=new Map(e.map(e=>[e.key,e])));let i=t.get(n);return i!==void 0&&jp(i,r)}}function Np(e){let{setterTable:t,schema:n}=e,{defaultValue:r}=n;return t===void 0?r:t[String(r)]}function Pp(e,t){let{flatStates:n,generated:r,setters:i}=_p(gp(e.constructor)),a=function(e,t,n){let r=e;for(let e=0;e<n.length;e++){let i=n[e],a=t[i.key];if(a!==void 0){let e=i.parse(a);r=mc(r,i,()=>e)}}return r}(e,t,n);return r!==null&&r.updateFromJSON!==void 0?r.updateFromJSON(a,t):function(e,t,n){for(let r=0;r<n.length;r++){let i=n[r],a=i.schema(t[i.key]);i.kind===`ownField`?Ap(e)[i.field]=i.setterTable===void 0?a:Xs(i.setterTable,a)?i.setterTable[a]:Np(i):i.setter.call(e,a)}return e}(a,t,i)}function Fp(e){return gp(e).config}function Ip(){return!0}function Lp(){return!1}function Rp(e){return e===Ip||e===Lp}function zp(e){let t=[];for(let n of[e.getter,e.setter])Fs(n)&&n.field!==`__proto__`&&!t.includes(n.field)&&t.push(n.field);return t}var Bp=`__lexicalSynthesizedAfterCloneFrom`;function Vp(e){let{declaredBy:t,fieldsBaseFirst:n}=Tp(e),r=[];for(let[i,a]of n)if(t.get(i)===e)for(let e of zp(a))r.includes(e)||r.push(e);return r}function Hp(e){let t=Vp(e);if(t.length===0)return t;let n=new Set;for(let{klass:t}of Up(e))if(t!==e)for(let e of Vp(t))n.add(e);return n.size===0?t:t.filter(e=>!n.has(e))}function*Up(e){for(let t=e;t&&(t===Ol||kl(t.prototype));){let e=Fp(t),n=e.declaresOwnConfig;yield n?e:{...e,ownNodeConfig:void 0},t=n&&e.ownNodeConfig&&e.ownNodeConfig.extends||Kp(t)}}function Wp(e){let t=Zf();Im();let n=t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e)),r=new n.klass;return n.replace===null?r:xf(r)}var G=(e,t)=>{let n=e;for(;n!=null&&!su(n);){if(t(n))return n;n=n.getParent()}return null};function Gp(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t===null?B(r):t.get(r);e??M(174),n.push(r),r=e.__next}return n}function Kp(e){let t=Object.getPrototypeOf(e);if(typeof t==`function`&&t!==Function.prototype)return t;let n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}function qp(e){return new Zp(cs(e._nodeMap),null,e._slotsUsed)}function Jp(){return new Zp(new Map([[`root`,new ou]]),null,!1)}function Yp(e){let t=e.constructor,n=ps(e);if(I(e)){let t=n.children,r=e.getChildren();for(let e=0;e<r.length;e++)t.push(Yp(r[e]))}let r=S_(e);if(r.length>0){let i={};for(let n of r){let r=C_(e,n);r===null&&M(366,t.name,n),i[n]=Yp(r)}n.$slots=i}return n}function Xp(e){return e instanceof Zp}var Zp=class e{_nodeMap;_movedNodes;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,n=!1){this._nodeMap=e,this._movedNodes=null,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size<=1&&this._selection===null}read(e,t){return Jm(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return n._readOnly=!0,n._parsed=this._parsed,n}toJSON(e){return ds(typeof e==`boolean`&&e,()=>Jm(null,this,()=>({root:Yp(V())})))}},Qp=`historic`,$p=`history-push`,em=`history-merge`,tm=`paste`,nm=`collaboration`,rm=`skip-collab`,im=`skip-scroll-into-view`,am=`skip-dom-selection`,om=`skip-selection-focus`,sm=`composition-end`,cm=class extends nu{$config(){return this.config(`artificial`,{extends:nu})}createDOM(e){return Nf().createElement(`div`)}},lm=class extends Ol{$config(){return this.config(`linebreak`,{extends:Ol,generated:Hl,importDOM:{br:e=>pm(e)||mm(e)?null:{conversion:um,priority:0}}})}getTextContent(){return`
|
|
4
4
|
`}createDOM(){return Nf().createElement(`br`)}updateDOM(){return!1}isInline(){return!0}};function um(e){return{node:dm()}}function dm(){return xf(new lm)}function fm(e){return e instanceof lm}function pm(e){let t=e.parentElement;if(t!==null&&Yf(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&hm(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&hm(n))return!0}}return!1}function mm(e){let t=e.parentElement;if(t!==null&&Yf(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&hm(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&hm(r))return!0}return!1}function hm(e){return bd(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||``)}function gm(e){console.warn(e)}function _m(e,t,n,r,i){let a=e._keyToDOMMap;a.clear(),e._editorState=Jp(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),t!==null&&Sh(e,t),e._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},composedSegmentedKey:null,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,isShiftKeyDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,lastPointerType:``,mouseDrag:null,postDeleteSelectionToRestore:null,savedInputMode:void 0,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null};let o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=``,function(e,t){delete e[`__lexicalKey_${t._key}`]}(t,e)),n!==null&&(n.textContent=``,a.set(`root`,n),Md(n,e,`root`))}function vm(e){let t=new Set,n=new Set;for(let{klass:r,ownNodeConfig:i}of Up(e)){let e=r.transform;if(!n.has(e)){n.add(e);let i=r.transform();i&&t.add(i)}if(i){let e=i.$transform;e&&t.add(e)}}return t}var ym={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=ud(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>I(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,n,r)=>null,$shouldExclude:(e,t,n)=>I(e)&&e.excludeFromCopy(`html`),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function bm(e){let t=e||{},n=Hm(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=Jp(),s=t.namespace||(i===null?Gd():i._config.namespace),c=t.editorState,l=[ou,yu,lm,nd,Qu,cm,...t.nodes||[]],{onError:u,onWarn:d,html:f}=t,p=t.editable===void 0||t.editable,m;if(e===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let e=0;e<l.length;e++){let n=l[e],r=null,i=null;if(n&&typeof n==`object`){let e=n;n=e.replace,r=e.with,i=e.withKlass||null}if(typeof n!=`function`||!n.prototype||!(n===Ol||n.prototype instanceof Ol)){let r=`<unknown>`;try{r=JSON.parse(as)}catch{}M(365,String(e-l.length+(t.nodes?t.nodes.length:0)),typeof n==`function`?`${n.name}${typeof n.getType==`function`?` (type ${String(n.getType())})`:``}`:String(n),String(r))}Fp(n);let a=n.getType(),o=vm(n);m.set(a,{exportDOM:f&&f.export?f.export.get(n):void 0,klass:n,replace:r,replaceWithKlass:i,sharedNodeState:gc(l[e]),transforms:o})}}let h=new Cm(o,i,m,{disableEvents:a,dom:{...ym,...e&&e.dom},namespace:s,theme:r},u||console.error,d||gm,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(m,f?f.import:void 0),p,e);return c!==void 0&&(h._pendingEditorState=c,h._dirtyType=2),function(e){e.registerCommand(no,Mh,0),e.registerCommand(ro,Ph,0),e.registerCommand(io,Ih,0),e.registerCommand(ao,Lh,0),e.registerCommand(yo,Jh,0)}(h),h}function xm(e,t){let n=e.get(t);e.delete(t),n&&n()}function Sm(e,t,n){return e.set(t,n),xm.bind(null,e,t)}var Cm=class{static version=as;_headless;_recordNodeMoves;_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;_keyDownShortcuts;_inputState;_lastNotifiedSelection;_createEditorArgs;constructor(e,t,n,r,i,a,o,s,c){this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new ls,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=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Map,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Gd(),this._onError=i,this._onWarn=a,this._htmlConversions=o,this._editable=s,this._headless=t!==null&&t._headless,this._recordNodeMoves=!1,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._keyDownShortcuts=null,this._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},composedSegmentedKey:null,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,isShiftKeyDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,lastPointerType:``,mouseDrag:null,postDeleteSelectionToRestore:null,savedInputMode:void 0,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null},this._lastNotifiedSelection=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return Sm(this._listeners.update,e)}registerEditableListener(e){return Sm(this._listeners.editable,e)}registerDecoratorListener(e){return Sm(this._listeners.decorator,e)}registerTextContentListener(e){return Sm(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return ih(Sm(t,e,e(this._rootElement,null)||void 0),()=>function(e,t,n){let r=e.get(t);r&&r(),e.set(t,t(...n)||void 0)}(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&M(35);let r=this._commands;r.has(e)||r.set(e,[new os,new os,new os,new os,new os]);let i=r.get(e);i===void 0&&M(36,String(e));let a=function(e){return 7&e}(n),o=i[a];return a===n?o.addBack(t):o.addFront(t),()=>{o.delete(t),i.every(e=>e.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&M(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=ip(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return Ld(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,...t){return H(this,e,...t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=ef(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,_m(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||function(e){let t=ch.get(e);if(t===void 0)return void tg();let n=lh.get(t);if(n===void 0)return void tg();ch.delete(e);let r=_d(e);hd(r)?(function(e){if(e._parentEditor!==null){let t=Ud(e),n=t[t.length-1]._key;Zh.get(n)===e&&Zh.delete(n)}else Zh.delete(e._key)}(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&M(198);let i=Yh(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),n!=null&&t.classList.remove(...n)),e!==null){let t=hf(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,Ms(this),this._updateTags.add(em),Ym(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;ch.set(e,n);let r=lh.get(n);r===void 0&&(r={editors:new Set,hasShadowEditor:void 0},lh.set(n,r)),r.editors.add(t),r.hasShadowEditor=void 0,e.__lexicalEditor=t;let i=Yh(e);i.push(uh.register(n));let a={blur:Jo,click:_h,compositionend:Bh,compositionstart:Fh,copy:Bo,cut:Vo,dragend:zo,dragover:Ro,dragstart:Lo,drop:Fo,focus:qo,input:Nh,keydown:Vh,paste:uo,pointerdown:Ch,...Aa&&{beforeinput:jh},...Ma&&{keyup:Hh,mousedown:bh}};for(let[n,r]of Object.entries(a))i.push(ah(e,n,i=>{eg(i)||($h(i),n===`blur`&&(Sh(t,e),t._inputState.isShiftKeyDown=!1,t._inputState.isInsertLineBreak=!1),(t.isEditable()||n===`click`||n===`copy`)&&(typeof r==`function`?r(i,t):H(t,r,i)))}));let o,s=()=>{t._inputState.mouseDrag=null},c=n=>{let i=t._inputState,a=i.mouseDrag;if(o&&o.defaultPrevented&&!n.buttons&&(i.isSelectionChangeFromMouseDown=!1),!a||n.pointerType!==`mouse`)return;let c=n.type===`pointerup`;if(n.type===`pointercancel`||!c&&n.buttons!==1)return s();i.mouseDrag=c?null:n,rh(t,()=>{let o=Ef(gf(t));if(a.type!==`mousedown`){let r=c&&o&&q(J())&&Bg(Hg(),o,t,new Event(`selectionchange`));return r&&zd(r),Th(t,n,c&&o?If(o,e).focusNode:null)}let l=Rg(o,t);if(a.defaultPrevented||!a.shiftKey&&l&&!l.isCollapsed())s();else if(o&&i.isSelectionChangeFromMouseDown){Xh(t,o,new Event(`selectionchange`),r),Th(t,a,If(o,e).focusNode);let n=J();q(n)&&n.isCollapsed()&&!n.is(Hg())&&gh(t,n)}})};i.push(oh(n,{pointercancel:c,pointermove:c,pointerup:c},!0),ah(gf(t),`blur`,s),t.registerEditableListener(s),oh(e,{contextmenu:s,dragstart:s,keydown:e=>e.getModifierState&&e.getModifierState(e.key)||s(),mousedown:e=>{let n=t._inputState;n.mouseDrag=e.button!==0||e.detail!==1||e.defaultPrevented||n.lastPointerType!==`mouse`||!t.isEditable()||t.isComposing()||pp(Hf(e),t)?null:e}}),ah(e,`pointerdown`,e=>{o=e,t._inputState.lastPointerType=e.pointerType},!0)),Ma&&i.push(function(e,t){let n=null,r={capture:!0,passive:!0};return ih(ah(e,`touchstart`,e=>{let t=e.touches.length===1?e.touches[0]:null;n=t?{x:t.clientX,y:t.clientY}:null},r),ah(e,`touchend`,e=>{let r=e.changedTouches[0];n!==null&&r&&e.touches.length===0&&Math.abs(r.clientX-n.x)<=vh&&Math.abs(r.clientY-n.y)<=vh&&t(e),n=null},r))}(e,n=>function(e,t,n){t._inputState.savedInputMode!==void 0&&(xh(e,t,n)||(Vf(n.ownerDocument)===n&&n.blur(),Sh(t,n)))}(n,t,e)))}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(em),Ym(this);Xm(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){let n=e.isEmpty(),r=e;r._readOnly&&(r=qp(e),r._selection=e._selection?e._selection.clone():null),js(this);let i=this._pendingEditorState,a=t===void 0?null:t.tag;i===null||i.isEmpty()||(a!=null&&this._updateTags.add(a),Ym(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,rh(this,()=>{if(a&&this._updateTags.add(a),n&&(ba(38),V().append(z())),e._parsed)for(let[e,t]of r._nodeMap.entries())I(t)?this._dirtyElements.set(e,!0):this._dirtyLeaves.add(e)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return function(e,t,n){let r=Jp(),i=Tm,a=Dm,o=Em,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Map,t._dirtyType=0,Tm=r,Dm=!1,Em=t,od(null);try{let i=t._nodes;qm(e.root,i),n&&n(),r._readOnly=!0,r._parsed=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,Tm=i,Dm=a,Em=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(...e){let[t,n]=e.length===1?[`force-commit`,e[0]]:e;return t===`force-commit`&&(Mm.has(this)||Ym(this)),(t===`pending`?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):nh(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),rh(this,()=>{let r=J(),i=V();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||zd(r.clone()),ff(`focus`),pf(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=Ef(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Xm(`editable`,this,!0,e),this._slotsUsed&&this.update(()=>Bm()))}toJSON(){return{editorState:this._editorState.toJSON(fs())}}};function wm(e,t,n,r,i,a){if(I(e)){let o=e.__first;for(;o!==null;){let e=r.get(o);if(e===void 0)break;let s=I(e);e.__parent!==t||s&&a.has(o)||((s||m_(e)&&e.__slots!==null)&&wm(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o)),o=e.__next}}for(let o of m_(e)&&e.__slots!==null?e.__slots.values():[]){let e=r.get(o);e!==void 0&&h_(e)&&e.__slotHost===t&&((I(e)||m_(e)&&e.__slots!==null)&&wm(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o))}}var Tm=null,Em=null,Dm=!1,Om=!1,km=!1,Am=new Set,jm=new Set,Mm=new Set,Nm=0,Pm={characterData:!0,childList:!0,subtree:!0};function Fm(){return Dm||Tm!==null&&Tm._readOnly}function Im(){Dm&&M(13)}function Lm(){Nm>99&&M(14)}function Rm(){return Tm===null&&M(195,Vm()),Tm}function zm(e){Rm()!==null&&Em===null&&(Em=e),Em!==e&&ba(378)}function K(){return Em===null&&M(337,Vm()),Em}function Bm(){K()._dirtyType=2}function Vm(){let e=0,t=new Set,n=Cm.version;if(typeof window<`u`)for(let r of jf(document)){let i=_d(r);if(hd(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function Hm(){return Em}function Um(e,t,n){let r=t.__type,i=ld(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function Wm(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Gm(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function Km(e){return qm(e,K()._nodes)}function qm(e,t){let n=e.type,r=t.get(n);r===void 0&&M(17,n);let i=r.klass;e.type!==i.getType()&&M(18,i.name);let a=i.importJSON(e),o=e.children;if(I(a)&&Array.isArray(o))for(let e=0;e<o.length;e++){let n=qm(o[e],t);a.append(n)}let s=e.$slots;if(s){m_(a)||M(379,i.name);for(let e in s)M_(a,e,qm(s[e],t))}return a}function Jm(e,t,n){let r=Tm,i=Dm,a=Em;Tm=t,Dm=!0,Em=e;try{return n()}finally{Tm=r,Dm=i,Em=a}}function Ym(e,t){e._pendingEditorState!==null&&Em!==e&&js(e,!1,!0);let n=km;km=!0;try{let n=function(e){if(jm.has(e))return!1;jm.add(e);try{for(let t=0;e._pendingEditorState!==null;t++){let n=e._pendingEditorState._selection,r=e._rootElement;if(!Zm(e,n))return!1;let i=(n===null||q(n))&&(e._headless||r===null||!r.isConnected);if(i||t===100)return e._lastNotifiedSelection=n===null?null:n.clone(),!i;nh(e,()=>e.dispatchCommand($a),void 0,!0)}return!1}finally{jm.delete(e)}}(e);(function(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return void(!e._updating&&e._deferred.length>0&&$m(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=Tm,u=Dm,d=Em,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){Em=e,Tm=n,Dm=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=xl(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),Om)throw t;_m(e,null,r,n),Ms(e),e._dirtyType=2,Om=!0,Ym(e,a),Om=!1;return}finally{p.observe(r,Pm),e._updating=f,Tm=l,Dm=u,Em=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set),e._updateTags=new Set;let y=e._deferred;f||(e._deferred=[]),function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=Fd(e)),delete r[a])}(e,n);let b=i?null:Ef(gf(e));if(e._editable&&b!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){Em=e,Tm=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&Tf(t,e,r),Yg(o,s,e,b,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(q(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(Bf(t))){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())wf(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);t!==null&&wf(t)&&(s=!0,c=e.getElementByKey(t.__key))}if(s){let n=$f(a,e.getElementByKey(a.__key),e).element;r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=Nf().createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=gv(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&Tf(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,Pm),Em=d,Tm=l}}let x=Mm.has(e);Mm.add(e);try{m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a);let r=e._pendingDecorators;r!==null&&(e._decorators=r,e._pendingDecorators=null,Xm(`decorator`,e,!0,r)),function(e,t,n){let r=Id(t),i=Id(n);r!==i&&Xm(`textcontent`,e,!0,i)}(e,t||a,n),Xm(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v})}finally{x||Mm.delete(e)}f||$m(e,y),function(e){let t=e._updates;if(t.length===0)return void(e._cascadeCount=0);if(function(e){Am.has(e)||(Am.add(e),setTimeout(()=>{Am.delete(e),e._cascadeCount=0},0))}(e),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,void e._onWarn(ya(437,e._config.namespace));let n=t.shift();if(n){let[t,r]=n;nh(e,t,r)}}(e)})(e,t),n&&e._onWarn(ya(436))}finally{km=n}}function Xm(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e],i=Array.from(n);for(let[e,t]of i){t&&t();let i=e(...r),a=typeof i==`function`?i:void 0;n.has(e)?n.set(e,a):a&&a()}}finally{t._updating=i}}function Zm(e,t){let n=e._lastNotifiedSelection;return t===null?n!==null:!t.is(n)}function Qm(e,t,n,r){let i=Ud(e),a;if(!km)for(let e=0;e<i.length;e++)i[e]._updating||(i[e]._cascadeCount=0);if(t===$a){if(Em!==e||Dm){let i=!1;return rh(e,()=>{i=Qm(e,t,n,r)}),i}let i=Rm()._selection;e._lastNotifiedSelection=i===null?null:i.clone()}for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let s=i[o];if(o>0&&s._updating){a=s;break}let c=s._commands.get(t);if(c!==void 0){let t=c[e];if(t.size>0){let e=!1;if(rh(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{Qm(a,t,n,r)}),!1}function $m(e,t){if(e._deferred===t&&(e._deferred=[]),t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function eh(e,t){let n=e._updates,r=t||!1;for(;n.length!==0;){let t=n.shift();if(t){let[n,i]=t,a=e._pendingEditorState,o;i!==void 0&&(o=i.onUpdate,i.skipTransforms&&(r=!0),i.discrete&&(a===null&&M(191),a._flushSync=!0),o&&e._deferred.push(o),Gm(e,i.tag)),a==null?nh(e,n,i):n()}}return r}function th(){let e=Rm();Im(),e._flushSync=!0}function nh(e,t,n,r=!1){let i=e._updateTags,a,o=!1,s=!1;n!==void 0&&(a=n.onUpdate,Gm(e,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),a&&e._deferred.push(a);let c=e._editorState,l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=qp(l||c),u=!0),l._flushSync=s;let d=Tm,f=Dm,p=Em,m=e._updating,h=e._lastNotifiedSelection;Tm=l,Dm=!1,e._updating=!0,Em=e;let g=e._headless||e.getRootElement()===null;od(null);try{u&&(g?c._selection!==null&&(l._selection=c._selection.clone()):l._selection=function(e,t){let n=e.getEditorState()._selection,r=Ef(gf(e));return q(n)||n==null?Bg(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),o=eh(e,o),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(q(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(l,e),e._dirtyType!==0&&(o?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);R(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Ml(t)}}(l,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=kd(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);R(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Ml(r),r!==void 0&&Wm(r,a)&&Um(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){Nm++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&Wm(c,a)&&Um(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,Nm++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),eh(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||(I(t)&&wm(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(m_(t)&&t.__slots!==null&&wm(t,e,i,a,o,n),i.has(e)||n.delete(e),o.push(e))}let s=K(),c=s._cloneNotNeeded;for(let e of o)a.delete(e),c.delete(e);let l=s._compositionKey;l===null||a.has(l)||(s._compositionKey=null)}(c,l,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(l._flushSync=!0);let i=l._selection;if(q(i)){e._slotsUsed&&jg(i);let t=l._nodeMap,n=i.anchor.key,r=i.focus.key;t.get(n)!==void 0&&t.get(r)!==void 0||M(19)}else fg(i)&&i._nodes.size===0&&(l._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=c;let n=c._selection;e._lastNotifiedSelection=n===null?null:n.clone(),e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),Ym(e);return}finally{Tm=d,Dm=f,Em=p,e._updating=m,Nm=0}r||(e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,Ym(e)):u&&dd(()=>{Ym(e)}):(l._flushSync=!1,u&&(i.clear(),e._deferred=[],e._pendingEditorState=null,e._lastNotifiedSelection=h)))}function rh(e,t,n){Em===e&&n===void 0?Fm()?nh(e,t,n):t():nh(e,t,n)}function ih(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function ah(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}function oh(e,t,n){return ih(...Object.entries(t).map(([t,r])=>ah(e,t,r,n)))}var sh=30,ch=new WeakMap,lh=new WeakMap,uh=rs(e=>(e.addEventListener(`selectionchange`,Qh),()=>e.removeEventListener(`selectionchange`,Qh)));function dh(e,t,n,r,i,a){let o=e.anchor,s=e.focus,c=o.getNode(),l=K(),u;if(a!==void 0)u=a;else{let e=Ef(gf(l));u=e===null?null:If(e,l._rootElement)}let d=u===null?null:u.anchorNode,f=o.key,p=l.getElementByKey(f),m=n.length;return f!==s.key||!R(c)||(!i&&(!Aa||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&m<2||Hd(n))&&o.offset!==s.offset&&!c.isComposing()||yd(c)||c.isDirty()&&m>1||(i||!Aa)&&p!==null&&!c.isComposing()&&d!==tp(c,p,l)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=vd(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(R(t)||I(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,c)}function fh(e,t){return bd(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function ph(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=If(e,t._rootElement),s=t._inputState;if(s.isSelectionChangeFromDOMUpdate){s.isSelectionChangeFromDOMUpdate=!1;let e=s.selectionChangeFromDOMUpdatePoints;if(s.selectionChangeFromDOMUpdatePoints=null,fh(r,i)&&fh(a,o)&&!s.postDeleteSelectionToRestore&&(e===null||e.anchorNode===r&&e.anchorOffset===i&&e.focusNode===a&&e.focusOffset===o))return}rh(t,()=>{if(!n)return void zd(null);if(!md(t,r,a))return;let c=s.mouseDrag;!c||c.type===`mousedown`&&c.defaultPrevented||Th(t,c,a);let l=wh.has(c),u=J();if(s.postDeleteSelectionToRestore&&q(u)&&u.isCollapsed()){let e=u.anchor,t=s.postDeleteSelectionToRestore.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(u=s.postDeleteSelectionToRestore.clone(),zd(u))}if(s.postDeleteSelectionToRestore=null,q(u)){let n=u.anchor;if(u.isCollapsed())e.type===`Range`&&r===a&&(u.dirty=!0),gh(t,u);else{let e=n.key,t=u.focus,r=t.key,a=u.getNodes(),s=a.length,c=u.isBackward(),[d,f]=l?[n.offset,t.offset]:[i,o],p=c?f:d,m=c?d:f,h=c?r:e,g=c?e:r,_=za,v=!1;for(let e=0;e<s;e++){let t=a[e],n=t.getTextContentSize();if(R(t)&&n!==0&&!(e===0&&t.__key===h&&p===n||e===s-1&&t.__key===g&&m===0)&&(v=!0,_&=t.getFormat(),_===0))break}u.format=v?_:0}}(function(e,t,n=!1){(n||Zm(e,t))&&e.dispatchCommand($a)})(t,u,u!==null&&(u.dirty&&!l||!q(u)))})}function mh(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function hh(e,t){mh(e,t.getFormat(),t.getStyle())}function gh(e,t){let n=t.anchor,r=n.getNode(),i=gf(e).event,a=i?i.timeStamp:performance.now(),{format:o,style:s,offset:c,key:l,timeStamp:u}=e._inputState.collapsedSelectionFormat;a<u+200&&n.offset===c&&n.key===l?mh(t,o,s):n.type===`text`?(R(r)||M(141),hh(t,r)):(e.isComposing()||V().getTextContent()!==``)&&(I(r)||M(259),r.isEmpty()?Vg(t,``):mh(t,t.format,``))}function _h(e,t){rh(t,()=>{let n=J(),r=Ef(gf(t)),i=Hg();if(r){if(q(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!su(t)&&V().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`||Ma&&t._inputState.lastPointerType!==`mouse`){let n=If(r,t._rootElement).anchorNode;(W(n)||bd(n))&&zd(Bg(i,r,t,e))}}if(Oa&&r!==null&&r.rangeCount===0){let n=t._rootElement;if(n!==null&&e.target===n){let a=e.clientY,o=n.childNodes.length;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(W(t)){let n=t.getBoundingClientRect();if(a<=(n.top+n.bottom)/2){o=e;break}}}r.setBaseAndExtent(n,o,n,o);let s=Bg(i,r,t,e);s===null?r.removeAllRanges():zd(s)}}H(t,to,e)})}var vh=10,yh=`input:not(:disabled),textarea:not(:disabled),select:not(:disabled),button:not(:disabled),a[href],area[href],label,summary,iframe,object,embed,audio[controls],video[controls],[tabindex],[contenteditable]:not([contenteditable="false"])`;function bh(e,t){let n=t.getRootElement();n!==null&&(xh(e,t,n)?(e.preventDefault(),Vf(n.ownerDocument)!==n&&(t._inputState.savedInputMode===void 0&&(t._inputState.savedInputMode=n.getAttribute(`inputmode`)),n.setAttribute(`inputmode`,`none`),n.focus({preventScroll:!0}))):Sh(t,n))}function xh(e,t,n){if(t._inputState.lastPointerType===`mouse`)return!1;let r=Hf(e);if(!Wf(r))return!1;let i=!1;for(let e=r;e!==null;e=cf(e)){if(e===n)return i;if(e.nodeType===1){let t=e;if(t.matches(yh))return!1;t.getAttribute(`data-lexical-decorator`)===`true`&&(i=!0)}}return!1}function Sh(e,t){let n=e._inputState.savedInputMode;n!==void 0&&(e._inputState.savedInputMode=void 0,n===null?t.removeAttribute(`inputmode`):t.setAttribute(`inputmode`,n))}function Ch(e,t){let n=Hf(e),r=e.pointerType;Wf(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&rh(t,()=>{pp(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}var wh=new WeakSet;function Th(e,t,n=null){let r=J(),i=r&&r.clone();(function(e,t,n){let r=Hg(),i=t.type===`mousedown`,a=i&&!t.shiftKey,o=n&&Pd(n);L(o)&&(i?a&&o.isInline()&&o.selectPrevious():q(r)&&zd(r.clone()));let s=J(),c=s||(a?Ig():q(r)?r.clone():null),l=e.getRootElement(),u=l&&l.getRootNode();if(!q(c)||a&&!c.isCollapsed()||!xd(u)&&!Of(u))return;let{anchor:d,focus:f}=c;if(!i&&q(r)){let{key:e,offset:t,type:n}=r.anchor;d.set(e,t,n,!0)}let{clientX:p,clientY:m}=t,h=u.elementFromPoint&&u.elementFromPoint(p,m),g=h&&Pd(h),_=(e,t)=>I(e)?t===`next`?e.getLastDescendant():e.getFirstDescendant():e,v=[null],y=I(g)&&!g.isInline()&&(su(g)?G(f.getNode(),Pg):g);for(let e of y?Z_(y,`next`):[])v.push(Y(e.origin,`previous`),e);let b=gf(e),x=b.document.createRange(),S=null;for(let t of v){let n=t?_(t.origin,t.direction):g;if(!L(n)||!n.isInline()||n===S)continue;let r=e.getElementByKey(n.getKey());if(!r)continue;x.selectNodeContents(r);let i=x.getBoundingClientRect(),o=r.getBoundingClientRect(),{bottom:l,left:u,right:h,top:v}=i.height>o.height?i:o;if(t&&(m<v||m>l)){S=n;continue}let y=b.getComputedStyle(cf(r)||r).direction===`rtl`,C=2*p>u+h!==y,w=C?`next`:`previous`,T=t&&t.getNodeAtCaret(),E=T&&e.getElementByKey(T.getKey()),D=E?E.getClientRects():[],ee=D[C?0:D.length-1];if(!t||t.direction===w&&b.getComputedStyle(r).cssFloat===`none`&&(!T||fm(T)||ee&&(C===y?2*ee.right>u+h:2*ee.left<u+h))){if(!n.is(_(af(f,C),w))){let e=Y(n,w);ju(f,e),a&&ju(d,e)}s||zd(c);return}}if(L(o)&&!i){let t=b.document,n=t.caretPositionFromPoint&&t.caretPositionFromPoint(p,m,{shadowRoots:Of(u)?[u]:[]}),r=n&&Eg(n.offsetNode,n.offset,null,e);if(r){let[{key:e,offset:t,type:n}]=r;f.set(e,t,n)}}})(e,t,n);let a=J(),o=e._inputState.mouseDrag;o&&a&&!a.is(i)&&wh.add(o),t.type===`mousedown`&&q(a)&&Vg(a,q(i)?i.anchor.key:``)}function Eh(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function Dh(e){let{lastKeyCode:t}=K()._inputState;if(e==null||e.length<=1||t==null)return;let n=t.length===1?t:t===`Enter`?`
|