@valencets/cms 0.4.0 → 0.6.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/admin/admin-routes.d.ts +2 -0
- package/dist/admin/admin-routes.d.ts.map +1 -1
- package/dist/admin/admin-routes.js +7 -5
- package/dist/admin/admin-routes.js.map +1 -1
- package/dist/admin/edit-view.d.ts +9 -1
- package/dist/admin/edit-view.d.ts.map +1 -1
- package/dist/admin/edit-view.js +105 -35
- package/dist/admin/edit-view.js.map +1 -1
- package/dist/admin/editor/admin-client.js +1 -1
- package/dist/admin/editor/admin-client.js.map +1 -1
- package/dist/admin/field-renderers.d.ts +13 -1
- package/dist/admin/field-renderers.d.ts.map +1 -1
- package/dist/admin/field-renderers.js +48 -8
- package/dist/admin/field-renderers.js.map +1 -1
- package/dist/admin/layout.d.ts.map +1 -1
- package/dist/admin/layout.js +49 -2
- package/dist/admin/layout.js.map +1 -1
- package/dist/admin/list-view.d.ts +9 -0
- package/dist/admin/list-view.d.ts.map +1 -1
- package/dist/admin/list-view.js +109 -7
- package/dist/admin/list-view.js.map +1 -1
- package/dist/admin-client.js +1 -1
- package/dist/api/local-api.d.ts +14 -3
- package/dist/api/local-api.d.ts.map +1 -1
- package/dist/api/local-api.js +112 -7
- package/dist/api/local-api.js.map +1 -1
- package/dist/api/rest-api.d.ts +8 -1
- package/dist/api/rest-api.d.ts.map +1 -1
- package/dist/api/rest-api.js +76 -12
- package/dist/api/rest-api.js.map +1 -1
- package/dist/auth/auth-routes.d.ts.map +1 -1
- package/dist/auth/auth-routes.js +9 -3
- package/dist/auth/auth-routes.js.map +1 -1
- package/dist/auth/index.d.ts +3 -3
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +2 -2
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/middleware.d.ts +8 -0
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +38 -0
- package/dist/auth/middleware.js.map +1 -1
- package/dist/auth/session.d.ts +10 -3
- package/dist/auth/session.d.ts.map +1 -1
- package/dist/auth/session.js +18 -6
- package/dist/auth/session.js.map +1 -1
- package/dist/config/cms-config.d.ts +12 -0
- package/dist/config/cms-config.d.ts.map +1 -1
- package/dist/config/cms-config.js +13 -3
- package/dist/config/cms-config.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/db/migration-generator.d.ts +3 -3
- package/dist/db/migration-generator.d.ts.map +1 -1
- package/dist/db/migration-generator.js +27 -9
- package/dist/db/migration-generator.js.map +1 -1
- package/dist/db/query-builder.d.ts +3 -1
- package/dist/db/query-builder.d.ts.map +1 -1
- package/dist/db/query-builder.js +54 -14
- package/dist/db/query-builder.js.map +1 -1
- package/dist/db/sql-sanitize.d.ts.map +1 -1
- package/dist/db/sql-sanitize.js +5 -1
- package/dist/db/sql-sanitize.js.map +1 -1
- package/dist/hooks/hook-types.d.ts +5 -1
- package/dist/hooks/hook-types.d.ts.map +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/media/image-processor.d.ts +17 -0
- package/dist/media/image-processor.d.ts.map +1 -0
- package/dist/media/image-processor.js +90 -0
- package/dist/media/image-processor.js.map +1 -0
- package/dist/media/index.d.ts +8 -3
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +4 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/media-config.d.ts +14 -0
- package/dist/media/media-config.d.ts.map +1 -1
- package/dist/media/media-config.js +8 -1
- package/dist/media/media-config.js.map +1 -1
- package/dist/media/serve-handler.d.ts +3 -1
- package/dist/media/serve-handler.d.ts.map +1 -1
- package/dist/media/serve-handler.js +39 -17
- package/dist/media/serve-handler.js.map +1 -1
- package/dist/media/storage-adapter.d.ts +10 -0
- package/dist/media/storage-adapter.d.ts.map +1 -0
- package/dist/media/storage-adapter.js +46 -0
- package/dist/media/storage-adapter.js.map +1 -0
- package/dist/media/upload-handler.d.ts +13 -1
- package/dist/media/upload-handler.d.ts.map +1 -1
- package/dist/media/upload-handler.js +140 -30
- package/dist/media/upload-handler.js.map +1 -1
- package/dist/scheduler.d.ts +7 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +14 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/schema/collection.d.ts +9 -1
- package/dist/schema/collection.d.ts.map +1 -1
- package/dist/schema/collection.js.map +1 -1
- package/dist/schema/index.d.ts +2 -2
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/types.d.ts +5 -0
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +4 -0
- package/dist/schema/types.js.map +1 -1
- package/dist/validation/index.d.ts +1 -1
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +1 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/zod-generator.d.ts +4 -0
- package/dist/validation/zod-generator.d.ts.map +1 -1
- package/dist/validation/zod-generator.js +12 -1
- package/dist/validation/zod-generator.js.map +1 -1
- package/package.json +5 -4
package/dist/admin-client.js
CHANGED
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
`);let l=a.length;if(!B(o)||r>=l){let c=o.getParent();o.remove(),c==null||c.getChildrenSize()!==0||ln(c)||c.remove(),r-=l+i,o=s}else{let c=o.getKey(),u=n.getEditorState().read(()=>{let h=Kn(c);return B(h)&&h.isSimpleText()?h.getTextContent():null}),d=l-r,f=a.slice(0,d);if(u!==null&&u!==a){let h=Ro(),g=o;if(o.isSimpleText())o.setTextContent(u);else{let p=Kt(u);o.replace(p),g=p}if(D(h)&&h.isCollapsed()){let p=h.anchor.offset;g.select(p,p)}}else if(o.isSimpleText()){let h=e.key===c,g=e.offset;g<r&&(g=l);let p=h?g-r:0,m=h?g:d;if(h&&p===0){let[x]=o.splitText(p,m);x.remove()}else{let[,x]=o.splitText(p,m);x.remove()}}else{let h=Kt(f);o.replace(h)}r=0}}}function Hm(n){let e=n.getStyle(),t=df(e);_s.set(e,t)}function ms(n,e){(D(n)?n.isCollapsed():B(n)||$(n))||Ia(280);let t=xs(D(n)?n.style:B(n)?n.getStyle():n.getTextStyle()),o=Object.entries(e).reduce((s,[i,a])=>(typeof a=="function"?s[i]=a(t[i],n):a===null?delete s[i]:s[i]=a,s),{...t}),r=ff(o);D(n)||B(n)?n.setStyle(r):n.setTextStyle(r),_s.set(r,o)}function Ym(n,e){if(D(n)&&n.isCollapsed()){ms(n,e);let o=n.anchor.getNode();$(o)&&o.isEmpty()&&ms(o,e)}hf(o=>{ms(o,e)});let t=n.getNodes();if(t.length>0){let o=new Set;for(let r of t){if(!$(r)||!r.canBeEmpty()||r.getChildrenSize()!==0)continue;let s=r.getKey();o.has(s)||(o.add(s),ms(r,e))}}}function hf(n){let e=R();if(!e)return;let t=new Map,o=s=>t.get(s.getKey())||[0,s.getTextContentSize()];if(D(e))for(let s of rd(e).getTextSlices())s&&t.set(s.caret.origin.getKey(),s.getSliceIndices());let r=e.getNodes();for(let s of r){if(!B(s)||!s.canHaveFormat())continue;let[i,a]=o(s);a!==i&&(Ta(s)||i===0&&a===s.getTextContentSize()?n(s):n(s.splitText(i,a)[i===0?0:1]))}D(e)&&e.anchor.type==="text"&&e.focus.type==="text"&&e.anchor.key===e.focus.key&&pf(e)}function pf(n){if(n.isBackward()){let{anchor:e,focus:t}=n,{key:o,offset:r,type:s}=e;e.set(t.key,t.offset,t.type),t.set(o,r,s)}}function mf(n,e){let t=n.getFormatType(),o=n.getIndent();t!==e.getFormatType()&&e.setFormat(t),o!==e.getIndent()&&e.setIndent(o)}function Gm(n,e,t=mf){if(n===null)return;let o=n.getStartEndPoints(),r=new Map,s=null;if(o){let[i,a]=o;s=Fn(),s.anchor.set(i.key,i.offset,i.type),s.focus.set(a.key,a.offset,a.type);let l=Ct(i.getNode(),Ko),c=Ct(a.getNode(),Ko);$(l)&&r.set(l.getKey(),l),$(c)&&r.set(c.getKey(),c)}for(let i of n.getNodes())if($(i)&&Ko(i))r.set(i.getKey(),i);else if(o===null){let a=Ct(i,Ko);$(a)&&r.set(a.getKey(),a)}for(let[i,a]of r){let l=e();t(a,l),a.replace(l,!0),s&&(i===s.anchor.key&&s.anchor.set(l.getKey(),s.anchor.offset,s.anchor.type),i===s.focus.key&&s.focus.set(l.getKey(),s.focus.offset,s.focus.type))}s&&n.is(R())&&Ge(s)}function uf(n){return n.getNode().isAttached()}function jm(n){let e=n;for(;e!==null&&!$e(e);){let t=e.getLatest(),o=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=o}}function Jm(n,e,t=null){let o=n.getStartEndPoints(),r=o?o[0]:null,s=n.getNodes(),i=s.length;if(r!==null&&(i===0||i===1&&r.type==="element"&&r.getNode().getChildrenSize()===0)){let c=r.type==="text"?r.getNode().getParentOrThrow():r.getNode(),u=c.getChildren(),d=e();return d.setFormat(c.getFormatType()),d.setIndent(c.getIndent()),u.forEach(f=>d.append(f)),t&&(d=t.append(d)),void c.replace(d)}let a=null,l=[];for(let c=0;c<i;c++){let u=s[c];$e(u)?(ka(n,l,l.length,e,t),l=[],a=u):a===null||a!==null&&hd(u,a)?l.push(u):(ka(n,l,l.length,e,t),l=[u])}ka(n,l,l.length,e,t)}function ka(n,e,t,o,r=null){if(e.length===0)return;let s=e[0],i=new Map,a=[],l=$(s)?s:s.getParentOrThrow();l.isInline()&&(l=l.getParentOrThrow());let c=!1;for(;l!==null;){let g=l.getPreviousSibling();if(g!==null){l=g,c=!0;break}if(l=l.getParentOrThrow(),$e(l))break}let u=new Set;for(let g=0;g<t;g++){let p=e[g];$(p)&&p.getChildrenSize()===0&&u.add(p.getKey())}let d=new Set;for(let g=0;g<t;g++){let p=e[g],m=p.getParent();if(m!==null&&m.isInline()&&(m=m.getParent()),m!==null&&Io(p)&&!d.has(p.getKey())){let x=m.getKey();if(i.get(x)===void 0){let y=o();y.setFormat(m.getFormatType()),y.setIndent(m.getIndent()),a.push(y),i.set(x,y),m.getChildren().forEach(N=>{y.append(N),d.add(N.getKey()),$(N)&&N.getChildrenKeys().forEach(T=>d.add(T))}),jm(m)}}else if(u.has(p.getKey())){$(p)||Ia(179);let x=o();x.setFormat(p.getFormatType()),x.setIndent(p.getIndent()),a.push(x),p.remove(!0)}}if(r!==null)for(let g=0;g<a.length;g++){let p=a[g];r.append(p)}let f=null;if($e(l))if(c)if(r!==null)l.insertAfter(r);else for(let g=a.length-1;g>=0;g--){let p=a[g];l.insertAfter(p)}else{let g=l.getFirstChild();if($(g)&&(l=g),g===null)if(r)l.append(r);else for(let p=0;p<a.length;p++){let m=a[p];l.append(m),f=m}else if(r!==null)g.insertBefore(r);else for(let p=0;p<a.length;p++){let m=a[p];g.insertBefore(m),f=m}}else if(r)l.insertAfter(r);else for(let g=a.length-1;g>=0;g--){let p=a[g];l.insertAfter(p),f=p}let h=Ro();D(h)&&uf(h.anchor)&&uf(h.focus)?Ge(h.clone()):f!==null?f.selectEnd():n.dirty=!0}function _f(n){let e=xf(n);return e!==null&&e.writingMode==="vertical-rl"}function xf(n){let e=n.anchor.getNode();return $(e)?$a(e):La(e)}function Vm(n,e){let t=_f(n)?!e:e;Pa(n)&&(t=!t);let o=Ft(n.focus,t?"previous":"next");if(md(o))return!1;for(let r of cd(o)){if(ko(r))return!r.origin.isInline();if(!$(r.origin)){if(an(r.origin))return!0;break}}return!1}function yf(n,e,t,o){n.modify(e?"extend":"move",t,o)}function Pa(n){let e=xf(n);return e!==null&&e.direction==="rtl"}function qm(n,e,t){let o=Pa(n),r;r=_f(n)||o?!t:t,yf(n,e,r,"character")}function Xm(n,e,t){let o=xs(n.getStyle());return o!==null&&o[e]||t}function Qm(n,e,t=""){let o=null,r=n.getNodes(),s=n.anchor,i=n.focus,a=n.isBackward(),l=a?i.offset:s.offset,c=a?i.getNode():s.getNode();if(D(n)&&n.isCollapsed()&&n.style!==""){let u=xs(n.style);if(u!==null&&e in u)return u[e]}for(let u=0;u<r.length;u++){let d=r[u];if((u===0||l!==0||!d.is(c))&&B(d)){let f=Xm(d,e,t);if(o===null)o=f;else if(o!==f){o="";break}}}return o===null?t:o}var Zm=gf;var ee=wa,Nf=ee.$addNodeStyle,AN=ee.$cloneWithProperties,DN=ee.$copyBlockFormatIndent,bN=ee.$ensureForwardRangeSelection,RN=ee.$forEachSelectedTextNode,kN=ee.$getComputedStyleForElement,IN=ee.$getComputedStyleForParent,$N=ee.$getSelectionStyleValueForProperty,LN=ee.$isAtNodeEnd,PN=ee.$isParentElementRTL,Fa=ee.$isParentRTL,wN=ee.$moveCaretSelection,Ka=ee.$moveCharacter,FN=ee.$patchStyleText,KN=ee.$selectAll,Cf=ee.$setBlocksType,Ba=ee.$shouldOverrideDefaultCharacterSelection,ys=ee.$sliceSelectedTextNodeContent,BN=ee.$trimTextContentFromAnchor,WN=ee.$wrapNodes,UN=ee.createDOMRange,Sf=ee.createRectsFromDOMRange,zN=ee.getCSSFromStyleObject,Wa=ee.getStyleObjectFromCSS,HN=ee.trimTextContentFromAnchor;var Ya={};we(Ya,{$descendantsMatching:()=>P_,$dfs:()=>x_,$dfsIterator:()=>kf,$filter:()=>b_,$findMatchingParent:()=>Ct,$firstToLastIterator:()=>w_,$getAdjacentCaret:()=>y_,$getAdjacentSiblingOrParentSiblingCaret:()=>sn,$getDepth:()=>$f,$getNearestBlockElementAncestorOrThrow:()=>E_,$getNearestNodeOfType:()=>T_,$getNextRightPreorderNode:()=>S_,$getNextSiblingOrParentSibling:()=>C_,$handleIndentAndOutdent:()=>R_,$insertFirst:()=>k_,$insertNodeToNearestRoot:()=>v_,$insertNodeToNearestRootAtCaret:()=>Pf,$isEditorIsNestedEditor:()=>$_,$lastToFirstIterator:()=>Ha,$restoreEditorState:()=>M_,$reverseDfs:()=>N_,$reverseDfsIterator:()=>Lf,$splitNode:()=>Sd,$unwrapAndFilterDescendants:()=>L_,$unwrapNode:()=>F_,$wrapNodeInElement:()=>A_,CAN_USE_BEFORE_INPUT:()=>c_,CAN_USE_DOM:()=>Df,IS_ANDROID:()=>u_,IS_ANDROID_CHROME:()=>d_,IS_APPLE:()=>f_,IS_APPLE_WEBKIT:()=>g_,IS_CHROME:()=>h_,IS_FIREFOX:()=>bf,IS_IOS:()=>p_,IS_SAFARI:()=>m_,addClassNamesToElement:()=>Wo,calculateZoomLevel:()=>I_,isBlockDomNode:()=>nf,isHTMLAnchorElement:()=>rf,isHTMLElement:()=>hs,isInlineDomNode:()=>Uo,isMimeType:()=>Rf,makeStateWrapper:()=>K_,markSelection:()=>Af,mediaFileReader:()=>__,mergeRegister:()=>rt,objectKlassEquals:()=>D_,positionNodeOnRange:()=>vf,registerNestedElementResolver:()=>O_,removeClassNamesFromElement:()=>ps,selectionAlwaysOnDisplay:()=>l_});function Ns(n,...e){let t=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",n);for(let r of e)o.append("v",r);throw t.search=o.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var je=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,e_=je&&"documentMode"in document?document.documentMode:null,Of=je&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),t_=je&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),n_=!(!je||!("InputEvent"in window)||e_)&&"getTargetRanges"in new window.InputEvent("input"),o_=je&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),r_=je&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Mf=je&&/Android/.test(navigator.userAgent),za=je&&/^(?=.*Chrome).*/i.test(navigator.userAgent),s_=je&&Mf&&za,i_=je&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Of&&!za;function st(n){return`${n}px`}var a_={attributes:!0,characterData:!0,childList:!0,subtree:!0};function vf(n,e,t){let o=null,r=null,s=null,i=[],a=document.createElement("div");function l(){o===null&&Ns(182),r===null&&Ns(183);let{left:d,top:f}=r.getBoundingClientRect(),h=Sf(n,e);var g,p;a.isConnected||(p=a,(g=r).insertBefore(p,g.firstChild));let m=!1;for(let x=0;x<h.length;x++){let y=h[x],N=i[x]||document.createElement("div"),T=N.style;T.position!=="absolute"&&(T.position="absolute",m=!0);let O=st(y.left-d);T.left!==O&&(T.left=O,m=!0);let E=st(y.top-f);T.top!==E&&(N.style.top=E,m=!0);let A=st(y.width);T.width!==A&&(N.style.width=A,m=!0);let C=st(y.height);T.height!==C&&(N.style.height=C,m=!0),N.parentNode!==a&&(a.append(N),m=!0),i[x]=N}for(;i.length>h.length;)i.pop();m&&t(i)}function c(){r=null,o=null,s!==null&&s.disconnect(),s=null,a.remove();for(let d of i)d.remove();i=[]}a.style.position="relative";let u=n.registerRootListener(function d(){let f=n.getRootElement();if(f===null)return c();let h=f.parentElement;if(!hs(h))return c();c(),o=f,r=h,s=new MutationObserver(g=>{let p=n.getRootElement(),m=p&&p.parentElement;if(p!==o||m!==r)return d();for(let x of g)if(!a.contains(x.target))return l()}),s.observe(h,a_),l()});return()=>{u(),c()}}function Tf(n,e,t){if(n.type!=="text"&&$(e)){let o=e.getDOMSlot(t);return[o.element,o.getFirstChildOffset()+n.offset]}return[ef(t)||t,n.offset]}function Af(n,e){let t=null,o=null,r=null,s=null,i=null,a=null,l=()=>{};function c(u){u.read(()=>{let d=R();if(!D(d))return t=null,r=null,s=null,a=null,l(),void(l=()=>{});let[f,h]=(function(C){let S=C.getStartEndPoints();return C.isBackward()?[S[1],S[0]]:S})(d),g=f.getNode(),p=g.getKey(),m=f.offset,x=h.getNode(),y=x.getKey(),N=h.offset,T=n.getElementByKey(p),O=n.getElementByKey(y),E=t===null||T!==o||m!==r||p!==t.getKey(),A=s===null||O!==i||N!==a||y!==s.getKey();if((E||A)&&T!==null&&O!==null){let C=(function(S,k,F,j,Y,H,te){let ae=(S._window?S._window.document:document).createRange();return ae.setStart(...Tf(k,F,j)),ae.setEnd(...Tf(Y,H,te)),ae})(n,f,g,T,h,x,O);l(),l=vf(n,C,S=>{if(e===void 0)for(let k of S){let F=k.style;F.background!=="Highlight"&&(F.background="Highlight"),F.color!=="HighlightText"&&(F.color="HighlightText"),F.marginTop!==st(-1.5)&&(F.marginTop=st(-1.5)),F.paddingTop!==st(4)&&(F.paddingTop=st(4)),F.paddingBottom!==st(0)&&(F.paddingBottom=st(0))}else e(S)})}t=g,o=T,r=m,s=x,i=O,a=N})}return c(n.getEditorState()),rt(n.registerUpdateListener(({editorState:u})=>c(u)),()=>{l()})}function l_(n,e){let t=null,o=()=>{let r=getSelection(),s=r&&r.anchorNode,i=n.getRootElement();s!==null&&i!==null&&i.contains(s)?t!==null&&(t(),t=null):t===null&&(t=Af(n,e))};return document.addEventListener("selectionchange",o),()=>{t!==null&&t(),document.removeEventListener("selectionchange",o)}}var c_=n_,Df=je,u_=Mf,d_=s_,f_=Of,g_=i_,h_=za,bf=t_,p_=r_,m_=o_;function Rf(n,e){for(let t of e)if(n.type.startsWith(t))return!0;return!1}function __(n,e){let t=n[Symbol.iterator]();return new Promise((o,r)=>{let s=[],i=()=>{let{done:a,value:l}=t.next();if(a)return o(s);let c=new FileReader;c.addEventListener("error",r),c.addEventListener("load",()=>{let u=c.result;typeof u=="string"&&s.push({file:l,result:u}),i()}),Rf(l,e)?c.readAsDataURL(l):i()};i()})}function x_(n,e){return Array.from(kf(n,e))}function y_(n){return n?n.getAdjacentCaret():null}function N_(n,e){return Array.from(Lf(n,e))}function kf(n,e){return If("next",n,e)}function Ef(n,e){let t=sn(St(n,e));return t&&t[0]}function If(n,e,t){let o=Ce(),r=e||o,s=$(r)?De(r,n):St(r,n),i=$f(r),a=t?xa(Ca(St(t,n)))||Ef(t,n):Ef(r,n),l=i;return Da({hasNext:c=>c!==null,initial:s,map:c=>({depth:l,node:c.origin}),step:c=>{if(c.isSameNodeCaret(a))return null;ko(c)&&l++;let u=sn(c);return!u||u[0].isSameNodeCaret(a)?null:(l+=u[1],u[0])}})}function C_(n){let e=sn(St(n,"next"));return e&&[e[0].origin,e[1]]}function $f(n){let e=-1;for(let t=n;t!==null;t=t.getParent())e++;return e}function S_(n){let e=Ca(St(n,"previous")),t=sn(e,"root");return t&&t[0].origin}function Lf(n,e){return If("previous",n,e)}function T_(n,e){let t=n;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function E_(n){let e=Ct(n,t=>$(t)&&!t.isInline());return $(e)||Ns(4,n.__key),e}function O_(n,e,t,o){let r=s=>s instanceof e;return n.registerNodeTransform(e,s=>{let i=(a=>{let l=a.getChildren();for(let d=0;d<l.length;d++){let f=l[d];if(r(f))return null}let c=a,u=a;for(;c!==null;)if(u=c,c=c.getParent(),r(c))return{child:u,parent:c};return null})(s);if(i!==null){let{child:a,parent:l}=i;if(a.is(s)){o(l,s);let c=a.getNextSiblings(),u=c.length;if(l.insertAfter(a),u!==0){let d=t(l);a.insertAfter(d);for(let f=0;f<u;f++)d.append(c[f])}l.canBeEmpty()||l.getChildrenSize()!==0||l.remove()}}})}function M_(n,e){let t=new Map,o=n._pendingEditorState;for(let[s,i]of e._nodeMap)t.set(s,Br(i));o&&(o._nodeMap=t),n._dirtyType=2;let r=e._selection;Ge(r===null?null:r.clone())}function v_(n){let e=R()||Ro(),t;if(D(e))t=Ft(e.focus,"next");else{if(e!=null){let i=e.getNodes(),a=i[i.length-1];a&&(t=St(a,"next"))}t=t||De(Ce(),"previous").getFlipped().insert(se())}let o=Pf(n,t),r=xa(o),s=ko(r)?cn(r):o;return Nd(fd(s)),n.getLatest()}function Pf(n,e,t){let o=Na(e,"next");for(let r=o;r;r=Cd(r,t))o=r;return Yr(o)&&Ns(283),o.insert(n.isInline()?se().append(n):n),Na(St(n.getLatest(),"next"),e.direction)}function A_(n,e){let t=e();return n.replace(t),t.append(n),t}function D_(n,e){return n!==null&&Object.getPrototypeOf(n).constructor.name===e.name}function b_(n,e){let t=[];for(let o=0;o<n.length;o++){let r=e(n[o]);r!==null&&t.push(r)}return t}function R_(n){let e=R();if(!D(e))return!1;let t=new Set,o=e.getNodes();for(let r=0;r<o.length;r++){let s=o[r],i=s.getKey();if(t.has(i))continue;let a=Ct(s,c=>$(c)&&!c.isInline());if(a===null)continue;let l=a.getKey();a.canIndent()&&!t.has(l)&&(t.add(l),n(a))}return t.size>0}function k_(n,e){De(n,"next").insert(e)}var Ua=!(bf||!Df)&&void 0;function I_(n,e=!1){let t=1;if((function(){if(Ua===void 0){let o=document.createElement("div");o.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(o);let r=o.getBoundingClientRect();o.style.setProperty("zoom","2"),Ua=o.getBoundingClientRect().width===r.width,document.body.removeChild(o)}return Ua})()||e)for(;n;)t*=Number(window.getComputedStyle(n).getPropertyValue("zoom")),n=n.parentElement;return t}function $_(n){return n._parentEditor!==null}function L_(n,e){return wf(n,e,null)}function wf(n,e,t){let o=!1;for(let r of Ha(n))e(r)?t!==null&&t(r):(o=!0,$(r)&&wf(r,e,t||(s=>r.insertAfter(s))),r.remove());return o}function P_(n,e){let t=[],o=Array.from(n).reverse();for(let r=o.pop();r!==void 0;r=o.pop())if(e(r))t.push(r);else if($(r))for(let s of Ha(r))o.push(s);return t}function w_(n){return Ff(De(n,"next"))}function Ha(n){return Ff(De(n,"previous"))}function Ff(n){return Da({hasNext:xd,initial:n.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}function F_(n){Gr(St(n,"next")).splice(1,n.getChildren())}function K_(n){let e=o=>zr(o,n),t=(o,r)=>Jr(o,n,r);return{$get:e,$set:t,accessors:[e,t],makeGetterMethod:()=>function(){return e(this)},makeSetterMethod:()=>function(o){return t(this,o)},stateConfig:n}}var P=Ya,VN=P.$descendantsMatching,qN=P.$dfs,XN=P.$dfsIterator,QN=P.$filter,be=P.$findMatchingParent,ZN=P.$firstToLastIterator,eC=P.$getAdjacentCaret,tC=P.$getAdjacentSiblingOrParentSiblingCaret,nC=P.$getDepth,Cs=P.$getNearestBlockElementAncestorOrThrow,Kf=P.$getNearestNodeOfType,oC=P.$getNextRightPreorderNode,rC=P.$getNextSiblingOrParentSibling,Ho=P.$handleIndentAndOutdent,sC=P.$insertFirst,iC=P.$insertNodeToNearestRoot,Bf=P.$insertNodeToNearestRootAtCaret,aC=P.$isEditorIsNestedEditor,lC=P.$lastToFirstIterator,cC=P.$restoreEditorState,uC=P.$reverseDfs,dC=P.$reverseDfsIterator,fC=P.$splitNode,gC=P.$unwrapAndFilterDescendants,hC=P.$unwrapNode,pC=P.$wrapNodeInElement,mC=P.CAN_USE_BEFORE_INPUT,_C=P.CAN_USE_DOM,xC=P.IS_ANDROID,yC=P.IS_ANDROID_CHROME,NC=P.IS_APPLE,CC=P.IS_APPLE_WEBKIT,SC=P.IS_CHROME,TC=P.IS_FIREFOX,EC=P.IS_IOS,OC=P.IS_SAFARI,Ut=P.addClassNamesToElement,Wf=P.calculateZoomLevel,Ga=P.isBlockDomNode,Ss=P.isHTMLAnchorElement,Pe=P.isHTMLElement,MC=P.isInlineDomNode,vC=P.isMimeType,AC=P.makeStateWrapper,DC=P.markSelection,bC=P.mediaFileReader,Je=P.mergeRegister,Ve=P.objectKlassEquals,RC=P.positionNodeOnRange,kC=P.registerNestedElementResolver,ja=P.removeClassNamesFromElement,IC=P.selectionAlwaysOnDisplay;var Ja={};we(Ja,{$generateHtmlFromNodes:()=>W_,$generateNodesFromDOM:()=>B_});function B_(n,e){let t=of(e)?e.body.childNodes:e.childNodes,o=[],r=[];for(let s of t)if(!zf.has(s.nodeName)){let i=Hf(s,n,r,!1);i!==null&&(o=o.concat(i))}return(function(s){for(let i of s)i.getNextSibling()instanceof Ea&&i.insertAfter(_a());for(let i of s){let a=i.getChildren();for(let l of a)i.insertBefore(l);i.remove()}})(r),o}function W_(n,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let t=document.createElement("div"),o=Ce().getChildren();for(let r=0;r<o.length;r++)Uf(n,o[r],t,e);return t.innerHTML}function Uf(n,e,t,o=null){let r=o===null||e.isSelected(o),s=$(e)&&e.excludeFromCopy("html"),i=e;o!==null&&B(e)&&(i=ys(o,e,"clone"));let a=$(i)?i.getChildren():[],l=tf(n,i.getType()),c;c=l&&l.exportDOM!==void 0?l.exportDOM(n,i):i.exportDOM(n);let{element:u,after:d}=c;if(!u)return!1;let f=document.createDocumentFragment();for(let h=0;h<a.length;h++){let g=a[h],p=Uf(n,g,f,o);!r&&$(e)&&p&&e.extractWithChild(g,o,"html")&&(r=!0)}if(r&&!s){if((Pe(u)||Aa(u))&&u.append(f),t.append(u),d){let h=d.call(i,u);h&&(Aa(u)?u.replaceChildren(h):u.replaceWith(h))}}else t.append(f);return r}var zf=new Set(["STYLE","SCRIPT"]);function Hf(n,e,t,o,r=new Map,s){let i=[];if(zf.has(n.nodeName))return i;let a=null,l=(function(g,p){let{nodeName:m}=g,x=p._htmlConversions.get(m.toLowerCase()),y=null;if(x!==void 0)for(let N of x){let T=N(g);T!==null&&(y===null||(y.priority||0)<=(T.priority||0))&&(y=T)}return y!==null?y.conversion:null})(n,e),c=l?l(n):null,u=null;if(c!==null){u=c.after;let g=c.node;if(a=Array.isArray(g)?g[g.length-1]:g,a!==null){for(let[,p]of r)if(a=p(a,s),!a)break;a&&i.push(...Array.isArray(g)?g:[a])}c.forChild!=null&&r.set(n.nodeName,c.forChild)}let d=n.childNodes,f=[],h=(a==null||!$e(a))&&(a!=null&&Bn(a)||o);for(let g=0;g<d.length;g++)f.push(...Hf(d[g],e,t,h,new Map(r),a));return u!=null&&(f=u(f)),Ga(n)&&(f=U_(n,f,h?()=>{let g=new Ea;return t.push(g),g}:se)),a==null?f.length>0?i=i.concat(f):Ga(n)&&(function(g){return g.nextSibling==null||g.previousSibling==null?!1:Uo(g.nextSibling)&&Uo(g.previousSibling)})(n)&&(i=i.concat(_a())):$(a)&&a.append(...f),i}function U_(n,e,t){let o=n.style.textAlign,r=[],s=[];for(let i=0;i<e.length;i++){let a=e[i];if(Bn(a))o&&!a.getFormat()&&a.setFormat(o),r.push(a);else if(s.push(a),i===e.length-1||i<e.length-1&&Bn(e[i+1])){let l=t();l.setFormat(o),l.append(...s),r.push(l),s=[]}}return r}var Yf=Ja,Ts=Yf.$generateHtmlFromNodes,Es=Yf.$generateNodesFromDOM;var qa={};we(qa,{$generateJSONFromSelectedNodes:()=>qf,$generateNodesFromSerializedNodes:()=>Xf,$getClipboardDataFromSelection:()=>Zf,$getHtmlContent:()=>jf,$getLexicalContent:()=>Jf,$insertDataTransferForPlainText:()=>z_,$insertDataTransferForRichText:()=>H_,$insertGeneratedNodes:()=>Va,copyToClipboard:()=>Y_,setLexicalClipboardDataTransfer:()=>eg});function Os(n,...e){let t=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",n);for(let r of e)o.append("v",r);throw t.search=o.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function jf(n,e=R()){return e==null&&Os(166),D(e)&&e.isCollapsed()||e.getNodes().length===0?"":Ts(n,e)}function Jf(n,e=R()){return e==null&&Os(166),D(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(qf(n,e))}function z_(n,e){let t=n.getData("text/plain")||n.getData("text/uri-list");t!=null&&e.insertRawText(t)}function H_(n,e,t){let o=n.getData("application/x-lexical-editor");if(o)try{let a=JSON.parse(o);if(a.namespace===t._config.namespace&&Array.isArray(a.nodes))return Va(t,Xf(a.nodes),e)}catch(a){console.error(a)}let r=n.getData("text/html"),s=n.getData("text/plain");if(r&&s!==r)try{let a=new DOMParser().parseFromString((function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(l):l})(r),"text/html");return Va(t,Es(t,a),e)}catch(a){console.error(a)}let i=s||n.getData("text/uri-list");if(i!=null)if(D(e)){let a=i.split(/(\r?\n|\t)/);a[a.length-1]===""&&a.pop();for(let l=0;l<a.length;l++){let c=R();if(D(c)){let u=a[l];u===`
|
|
14
14
|
`||u===`\r
|
|
15
15
|
`?c.insertParagraph():u===" "?c.insertNodes([Wr()]):c.insertText(u)}}}else e.insertRawText(i)}function Va(n,e,t){n.dispatchCommand(Yd,{nodes:e,selection:t})||(t.insertNodes(e),(function(o){if(D(o)&&o.isCollapsed()){let r=o.anchor,s=null,i=Ft(r,"previous");if(i)if(Yr(i))s=i.origin;else{let a=ud(i,De(Ce(),"next").getFlipped());for(let l of a){if(B(l.origin)){s=l.origin;break}if($(l.origin)&&!l.origin.isInline())break}}if(s&&B(s)){let a=s.getFormat(),l=s.getStyle();o.format===a&&o.style===l||(o.format=a,o.style=l,o.dirty=!0)}}})(t))}function Vf(n,e,t,o=[]){let r=e===null||t.isSelected(e),s=$(t)&&t.excludeFromCopy("html"),i=t;e!==null&&B(i)&&(i=ys(e,i,"clone"));let a=$(i)?i.getChildren():[],l=(function(c){let u=c.exportJSON(),d=c.constructor;if(u.type!==d.getType()&&Os(58,d.name),$(c)){let f=u.children;Array.isArray(f)||Os(59,d.name)}return u})(i);B(i)&&i.getTextContentSize()===0&&(r=!1);for(let c=0;c<a.length;c++){let u=a[c],d=Vf(n,e,u,l.children);!r&&$(t)&&d&&t.extractWithChild(u,e,"clone")&&(r=!0)}if(r&&!s)o.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){let u=l.children[c];o.push(u)}return r}function qf(n,e){let t=[],o=Ce().getChildren();for(let r=0;r<o.length;r++)Vf(n,e,o[r],t);return{namespace:n._config.namespace,nodes:t}}function Xf(n){let e=[];for(let t=0;t<n.length;t++){let o=n[t],r=yd(o);B(r)&&Nf(r),e.push(r)}return e}var zn=null;async function Y_(n,e,t){if(zn!==null)return!1;if(e!==null)return new Promise((c,u)=>{n.update(()=>{c(Gf(n,e,t))})});let o=n.getRootElement(),r=n._window||window,s=r.document,i=va(r);if(o===null||i===null)return!1;let a=s.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(s.createTextNode("#")),o.append(a);let l=new Range;return l.setStart(a,0),l.setEnd(a,1),i.removeAllRanges(),i.addRange(l),new Promise((c,u)=>{let d=n.registerCommand(Qr,f=>(Ve(f,ClipboardEvent)&&(d(),zn!==null&&(r.clearTimeout(zn),zn=null),c(Gf(n,f,t))),!0),Xr);zn=r.setTimeout(()=>{d(),zn=null,c(!1)},50),s.execCommand("copy"),a.remove()})}function Gf(n,e,t){if(t===void 0){let r=va(n._window),s=R();if(!s||s.isCollapsed()||!r)return!1;let i=r.anchorNode,a=r.focusNode;if(i!==null&&a!==null&&!af(n,i,a))return!1;t=Zf(s)}e.preventDefault();let o=e.clipboardData;return o!==null&&(eg(o,t),!0)}var Qf=[["text/html",jf],["application/x-lexical-editor",Jf]];function Zf(n=R()){let e={"text/plain":n?n.getTextContent():""};if(n){let t=Ur();for(let[o,r]of Qf){let s=r(t,n);s!==null&&(e[o]=s)}}return e}function eg(n,e){for(let[t]of Qf)e[t]===void 0&&n.setData(t,"");for(let t in e){let o=e[t];o!==void 0&&n.setData(t,o)}}var it=qa,zC=it.$generateJSONFromSelectedNodes,HC=it.$generateNodesFromSerializedNodes,YC=it.$getClipboardDataFromSelection,GC=it.$getHtmlContent,jC=it.$getLexicalContent,JC=it.$insertDataTransferForPlainText,Xa=it.$insertDataTransferForRichText,VC=it.$insertGeneratedNodes,Qa=it.copyToClipboard,qC=it.setLexicalClipboardDataTransfer;var gl={};we(gl,{$createHorizontalRuleNode:()=>fl,$isDecoratorTextNode:()=>hg,$isHorizontalRuleNode:()=>Ng,AutoFocusExtension:()=>J_,ClearEditorExtension:()=>V_,DecoratorTextExtension:()=>tx,DecoratorTextNode:()=>jo,EditorStateExtension:()=>Ds,HorizontalRuleExtension:()=>fx,HorizontalRuleNode:()=>dn,INSERT_HORIZONTAL_RULE_COMMAND:()=>ux,InitialStateExtension:()=>xg,LexicalBuilder:()=>jn,NodeSelectionExtension:()=>ll,TabIndentationExtension:()=>gx,applyFormatFromStyle:()=>X_,applyFormatToDom:()=>Q_,batch:()=>ig,buildEditorFromExtensions:()=>sx,computed:()=>cg,configExtension:()=>ds,declarePeerDependency:()=>Zd,defineExtension:()=>Z,effect:()=>Ht,getExtensionDependencyFromEditor:()=>ax,getKnownTypesAndNodes:()=>q_,getPeerDependencyFromEditor:()=>yg,getPeerDependencyFromEditorOrThrow:()=>lx,namedSignals:()=>Rs,registerClearEditor:()=>fg,registerTabIndentation:()=>Sg,safeCast:()=>ye,shallowMergeConfig:()=>Wt,signal:()=>Gn,untracked:()=>rl,watchedSignal:()=>ul});var G_=Symbol.for("preact-signals");function bs(){if(zt>1)return void zt--;let n,e=!1;for(;Go!==void 0;){let t=Go;for(Go=void 0,sl++;t!==void 0;){let o=t.o;if(t.o=void 0,t.f&=-3,!(8&t.f)&&ag(t))try{t.c()}catch(r){e||(n=r,e=!0)}t=o}}if(sl=0,zt--,e)throw n}function ig(n){if(zt>0)return n();zt++;try{return n()}finally{bs()}}var V,Go;function rl(n){let e=V;V=void 0;try{return n()}finally{V=e}}var zt=0,sl=0,As=0;function tg(n){if(V===void 0)return;let e=n.n;return e===void 0||e.t!==V?(e={i:0,S:n,p:V.s,n:void 0,t:V,e:void 0,x:void 0,r:e},V.s!==void 0&&(V.s.n=e),V.s=e,n.n=e,32&V.f&&n.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=V.s,e.n=void 0,V.s.n=e,V.s=e),e):void 0}function Se(n,e){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function Gn(n,e){return new Se(n,e)}function ag(n){for(let e=n.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function ng(n){for(let e=n.s;e!==void 0;e=e.n){let t=e.S.n;if(t!==void 0&&(e.r=t),e.S.n=e,e.i=-1,e.n===void 0){n.s=e;break}}}function lg(n){let e,t=n.s;for(;t!==void 0;){let o=t.p;t.i===-1?(t.S.U(t),o!==void 0&&(o.n=t.n),t.n!==void 0&&(t.n.p=o)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=o}n.s=e}function un(n,e){Se.call(this,void 0),this.x=n,this.s=void 0,this.g=As-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function cg(n,e){return new un(n,e)}function ug(n){let e=n.u;if(n.u=void 0,typeof e=="function"){zt++;let t=V;V=void 0;try{e()}catch(o){throw n.f&=-2,n.f|=8,cl(n),o}finally{V=t,bs()}}}function cl(n){for(let e=n.s;e!==void 0;e=e.n)e.S.U(e);n.x=void 0,n.s=void 0,ug(n)}function j_(n){if(V!==this)throw new Error("Out-of-order effect");lg(this),V=n,this.f&=-2,8&this.f&&cl(this),bs()}function Yn(n,e){this.x=n,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}function Ht(n,e){let t=new Yn(n,e);try{t.c()}catch(r){throw t.d(),r}let o=t.d.bind(t);return o[Symbol.dispose]=o,o}function Rs(n,e={}){let t={};for(let o in n){let r=e[o],s=Gn(r===void 0?n[o]:r);t[o]=s}return t}Se.prototype.brand=G_,Se.prototype.h=function(){return!0},Se.prototype.S=function(n){let e=this.t;e!==n&&n.e===void 0&&(n.x=e,this.t=n,e!==void 0?e.e=n:rl(()=>{var t;(t=this.W)==null||t.call(this)}))},Se.prototype.U=function(n){if(this.t!==void 0){let e=n.e,t=n.x;e!==void 0&&(e.x=t,n.e=void 0),t!==void 0&&(t.e=e,n.x=void 0),n===this.t&&(this.t=t,t===void 0&&rl(()=>{var o;(o=this.Z)==null||o.call(this)}))}},Se.prototype.subscribe=function(n){return Ht(()=>{let e=this.value,t=V;V=void 0;try{n(e)}finally{V=t}},{name:"sub"})},Se.prototype.valueOf=function(){return this.value},Se.prototype.toString=function(){return this.value+""},Se.prototype.toJSON=function(){return this.value},Se.prototype.peek=function(){let n=V;V=void 0;try{return this.value}finally{V=n}},Object.defineProperty(Se.prototype,"value",{get(){let n=tg(this);return n!==void 0&&(n.i=this.i),this.v},set(n){if(n!==this.v){if(sl>100)throw new Error("Cycle detected");this.v=n,this.i++,As++,zt++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{bs()}}}}),un.prototype=new Se,un.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===As))return!0;if(this.g=As,this.f|=1,this.i>0&&!ag(this))return this.f&=-2,!0;let n=V;try{ng(this),V=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return V=n,lg(this),this.f&=-2,!0},un.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}Se.prototype.S.call(this,n)},un.prototype.U=function(n){if(this.t!==void 0&&(Se.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},un.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let n=this.t;n!==void 0;n=n.x)n.t.N()}},Object.defineProperty(un.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");let n=tg(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}}),Yn.prototype.c=function(){let n=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e=="function"&&(this.u=e)}finally{n()}},Yn.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ug(this),ng(this),zt++;let n=V;return V=this,j_.bind(this,n)},Yn.prototype.N=function(){2&this.f||(this.f|=2,this.o=Go,Go=this)},Yn.prototype.d=function(){this.f|=8,1&this.f||cl(this)},Yn.prototype.dispose=function(){this.d()};var J_=Z({build:(n,e,t)=>Rs(e),config:ye({defaultSelection:"rootEnd",disabled:!1}),name:"@lexical/extension/AutoFocus",register(n,e,t){let o=t.getOutput();return Ht(()=>o.disabled.value?void 0:n.registerRootListener(r=>{n.focus(()=>{let s=document.activeElement;r===null||s!==null&&r.contains(s)||r.focus({preventScroll:!0})},{defaultSelection:o.defaultSelection.peek()})}))}});function dg(){let n=Ce(),e=R(),t=se();n.clear(),n.append(t),e!==null&&t.select(),D(e)&&(e.format=0)}function fg(n,e=dg){return n.registerCommand(Vr,t=>(n.update(e),!0),W)}var V_=Z({build:(n,e,t)=>Rs(e),config:ye({$onClear:dg}),name:"@lexical/extension/ClearEditor",register(n,e,t){let{$onClear:o}=t.getOutput();return Ht(()=>fg(n,o.value))}});function q_(n){let e=new Set,t=new Set;for(let o of gg(n)){let r=typeof o=="function"?o:o.replace;e.add(r.getType()),t.add(r)}return{nodes:t,types:e}}function gg(n){return(typeof n.nodes=="function"?n.nodes():n.nodes)||[]}var Za=Qd("format",{parse:n=>typeof n=="number"?n:0}),jo=class extends es{$config(){return this.config("decorator-text",{extends:es,stateConfigs:[{flat:!0,stateConfig:Za}]})}getFormat(){return zr(this,Za)}getFormatFlags(e,t){return Ra(this.getFormat(),e,t)}hasFormat(e){let t=Vd[e];return(this.getFormat()&t)!==0}setFormat(e){return Jr(this,Za,e)}toggleFormat(e){let t=this.getFormat(),o=Ra(t,e,null);return this.setFormat(o)}isInline(){return!0}createDOM(){return document.createElement("span")}updateDOM(){return!1}};function hg(n){return n instanceof jo}function X_(n,e,t){let o=e.fontWeight,r=e.textDecoration.split(" "),s=o==="700"||o==="bold",i=r.includes("line-through"),a=e.fontStyle==="italic",l=r.includes("underline"),c=e.verticalAlign;return s&&!n.hasFormat("bold")&&n.toggleFormat("bold"),i&&!n.hasFormat("strikethrough")&&n.toggleFormat("strikethrough"),a&&!n.hasFormat("italic")&&n.toggleFormat("italic"),l&&!n.hasFormat("underline")&&n.toggleFormat("underline"),c!=="sub"||n.hasFormat("subscript")||n.toggleFormat("subscript"),c!=="super"||n.hasFormat("superscript")||n.toggleFormat("superscript"),t&&!n.hasFormat(t)&&n.toggleFormat(t),n}function Q_(n,e,t=ex){for(let[o,r]of Object.entries(t))n.hasFormat(r)&&(e=Z_(e,o));return e}function Z_(n,e){let t=document.createElement(e);return t.appendChild(n),t}var ex={b:"bold",code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"},tx=Z({name:"@lexical/extension/DecoratorText",nodes:()=>[jo],register:(n,e,t)=>n.registerCommand(Tt,o=>{let r=R();if(he(r)||D(r))for(let s of r.getNodes())hg(s)&&s.toggleFormat(o);return!1},ie)});function ul(n,e){let t;return Gn(n(),{unwatched(){t&&(t(),t=void 0)},watched(){this.value=n(),t=e(this)}})}var Ds=Z({build:n=>ul(()=>n.getEditorState(),e=>n.registerUpdateListener(t=>{e.value=t.editorState})),name:"@lexical/extension/EditorState"});function q(n,...e){let t=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",n);for(let r of e)o.append("v",r);throw t.search=o.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function pg(n,e){if(n&&e&&!Array.isArray(e)&&typeof n=="object"&&typeof e=="object"){let t=n,o=e;for(let r in o)t[r]=pg(t[r],o[r]);return n}return e}var dl=0,il=1,mg=2,el=3,Ms=4,Hn=5,tl=6,Yo=7;function nl(n){return n.id===dl}function _g(n){return n.id===mg}function nx(n){return(function(e){return e.id===il})(n)||q(305,String(n.id),String(il)),Object.assign(n,{id:mg})}var ox=new Set,al=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:dl}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Wt;for(let o of this.configs)e=t(e,o);return e}init(e){let t=this.state;_g(t)||q(306,String(t.id));let o={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...o,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},s=(function(a,l,c){return Object.assign(a,{config:l,id:el,registerState:c})})(t,this.mergeConfigs(),o),i;this.state=s,this.extension.init&&(i=this.extension.init(e,s.config,o)),this.state=(function(a,l,c){return Object.assign(a,{id:Ms,initResult:l,registerState:c})})(s,i,r)}build(e){let t=this.state,o;t.id!==Ms&&q(307,String(t.id),String(Hn)),this.extension.build&&(o=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>o,getSignal:this.getSignal.bind(this)};this.state=(function(s,i,a){return Object.assign(s,{id:Hn,output:i,registerState:a})})(t,o,r)}register(e,t){this._signal=t;let o=this.state;o.id!==Hn&&q(308,String(o.id),String(Hn));let r=this.extension.register&&this.extension.register(e,o.config,o.registerState);return this.state=(function(s){return Object.assign(s,{id:tl})})(o),()=>{let s=this.state;s.id!==Yo&&q(309,String(o.id),String(Yo)),this.state=(function(i){return Object.assign(i,{id:Hn})})(s),r&&r()}}afterRegistration(e){let t=this.state,o;return t.id!==tl&&q(310,String(t.id),String(tl)),this.extension.afterRegistration&&(o=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=(function(r){return Object.assign(r,{id:Yo})})(t),o}getSignal(){return this._signal===void 0&&q(311),this._signal}getInitResult(){this.extension.init===void 0&&q(312,this.extension.name);let e=this.state;return(function(t){return t.id>=Ms})(e)||q(313,String(e.id),String(Ms)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return(function(t){return t.id>=el})(e)||q(314,String(e.id),String(el)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&q(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&q(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return(function(t){return t.id>=Yo})(e)||q(316,String(e.id),String(Yo)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||ox}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([t])=>t)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(t){return t.id>=Hn})(e)||q(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},og={tag:ns};function rx(){let n=Ce();n.isEmpty()&&n.append(se())}var xg=Z({config:ye({setOptions:og,updateOptions:og}),init:({$initialEditorState:n=rx})=>({$initialEditorState:n,initialized:!1}),afterRegistration(n,{updateOptions:e,setOptions:t},o){let r=o.getInitResult();if(!r.initialized){r.initialized=!0;let{$initialEditorState:s}=r;if(pd(s))n.setEditorState(s,t);else if(typeof s=="function")n.update(()=>{s(n)},e);else if(s&&(typeof s=="string"||typeof s=="object")){let i=n.parseEditorState(s);n.setEditorState(i,t)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Hd,Wn,Kd,qd,Wd]}),rg=Symbol.for("@lexical/extension/LexicalBuilder");function sx(...n){return jn.fromExtensions(n).buildEditor()}function sg(){}function ix(n){throw n}function vs(n){return Array.isArray(n)?n:[n]}var ol="0.41.0+prod.esm",jn=class n{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=ol,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(e){let t=[vs(xg)];for(let o of e)t.push(vs(o));return new n(t)}static maybeFromEditor(e){let t=e[rg];return t&&(t.PACKAGE_VERSION!==ol&&q(292,t.PACKAGE_VERSION,ol),t instanceof n||q(293)),t}static fromEditor(e){let t=n.maybeFromEditor(e);return t===void 0&&q(294),t}constructEditor(){let{$initialEditorState:e,onError:t,...o}=this.buildCreateEditorArgs(),r=Object.assign(fs({...o,...t?{onError:s=>{t(s,r)}}:{}}),{[rg]:this});for(let s of this.sortedExtensionReps())s.build(r);return r}buildEditor(){let e=sg;function t(){try{e()}finally{e=sg}}let o=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=rt(this.registerEditor(o),()=>o.setRootElement(null)),o}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&q(295,e.name),t}addEdge(e,t,o){let r=this.outgoingConfigEdges.get(e);r?r.set(t,o):this.outgoingConfigEdges.set(e,new Map([[t,o]]));let s=this.incomingEdges.get(t);s?s.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&q(296);let t=vs(e),[o]=t;typeof o.name!="string"&&q(297,typeof o.name);let r=this.extensionNameMap.get(o.name);if(r!==void 0&&r.extension!==o&&q(298,o.name),!r){r=new al(this,o),this.extensionNameMap.set(o.name,r);let s=this.conflicts.get(o.name);typeof s=="string"&&q(299,o.name,s);for(let i of o.conflictsWith||[])this.extensionNameMap.has(i)&&q(299,o.name,i),this.conflicts.set(i,o.name);for(let i of o.dependencies||[]){let a=vs(i);this.addEdge(o.name,a[0].name,a.slice(1)),this.addExtension(a)}for(let[i,a]of o.peerDependencies||[])this.addEdge(o.name,i,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(o,r)=>{let s=o.state;if(_g(s))return;let i=o.extension.name;var a;nl(s)||q(300,i,r||"[unknown]"),nl(a=s)||q(304,String(a.id),String(dl)),s=Object.assign(a,{id:il}),o.state=s;let l=this.outgoingConfigEdges.get(i);if(l)for(let c of l.keys()){let u=this.extensionNameMap.get(c);u&&t(u,i)}s=nx(s),o.state=s,e.push(o)};for(let o of this.extensionNameMap.values())nl(o.state)&&t(o);for(let o of e)for(let[r,s]of this.outgoingConfigEdges.get(o.extension.name)||[])if(s.length>0){let i=this.extensionNameMap.get(r);if(i)for(let a of s)i.configs.add(a)}for(let[o,...r]of this.roots)if(r.length>0){let s=this.extensionNameMap.get(o.name);s===void 0&&q(301,o.name);for(let i of r)s.configs.add(i)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),o=new AbortController,r=[()=>o.abort()],s=o.signal;for(let i of t){let a=i.register(e,s);a&&r.push(a)}for(let i of t){let a=i.afterRegistration(e);a&&r.push(a)}return rt(...r)}buildCreateEditorArgs(){let e={},t=new Set,o=new Map,r=new Map,s={},i={},a=this.sortedExtensionReps();for(let u of a){let{extension:d}=u;if(d.onError!==void 0&&(e.onError=d.onError),d.disableEvents!==void 0&&(e.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(e.parentEditor=d.parentEditor),d.editable!==void 0&&(e.editable=d.editable),d.namespace!==void 0&&(e.namespace=d.namespace),d.$initialEditorState!==void 0&&(e.$initialEditorState=d.$initialEditorState),d.nodes)for(let f of gg(d)){if(typeof f!="function"){let h=o.get(f.replace);h&&q(302,d.name,f.replace.name,h.extension.name),o.set(f.replace,u)}t.add(f)}if(d.html){if(d.html.export)for(let[f,h]of d.html.export.entries())r.set(f,h);d.html.import&&Object.assign(s,d.html.import)}d.theme&&pg(i,d.theme)}Object.keys(i).length>0&&(e.theme=i),t.size&&(e.nodes=[...t]);let l=Object.keys(s).length>0,c=r.size>0;(l||c)&&(e.html={},l&&(e.html.import=s),c&&(e.html.export=r));for(let u of a)u.init(e);return e.onError||(e.onError=ix),e}};function ax(n,e){let t=jn.fromEditor(n).getExtensionRep(e);return t===void 0&&q(303,e.name),t.getExtensionDependency()}function yg(n,e){let t=jn.fromEditor(n).extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}function lx(n,e){let t=yg(n,e);return t===void 0&&q(291,e),t}var cx=new Set,ll=Z({build(n,e,t){let o=t.getDependency(Ds).output,r=Gn({watchedNodeKeys:new Map}),s=ul(()=>{},()=>Ht(()=>{let i=s.peek(),{watchedNodeKeys:a}=r.value,l,c=!1;o.value.read(()=>{if(R())for(let[u,d]of a.entries()){if(d.size===0){a.delete(u);continue}let f=Kn(u),h=f&&f.isSelected()||!1;c=c||h!==(!!i&&i.has(u)),h&&(l=l||new Set,l.add(u))}}),!c&&l&&i&&l.size===i.size||(s.value=l)}));return{watchNodeKey:function(i){let a=cg(()=>(s.value||cx).has(i)),{watchedNodeKeys:l}=r.peek(),c=l.get(i),u=c!==void 0;return c=c||new Set,c.add(a),u||(l.set(i,c),r.value={watchedNodeKeys:l}),a}}},dependencies:[Ds],name:"@lexical/extension/NodeSelection"}),ux=Le("INSERT_HORIZONTAL_RULE_COMMAND"),dn=class n extends es{static getType(){return"horizontalrule"}static clone(e){return new n(e.__key)}static importJSON(e){return fl().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:dx,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){let t=document.createElement("hr");return Wo(t,e.theme.hr),t}getTextContent(){return`
|
|
16
|
-
`}isInline(){return!1}updateDOM(){return!1}};function dx(){return{node:fl()}}function fl(){return ad(dn)}function Ng(n){return n instanceof dn}var fx=Z({dependencies:[Ds,ll],name:"@lexical/extension/HorizontalRule",nodes:()=>[dn],register(n,e,t){let{watchNodeKey:o}=t.getDependency(ll).output,r=Gn({nodeSelections:new Map}),s=n._config.theme.hrSelected??"selected";return rt(n.registerCommand(qr,i=>{if(Un(i.target)){let a=gd(i.target);if(Ng(a))return(function(l,c=!1){let u=R(),d=l.isSelected(),f=l.getKey(),h;c&&he(u)?h=u:(h=ld(),Ge(h)),d?h.delete(f):h.add(f)})(a,i.shiftKey),!0}return!1},ie),n.registerMutationListener(dn,(i,a)=>{ig(()=>{let l=!1,{nodeSelections:c}=r.peek();for(let[u,d]of i.entries())if(d==="destroyed")c.delete(u),l=!0;else{let f=c.get(u),h=n.getElementByKey(u);f?f.domNode.value=h:(l=!0,c.set(u,{domNode:Gn(h),selectedSignal:o(u)}))}l&&(r.value={nodeSelections:c})})}),Ht(()=>{let i=[];for(let{domNode:a,selectedSignal:l}of r.value.nodeSelections.values())i.push(Ht(()=>{let c=a.value;c&&(l.value?Wo(c,s):ps(c,s))}));return rt(...i)}))}});function Cg(n){return n.canBeEmpty()}function Sg(n,e,t=Cg){return rt(n.registerCommand(cs,o=>{let r=R();if(!D(r))return!1;o.preventDefault();let s=(function(i){if(i.getNodes().filter(f=>Bn(f)&&f.canIndent()).length>0)return!0;let a=i.anchor,l=i.focus,c=l.isBefore(a)?l:a,u=c.getNode(),d=Cs(u);if(d.canIndent()){let f=d.getKey(),h=Fn();if(h.anchor.set(f,0,"element"),h.focus.set(f,0,"element"),h=Bt(h),h.anchor.is(c))return!0}return!1})(r)?o.shiftKey?Bo:wo:os;return n.dispatchCommand(s,void 0)},W),n.registerCommand(wo,()=>{let o=typeof e=="number"?e:e?e.peek():null,r=R();if(!D(r))return!1;let s=typeof t=="function"?t:t.peek();return Ho(i=>{if(s(i)){let a=i.getIndent()+1;(!o||a<o)&&i.setIndent(a)}})},Xr))}var gx=Z({build:(n,e,t)=>Rs(e),config:ye({$canIndent:Cg,disabled:!1,maxIndent:null}),name:"@lexical/extension/TabIndentation",register(n,e,t){let{disabled:o,maxIndent:r,$canIndent:s}=t.getOutput();return Ht(()=>{if(!o.value)return Sg(n,r,s)})}});var z=gl,tS=z.$createHorizontalRuleNode,nS=z.$isDecoratorTextNode,oS=z.$isHorizontalRuleNode,rS=z.AutoFocusExtension,sS=z.ClearEditorExtension,iS=z.DecoratorTextExtension,aS=z.DecoratorTextNode,lS=z.EditorStateExtension,cS=z.HorizontalRuleExtension,uS=z.HorizontalRuleNode,dS=z.INSERT_HORIZONTAL_RULE_COMMAND,fS=z.InitialStateExtension,gS=z.LexicalBuilder,hS=z.NodeSelectionExtension,pS=z.TabIndentationExtension,mS=z.applyFormatFromStyle,_S=z.applyFormatToDom,Tg=z.batch,xS=z.buildEditorFromExtensions,yS=z.computed,NS=z.configExtension,CS=z.declarePeerDependency,SS=z.defineExtension,qe=z.effect,TS=z.getExtensionDependencyFromEditor,ES=z.getKnownTypesAndNodes,Eg=z.getPeerDependencyFromEditor,OS=z.getPeerDependencyFromEditorOrThrow,Et=z.namedSignals,MS=z.registerClearEditor,vS=z.registerTabIndentation,AS=z.safeCast,DS=z.shallowMergeConfig,bS=z.signal,RS=z.untracked,kS=z.watchedSignal;var hl={};we(hl,{DragonExtension:()=>hx,registerDragonSupport:()=>Og});function Og(n){let e=window.location.origin,t=o=>{if(o.origin!==e)return;let r=n.getRootElement();if(document.activeElement!==r)return;let s=o.data;if(typeof s=="string"){let i;try{i=JSON.parse(s)}catch{return}if(i&&i.protocol==="nuanria_messaging"&&i.type==="request"){let a=i.payload;if(a&&a.functionId==="makeChanges"){let l=a.args;if(l){let[c,u,d,f,h]=l;n.update(()=>{let g=R();if(D(g)){let p=g.anchor,m=p.getNode(),x=0,y=0;if(B(m)&&c>=0&&u>=0&&(x=c,y=c+u,g.setTextNodeRange(m,x,m,y)),x===y&&d===""||(g.insertRawText(d),m=p.getNode()),B(m)){x=f,y=f+h;let N=m.getTextContentSize();x=x>N?N:x,y=y>N?N:y,g.setTextNodeRange(m,x,m,y)}o.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",t,!0),()=>{window.removeEventListener("message",t,!0)}}var hx=Z({build:(n,e,t)=>Et(e),config:ye({disabled:typeof window>"u"}),name:"@lexical/dragon",register:(n,e,t)=>qe(()=>t.getOutput().disabled.value?void 0:Og(n))});var Mg=hl,vg=Mg.DragonExtension,PS=Mg.registerDragonSupport;var xl={};we(xl,{$createHeadingNode:()=>Vn,$createQuoteNode:()=>_l,$isHeadingNode:()=>Tx,$isQuoteNode:()=>Cx,DRAG_DROP_PASTE:()=>ml,HeadingNode:()=>Xn,QuoteNode:()=>qn,RichTextExtension:()=>Ex,eventFiles:()=>Jo,registerRichText:()=>kg});function Ag(n,e){if(document.caretRangeFromPoint!==void 0){let t=document.caretRangeFromPoint(n,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(document.caretPositionFromPoint!=="undefined"){let t=document.caretPositionFromPoint(n,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}var fn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,px=fn&&"documentMode"in document?document.documentMode:null,mx=fn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),_x=!(!fn||!("InputEvent"in window)||px)&&"getTargetRanges"in new window.InputEvent("input"),xx=fn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Dg=fn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,yx=fn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Nx=fn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&mx&&!yx,ml=Le("DRAG_DROP_PASTE_FILE"),qn=class n extends ot{static getType(){return"quote"}static clone(e){return new n(e.__key)}createDOM(e){let t=document.createElement("blockquote");return Ut(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:Sx,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(Pe(t)){this.isEmpty()&&t.append(document.createElement("br"));let o=this.getFormatType();o&&(t.style.textAlign=o);let r=this.getDirection();r&&(t.dir=r)}return{element:t}}static importJSON(e){return _l().updateFromJSON(e)}insertNewAfter(e,t){let o=se(),r=this.getDirection();return o.setDirection(r),this.insertAfter(o,t),o}collapseAtStart(){let e=se();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function _l(){return Nt(new qn)}function Cx(n){return n instanceof qn}var Xn=class n extends ot{__tag;static getType(){return"heading"}static clone(e){return new n(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){let t=this.getWritable();return this.__tag=e,t}createDOM(e){let t=this.__tag,o=document.createElement(t),r=e.theme.heading;if(r!==void 0){let s=r[t];Ut(o,s)}return o}updateDOM(e,t,o){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:Jn,priority:0}),h2:e=>({conversion:Jn,priority:0}),h3:e=>({conversion:Jn,priority:0}),h4:e=>({conversion:Jn,priority:0}),h5:e=>({conversion:Jn,priority:0}),h6:e=>({conversion:Jn,priority:0}),p:e=>{let t=e.firstChild;return t!==null&&bg(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>bg(e)?{conversion:t=>({node:Vn("h1")}),priority:3}:null}}exportDOM(e){let{element:t}=super.exportDOM(e);if(Pe(t)){this.isEmpty()&&t.append(document.createElement("br"));let o=this.getFormatType();o&&(t.style.textAlign=o);let r=this.getDirection();r&&(t.dir=r)}return{element:t}}static importJSON(e){return Vn(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let o=e?e.anchor.offset:0,r=this.getLastDescendant(),s=!r||e&&e.anchor.key===r.getKey()&&o===r.getTextContentSize()||!e?se():Vn(this.getTag()),i=this.getDirection();if(s.setDirection(i),this.insertAfter(s,t),o===0&&!this.isEmpty()&&e){let a=se();a.select(),this.replace(a,!0)}return s}collapseAtStart(){let e=this.isEmpty()?se():Vn(this.getTag());return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}};function bg(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function Jn(n){let e=n.nodeName.toLowerCase(),t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Vn(e),n.style!==null&&(ba(n,t),t.setFormat(n.style.textAlign))),{node:t}}function Sx(n){let e=_l();return n.style!==null&&(e.setFormat(n.style.textAlign),ba(n,e)),{node:e}}function Vn(n="h1"){return Nt(new Xn(n))}function Tx(n){return n instanceof Xn}function Jo(n){let e=null;if(Ve(n,DragEvent)?e=n.dataTransfer:Ve(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];let t=e.types,o=t.includes("Files"),r=t.includes("text/html")||t.includes("text/plain");return[o,Array.from(e.files),r]}function Rg(n){let e=nt(n);return an(e)}function pl(n){for(let e of["lowercase","uppercase","capitalize"])n.hasFormat(e)&&n.toggleFormat(e)}function kg(n){return Je(n.registerCommand(qr,e=>{let t=R();return!!he(t)&&(t.clear(),!0)},W),n.registerCommand(Zr,e=>{let t=R();return D(t)?(t.deleteCharacter(e),!0):!!he(t)&&(t.deleteNodes(),!0)},W),n.registerCommand(Dd,e=>{let t=R();return!!D(t)&&(t.deleteWord(e),!0)},W),n.registerCommand(Ad,e=>{let t=R();return!!D(t)&&(t.deleteLine(e),!0)},W),n.registerCommand(Md,e=>{let t=R();if(typeof e=="string")t!==null&&t.insertText(e);else{if(t===null)return!1;let o=e.dataTransfer;if(o!=null)Xa(o,t,n);else if(D(t)){let r=e.data;return r&&t.insertText(r),!0}}return!0},W),n.registerCommand(zd,()=>{let e=R();return!!D(e)&&(e.removeText(),!0)},W),n.registerCommand(Tt,e=>{let t=R();return!!D(t)&&(t.formatText(e),!0)},W),n.registerCommand(Id,e=>{let t=R();if(!D(t)&&!he(t))return!1;let o=t.getNodes();for(let r of o){let s=be(r,i=>$(i)&&!i.isInline());s!==null&&s.setFormat(e)}return!0},W),n.registerCommand(Oa,e=>{let t=R();return!!D(t)&&(t.insertLineBreak(e),!0)},W),n.registerCommand(Fo,()=>{let e=R();return!!D(e)&&(e.insertParagraph(),!0)},W),n.registerCommand(os,()=>{let e=Wr(),t=R();return D(t)&&(e.setFormat(t.format),e.setStyle(t.style)),Hr([e]),!0},W),n.registerCommand(wo,()=>Ho(e=>{let t=e.getIndent();e.setIndent(t+1)}),W),n.registerCommand(Bo,()=>Ho(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),W),n.registerCommand(is,e=>{let t=R();if(he(t)){let o=t.getNodes();if(o.length>0)return e.preventDefault(),o[0].selectPrevious(),!0}else if(D(t)){let o=ya(t.focus,!0);if(!e.shiftKey&&an(o)&&!o.isIsolated()&&!o.isInline())return o.selectPrevious(),e.preventDefault(),!0}return!1},W),n.registerCommand(rs,e=>{let t=R();if(he(t)){let o=t.getNodes();if(o.length>0)return e.preventDefault(),o[0].selectNext(0,0),!0}else if(D(t)){if((function(r){let s=r.focus;return s.key==="root"&&s.offset===Ce().getChildrenSize()})(t))return e.preventDefault(),!0;let o=ya(t.focus,!1);if(!e.shiftKey&&an(o)&&!o.isIsolated()&&!o.isInline())return o.selectNext(),e.preventDefault(),!0}return!1},W),n.registerCommand(ss,e=>{let t=R();if(he(t)){let o=t.getNodes();if(o.length>0)return e.preventDefault(),Fa(o[0])?o[0].selectNext(0,0):o[0].selectPrevious(),!0}if(!D(t))return!1;if(Ba(t,!0)){let o=e.shiftKey;return e.preventDefault(),Ka(t,o,!0),!0}return!1},W),n.registerCommand(Ld,e=>{let t=R();if(he(t)){let r=t.getNodes();if(r.length>0)return e.preventDefault(),Fa(r[0])?r[0].selectPrevious():r[0].selectNext(0,0),!0}if(!D(t))return!1;let o=e.shiftKey;return!!Ba(t,!1)&&(e.preventDefault(),Ka(t,o,!1),!0)},W),n.registerCommand(Pd,e=>{if(Rg(e.target))return!1;let t=R();if(D(t)){if((function(o){if(!o.isCollapsed())return!1;let{anchor:r}=o;if(r.offset!==0)return!1;let s=r.getNode();if(ln(s))return!1;let i=Cs(s);return i.getIndent()>0&&(i.is(s)||s.is(i.getFirstDescendant()))})(t))return e.preventDefault(),n.dispatchCommand(Bo,void 0);if(Dg&&navigator.language==="ko-KR")return!1}else if(!he(t))return!1;return e.preventDefault(),n.dispatchCommand(Zr,!0)},W),n.registerCommand(wd,e=>{if(Rg(e.target))return!1;let t=R();return!(!D(t)&&!he(t))&&(e.preventDefault(),n.dispatchCommand(Zr,!1))},W),n.registerCommand(Fd,e=>{let t=R();if(!D(t))return!1;if(pl(t),e!==null){if((Dg||xx||Nx)&&_x)return!1;if(e.preventDefault(),e.shiftKey)return n.dispatchCommand(Oa,!1)}return n.dispatchCommand(Fo,void 0)},W),n.registerCommand(as,()=>{let e=R();return!!D(e)&&(n.blur(),!0)},W),n.registerCommand(kd,e=>{let[,t]=Jo(e);if(t.length>0){let r=Ag(e.clientX,e.clientY);if(r!==null){let{offset:s,node:i}=r,a=nt(i);if(a!==null){let l=Fn();if(B(a))l.anchor.set(a.getKey(),s,"text"),l.focus.set(a.getKey(),s,"text");else{let u=a.getParentOrThrow().getKey(),d=a.getIndexWithinParent()+1;l.anchor.set(u,d,"element"),l.focus.set(u,d,"element")}let c=Bt(l);Ge(c)}n.dispatchCommand(ml,t)}return e.preventDefault(),!0}let o=R();return!!D(o)},W),n.registerCommand(Rd,e=>{let[t]=Jo(e),o=R();return!(t&&!D(o))},W),n.registerCommand(bd,e=>{let[t]=Jo(e),o=R();if(t&&!D(o))return!1;let r=Ag(e.clientX,e.clientY);if(r!==null){let s=nt(r.node);an(s)&&e.preventDefault()}return!0},W),n.registerCommand(Gd,()=>(jr(),!0),W),n.registerCommand(Qr,e=>(Qa(n,Ve(e,ClipboardEvent)?e:null),!0),W),n.registerCommand(vd,e=>((async function(t,o){await Qa(o,Ve(t,ClipboardEvent)?t:null),o.update(()=>{let r=R();D(r)?r.removeText():he(r)&&r.getNodes().forEach(s=>s.remove())})})(e,n),!0),W),n.registerCommand(us,e=>{let[,t,o]=Jo(e);return t.length>0&&!o?(n.dispatchCommand(ml,t),!0):Un(e.target)&&sf(e.target)?!1:R()!==null&&((function(r,s){r.preventDefault(),s.update(()=>{let i=R(),a=Ve(r,InputEvent)||Ve(r,KeyboardEvent)?null:r.clipboardData;a!=null&&i!==null&&Xa(a,i,s)},{tag:Bd})})(e,n),!0)},W),n.registerCommand(ls,e=>{let t=R();return D(t)&&pl(t),!1},W),n.registerCommand(cs,e=>{let t=R();return D(t)&&pl(t),!1},W))}var Ex=Z({conflictsWith:["@lexical/plain-text"],dependencies:[vg],name:"@lexical/rich-text",nodes:()=>[Xn,qn],register:kg});var at=xl,Ig=at.$createHeadingNode,$g=at.$createQuoteNode,zS=at.$isHeadingNode,HS=at.$isQuoteNode,YS=at.DRAG_DROP_PASTE,Lg=at.HeadingNode,Pg=at.QuoteNode,GS=at.RichTextExtension,jS=at.eventFiles,wg=at.registerRichText;var Tl={};we(Tl,{$createListItemNode:()=>Re,$createListNode:()=>Oe,$getListDepth:()=>ks,$handleListInsertParagraph:()=>Jg,$insertList:()=>Vo,$isListItemNode:()=>U,$isListNode:()=>K,$removeList:()=>Sl,CheckListExtension:()=>kx,INSERT_CHECK_LIST_COMMAND:()=>Vg,INSERT_ORDERED_LIST_COMMAND:()=>Zg,INSERT_UNORDERED_LIST_COMMAND:()=>Qg,ListExtension:()=>oh,ListItemNode:()=>Gt,ListNode:()=>hn,REMOVE_LIST_COMMAND:()=>eh,UPDATE_LIST_START_COMMAND:()=>Xg,insertList:()=>bx,registerCheckList:()=>qg,registerList:()=>th,registerListStrictIndentTransform:()=>nh,removeList:()=>Rx});function Yt(n,...e){let t=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",n);for(let r of e)o.append("v",r);throw t.search=o.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ks(n){let e=1,t=n.getParent();for(;t!=null;){if(U(t)){let o=t.getParent();if(K(o)){e++,t=o.getParent();continue}Yt(40)}return e}return e}function yl(n){let e=n.getParent();K(e)||Yt(40);let t=e;for(;t!==null;)t=t.getParent(),K(t)&&(e=t);return e}function Yg(n){let e=[],t=n.getChildren().filter(U);for(let o=0;o<t.length;o++){let r=t[o],s=r.getFirstChild();K(s)?e=e.concat(Yg(s)):e.push(r)}return e}function lt(n){return U(n)&&K(n.getFirstChild())}function Fg(n){return Re().append(n)}function Gg(n,e){return U(n)&&(e.length===0||e.length===1&&n.is(e[0])&&n.getChildrenSize()===0)}function Vo(n){let e=R();if(e!==null){let t=e.getNodes();if(D(e)){let r=e.getStartEndPoints();r===null&&Yt(143);let[s]=r,i=s.getNode(),a=i.getParent();if($e(i)){let l=i.getFirstChild();if(l)t=l.selectStart().getNodes();else{let c=se();i.append(c),t=c.select().getNodes()}}else if(Gg(i,t)){let l=Oe(n);if($e(a)){i.replace(l);let c=Re();$(i)&&(c.setFormat(i.getFormatType()),c.setIndent(i.getIndent())),l.append(c)}else if(U(i)){let c=i.getParentOrThrow();gn(l,c.getChildren()),c.replace(l)}return}}let o=new Set;for(let r=0;r<t.length;r++){let s=t[r];if($(s)&&s.isEmpty()&&!U(s)&&!o.has(s.getKey())){Kg(s,n);continue}let i=Io(s)?s.getParent():U(s)&&s.isEmpty()?s:null;for(;i!=null;){let a=i.getKey();if(K(i)){if(!o.has(a)){let l=Oe(n);gn(l,i.getChildren()),i.replace(l),o.add(a)}break}{let l=i.getParent();if($e(l)&&!o.has(a)){o.add(a),Kg(i,n);break}i=l}}}}}function gn(n,e){n.splice(n.getChildrenSize(),0,e)}function Kg(n,e){if(K(n))return n;let t=n.getPreviousSibling(),o=n.getNextSibling(),r=Re(),s;if(gn(r,n.getChildren()),K(t)&&e===t.getListType())t.append(r),K(o)&&e===o.getListType()&&(gn(t,o.getChildren()),o.remove()),s=t;else if(K(o)&&e===o.getListType())o.getFirstChildOrThrow().insertBefore(r),s=o;else{let a=Oe(e);a.append(r),n.replace(a),s=a}r.setFormat(n.getFormatType()),r.setIndent(n.getIndent());let i=R();return D(i)&&(s.getKey()===i.anchor.key&&i.anchor.set(r.getKey(),i.anchor.offset,"element"),s.getKey()===i.focus.key&&i.focus.set(r.getKey(),i.focus.offset,"element")),n.remove(),s}function Cl(n,e){let t=n.getLastChild(),o=e.getFirstChild();t&&o&<(t)&<(o)&&(Cl(t.getFirstChild(),o.getFirstChild()),o.remove());let r=e.getChildren();r.length>0&&n.append(...r),e.remove()}function Sl(){let n=R();if(D(n)){let e=new Set,t=n.getNodes(),o=n.anchor.getNode();if(Gg(o,t))e.add(yl(o));else for(let r=0;r<t.length;r++){let s=t[r];if(Io(s)){let i=Kf(s,Gt);i!=null&&e.add(yl(i))}}for(let r of e){let s=r,i=Yg(r);for(let a of i){let l=se().setTextStyle(n.style).setTextFormat(n.format);gn(l,a.getChildren()),s.insertAfter(l),s=l,a.__key===n.anchor.key&&$o(n.anchor,cn(De(l,"next"))),a.__key===n.focus.key&&$o(n.focus,cn(De(l,"next"))),a.remove()}r.remove()}}}function jg(n){let e=n.getListType()!=="check",t=n.getStart();for(let o of n.getChildren())U(o)&&(o.getValue()!==t&&o.setValue(t),e&&o.getLatest().__checked!=null&&o.setChecked(void 0),K(o.getFirstChild())||t++)}function Ox(n){let e=new Set;if(lt(n)||e.has(n.getKey()))return;let t=n.getParent(),o=n.getNextSibling(),r=n.getPreviousSibling();if(lt(o)&<(r)){let s=r.getFirstChild();if(K(s)){s.append(n);let i=o.getFirstChild();K(i)&&(gn(s,i.getChildren()),o.remove(),e.add(o.getKey()))}}else if(lt(o)){let s=o.getFirstChild();if(K(s)){let i=s.getFirstChild();i!==null&&i.insertBefore(n)}}else if(lt(r)){let s=r.getFirstChild();K(s)&&s.append(n)}else if(K(t)){let s=Re().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()),i=Oe(t.getListType()).setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle());s.append(i),i.append(n),r?r.insertAfter(s):o?o.insertBefore(s):t.append(s)}}function Mx(n){if(lt(n))return;let e=n.getParent(),t=e?e.getParent():void 0;if(K(t?t.getParent():void 0)&&U(t)&&K(e)){let o=e?e.getFirstChild():void 0,r=e?e.getLastChild():void 0;if(n.is(o))t.insertBefore(n),e.isEmpty()&&t.remove();else if(n.is(r))t.insertAfter(n),e.isEmpty()&&t.remove();else{let s=e.getListType(),i=Re(),a=Oe(s);i.append(a),n.getPreviousSiblings().forEach(u=>a.append(u));let l=Re(),c=Oe(s);l.append(c),gn(c,n.getNextSiblings()),t.insertBefore(i),t.insertAfter(l),t.replace(n)}}}function Jg(n=!1){let e=R();if(!D(e)||!e.isCollapsed())return!1;let t=e.anchor.getNode(),o=null;if(U(t)&&t.getChildrenSize()===0)o=t;else if(B(t)){let c=t.getParent();U(c)&&c.getChildren().every(u=>B(u)&&u.getTextContent().trim()==="")&&(o=c)}if(o===null)return!1;let r=yl(o),s=o.getParent();K(s)||Yt(40);let i=s.getParent(),a;if($e(i))a=se(),r.insertAfter(a);else{if(!U(i))return!1;a=Re(),i.insertAfter(a)}a.setTextStyle(e.style).setTextFormat(e.format).select();let l=o.getNextSiblings();if(l.length>0){let c=n?(function(d,f){return d.getStart()+f.getIndexWithinParent()})(s,o):1,u=Oe(s.getListType(),c);if(U(a)){let d=Re();d.append(u),a.insertAfter(d)}else a.insertAfter(u);u.append(...l)}return(function(c){let u=c;for(;u.getNextSibling()==null&&u.getPreviousSibling()==null;){let d=u.getParent();if(d==null||!U(d)&&!K(d))break;u=d}u.remove()})(o),!0}var Gt=class extends ot{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{if(e.__checked==null)return;let t=e.getParent();K(t)&&t.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)},extends:ot,importDOM:Ma({li:()=>({conversion:vx,priority:0})})})}constructor(e=1,t=void 0,o){super(o),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){let t=document.createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,o){(function(i,a,l){let c=a.getParent();!K(c)||c.getListType()!=="check"||K(a.getFirstChild())?(i.removeAttribute("role"),i.removeAttribute("tabIndex"),i.removeAttribute("aria-checked")):(i.setAttribute("role","checkbox"),i.setAttribute("tabIndex","-1"),l&&a.__checked===l.__checked||i.setAttribute("aria-checked",a.getChecked()?"true":"false"))})(t,this,e),t.value=this.__value,(function(i,a,l){let c=[],u=[],d=a.list,f=d?d.listitem:void 0,h;if(d&&d.nested&&(h=d.nested.listitem),f!==void 0&&c.push(...zo(f)),d){let g=l.getParent(),p=K(g)&&g.getListType()==="check",m=l.getChecked();p&&!m||u.push(d.listitemUnchecked),p&&m||u.push(d.listitemChecked),p&&c.push(m?d.listitemChecked:d.listitemUnchecked)}if(h!==void 0){let g=zo(h);l.getChildren().some(p=>K(p))?c.push(...g):u.push(...g)}u.length>0&&ja(i,...u),c.length>0&&Ut(i,...c)})(t,o.theme,this);let r=e?e.__style:"",s=this.__style;r!==s&&(s===""?t.removeAttribute("style"):t.style.cssText=s),(function(i,a,l){let c=Wa(a.__textStyle);for(let u in c)i.style.setProperty(`--listitem-marker-${u}`,c[u]);if(l)for(let u in Wa(l.__textStyle))u in c||i.style.removeProperty(`--listitem-marker-${u}`)})(t,this,e)}updateDOM(e,t,o){let r=t;return this.updateListItemDOM(e,r,o),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config),o=this.getFormatType();o&&(t.style.textAlign=o);let r=this.getDirection();return r&&(t.dir=r),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){let o=e[t];if($(o)&&this.canMergeWith(o)){let r=o.getChildren();this.append(...r),o.remove()}else super.append(o)}return this}replace(e,t){if(U(e))return super.replace(e);this.setIndent(0);let o=this.getParentOrThrow();if(!K(o))return e;if(o.__first===this.getKey())o.insertBefore(e);else if(o.__last===this.getKey())o.insertAfter(e);else{let r=Oe(o.getListType()),s=this.getNextSibling();for(;s;){let i=s;s=s.getNextSibling(),r.append(i)}o.insertAfter(e),e.insertAfter(r)}return t&&($(e)||Yt(139),this.getChildren().forEach(r=>{e.append(r)})),this.remove(),o.getChildrenSize()===0&&o.remove(),e}insertAfter(e,t=!0){let o=this.getParentOrThrow();if(K(o)||Yt(39),U(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(o.insertAfter(e,t),r.length!==0){let s=Oe(o.getListType());r.forEach(i=>s.append(i)),e.insertAfter(s,t)}return e}remove(e){let t=this.getPreviousSibling(),o=this.getNextSibling();super.remove(e),t&&o&<(t)&<(o)&&(Cl(t.getFirstChild(),o.getFirstChild()),o.remove())}insertNewAfter(e,t=!0){let o=Re().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(o,t),o}collapseAtStart(e){let t=se();this.getChildren().forEach(i=>t.append(i));let o=this.getParentOrThrow(),r=o.getParentOrThrow(),s=U(r);if(o.getChildrenSize()===1)if(s)o.remove(),r.select();else{o.insertBefore(t),o.remove();let i=e.anchor,a=e.focus,l=t.getKey();i.type==="element"&&i.getNode().is(this)&&i.set(l,i.offset,"element"),a.type==="element"&&a.getNode().is(this)&&a.set(l,a.offset,"element")}else o.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e=this.getLatest(),t,o=this.getParent();return K(o)&&(t=o.getListType()),t==="check"?!!e.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),o=0;for(;U(t);)t=t.getParentOrThrow().getParentOrThrow(),o++;return o}setIndent(e){typeof e!="number"&&Yt(117),(e=Math.floor(e))>=0||Yt(199);let t=this.getIndent();for(;t!==e;)t<e?(Ox(this),t++):(Mx(this),t--);return this}canInsertAfter(e){return U(e)}canReplaceWith(e){return U(e)}canMergeWith(e){return U(e)||_d(e)}extractWithChild(e,t){if(!D(t))return!1;let o=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(o)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Oe("bullet")}canMergeWhenEmpty(){return!0}};function vx(n){if(n.classList.contains("task-list-item")){for(let t of n.children)if(t.tagName==="INPUT")return Bg(t)}if(n.classList.contains("joplin-checkbox")){for(let t of n.children)if(t.classList.contains("checkbox-wrapper")&&t.children.length>0&&t.children[0].tagName==="INPUT")return Bg(t.children[0])}let e=n.getAttribute("aria-checked");return{node:Re(e==="true"||e!=="false"&&void 0)}}function Bg(n){return n.getAttribute("type")!=="checkbox"?{node:null}:{node:Re(n.hasAttribute("checked"))}}function Re(n){return Nt(new Gt(void 0,n))}function U(n){return n instanceof Gt}var hn=class extends ot{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{(function(t){let o=t.getNextSibling();K(o)&&t.getListType()===o.getListType()&&Cl(t,o)})(e),jg(e)},extends:ot,importDOM:Ma({ol:()=>({conversion:Ug,priority:0}),ul:()=>({conversion:Ug,priority:0})})})}constructor(e="number",t=1,o){super(o);let r=Dx[e]||e;this.__listType=r,this.__tag=r==="number"?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag=e==="number"?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let o=this.__tag,r=document.createElement(o);return this.__start!==1&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,Wg(r,e.theme,this),r}updateDOM(e,t,o){return e.__tag!==this.__tag||e.__listType!==this.__listType||(Wg(t,o.theme,this),e.__start!==this.__start&&t.setAttribute("start",String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return Pe(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,o){let r=o;for(let s=0;s<o.length;s++){let i=o[s];U(i)||(r===o&&(r=[...o]),r[s]=Re().append(!$(i)||K(i)||i.isInline()?i:Kt(i.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return U(e)}};function Wg(n,e,t){let o=[],r=[],s=e.list;if(s!==void 0){let i=s[`${t.__tag}Depth`]||[],a=ks(t)-1,l=a%i.length,c=i[l],u=s[t.__tag],d,f=s.nested,h=s.checklist;if(f!==void 0&&f.list&&(d=f.list),u!==void 0&&o.push(u),h!==void 0&&t.__listType==="check"&&o.push(h),c!==void 0){o.push(...zo(c));for(let g=0;g<i.length;g++)g!==l&&r.push(t.__tag+g)}if(d!==void 0){let g=zo(d);a>1?o.push(...g):r.push(...g)}}r.length>0&&ja(n,...r),o.length>0&&Ut(n,...o)}function Ax(n){let e=[];for(let t=0;t<n.length;t++){let o=n[t];if(U(o)){e.push(o);let r=o.getChildren();r.length>1&&r.forEach(s=>{K(s)&&e.push(Fg(s))})}else e.push(Fg(o))}return e}function Ug(n){let e=n.nodeName.toLowerCase(),t=null;return e==="ol"?t=Oe("number",n.start):e==="ul"&&(t=(function(o){if(o.getAttribute("__lexicallisttype")==="check"||o.classList.contains("contains-task-list")||o.getAttribute("data-is-checklist")==="1")return!0;for(let r of o.childNodes)if(Pe(r)&&r.hasAttribute("aria-checked"))return!0;return!1})(n)?Oe("check"):Oe("bullet")),{after:Ax,node:t}}var Dx={ol:"number",ul:"bullet"};function Oe(n="number",e=1){return Nt(new hn(n,e))}function K(n){return n instanceof hn}var Vg=Le("INSERT_CHECK_LIST_COMMAND");function qg(n,e){let t=e&&e.disableTakeFocusOnClick||!1,o=s=>{(function(i,a){zg(i,()=>{if(Pe(i.target)){let l=i.target,c=gs(l);c!=null&&c.isEditable()&&c.update(()=>{let u=nt(l);U(u)&&(a?(ma(Jd),ma(jd)):l.focus(),u.toggleChecked())})}})})(s,t)},r=s=>{(function(i,a){zg(i,()=>{i.preventDefault(),a&&i.stopPropagation()})})(s,t)};return Je(n.registerCommand(Vg,()=>(Vo("check"),!0),ie),n.registerCommand(rs,s=>Hg(s,n,!1),ie),n.registerCommand(is,s=>Hg(s,n,!0),ie),n.registerCommand(as,()=>{if(Nl()!=null){let s=n.getRootElement();return s?.focus(),!0}return!1},ie),n.registerCommand(ls,s=>{let i=Nl();return!(i==null||!n.isEditable())&&(n.update(()=>{let a=nt(i);U(a)&&(s.preventDefault(),a.toggleChecked())}),!0)},ie),n.registerCommand(ss,s=>n.getEditorState().read(()=>{let i=R();if(D(i)&&i.isCollapsed()){let{anchor:a}=i,l=a.type==="element";if(l||a.offset===0){let c=a.getNode(),u=be(c,d=>$(d)&&!d.isInline());if(U(u)){let d=u.getParent();if(K(d)&&d.getListType()==="check"&&(l||u.getFirstDescendant()===c)){let f=n.getElementByKey(u.__key);if(f!=null&&document.activeElement!==f)return f.focus(),s.preventDefault(),!0}}}}return!1}),ie),n.registerRootListener((s,i)=>{s!==null&&(s.addEventListener("click",o),s.addEventListener("pointerdown",r,{capture:!0}),s.addEventListener("mousedown",r,{capture:!0}),s.addEventListener("touchstart",r,{capture:!0,passive:!1})),i!==null&&(i.removeEventListener("click",o),i.removeEventListener("pointerdown",r,{capture:!0}),i.removeEventListener("mousedown",r,{capture:!0}),i.removeEventListener("touchstart",r,{capture:!0}))}))}function zg(n,e){let t=n.target;if(!Pe(t))return;let o=t.firstChild;if(Pe(o)&&(o.tagName==="UL"||o.tagName==="OL"))return;let r=t.parentNode;if(!r||r.__lexicalListType!=="check")return;let s=null,i=null;if("clientX"in n)s=n.clientX;else if("touches"in n){let f=n.touches;f.length>0&&(s=f[0].clientX,i="touch")}if(s==null)return;let a=t.getBoundingClientRect(),l=s/Wf(t),c=window.getComputedStyle?window.getComputedStyle(t,"::before"):{width:"0px"},u=parseFloat(c.width),d=i==="touch"||n.pointerType==="touch"?32:0;(t.dir==="rtl"?l<a.right+d&&l>a.right-u-d:l>a.left-d&&l<a.left+u+d)&&e()}function Nl(){let n=document.activeElement;return Pe(n)&&n.tagName==="LI"&&n.parentNode!=null&&n.parentNode.__lexicalListType==="check"?n:null}function Hg(n,e,t){let o=Nl();return o!=null&&e.update(()=>{let r=nt(o);if(!U(r))return;let s=(function(i,a){let l=a?i.getPreviousSibling():i.getNextSibling(),c=i;for(;l==null&&U(c);)c=c.getParentOrThrow().getParent(),c!=null&&(l=a?c.getPreviousSibling():c.getNextSibling());for(;U(l);){let u=a?l.getLastChild():l.getFirstChild();if(!K(u))return l;l=a?u.getLastChild():u.getFirstChild()}return null})(r,t);if(s!=null){s.selectStart();let i=e.getElementByKey(s.__key);i!=null&&(n.preventDefault(),setTimeout(()=>{i.focus()},0))}}),!1}var Xg=Le("UPDATE_LIST_START_COMMAND"),Qg=Le("INSERT_UNORDERED_LIST_COMMAND"),Zg=Le("INSERT_ORDERED_LIST_COMMAND"),eh=Le("REMOVE_LIST_COMMAND");function th(n,e){return Je(n.registerCommand(Zg,()=>(Vo("number"),!0),ie),n.registerCommand(Xg,t=>{let{listNodeKey:o,newStart:r}=t,s=Kn(o);return!!K(s)&&(s.getListType()==="number"&&(s.setStart(r),jg(s)),!0)},ie),n.registerCommand(Qg,()=>(Vo("bullet"),!0),ie),n.registerCommand(eh,()=>(Sl(),!0),ie),n.registerCommand(Fo,()=>Jg(!!(e&&e.restoreNumbering)),ie),n.registerNodeTransform(Gt,t=>{let o=t.getFirstChild();if(o){if(B(o)){let r=o.getStyle(),s=o.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==s&&t.setTextFormat(s)}}else{let r=R();D(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),n.registerNodeTransform(Wn,t=>{let o=t.getParent();if(U(o)&&t.is(o.getFirstChild())){let r=t.getStyle(),s=t.getFormat();r===o.getTextStyle()&&s===o.getTextFormat()||o.setTextStyle(r).setTextFormat(s)}}))}function nh(n){let e=t=>{let o=t.getParent();if(K(t.getFirstChild())||!K(o))return;let r=be(t,s=>U(s)&&K(s.getParent())&&U(s.getPreviousSibling()));if(r===null&&t.getIndent()>0)t.setIndent(0);else if(U(r)){let s=r.getPreviousSibling();if(U(s)){let i=(function(l){let c=l,u=c.getFirstChild();for(;K(u);){let d=u.getLastChild();if(!U(d))break;c=d,u=c.getFirstChild()}return c})(s),a=i.getParent();if(K(a)){let l=ks(a);l+1<ks(o)&&t.setIndent(l)}}}};return n.registerNodeTransform(hn,t=>{let o=[t];for(;o.length>0;){let r=o.shift();if(K(r)){for(let s of r.getChildren())if(U(s)){e(s);let i=s.getFirstChild();K(i)&&o.push(i)}}}})}function bx(n,e){n.update(()=>Vo(e))}function Rx(n){n.update(()=>Sl())}var oh=Z({build:(n,e,t)=>Et(e),config:ye({hasStrictIndent:!1,shouldPreserveNumbering:!1}),name:"@lexical/list/List",nodes:()=>[hn,Gt],register(n,e,t){let o=t.getOutput();return Je(qe(()=>th(n,{restoreNumbering:o.shouldPreserveNumbering.value})),qe(()=>o.hasStrictIndent.value?nh(n):void 0))}}),kx=Z({config:ye({disableTakeFocusOnClick:!1}),dependencies:[oh],name:"@lexical/list/CheckList",register:qg});var ne=Tl,ZS=ne.$createListItemNode,eT=ne.$createListNode,tT=ne.$getListDepth,nT=ne.$handleListInsertParagraph,oT=ne.$insertList,rT=ne.$isListItemNode,sT=ne.$isListNode,iT=ne.$removeList,aT=ne.CheckListExtension,lT=ne.INSERT_CHECK_LIST_COMMAND,rh=ne.INSERT_ORDERED_LIST_COMMAND,sh=ne.INSERT_UNORDERED_LIST_COMMAND,cT=ne.ListExtension,ih=ne.ListItemNode,ah=ne.ListNode,uT=ne.REMOVE_LIST_COMMAND,dT=ne.UPDATE_LIST_START_COMMAND,fT=ne.insertList,gT=ne.registerCheckList,lh=ne.registerList,hT=ne.registerListStrictIndentTransform,pT=ne.removeList;var Al={};we(Al,{$createAutoLinkNode:()=>Is,$createLinkNode:()=>pn,$isAutoLinkNode:()=>Me,$isLinkNode:()=>Xe,$toggleLink:()=>qo,AutoLinkExtension:()=>zx,AutoLinkNode:()=>Qn,ClickableLinkExtension:()=>wx,LinkExtension:()=>vl,LinkNode:()=>jt,TOGGLE_LINK_COMMAND:()=>$s,createLinkMatcherWithRegExp:()=>Fx,formatUrl:()=>El,registerAutoLink:()=>yh,registerClickableLink:()=>hh,registerLink:()=>gh,toggleLink:()=>Hx});var Ix=new Set(["http:","https:","mailto:","sms:","tel:"]),jt=class n extends ot{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new n(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},o){super(o);let{target:r=null,rel:s=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=s,this.__title=i}createDOM(e){let t=document.createElement("a");return this.updateLinkDOM(null,t,e),Ut(t,e.theme.link),t}updateLinkDOM(e,t,o){if(Ss(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(let r of["target","rel","title"]){let s=`__${r}`,i=this[s];e&&e[s]===i||(i?t[r]=i:t.removeAttribute(r))}}}updateDOM(e,t,o){return this.updateLinkDOM(e,t,o),!1}static importDOM(){return{a:e=>({conversion:Lx,priority:1})}}static importJSON(e){return pn().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=El(e);try{let t=new URL(El(e));if(!Ix.has(t.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let o=pn(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(o,t),o}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,o){if(!D(t))return!1;let r=t.anchor.getNode(),s=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(s)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function ch(n){let e=Ft(n,"next");return[e,e.getFlipped()]}function uh(n,e){for(let t of e)if(t.origin.isAttached()){let o=cn(t);return void $o(n,o)}}function $x(n){let e=R(),t=null,o=null;D(e)&&(t=ch(e.anchor),o=ch(e.focus));for(let r of De(n,"next")){let s=r.origin;if($(s)&&!s.isInline()){let i=s.getChildren();if(i.length>0){let a=id(n);a.append(...i),s.append(a)}Bf(s,Gr(r),{$shouldSplit:()=>!1})}}if(n.isEmpty()){let r=n.getParent();n.remove(),r&&r.isEmpty()&&r.remove()}D(e)&&(uh(e.anchor,t),uh(e.focus,o),Bt(e))}function Lx(n){let e=null;if(Ss(n)){let t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=pn(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function pn(n="",e){return Nt(new jt(n,e))}function Xe(n){return n instanceof jt}var Qn=class n extends jt{__isUnlinked;constructor(e="",t={},o){super(e,t,o),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new n(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,o){return super.updateDOM(e,t,o)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return Is().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){let o=Is(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(o,t),o}};function Is(n="",e){return Nt(new Qn(n,e))}function Me(n){return n instanceof Qn}var $s=Le("TOGGLE_LINK_COMMAND");function dh(n,e){if(n.type==="element"){let t=n.getNode();return $(t)||(function(o,...r){let s=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",o);for(let a of r)i.append("v",a);throw s.search=i.toString(),Error(`Minified Lexical error #${o}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),t.getChildren()[n.offset+e]||null}return null}function qo(n,e={}){let t;if(n&&typeof n=="object"){let{url:u,...d}=n;t=u,e={...d,...e}}else t=n;let{target:o,title:r}=e,s=e.rel===void 0?"noreferrer":e.rel,i=R();if(i===null||!D(i)&&!he(i))return;if(he(i)){let u=i.getNodes();return u.length===0?void 0:void u.forEach(d=>{if(t===null){let f=be(d,h=>!Me(h)&&Xe(h));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{let f=be(d,h=>!Me(h)&&Xe(h));if(f)f.setURL(t),o!==void 0&&f.setTarget(o),s!==void 0&&f.setRel(s);else{let h=pn(t,{rel:s,target:o});d.insertBefore(h),h.append(d)}}})}if(i.isCollapsed()&&t===null)for(let u of i.getNodes()){let d=be(u,f=>!Me(f)&&Xe(f));return void(d!==null&&(d.getChildren().forEach(f=>{d.insertBefore(f)}),d.remove()))}let a=i.extract();if(t===null){let u=new Set;return void a.forEach(d=>{let f=be(d,h=>!Me(h)&&Xe(h));if(f!==null){let h=f.getKey();if(u.has(h))return;(function(g,p){let m=new Set(p.filter(C=>g.isParentOf(C)).map(C=>C.getKey())),x=g.getChildren(),y=C=>m.has(C.getKey())||$(C)&&p.some(S=>g.isParentOf(S)&&C.isParentOf(S)),N=x.filter(y);if(N.length===x.length)return x.forEach(C=>g.insertBefore(C)),void g.remove();let T=x.findIndex(y),O=x.findLastIndex(y),E=T===0,A=O===x.length-1;if(E)N.forEach(C=>g.insertBefore(C));else if(A)for(let C=N.length-1;C>=0;C--)g.insertAfter(N[C]);else{for(let S=N.length-1;S>=0;S--)g.insertAfter(N[S]);let C=x.slice(O+1);if(C.length>0){let S=pn(g.getURL(),{rel:g.getRel(),target:g.getTarget(),title:g.getTitle()});N[N.length-1].insertAfter(S),C.forEach(k=>S.append(k))}}})(f,a),u.add(h)}})}let l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(t),o!==void 0&&u.setTarget(o),s!==void 0&&u.setRel(s),r!==void 0&&u.setTitle(r))};if(a.length===1){let u=a[0],d=be(u,Xe);if(d!==null)return c(d)}(function(u){let d=R();if(!D(d))return u();let f=Bt(d),h=f.isBackward(),g=dh(f.anchor,h?-1:0),p=dh(f.focus,h?0:-1),m=u();if(g||p){let x=R();if(D(x)){let y=x.clone();if(g){let N=g.getParent();N&&y.anchor.set(N.getKey(),g.getIndexWithinParent()+(h?1:0),"element")}if(p){let N=p.getParent();N&&y.focus.set(N.getKey(),p.getIndexWithinParent()+(h?0:1),"element")}Ge(Bt(y))}}})(()=>{let u=null;for(let d of a){if(!d.isAttached())continue;let f=be(d,Xe);if(f){c(f);continue}if($(d)){if(!d.isInline())continue;if(Xe(d)){if(!(Me(d)||u!==null&&u.getParentOrThrow().isParentOf(d))){c(d),u=d;continue}for(let g of d.getChildren())d.insertBefore(g);d.remove();continue}}let h=d.getPreviousSibling();Xe(h)&&h.is(u)?h.append(d):(u=pn(t,{rel:s,target:o,title:r}),d.insertAfter(u),u.append(d))}})}var Px=/^\+?[0-9\s()-]{5,}$/;function El(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:Px.test(n)?`tel:${n}`:`https://${n}`}function gh(n,e){return Je(n.registerNodeTransform(jt,$x),qe(()=>n.registerCommand($s,t=>{let o=e.validateUrl.peek(),r=e.attributes.peek();if(t===null)return qo(null),!0;if(typeof t=="string")return!(o!==void 0&&!o(t))&&(qo(t,r),!0);{let{url:s,target:i,rel:a,title:l}=t;return qo(s,{...r,rel:a,target:i,title:l}),!0}},ie)),qe(()=>{let t=e.validateUrl.value;if(!t)return;let o=e.attributes.value;return n.registerCommand(us,r=>{let s=R();if(!D(s)||s.isCollapsed()||!Ve(r,ClipboardEvent)||r.clipboardData===null)return!1;let i=r.clipboardData.getData("text");return!!t(i)&&!s.getNodes().some(a=>$(a))&&(n.dispatchCommand($s,{...o,url:i}),r.preventDefault(),!0)},ie)}))}var vl=Z({build:(n,e,t)=>Et(e),config:{attributes:void 0,validateUrl:void 0},mergeConfig(n,e){let t=Wt(n,e);return n.attributes&&(t.attributes=Wt(n.attributes,t.attributes)),t},name:"@lexical/link/Link",nodes:()=>[jt],register:(n,e,t)=>gh(n,t.getOutput())});function hh(n,e,t={}){let o=s=>{let i=s.target;if(!Un(i))return;let a=gs(i);if(a===null)return;let l=null,c=null;if(a.update(()=>{let f=nt(i);if(f!==null){let h=be(f,$);if(!e.disabled.peek())if(Xe(h))l=h.sanitizeUrl(h.getURL()),c=h.getTarget();else{let g=(function(p,m){let x=p;for(;x!=null;){if(m(x))return x;x=x.parentNode}return null})(i,Ss);g!==null&&(l=g.href,c=g.target)}}}),l===null||l==="")return;let u=n.getEditorState().read(R);if(D(u)&&!u.isCollapsed())return void s.preventDefault();let d=s.type==="auxclick"&&s.button===1;window.open(l,e.newTab.peek()||d||s.metaKey||s.ctrlKey||c==="_blank"?"_blank":"_self"),s.preventDefault()},r=s=>{s.button===1&&o(s)};return n.registerRootListener((s,i)=>{i!==null&&(i.removeEventListener("click",o),i.removeEventListener("mouseup",r)),s!==null&&(s.addEventListener("click",o,t),s.addEventListener("mouseup",r,t))})}var wx=Z({build:(n,e,t)=>Et(e),config:ye({disabled:!1,newTab:!1}),dependencies:[vl],name:"@lexical/link/ClickableLink",register:(n,e,t)=>hh(n,t.getOutput())});function Fx(n,e=t=>t){return t=>{let o=n.exec(t);return o===null?null:{index:o.index,length:o[0].length,text:o[0],url:e(o[0])}}}function Ol(n,e){for(let t=0;t<e.length;t++){let o=e[t](n);if(o)return o}return null}var Kx=/[.,;\s]/;function Ls(n){return Kx.test(n)}function ph(n){return Ls(n[n.length-1])}function Ml(n){return Ls(n[0])}function mh(n){let e=n.getPreviousSibling();return $(e)&&(e=e.getLastDescendant()),e===null||Sa(e)||B(e)&&ph(e.getTextContent())}function _h(n){let e=n.getNextSibling();return $(e)&&(e=e.getFirstDescendant()),e===null||Sa(e)||B(e)&&Ml(e.getTextContent())}function Bx(n,e,t,o){return(n>0?Ls(t[n-1]):mh(o[0]))?e<t.length?Ls(t[e]):_h(o[o.length-1]):!1}function Wx(n,e,t){let o=[],r=[],s=[],i=0,a=0,l=[...n];for(;l.length>0;){let c=l[0],u=c.getTextContent().length,d=a;a+u<=e?(o.push(c),i+=u):d>=t?s.push(c):r.push(c),a+=u,l.shift()}return[i,o,r,s]}function Ux(n,e,t,o){let r=Is(o.url,o.attributes);if(n.length===1){let s,i=n[0];e===0?[s,i]=i.splitText(t):[,s,i]=i.splitText(e,t);let a=Kt(o.text);return a.setFormat(s.getFormat()),a.setDetail(s.getDetail()),a.setStyle(s.getStyle()),r.append(a),s.replace(r),i}if(n.length>1){let s=n[0],i,a=s.getTextContent().length;e===0?i=s:[,i]=s.splitText(e);let l=[],c;for(let h=1;h<n.length;h++){let g=n[h],p=g.getTextContent().length,m=a;if(m<t)if(a+p<=t)l.push(g);else{let[x,y]=g.splitText(t-m);l.push(x),c=y}a+=p}let u=R(),d=u?u.getNodes().find(B):void 0,f=Kt(i.getTextContent());return f.setFormat(i.getFormat()),f.setDetail(i.getDetail()),f.setStyle(i.getStyle()),r.append(f,...l),d&&d===i&&(D(u)?f.select(u.anchor.offset,u.focus.offset):he(u)&&f.select(0,f.getTextContent().length)),i.replace(r),c}}function fh(n,e,t){let o=n.getChildren(),r=o.length;for(let l=0;l<r;l++){let c=o[l];if(!B(c)||!c.isSimpleText())return Xo(n),void t(null,n.getURL())}let s=n.getTextContent(),i=Ol(s,e);if(i===null||i.text!==s||!mh(n)||!_h(n))return Xo(n),void t(null,n.getURL());let a=n.getURL();if(a!==i.url&&(n.setURL(i.url),t(i.url,a)),i.attributes){let l=n.getRel();l!==i.attributes.rel&&(n.setRel(i.attributes.rel||null),t(i.attributes.rel||null,l));let c=n.getTarget();c!==i.attributes.target&&(n.setTarget(i.attributes.target||null),t(i.attributes.target||null,c))}}function Xo(n){let e=n.getChildren();for(let t=e.length-1;t>=0;t--)n.insertAfter(e[t]);return n.remove(),e.map(t=>t.getLatest())}var xh={changeHandlers:[],excludeParents:[],matchers:[]};function yh(n,e=xh){let{matchers:t,changeHandlers:o,excludeParents:r}=e,s=(i,a)=>{for(let l of o)l(i,a)};return Je(n.registerNodeTransform(Wn,i=>{let a=i.getParentOrThrow(),l=i.getPreviousSibling();if(Me(a)&&!a.getIsUnlinked())fh(a,t,s);else if(!Xe(a)&&!r.some(c=>c(a))){if(i.isSimpleText()&&(Ml(i.getTextContent())||!Me(l))){let c=(function(u){let d=[u],f=u.getNextSibling();for(;f!==null&&B(f)&&f.isSimpleText()&&(d.push(f),!/[\s]/.test(f.getTextContent()));)f=f.getNextSibling();return d})(i);(function(u,d,f){for(let y of u){let N=y.getParent();if(Me(N)&&!N.getIsUnlinked())return}let h=[...u],g=h.map(y=>y.getTextContent()).join(""),p,m=g,x=0;for(;(p=Ol(m,d))&&p!==null;){let y=p.index,N=y+p.length;if(Bx(x+y,x+N,g,h)){let[T,,O,E]=Wx(h,x+y,x+N),A=!1;for(let S of O){let k=S.getParent();if(Me(k)&&!k.getIsUnlinked()){A=!0;break}}if(A){x+=N,m=m.substring(N);continue}let C=Ux(O,x+y-T,x+N-T,p);h=C?[C,...E]:E,f(p.url,null),x=0}else x+=N;m=m.substring(N)}})(c,t,s)}(function(c,u,d){let f=c.getParent(),h=c.getPreviousSibling(),g=c.getNextSibling(),p=c.getTextContent();if(!Me(f)||f.getIsUnlinked()){if(Me(h)&&!h.getIsUnlinked()&&h.is(c.getPreviousSibling())&&c.getParent()===h.getParent()){if(!Ml(p))return Xo(h),void d(null,h.getURL());if(m=p,h.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(m):/^\.[a-zA-Z0-9]{1,}/.test(m)){let x=h.getTextContent()+p,y=Ol(x,u);y!==null&&y.text===x&&(h.append(c),fh(h,u,d),d(null,h.getURL()))}}var m;!Me(g)||g.getIsUnlinked()||ph(p)||g.is(c.getNextSibling())&&c.getParent()===g.getParent()&&(Xo(g),d(null,g.getURL()))}})(i,t,s)}}),n.registerCommand($s,i=>{let a=R();return i!==null||!D(a)||a.extract().forEach(l=>{let c=l.getParent();Me(c)&&(c.setIsUnlinked(!c.getIsUnlinked()),c.markDirty())}),!1},ie))}var zx=Z({config:xh,dependencies:[vl],mergeConfig(n,e){let t=Wt(n,e);for(let o of["matchers","changeHandlers","excludeParents"]){let r=e[o];Array.isArray(r)&&(t[o]=[...n[o],...r])}return t},name:"@lexical/link/AutoLink",nodes:[Qn],register:yh}),Hx=qo;var _e=Al,NT=_e.$createAutoLinkNode,CT=_e.$createLinkNode,ST=_e.$isAutoLinkNode,TT=_e.$isLinkNode,ET=_e.$toggleLink,OT=_e.AutoLinkExtension,MT=_e.AutoLinkNode,vT=_e.ClickableLinkExtension,AT=_e.LinkExtension,Nh=_e.LinkNode,Ch=_e.TOGGLE_LINK_COMMAND,DT=_e.createLinkMatcherWithRegExp,bT=_e.formatUrl,RT=_e.registerAutoLink,kT=_e.registerClickableLink,IT=_e.registerLink,$T=_e.toggleLink;var Dl={};we(Dl,{HistoryExtension:()=>Ps,SharedHistoryExtension:()=>jx,createEmptyHistoryState:()=>Eh,registerHistory:()=>Th});function Yx(n,e,t,o,r){if(n===null||t.size===0&&o.size===0&&!r)return 0;let s=e._selection,i=n._selection;if(r)return 1;if(!(D(s)&&D(i)&&i.isCollapsed()&&s.isCollapsed()))return 0;let a=(function(x,y,N){let T=x._nodeMap,O=[];for(let E of y){let A=T.get(E);A!==void 0&&O.push(A)}for(let[E,A]of N){if(!A)continue;let C=T.get(E);C===void 0||ln(C)||O.push(C)}return O})(e,t,o);if(a.length===0)return 0;if(a.length>1){let x=e._nodeMap,y=x.get(s.anchor.key),N=x.get(i.anchor.key);return y&&N&&!n._nodeMap.has(y.__key)&&B(y)&&y.__text.length===1&&s.anchor.offset===1?2:0}let l=a[0],c=n._nodeMap.get(l.__key);if(!B(c)||!B(l)||c.__mode!==l.__mode)return 0;let u=c.__text,d=l.__text;if(u===d)return 0;let f=s.anchor,h=i.anchor;if(f.key!==h.key||f.type!=="text")return 0;let g=f.offset,p=h.offset,m=d.length-u.length;return m===1&&p===g-1?2:m===-1&&p===g+1?3:m===-1&&p===g?4:0}function Gx(n,e){let t=Date.now(),o=0,r=Date.now(),s=0,i=null;return(a,l,c,u,d,f)=>{let h=Date.now();if(f.has(Od)&&(r=t,s=o,i=a),f.has(ts))return o=0,t=h,2;f.has(Ed)&&i&&(t=r,o=s,a=i);let g=Yx(a,l,u,d,n.isComposing()),p=(()=>{let m=c===null||c.editor===n,x=f.has($d);if(!x&&m&&f.has(ns))return 0;if(g===1)return 2;if(a===null)return 1;let y=l._selection;if(!(u.size>0||d.size>0))return y!==null?0:2;let N=typeof e=="number"?e:e.peek();return x===!1&&g!==0&&g===o&&h<t+N&&m||u.size===1&&(function(T,O,E){let A=O._nodeMap.get(T),C=E._nodeMap.get(T),S=O._selection,k=E._selection;return!(D(S)&&D(k)&&S.anchor.type==="element"&&S.focus.type==="element"&&k.anchor.type==="text"&&k.focus.type==="text"||!B(A)||!B(C)||A.__parent!==C.__parent)&&JSON.stringify(O.read(()=>A.exportJSON()))===JSON.stringify(E.read(()=>C.exportJSON()))})(Array.from(u)[0],a,l)?0:1})();return t=h,o=g,p}}function Sh(n){n.undoStack=[],n.redoStack=[],n.current=null}function Th(n,e,t){let o=Gx(n,t);return Je(n.registerCommand(Xd,()=>((function(s,i){let a=i.redoStack,l=i.undoStack;if(l.length!==0){let c=i.current,u=l.pop();c!==null&&(a.push(c),s.dispatchCommand(Lo,!0)),l.length===0&&s.dispatchCommand(Po,!1),i.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:ts})}})(n,e),!0),W),n.registerCommand(Ud,()=>((function(s,i){let a=i.redoStack,l=i.undoStack;if(a.length!==0){let c=i.current;c!==null&&(l.push(c),s.dispatchCommand(Po,!0));let u=a.pop();a.length===0&&s.dispatchCommand(Lo,!1),i.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:ts})}})(n,e),!0),W),n.registerCommand(Vr,()=>(Sh(e),!1),W),n.registerCommand(Td,()=>(Sh(e),n.dispatchCommand(Lo,!1),n.dispatchCommand(Po,!1),!0),W),n.registerUpdateListener(({editorState:s,prevEditorState:i,dirtyLeaves:a,dirtyElements:l,tags:c})=>{let u=e.current,d=e.redoStack,f=e.undoStack,h=u===null?null:u.editorState;if(u!==null&&s===h)return;let g=o(i,s,u,a,l,c);if(g===1)d.length!==0&&(e.redoStack=[],n.dispatchCommand(Lo,!1)),u!==null&&(f.push({...u}),n.dispatchCommand(Po,!0));else if(g===2)return;e.current={editor:n,editorState:s}}))}function Eh(){return{current:null,redoStack:[],undoStack:[]}}var Ps=Z({build:(n,{delay:e,createInitialHistoryState:t,disabled:o})=>Et({delay:e,disabled:o,historyState:t(n)}),config:ye({createInitialHistoryState:Eh,delay:300,disabled:typeof window>"u"}),name:"@lexical/history/History",register:(n,e,t)=>{let o=t.getOutput();return qe(()=>o.disabled.value?void 0:Th(n,o.historyState.value,o.delay))}}),jx=Z({dependencies:[ds(Ps,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0})],name:"@lexical/history/SharedHistory",register(n,e,t){let{output:o}=t.getDependency(Ps),r=(function(i){return i?Eg(i,Ps.name):null})(n._parentEditor);if(!r)return()=>{};let s=r.output;return qe(()=>Tg(()=>{o.delay.value=s.delay.value,o.historyState.value=s.historyState.value,o.disabled.value=s.disabled.value}))}});var ws=Dl,KT=ws.HistoryExtension,BT=ws.SharedHistoryExtension,Oh=ws.createEmptyHistoryState,Mh=ws.registerHistory;var Jx=[{label:"B",type:"format-bold"},{label:"I",type:"format-italic"},{label:"U",type:"format-underline"},{label:"H2",type:"heading"},{label:"UL",type:"bullet-list"},{label:"OL",type:"number-list"},{label:"Quote",type:"blockquote"},{label:"Code",type:"format-code"}];function vh(n,e){n.update(()=>{let t=R();D(t)&&Cf(t,e)})}var Vx={"format-bold":n=>n.dispatchCommand(Tt,"bold"),"format-italic":n=>n.dispatchCommand(Tt,"italic"),"format-underline":n=>n.dispatchCommand(Tt,"underline"),"format-code":n=>n.dispatchCommand(Tt,"code"),heading:n=>vh(n,()=>Ig("h2")),"bullet-list":n=>n.dispatchCommand(sh,void 0),"number-list":n=>n.dispatchCommand(rh,void 0),blockquote:n=>vh(n,()=>$g())};function qx(n,e){let t=Vx[e.type];t&&t(n)}function Xx(n){let e=document.createElement("div");e.className="richtext-toolbar";for(let o of Jx){let r=document.createElement("button");r.type="button",r.className="richtext-toolbar-btn",r.textContent=o.label,r.addEventListener("click",s=>{s.preventDefault(),qx(n,o)}),e.appendChild(r)}let t=document.createElement("button");return t.type="button",t.className="richtext-toolbar-btn",t.textContent="Link",t.addEventListener("click",o=>{o.preventDefault();let r=prompt("Enter URL:");r&&n.dispatchCommand(Ch,r)}),e.appendChild(t),e}function Qx(n){let e=n.getAttribute("data-field");if(!e)return;let t=n.closest(".richtext-wrap");if(!t)return;let o=t.querySelector(`input[name="${e}"]`);if(!o)return;let s=t.querySelector("template.richtext-initial")?.innerHTML??"",i={namespace:`richtext-${e}`,nodes:[Lg,Pg,ah,ih,Nh],onError:u=>{console.error("Lexical error:",u)},theme:{paragraph:"richtext-p",heading:{h2:"richtext-h2",h3:"richtext-h3"},text:{bold:"richtext-bold",italic:"richtext-italic",underline:"richtext-underline",code:"richtext-code"},list:{ul:"richtext-ul",ol:"richtext-ol",listitem:"richtext-li"},quote:"richtext-quote",link:"richtext-link"}},a=fs(i),l=Xx(a);n.parentElement?.insertBefore(l,n);let c=document.createElement("div");c.contentEditable="true",c.className="richtext-content",n.appendChild(c),a.setRootElement(c),wg(a),lh(a),Mh(a,Oh(),300),s&&a.update(()=>{let d=new DOMParser().parseFromString(s,"text/html"),f=Es(a,d);Ce().clear(),Hr(f)}),a.registerUpdateListener(({editorState:u})=>{u.read(()=>{let d=Ts(a);o.value=d})})}function Ah(){let n=document.querySelectorAll(".richtext-editor");for(let e of n)Qx(e)}Ah();kl();var Dh=document.querySelector(".delete-trigger"),Zn=document.getElementById("delete-dialog"),bh=document.getElementById("delete-cancel"),Rh=document.getElementById("delete-confirm"),kh=document.getElementById("delete-form");Dh&&Zn&&Dh.addEventListener("click",()=>{typeof Zn.show=="function"&&Zn.show()});bh&&Zn&&bh.addEventListener("click",()=>{typeof Zn.close=="function"&&Zn.close()});Rh&&kh&&Rh.addEventListener("click",()=>{kh.submit()});var Zx=document.querySelectorAll(".media-upload");for(let n of Zx){let e=n.getAttribute("data-upload-endpoint"),t=n.querySelector('input[type="file"]'),o=n.querySelector('input[type="hidden"]'),r=n.querySelector(".media-preview");!e||!t||!o||t.addEventListener("change",async()=>{let s=t.files?.[0];if(!s)return;let i=new FormData;i.append("file",s);try{let l=await(await fetch(e,{method:"POST",body:i})).json(),c=l.id??l.filename??"";o.value=c,r&&(s.type.startsWith("image/")?r.innerHTML=`<img src="/media/${c}" alt="">`:r.innerHTML=`<span>${s.name}</span>`)}catch{r&&(r.innerHTML='<span style="color: var(--val-color-error);">Upload failed</span>')}})}})();
|
|
16
|
+
`}isInline(){return!1}updateDOM(){return!1}};function dx(){return{node:fl()}}function fl(){return ad(dn)}function Ng(n){return n instanceof dn}var fx=Z({dependencies:[Ds,ll],name:"@lexical/extension/HorizontalRule",nodes:()=>[dn],register(n,e,t){let{watchNodeKey:o}=t.getDependency(ll).output,r=Gn({nodeSelections:new Map}),s=n._config.theme.hrSelected??"selected";return rt(n.registerCommand(qr,i=>{if(Un(i.target)){let a=gd(i.target);if(Ng(a))return(function(l,c=!1){let u=R(),d=l.isSelected(),f=l.getKey(),h;c&&he(u)?h=u:(h=ld(),Ge(h)),d?h.delete(f):h.add(f)})(a,i.shiftKey),!0}return!1},ie),n.registerMutationListener(dn,(i,a)=>{ig(()=>{let l=!1,{nodeSelections:c}=r.peek();for(let[u,d]of i.entries())if(d==="destroyed")c.delete(u),l=!0;else{let f=c.get(u),h=n.getElementByKey(u);f?f.domNode.value=h:(l=!0,c.set(u,{domNode:Gn(h),selectedSignal:o(u)}))}l&&(r.value={nodeSelections:c})})}),Ht(()=>{let i=[];for(let{domNode:a,selectedSignal:l}of r.value.nodeSelections.values())i.push(Ht(()=>{let c=a.value;c&&(l.value?Wo(c,s):ps(c,s))}));return rt(...i)}))}});function Cg(n){return n.canBeEmpty()}function Sg(n,e,t=Cg){return rt(n.registerCommand(cs,o=>{let r=R();if(!D(r))return!1;o.preventDefault();let s=(function(i){if(i.getNodes().filter(f=>Bn(f)&&f.canIndent()).length>0)return!0;let a=i.anchor,l=i.focus,c=l.isBefore(a)?l:a,u=c.getNode(),d=Cs(u);if(d.canIndent()){let f=d.getKey(),h=Fn();if(h.anchor.set(f,0,"element"),h.focus.set(f,0,"element"),h=Bt(h),h.anchor.is(c))return!0}return!1})(r)?o.shiftKey?Bo:wo:os;return n.dispatchCommand(s,void 0)},W),n.registerCommand(wo,()=>{let o=typeof e=="number"?e:e?e.peek():null,r=R();if(!D(r))return!1;let s=typeof t=="function"?t:t.peek();return Ho(i=>{if(s(i)){let a=i.getIndent()+1;(!o||a<o)&&i.setIndent(a)}})},Xr))}var gx=Z({build:(n,e,t)=>Rs(e),config:ye({$canIndent:Cg,disabled:!1,maxIndent:null}),name:"@lexical/extension/TabIndentation",register(n,e,t){let{disabled:o,maxIndent:r,$canIndent:s}=t.getOutput();return Ht(()=>{if(!o.value)return Sg(n,r,s)})}});var z=gl,tS=z.$createHorizontalRuleNode,nS=z.$isDecoratorTextNode,oS=z.$isHorizontalRuleNode,rS=z.AutoFocusExtension,sS=z.ClearEditorExtension,iS=z.DecoratorTextExtension,aS=z.DecoratorTextNode,lS=z.EditorStateExtension,cS=z.HorizontalRuleExtension,uS=z.HorizontalRuleNode,dS=z.INSERT_HORIZONTAL_RULE_COMMAND,fS=z.InitialStateExtension,gS=z.LexicalBuilder,hS=z.NodeSelectionExtension,pS=z.TabIndentationExtension,mS=z.applyFormatFromStyle,_S=z.applyFormatToDom,Tg=z.batch,xS=z.buildEditorFromExtensions,yS=z.computed,NS=z.configExtension,CS=z.declarePeerDependency,SS=z.defineExtension,qe=z.effect,TS=z.getExtensionDependencyFromEditor,ES=z.getKnownTypesAndNodes,Eg=z.getPeerDependencyFromEditor,OS=z.getPeerDependencyFromEditorOrThrow,Et=z.namedSignals,MS=z.registerClearEditor,vS=z.registerTabIndentation,AS=z.safeCast,DS=z.shallowMergeConfig,bS=z.signal,RS=z.untracked,kS=z.watchedSignal;var hl={};we(hl,{DragonExtension:()=>hx,registerDragonSupport:()=>Og});function Og(n){let e=window.location.origin,t=o=>{if(o.origin!==e)return;let r=n.getRootElement();if(document.activeElement!==r)return;let s=o.data;if(typeof s=="string"){let i;try{i=JSON.parse(s)}catch{return}if(i&&i.protocol==="nuanria_messaging"&&i.type==="request"){let a=i.payload;if(a&&a.functionId==="makeChanges"){let l=a.args;if(l){let[c,u,d,f,h]=l;n.update(()=>{let g=R();if(D(g)){let p=g.anchor,m=p.getNode(),x=0,y=0;if(B(m)&&c>=0&&u>=0&&(x=c,y=c+u,g.setTextNodeRange(m,x,m,y)),x===y&&d===""||(g.insertRawText(d),m=p.getNode()),B(m)){x=f,y=f+h;let N=m.getTextContentSize();x=x>N?N:x,y=y>N?N:y,g.setTextNodeRange(m,x,m,y)}o.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",t,!0),()=>{window.removeEventListener("message",t,!0)}}var hx=Z({build:(n,e,t)=>Et(e),config:ye({disabled:typeof window>"u"}),name:"@lexical/dragon",register:(n,e,t)=>qe(()=>t.getOutput().disabled.value?void 0:Og(n))});var Mg=hl,vg=Mg.DragonExtension,PS=Mg.registerDragonSupport;var xl={};we(xl,{$createHeadingNode:()=>Vn,$createQuoteNode:()=>_l,$isHeadingNode:()=>Tx,$isQuoteNode:()=>Cx,DRAG_DROP_PASTE:()=>ml,HeadingNode:()=>Xn,QuoteNode:()=>qn,RichTextExtension:()=>Ex,eventFiles:()=>Jo,registerRichText:()=>kg});function Ag(n,e){if(document.caretRangeFromPoint!==void 0){let t=document.caretRangeFromPoint(n,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(document.caretPositionFromPoint!=="undefined"){let t=document.caretPositionFromPoint(n,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}var fn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,px=fn&&"documentMode"in document?document.documentMode:null,mx=fn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),_x=!(!fn||!("InputEvent"in window)||px)&&"getTargetRanges"in new window.InputEvent("input"),xx=fn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Dg=fn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,yx=fn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Nx=fn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&mx&&!yx,ml=Le("DRAG_DROP_PASTE_FILE"),qn=class n extends ot{static getType(){return"quote"}static clone(e){return new n(e.__key)}createDOM(e){let t=document.createElement("blockquote");return Ut(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:Sx,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(Pe(t)){this.isEmpty()&&t.append(document.createElement("br"));let o=this.getFormatType();o&&(t.style.textAlign=o);let r=this.getDirection();r&&(t.dir=r)}return{element:t}}static importJSON(e){return _l().updateFromJSON(e)}insertNewAfter(e,t){let o=se(),r=this.getDirection();return o.setDirection(r),this.insertAfter(o,t),o}collapseAtStart(){let e=se();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function _l(){return Nt(new qn)}function Cx(n){return n instanceof qn}var Xn=class n extends ot{__tag;static getType(){return"heading"}static clone(e){return new n(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){let t=this.getWritable();return this.__tag=e,t}createDOM(e){let t=this.__tag,o=document.createElement(t),r=e.theme.heading;if(r!==void 0){let s=r[t];Ut(o,s)}return o}updateDOM(e,t,o){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:Jn,priority:0}),h2:e=>({conversion:Jn,priority:0}),h3:e=>({conversion:Jn,priority:0}),h4:e=>({conversion:Jn,priority:0}),h5:e=>({conversion:Jn,priority:0}),h6:e=>({conversion:Jn,priority:0}),p:e=>{let t=e.firstChild;return t!==null&&bg(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>bg(e)?{conversion:t=>({node:Vn("h1")}),priority:3}:null}}exportDOM(e){let{element:t}=super.exportDOM(e);if(Pe(t)){this.isEmpty()&&t.append(document.createElement("br"));let o=this.getFormatType();o&&(t.style.textAlign=o);let r=this.getDirection();r&&(t.dir=r)}return{element:t}}static importJSON(e){return Vn(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let o=e?e.anchor.offset:0,r=this.getLastDescendant(),s=!r||e&&e.anchor.key===r.getKey()&&o===r.getTextContentSize()||!e?se():Vn(this.getTag()),i=this.getDirection();if(s.setDirection(i),this.insertAfter(s,t),o===0&&!this.isEmpty()&&e){let a=se();a.select(),this.replace(a,!0)}return s}collapseAtStart(){let e=this.isEmpty()?se():Vn(this.getTag());return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}};function bg(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function Jn(n){let e=n.nodeName.toLowerCase(),t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Vn(e),n.style!==null&&(ba(n,t),t.setFormat(n.style.textAlign))),{node:t}}function Sx(n){let e=_l();return n.style!==null&&(e.setFormat(n.style.textAlign),ba(n,e)),{node:e}}function Vn(n="h1"){return Nt(new Xn(n))}function Tx(n){return n instanceof Xn}function Jo(n){let e=null;if(Ve(n,DragEvent)?e=n.dataTransfer:Ve(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];let t=e.types,o=t.includes("Files"),r=t.includes("text/html")||t.includes("text/plain");return[o,Array.from(e.files),r]}function Rg(n){let e=nt(n);return an(e)}function pl(n){for(let e of["lowercase","uppercase","capitalize"])n.hasFormat(e)&&n.toggleFormat(e)}function kg(n){return Je(n.registerCommand(qr,e=>{let t=R();return!!he(t)&&(t.clear(),!0)},W),n.registerCommand(Zr,e=>{let t=R();return D(t)?(t.deleteCharacter(e),!0):!!he(t)&&(t.deleteNodes(),!0)},W),n.registerCommand(Dd,e=>{let t=R();return!!D(t)&&(t.deleteWord(e),!0)},W),n.registerCommand(Ad,e=>{let t=R();return!!D(t)&&(t.deleteLine(e),!0)},W),n.registerCommand(Md,e=>{let t=R();if(typeof e=="string")t!==null&&t.insertText(e);else{if(t===null)return!1;let o=e.dataTransfer;if(o!=null)Xa(o,t,n);else if(D(t)){let r=e.data;return r&&t.insertText(r),!0}}return!0},W),n.registerCommand(zd,()=>{let e=R();return!!D(e)&&(e.removeText(),!0)},W),n.registerCommand(Tt,e=>{let t=R();return!!D(t)&&(t.formatText(e),!0)},W),n.registerCommand(Id,e=>{let t=R();if(!D(t)&&!he(t))return!1;let o=t.getNodes();for(let r of o){let s=be(r,i=>$(i)&&!i.isInline());s!==null&&s.setFormat(e)}return!0},W),n.registerCommand(Oa,e=>{let t=R();return!!D(t)&&(t.insertLineBreak(e),!0)},W),n.registerCommand(Fo,()=>{let e=R();return!!D(e)&&(e.insertParagraph(),!0)},W),n.registerCommand(os,()=>{let e=Wr(),t=R();return D(t)&&(e.setFormat(t.format),e.setStyle(t.style)),Hr([e]),!0},W),n.registerCommand(wo,()=>Ho(e=>{let t=e.getIndent();e.setIndent(t+1)}),W),n.registerCommand(Bo,()=>Ho(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),W),n.registerCommand(is,e=>{let t=R();if(he(t)){let o=t.getNodes();if(o.length>0)return e.preventDefault(),o[0].selectPrevious(),!0}else if(D(t)){let o=ya(t.focus,!0);if(!e.shiftKey&&an(o)&&!o.isIsolated()&&!o.isInline())return o.selectPrevious(),e.preventDefault(),!0}return!1},W),n.registerCommand(rs,e=>{let t=R();if(he(t)){let o=t.getNodes();if(o.length>0)return e.preventDefault(),o[0].selectNext(0,0),!0}else if(D(t)){if((function(r){let s=r.focus;return s.key==="root"&&s.offset===Ce().getChildrenSize()})(t))return e.preventDefault(),!0;let o=ya(t.focus,!1);if(!e.shiftKey&&an(o)&&!o.isIsolated()&&!o.isInline())return o.selectNext(),e.preventDefault(),!0}return!1},W),n.registerCommand(ss,e=>{let t=R();if(he(t)){let o=t.getNodes();if(o.length>0)return e.preventDefault(),Fa(o[0])?o[0].selectNext(0,0):o[0].selectPrevious(),!0}if(!D(t))return!1;if(Ba(t,!0)){let o=e.shiftKey;return e.preventDefault(),Ka(t,o,!0),!0}return!1},W),n.registerCommand(Ld,e=>{let t=R();if(he(t)){let r=t.getNodes();if(r.length>0)return e.preventDefault(),Fa(r[0])?r[0].selectPrevious():r[0].selectNext(0,0),!0}if(!D(t))return!1;let o=e.shiftKey;return!!Ba(t,!1)&&(e.preventDefault(),Ka(t,o,!1),!0)},W),n.registerCommand(Pd,e=>{if(Rg(e.target))return!1;let t=R();if(D(t)){if((function(o){if(!o.isCollapsed())return!1;let{anchor:r}=o;if(r.offset!==0)return!1;let s=r.getNode();if(ln(s))return!1;let i=Cs(s);return i.getIndent()>0&&(i.is(s)||s.is(i.getFirstDescendant()))})(t))return e.preventDefault(),n.dispatchCommand(Bo,void 0);if(Dg&&navigator.language==="ko-KR")return!1}else if(!he(t))return!1;return e.preventDefault(),n.dispatchCommand(Zr,!0)},W),n.registerCommand(wd,e=>{if(Rg(e.target))return!1;let t=R();return!(!D(t)&&!he(t))&&(e.preventDefault(),n.dispatchCommand(Zr,!1))},W),n.registerCommand(Fd,e=>{let t=R();if(!D(t))return!1;if(pl(t),e!==null){if((Dg||xx||Nx)&&_x)return!1;if(e.preventDefault(),e.shiftKey)return n.dispatchCommand(Oa,!1)}return n.dispatchCommand(Fo,void 0)},W),n.registerCommand(as,()=>{let e=R();return!!D(e)&&(n.blur(),!0)},W),n.registerCommand(kd,e=>{let[,t]=Jo(e);if(t.length>0){let r=Ag(e.clientX,e.clientY);if(r!==null){let{offset:s,node:i}=r,a=nt(i);if(a!==null){let l=Fn();if(B(a))l.anchor.set(a.getKey(),s,"text"),l.focus.set(a.getKey(),s,"text");else{let u=a.getParentOrThrow().getKey(),d=a.getIndexWithinParent()+1;l.anchor.set(u,d,"element"),l.focus.set(u,d,"element")}let c=Bt(l);Ge(c)}n.dispatchCommand(ml,t)}return e.preventDefault(),!0}let o=R();return!!D(o)},W),n.registerCommand(Rd,e=>{let[t]=Jo(e),o=R();return!(t&&!D(o))},W),n.registerCommand(bd,e=>{let[t]=Jo(e),o=R();if(t&&!D(o))return!1;let r=Ag(e.clientX,e.clientY);if(r!==null){let s=nt(r.node);an(s)&&e.preventDefault()}return!0},W),n.registerCommand(Gd,()=>(jr(),!0),W),n.registerCommand(Qr,e=>(Qa(n,Ve(e,ClipboardEvent)?e:null),!0),W),n.registerCommand(vd,e=>((async function(t,o){await Qa(o,Ve(t,ClipboardEvent)?t:null),o.update(()=>{let r=R();D(r)?r.removeText():he(r)&&r.getNodes().forEach(s=>s.remove())})})(e,n),!0),W),n.registerCommand(us,e=>{let[,t,o]=Jo(e);return t.length>0&&!o?(n.dispatchCommand(ml,t),!0):Un(e.target)&&sf(e.target)?!1:R()!==null&&((function(r,s){r.preventDefault(),s.update(()=>{let i=R(),a=Ve(r,InputEvent)||Ve(r,KeyboardEvent)?null:r.clipboardData;a!=null&&i!==null&&Xa(a,i,s)},{tag:Bd})})(e,n),!0)},W),n.registerCommand(ls,e=>{let t=R();return D(t)&&pl(t),!1},W),n.registerCommand(cs,e=>{let t=R();return D(t)&&pl(t),!1},W))}var Ex=Z({conflictsWith:["@lexical/plain-text"],dependencies:[vg],name:"@lexical/rich-text",nodes:()=>[Xn,qn],register:kg});var at=xl,Ig=at.$createHeadingNode,$g=at.$createQuoteNode,zS=at.$isHeadingNode,HS=at.$isQuoteNode,YS=at.DRAG_DROP_PASTE,Lg=at.HeadingNode,Pg=at.QuoteNode,GS=at.RichTextExtension,jS=at.eventFiles,wg=at.registerRichText;var Tl={};we(Tl,{$createListItemNode:()=>Re,$createListNode:()=>Oe,$getListDepth:()=>ks,$handleListInsertParagraph:()=>Jg,$insertList:()=>Vo,$isListItemNode:()=>U,$isListNode:()=>K,$removeList:()=>Sl,CheckListExtension:()=>kx,INSERT_CHECK_LIST_COMMAND:()=>Vg,INSERT_ORDERED_LIST_COMMAND:()=>Zg,INSERT_UNORDERED_LIST_COMMAND:()=>Qg,ListExtension:()=>oh,ListItemNode:()=>Gt,ListNode:()=>hn,REMOVE_LIST_COMMAND:()=>eh,UPDATE_LIST_START_COMMAND:()=>Xg,insertList:()=>bx,registerCheckList:()=>qg,registerList:()=>th,registerListStrictIndentTransform:()=>nh,removeList:()=>Rx});function Yt(n,...e){let t=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",n);for(let r of e)o.append("v",r);throw t.search=o.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ks(n){let e=1,t=n.getParent();for(;t!=null;){if(U(t)){let o=t.getParent();if(K(o)){e++,t=o.getParent();continue}Yt(40)}return e}return e}function yl(n){let e=n.getParent();K(e)||Yt(40);let t=e;for(;t!==null;)t=t.getParent(),K(t)&&(e=t);return e}function Yg(n){let e=[],t=n.getChildren().filter(U);for(let o=0;o<t.length;o++){let r=t[o],s=r.getFirstChild();K(s)?e=e.concat(Yg(s)):e.push(r)}return e}function lt(n){return U(n)&&K(n.getFirstChild())}function Fg(n){return Re().append(n)}function Gg(n,e){return U(n)&&(e.length===0||e.length===1&&n.is(e[0])&&n.getChildrenSize()===0)}function Vo(n){let e=R();if(e!==null){let t=e.getNodes();if(D(e)){let r=e.getStartEndPoints();r===null&&Yt(143);let[s]=r,i=s.getNode(),a=i.getParent();if($e(i)){let l=i.getFirstChild();if(l)t=l.selectStart().getNodes();else{let c=se();i.append(c),t=c.select().getNodes()}}else if(Gg(i,t)){let l=Oe(n);if($e(a)){i.replace(l);let c=Re();$(i)&&(c.setFormat(i.getFormatType()),c.setIndent(i.getIndent())),l.append(c)}else if(U(i)){let c=i.getParentOrThrow();gn(l,c.getChildren()),c.replace(l)}return}}let o=new Set;for(let r=0;r<t.length;r++){let s=t[r];if($(s)&&s.isEmpty()&&!U(s)&&!o.has(s.getKey())){Kg(s,n);continue}let i=Io(s)?s.getParent():U(s)&&s.isEmpty()?s:null;for(;i!=null;){let a=i.getKey();if(K(i)){if(!o.has(a)){let l=Oe(n);gn(l,i.getChildren()),i.replace(l),o.add(a)}break}{let l=i.getParent();if($e(l)&&!o.has(a)){o.add(a),Kg(i,n);break}i=l}}}}}function gn(n,e){n.splice(n.getChildrenSize(),0,e)}function Kg(n,e){if(K(n))return n;let t=n.getPreviousSibling(),o=n.getNextSibling(),r=Re(),s;if(gn(r,n.getChildren()),K(t)&&e===t.getListType())t.append(r),K(o)&&e===o.getListType()&&(gn(t,o.getChildren()),o.remove()),s=t;else if(K(o)&&e===o.getListType())o.getFirstChildOrThrow().insertBefore(r),s=o;else{let a=Oe(e);a.append(r),n.replace(a),s=a}r.setFormat(n.getFormatType()),r.setIndent(n.getIndent());let i=R();return D(i)&&(s.getKey()===i.anchor.key&&i.anchor.set(r.getKey(),i.anchor.offset,"element"),s.getKey()===i.focus.key&&i.focus.set(r.getKey(),i.focus.offset,"element")),n.remove(),s}function Cl(n,e){let t=n.getLastChild(),o=e.getFirstChild();t&&o&<(t)&<(o)&&(Cl(t.getFirstChild(),o.getFirstChild()),o.remove());let r=e.getChildren();r.length>0&&n.append(...r),e.remove()}function Sl(){let n=R();if(D(n)){let e=new Set,t=n.getNodes(),o=n.anchor.getNode();if(Gg(o,t))e.add(yl(o));else for(let r=0;r<t.length;r++){let s=t[r];if(Io(s)){let i=Kf(s,Gt);i!=null&&e.add(yl(i))}}for(let r of e){let s=r,i=Yg(r);for(let a of i){let l=se().setTextStyle(n.style).setTextFormat(n.format);gn(l,a.getChildren()),s.insertAfter(l),s=l,a.__key===n.anchor.key&&$o(n.anchor,cn(De(l,"next"))),a.__key===n.focus.key&&$o(n.focus,cn(De(l,"next"))),a.remove()}r.remove()}}}function jg(n){let e=n.getListType()!=="check",t=n.getStart();for(let o of n.getChildren())U(o)&&(o.getValue()!==t&&o.setValue(t),e&&o.getLatest().__checked!=null&&o.setChecked(void 0),K(o.getFirstChild())||t++)}function Ox(n){let e=new Set;if(lt(n)||e.has(n.getKey()))return;let t=n.getParent(),o=n.getNextSibling(),r=n.getPreviousSibling();if(lt(o)&<(r)){let s=r.getFirstChild();if(K(s)){s.append(n);let i=o.getFirstChild();K(i)&&(gn(s,i.getChildren()),o.remove(),e.add(o.getKey()))}}else if(lt(o)){let s=o.getFirstChild();if(K(s)){let i=s.getFirstChild();i!==null&&i.insertBefore(n)}}else if(lt(r)){let s=r.getFirstChild();K(s)&&s.append(n)}else if(K(t)){let s=Re().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()),i=Oe(t.getListType()).setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle());s.append(i),i.append(n),r?r.insertAfter(s):o?o.insertBefore(s):t.append(s)}}function Mx(n){if(lt(n))return;let e=n.getParent(),t=e?e.getParent():void 0;if(K(t?t.getParent():void 0)&&U(t)&&K(e)){let o=e?e.getFirstChild():void 0,r=e?e.getLastChild():void 0;if(n.is(o))t.insertBefore(n),e.isEmpty()&&t.remove();else if(n.is(r))t.insertAfter(n),e.isEmpty()&&t.remove();else{let s=e.getListType(),i=Re(),a=Oe(s);i.append(a),n.getPreviousSiblings().forEach(u=>a.append(u));let l=Re(),c=Oe(s);l.append(c),gn(c,n.getNextSiblings()),t.insertBefore(i),t.insertAfter(l),t.replace(n)}}}function Jg(n=!1){let e=R();if(!D(e)||!e.isCollapsed())return!1;let t=e.anchor.getNode(),o=null;if(U(t)&&t.getChildrenSize()===0)o=t;else if(B(t)){let c=t.getParent();U(c)&&c.getChildren().every(u=>B(u)&&u.getTextContent().trim()==="")&&(o=c)}if(o===null)return!1;let r=yl(o),s=o.getParent();K(s)||Yt(40);let i=s.getParent(),a;if($e(i))a=se(),r.insertAfter(a);else{if(!U(i))return!1;a=Re(),i.insertAfter(a)}a.setTextStyle(e.style).setTextFormat(e.format).select();let l=o.getNextSiblings();if(l.length>0){let c=n?(function(d,f){return d.getStart()+f.getIndexWithinParent()})(s,o):1,u=Oe(s.getListType(),c);if(U(a)){let d=Re();d.append(u),a.insertAfter(d)}else a.insertAfter(u);u.append(...l)}return(function(c){let u=c;for(;u.getNextSibling()==null&&u.getPreviousSibling()==null;){let d=u.getParent();if(d==null||!U(d)&&!K(d))break;u=d}u.remove()})(o),!0}var Gt=class extends ot{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{if(e.__checked==null)return;let t=e.getParent();K(t)&&t.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)},extends:ot,importDOM:Ma({li:()=>({conversion:vx,priority:0})})})}constructor(e=1,t=void 0,o){super(o),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){let t=document.createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,o){(function(i,a,l){let c=a.getParent();!K(c)||c.getListType()!=="check"||K(a.getFirstChild())?(i.removeAttribute("role"),i.removeAttribute("tabIndex"),i.removeAttribute("aria-checked")):(i.setAttribute("role","checkbox"),i.setAttribute("tabIndex","-1"),l&&a.__checked===l.__checked||i.setAttribute("aria-checked",a.getChecked()?"true":"false"))})(t,this,e),t.value=this.__value,(function(i,a,l){let c=[],u=[],d=a.list,f=d?d.listitem:void 0,h;if(d&&d.nested&&(h=d.nested.listitem),f!==void 0&&c.push(...zo(f)),d){let g=l.getParent(),p=K(g)&&g.getListType()==="check",m=l.getChecked();p&&!m||u.push(d.listitemUnchecked),p&&m||u.push(d.listitemChecked),p&&c.push(m?d.listitemChecked:d.listitemUnchecked)}if(h!==void 0){let g=zo(h);l.getChildren().some(p=>K(p))?c.push(...g):u.push(...g)}u.length>0&&ja(i,...u),c.length>0&&Ut(i,...c)})(t,o.theme,this);let r=e?e.__style:"",s=this.__style;r!==s&&(s===""?t.removeAttribute("style"):t.style.cssText=s),(function(i,a,l){let c=Wa(a.__textStyle);for(let u in c)i.style.setProperty(`--listitem-marker-${u}`,c[u]);if(l)for(let u in Wa(l.__textStyle))u in c||i.style.removeProperty(`--listitem-marker-${u}`)})(t,this,e)}updateDOM(e,t,o){let r=t;return this.updateListItemDOM(e,r,o),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config),o=this.getFormatType();o&&(t.style.textAlign=o);let r=this.getDirection();return r&&(t.dir=r),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){let o=e[t];if($(o)&&this.canMergeWith(o)){let r=o.getChildren();this.append(...r),o.remove()}else super.append(o)}return this}replace(e,t){if(U(e))return super.replace(e);this.setIndent(0);let o=this.getParentOrThrow();if(!K(o))return e;if(o.__first===this.getKey())o.insertBefore(e);else if(o.__last===this.getKey())o.insertAfter(e);else{let r=Oe(o.getListType()),s=this.getNextSibling();for(;s;){let i=s;s=s.getNextSibling(),r.append(i)}o.insertAfter(e),e.insertAfter(r)}return t&&($(e)||Yt(139),this.getChildren().forEach(r=>{e.append(r)})),this.remove(),o.getChildrenSize()===0&&o.remove(),e}insertAfter(e,t=!0){let o=this.getParentOrThrow();if(K(o)||Yt(39),U(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(o.insertAfter(e,t),r.length!==0){let s=Oe(o.getListType());r.forEach(i=>s.append(i)),e.insertAfter(s,t)}return e}remove(e){let t=this.getPreviousSibling(),o=this.getNextSibling();super.remove(e),t&&o&<(t)&<(o)&&(Cl(t.getFirstChild(),o.getFirstChild()),o.remove())}insertNewAfter(e,t=!0){let o=Re().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(o,t),o}collapseAtStart(e){let t=se();this.getChildren().forEach(i=>t.append(i));let o=this.getParentOrThrow(),r=o.getParentOrThrow(),s=U(r);if(o.getChildrenSize()===1)if(s)o.remove(),r.select();else{o.insertBefore(t),o.remove();let i=e.anchor,a=e.focus,l=t.getKey();i.type==="element"&&i.getNode().is(this)&&i.set(l,i.offset,"element"),a.type==="element"&&a.getNode().is(this)&&a.set(l,a.offset,"element")}else o.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e=this.getLatest(),t,o=this.getParent();return K(o)&&(t=o.getListType()),t==="check"?!!e.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),o=0;for(;U(t);)t=t.getParentOrThrow().getParentOrThrow(),o++;return o}setIndent(e){typeof e!="number"&&Yt(117),(e=Math.floor(e))>=0||Yt(199);let t=this.getIndent();for(;t!==e;)t<e?(Ox(this),t++):(Mx(this),t--);return this}canInsertAfter(e){return U(e)}canReplaceWith(e){return U(e)}canMergeWith(e){return U(e)||_d(e)}extractWithChild(e,t){if(!D(t))return!1;let o=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(o)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Oe("bullet")}canMergeWhenEmpty(){return!0}};function vx(n){if(n.classList.contains("task-list-item")){for(let t of n.children)if(t.tagName==="INPUT")return Bg(t)}if(n.classList.contains("joplin-checkbox")){for(let t of n.children)if(t.classList.contains("checkbox-wrapper")&&t.children.length>0&&t.children[0].tagName==="INPUT")return Bg(t.children[0])}let e=n.getAttribute("aria-checked");return{node:Re(e==="true"||e!=="false"&&void 0)}}function Bg(n){return n.getAttribute("type")!=="checkbox"?{node:null}:{node:Re(n.hasAttribute("checked"))}}function Re(n){return Nt(new Gt(void 0,n))}function U(n){return n instanceof Gt}var hn=class extends ot{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{(function(t){let o=t.getNextSibling();K(o)&&t.getListType()===o.getListType()&&Cl(t,o)})(e),jg(e)},extends:ot,importDOM:Ma({ol:()=>({conversion:Ug,priority:0}),ul:()=>({conversion:Ug,priority:0})})})}constructor(e="number",t=1,o){super(o);let r=Dx[e]||e;this.__listType=r,this.__tag=r==="number"?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag=e==="number"?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let o=this.__tag,r=document.createElement(o);return this.__start!==1&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,Wg(r,e.theme,this),r}updateDOM(e,t,o){return e.__tag!==this.__tag||e.__listType!==this.__listType||(Wg(t,o.theme,this),e.__start!==this.__start&&t.setAttribute("start",String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return Pe(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,o){let r=o;for(let s=0;s<o.length;s++){let i=o[s];U(i)||(r===o&&(r=[...o]),r[s]=Re().append(!$(i)||K(i)||i.isInline()?i:Kt(i.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return U(e)}};function Wg(n,e,t){let o=[],r=[],s=e.list;if(s!==void 0){let i=s[`${t.__tag}Depth`]||[],a=ks(t)-1,l=a%i.length,c=i[l],u=s[t.__tag],d,f=s.nested,h=s.checklist;if(f!==void 0&&f.list&&(d=f.list),u!==void 0&&o.push(u),h!==void 0&&t.__listType==="check"&&o.push(h),c!==void 0){o.push(...zo(c));for(let g=0;g<i.length;g++)g!==l&&r.push(t.__tag+g)}if(d!==void 0){let g=zo(d);a>1?o.push(...g):r.push(...g)}}r.length>0&&ja(n,...r),o.length>0&&Ut(n,...o)}function Ax(n){let e=[];for(let t=0;t<n.length;t++){let o=n[t];if(U(o)){e.push(o);let r=o.getChildren();r.length>1&&r.forEach(s=>{K(s)&&e.push(Fg(s))})}else e.push(Fg(o))}return e}function Ug(n){let e=n.nodeName.toLowerCase(),t=null;return e==="ol"?t=Oe("number",n.start):e==="ul"&&(t=(function(o){if(o.getAttribute("__lexicallisttype")==="check"||o.classList.contains("contains-task-list")||o.getAttribute("data-is-checklist")==="1")return!0;for(let r of o.childNodes)if(Pe(r)&&r.hasAttribute("aria-checked"))return!0;return!1})(n)?Oe("check"):Oe("bullet")),{after:Ax,node:t}}var Dx={ol:"number",ul:"bullet"};function Oe(n="number",e=1){return Nt(new hn(n,e))}function K(n){return n instanceof hn}var Vg=Le("INSERT_CHECK_LIST_COMMAND");function qg(n,e){let t=e&&e.disableTakeFocusOnClick||!1,o=s=>{(function(i,a){zg(i,()=>{if(Pe(i.target)){let l=i.target,c=gs(l);c!=null&&c.isEditable()&&c.update(()=>{let u=nt(l);U(u)&&(a?(ma(Jd),ma(jd)):l.focus(),u.toggleChecked())})}})})(s,t)},r=s=>{(function(i,a){zg(i,()=>{i.preventDefault(),a&&i.stopPropagation()})})(s,t)};return Je(n.registerCommand(Vg,()=>(Vo("check"),!0),ie),n.registerCommand(rs,s=>Hg(s,n,!1),ie),n.registerCommand(is,s=>Hg(s,n,!0),ie),n.registerCommand(as,()=>{if(Nl()!=null){let s=n.getRootElement();return s?.focus(),!0}return!1},ie),n.registerCommand(ls,s=>{let i=Nl();return!(i==null||!n.isEditable())&&(n.update(()=>{let a=nt(i);U(a)&&(s.preventDefault(),a.toggleChecked())}),!0)},ie),n.registerCommand(ss,s=>n.getEditorState().read(()=>{let i=R();if(D(i)&&i.isCollapsed()){let{anchor:a}=i,l=a.type==="element";if(l||a.offset===0){let c=a.getNode(),u=be(c,d=>$(d)&&!d.isInline());if(U(u)){let d=u.getParent();if(K(d)&&d.getListType()==="check"&&(l||u.getFirstDescendant()===c)){let f=n.getElementByKey(u.__key);if(f!=null&&document.activeElement!==f)return f.focus(),s.preventDefault(),!0}}}}return!1}),ie),n.registerRootListener((s,i)=>{s!==null&&(s.addEventListener("click",o),s.addEventListener("pointerdown",r,{capture:!0}),s.addEventListener("mousedown",r,{capture:!0}),s.addEventListener("touchstart",r,{capture:!0,passive:!1})),i!==null&&(i.removeEventListener("click",o),i.removeEventListener("pointerdown",r,{capture:!0}),i.removeEventListener("mousedown",r,{capture:!0}),i.removeEventListener("touchstart",r,{capture:!0}))}))}function zg(n,e){let t=n.target;if(!Pe(t))return;let o=t.firstChild;if(Pe(o)&&(o.tagName==="UL"||o.tagName==="OL"))return;let r=t.parentNode;if(!r||r.__lexicalListType!=="check")return;let s=null,i=null;if("clientX"in n)s=n.clientX;else if("touches"in n){let f=n.touches;f.length>0&&(s=f[0].clientX,i="touch")}if(s==null)return;let a=t.getBoundingClientRect(),l=s/Wf(t),c=window.getComputedStyle?window.getComputedStyle(t,"::before"):{width:"0px"},u=parseFloat(c.width),d=i==="touch"||n.pointerType==="touch"?32:0;(t.dir==="rtl"?l<a.right+d&&l>a.right-u-d:l>a.left-d&&l<a.left+u+d)&&e()}function Nl(){let n=document.activeElement;return Pe(n)&&n.tagName==="LI"&&n.parentNode!=null&&n.parentNode.__lexicalListType==="check"?n:null}function Hg(n,e,t){let o=Nl();return o!=null&&e.update(()=>{let r=nt(o);if(!U(r))return;let s=(function(i,a){let l=a?i.getPreviousSibling():i.getNextSibling(),c=i;for(;l==null&&U(c);)c=c.getParentOrThrow().getParent(),c!=null&&(l=a?c.getPreviousSibling():c.getNextSibling());for(;U(l);){let u=a?l.getLastChild():l.getFirstChild();if(!K(u))return l;l=a?u.getLastChild():u.getFirstChild()}return null})(r,t);if(s!=null){s.selectStart();let i=e.getElementByKey(s.__key);i!=null&&(n.preventDefault(),setTimeout(()=>{i.focus()},0))}}),!1}var Xg=Le("UPDATE_LIST_START_COMMAND"),Qg=Le("INSERT_UNORDERED_LIST_COMMAND"),Zg=Le("INSERT_ORDERED_LIST_COMMAND"),eh=Le("REMOVE_LIST_COMMAND");function th(n,e){return Je(n.registerCommand(Zg,()=>(Vo("number"),!0),ie),n.registerCommand(Xg,t=>{let{listNodeKey:o,newStart:r}=t,s=Kn(o);return!!K(s)&&(s.getListType()==="number"&&(s.setStart(r),jg(s)),!0)},ie),n.registerCommand(Qg,()=>(Vo("bullet"),!0),ie),n.registerCommand(eh,()=>(Sl(),!0),ie),n.registerCommand(Fo,()=>Jg(!!(e&&e.restoreNumbering)),ie),n.registerNodeTransform(Gt,t=>{let o=t.getFirstChild();if(o){if(B(o)){let r=o.getStyle(),s=o.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==s&&t.setTextFormat(s)}}else{let r=R();D(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),n.registerNodeTransform(Wn,t=>{let o=t.getParent();if(U(o)&&t.is(o.getFirstChild())){let r=t.getStyle(),s=t.getFormat();r===o.getTextStyle()&&s===o.getTextFormat()||o.setTextStyle(r).setTextFormat(s)}}))}function nh(n){let e=t=>{let o=t.getParent();if(K(t.getFirstChild())||!K(o))return;let r=be(t,s=>U(s)&&K(s.getParent())&&U(s.getPreviousSibling()));if(r===null&&t.getIndent()>0)t.setIndent(0);else if(U(r)){let s=r.getPreviousSibling();if(U(s)){let i=(function(l){let c=l,u=c.getFirstChild();for(;K(u);){let d=u.getLastChild();if(!U(d))break;c=d,u=c.getFirstChild()}return c})(s),a=i.getParent();if(K(a)){let l=ks(a);l+1<ks(o)&&t.setIndent(l)}}}};return n.registerNodeTransform(hn,t=>{let o=[t];for(;o.length>0;){let r=o.shift();if(K(r)){for(let s of r.getChildren())if(U(s)){e(s);let i=s.getFirstChild();K(i)&&o.push(i)}}}})}function bx(n,e){n.update(()=>Vo(e))}function Rx(n){n.update(()=>Sl())}var oh=Z({build:(n,e,t)=>Et(e),config:ye({hasStrictIndent:!1,shouldPreserveNumbering:!1}),name:"@lexical/list/List",nodes:()=>[hn,Gt],register(n,e,t){let o=t.getOutput();return Je(qe(()=>th(n,{restoreNumbering:o.shouldPreserveNumbering.value})),qe(()=>o.hasStrictIndent.value?nh(n):void 0))}}),kx=Z({config:ye({disableTakeFocusOnClick:!1}),dependencies:[oh],name:"@lexical/list/CheckList",register:qg});var ne=Tl,ZS=ne.$createListItemNode,eT=ne.$createListNode,tT=ne.$getListDepth,nT=ne.$handleListInsertParagraph,oT=ne.$insertList,rT=ne.$isListItemNode,sT=ne.$isListNode,iT=ne.$removeList,aT=ne.CheckListExtension,lT=ne.INSERT_CHECK_LIST_COMMAND,rh=ne.INSERT_ORDERED_LIST_COMMAND,sh=ne.INSERT_UNORDERED_LIST_COMMAND,cT=ne.ListExtension,ih=ne.ListItemNode,ah=ne.ListNode,uT=ne.REMOVE_LIST_COMMAND,dT=ne.UPDATE_LIST_START_COMMAND,fT=ne.insertList,gT=ne.registerCheckList,lh=ne.registerList,hT=ne.registerListStrictIndentTransform,pT=ne.removeList;var Al={};we(Al,{$createAutoLinkNode:()=>Is,$createLinkNode:()=>pn,$isAutoLinkNode:()=>Me,$isLinkNode:()=>Xe,$toggleLink:()=>qo,AutoLinkExtension:()=>zx,AutoLinkNode:()=>Qn,ClickableLinkExtension:()=>wx,LinkExtension:()=>vl,LinkNode:()=>jt,TOGGLE_LINK_COMMAND:()=>$s,createLinkMatcherWithRegExp:()=>Fx,formatUrl:()=>El,registerAutoLink:()=>yh,registerClickableLink:()=>hh,registerLink:()=>gh,toggleLink:()=>Hx});var Ix=new Set(["http:","https:","mailto:","sms:","tel:"]),jt=class n extends ot{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new n(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},o){super(o);let{target:r=null,rel:s=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=s,this.__title=i}createDOM(e){let t=document.createElement("a");return this.updateLinkDOM(null,t,e),Ut(t,e.theme.link),t}updateLinkDOM(e,t,o){if(Ss(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(let r of["target","rel","title"]){let s=`__${r}`,i=this[s];e&&e[s]===i||(i?t[r]=i:t.removeAttribute(r))}}}updateDOM(e,t,o){return this.updateLinkDOM(e,t,o),!1}static importDOM(){return{a:e=>({conversion:Lx,priority:1})}}static importJSON(e){return pn().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=El(e);try{let t=new URL(El(e));if(!Ix.has(t.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let o=pn(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(o,t),o}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,o){if(!D(t))return!1;let r=t.anchor.getNode(),s=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(s)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function ch(n){let e=Ft(n,"next");return[e,e.getFlipped()]}function uh(n,e){for(let t of e)if(t.origin.isAttached()){let o=cn(t);return void $o(n,o)}}function $x(n){let e=R(),t=null,o=null;D(e)&&(t=ch(e.anchor),o=ch(e.focus));for(let r of De(n,"next")){let s=r.origin;if($(s)&&!s.isInline()){let i=s.getChildren();if(i.length>0){let a=id(n);a.append(...i),s.append(a)}Bf(s,Gr(r),{$shouldSplit:()=>!1})}}if(n.isEmpty()){let r=n.getParent();n.remove(),r&&r.isEmpty()&&r.remove()}D(e)&&(uh(e.anchor,t),uh(e.focus,o),Bt(e))}function Lx(n){let e=null;if(Ss(n)){let t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=pn(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function pn(n="",e){return Nt(new jt(n,e))}function Xe(n){return n instanceof jt}var Qn=class n extends jt{__isUnlinked;constructor(e="",t={},o){super(e,t,o),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new n(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,o){return super.updateDOM(e,t,o)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return Is().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){let o=Is(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(o,t),o}};function Is(n="",e){return Nt(new Qn(n,e))}function Me(n){return n instanceof Qn}var $s=Le("TOGGLE_LINK_COMMAND");function dh(n,e){if(n.type==="element"){let t=n.getNode();return $(t)||(function(o,...r){let s=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",o);for(let a of r)i.append("v",a);throw s.search=i.toString(),Error(`Minified Lexical error #${o}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),t.getChildren()[n.offset+e]||null}return null}function qo(n,e={}){let t;if(n&&typeof n=="object"){let{url:u,...d}=n;t=u,e={...d,...e}}else t=n;let{target:o,title:r}=e,s=e.rel===void 0?"noreferrer":e.rel,i=R();if(i===null||!D(i)&&!he(i))return;if(he(i)){let u=i.getNodes();return u.length===0?void 0:void u.forEach(d=>{if(t===null){let f=be(d,h=>!Me(h)&&Xe(h));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{let f=be(d,h=>!Me(h)&&Xe(h));if(f)f.setURL(t),o!==void 0&&f.setTarget(o),s!==void 0&&f.setRel(s);else{let h=pn(t,{rel:s,target:o});d.insertBefore(h),h.append(d)}}})}if(i.isCollapsed()&&t===null)for(let u of i.getNodes()){let d=be(u,f=>!Me(f)&&Xe(f));return void(d!==null&&(d.getChildren().forEach(f=>{d.insertBefore(f)}),d.remove()))}let a=i.extract();if(t===null){let u=new Set;return void a.forEach(d=>{let f=be(d,h=>!Me(h)&&Xe(h));if(f!==null){let h=f.getKey();if(u.has(h))return;(function(g,p){let m=new Set(p.filter(C=>g.isParentOf(C)).map(C=>C.getKey())),x=g.getChildren(),y=C=>m.has(C.getKey())||$(C)&&p.some(S=>g.isParentOf(S)&&C.isParentOf(S)),N=x.filter(y);if(N.length===x.length)return x.forEach(C=>g.insertBefore(C)),void g.remove();let T=x.findIndex(y),O=x.findLastIndex(y),E=T===0,A=O===x.length-1;if(E)N.forEach(C=>g.insertBefore(C));else if(A)for(let C=N.length-1;C>=0;C--)g.insertAfter(N[C]);else{for(let S=N.length-1;S>=0;S--)g.insertAfter(N[S]);let C=x.slice(O+1);if(C.length>0){let S=pn(g.getURL(),{rel:g.getRel(),target:g.getTarget(),title:g.getTitle()});N[N.length-1].insertAfter(S),C.forEach(k=>S.append(k))}}})(f,a),u.add(h)}})}let l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(t),o!==void 0&&u.setTarget(o),s!==void 0&&u.setRel(s),r!==void 0&&u.setTitle(r))};if(a.length===1){let u=a[0],d=be(u,Xe);if(d!==null)return c(d)}(function(u){let d=R();if(!D(d))return u();let f=Bt(d),h=f.isBackward(),g=dh(f.anchor,h?-1:0),p=dh(f.focus,h?0:-1),m=u();if(g||p){let x=R();if(D(x)){let y=x.clone();if(g){let N=g.getParent();N&&y.anchor.set(N.getKey(),g.getIndexWithinParent()+(h?1:0),"element")}if(p){let N=p.getParent();N&&y.focus.set(N.getKey(),p.getIndexWithinParent()+(h?0:1),"element")}Ge(Bt(y))}}})(()=>{let u=null;for(let d of a){if(!d.isAttached())continue;let f=be(d,Xe);if(f){c(f);continue}if($(d)){if(!d.isInline())continue;if(Xe(d)){if(!(Me(d)||u!==null&&u.getParentOrThrow().isParentOf(d))){c(d),u=d;continue}for(let g of d.getChildren())d.insertBefore(g);d.remove();continue}}let h=d.getPreviousSibling();Xe(h)&&h.is(u)?h.append(d):(u=pn(t,{rel:s,target:o,title:r}),d.insertAfter(u),u.append(d))}})}var Px=/^\+?[0-9\s()-]{5,}$/;function El(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:Px.test(n)?`tel:${n}`:`https://${n}`}function gh(n,e){return Je(n.registerNodeTransform(jt,$x),qe(()=>n.registerCommand($s,t=>{let o=e.validateUrl.peek(),r=e.attributes.peek();if(t===null)return qo(null),!0;if(typeof t=="string")return!(o!==void 0&&!o(t))&&(qo(t,r),!0);{let{url:s,target:i,rel:a,title:l}=t;return qo(s,{...r,rel:a,target:i,title:l}),!0}},ie)),qe(()=>{let t=e.validateUrl.value;if(!t)return;let o=e.attributes.value;return n.registerCommand(us,r=>{let s=R();if(!D(s)||s.isCollapsed()||!Ve(r,ClipboardEvent)||r.clipboardData===null)return!1;let i=r.clipboardData.getData("text");return!!t(i)&&!s.getNodes().some(a=>$(a))&&(n.dispatchCommand($s,{...o,url:i}),r.preventDefault(),!0)},ie)}))}var vl=Z({build:(n,e,t)=>Et(e),config:{attributes:void 0,validateUrl:void 0},mergeConfig(n,e){let t=Wt(n,e);return n.attributes&&(t.attributes=Wt(n.attributes,t.attributes)),t},name:"@lexical/link/Link",nodes:()=>[jt],register:(n,e,t)=>gh(n,t.getOutput())});function hh(n,e,t={}){let o=s=>{let i=s.target;if(!Un(i))return;let a=gs(i);if(a===null)return;let l=null,c=null;if(a.update(()=>{let f=nt(i);if(f!==null){let h=be(f,$);if(!e.disabled.peek())if(Xe(h))l=h.sanitizeUrl(h.getURL()),c=h.getTarget();else{let g=(function(p,m){let x=p;for(;x!=null;){if(m(x))return x;x=x.parentNode}return null})(i,Ss);g!==null&&(l=g.href,c=g.target)}}}),l===null||l==="")return;let u=n.getEditorState().read(R);if(D(u)&&!u.isCollapsed())return void s.preventDefault();let d=s.type==="auxclick"&&s.button===1;window.open(l,e.newTab.peek()||d||s.metaKey||s.ctrlKey||c==="_blank"?"_blank":"_self"),s.preventDefault()},r=s=>{s.button===1&&o(s)};return n.registerRootListener((s,i)=>{i!==null&&(i.removeEventListener("click",o),i.removeEventListener("mouseup",r)),s!==null&&(s.addEventListener("click",o,t),s.addEventListener("mouseup",r,t))})}var wx=Z({build:(n,e,t)=>Et(e),config:ye({disabled:!1,newTab:!1}),dependencies:[vl],name:"@lexical/link/ClickableLink",register:(n,e,t)=>hh(n,t.getOutput())});function Fx(n,e=t=>t){return t=>{let o=n.exec(t);return o===null?null:{index:o.index,length:o[0].length,text:o[0],url:e(o[0])}}}function Ol(n,e){for(let t=0;t<e.length;t++){let o=e[t](n);if(o)return o}return null}var Kx=/[.,;\s]/;function Ls(n){return Kx.test(n)}function ph(n){return Ls(n[n.length-1])}function Ml(n){return Ls(n[0])}function mh(n){let e=n.getPreviousSibling();return $(e)&&(e=e.getLastDescendant()),e===null||Sa(e)||B(e)&&ph(e.getTextContent())}function _h(n){let e=n.getNextSibling();return $(e)&&(e=e.getFirstDescendant()),e===null||Sa(e)||B(e)&&Ml(e.getTextContent())}function Bx(n,e,t,o){return(n>0?Ls(t[n-1]):mh(o[0]))?e<t.length?Ls(t[e]):_h(o[o.length-1]):!1}function Wx(n,e,t){let o=[],r=[],s=[],i=0,a=0,l=[...n];for(;l.length>0;){let c=l[0],u=c.getTextContent().length,d=a;a+u<=e?(o.push(c),i+=u):d>=t?s.push(c):r.push(c),a+=u,l.shift()}return[i,o,r,s]}function Ux(n,e,t,o){let r=Is(o.url,o.attributes);if(n.length===1){let s,i=n[0];e===0?[s,i]=i.splitText(t):[,s,i]=i.splitText(e,t);let a=Kt(o.text);return a.setFormat(s.getFormat()),a.setDetail(s.getDetail()),a.setStyle(s.getStyle()),r.append(a),s.replace(r),i}if(n.length>1){let s=n[0],i,a=s.getTextContent().length;e===0?i=s:[,i]=s.splitText(e);let l=[],c;for(let h=1;h<n.length;h++){let g=n[h],p=g.getTextContent().length,m=a;if(m<t)if(a+p<=t)l.push(g);else{let[x,y]=g.splitText(t-m);l.push(x),c=y}a+=p}let u=R(),d=u?u.getNodes().find(B):void 0,f=Kt(i.getTextContent());return f.setFormat(i.getFormat()),f.setDetail(i.getDetail()),f.setStyle(i.getStyle()),r.append(f,...l),d&&d===i&&(D(u)?f.select(u.anchor.offset,u.focus.offset):he(u)&&f.select(0,f.getTextContent().length)),i.replace(r),c}}function fh(n,e,t){let o=n.getChildren(),r=o.length;for(let l=0;l<r;l++){let c=o[l];if(!B(c)||!c.isSimpleText())return Xo(n),void t(null,n.getURL())}let s=n.getTextContent(),i=Ol(s,e);if(i===null||i.text!==s||!mh(n)||!_h(n))return Xo(n),void t(null,n.getURL());let a=n.getURL();if(a!==i.url&&(n.setURL(i.url),t(i.url,a)),i.attributes){let l=n.getRel();l!==i.attributes.rel&&(n.setRel(i.attributes.rel||null),t(i.attributes.rel||null,l));let c=n.getTarget();c!==i.attributes.target&&(n.setTarget(i.attributes.target||null),t(i.attributes.target||null,c))}}function Xo(n){let e=n.getChildren();for(let t=e.length-1;t>=0;t--)n.insertAfter(e[t]);return n.remove(),e.map(t=>t.getLatest())}var xh={changeHandlers:[],excludeParents:[],matchers:[]};function yh(n,e=xh){let{matchers:t,changeHandlers:o,excludeParents:r}=e,s=(i,a)=>{for(let l of o)l(i,a)};return Je(n.registerNodeTransform(Wn,i=>{let a=i.getParentOrThrow(),l=i.getPreviousSibling();if(Me(a)&&!a.getIsUnlinked())fh(a,t,s);else if(!Xe(a)&&!r.some(c=>c(a))){if(i.isSimpleText()&&(Ml(i.getTextContent())||!Me(l))){let c=(function(u){let d=[u],f=u.getNextSibling();for(;f!==null&&B(f)&&f.isSimpleText()&&(d.push(f),!/[\s]/.test(f.getTextContent()));)f=f.getNextSibling();return d})(i);(function(u,d,f){for(let y of u){let N=y.getParent();if(Me(N)&&!N.getIsUnlinked())return}let h=[...u],g=h.map(y=>y.getTextContent()).join(""),p,m=g,x=0;for(;(p=Ol(m,d))&&p!==null;){let y=p.index,N=y+p.length;if(Bx(x+y,x+N,g,h)){let[T,,O,E]=Wx(h,x+y,x+N),A=!1;for(let S of O){let k=S.getParent();if(Me(k)&&!k.getIsUnlinked()){A=!0;break}}if(A){x+=N,m=m.substring(N);continue}let C=Ux(O,x+y-T,x+N-T,p);h=C?[C,...E]:E,f(p.url,null),x=0}else x+=N;m=m.substring(N)}})(c,t,s)}(function(c,u,d){let f=c.getParent(),h=c.getPreviousSibling(),g=c.getNextSibling(),p=c.getTextContent();if(!Me(f)||f.getIsUnlinked()){if(Me(h)&&!h.getIsUnlinked()&&h.is(c.getPreviousSibling())&&c.getParent()===h.getParent()){if(!Ml(p))return Xo(h),void d(null,h.getURL());if(m=p,h.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(m):/^\.[a-zA-Z0-9]{1,}/.test(m)){let x=h.getTextContent()+p,y=Ol(x,u);y!==null&&y.text===x&&(h.append(c),fh(h,u,d),d(null,h.getURL()))}}var m;!Me(g)||g.getIsUnlinked()||ph(p)||g.is(c.getNextSibling())&&c.getParent()===g.getParent()&&(Xo(g),d(null,g.getURL()))}})(i,t,s)}}),n.registerCommand($s,i=>{let a=R();return i!==null||!D(a)||a.extract().forEach(l=>{let c=l.getParent();Me(c)&&(c.setIsUnlinked(!c.getIsUnlinked()),c.markDirty())}),!1},ie))}var zx=Z({config:xh,dependencies:[vl],mergeConfig(n,e){let t=Wt(n,e);for(let o of["matchers","changeHandlers","excludeParents"]){let r=e[o];Array.isArray(r)&&(t[o]=[...n[o],...r])}return t},name:"@lexical/link/AutoLink",nodes:[Qn],register:yh}),Hx=qo;var _e=Al,NT=_e.$createAutoLinkNode,CT=_e.$createLinkNode,ST=_e.$isAutoLinkNode,TT=_e.$isLinkNode,ET=_e.$toggleLink,OT=_e.AutoLinkExtension,MT=_e.AutoLinkNode,vT=_e.ClickableLinkExtension,AT=_e.LinkExtension,Nh=_e.LinkNode,Ch=_e.TOGGLE_LINK_COMMAND,DT=_e.createLinkMatcherWithRegExp,bT=_e.formatUrl,RT=_e.registerAutoLink,kT=_e.registerClickableLink,IT=_e.registerLink,$T=_e.toggleLink;var Dl={};we(Dl,{HistoryExtension:()=>Ps,SharedHistoryExtension:()=>jx,createEmptyHistoryState:()=>Eh,registerHistory:()=>Th});function Yx(n,e,t,o,r){if(n===null||t.size===0&&o.size===0&&!r)return 0;let s=e._selection,i=n._selection;if(r)return 1;if(!(D(s)&&D(i)&&i.isCollapsed()&&s.isCollapsed()))return 0;let a=(function(x,y,N){let T=x._nodeMap,O=[];for(let E of y){let A=T.get(E);A!==void 0&&O.push(A)}for(let[E,A]of N){if(!A)continue;let C=T.get(E);C===void 0||ln(C)||O.push(C)}return O})(e,t,o);if(a.length===0)return 0;if(a.length>1){let x=e._nodeMap,y=x.get(s.anchor.key),N=x.get(i.anchor.key);return y&&N&&!n._nodeMap.has(y.__key)&&B(y)&&y.__text.length===1&&s.anchor.offset===1?2:0}let l=a[0],c=n._nodeMap.get(l.__key);if(!B(c)||!B(l)||c.__mode!==l.__mode)return 0;let u=c.__text,d=l.__text;if(u===d)return 0;let f=s.anchor,h=i.anchor;if(f.key!==h.key||f.type!=="text")return 0;let g=f.offset,p=h.offset,m=d.length-u.length;return m===1&&p===g-1?2:m===-1&&p===g+1?3:m===-1&&p===g?4:0}function Gx(n,e){let t=Date.now(),o=0,r=Date.now(),s=0,i=null;return(a,l,c,u,d,f)=>{let h=Date.now();if(f.has(Od)&&(r=t,s=o,i=a),f.has(ts))return o=0,t=h,2;f.has(Ed)&&i&&(t=r,o=s,a=i);let g=Yx(a,l,u,d,n.isComposing()),p=(()=>{let m=c===null||c.editor===n,x=f.has($d);if(!x&&m&&f.has(ns))return 0;if(g===1)return 2;if(a===null)return 1;let y=l._selection;if(!(u.size>0||d.size>0))return y!==null?0:2;let N=typeof e=="number"?e:e.peek();return x===!1&&g!==0&&g===o&&h<t+N&&m||u.size===1&&(function(T,O,E){let A=O._nodeMap.get(T),C=E._nodeMap.get(T),S=O._selection,k=E._selection;return!(D(S)&&D(k)&&S.anchor.type==="element"&&S.focus.type==="element"&&k.anchor.type==="text"&&k.focus.type==="text"||!B(A)||!B(C)||A.__parent!==C.__parent)&&JSON.stringify(O.read(()=>A.exportJSON()))===JSON.stringify(E.read(()=>C.exportJSON()))})(Array.from(u)[0],a,l)?0:1})();return t=h,o=g,p}}function Sh(n){n.undoStack=[],n.redoStack=[],n.current=null}function Th(n,e,t){let o=Gx(n,t);return Je(n.registerCommand(Xd,()=>((function(s,i){let a=i.redoStack,l=i.undoStack;if(l.length!==0){let c=i.current,u=l.pop();c!==null&&(a.push(c),s.dispatchCommand(Lo,!0)),l.length===0&&s.dispatchCommand(Po,!1),i.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:ts})}})(n,e),!0),W),n.registerCommand(Ud,()=>((function(s,i){let a=i.redoStack,l=i.undoStack;if(a.length!==0){let c=i.current;c!==null&&(l.push(c),s.dispatchCommand(Po,!0));let u=a.pop();a.length===0&&s.dispatchCommand(Lo,!1),i.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:ts})}})(n,e),!0),W),n.registerCommand(Vr,()=>(Sh(e),!1),W),n.registerCommand(Td,()=>(Sh(e),n.dispatchCommand(Lo,!1),n.dispatchCommand(Po,!1),!0),W),n.registerUpdateListener(({editorState:s,prevEditorState:i,dirtyLeaves:a,dirtyElements:l,tags:c})=>{let u=e.current,d=e.redoStack,f=e.undoStack,h=u===null?null:u.editorState;if(u!==null&&s===h)return;let g=o(i,s,u,a,l,c);if(g===1)d.length!==0&&(e.redoStack=[],n.dispatchCommand(Lo,!1)),u!==null&&(f.push({...u}),n.dispatchCommand(Po,!0));else if(g===2)return;e.current={editor:n,editorState:s}}))}function Eh(){return{current:null,redoStack:[],undoStack:[]}}var Ps=Z({build:(n,{delay:e,createInitialHistoryState:t,disabled:o})=>Et({delay:e,disabled:o,historyState:t(n)}),config:ye({createInitialHistoryState:Eh,delay:300,disabled:typeof window>"u"}),name:"@lexical/history/History",register:(n,e,t)=>{let o=t.getOutput();return qe(()=>o.disabled.value?void 0:Th(n,o.historyState.value,o.delay))}}),jx=Z({dependencies:[ds(Ps,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0})],name:"@lexical/history/SharedHistory",register(n,e,t){let{output:o}=t.getDependency(Ps),r=(function(i){return i?Eg(i,Ps.name):null})(n._parentEditor);if(!r)return()=>{};let s=r.output;return qe(()=>Tg(()=>{o.delay.value=s.delay.value,o.historyState.value=s.historyState.value,o.disabled.value=s.disabled.value}))}});var ws=Dl,KT=ws.HistoryExtension,BT=ws.SharedHistoryExtension,Oh=ws.createEmptyHistoryState,Mh=ws.registerHistory;var Jx=[{label:"B",type:"format-bold"},{label:"I",type:"format-italic"},{label:"U",type:"format-underline"},{label:"H2",type:"heading"},{label:"UL",type:"bullet-list"},{label:"OL",type:"number-list"},{label:"Quote",type:"blockquote"},{label:"Code",type:"format-code"}];function vh(n,e){n.update(()=>{let t=R();D(t)&&Cf(t,e)})}var Vx={"format-bold":n=>n.dispatchCommand(Tt,"bold"),"format-italic":n=>n.dispatchCommand(Tt,"italic"),"format-underline":n=>n.dispatchCommand(Tt,"underline"),"format-code":n=>n.dispatchCommand(Tt,"code"),heading:n=>vh(n,()=>Ig("h2")),"bullet-list":n=>n.dispatchCommand(sh,void 0),"number-list":n=>n.dispatchCommand(rh,void 0),blockquote:n=>vh(n,()=>$g())};function qx(n,e){let t=Vx[e.type];t&&t(n)}function Xx(n){let e=document.createElement("div");e.className="richtext-toolbar";for(let o of Jx){let r=document.createElement("button");r.type="button",r.className="richtext-toolbar-btn",r.textContent=o.label,r.addEventListener("click",s=>{s.preventDefault(),qx(n,o)}),e.appendChild(r)}let t=document.createElement("button");return t.type="button",t.className="richtext-toolbar-btn",t.textContent="Link",t.addEventListener("click",o=>{o.preventDefault();let r=prompt("Enter URL:");r&&n.dispatchCommand(Ch,r)}),e.appendChild(t),e}function Qx(n){let e=n.getAttribute("data-field");if(!e)return;let t=n.closest(".richtext-wrap");if(!t)return;let o=t.querySelector(`input[name="${e}"]`);if(!o)return;let s=t.querySelector("template.richtext-initial")?.innerHTML??"",i={namespace:`richtext-${e}`,nodes:[Lg,Pg,ah,ih,Nh],onError:u=>{console.error("Lexical error:",u)},theme:{paragraph:"richtext-p",heading:{h2:"richtext-h2",h3:"richtext-h3"},text:{bold:"richtext-bold",italic:"richtext-italic",underline:"richtext-underline",code:"richtext-code"},list:{ul:"richtext-ul",ol:"richtext-ol",listitem:"richtext-li"},quote:"richtext-quote",link:"richtext-link"}},a=fs(i),l=Xx(a);n.parentElement?.insertBefore(l,n);let c=document.createElement("div");c.contentEditable="true",c.className="richtext-content",n.appendChild(c),a.setRootElement(c),wg(a),lh(a),Mh(a,Oh(),300),s&&a.update(()=>{let d=new DOMParser().parseFromString(s,"text/html"),f=Es(a,d);Ce().clear(),Hr(f)}),a.registerUpdateListener(({editorState:u})=>{u.read(()=>{let d=Ts(a);o.value=d})})}function Ah(){let n=document.querySelectorAll(".richtext-editor");for(let e of n)Qx(e)}Ah();kl();var Dh=document.querySelector(".delete-trigger"),Zn=document.getElementById("delete-dialog"),bh=document.getElementById("delete-cancel"),Rh=document.getElementById("delete-confirm"),kh=document.getElementById("delete-form");Dh&&Zn&&Dh.addEventListener("click",()=>{typeof Zn.show=="function"&&Zn.show()});bh&&Zn&&bh.addEventListener("click",()=>{typeof Zn.close=="function"&&Zn.close()});Rh&&kh&&Rh.addEventListener("click",()=>{kh.submit()});var Zx=document.querySelectorAll(".media-drop-zone");for(let n of Zx){let e=n.getAttribute("data-upload-endpoint"),t=n.querySelector('input[type="file"]'),o=n.querySelector('input[type="hidden"]'),r=n.querySelector(".media-preview");!e||!t||!o||t.addEventListener("change",async()=>{let s=t.files?.[0];if(!s)return;let i=new FormData;i.append("file",s);try{let l=await(await fetch(e,{method:"POST",body:i})).json(),c=l.id??l.filename??"";o.value=c,r&&(s.type.startsWith("image/")?r.innerHTML=`<img src="/media/${c}" alt="">`:r.innerHTML=`<span>${s.name}</span>`)}catch{r&&(r.innerHTML='<span style="color: var(--val-color-error);">Upload failed</span>')}})}})();
|
package/dist/api/local-api.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ResultAsync } from 'neverthrow';
|
|
2
2
|
import type { DbPool } from '@valencets/db';
|
|
3
|
-
import type { CollectionRegistry } from '../schema/registry.js';
|
|
4
|
-
import type { GlobalRegistry } from '../schema/registry.js';
|
|
3
|
+
import type { CollectionRegistry, GlobalRegistry } from '../schema/registry.js';
|
|
5
4
|
import type { CmsError } from '../schema/types.js';
|
|
6
5
|
import type { DocumentRow, DocumentData } from '../db/query-builder.js';
|
|
7
6
|
import type { PaginatedResult } from '../db/query-types.js';
|
|
@@ -17,6 +16,8 @@ export interface FindArgs {
|
|
|
17
16
|
readonly search?: string | undefined;
|
|
18
17
|
readonly limit?: number | undefined;
|
|
19
18
|
readonly filters?: Record<string, string> | undefined;
|
|
19
|
+
readonly includeDrafts?: boolean | undefined;
|
|
20
|
+
readonly locale?: string | undefined;
|
|
20
21
|
}
|
|
21
22
|
interface FindByIDArgs {
|
|
22
23
|
readonly collection: string;
|
|
@@ -25,11 +26,16 @@ interface FindByIDArgs {
|
|
|
25
26
|
interface CreateArgs {
|
|
26
27
|
readonly collection: string;
|
|
27
28
|
readonly data: DocumentData;
|
|
29
|
+
readonly draft?: boolean | undefined;
|
|
30
|
+
readonly locale?: string | undefined;
|
|
28
31
|
}
|
|
29
32
|
interface UpdateArgs {
|
|
30
33
|
readonly collection: string;
|
|
31
34
|
readonly id: string;
|
|
32
35
|
readonly data: DocumentData;
|
|
36
|
+
readonly publish?: boolean | undefined;
|
|
37
|
+
readonly draft?: boolean | undefined;
|
|
38
|
+
readonly locale?: string | undefined;
|
|
33
39
|
}
|
|
34
40
|
interface DeleteArgs {
|
|
35
41
|
readonly collection: string;
|
|
@@ -46,6 +52,10 @@ interface UpdateGlobalArgs {
|
|
|
46
52
|
readonly slug: string;
|
|
47
53
|
readonly data: DocumentData;
|
|
48
54
|
}
|
|
55
|
+
interface UnpublishArgs {
|
|
56
|
+
readonly collection: string;
|
|
57
|
+
readonly id: string;
|
|
58
|
+
}
|
|
49
59
|
export interface LocalApi {
|
|
50
60
|
find(args: FindArgs): ResultAsync<DocumentRow[] | PaginatedResult<DocumentRow>, CmsError>;
|
|
51
61
|
findByID(args: FindByIDArgs): ResultAsync<DocumentRow | null, CmsError>;
|
|
@@ -55,7 +65,8 @@ export interface LocalApi {
|
|
|
55
65
|
count(args: CountArgs): ResultAsync<number, CmsError>;
|
|
56
66
|
findGlobal(args: FindGlobalArgs): ResultAsync<DocumentRow | null, CmsError>;
|
|
57
67
|
updateGlobal(args: UpdateGlobalArgs): ResultAsync<DocumentRow, CmsError>;
|
|
68
|
+
unpublish(args: UnpublishArgs): ResultAsync<DocumentRow, CmsError>;
|
|
58
69
|
}
|
|
59
|
-
export declare function createLocalApi(pool: DbPool, collections: CollectionRegistry, globals: GlobalRegistry): LocalApi;
|
|
70
|
+
export declare function createLocalApi(pool: DbPool, collections: CollectionRegistry, globals: GlobalRegistry, defaultLocale?: string): LocalApi;
|
|
60
71
|
export {};
|
|
61
72
|
//# sourceMappingURL=local-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-api.d.ts","sourceRoot":"","sources":["../../src/api/local-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"local-api.d.ts","sourceRoot":"","sources":["../../src/api/local-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqB,MAAM,YAAY,CAAA;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAY,MAAM,sBAAsB,CAAA;AASrE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,CAAA;IAC7E,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE,GAAG,SAAS,CAAA;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAA;IACrD,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACrC;AAED,UAAU,YAAY;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CACpB;AAED,UAAU,UAAU;IAClB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACrC;AAED,UAAU,UAAU;IAClB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACrC;AAED,UAAU,UAAU;IAClB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CACpB;AAED,UAAU,SAAS;IACjB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,CAAA;CAC9E;AAED,UAAU,cAAc;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,UAAU,gBAAgB;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAC5B;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAE,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAA;IAC1F,QAAQ,CAAE,IAAI,EAAE,YAAY,GAAG,WAAW,CAAC,WAAW,GAAG,IAAI,EAAE,QAAQ,CAAC,CAAA;IACxE,MAAM,CAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;IAC7D,MAAM,CAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;IAC7D,MAAM,CAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;IAC7D,KAAK,CAAE,IAAI,EAAE,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACtD,UAAU,CAAE,IAAI,EAAE,cAAc,GAAG,WAAW,CAAC,WAAW,GAAG,IAAI,EAAE,QAAQ,CAAC,CAAA;IAC5E,YAAY,CAAE,IAAI,EAAE,gBAAgB,GAAG,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;IACzE,SAAS,CAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;CACpE;AAuFD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,kBAAkB,EAC/B,OAAO,EAAE,cAAc,EACvB,aAAa,CAAC,EAAE,MAAM,GACrB,QAAQ,CA8JV"}
|