@isardsat/editorial-admin 6.0.6 → 6.1.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/build/client/assets/{authSlice-B3Tyl-Nw.js → authSlice-C1VgtCUs.js} +211 -182
- package/build/client/assets/button-D7P-1kQx.js +1 -0
- package/build/client/assets/{chevron-down-D_Gla76b.js → chevron-down-DTegokyb.js} +1 -1
- package/build/client/assets/chunk-QMGIS6GS-BoPxQm7X.js +51 -0
- package/build/client/assets/{createLucideIcon-R2-3a7hN.js → createLucideIcon-CEJSFbyG.js} +1 -1
- package/build/client/assets/dashboard-Bq2GbE6X.js +1 -0
- package/build/client/assets/dashboard._collection-BWEvWDTh.js +16 -0
- package/build/client/assets/dashboard._collection._document-BkkancgH.js +1 -0
- package/build/client/assets/dashboard._collection.new-B-tJAKkX.js +1 -0
- package/build/client/assets/dashboard._layout-DoAIhr2p.js +61 -0
- package/build/client/assets/dashboard.files-C7Nji4gT.js +36 -0
- package/build/client/assets/editorialApi-C-fP7K3Z.js +1 -0
- package/build/client/assets/entry.client-B2XAvOmi.js +34 -0
- package/build/client/assets/home-C_M0Cqq5.js +11 -0
- package/build/client/assets/index-C4BMMXbp.js +1 -0
- package/build/client/assets/{index-C-vcF2DZ.js → index-CvFp8wi_.js} +2 -2
- package/build/client/assets/index-DWY8ISpx.js +50 -0
- package/build/client/assets/index-ofqdEjlP.js +22 -0
- package/build/client/assets/input-BScD3Ruq.js +6 -0
- package/build/client/assets/itemForm-BIVbiH-T.js +95 -0
- package/build/client/assets/itemForm-BVtnhZqg.css +1 -0
- package/build/client/assets/manifest-4579fceb.js +1 -0
- package/build/client/assets/react-redux-CRJHAKt_.js +9 -0
- package/build/client/assets/root-CFn4sGwt.js +1 -0
- package/build/client/assets/root-DGV68qoS.css +1 -0
- package/build/client/assets/{trash-wq_ppIxP.js → trash-DN4yNrfZ.js} +1 -1
- package/build/client/assets/{tslib.es6-CDuPK5Eb.js → tslib.es6-De9GV7Vy.js} +1 -1
- package/build/client/assets/utils-BSDwSRl3.js +1 -0
- package/build/client/index.html +5 -5
- package/package.json +3 -4
- package/build/client/assets/button-Da66T3Bb.js +0 -1
- package/build/client/assets/chunk-KNED5TY2-DAA_sFzt.js +0 -51
- package/build/client/assets/dashboard-BTu7-8Ba.js +0 -1
- package/build/client/assets/dashboard._collection-MtSHvYYW.js +0 -16
- package/build/client/assets/dashboard._collection._document-CRkC98aa.js +0 -1
- package/build/client/assets/dashboard._collection.new-BFe8yV0Z.js +0 -1
- package/build/client/assets/dashboard._layout-BjRnQPQr.js +0 -66
- package/build/client/assets/dashboard.files-DKh39mcB.js +0 -36
- package/build/client/assets/editorialApi-fQchmMa9.js +0 -1
- package/build/client/assets/entry.client-BGu2H8xv.js +0 -34
- package/build/client/assets/home-C2nWtN4c.js +0 -11
- package/build/client/assets/index-Bd1u2_LZ.js +0 -45
- package/build/client/assets/index-BvKqmqc2.js +0 -1
- package/build/client/assets/index-DeO5nu0f.js +0 -22
- package/build/client/assets/input-BmmdOdbj.js +0 -6
- package/build/client/assets/itemForm-CDbHkFXh.css +0 -1
- package/build/client/assets/itemForm-DlRBjBsd.js +0 -90
- package/build/client/assets/manifest-2ff77582.js +0 -1
- package/build/client/assets/react-redux-kbMjYGuQ.js +0 -9
- package/build/client/assets/root-DS7N36v7.css +0 -1
- package/build/client/assets/root-wKvfXBjk.js +0 -1
- package/build/client/assets/utils-DslUJpbf.js +0 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
var s5=Object.defineProperty;var l5=(e,t,n)=>t in e?s5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bt=(e,t,n)=>l5(e,typeof t!="symbol"?t+"":t,n);import{a as N,y as S,o as P,z as $h,A as Uc,v as a5}from"./chunk-QMGIS6GS-BoPxQm7X.js";import{u as at,a as Bo,B as u5}from"./button-D7P-1kQx.js";import{h as c5,u as fu,i as d5,I as Yl,F as f5,b as sl,c as ll,d as po,e as al,j as ul,f as cl,C as h5}from"./input-BScD3Ruq.js";import{m as g5,n as p5}from"./editorialApi-C-fP7K3Z.js";import{c as m5}from"./utils-BSDwSRl3.js";import{a as zo}from"./index-CvFp8wi_.js";import{h as vs,i as Dh,u as Ki,j as hu,k as Vh,l as Hh,m as Bh,n as zh,o as jh,F as Uh,p as Wh,q as Jh,r as Kh,b as x5,R as y5,P as b5,O as v5,C as _5,T as C5,a as w5,V as k5,c as Zh,d as Gh,e as qh,f as Yh,g as Xh,A as S5,E as E5}from"./index-DWY8ISpx.js";import{_ as Wc}from"./tslib.es6-De9GV7Vy.js";import{u as sr,c as qr,b as Qh,a as ye,P as Re,d as Pn}from"./index-C4BMMXbp.js";import{c as T5}from"./createLucideIcon-CEJSFbyG.js";/**
|
|
2
|
+
* @license lucide-react v0.487.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const I5=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],A5=T5("save",I5);var N5=Object.defineProperty,L5=(e,t,n)=>t in e?N5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,In=(e,t,n)=>L5(e,typeof t!="symbol"?t+"":t,n);let F5=class eg{constructor(t=new Map){this.map=t}clone(){return new eg(new Map(this.map))}increment(t){const n=this.map.get(t)??0;this.map.set(t,n+1)}decrement(t,n){let r=this.map.get(t);r!==void 0&&(r-=1,this.map.set(t,r),r===0&&n())}},mo=class{constructor(){In(this,"map",new Map)}getOrCreate(t){let n=this.map.get(t);return n===void 0&&(n=new Set,this.map.set(t,n)),n}get(t){return this.map.get(t)}use(t,n){const r=this.get(t);r!==void 0&&n(r)}delete(t){return this.map.delete(t)}};function tr(e,t){return t(e),e}function gu(){}const tg="cell";function Jc(e,t){return e===t}const _s=new Map;let P5=class{constructor(t={}){In(this,"subscriptions",new mo),In(this,"singletonSubscriptions",new Map),In(this,"graph",new mo),In(this,"state",new Map),In(this,"distinctNodes",new Map),In(this,"executionMaps",new Map),In(this,"definitionRegistry",new Set);for(const n of Object.getOwnPropertySymbols(t))this.state.set(n,t[n])}cellInstance(t,n=!0,r=Symbol()){return this.state.has(r)||this.state.set(r,t),n!==!1&&!this.distinctNodes.has(r)&&this.distinctNodes.set(r,n===!0?Jc:n),r}signalInstance(t=!0,n=Symbol()){return t!==!1&&this.distinctNodes.set(n,t===!0?Jc:t),n}sub(t,n){this.register(t);const r=this.subscriptions.getOrCreate(t);return r.add(n),()=>r.delete(n)}singletonSub(t,n){return this.register(t),n===void 0?this.singletonSubscriptions.delete(t):this.singletonSubscriptions.set(t,n),()=>this.singletonSubscriptions.delete(t)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(t,n){const r=this.signalInstance();return this.connect({map:i=>(...o)=>{i(o)},sink:r,sources:t}),this.sub(r,n)}pubIn(t){var n;const r=Reflect.ownKeys(t),i=this.getExecutionMap(r),o=i.refCount.clone(),s=i.participatingNodes.slice(),l=new Map(this.state),a=u=>{this.graph.use(u,c=>{for(const{sources:d,sink:f}of c)d.has(u)&&o.decrement(f,()=>{s.splice(s.indexOf(f),1),a(f)})})};for(;;){const u=s.shift();if(u===void 0)break;const c=u;let d=!1;const f=h=>{const g=this.distinctNodes.get(c);if(g!=null&&g(l.get(c),h)){d=!1;return}d=!0,l.set(c,h),this.state.has(c)&&this.state.set(c,h)};if(Object.prototype.hasOwnProperty.call(t,c)?f(t[c]):i.projections.use(c,h=>{for(const g of h){const x=[...Array.from(g.sources),...Array.from(g.pulls)].map(b=>l.get(b));g.map(f)(...x)}}),d){const h=l.get(c);this.inContext(()=>{this.subscriptions.use(c,g=>{for(const x of g)x(h)})}),(n=this.singletonSubscriptions.get(c))==null||n(h)}else a(c)}}connect({sources:t,pulls:n=[],map:r,sink:i}){const o={map:r,pulls:new Set(n),sink:this.register(i),sources:new Set(t)};for(const s of[...t,...n])this.register(s),this.graph.getOrCreate(s).add(o);this.executionMaps.clear()}pub(t,n){this.pubIn({[t]:n})}pipe(t,...n){return this.combineOperators(...n)(t)}transformer(...t){return n=>tr(this.signalInstance(),r=>(this.link(this.pipe(r,...t),n),r))}link(t,n){this.connect({map:r=>i=>{r(i)},sink:n,sources:[t]})}combine(...t){return tr(this.signalInstance(),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}combineCells(...t){return tr(this.cellInstance(t.map(n=>this.getValue(n)),!0),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}getValue(t){return this.register(t),this.state.get(t)}getValues(t){return t.map(n=>this.getValue(n))}register(t){const n=_s.get(t);return n===void 0||this.definitionRegistry.has(t)?t:(this.definitionRegistry.add(t),tr(n.type===tg?this.cellInstance(n.initial,n.distinct,t):this.signalInstance(n.distinct,t),r=>{this.inContext(()=>{n.init(this,r)})}))}inContext(t){return t()}changeWith(t,n,r){this.connect({sources:[n],pulls:[t],sink:t,map:i=>(o,s)=>{i(r(s,o))}})}calculateExecutionMap(t){const n=[],r=new Set,i=new mo,o=new F5,s=new mo,l=(a,u=0)=>{o.increment(a),!r.has(a)&&(this.register(a),i.use(a,c=>{u=Math.max(...Array.from(c).map(d=>n.indexOf(d)))+1}),this.graph.use(a,c=>{for(const d of c)d.sources.has(a)?(s.getOrCreate(d.sink).add(d),l(d.sink,u)):i.getOrCreate(d.sink).add(a)}),r.add(a),n.splice(u,0,a))};return t.forEach(l),{participatingNodes:n,pendingPulls:i,projections:s,refCount:o}}getExecutionMap(t){let n=t;if(t.length===1){n=t[0];const i=this.executionMaps.get(n);if(i!==void 0)return i}else for(const[i,o]of this.executionMaps.entries())if(Array.isArray(i)&&i.length===t.length&&i.every(s=>t.includes(s)))return o;const r=this.calculateExecutionMap(t);return this.executionMaps.set(n,r),r}combineOperators(...t){return n=>{for(const r of t)n=r(n,this);return n}}};function te(e,t=gu,n=!0){return tr(Symbol(),r=>{_s.set(r,{type:tg,distinct:n,initial:e,init:t})})}function We(e=gu,t=!1){return tr(Symbol(),n=>{_s.set(n,{type:"signal",distinct:t,init:e})})}function $n(e=gu){return tr(Symbol(),t=>{_s.set(t,{type:"signal",distinct:!1,init:e})})}const ng=N.createContext(null);function Cs(){const e=N.useContext(ng);if(e===null)throw new Error("useRealm must be used within a RealmContextProvider");return e}function wt(e){const t=Cs();t.register(e);const n=N.useCallback(r=>t.sub(e,r),[t,e]);return N.useSyncExternalStore(n,()=>t.getValue(e),()=>t.getValue(e))}function nn(...e){const t=Cs();return wt(t.combineCells.apply(t,e))}function xt(e){const t=Cs();return t.register(e),N.useCallback(n=>{t.pub(e,n)},[t,e])}function Fr(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>o=>{i(e(o))},sink:r,sources:[t]}),r}}function Pe(...e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>(...o)=>{i(o)},pulls:e,sink:r,sources:[t]}),r}}function rg(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>()=>{i(e)},sink:r,sources:[t]}),r}}function Zi(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>o=>{e(o)&&i(o)},sink:r,sources:[t]}),r}}function ig(e,t){return(n,r)=>{const i=r.signalInstance();return r.connect({map:o=>s=>{o(t=e(t,s))},sink:i,sources:[n]}),i}}function M5(e,t){return t(e),e}function Pr(){}function Vt(e){return function(t){return{init:n=>{var r;return(r=e.init)==null?void 0:r.call(e,n,t)},postInit:n=>{var r;return(r=e.postInit)==null?void 0:r.call(e,n,t)},update:n=>{var r;return(r=e.update)==null?void 0:r.call(e,n,t)}}}}function R5({children:e,plugins:t}){const n=S.useMemo(()=>M5(new P5,r=>{var i,o;for(const s of t)(i=s.init)==null||i.call(s,r);for(const s of t)(o=s.postInit)==null||o.call(s,r)}),[]);return S.useEffect(()=>{var r;for(const i of t)(r=i.update)==null||r.call(i,n)}),S.createElement(ng.Provider,{value:n},e)}const og=N.createContext(null);function O5(e,t){return{getTheme:function(){return t??null}}}function rt(){const e=N.useContext(og);return e==null&&function(t,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const o of n)i.append("v",o);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}function z(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Ht=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,$5=Ht&&"documentMode"in document?document.documentMode:null,It=Ht&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Fn=Ht&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),jo=!(!Ht||!("InputEvent"in window)||$5)&&"getTargetRanges"in new window.InputEvent("input"),Mi=Ht&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Vr=Ht&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,D5=Ht&&/Android/.test(navigator.userAgent),sg=Ht&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Kc=Ht&&D5&&sg,Uo=Ht&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!sg;function Wo(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}const V5=1,H5=3,B5=9,z5=11,lr=0,lg=1,Hr=2,j5=0,U5=1,W5=2,Jo=4,Ko=8,pu=128,J5=1792|(112|(3|Jo|Ko)|pu),mu=1,xu=2,yu=3,bu=4,vu=5,_u=6,ws=Mi||Vr||Uo?" ":"",yn=`
|
|
7
|
+
|
|
8
|
+
`,K5=Fn?" ":ws,ag="֑-߿יִ-﷽ﹰ-ﻼ",ug="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Z5=new RegExp("^[^"+ug+"]*["+ag+"]"),G5=new RegExp("^[^"+ag+"]*["+ug+"]"),ar={bold:1,capitalize:1024,code:16,highlight:pu,italic:2,lowercase:256,strikethrough:Jo,subscript:32,superscript:64,underline:Ko,uppercase:512},q5={directionless:1,unmergeable:2},Zc={center:xu,end:_u,justify:bu,left:mu,right:yu,start:vu},Y5={[xu]:"center",[_u]:"end",[bu]:"justify",[mu]:"left",[yu]:"right",[vu]:"start"},X5={normal:0,segmented:2,token:1},Q5={[j5]:"normal",[W5]:"segmented",[U5]:"token"},ex="$";function cg(e,t,n,r,i,o){let s=e.getFirstChild();for(;s!==null;){const l=s.__key;s.__parent===t&&(O(s)&&cg(s,l,n,r,i,o),n.has(l)||o.delete(l),i.push(l)),s=s.getNextSibling()}}const tx=100;let Xl=!1,Cu=0;function nx(e){Cu=e.timeStamp}function dl(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Ds(e,n)!==void 0}function rx(e,t,n){const r=Ot(kt(n));let i=null,o=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,o=r.focusOffset);const s=e.nodeValue;s!==null&&Wu(t,s,i,o,!1)}function ix(e,t,n){if(D(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return Cn(t)&&n.isAttached()}function ox(e,t,n,r){for(let i=e;i&&!Jx(i);i=io(i)){const o=Ds(i,t);if(o!==void 0){const s=Fe(o,n);if(s)return xe(s)||!$e(i)?void 0:[i,s]}else if(i===r)return[r,Yg(n)]}}function dg(e,t,n){Xl=!0;const r=performance.now()-Cu>tx;try{vt(e,()=>{const i=U()||function(f){return f.getEditorState().read(()=>{const h=U();return h!==null?h.clone():null})}(e),o=new Map,s=e.getRootElement(),l=e._editorState,a=e._blockCursorElement;let u=!1,c="";for(let f=0;f<t.length;f++){const h=t[f],g=h.type,x=h.target,b=ox(x,e,l,s);if(!b)continue;const[y,m]=b;if(g==="characterData")r&&J(m)&&Cn(x)&&ix(i,x,m)&&rx(x,m,e);else if(g==="childList"){u=!0;const p=h.addedNodes;for(let _=0;_<p.length;_++){const C=p[_],w=Gg(C),T=C.parentNode;if(T!=null&&C!==a&&w===null&&!dl(C,T,e)){if(Fn){const F=($e(C)?C.innerText:null)||C.nodeValue;F&&(c+=F)}T.removeChild(C)}}const v=h.removedNodes,k=v.length;if(k>0){let _=0;for(let C=0;C<k;C++){const w=v[C];(dl(w,x,e)||a===w)&&(x.appendChild(w),_++)}k!==_&&o.set(y,m)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const d=n.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],g=h.addedNodes,x=h.target;for(let b=0;b<g.length;b++){const y=g[b],m=y.parentNode;m==null||y.nodeName!=="BR"||dl(y,x,e)||m.removeChild(y)}}n.takeRecords()}i!==null&&(u&&Be(i),Fn&&tp(e)&&i.insertRawText(c))})}finally{Xl=!1}}function fg(e){const t=e._observer;t!==null&&dg(e,t.takeRecords(),t)}function hg(e){(function(t){Cu===0&&kt(t).addEventListener("textInput",nx,!0)})(e),e._observer=new MutationObserver((t,n)=>{dg(e,t,n)})}let sx=class gg{constructor(t,n=new Map,r=void 0,i=new Map,o=void 0){this.node=t,this.sharedConfigMap=n,this.unknownState=r,this.knownState=i;const s=o!==void 0?o:function(l,a,u){let c=u.size;if(a)for(const d in a){const f=l.get(d);f&&u.has(f)||c++}return c}(n,r,i);this.size=s}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState};for(const[n,r]of this.knownState)n.isEqual(r,n.defaultValue)?delete t[n.key]:t[n.key]=n.unparse(r);return xo(t)?{[ex]:t}:{}}getWritable(t){if(this.node===t)return this;const n=new Map(this.knownState),r=xo(i=this.unknownState)&&{...i};var i;if(r)for(const o of n.keys())delete r[o.key];return new gg(t,this.sharedConfigMap,xo(r),n,this.size)}updateFromKnown(t,n){const r=t.key;this.sharedConfigMap.set(r,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&r in o||this.size++,i.set(t,n)}updateFromUnknown(t,n){const r=this.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState={},t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i);this.unknownState=xo(this.unknownState)}};function xo(e){if(e)for(const t in e)return e}function lx(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new sx(t);return t.__state=n,n}function Gc(e,t){const n=e.__mode,r=e.__format,i=e.__style,o=t.__mode,s=t.__format,l=t.__style,a=e.__state,u=t.__state;return(n===null||n===o)&&(r===null||r===s)&&(i===null||i===l)&&(e.__state===null||a===u||function(c,d){if(c===d)return!0;if(c&&d&&c.size!==d.size)return!1;const f=new Set,h=(x,b)=>{for(const[y,m]of x.knownState){if(f.has(y.key))continue;f.add(y.key);const p=b?b.getValue(y):y.defaultValue;if(p!==m&&!y.isEqual(p,m))return!0}return!1},g=(x,b)=>{const{unknownState:y}=x,m=b?b.unknownState:void 0;if(y){for(const[p,v]of Object.entries(y))if(!f.has(p)&&(f.add(p),v!==(m?m[p]:void 0)))return!0}return!1};return!(c&&h(c,d)||d&&h(d,c)||c&&g(c,d)||d&&g(d,c))}(a,u))}function qc(e,t){const n=e.mergeWithSibling(t),r=Oe()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Yc(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&J(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Gc(t,r)){r=qc(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&J(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(Gc(r,n)){r=qc(r,n);break}break}n.remove()}}else r.remove()}function ur(e){return Xc(e.anchor),Xc(e.focus),e}function Xc(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),J(r)){e.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!O(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Mn,lt,Ri,ks,Ql,ea,cr,Pt,ta,Oi,je="",st="",Ut=null,Wt="",hn="",pg=!1,$i=!1,Lo=null;function Zo(e,t){const n=cr.get(e);if(t!==null){const r=ia(e);r.parentNode===t&&t.removeChild(r)}if(Pt.has(e)||lt._keyToDOMMap.delete(e),O(n)){const r=qo(n,cr);na(r,0,r.length-1,null)}n!==void 0&&Ju(Oi,Ri,ks,n,"destroyed")}function na(e,t,n,r){let i=t;for(;i<=n;++i){const o=e[i];o!==void 0&&Zo(o,r)}}function qn(e,t){e.setProperty("text-align",t)}const ax="40px";function mg(e,t){const n=Mn.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||ax;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function xg(e,t){const n=e.style;t===0?qn(n,""):t===mu?qn(n,"left"):t===xu?qn(n,"center"):t===yu?qn(n,"right"):t===bu?qn(n,"justify"):t===vu?qn(n,"start"):t===_u&&qn(n,"end")}function Go(e,t){const n=Pt.get(e);n===void 0&&z(60);const r=n.createDOM(Mn,lt);if(function(i,o,s){const l=s._keyToDOMMap;(function(a,u,c){const d=`__lexicalKey_${u._key}`;a[d]=c})(o,s,i),l.set(i,o)}(e,r,lt),J(n)?r.setAttribute("data-lexical-text","true"):xe(n)&&r.setAttribute("data-lexical-decorator","true"),O(n)){const i=n.__indent,o=n.__size;if(i!==0&&mg(r,i),o!==0){const l=o-1;(function(a,u,c,d){const f=st;st="",ra(a,c,0,u,c.getDOMSlot(d)),bg(c,d),st=f})(qo(n,Pt),l,n,r)}const s=n.__format;s!==0&&xg(r,s),n.isInline()||yg(null,n,r),Vs(n)&&(je+=yn,hn+=yn)}else{const i=n.getTextContent();if(xe(n)){const o=n.decorate(lt,Mn);o!==null&&vg(e,o),r.contentEditable="false"}else J(n)&&(n.isDirectionless()||(st+=i));je+=i,hn+=i}return t!==null&&t.insertChild(r),Ju(Oi,Ri,ks,n,"created"),r}function ra(e,t,n,r,i){const o=je;je="";let s=n;for(;s<=r;++s){Go(e[s],i);const l=Pt.get(e[s]);l!==null&&J(l)&&(Ut===null&&(Ut=l.getFormat()),Wt===""&&(Wt=l.getStyle()))}Vs(t)&&(je+=yn),i.element.__lexicalTextContent=je,je=o+je}function Qc(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return Mt(r)?"line-break":xe(r)&&r.isInline()?"decorator":null}return"empty"}return null}function yg(e,t,n){const r=Qc(e,cr),i=Qc(t,Pt);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function bg(e,t){const n=t.__lexicalDirTextContent||"",r=t.__lexicalDir||"";if(n!==st||r!==Lo){const i=st==="",o=i?Lo:function(s){return Z5.test(s)?"rtl":G5.test(s)?"ltr":null}(st);if(o!==r){const s=t.classList,l=Mn.theme;let a=r!==null?l[r]:void 0,u=o!==null?l[o]:void 0;if(a!==void 0){if(typeof a=="string"){const c=Wo(a);a=l[r]=c}s.remove(...a)}if(o===null||i&&o==="ltr")t.removeAttribute("dir");else{if(u!==void 0){if(typeof u=="string"){const c=Wo(u);u=l[o]=c}u!==void 0&&s.add(...u)}t.dir=o}$i||(e.getWritable().__dir=o)}Lo=o,t.__lexicalDirTextContent=st,t.__lexicalDir=o}}function ux(e,t,n){const r=st;var i;st="",Ut=null,Wt="",function(o,s,l){const a=je,u=o.__size,c=s.__size;je="";const d=l.element;if(u===1&&c===1){const f=o.__first,h=s.__first;if(f===h)xi(f,d);else{const x=ia(f),b=Go(h,null);try{d.replaceChild(b,x)}catch(y){if(typeof y=="object"&&y!=null){const m=`${y.toString()} Parent: ${d.tagName}, new child: {tag: ${b.tagName} key: ${h}}, old child: {tag: ${x.tagName}, key: ${f}}.`;throw new Error(m)}throw y}Zo(f,null)}const g=Pt.get(h);J(g)&&(Ut===null&&(Ut=g.getFormat()),Wt===""&&(Wt=g.getStyle()))}else{const f=qo(o,cr),h=qo(s,Pt);if(f.length!==u&&z(227),h.length!==c&&z(228),u===0)c!==0&&ra(h,s,0,c-1,l);else if(c===0){if(u!==0){const g=l.after==null&&l.before==null&&l.element.__lexicalLineBreak==null;na(f,0,u-1,g?null:d),g&&(d.textContent="")}}else(function(g,x,b,y,m,p){const v=y-1,k=m-1;let _,C,w=p.getFirstChild(),T=0,F=0;for(;T<=v&&F<=k;){const L=x[T],H=b[F];if(L===H)w=fl(xi(H,p.element)),T++,F++;else{_===void 0&&(_=new Set(x)),C===void 0&&(C=new Set(b));const q=C.has(L),Z=_.has(H);if(q)if(Z){const ne=zr(lt,H);ne===w?w=fl(xi(H,p.element)):(p.withBefore(w).insertChild(ne),xi(H,p.element)),T++,F++}else Go(H,p.withBefore(w)),F++;else w=fl(ia(L)),Zo(L,p.element),T++}const B=Pt.get(H);B!==null&&J(B)&&(Ut===null&&(Ut=B.getFormat()),Wt===""&&(Wt=B.getStyle()))}const M=T>v,R=F>k;if(M&&!R){const L=b[k+1],H=L===void 0?null:lt.getElementByKey(L);ra(b,g,F,k,p.withBefore(H))}else R&&!M&&na(x,T,v,p.element)})(s,f,h,u,c,l)}Vs(s)&&(je+=yn),d.__lexicalTextContent=je,je=a+je}(e,t,t.getDOMSlot(n)),bg(t,n),i=t,Ut==null||Ut===i.__textFormat||$i||i.setTextFormat(Ut),function(o){Wt===""||Wt===o.__textStyle||$i||o.setTextStyle(Wt)}(t),st=r}function qo(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&z(101),n.push(r),r=i.__next}return n}function xi(e,t){const n=cr.get(e);let r=Pt.get(e);n!==void 0&&r!==void 0||z(61);const i=pg||ea.has(e)||Ql.has(e),o=zr(lt,e);if(n===r&&!i){if(O(n)){const s=o.__lexicalTextContent;s!==void 0&&(je+=s,hn+=s);const l=o.__lexicalDirTextContent;l!==void 0&&(st+=l)}else{const s=n.getTextContent();J(n)&&!n.isDirectionless()&&(st+=s),hn+=s,je+=s}return o}if(n!==r&&i&&Ju(Oi,Ri,ks,r,"updated"),r.updateDOM(n,o,Mn)){const s=Go(e,null);return t===null&&z(62),t.replaceChild(s,o),Zo(e,null),s}if(O(n)&&O(r)){const s=r.__indent;s!==n.__indent&&mg(o,s);const l=r.__format;l!==n.__format&&xg(o,l),i&&(ux(n,r,o),Xe(r)||r.isInline()||yg(n,r,o)),Vs(r)&&(je+=yn,hn+=yn)}else{const s=r.getTextContent();if(xe(r)){const l=r.decorate(lt,Mn);l!==null&&vg(e,l)}else J(r)&&!r.isDirectionless()&&(st+=s);je+=s,hn+=s}if(!$i&&Xe(r)&&r.__cachedText!==hn){const s=r.getWritable();s.__cachedText=hn,r=s}return o}function vg(e,t){let n=lt._pendingDecorators;const r=lt._decorators;if(n===null){if(r[e]===t)return;n=qg(lt)}n[e]=t}function fl(e){let t=e.nextSibling;return t!==null&&t===lt._blockCursorElement&&(t=t.nextSibling),t}function cx(e,t,n,r,i,o){je="",hn="",st="",pg=r===Hr,Lo=null,lt=n,Mn=n._config,Ri=n._nodes,ks=lt._listeners.mutation,Ql=i,ea=o,cr=e._nodeMap,Pt=t._nodeMap,$i=t._readOnly,ta=new Map(n._keyToDOMMap);const s=new Map;return Oi=s,xi("root",null),lt=void 0,Ri=void 0,Ql=void 0,ea=void 0,cr=void 0,Pt=void 0,Mn=void 0,ta=void 0,Oi=void 0,s}function ia(e){const t=ta.get(e);return t===void 0&&z(75,e),t}function _n(e){return{}}const Ss={},dx={},Es={},nr={},Mr={},Di={},Rr={},Gi={},oa={},Vi={},Hi={},pn={},Ts={},Is={},_g={},Cg={},fx={},wu={},hx={},ku={},Su={},Bi={},Eu={},As={},qi={},Ns={},Tu={},wg={},Yo={},sa={},Iu={},gx={},Ls={},Au={},px={},Fs={},Nu={},la={},mx={},xx={},yi={},bi={},kg={},Sg={},Eg={},un=Object.freeze({}),aa=30,ua=[["keydown",function(e,t){if(ki=e.timeStamp,ca=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:s}=e;if(!Q(t,_g,e)&&n!=null){if(hl&&kr(ca))return vt(t,()=>{yo(t,gl)}),hl=!1,void(gl="");if(function(l,a,u,c){return Ed(l)&&!a&&!c&&!u}(n,i,s,o))Q(t,Cg,e);else if(function(l,a,u,c,d){return Ed(l)&&!c&&!u&&(a||d)}(n,i,r,s,o))Q(t,fx,e);else if(function(l,a,u,c){return Sd(l)&&!a&&!c&&!u}(n,i,s,o))Q(t,wu,e);else if(function(l,a,u,c,d){return Sd(l)&&!c&&!u&&(a||d)}(n,i,r,s,o))Q(t,hx,e);else if(function(l,a,u){return function(c){return c==="ArrowUp"}(l)&&!a&&!u}(n,i,o))Q(t,ku,e);else if(function(l,a,u){return function(c){return c==="ArrowDown"}(l)&&!a&&!u}(n,i,o))Q(t,Su,e);else if(function(l,a){return Td(l)&&a}(n,r))Si=!0,Q(t,Bi,e);else if(function(l){return l===" "}(n))Q(t,Eu,e);else if(function(l,a){return It&&a&&l.toLowerCase()==="o"}(n,i))e.preventDefault(),Si=!0,Q(t,Mr,!0);else if(function(l,a){return Td(l)&&!a}(n,r))Si=!1,Q(t,Bi,e);else if(function(l,a,u,c){return It?!a&&!u&&(kr(l)||l.toLowerCase()==="h"&&c):c||a||u?!1:kr(l)}(n,s,o,i))kr(n)?Q(t,As,e):(e.preventDefault(),Q(t,nr,!0));else if(function(l){return l==="Escape"}(n))Q(t,qi,e);else if(function(l,a,u,c,d){return It?!(u||c||d)&&(fi(l)||l.toLowerCase()==="d"&&a):a||c||d?!1:fi(l)}(n,i,r,s,o))fi(n)?Q(t,Ns,e):(e.preventDefault(),Q(t,nr,!1));else if(function(l,a,u){return kr(l)&&(It?a:u)}(n,s,i))e.preventDefault(),Q(t,Vi,!0);else if(function(l,a,u){return fi(l)&&(It?a:u)}(n,s,i))e.preventDefault(),Q(t,Vi,!1);else if(function(l,a){return It&&a&&kr(l)}(n,o))e.preventDefault(),Q(t,Hi,!0);else if(function(l,a){return It&&a&&fi(l)}(n,o))e.preventDefault(),Q(t,Hi,!1);else if(function(l,a,u,c){return l.toLowerCase()==="b"&&!a&&vi(u,c)}(n,s,o,i))e.preventDefault(),Q(t,pn,"bold");else if(function(l,a,u,c){return l.toLowerCase()==="u"&&!a&&vi(u,c)}(n,s,o,i))e.preventDefault(),Q(t,pn,"underline");else if(function(l,a,u,c){return l.toLowerCase()==="i"&&!a&&vi(u,c)}(n,s,o,i))e.preventDefault(),Q(t,pn,"italic");else if(function(l,a,u,c){return l==="Tab"&&!a&&!u&&!c}(n,s,i,o))Q(t,Tu,e);else if(function(l,a,u,c){return l.toLowerCase()==="z"&&!a&&vi(u,c)}(n,r,o,i))e.preventDefault(),Q(t,Ts,void 0);else if(function(l,a,u,c){return It?l.toLowerCase()==="z"&&u&&a:l.toLowerCase()==="y"&&c||l.toLowerCase()==="z"&&c&&a}(n,r,o,i))e.preventDefault(),Q(t,Is,void 0);else{const l=t._editorState._selection;l===null||D(l)?!Fn&&Id(n,o,i)&&(e.preventDefault(),Q(t,la,e)):function(a,u,c,d){return u?!1:a.toLowerCase()==="c"?It?c:d:!1}(n,r,o,i)?(e.preventDefault(),Q(t,Fs,e)):function(a,u,c,d){return u?!1:a.toLowerCase()==="x"?It?c:d:!1}(n,r,o,i)?(e.preventDefault(),Q(t,Nu,e)):Id(n,o,i)&&(e.preventDefault(),Q(t,la,e))}(function(l,a,u,c){return l||a||u||c})(i,r,s,o)&&Q(t,Eg,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;ti(n)&&r!=="touch"&&e.button===0&&vt(t,()=>{xe(en(n))||(fa=!0)})}],["compositionstart",function(e,t){vt(t,()=>{const n=U();if(D(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();Ye(r.key),(e.timeStamp<ki+aa||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||J(i)&&i.getStyle()!==n.style)&&Q(t,Rr,K5)}})}],["compositionend",function(e,t){Fn?di=!0:Vr||!Mi&&!Uo?vt(t,()=>{yo(t,e.data)}):(hl=!0,gl=e.data)}],["input",function(e,t){e.stopPropagation(),vt(t,()=>{const n=U(),r=e.data,i=Lg(e);if(r!=null&&D(n)&&Ag(n,i,r,e.timeStamp,!1)){di&&(yo(t,r),di=!1);const o=n.anchor.getNode(),s=Ot(kt(t));if(s===null)return;const l=n.isBackward(),a=l?n.anchor.offset:n.focus.offset,u=l?n.focus.offset:n.anchor.offset;jo&&!n.isCollapsed()&&J(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,a)+r+o.getTextContent().slice(a+u)===ep(s.anchorNode)||Q(t,Rr,r);const c=r.length;Fn&&c>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=c),Mi||Vr||Uo||!t.isComposing()||(ki=0,Ye(null))}else Uu(!1,t,r!==null?r:void 0),di&&(yo(t,r||void 0),di=!1);(function(){Qe();const o=Oe();fg(o)})()},{event:e}),Ir=null}],["click",function(e,t){vt(t,()=>{const n=U(),r=Ot(kt(t)),i=Xr();if(r){if(D(n)){const o=n.anchor,s=o.getNode();if(o.type==="element"&&o.offset===0&&n.isCollapsed()&&!Xe(s)&&Ee().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&s!==n.focus.getNode()){const l=function(a,u){let c=a;for(;c!==Ee()&&c!=null;){if(u(c))return c;c=c.getParent()}return null}(s,a=>O(a)&&!a.isInline());O(l)&&l.select(0)}}else if(e.pointerType==="touch"){const o=r.anchorNode;($e(o)||Cn(o))&&Be(Mu(i,r,t,e))}}Q(t,Es,e)})}],["cut",un],["copy",un],["dragstart",un],["dragover",un],["dragend",un],["paste",un],["focus",un],["blur",un],["drop",un]];jo&&ua.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType,o=Lg(n);i==="deleteCompositionText"||Fn&&tp(r)||i!=="insertCompositionText"&&vt(r,()=>{const s=U();if(i==="deleteContentBackward"){if(s===null){const h=Xr();if(!D(h))return;Be(h.clone())}if(D(s)){const h=s.anchor.key===s.focus.key;if(l=n.timeStamp,ca==="MediaLast"&&l<ki+aa&&r.isComposing()&&h){if(Ye(null),ki=0,setTimeout(()=>{vt(r,()=>{Ye(null)})},aa),D(s)){const g=s.anchor.getNode();g.markDirty(),J(g)||z(142),Ng(s,g)}}else{Ye(null),n.preventDefault();const g=s.anchor.getNode(),x=g.getTextContent(),b=g.canInsertTextAfter(),y=s.anchor.offset===0&&s.focus.offset===x.length;let m=Kc&&h&&!y&&b;if(m&&s.isCollapsed()&&(m=!xe(ma(s.anchor,!0))),!m){Q(r,nr,!0);const p=U();Kc&&D(p)&&p.isCollapsed()&&(Qn=p,setTimeout(()=>Qn=null))}}return}}var l;if(!D(s))return;const a=n.data;Ir!==null&&Uu(!1,r,Ir),s.dirty&&Ir===null||!s.isCollapsed()||Xe(s.anchor.getNode())||o===null||s.applyDOMRange(o),Ir=null;const u=s.anchor,c=s.focus,d=u.getNode(),f=c.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Q(r,Rr,n);break;case"insertFromComposition":Ye(null),Q(r,Rr,n);break;case"insertLineBreak":Ye(null),Q(r,Mr,!1);break;case"insertParagraph":Ye(null),Si&&!Vr?(Si=!1,Q(r,Mr,!1)):Q(r,Di,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Q(r,Gi,n);break;case"deleteByComposition":(function(h,g){return h!==g||O(h)||O(g)||!h.isToken()||!g.isToken()})(d,f)&&Q(r,oa,n);break;case"deleteByDrag":case"deleteByCut":Q(r,oa,n);break;case"deleteContent":Q(r,nr,!1);break;case"deleteWordBackward":Q(r,Vi,!0);break;case"deleteWordForward":Q(r,Vi,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Q(r,Hi,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Q(r,Hi,!1);break;case"formatStrikeThrough":Q(r,pn,"strikethrough");break;case"formatBold":Q(r,pn,"bold");break;case"formatItalic":Q(r,pn,"italic");break;case"formatUnderline":Q(r,pn,"underline");break;case"historyUndo":Q(r,Ts,void 0);break;case"historyRedo":Q(r,Is,void 0)}else{if(a===`
|
|
9
|
+
`)n.preventDefault(),Q(r,Mr,!1);else if(a===yn)n.preventDefault(),Q(r,Di,void 0);else if(a==null&&n.dataTransfer){const h=n.dataTransfer.getData("text/plain");n.preventDefault(),s.insertRawText(h)}else a!=null&&Ag(s,o,a,n.timeStamp,!0)?(n.preventDefault(),Q(r,Rr,a)):Ir=a;Tg=n.timeStamp}})}(e,t)]);let ki=0,ca=null,Tg=0,Ir=null;const Xo=new WeakMap;let da=!1,fa=!1,Si=!1,di=!1,hl=!1,gl="",Qn=null,Ig=[0,"",0,"root",0];function Ag(e,t,n,r,i){const o=e.anchor,s=e.focus,l=o.getNode(),a=Oe(),u=Ot(kt(a)),c=u!==null?u.anchorNode:null,d=o.key,f=a.getElementByKey(d),h=n.length;return d!==s.key||!J(l)||(!i&&(!jo||Tg<r+50)||l.isDirty()&&h<2||Xg(n))&&o.offset!==s.offset&&!l.isComposing()||Ar(l)||l.isDirty()&&h>1||(i||!jo)&&f!==null&&!l.isComposing()&&c!==Br(f)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||l.getFormat()!==e.format||l.getStyle()!==e.style||function(g,x){if(x.isSegmented())return!0;if(!g.isCollapsed())return!1;const b=g.anchor.offset,y=x.getParentOrThrow(),m=x.isToken();return b===0?!x.canInsertTextBefore()||!y.canInsertTextBefore()&&!x.isComposing()||m||function(p){const v=p.getPreviousSibling();return(J(v)||O(v)&&v.isInline())&&!v.canInsertTextAfter()}(x):b===x.getTextContentSize()&&(!x.canInsertTextAfter()||!y.canInsertTextAfter()&&!x.isComposing()||m)}(e,l)}function ed(e,t){return Cn(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function td(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=e;da&&(da=!1,ed(r,i)&&ed(o,s)&&!Qn)||vt(t,()=>{if(!n)return void Be(null);if(!ro(t,r,o))return;let l=U();if(Qn&&D(l)&&l.isCollapsed()){const a=l.anchor,u=Qn.anchor;(a.key===u.key&&a.offset===u.offset+1||a.offset===1&&u.getNode().is(a.getNode().getPreviousSibling()))&&(l=Qn.clone(),Be(l))}if(Qn=null,D(l)){const a=l.anchor,u=a.getNode();if(l.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(l.dirty=!0);const c=kt(t).event,d=c?c.timeStamp:performance.now(),[f,h,g,x,b]=Ig,y=Ee(),m=t.isComposing()===!1&&y.getTextContent()==="";if(d<b+200&&a.offset===g&&a.key===x)Fo(l,f,h);else if(a.type==="text")J(u)||z(141),Ng(l,u);else if(a.type==="element"&&!m){O(u)||z(259);const p=a.getNode();p.isEmpty()?function(v,k){const _=k.getTextFormat(),C=k.getTextStyle();Fo(v,_,C)}(l,p):Fo(l,0,"")}}else{const c=a.key,d=l.focus.key,f=l.getNodes(),h=f.length,g=l.isBackward(),x=g?s:i,b=g?i:s,y=g?d:c,m=g?c:d;let p=J5,v=!1;for(let k=0;k<h;k++){const _=f[k],C=_.getTextContentSize();if(J(_)&&C!==0&&!(k===0&&_.__key===y&&x===C||k===h-1&&_.__key===m&&b===0)&&(v=!0,p&=_.getFormat(),p===0))break}l.format=v?p:0}}Q(t,Ss,void 0)})}function Fo(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function Ng(e,t){Fo(e,t.getFormat(),t.getStyle())}function Lg(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function yo(e,t){const n=e._compositionKey;if(Ye(null),n!==null&&t!=null){if(t===""){const r=Fe(n),i=Br(e.getElementByKey(n));return void(i!==null&&i.nodeValue!==null&&J(r)&&Wu(r,i.nodeValue,null,null,!0))}if(t[t.length-1]===`
|
|
10
|
+
`){const r=U();if(D(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void Q(e,Bi,null)}}}Uu(!0,e,t)}function Fg(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const Or=new Map;function Pg(e){const t=zx(e.target);if(t===null)return;const n=zu(t.anchorNode);if(n===null)return;fa&&(fa=!1,vt(n,()=>{const a=Xr(),u=t.anchorNode;($e(u)||Cn(u))&&Be(Mu(a,t,n,e))}));const r=ju(n),i=r[r.length-1],o=i._key,s=Or.get(o),l=s||i;l!==n&&td(t,l,!1),td(t,n,!0),n!==i?Or.set(o,n):s&&Or.delete(o)}function nd(e){e._lexicalHandled=!0}function rd(e){return e._lexicalHandled===!0}function yx(e){const t=e.ownerDocument,n=Xo.get(t);n===void 0&&z(162);const r=n-1;r>=0||z(164),Xo.set(t,r),r===0&&t.removeEventListener("selectionchange",Pg);const i=$s(e);Bu(i)?(function(s){if(s._parentEditor!==null){const l=ju(s),a=l[l.length-1]._key;Or.get(a)===s&&Or.delete(a)}else Or.delete(s._key)}(i),e.__lexicalEditor=null):i&&z(198);const o=Fg(e);for(let s=0;s<o.length;s++)o[s]();e.__lexicalEventHandles=[]}function ha(e,t,n){Qe();const r=e.__key,i=e.getParent();if(i===null)return;const o=function(l){const a=U();if(!D(a)||!O(l))return a;const{anchor:u,focus:c}=a,d=u.getNode(),f=c.getNode();return xa(d,l)&&u.set(l.__key,0,"element"),xa(f,l)&&c.set(l.__key,0,"element"),a}(e);let s=!1;if(D(o)&&t){const l=o.anchor,a=o.focus;l.key===r&&(ts(l,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0),a.key===r&&(ts(a,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else ze(o)&&t&&e.isSelected()&&e.selectPrevious();if(D(o)&&t&&!s){const l=e.getIndexWithinParent();rr(e),es(o,i,l,-1)}else rr(e);n||Me(i)||i.canBeEmpty()||!i.isEmpty()||ha(i,t),t&&Xe(i)&&i.isEmpty()&&i.selectEnd()}class Ps{static getType(){z(64,this.name)}static clone(t){z(65,this.name)}afterCloneFrom(t){this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state}constructor(t){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),Zg(this,t)}getType(){return this.__type}isInline(){z(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const n=Fe(t);if(n===null)break;t=n.__parent}return!1}isSelected(t){const n=t||U();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(J(this))return r;if(D(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(xe(this)&&this.isInline()&&i){const o=n.isBackward()?n.focus:n.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:Fe(t)}getParentOrThrow(){const t=this.getParent();return t===null&&z(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(Me(n))return O(t)||t===this&&xe(t)||z(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&z(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:Fe(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:Fe(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=O(this)?this:this.getParent(),r=O(t)?t:t.getParent(),i=n&&r?Mo(n,r):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const n=Mo(this,t);return n!==null&&(n.type==="descendant"||(n.type==="branch"?sp(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&z(279),!1)))}isParentOf(t){const n=Mo(this,t);return n!==null&&n.type==="ancestor"}getNodesBetween(t){const n=this.isBefore(t),r=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),r.push(o)),o===t)break;const l=O(o)?n?o.getFirstChild():o.getLastChild():null;if(l!==null){o=l;continue}const a=n?o.getNextSibling():o.getPreviousSibling();if(a!==null){o=a;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===t)break;let c=null,d=u;do{if(d===null&&z(68),c=n?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;c!==null||i.has(d.__key)||r.push(d)}while(c===null);o=c}return n||r.reverse(),r}isDirty(){const t=Oe()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){const t=Fe(this.__key);return t===null&&z(113),t}getWritable(){Qe();const t=Dn(),n=Oe(),r=t._nodeMap,i=this.__key,o=this.getLatest(),s=n._cloneNotNeeded,l=U();if(l!==null&&l.setCachedNodes(null),s.has(i))return rs(o),o;const a=Zu(o);return s.add(i),rs(a),r.set(i,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(t,n){z(70)}updateDOM(t,n,r){z(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){z(18,this.name)}updateFromJSON(t){return function(n,r){const i=n.getWritable();return(r||i.__state)&&lx(n).updateFromJSON(r),i}(this,t.$)}static transform(){return null}remove(t){ha(this,!0,t)}replace(t,n){Qe();let r=U();r!==null&&(r=r.clone()),vl(this,t);const i=this.getLatest(),o=this.__key,s=t.__key,l=t.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size;rr(l);const c=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,h=i.__next,g=i.__parent;if(ha(i,!1,!0),c===null?a.__first=s:c.getWritable().__next=s,l.__prev=f,d===null?a.__last=s:d.getWritable().__prev=s,l.__next=h,l.__parent=g,a.__size=u,n&&(O(this)&&O(l)||z(139),this.getChildren().forEach(x=>{l.append(x)})),D(r)){Be(r);const x=r.anchor,b=r.focus;x.key===o&&ld(x,l),b.key===o&&ld(b,l)}return An()===o&&Ye(s),l}insertAfter(t,n=!0){Qe(),vl(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.getParent(),s=U();let l=!1,a=!1;if(o!==null){const h=t.getIndexWithinParent();if(rr(i),D(s)){const g=o.__key,x=s.anchor,b=s.focus;l=x.type==="element"&&x.key===g&&x.offset===h+1,a=b.type==="element"&&b.key===g&&b.offset===h+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(u===null?c.__last=d:u.getWritable().__prev=d,c.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,n&&D(s)){const h=this.getIndexWithinParent();es(s,c,h+1);const g=c.__key;l&&s.anchor.set(g,h+2,"element"),a&&s.focus.set(g,h+2,"element")}return t}insertBefore(t,n=!0){Qe(),vl(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.__key;rr(i);const s=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();s===null?l.__first=o:s.getWritable().__next=o,l.__size++,r.__prev=o,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent;const c=U();return n&&D(c)&&es(c,this.getParentOrThrow(),u),t}isParentRequired(){return!1}createParentElementNode(){return ve()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){Qe();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(O(r))return r.select();if(!J(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(t,n)}selectNext(t,n){Qe();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(O(r))return r.select(0,0);if(!J(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(t,n)}markDirty(){this.getWritable()}reconcileObservedMutation(t,n){this.markDirty()}}class Yi extends Ps{static getType(){return"linebreak"}static clone(t){return new Yi(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
11
|
+
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>function(n){const r=n.parentElement;if(r!==null&&is(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&bo(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&bo(o))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&is(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&bo(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&bo(o))return!0}return!1}(t)?null:{conversion:bx,priority:0}}}static importJSON(t){return Rt().updateFromJSON(t)}}function bx(e){return{node:Rt()}}function Rt(){return ft(new Yi)}function Mt(e){return e instanceof Yi}function bo(e){return Cn(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function pl(e,t){return 16&t?"code":t&pu?"mark":32&t?"sub":64&t?"sup":null}function ml(e,t){return 1&t?"strong":2&t?"em":"span"}function Mg(e,t,n,r,i){const o=r.classList;let s=$r(i,"base");s!==void 0&&o.add(...s),s=$r(i,"underlineStrikethrough");let l=!1;const a=t&Ko&&t&Jo;s!==void 0&&(n&Ko&&n&Jo?(l=!0,a||o.add(...s)):a&&o.remove(...s));for(const u in ar){const c=ar[u];if(s=$r(i,u),s!==void 0)if(n&c){if(l&&(u==="underline"||u==="strikethrough")){t&c&&o.remove(...s);continue}t&c&&(!a||u!=="underline")&&u!=="strikethrough"||o.add(...s)}else t&c&&o.remove(...s)}}function Rg(e,t,n){const r=t.firstChild,i=n.isComposing(),o=e+(i?ws:"");if(r==null)t.textContent=o;else{const s=r.nodeValue;if(s!==o)if(i||Fn){const[l,a,u]=function(c,d){const f=c.length,h=d.length;let g=0,x=0;for(;g<f&&g<h&&c[g]===d[g];)g++;for(;x+g<f&&x+g<h&&c[f-x-1]===d[h-x-1];)x++;return[g,f-g-x,d.slice(g,h-x)]}(s,o);a!==0&&r.deleteData(l,a),r.insertData(l,u)}else r.nodeValue=o}}function id(e,t,n,r,i,o){Rg(i,e,t);const s=o.theme.text;s!==void 0&&Mg(0,0,r,e,s)}function vo(e,t){const n=document.createElement(t);return n.appendChild(e),n}class rn extends Ps{static getType(){return"text"}static clone(t){return new rn(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",n){super(n),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return Q5[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===An()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const n=ar[t];return!!(this.getFormat()&n)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){return ns(this.getLatest().__format,t,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,n){const r=this.__format,i=pl(0,r),o=ml(0,r),s=i===null?o:i,l=document.createElement(s);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),i!==null&&(a=document.createElement(o),l.appendChild(a)),id(a,this,0,r,this.__text,t);const u=this.__style;return u!==""&&(l.style.cssText=u),l}updateDOM(t,n,r){const i=this.__text,o=t.__format,s=this.__format,l=pl(0,o),a=pl(0,s),u=ml(0,o),c=ml(0,s);if((l===null?u:l)!==(a===null?c:a))return!0;if(l===a&&u!==c){const x=n.firstChild;x==null&&z(48);const b=document.createElement(c);return id(b,this,0,s,i,r),n.replaceChild(b,x),!1}let d=n;a!==null&&l!==null&&(d=n.firstChild,d==null&&z(49)),Rg(i,d,this);const f=r.theme.text;f!==void 0&&o!==s&&Mg(0,o,s,d,f);const h=t.__style,g=this.__style;return h!==g&&(n.style.cssText=g),!1}static importDOM(){return{"#text":()=>({conversion:wx,priority:0}),b:()=>({conversion:_x,priority:0}),code:()=>({conversion:cn,priority:0}),em:()=>({conversion:cn,priority:0}),i:()=>({conversion:cn,priority:0}),mark:()=>({conversion:cn,priority:0}),s:()=>({conversion:cn,priority:0}),span:()=>({conversion:vx,priority:0}),strong:()=>({conversion:cn,priority:0}),sub:()=>({conversion:cn,priority:0}),sup:()=>({conversion:cn,priority:0}),u:()=>({conversion:cn,priority:0})}}static importJSON(t){return Ne().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:n}=super.exportDOM(t);return $e(n)||z(132),n.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(n=vo(n,"b")),this.hasFormat("italic")&&(n=vo(n,"i")),this.hasFormat("strikethrough")&&(n=vo(n,"s")),this.hasFormat("underline")&&(n=vo(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?ar[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?q5[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=ns(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=X5[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){Qe();let r=t,i=n;const o=U(),s=this.getTextContent(),l=this.__key;if(typeof s=="string"){const a=s.length;r===void 0&&(r=a),i===void 0&&(i=a)}else r=0,i=0;if(!D(o))return Dg(l,r,l,i,"text","text");{const a=An();a!==o.anchor.key&&a!==o.focus.key||Ye(l),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const o=this.getWritable(),s=o.__text,l=r.length;let a=t;a<0&&(a=l+a,a<0&&(a=0));const u=U();if(i&&D(u)){const d=t+l;u.setTextNodeRange(o,d,o,d)}const c=s.slice(0,a)+r+s.slice(a+n);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Qe();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,o=An(),s=r.length;t.sort((w,T)=>w-T),t.push(s);const l=[],a=t.length;for(let w=0,T=0;w<s&&T<=a;T++){const F=t[T];F>w&&(l.push(r.slice(w,F)),w=F)}const u=l.length;if(u===1)return[n];const c=l[0],d=n.getParent();let f;const h=n.getFormat(),g=n.getStyle(),x=n.__detail;let b=!1,y=null,m=null;const p=U();if(D(p)){const[w,T]=p.isBackward()?[p.focus,p.anchor]:[p.anchor,p.focus];w.type==="text"&&w.key===i&&(y=w),T.type==="text"&&T.key===i&&(m=T)}n.isSegmented()?(f=Ne(c),f.__format=h,f.__style=g,f.__detail=x,b=!0):(f=n.getWritable(),f.__text=c);const v=[f];for(let w=1;w<u;w++){const T=Ne(l[w]);T.__format=h,T.__style=g,T.__detail=x;const F=T.__key;o===i&&Ye(F),v.push(T)}const k=y?y.offset:null,_=m?m.offset:null;let C=0;for(const w of v){if(!y&&!m)break;const T=C+w.getTextContentSize();if(y!==null&&k!==null&&k<=T&&k>=C&&(y.set(w.getKey(),k-C,"text"),k<T&&(y=null)),m!==null&&_!==null&&_<=T&&_>=C){m.set(w.getKey(),_-C,"text");break}C=T}if(d!==null){(function(F){const M=F.getPreviousSibling(),R=F.getNextSibling();M!==null&&rs(M),R!==null&&rs(R)})(this);const w=d.getWritable(),T=this.getIndexWithinParent();b?(w.splice(T,0,v),this.remove()):w.splice(T,1,v),D(p)&&es(p,d,T,u-1)}return v}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||z(50);const r=this.__key,i=t.__key,o=this.__text,s=o.length;An()===i&&Ye(r);const l=U();if(D(l)){const d=l.anchor,f=l.focus;d!==null&&d.key===i&&gd(d,n,r,t,s),f!==null&&f.key===i&&gd(f,n,r,t,s)}const a=t.__text,u=n?a+o:o+a;this.setTextContent(u);const c=this.getWritable();return t.remove(),c}isTextEntity(){return!1}}function vx(e){return{forChild:Lu(e.style),node:null}}function _x(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:Lu(t.style,n?void 0:"bold"),node:null}}const od=new WeakMap;function Cx(e){if(!$e(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function wx(e){const t=e;e.parentElement===null&&z(129);let n=t.textContent||"";if(function(r){let i,o=r.parentNode;const s=[r];for(;o!==null&&(i=od.get(o))===void 0&&!Cx(o);)s.push(o),o=o.parentNode;const l=i===void 0?o:i;for(let a=0;a<s.length;a++)od.set(s[a],l);return l}(t)!==null){const r=n.split(/(\r?\n|\t)/),i=[],o=r.length;for(let s=0;s<o;s++){const l=r[s];l===`
|
|
12
|
+
`||l===`\r
|
|
13
|
+
`?i.push(Rt()):l===" "?i.push(Yr()):l!==""&&i.push(Ne(l))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=sd(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=sd(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:Ne(n)}}function sd(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,$e(n)){const o=n.style.display;if(o===""&&!va(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(Cn(n))return n;if(n.nodeName==="BR")return null}}const kx={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function cn(e){const t=kx[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Lu(e.style,t),node:null}}function Ne(e=""){return ft(new rn(e))}function J(e){return e instanceof rn}function Lu(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),s=e.fontStyle==="italic",l=r.includes("underline"),a=e.verticalAlign;return u=>(J(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),s&&!u.hasFormat("italic")&&u.toggleFormat("italic"),l&&!u.hasFormat("underline")&&u.toggleFormat("underline"),a!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),a!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class Xi extends rn{static getType(){return"tab"}static clone(t){return new Xi(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=$r(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Yr().updateFromJSON(t)}setTextContent(t){return t!==" "&&t!==""&&z(126),super.setTextContent(t)}setDetail(t){return t!==2&&z(127),this}setMode(t){return t!=="normal"&&z(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Yr(){return ft(new Xi)}function Fu(e){return e instanceof Xi}class Sx{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:op(Ct(Rn(this,"next")),Ct(Rn(t,"next")))<0}getNode(){const t=Fe(this.key);return t===null&&z(20),t}set(t,n,r,i){const o=this._selection,s=this.key;i&&this.key===t&&this.offset===n&&this.type===r||(this.key=t,this.offset=n,this.type=r,eo()||(An()===s&&Ye(t),o!==null&&(o.setCachedNodes(null),o.dirty=!0)))}}function Qt(e,t,n){return new Sx(e,t,n)}function xl(e,t){let n=t.__key,r=e.offset,i="element";if(J(t)){i="text";const o=t.getTextContentSize();r>o&&(r=o)}else if(!O(t)){const o=t.getNextSibling();if(J(o))n=o.__key,r=0,i="text";else{const s=t.getParent();s&&(n=s.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function ld(e,t){if(O(t)){const n=t.getLastDescendant();O(n)||J(n)?xl(e,n):xl(e,t)}else xl(e,t)}class Ms{constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!ze(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new Ms(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let o;if(J(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(t);for(let s=0;s<r;s++)n[s].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const o=Fe(i);o!==null&&r.push(o)}return eo()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function D(e){return e instanceof vr}class vr{constructor(t,n,r,i){this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!D(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=function(r){const i=[],[o,s]=r.getTextSlices();o&&i.push(o.caret.origin);const l=new Set,a=new Set;for(const u of r)if(Xt(u)){const{origin:c}=u;i.length===0?l.add(c):(a.add(c),i.push(c))}else{const{origin:c}=u;O(c)&&a.has(c)||i.push(c)}if(s&&i.push(s.caret.origin),jr(r.focus)&&O(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=tn(r.focus.origin,"previous");Xt(u)&&l.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=Xu(u))l.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!O(u)||a.has(u)||u.isEmpty()||l.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=Ct(r.anchor),c=Ct(r.anchor.getFlipped()),d=h=>ir(h)?h.origin:h.getNodeAtCaret(),f=d(u)||d(c)||(r.anchor.getNodeAtCaret()?u.origin:c.origin);i.push(f)}return i}(ap(Md(this),"next"));return eo()||(this._cachedNodes=n),n}setTextNodeRange(t,n,r,i){this.anchor.set(t.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,o=this.focus,s=i.isBefore(o),[l,a]=ga(this);let u="",c=!0;for(let d=0;d<t.length;d++){const f=t[d];if(O(f)&&!f.isInline())c||(u+=`
|
|
14
|
+
`),c=!f.isEmpty();else if(c=!1,J(f)){let h=f.getTextContent();f===n?f===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(h=l<a?h.slice(l,a):h.slice(a,l)):h=s?h.slice(l):h.slice(a):f===r&&(h=s?h.slice(0,a):h.slice(0,l)),u+=h}else!xe(f)&&!Mt(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){const n=Oe(),r=n.getEditorState()._selection,i=$g(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[o,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(s.key,s.offset,s.type,!0),ur(this)}clone(){const t=this.anchor,n=this.focus;return new vr(Qt(t.key,t.offset,t.type),Qt(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=ns(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=ar[t];return!!(this.format&n)}insertRawText(t){const n=t.split(/(\r?\n|\t)/),r=[],i=n.length;for(let o=0;o<i;o++){const s=n[o];s===`
|
|
15
|
+
`||s===`\r
|
|
16
|
+
`?r.push(Rt()):s===" "?r.push(Yr()):r.push(Ne(s))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let s=n,l=r;!this.isCollapsed()&&r.isBefore(n)&&(s=r,l=n),s.type==="element"&&function(b,y,m,p){const v=b.getNode(),k=v.getChildAtIndex(b.offset),_=Ne(),C=Xe(v)?ve().append(_):_;_.setFormat(m),_.setStyle(p),k===null?v.append(C):k.insertBefore(C),b.is(y)&&y.set(_.__key,0,"text"),b.set(_.__key,0,"text")}(s,l,i,o),l.type==="element"&&gr(l,Ct(Rn(l,"next")));const a=s.offset;let u=l.offset;const c=this.getNodes(),d=c.length;let f=c[0];J(f)||z(26);const h=f.getTextContent().length,g=f.getParentOrThrow();let x=c[d-1];if(d===1&&l.type==="element"&&(u=h,l.set(s.key,u,"text")),this.isCollapsed()&&a===h&&(f.isSegmented()||f.isToken()||!f.canInsertTextAfter()||!g.canInsertTextAfter()&&f.getNextSibling()===null)){let b=f.getNextSibling();if(J(b)&&b.canInsertTextBefore()&&!Ar(b)||(b=Ne(),b.setFormat(i),b.setStyle(o),g.canInsertTextAfter()?f.insertAfter(b):g.insertAfter(b)),b.select(0,0),f=b,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&a===0&&(f.isSegmented()||f.isToken()||!f.canInsertTextBefore()||!g.canInsertTextBefore()&&f.getPreviousSibling()===null)){let b=f.getPreviousSibling();if(J(b)&&!Ar(b)||(b=Ne(),b.setFormat(i),g.canInsertTextBefore()?f.insertBefore(b):g.insertBefore(b)),b.select(),f=b,t!=="")return void this.insertText(t)}else if(f.isSegmented()&&a!==h){const b=Ne(f.getTextContent());b.setFormat(i),f.replace(b),f=b}else if(!this.isCollapsed()&&t!==""){const b=x.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||O(b)&&(!b.canInsertTextBefore()||!b.canInsertTextAfter()))return this.insertText(""),Og(this.anchor,this.focus,null),void this.insertText(t)}if(d===1){if(f.isToken()){const p=Ne(t);return p.select(),void f.replace(p)}const b=f.getFormat(),y=f.getStyle();if(a!==u||b===i&&y===o){if(Fu(f)){const p=Ne(t);return p.setFormat(i),p.setStyle(o),p.select(),void f.replace(p)}}else{if(f.getTextContent()!==""){const p=Ne(t);if(p.setFormat(i),p.setStyle(o),p.select(),a===0)f.insertBefore(p,!1);else{const[v]=f.splitText(a);v.insertAfter(p,!1)}return void(p.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}f.setFormat(i),f.setStyle(o)}const m=u-a;f=f.spliceText(a,m,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(f.isComposing()?this.anchor.offset-=t.length:(this.format=b,this.style=y))}else{const b=new Set([...f.getParentKeys(),...x.getParentKeys()]),y=O(f)?f:f.getParentOrThrow();let m=O(x)?x:x.getParentOrThrow(),p=x;if(!y.is(m)&&m.isInline())do p=m,m=m.getParentOrThrow();while(m.isInline());if(l.type==="text"&&(u!==0||x.getTextContent()==="")||l.type==="element"&&x.getIndexWithinParent()<u)if(J(x)&&!x.isToken()&&u!==x.getTextContentSize()){if(x.isSegmented()){const w=Ne(x.getTextContent());x.replace(w),x=w}Xe(l.getNode())||l.type!=="text"||(x=x.spliceText(0,u,"")),b.add(x.__key)}else{const w=x.getParentOrThrow();w.canBeEmpty()||w.getChildrenSize()!==1?x.remove():w.remove()}else b.add(x.__key);const v=m.getChildren(),k=new Set(c),_=y.is(m),C=y.isInline()&&f.getNextSibling()===null?y:f;for(let w=v.length-1;w>=0;w--){const T=v[w];if(T.is(f)||O(T)&&T.isParentOf(f))break;T.isAttached()&&(!k.has(T)||T.is(p)?_||C.insertAfter(T,!1):T.remove())}if(!_){let w=m,T=null;for(;w!==null;){const F=w.getChildren(),M=F.length;(M===0||F[M-1].is(T))&&(b.delete(w.__key),T=w),w=w.getParent()}}if(f.isToken())if(a===h)f.select();else{const w=Ne(t);w.select(),f.replace(w)}else f=f.spliceText(a,h-a,t,!0),f.getTextContent()===""?f.remove():f.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let w=1;w<d;w++){const T=c[w],F=T.__key;b.has(F)||T.remove()}}}removeText(){const t=U()===this;wl(this,e2(Md(this))),t&&U()!==this&&Be(this)}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void Ye(null);const r=this.getNodes(),i=[];for(const v of r)J(v)&&i.push(v);const o=v=>{r.forEach(k=>{if(O(k)){const _=k.getFormatFlags(t,v);k.setTextFormat(_)}})},s=i.length;if(s===0)return this.toggleFormat(t),Ye(null),void o(n);const l=this.anchor,a=this.focus,u=this.isBackward(),c=u?a:l,d=u?l:a;let f=0,h=i[0],g=c.type==="element"?0:c.offset;if(c.type==="text"&&g===h.getTextContentSize()&&(f=1,h=i[1],g=0),h==null)return;const x=h.getFormatFlags(t,n);o(x);const b=s-1;let y=i[b];const m=d.type==="text"?d.offset:y.getTextContentSize();if(h.is(y)){if(g===m)return;if(Ar(h)||g===0&&m===h.getTextContentSize())h.setFormat(x);else{const v=h.splitText(g,m),k=g===0?v[0]:v[1];k.setFormat(x),c.type==="text"&&c.set(k.__key,0,"text"),d.type==="text"&&d.set(k.__key,m-g,"text")}return void(this.format=x)}g===0||Ar(h)||([,h]=h.splitText(g),g=0),h.setFormat(x);const p=y.getFormatFlags(t,x);m>0&&(m===y.getTextContentSize()||Ar(y)||([y]=y.splitText(m)),y.setFormat(p));for(let v=f+1;v<b;v++){const k=i[v],_=k.getFormatFlags(t,p);k.setFormat(_)}c.type==="text"&&c.set(h.__key,g,"text"),d.type==="text"&&d.set(y.__key,m,"text"),this.format=x|p}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const g=U();return D(g)||z(134),g.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=Cl(n,Lt),i=t[t.length-1];if(O(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const g=yl(this);r.splice(g,0,t),i.selectEnd()}return}if(!t.some(g=>(O(g)||xe(g))&&!g.isInline())){O(r)||z(211,n.constructor.name,n.getType());const g=yl(this);return r.splice(g,0,t),void i.selectEnd()}const o=function(g){const x=ve();let b=null;for(let y=0;y<g.length;y++){const m=g[y],p=Mt(m);if(p||xe(m)&&m.isInline()||O(m)&&m.isInline()||J(m)||m.isParentRequired()){if(b===null&&(b=m.createParentElementNode(),x.append(b),p))continue;b!==null&&b.append(m)}else x.append(m),b=null}return x}(t),s=o.getLastDescendant(),l=o.getChildren(),a=!O(r)||!r.isEmpty()?this.insertParagraph():null,u=l[l.length-1];let c=l[0];var d;O(d=c)&&Lt(d)&&!d.isEmpty()&&O(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(O(r)||z(211,n.constructor.name,n.getType()),r.append(...c.getChildren()),c=l[1]),c&&(r===null&&z(212,n.constructor.name,n.getType()),function(g,x,b){const y=x.getParentOrThrow().getLastChild();let m=x;const p=[x];for(;m!==y;)m.getNextSibling()||z(140),m=m.getNextSibling(),p.push(m);let v=g;for(const k of p)v=v.insertAfter(k)}(r,c));const f=Cl(s,Lt);a&&O(f)&&(a.canMergeWhenEmpty()||Lt(u))&&(f.append(...a.getChildren()),a.remove()),O(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const h=O(r)?r.getLastChild():null;Mt(h)&&f!==r&&h.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=ve();return Ee().splice(this.anchor.offset,0,[s]),s.select(),s}const t=yl(this),n=Cl(this.anchor.getNode(),Lt);O(n)||z(213);const r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(t){const n=Rt();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=this.getNodes(),n=t.length,r=n-1,i=this.anchor,o=this.focus;let s=t[0],l=t[r];const[a,u]=ga(this);if(n===0)return[];if(n===1){if(J(s)&&!this.isCollapsed()){const d=a>u?u:a,f=a>u?a:u,h=s.splitText(d,f),g=d===0?h[0]:h[1];return g!=null?[g]:[]}return[s]}const c=i.isBefore(o);if(J(s)){const d=c?a:u;d===s.getTextContentSize()?t.shift():d!==0&&([,s]=s.splitText(d),t[0]=s)}if(J(l)){const d=l.getTextContent().length,f=c?u:a;f===0?t.pop():f!==d&&([l]=l.splitText(f),t[r]=l)}return t}modify(t,n,r){if(pd(this,t,n,r))return;const i=t==="move",o=Oe(),s=Ot(kt(o));if(!s)return;const l=o._blockCursorElement,a=o._rootElement,u=this.focus.getNode();if(a===null||l===null||!O(u)||u.isInline()||u.canBeEmpty()||ya(l,o,a),this.dirty){let c=zr(o,this.anchor.key),d=zr(o,this.focus.key);this.anchor.type==="text"&&(c=Br(c)),this.focus.type==="text"&&(d=Br(d)),c&&d&&Vg(s,c,this.anchor.offset,d,this.focus.offset)}if(function(c,d,f,h){c.modify(d,f,h)}(s,t,n?"backward":"forward",r),s.rangeCount>0){const c=s.getRangeAt(0),d=this.anchor.getNode(),f=Xe(d)?d:Vx(d);if(this.applyDOMRange(c),this.dirty=!0,!i){const h=this.getNodes(),g=[];let x=!1;for(let b=0;b<h.length;b++){const y=h[b];xa(y,f)?g.push(y):x=!0}if(x&&g.length>0)if(n){const b=g[0];O(b)?b.selectStart():b.getParentOrThrow().selectStart()}else{const b=g[g.length-1];O(b)?b.selectEnd():b.getParentOrThrow().selectEnd()}s.anchorNode===c.startContainer&&s.anchorOffset===c.startOffset||function(b){const y=b.focus,m=b.anchor,p=m.key,v=m.offset,k=m.type;m.set(y.key,y.offset,y.type,!0),y.set(p,v,k,!0)}(this)}}r==="lineboundary"&&pd(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&O(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(O(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const o=ec(Rn(r,t?"previous":"next"));if(o.getTextSlices().every(l=>l===null||l.distance===0)){let l={type:"initial"};for(const a of o.iterNodeCarets("shadowRoot"))if(Xt(a)){if(!a.origin.isInline()){if(a.origin.isShadowRoot()){if(l.type==="merge-block")break;if(O(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Ct(a);wl(this,Ur(u,u)),o.anchor.origin.remove()}return}l.type!=="merge-next-block"&&l.type!=="merge-block"||(l={block:l.block,caret:a,type:"merge-block"})}}else{if(l.type==="merge-block")break;if(jr(a)){if(O(a.origin)){if(a.origin.isInline()){if(!a.origin.isParentOf(o.anchor.origin))break}else l={block:a.origin,type:"merge-next-block"};continue}if(xe(a.origin)){if(!a.origin.isIsolated())if(l.type==="merge-next-block"&&(a.origin.isKeyboardSelectable()||!a.origin.isInline())&&O(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=Pu();u.add(a.origin.getKey()),Be(u)}else a.origin.remove();return}break}}if(l.type==="merge-block"){const{caret:a,block:u}=l;return wl(this,Ur(!a.origin.isEmpty()&&u.isEmpty()?tc(et(u,a.direction)):o.anchor,a)),this.removeText()}}const s=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&ud(this,r.getNode()))return}else{const l=s.type==="text"?s.getNode():null;if(i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){const a=s.offset,u=l.getTextContentSize();if(l.is(i)||t&&a!==u||!t&&a!==0)return void cd(l,t,a)}else if(i!==null&&i.isSegmented()){const a=r.offset,u=i.getTextContentSize();if(i.is(l)||t&&a!==0||!t&&a!==u)return void cd(i,t,a)}(function(a,u){const c=a.anchor,d=a.focus,f=c.getNode(),h=d.getNode();if(f===h&&c.type==="text"&&d.type==="text"){const g=c.offset,x=d.offset,b=g<x,y=b?g:x,m=b?x:g,p=m-1;y!==p&&function(v){return!(Xg(v)||Ex(v))}(f.getTextContent().slice(y,m))&&(u?d.set(d.key,p,d.type):c.set(c.key,p,c.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&Xe(r.getParent())&&r.getPreviousSibling()===null&&ud(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function ze(e){return e instanceof Ms}function ad(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function ga(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[ad(n),ad(r)]}function ud(e,t){for(let n=t;n;n=n.getParent()){if(O(n)){if(n.collapseAtStart(e))return!0;if(Me(n))break}if(n.getPreviousSibling())break}return!1}const Ex=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function cd(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,l=0;for(let u=0;u<o;u++){const c=u===o-1;if(l=s,s+=i[u].length,t&&s===n||s>n||c){i.splice(u,1),c&&(l=void 0);break}}const a=i.join("").trim();a===""?r.remove():(r.setTextContent(a),r.select(l,l))}function dd(e,t,n,r){let i,o=t;if($e(e)){let s=!1;const l=e.childNodes,a=l.length,u=r._blockCursorElement;o===a&&(s=!0,o=a-1);let c=l[o],d=!1;if(c===u)c=l[o+1],d=!0;else if(u!==null){const f=u.parentNode;e===f&&t>Array.prototype.indexOf.call(f.children,u)&&o--}if(i=Nr(c),J(i))o=kd(i,s);else{let f=Nr(e);if(f===null)return null;if(O(f)){const h=r.getElementByKey(f.getKey());h===null&&z(214),[f,o]=f.getDOMSlot(h).resolveChildIndex(f,h,e,t),O(f)||z(215),s&&o>=f.getChildrenSize()&&(o=Math.max(0,f.getChildrenSize()-1));let x=f.getChildAtIndex(o);if(O(x)&&function(b,y,m){const p=b.getParent();return m===null||p===null||!p.canBeEmpty()||p!==m.getNode()}(x,0,n)){const b=s?x.getLastDescendant():x.getFirstDescendant();b===null?f=x:(x=b,f=O(x)?x:x.getParentOrThrow()),o=0}J(x)?(i=x,f=null,o=kd(x,s)):x!==f&&s&&!d&&(O(f)||z(216),o=Math.min(f.getChildrenSize(),o+1))}else{const h=f.getIndexWithinParent();o=t===0&&xe(f)&&Nr(e)===f?h:h+1,f=f.getParentOrThrow()}if(O(f))return Qt(f.__key,o,"element")}}else i=Nr(e);return J(i)?Qt(i.__key,o,"text"):null}function fd(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const o=i.getPreviousSibling(),s=i.getParent();if(t){if((n||!t)&&o===null&&O(s)&&s.isInline()){const l=s.getPreviousSibling();J(l)&&e.set(l.__key,l.getTextContent().length,"text")}}else O(o)&&!n&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):J(o)&&e.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(t&&O(o)&&o.isInline())e.set(o.__key,0,"element");else if((n||t)&&o===null&&O(s)&&s.isInline()&&!s.canInsertTextAfter()){const l=s.getNextSibling();J(l)&&e.set(l.__key,0,"text")}}}function Og(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);fd(e,r,i),fd(t,!r,i),i&&t.set(e.key,e.offset,e.type);const o=Oe();if(o.isComposing()&&o._compositionKey!==e.key&&D(n)){const s=n.anchor,l=n.focus;e.set(s.key,s.offset,s.type,!0),t.set(l.key,l.offset,l.type,!0)}}}function $g(e,t,n,r,i,o){if(e===null||n===null||!ro(i,e,n))return null;const s=dd(e,t,D(o)?o.anchor:null,i);if(s===null)return null;const l=dd(n,r,D(o)?o.focus:null,i);if(l===null)return null;if(s.type==="element"&&l.type==="element"){const a=Nr(e),u=Nr(n);if(xe(a)&&xe(u))return null}return Og(s,l,o),[s,l]}function Qo(e){return O(e)&&!e.isInline()}function Dg(e,t,n,r,i,o){const s=Dn(),l=new vr(Qt(e,t,i),Qt(n,r,o),0,"");return l.dirty=!0,s._selection=l,l}function Qi(){const e=Qt("root",0,"element"),t=Qt("root",0,"element");return new vr(e,t,0,"")}function Pu(){return new Ms(new Set)}function Mu(e,t,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,s=o?o.type:void 0,l=s==="selectionchange",a=!Xl&&(l||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let u,c,d,f;if(D(e)&&!a)return e.clone();if(t===null)return null;if(u=t.anchorNode,c=t.focusNode,d=t.anchorOffset,f=t.focusOffset,l&&D(e)&&!ro(n,u,c))return e.clone();const h=$g(u,d,c,f,n,e);if(h===null)return null;const[g,x]=h;return new vr(g,x,D(e)?e.format:0,D(e)?e.style:"")}function U(){return Dn()._selection}function Xr(){return Oe()._editorState._selection}function es(e,t,n,r=1){const i=e.anchor,o=e.focus,s=i.getNode(),l=o.getNode();if(!t.is(s)&&!t.is(l))return;const a=t.__key;if(e.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const c=Math.max(0,u+r);i.set(a,c,"element"),o.set(a,c,"element"),hd(e)}}else{const u=e.isBackward(),c=u?o:i,d=c.getNode(),f=u?i:o,h=f.getNode();if(t.is(d)){const g=c.offset;(n<=g&&r>0||n<g&&r<0)&&c.set(a,Math.max(0,g+r),"element")}if(t.is(h)){const g=f.offset;(n<=g&&r>0||n<g&&r<0)&&f.set(a,Math.max(0,g+r),"element")}}hd(e)}function hd(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,o=t.getNode(),s=r.getNode();if(e.isCollapsed()){if(!O(o))return;const l=o.getChildrenSize(),a=n>=l,u=a?o.getChildAtIndex(l-1):o.getChildAtIndex(n);if(J(u)){let c=0;a&&(c=u.getTextContentSize()),t.set(u.__key,c,"text"),r.set(u.__key,c,"text")}}else{if(O(o)){const l=o.getChildrenSize(),a=n>=l,u=a?o.getChildAtIndex(l-1):o.getChildAtIndex(n);if(J(u)){let c=0;a&&(c=u.getTextContentSize()),t.set(u.__key,c,"text")}}if(O(s)){const l=s.getChildrenSize(),a=i>=l,u=a?s.getChildAtIndex(l-1):s.getChildAtIndex(i);if(J(u)){let c=0;a&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}}function ts(e,t,n,r,i){let o=null,s=0,l=null;r!==null?(o=r.__key,J(r)?(s=r.getTextContentSize(),l="text"):O(r)&&(s=r.getChildrenSize(),l="element")):i!==null&&(o=i.__key,J(i)?l="text":O(i)&&(l="element")),o!==null&&l!==null?e.set(o,s,l):(s=t.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),e.set(n.__key,s,"element"))}function gd(e,t,n,r,i){e.type==="text"?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function Vg(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function Tx(e,t,n,r,i,o,s){const l=r.anchorNode,a=r.focusNode,u=r.anchorOffset,c=r.focusOffset,d=document.activeElement;if(i.has("collaboration")&&d!==o||d!==null&&Hu(d))return;if(!D(t))return void(e!==null&&ro(n,l,a)&&r.removeAllRanges());const f=t.anchor,h=t.focus,g=f.key,x=h.key,b=zr(n,g),y=zr(n,x),m=f.offset,p=h.offset,v=t.format,k=t.style,_=t.isCollapsed();let C=b,w=y,T=!1;if(f.type==="text"){C=Br(b);const B=f.getNode();T=B.getFormat()!==v||B.getStyle()!==k}else D(e)&&e.anchor.type==="text"&&(T=!0);var F,M,R,L,H;if(h.type==="text"&&(w=Br(y)),C!==null&&w!==null&&(_&&(e===null||T||D(e)&&(e.format!==v||e.style!==k))&&(F=v,M=k,R=m,L=g,H=performance.now(),Ig=[F,M,R,L,H]),u!==m||c!==p||l!==C||a!==w||r.type==="Range"&&_||(d!==null&&o.contains(d)||o.focus({preventScroll:!0}),f.type==="element"))){if(Vg(r,C,m,w,p),!i.has("skip-scroll-into-view")&&t.isCollapsed()&&o!==null&&o===document.activeElement){const B=D(t)&&t.anchor.type==="element"?C.childNodes[m]||null:r.rangeCount>0?r.getRangeAt(0):null;if(B!==null){let q;if(B instanceof Text){const Z=document.createRange();Z.selectNode(B),q=Z.getBoundingClientRect()}else q=B.getBoundingClientRect();(function(Z,ne,ee){const I=np(ee),oe=Ku(I);if(I===null||oe===null)return;let{top:ce,bottom:A}=ne,de=0,he=0,se=ee;for(;se!==null;){const j=se===I.body;if(j)de=0,he=kt(Z).innerHeight;else{const Y=se.getBoundingClientRect();de=Y.top,he=Y.bottom}let W=0;if(ce<de?W=-(de-ce):A>he&&(W=A-he),W!==0)if(j)oe.scrollBy(0,W);else{const Y=se.scrollTop;se.scrollTop+=W;const X=se.scrollTop-Y;ce-=X,A-=X}if(j)break;se=io(se)}})(n,q,o)}}da=!0}}function Qr(e){let t=U()||Xr();t===null&&(t=Ee().selectEnd()),t.insertNodes(e)}function yl(e){let t=e;e.isCollapsed()||t.removeText();const n=U();D(n)&&(t=n),D(t)||z(161);const r=t.anchor;let i=r.getNode(),o=r.offset;for(;!Lt(i);){const s=i;if([i,o]=Ix(i,o),s.is(i))break}return o}function Ix(e,t){const n=e.getParent();if(!n){const i=ve();return Ee().append(i),i.select(),[Ee(),0]}if(J(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const o=t===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!O(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new vr(Qt(e.__key,t,"element"),Qt(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function pd(e,t,n,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[c,d]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return d.set(c.key,c.offset,c.type),!0}const o=Rn(e.focus,n?"previous":"next"),s=r==="lineboundary",l=t==="move";let a=o,u=i==="decorators-and-blocks";if(!lp(a)){for(const c of a){u=!1;const{origin:d}=c;if(!xe(d)||d.isIsolated()||(a=c,!s||!d.isInline()))break}if(u)for(const c of ec(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(Xt(c))c.origin.isInline()||(a=c);else{if(O(c.origin))continue;xe(c.origin)&&!c.origin.isInline()&&(a=c)}break}}if(a===o)return!1;if(l&&!s&&xe(a.origin)&&a.origin.isKeyboardSelectable()){const c=Pu();return c.add(a.origin.getKey()),Be(c),!0}return a=Ct(a),l&&gr(e.anchor,a),gr(e.focus,a),u||!s}let Ze=null,Ue=null,dt=!1,bl=!1,Po=0;const md={characterData:!0,childList:!0,subtree:!0};function eo(){return dt||Ze!==null&&Ze._readOnly}function Qe(){dt&&z(13)}function Hg(){Po>99&&z(14)}function Dn(){return Ze===null&&z(195,Bg()),Ze}function Oe(){return Ue===null&&z(196,Bg()),Ue}function Bg(){let e=0;const t=new Set,n=Os.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=$s(i);if(Bu(o))e++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function Ax(){return Ue}function xd(e,t,n){const r=t.__type,i=function(l,a){const u=l._nodes.get(a);return u===void 0&&z(30,a),u}(e,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const s=o.length;for(let l=0;l<s&&(o[l](t),t.isAttached());l++);}function yd(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function zg(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}function Nx(e){return Ru(e,Oe()._nodes)}function Ru(e,t){const n=e.type,r=t.get(n);r===void 0&&z(17,n);const i=r.klass;e.type!==i.getType()&&z(18,i.name);const o=i.importJSON(e),s=e.children;if(O(o)&&Array.isArray(s))for(let l=0;l<s.length;l++){const a=Ru(s[l],t);o.append(a)}return o}function bd(e,t,n){const r=Ze,i=dt,o=Ue;Ze=t,dt=!0,Ue=e;try{return n()}finally{Ze=r,dt=i,Ue=o}}function gn(e,t){const n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return;const o=e._editorState,s=o._selection,l=n._selection,a=e._dirtyType!==lr,u=Ze,c=dt,d=Ue,f=e._updating,h=e._observer;let g=null;if(e._pendingEditorState=null,e._editorState=n,!i&&a&&h!==null){Ue=e,Ze=n,dt=!1,e._updating=!0;try{const _=e._dirtyType,C=e._dirtyElements,w=e._dirtyLeaves;h.disconnect(),g=cx(o,n,e,_,C,w)}catch(_){if(_ instanceof Error&&e._onError(_),bl)throw _;return Jg(e,null,r,n),hg(e),e._dirtyType=Hr,bl=!0,gn(e,o),void(bl=!1)}finally{h.observe(r,md),e._updating=f,Ze=u,dt=c,Ue=d}}n._readOnly||(n._readOnly=!0);const x=e._dirtyLeaves,b=e._dirtyElements,y=e._normalizedNodes,m=e._updateTags,p=e._deferred;a&&(e._dirtyType=lr,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(_,C){const w=_._decorators;let T=_._pendingDecorators||w;const F=C._nodeMap;let M;for(M in T)F.has(M)||(T===w&&(T=qg(_)),delete T[M])}(e,n);const v=i?null:Ot(kt(e));if(e._editable&&v!==null&&(a||l===null||l.dirty)&&r!==null&&!m.has("skip-dom-selection")){Ue=e,Ze=n;try{if(h!==null&&h.disconnect(),a||l===null||l.dirty){const _=e._blockCursorElement;_!==null&&ya(_,e,r),Tx(s,l,e,v,m,r)}(function(_,C,w){let T=_._blockCursorElement;if(D(w)&&w.isCollapsed()&&w.anchor.type==="element"&&C.contains(document.activeElement)){const F=w.anchor,M=F.getNode(),R=F.offset;let L=!1,H=null;if(R===M.getChildrenSize())_l(M.getChildAtIndex(R-1))&&(L=!0);else{const B=M.getChildAtIndex(R);if(B!==null&&_l(B)){const q=B.getPreviousSibling();(q===null||_l(q))&&(L=!0,H=_.getElementByKey(B.__key))}}if(L){const B=_.getElementByKey(M.__key);return T===null&&(_._blockCursorElement=T=function(q){const Z=q.theme,ne=document.createElement("div");ne.contentEditable="false",ne.setAttribute("data-lexical-cursor","true");let ee=Z.blockCursor;if(ee!==void 0){if(typeof ee=="string"){const I=Wo(ee);ee=Z.blockCursor=I}ee!==void 0&&ne.classList.add(...ee)}return ne}(_._config)),C.style.caretColor="transparent",void(H===null?B.appendChild(T):B.insertBefore(T,H))}}T!==null&&ya(T,_,C)})(e,r,l)}finally{h!==null&&h.observe(r,md),Ue=d,Ze=u}}g!==null&&function(_,C,w,T,F){const M=Array.from(_._listeners.mutation),R=M.length;for(let L=0;L<R;L++){const[H,B]=M[L],q=C.get(B);q!==void 0&&H(q,{dirtyLeaves:T,prevEditorState:F,updateTags:w})}}(e,g,m,x,o),D(l)||l===null||s!==null&&s.is(l)||e.dispatchCommand(Ss,void 0);const k=e._pendingDecorators;k!==null&&(e._decorators=k,e._pendingDecorators=null,Ei("decorator",e,!0,k)),function(_,C,w){const T=wd(C),F=wd(w);T!==F&&Ei("textcontent",_,!0,F)}(e,t||o,n),Ei("update",e,!0,{dirtyElements:b,dirtyLeaves:x,editorState:n,normalizedNodes:y,prevEditorState:t||o,tags:m}),function(_,C){if(_._deferred=[],C.length!==0){const w=_._updating;_._updating=!0;try{for(let T=0;T<C.length;T++)C[T]()}finally{_._updating=w}}}(e,p),function(_){const C=_._updates;if(C.length!==0){const w=C.shift();if(w){const[T,F]=w;Ou(_,T,F)}}}(e)}function Ei(e,t,n,...r){const i=t._updating;t._updating=n;try{const o=Array.from(t._listeners[e]);for(let s=0;s<o.length;s++)o[s].apply(null,r)}finally{t._updating=i}}function jg(e,t,n){if(e._updating===!1||Ue!==e){let i=!1;return e.update(()=>{i=jg(e,t,n)}),i}const r=ju(e);for(let i=4;i>=0;i--)for(let o=0;o<r.length;o++){const s=r[o]._commands.get(t);if(s!==void 0){const l=s[i];if(l!==void 0){const a=Array.from(l),u=a.length;for(let c=0;c<u;c++)if(a[c](n,e)===!0)return!0}}}return!1}function vd(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,s]=i;let l;if(s!==void 0){if(l=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete){const a=e._pendingEditorState;a===null&&z(191),a._flushSync=!0}l&&e._deferred.push(l),zg(e,s.tag)}o()}}return r}function Ou(e,t,n){const r=e._updateTags;let i,o=!1,s=!1;n!==void 0&&(i=n.onUpdate,zg(e,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),i&&e._deferred.push(i);const l=e._editorState;let a=e._pendingEditorState,u=!1;(a===null||a._readOnly)&&(a=e._pendingEditorState=Ug(a||l),u=!0),a._flushSync=s;const c=Ze,d=dt,f=Ue,h=e._updating;Ze=a,dt=!1,e._updating=!0,Ue=e;const g=e._headless||e.getRootElement()===null;try{u&&(g?l._selection!==null&&(a._selection=l._selection.clone()):a._selection=function(m,p){const v=m.getEditorState()._selection,k=Ot(kt(m));return D(v)||v==null?Mu(v,k,m,p):v.clone()}(e,n&&n.event||null));const b=e._compositionKey;t(),o=vd(e,o),function(m,p){const v=p.getEditorState()._selection,k=m._selection;if(D(k)){const _=k.anchor,C=k.focus;let w;if(_.type==="text"&&(w=_.getNode(),w.selectionTransform(v,k)),C.type==="text"){const T=C.getNode();w!==T&&T.selectionTransform(v,k)}}}(a,e),e._dirtyType!==lr&&(o?function(m,p){const v=p._dirtyLeaves,k=m._nodeMap;for(const _ of v){const C=k.get(_);J(C)&&C.isAttached()&&C.isSimpleText()&&!C.isUnmergeable()&&Yc(C)}}(a,e):function(m,p){const v=p._dirtyLeaves,k=p._dirtyElements,_=m._nodeMap,C=An(),w=new Map;let T=v,F=T.size,M=k,R=M.size;for(;F>0||R>0;){if(F>0){p._dirtyLeaves=new Set;for(const L of T){const H=_.get(L);J(H)&&H.isAttached()&&H.isSimpleText()&&!H.isUnmergeable()&&Yc(H),H!==void 0&&yd(H,C)&&xd(p,H,w),v.add(L)}if(T=p._dirtyLeaves,F=T.size,F>0){Po++;continue}}p._dirtyLeaves=new Set,p._dirtyElements=new Map;for(const L of M){const H=L[0],B=L[1];if(H!=="root"&&!B)continue;const q=_.get(H);q!==void 0&&yd(q,C)&&xd(p,q,w),k.set(H,B)}T=p._dirtyLeaves,F=T.size,M=p._dirtyElements,R=M.size,Po++}p._dirtyLeaves=v,p._dirtyElements=k}(a,e),vd(e),function(m,p,v,k){const _=m._nodeMap,C=p._nodeMap,w=[];for(const[T]of k){const F=C.get(T);F!==void 0&&(F.isAttached()||(O(F)&&cg(F,T,_,C,w,k),_.has(T)||k.delete(T),w.push(T)))}for(const T of w)C.delete(T);for(const T of v){const F=C.get(T);F===void 0||F.isAttached()||(_.has(T)||v.delete(T),C.delete(T))}}(l,a,e._dirtyLeaves,e._dirtyElements)),b!==e._compositionKey&&(a._flushSync=!0);const y=a._selection;if(D(y)){const m=a._nodeMap,p=y.anchor.key,v=y.focus.key;m.get(p)!==void 0&&m.get(v)!==void 0||z(19)}else ze(y)&&y._nodes.size===0&&(a._selection=null)}catch(b){return b instanceof Error&&e._onError(b),e._pendingEditorState=l,e._dirtyType=Hr,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void gn(e)}finally{Ze=c,dt=d,Ue=f,e._updating=h,Po=0}e._dirtyType!==lr||e._deferred.length>0||function(b,y){const m=y.getEditorState()._selection,p=b._selection;if(p!==null){if(p.dirty||!p.is(m))return!0}else if(m!==null)return!0;return!1}(a,e)?a._flushSync?(a._flushSync=!1,gn(e)):u&&Mx(()=>{gn(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function vt(e,t,n){e._updating?Ue===e?t():e._updates.push([t,n]):Ou(e,t,n)}class Ti{constructor(t,n,r){this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new Ti(this.element,t,this.after)}withAfter(t){return new Ti(this.element,this.before,t)}withElement(t){return new Ti(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&z(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&z(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&z(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(Vr||Mi);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=document.createElement("br");if(r.insertBefore(o,i),t){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,o),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=o}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,i){if(r===this.element){const a=this.getFirstChildOffset();return[t,Math.min(a+t.getChildrenSize(),Math.max(a,i))]}const o=_d(n,r);o.push(i);const s=_d(n,this.element);let l=t.getIndexWithinParent();for(let a=0;a<s.length;a++){const u=o[a],c=s[a];if(u===void 0||u<c)break;if(u>c){l+=1;break}}return[t.getParentOrThrow(),l]}}function _d(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=t.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;n.push(i)}return r!==e&&z(225),n.reverse()}class Bt extends Ps{constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(t){super.afterCloneFrom(t),this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return Y5[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const t=Oe()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){const t=[];let n=this.getFirstChild();for(;n!==null;){if(J(n)&&t.push(n),O(n)){const r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;O(t);){const n=t.getFirstChild();if(n===null)break;t=n}return t}getLastDescendant(){let t=this.getLastChild();for(;O(t);){const n=t.getLastChild();if(n===null)break;t=n}return t}getDescendantByIndex(t){const n=this.getChildren(),r=n.length;if(t>=r){const o=n[r-1];return O(o)&&o.getLastDescendant()||o||null}const i=n[t];return O(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:Fe(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&z(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:Fe(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&z(96,this.__key),t}getChildAtIndex(t){const n=this.getChildrenSize();let r,i;if(t<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=t;){if(i===t)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=t;){if(i===t)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let t="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];t+=o.getTextContent(),O(o)&&i!==r-1&&!o.isInline()&&(t+=yn)}return t}getTextContentSize(){let t=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];t+=o.getTextContentSize(),O(o)&&i!==r-1&&!o.isInline()&&(t+=yn.length)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const n=Zc[t];return!!(this.getFormat()&n)}return!1}hasTextFormat(t){const n=ar[t];return!!(this.getTextFormat()&n)}getFormatFlags(t,n){return ns(this.getLatest().__textFormat,t,n)}getTextStyle(){return this.getLatest().__textStyle}select(t,n){Qe();const r=U();let i=t,o=n;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){const a=this.getFirstChild();if(J(a)||O(a))return a.select(0,0)}else if(!(t!==void 0&&t!==s||n!==void 0&&n!==s)){const a=this.getLastChild();if(J(a)||O(a))return a.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const l=this.__key;return D(r)?(r.anchor.set(l,i,"element"),r.focus.set(l,o,"element"),r.dirty=!0,r):Dg(l,i,l,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(n=>n.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?Zc[t]:0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const n=this.getWritable();return n.__textFormat=t,n}setTextStyle(t){const n=this.getWritable();return n.__textStyle=t,n}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){const i=r.length,o=this.getChildrenSize(),s=this.getWritable();t+n<=o||z(226,String(t),String(n),String(o));const l=s.__key,a=[],u=[],c=this.getChildAtIndex(t+n);let d=null,f=o-n+i;if(t!==0)if(t===o)d=this.getLastChild();else{const g=this.getChildAtIndex(t);g!==null&&(d=g.getPreviousSibling())}if(n>0){let g=d===null?this.getFirstChild():d.getNextSibling();for(let x=0;x<n;x++){g===null&&z(100);const b=g.getNextSibling(),y=g.__key;rr(g.getWritable()),u.push(y),g=b}}let h=d;for(let g=0;g<i;g++){const x=r[g];h!==null&&x.is(h)&&(d=h=h.getPreviousSibling());const b=x.getWritable();b.__parent===l&&f--,rr(b);const y=x.__key;if(h===null)s.__first=y,b.__prev=null;else{const m=h.getWritable();m.__next=y,b.__prev=m.__key}x.__key===l&&z(76),b.__parent=l,a.push(y),h=x}if(t+n===o)h!==null&&(h.getWritable().__next=null,s.__last=h.__key);else if(c!==null){const g=c.getWritable();if(h!==null){const x=h.getWritable();g.__prev=h.__key,x.__next=c.__key}else g.__prev=null}if(s.__size=f,u.length){const g=U();if(D(g)){const x=new Set(u),b=new Set(a),{anchor:y,focus:m}=g;Cd(y,x,b)&&ts(y,y.getNode(),this,d,c),Cd(m,x,b)&&ts(m,m.getNode(),this,d,c),f!==0||this.canBeEmpty()||Me(this)||this.remove()}}return s}getDOMSlot(t){return new Ti(t)}exportDOM(t){const{element:n}=super.exportDOM(t);if($e(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(t.textFormat=n),r!==""&&(t.textStyle=r),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,n){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,n){const r=this.getDOMSlot(t);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=n.getElementByKey(o.getKey());s!==null&&(i==null?(r.insertChild(s),i=s):i!==s&&r.replaceChild(s,i),i=i.nextSibling)}}}function O(e){return e instanceof Bt}function Cd(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class to extends Ps{decorate(t,n){z(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function xe(e){return e instanceof to}class no extends Bt{static getType(){return"root"}static clone(){return new no}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){z(51)}getTextContent(){const t=this.__cachedText;return!eo()&&Oe()._dirtyType!==lr||t===null?super.getTextContent():t}remove(){z(52)}replace(t){z(53)}insertBefore(t){z(54)}insertAfter(t){z(55)}updateDOM(t,n){return!1}append(...t){for(let n=0;n<t.length;n++){const r=t[n];O(r)||xe(r)||z(56)}return super.append(...t)}static importJSON(t){return Ee().updateFromJSON(t)}collapseAtStart(){return!0}}function Xe(e){return e instanceof no}function Ug(e){return new Rs(new Map(e._nodeMap))}function $u(){return new Rs(new Map([["root",new no]]))}function Wg(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&z(130,n.name),O(e)){const r=t.children;Array.isArray(r)||z(59,n.name);const i=e.getChildren();for(let o=0;o<i.length;o++){const s=Wg(i[o]);r.push(s)}}return t}class Rs{constructor(t,n){this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return bd(n&&n.editor||null,this,t)}clone(t){const n=new Rs(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return bd(null,this,()=>({root:Wg(Ee())}))}}class Du extends Bt{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class ei extends Bt{static getType(){return"paragraph"}static clone(t){return new ei(t.__key)}createDOM(t){const n=document.createElement("p"),r=$r(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:Lx,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if($e(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r}return{element:n}}static importJSON(t){return ve().updateFromJSON(t)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(t,n){const r=ve();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||J(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function Lx(e){const t=ve();return e.style&&(t.setFormat(e.style.textAlign),Gu(e,t)),{node:t}}function ve(){return ft(new ei)}function Vu(e){return e instanceof ei}const ge=0,Ie=1,pa=3,bn=4;function Jg(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=$u(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=lr,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function Fx(e){const t=e||{},n=Ax(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,s=$u(),l=t.namespace||(i!==null?i._config.namespace:Qg()),a=t.editorState,u=[no,rn,Yi,Xi,ei,Du,...t.nodes||[]],{onError:c,html:d}=t,f=t.editable===void 0||t.editable;let h;if(e===void 0&&n!==null)h=n._nodes;else{h=new Map;for(let x=0;x<u.length;x++){let b=u[x],y=null,m=null;if(typeof b!="function"){const _=b;b=_.replace,y=_.with,m=_.withKlass||null}const p=b.getType(),v=b.transform(),k=new Set;v!==null&&k.add(v),h.set(p,{exportDOM:d&&d.export?d.export.get(b):void 0,klass:b,replace:y,replaceWithKlass:m,transforms:k})}}const g=new Os(s,i,h,{disableEvents:o,namespace:l,theme:r},c||console.error,function(x,b){const y=new Map,m=new Set,p=v=>{Object.keys(v).forEach(k=>{let _=y.get(k);_===void 0&&(_=[],y.set(k,_)),_.push(v[k])})};return x.forEach(v=>{const k=v.klass.importDOM;if(k==null||m.has(k))return;m.add(k);const _=k.call(v.klass);_!==null&&p(_)}),b&&p(b),y}(h,d?d.import:void 0),f);return a!==void 0&&(g._pendingEditorState=a,g._dirtyType=Hr),g}class Os{constructor(t,n,r,i,o,s,l){this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=lr,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Qg(),this._onError=o,this._htmlConversions=s,this._editable=l,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&z(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(t);o===void 0&&z(36,String(t));const s=o[r];return s.add(n),()=>{s.delete(n),o.every(l=>l.size===0)&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;o.set(n,i);const s=r&&r.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(n,i),()=>{o.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&z(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=Ld(r).get(n.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],o=r.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,n);i.push(s)}return function(s,l){const a=Ld(s.getEditorState()),u=[];for(const c of l){const d=a.get(c);d&&u.push(d)}u.length!==0&&s.update(()=>{for(const c of u)for(const d of c.keys()){const f=Fe(d);f&&f.markDirty()}},s._pendingEditorState===null?{tag:"history-merge"}:void 0)}(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return Q(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=$r(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,Jg(this,n,t,i),n!==null&&(this._config.disableEvents||yx(n),r!=null&&n.classList.remove(...r)),t!==null){const o=Ku(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=Hr,hg(this),this._updateTags.add("history-merge"),gn(this),this._config.disableEvents||function(l,a){const u=l.ownerDocument,c=Xo.get(u);(c===void 0||c<1)&&u.addEventListener("selectionchange",Pg),Xo.set(u,(c||0)+1),l.__lexicalEditor=a;const d=Fg(l);for(let f=0;f<ua.length;f++){const[h,g]=ua[f],x=typeof g=="function"?b=>{rd(b)||(nd(b),(a.isEditable()||h==="click")&&g(b,a))}:b=>{if(rd(b))return;nd(b);const y=a.isEditable();switch(h){case"cut":return y&&Q(a,Nu,b);case"copy":return Q(a,Fs,b);case"paste":return y&&Q(a,Gi,b);case"dragstart":return y&&Q(a,Ls,b);case"dragover":return y&&Q(a,Au,b);case"dragend":return y&&Q(a,px,b);case"focus":return y&&Q(a,kg,b);case"blur":return y&&Q(a,Sg,b);case"drop":return y&&Q(a,Iu,b)}};l.addEventListener(h,x),d.push(()=>{l.removeEventListener(h,x)})}}(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add("history-merge"),gn(this);Ei("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&z(38);let r=t;r._readOnly&&(r=Ug(t),r._selection=t._selection?t._selection.clone():null),fg(this);const i=this._pendingEditorState,o=this._updateTags,s=n!==void 0?n.tag:null;i===null||i.isEmpty()||(s!=null&&o.add(s),gn(this)),this._pendingEditorState=r,this._dirtyType=Hr,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&o.add(s),this._updating||gn(this)}parseEditorState(t,n){return function(r,i,o){const s=$u(),l=Ze,a=dt,u=Ue,c=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,h=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,Ze=s,dt=!1,Ue=i;try{const g=i._nodes;Ru(r.root,g),o&&o(),s._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=c,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=h,Ze=l,dt=a,Ue=u}return s}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return gn(this),this.getEditorState().read(t,{editor:this})}update(t,n){(function(r,i,o){r._updating?r._updates.push([i,o]):Ou(r,i,o)})(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),vt(this,()=>{const i=U(),o=Ee();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),$x("focus"),Dx(()=>{r.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=Ot(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Ei("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}Os.version="0.27.2+prod.esm";let Px=1;const Mx=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function Hu(e){const t=document.activeElement;if(!$e(t))return!1;const n=t.nodeName;return xe(en(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&$s(t)==null)}function ro(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!Hu(t)&&zu(t)===e}catch{return!1}}function Bu(e){return e instanceof Os}function zu(e){let t=e;for(;t!=null;){const n=$s(t);if(Bu(n))return n;t=io(t)}return null}function $s(e){return e?e.__lexicalEditor:null}function Ar(e){return e.isToken()||e.isSegmented()}function Cn(e){return ti(e)&&e.nodeType===H5}function Rx(e){return ti(e)&&e.nodeType===B5}function Br(e){let t=e;for(;t!=null;){if(Cn(t))return t;t=t.firstChild}return null}function ns(e,t,n){const r=ar[t];if(n!==null&&(e&r)==(n&r))return e;let i=e^r;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function Kg(e){return J(e)||Mt(e)||xe(e)}function Zg(e,t){if(t!=null)return void(e.__key=t);Qe(),Hg();const n=Oe(),r=Dn(),i=""+Px++;r._nodeMap.set(i,e),O(e)?n._dirtyElements.set(i,!0):n._dirtyLeaves.add(i),n._cloneNotNeeded.add(i),n._dirtyType=lg,e.__key=i}function rr(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling();if(i===null)if(o!==null){const s=o.getWritable();r.__first=o.__key,s.__prev=null}else r.__first=null;else{const s=i.getWritable();if(o!==null){const l=o.getWritable();l.__prev=s.__key,s.__next=l.__key}else s.__next=null;n.__prev=null}if(o===null)if(i!==null){const s=i.getWritable();r.__last=i.__key,s.__next=null}else r.__last=null;else{const s=o.getWritable();if(i!==null){const l=i.getWritable();l.__next=s.__key,s.__prev=l.__key}else s.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function rs(e){Hg();const t=e.getLatest(),n=t.__parent,r=Dn(),i=Oe(),o=r._nodeMap,s=i._dirtyElements;n!==null&&function(a,u,c){let d=a;for(;d!==null;){if(c.has(d))return;const f=u.get(d);if(f===void 0)break;c.set(d,!1),d=f.__parent}}(n,o,s);const l=t.__key;i._dirtyType=lg,O(e)?s.set(l,!0):i._dirtyLeaves.add(l)}function Ye(e){Qe();const t=Oe(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=Fe(n);r!==null&&r.getWritable()}if(e!==null){const r=Fe(e);r!==null&&r.getWritable()}}}function An(){return eo()?null:Oe()._compositionKey}function Fe(e,t){const n=(t||Dn())._nodeMap.get(e);return n===void 0?null:n}function Gg(e,t){const n=Ds(e,Oe());return n!==void 0?Fe(n,t):null}function Ds(e,t){return e[`__lexicalKey_${t._key}`]}function en(e,t){let n=e;for(;n!=null;){const r=Gg(n,t);if(r!==null)return r;n=io(n)}return null}function qg(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function wd(e){return e.read(()=>Ee().getTextContent())}function Ee(){return Yg(Dn())}function Yg(e){return e._nodeMap.get("root")}function Be(e){Qe();const t=Dn();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Nr(e){const t=Oe(),n=function(r,i){let o=r;for(;o!=null;){const s=Ds(o,i);if(s!==void 0)return s;o=io(o)}return null}(e,t);return n===null?e===t.getRootElement()?Fe("root"):null:Fe(n)}function kd(e,t){return t?e.getTextContentSize():0}function Xg(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function ju(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function Qg(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function ep(e){return Cn(e)?e.nodeValue:null}function Uu(e,t,n){const r=Ot(kt(t));if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:s}=r;if(i!==null){let l=ep(i);const a=en(i);if(l!==null&&J(a)){if(l===ws&&n){const u=n.length;l=n,o=u,s=u}l!==null&&Wu(a,l,o,s,e)}}}function Wu(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();let l=t;(s||i)&&t[t.length-1]===ws&&(l=t.slice(0,-1));const a=o.getTextContent();if(i||l!==a){if(l===""){if(Ye(null),Mi||Vr||Uo)o.remove();else{const x=Oe();setTimeout(()=>{x.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),c=Xr(),d=o.getTextContentSize(),f=An(),h=o.getKey();if(o.isToken()||f!==null&&h===f&&!s||D(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===e.__key&&c.anchor.offset===0&&!o.canInsertTextBefore()&&!s||c.focus.key===e.__key&&c.focus.offset===d&&!o.canInsertTextAfter()&&!s))return void o.markDirty();const g=U();if(!D(g)||n===null||r===null)return void o.setTextContent(l);if(g.setTextNodeRange(o,n,o,r),o.isSegmented()){const x=Ne(o.getTextContent());o.replace(x),o=x}o.setTextContent(l)}}}function Sd(e){return e==="ArrowLeft"}function Ed(e){return e==="ArrowRight"}function vi(e,t){return It?e:t}function Td(e){return e==="Enter"}function kr(e){return e==="Backspace"}function fi(e){return e==="Delete"}function Id(e,t,n){return e.toLowerCase()==="a"&&vi(t,n)}function Ox(e){const t=Ee();if(D(e)){const n=e.anchor,r=e.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),ur(e),e}{const n=t.select(0,t.getChildrenSize());return Be(ur(n)),n}}function $r(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const o=Wo(i);return n[t]=o,o}return i}function Ju(e,t,n,r,i){if(n.size===0)return;const o=r.__type,s=r.__key,l=t.get(o);l===void 0&&z(33,o);const a=l.klass;let u=e.get(a);u===void 0&&(u=new Map,e.set(a,u));const c=u.get(s),d=c==="destroyed"&&i==="created";(c===void 0||d)&&u.set(s,d?"updated":i)}function Ad(e,t,n){const r=e.getParent();let i=n,o=e;return r!==null&&(t&&n===0?(i=o.getIndexWithinParent(),o=r):t||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(t?i-1:i)}function ma(e,t){const n=e.offset;if(e.type==="element")return Ad(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?Ad(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function tp(e){const t=kt(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function Q(e,t,n){return jg(e,t,n)}function Vs(e){return!Xe(e)&&!e.isLastChild()&&!e.isInline()}function zr(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&z(75,t),n}function io(e){const t=e.assignedSlot||e.parentElement;return ba(t)?t.host:t}function np(e){return Rx(e)?e:$e(e)?e.ownerDocument:null}function $x(e){Qe(),Oe()._updateTags.add(e)}function Dx(e){Qe(),Oe()._deferred.push(e)}function xa(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function Ku(e){const t=np(e);return t?t.defaultView:null}function kt(e){const t=e._window;return t===null&&z(78),t}function Vx(e){let t=e.getParentOrThrow();for(;t!==null;){if(Me(t))return t;t=t.getParentOrThrow()}return t}function Me(e){return Xe(e)||O(e)&&e.isShadowRoot()}function Hx(e){const t=e.constructor.clone(e);return Zg(t,null),t}function ft(e){const t=Oe(),n=e.constructor.getType(),r=t._nodes.get(n);r===void 0&&z(200,e.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const s=i(e),l=s.constructor;return o!==null?s instanceof o||z(201,o.name,o.getType(),l.name,l.getType(),e.constructor.name,n):s instanceof e.constructor&&l!==e.constructor||z(202,l.name,l.getType(),e.constructor.name,n),s.__key===e.__key&&z(203,e.constructor.name,n,l.name,l.getType()),s}return e}function vl(e,t){!Xe(e.getParent())||O(t)||xe(t)||z(99)}function Bx(e){const t=Fe(e);return t===null&&z(63,e),t}function _l(e){return(xe(e)||O(e)&&!e.canBeEmpty())&&!e.isInline()}function ya(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function Ot(e){return Ht?(e||window).getSelection():null}function zx(e){const t=Ku(e);return t?t.getSelection():null}function jx(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),Me(e)&&z(102);const r=s=>{const l=s.getParentOrThrow(),a=Me(l),u=s!==n||a?Hx(s):s;if(a)return O(s)&&O(u)||z(133),s.insertAfter(u),[s,u,u];{const[c,d,f]=r(l),h=s.getNextSiblings();return f.append(u,...h),[c,d,u]}},[i,o]=r(n);return[i,o]}function rp(e){return $e(e)&&e.tagName==="A"}function $e(e){return ti(e)&&e.nodeType===V5}function ti(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function ba(e){return ti(e)&&e.nodeType===z5}function va(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function is(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function Lt(e){if(xe(e)&&!e.isInline())return!0;if(!O(e)||Me(e))return!1;const t=e.getFirstChild(),n=t===null||Mt(t)||J(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function Cl(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function Ux(){return Oe()}const Nd=new WeakMap,Wx=new Map;function Ld(e){if(!e._readOnly&&e.isEmpty())return Wx;e._readOnly||z(192);let t=Nd.get(e);return t||(t=function(n){const r=new Map;for(const[i,o]of n._nodeMap){const s=o.__type;let l=r.get(s);l||(l=new Map,r.set(s,l)),l.set(i,o)}return r}(e),Nd.set(e,t)),t}function Zu(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Gu(e,t){const n=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(n)}function Jx(e){return e.__lexicalUnmanaged===!0}const Kx={next:"previous",previous:"next"};class qu{constructor(t){this.origin=t}[Symbol.iterator](){return ip({hasNext:jr,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return et(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return et(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,n){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,n)),this}splice(t,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let o=this;const s=this.getParentAtCaret(),l=new Map;for(let a=o.getAdjacentCaret();a!==null&&l.size<t;a=a.getAdjacentCaret()){const u=a.origin.getWritable();l.set(u.getKey(),u)}for(const a of i){if(l.size>0){const u=o.getNodeAtCaret();if(u){if(l.delete(u.getKey()),l.delete(a.getKey()),!(u.is(a)||o.origin.is(a))){const c=a.getParent();c&&c.is(s)&&a.remove(),u.replace(a)}}else u===null&&z(263,Array.from(l).join(" "))}else o.insert(a);o=et(a,this.direction)}for(const a of l.values())a.remove();return this}}class zi extends qu{constructor(){super(...arguments);bt(this,"type","child")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:tn(n,this.direction)}getParentCaret(n="root"){return et(Yu(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=ni(this.direction);return et(this.getNodeAtCaret(),n)||tn(this.origin,n)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(n){return n instanceof zi&&this.direction===n.direction&&this.origin.is(n.origin)}isSamePointCaret(n){return this.isSameNodeCaret(n)}}const Zx={root:Xe,shadowRoot:Me};function ni(e){return Kx[e]}function Yu(e,t="root"){return Zx[t](e)?null:e}class dr extends qu{constructor(){super(...arguments);bt(this,"type","sibling")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:et(n,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return O(this.origin)?tn(this.origin,this.direction):null}getParentCaret(n="root"){return et(Yu(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=ni(this.direction);return et(this.getNodeAtCaret(),n)||tn(this.origin.getParentOrThrow(),n)}isSamePointCaret(n){return n instanceof dr&&this.direction===n.direction&&this.origin.is(n.origin)}isSameNodeCaret(n){return(n instanceof dr||n instanceof fr)&&this.direction===n.direction&&this.origin.is(n.origin)}}class fr extends qu{constructor(n,r){super(n);bt(this,"type","text");this.offset=r}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:hr(n,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(n="root"){return et(Yu(this.getParentAtCaret(),n),this.direction)}getFlipped(){return hr(this.origin,ni(this.direction),this.offset)}isSamePointCaret(n){return n instanceof fr&&this.direction===n.direction&&this.origin.is(n.origin)&&this.offset===n.offset}isSameNodeCaret(n){return(n instanceof dr||n instanceof fr)&&this.direction===n.direction&&this.origin.is(n.origin)}getSiblingCaret(){return et(this.origin,this.direction)}}function ir(e){return e instanceof fr}function jr(e){return e instanceof dr}function Xt(e){return e instanceof zi}const Gx={next:class extends fr{constructor(){super(...arguments);bt(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends fr{constructor(){super(...arguments);bt(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},qx={next:class extends dr{constructor(){super(...arguments);bt(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends dr{constructor(){super(...arguments);bt(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Yx={next:class extends zi{constructor(){super(...arguments);bt(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends zi{constructor(){super(...arguments);bt(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function et(e,t){return e?new qx[t](e):null}function hr(e,t,n){return e?new Gx[t](e,Hs(e,n)):null}function Hs(e,t){const n=e.getTextContentSize(),r=t==="next"?n:t==="previous"?0:t;return r>=0&&r<=n||z(274,String(t),String(n)),r}function Fd(e,t){return new Qx(e,t)}function tn(e,t){return O(e)?new Yx[t](e):null}function Xx(e){return e&&e.getChildCaret()||e}function Xu(e){return e&&Xx(e.getAdjacentCaret())}class Qu{constructor(t,n,r){bt(this,"type","node-caret-range");this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new Qu(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return ir(o)?function(s,l){const{direction:a,origin:u}=s,c=Hs(u,l==="focus"?ni(a):a);return Fd(s,c-s.offset)}(o,i):null},n=t("anchor"),r=t("focus");if(n&&r){const{caret:i}=n,{caret:o}=r;if(i.isSameNodeCaret(o))return[Fd(i,o.offset-i.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=ir(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=ir(r),o=s=>s.isSameNodeCaret(r)?null:Xu(s)||s.getParentCaret(t);return ip({hasNext:s=>s!==null&&!(i&&r.isSameNodeCaret(s)),initial:n.isSameNodeCaret(r)?null:o(n),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Qx{constructor(t,n){bt(this,"type","slice");this.caret=t,this.distance=n}getSliceIndices(){const{distance:t,caret:{offset:n}}=this,r=n+t;return r<n?[r,n]:[n,r]}getTextContent(){const[t,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:n}}=this,[r,i]=this.getSliceIndices(),o=t.getTextContent();return hr(t.setTextContent(o.slice(0,r)+o.slice(i)),n,r)}}function ec(e){return Ur(e,et(Ee(),e.direction))}function Ur(e,t){return e.direction!==t.direction&&z(265),new Qu(e,t,e.direction)}function ip(e){const{initial:t,hasNext:n,step:r,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const s={done:!1,value:i(o)};return o=r(o),s}}}function op(e,t){const n=Mo(e.origin,t.origin);switch(n===null&&z(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",i=t.type==="text";return r&&i?function(o,s){return Math.sign(o-s)}(e.offset,t.offset):e.type===t.type?0:r?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return sp(n)}}function sp(e){const{a:t,b:n}=e,r=t.__key,i=n.__key;let o=t,s=n;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===i)return-1;if(s.__key===r)return 1}return o===null?1:-1}function _o(e,t){return t.is(e)}function Pd(e){return O(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Mo(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,i]=Pd(e);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=Pd(t);r;i=r,r=r.getParent()){const o=n.get(r);if(o!==void 0)return o===null?(_o(e,r)||z(276),{commonAncestor:r,type:"ancestor"}):i===null?(_o(t,r)||z(277),{commonAncestor:r,type:"descendant"}):((O(o)||_o(e,o))&&(O(i)||_o(t,i))&&r.is(o.getParent())&&r.is(i.getParent())||z(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}function Rn(e,t){const{type:n,key:r,offset:i}=e,o=Bx(e.key);return n==="text"?(J(o)||z(266,o.getType(),r),hr(o,t,i)):(O(o)||z(267,o.getType(),r),up(o,e.offset,t))}function gr(e,t){const{origin:n,direction:r}=t,i=r==="next";ir(t)?e.set(n.getKey(),t.offset,"text"):jr(t)?J(n)?e.set(n.getKey(),Hs(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(Xt(t)&&O(n)||z(268),e.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function wl(e,t){gr(e.anchor,t.anchor),gr(e.focus,t.focus)}function Md(e){const{anchor:t,focus:n}=e,r=Rn(t,"next"),i=Rn(n,"next"),o=op(r,i)<=0?"next":"previous";return Ur(Wr(r,o),Wr(i,o))}function tc(e){const{direction:t,origin:n}=e,r=et(n,ni(t)).getNodeAtCaret();return r?et(r,t):tn(n.getParentOrThrow(),t)}function Rd(e,t="root"){const n=[e];for(let r=Xt(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(tc(r));return n}function kl(e){return!!e&&e.origin.isAttached()}function e2(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let i=t;const o=ap(e,r),s=Rd(o.anchor,n),l=Rd(o.focus.getFlipped(),n),a=new Set,u=[];for(const g of o.iterNodeCarets(n))if(Xt(g))a.add(g.origin.getKey());else if(jr(g)){const{origin:x}=g;O(x)&&!a.has(x.getKey())||u.push(x)}for(const g of u)g.remove();for(const g of o.getTextSlices()){if(!g)continue;const{origin:x}=g.caret,b=x.getTextContentSize(),y=tc(et(x,r)),m=x.getMode();if(Math.abs(g.distance)===b&&i==="removeEmptySlices"||m==="token"&&g.distance!==0)y.remove();else if(g.distance!==0){i="removeEmptySlices";let p=g.removeTextSlice();const v=g.caret.origin;if(m==="segmented"){const k=p.origin,_=Ne(k.getTextContent()).setStyle(k.getStyle()).setFormat(k.getFormat());y.replaceOrInsert(_),p=hr(_,r,p.offset)}v.is(s[0].origin)&&(s[0]=p),v.is(l[0].origin)&&(l[0]=p.getFlipped())}}let c,d;for(const g of s)if(kl(g)){c=Ct(g);break}for(const g of l)if(kl(g)){d=Ct(g);break}const f=function(g,x,b){if(!g||!x)return null;const y=g.getParentAtCaret(),m=x.getParentAtCaret();if(!y||!m)return null;const p=y.getParents().reverse();p.push(y);const v=m.getParents().reverse();v.push(m);const k=Math.min(p.length,v.length);let _;for(_=0;_<k&&p[_]===v[_];_++);const C=(F,M)=>{let R;for(let L=_;L<F.length;L++){const H=F[L];if(Me(H))return;!R&&M(H)&&(R=H)}return R},w=C(p,Lt),T=w&&C(v,F=>b.has(F.getKey())&&Lt(F));return w&&T?[w,T]:null}(c,d,a);if(f){const[g,x]=f;tn(g,"previous").splice(0,x.getChildren()),x.remove()}const h=[c,d,...s,...l].find(kl);if(h){const g=Wr(Ct(h),e.direction);return Ur(g,g)}z(269,JSON.stringify(s.map(g=>g.origin.__key)))}function Ct(e){const t=function(i){let o=i;for(;Xt(o);){const s=Xu(o);if(!Xt(s))break;o=s}return o}(e.getLatest()),{direction:n}=t;if(J(t.origin))return ir(t)?t:hr(t.origin,n,n);const r=t.getAdjacentCaret();return jr(r)&&J(r.origin)?hr(r.origin,n,ni(n)):t}function lp(e){return ir(e)&&e.offset!==Hs(e.origin,e.direction)}function Wr(e,t){return e.direction===t?e:e.getFlipped()}function ap(e,t){return e.direction===t?e:Ur(Wr(e.focus,t),Wr(e.anchor,t))}function up(e,t,n){let r=tn(e,"next");for(let i=0;i<t;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return Wr(r,n)}function t2(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const n2=new Map;function r2(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(t[i.trim()]=o.trim())}return t}function cp(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&n!==null){const[r,i]=n,o=e.isBackward(),s=r.getNode(),l=i.getNode(),a=t.is(s),u=t.is(l);if(a||u){const[c,d]=ga(e),f=s.is(l),h=t.is(o?l:s),g=t.is(o?s:l);let x,b=0;return f?(b=c>d?d:c,x=c>d?c:d):h?(b=o?d:c,x=void 0):g&&(b=0,x=o?c:d),t.__text=t.__text.slice(b,x),t}}return t}function Od(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return O(t)||t2(177),e.offset===t.getChildrenSize()}function i2(e){const t=e.getStyle(),n=r2(t);n2.set(t,n)}function o2(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function s2(e,t,n=o2){if(e===null)return;const r=e.getStartEndPoints(),i=new Map;let o=null;if(r){const[s,l]=r;o=Qi(),o.anchor.set(s.key,s.offset,s.type),o.focus.set(l.key,l.offset,l.type);const a=Vd(s.getNode(),Lt),u=Vd(l.getNode(),Lt);O(a)&&i.set(a.getKey(),a),O(u)&&i.set(u.getKey(),u)}for(const s of e.getNodes())O(s)&&Lt(s)&&i.set(s.getKey(),s);for(const[s,l]of i){const a=t();n(l,a),l.replace(a,!0),o&&(s===o.anchor.key&&o.anchor.set(a.getKey(),o.anchor.offset,o.anchor.type),s===o.focus.key&&o.focus.set(a.getKey(),o.focus.offset,o.focus.type))}o&&e.is(U())&&Be(o)}function $d(e,t){const n=Rn(e.focus,t?"previous":"next");if(lp(n))return!1;for(const r of ec(n)){if(Xt(r))return!r.origin.isInline();if(!O(r.origin)){if(xe(r.origin))return!0;break}}return!1}function l2(e,t,n,r){e.modify(t?"extend":"move",n,r)}function a2(e){const t=e.anchor.getNode();return(Xe(t)?t:t.getParentOrThrow()).getDirection()==="rtl"}function Dd(e,t,n){const r=a2(e);l2(e,t,n?!r:r,"character")}function Vd(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function u2(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Bs=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,c2=Bs&&"documentMode"in document?document.documentMode:null,d2=Bs&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);!(!Bs||!("InputEvent"in window)||c2)&&"getTargetRanges"in new window.InputEvent("input");function dp(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function ht(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const f2=Bs,h2=d2;function $t(e,...t){const n=dp(...t);n.length>0&&e.classList.add(...n)}function zs(e,...t){const n=dp(...t);n.length>0&&e.classList.remove(...n)}function g2(e){return e?e.getAdjacentCaret():null}function fp(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function _a(e){const t=Vn(e,n=>O(n)&&!n.isInline());return O(t)||u2(4,e.__key),t}const Vn=(e,t)=>{let n=e;for(;n!==Ee()&&n!=null;){if(t(n))return n;n=n.getParent()}return null};function hp(e){const t=U()||Xr();if(D(t)){const{focus:n}=t,r=n.getNode(),i=n.offset;if(Me(r))up(r,i,"next").insert(e),e.selectNext();else{let o,s;J(r)?(o=r.getParentOrThrow(),s=r.getIndexWithinParent(),i>0&&(s+=1,r.splitText(i))):(o=r,s=i);const[,l]=jx(o,s);l.insertBefore(e),l.selectStart()}}else{if(t!=null){const r=t.getNodes();r[r.length-1].getTopLevelElementOrThrow().insertAfter(e)}else Ee().append(e);const n=ve();e.insertAfter(n),n.select()}return e.getLatest()}function nc(e,t){const n=t();return e.replace(n),n.append(e),n}function Nn(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function p2(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);i!==null&&n.push(i)}return n}let Sl=!(h2||!f2)&&void 0;function m2(e){let t=1;if(function(){if(Sl===void 0){const n=document.createElement("div");n.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(n);const r=n.getBoundingClientRect();n.style.setProperty("zoom","2"),Sl=n.getBoundingClientRect().width===r.width,document.body.removeChild(n)}return Sl}())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}const Co=0,Ca=1,wa=2,Nt=0,x2=1,Hd=2,y2=3,b2=4;function v2(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return Nt;const o=t._selection,s=e._selection;if(i)return x2;if(!(D(o)&&D(s)&&s.isCollapsed()&&o.isCollapsed()))return Nt;const l=function(y,m,p){const v=y._nodeMap,k=[];for(const _ of m){const C=v.get(_);C!==void 0&&k.push(C)}for(const[_,C]of p){if(!C)continue;const w=v.get(_);w===void 0||Xe(w)||k.push(w)}return k}(t,n,r);if(l.length===0)return Nt;if(l.length>1){const y=t._nodeMap,m=y.get(o.anchor.key),p=y.get(s.anchor.key);return m&&p&&!e._nodeMap.has(m.__key)&&J(m)&&m.__text.length===1&&o.anchor.offset===1?Hd:Nt}const a=l[0],u=e._nodeMap.get(a.__key);if(!J(u)||!J(a)||u.__mode!==a.__mode)return Nt;const c=u.__text,d=a.__text;if(c===d)return Nt;const f=o.anchor,h=s.anchor;if(f.key!==h.key||f.type!=="text")return Nt;const g=f.offset,x=h.offset,b=d.length-c.length;return b===1&&x===g-1?Hd:b===-1&&x===g+1?y2:b===-1&&x===g?b2:Nt}function _2(e,t){let n=Date.now(),r=Nt;return(i,o,s,l,a,u)=>{const c=Date.now();if(u.has("historic"))return r=Nt,n=c,wa;const d=v2(i,o,l,a,e.isComposing()),f=(()=>{const h=s===null||s.editor===e,g=u.has("history-push");if(!g&&h&&u.has("history-merge"))return Co;if(i===null)return Ca;const x=o._selection;return l.size>0||a.size>0?g===!1&&d!==Nt&&d===r&&c<n+t&&h||l.size===1&&function(b,y,m){const p=y._nodeMap.get(b),v=m._nodeMap.get(b),k=y._selection,_=m._selection;return!(D(k)&&D(_)&&k.anchor.type==="element"&&k.focus.type==="element"&&_.anchor.type==="text"&&_.focus.type==="text"||!J(p)||!J(v)||p.__parent!==v.__parent)&&JSON.stringify(y.read(()=>p.exportJSON()))===JSON.stringify(m.read(()=>v.exportJSON()))}(Array.from(l)[0],i,o)?Co:Ca:x!==null?Co:wa})();return n=c,r=d,f}}function Bd(e){e.undoStack=[],e.redoStack=[],e.current=null}function C2(e,t,n){const r=_2(e,n);return ht(e.registerCommand(Ts,()=>(function(o,s){const l=s.redoStack,a=s.undoStack;if(a.length!==0){const u=s.current,c=a.pop();u!==null&&(l.push(u),o.dispatchCommand(yi,!0)),a.length===0&&o.dispatchCommand(bi,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),ge),e.registerCommand(Is,()=>(function(o,s){const l=s.redoStack,a=s.undoStack;if(l.length!==0){const u=s.current;u!==null&&(a.push(u),o.dispatchCommand(bi,!0));const c=l.pop();l.length===0&&o.dispatchCommand(yi,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),ge),e.registerCommand(mx,()=>(Bd(t),!1),ge),e.registerCommand(xx,()=>(Bd(t),e.dispatchCommand(yi,!1),e.dispatchCommand(bi,!1),!0),ge),e.registerUpdateListener(({editorState:o,prevEditorState:s,dirtyLeaves:l,dirtyElements:a,tags:u})=>{const c=t.current,d=t.redoStack,f=t.undoStack,h=c===null?null:c.editorState;if(c!==null&&o===h)return;const g=r(s,o,c,l,a,u);if(g===Ca)d.length!==0&&(t.redoStack=[],e.dispatchCommand(yi,!1)),c!==null&&(f.push({...c}),e.dispatchCommand(bi,!0));else if(g===wa)return;t.current={editor:e,editorState:o}}))}function gp(){return{current:null,redoStack:[],undoStack:[]}}function w2({delay:e,externalHistoryState:t}){const[n]=rt();return function(r,i,o=1e3){const s=N.useMemo(()=>i||gp(),[i]);N.useEffect(()=>C2(r,s,o),[o,r,s])}(n,t,e),null}function k2(e,t){const n=t.body?t.body.childNodes:[];let r=[];const i=[];for(let o=0;o<n.length;o++){const s=n[o];if(!mp.has(s.nodeName)){const l=xp(s,e,i,!1);l!==null&&(r=r.concat(l))}}return function(o){for(const s of o)s.getNextSibling()instanceof Du&&s.insertAfter(Rt());for(const s of o){const l=s.getChildren();for(const a of l)s.insertBefore(a);s.remove()}}(i),r}function S2(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Ee().getChildren();for(let i=0;i<r.length;i++)pp(e,r[i],n,t);return n.innerHTML}function pp(e,t,n,r=null){let i=r===null||t.isSelected(r);const o=O(t)&&t.excludeFromCopy("html");let s=t;if(r!==null){let h=Zu(t);h=J(h)&&r!==null?cp(r,h):h,s=h}const l=O(s)?s.getChildren():[],a=e._nodes.get(s.getType());let u;u=a&&a.exportDOM!==void 0?a.exportDOM(e,s):s.exportDOM(e);const{element:c,after:d}=u;if(!c)return!1;const f=document.createDocumentFragment();for(let h=0;h<l.length;h++){const g=l[h],x=pp(e,g,f,r);!i&&O(t)&&x&&t.extractWithChild(g,r,"html")&&(i=!0)}if(i&&!o){if(($e(c)||ba(c))&&c.append(f),n.append(c),d){const h=d.call(s,c);h&&(ba(c)?c.replaceChildren(h):c.replaceWith(h))}}else n.append(f);return i}const mp=new Set(["STYLE","SCRIPT"]);function xp(e,t,n,r,i=new Map,o){let s=[];if(mp.has(e.nodeName))return s;let l=null;const a=function(g,x){const{nodeName:b}=g,y=x._htmlConversions.get(b.toLowerCase());let m=null;if(y!==void 0)for(const p of y){const v=p(g);v!==null&&(m===null||(m.priority||0)<=(v.priority||0))&&(m=v)}return m!==null?m.conversion:null}(e,t),u=a?a(e):null;let c=null;if(u!==null){c=u.after;const g=u.node;if(l=Array.isArray(g)?g[g.length-1]:g,l!==null){for(const[,x]of i)if(l=x(l,o),!l)break;l&&s.push(...Array.isArray(g)?g:[l])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const d=e.childNodes;let f=[];const h=(l==null||!Me(l))&&(l!=null&&Qo(l)||r);for(let g=0;g<d.length;g++)f.push(...xp(d[g],t,n,h,new Map(i),l));return c!=null&&(f=c(f)),is(e)&&(f=E2(e,f,h?()=>{const g=new Du;return n.push(g),g}:ve)),l==null?f.length>0?s=s.concat(f):is(e)&&function(g){return g.nextSibling==null||g.previousSibling==null?!1:va(g.nextSibling)&&va(g.previousSibling)}(e)&&(s=s.concat(Rt())):O(l)&&l.append(...f),s}function E2(e,t,n){const r=e.style.textAlign,i=[];let o=[];for(let s=0;s<t.length;s++){const l=t[s];if(Qo(l))r&&!l.getFormat()&&l.setFormat(r),i.push(l);else if(o.push(l),s===t.length-1||s<t.length-1&&Qo(t[s+1])){const a=n();a.setFormat(r),a.append(...o),i.push(a),o=[]}}return i}function os(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function T2(e,t=U()){return t==null&&os(166),D(t)&&t.isCollapsed()||t.getNodes().length===0?"":S2(e,t)}function I2(e,t=U()){return t==null&&os(166),D(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(A2(e,t))}function zd(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const l=JSON.parse(r);if(l.namespace===n._config.namespace&&Array.isArray(l.nodes))return jd(n,N2(l.nodes),t)}catch{}const i=e.getData("text/html"),o=e.getData("text/plain");if(i&&o!==i)try{const l=new DOMParser().parseFromString(function(a){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:u=>u}).createHTML(a):a}(i),"text/html");return jd(n,k2(n,l),t)}catch{}const s=o||e.getData("text/uri-list");if(s!=null)if(D(t)){const l=s.split(/(\r?\n|\t)/);l[l.length-1]===""&&l.pop();for(let a=0;a<l.length;a++){const u=U();if(D(u)){const c=l[a];c===`
|
|
17
|
+
`||c===`\r
|
|
18
|
+
`?u.insertParagraph():c===" "?u.insertNodes([Yr()]):u.insertText(c)}}}else t.insertRawText(s)}function jd(e,t,n){e.dispatchCommand(dx,{nodes:t,selection:n})||n.insertNodes(t)}function yp(e,t,n,r=[]){let i=t===null||n.isSelected(t);const o=O(n)&&n.excludeFromCopy("html");let s=n;if(t!==null){let u=Zu(n);u=J(u)&&t!==null?cp(t,u):u,s=u}const l=O(s)?s.getChildren():[],a=function(u){const c=u.exportJSON(),d=u.constructor;if(c.type!==d.getType()&&os(58,d.name),O(u)){const f=c.children;Array.isArray(f)||os(59,d.name)}return c}(s);if(J(s)){const u=s.__text;u.length>0?a.text=u:i=!1}for(let u=0;u<l.length;u++){const c=l[u],d=yp(e,t,c,a.children);!i&&O(n)&&d&&n.extractWithChild(c,t,"clone")&&(i=!0)}if(i&&!o)r.push(a);else if(Array.isArray(a.children))for(let u=0;u<a.children.length;u++){const c=a.children[u];r.push(c)}return i}function A2(e,t){const n=[],r=Ee().getChildren();for(let i=0;i<r.length;i++)yp(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function N2(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=Nx(r);J(i)&&i2(i),t.push(i)}return t}let Sr=null;async function Ud(e,t,n){if(Sr!==null)return!1;if(t!==null)return new Promise((u,c)=>{e.update(()=>{u(Wd(e,t,n))})});const r=e.getRootElement(),i=e._window||window,o=window.document,s=Ot(i);if(r===null||s===null)return!1;const l=o.createElement("span");l.style.cssText="position: fixed; top: -1000px;",l.append(o.createTextNode("#")),r.append(l);const a=new Range;return a.setStart(l,0),a.setEnd(l,1),s.removeAllRanges(),s.addRange(a),new Promise((u,c)=>{const d=e.registerCommand(Fs,f=>(Nn(f,ClipboardEvent)&&(d(),Sr!==null&&(window.clearTimeout(Sr),Sr=null),u(Wd(e,f,n))),!0),bn);Sr=window.setTimeout(()=>{d(),Sr=null,u(!1)},50),o.execCommand("copy"),l.remove()})}function Wd(e,t,n){if(n===void 0){const i=Ot(e._window);if(!i)return!1;const o=i.anchorNode,s=i.focusNode;if(o!==null&&s!==null&&!ro(e,o,s))return!1;const l=U();if(l===null)return!1;n=F2(l)}t.preventDefault();const r=t.clipboardData;return r!==null&&(P2(r,n),!0)}const L2=[["text/html",T2],["application/x-lexical-editor",I2]];function F2(e=U()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Ux();for(const[r,i]of L2){const o=i(n,e);o!==null&&(t[r]=o)}}return t}function P2(e,t){for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function Jd(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const ri=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,M2=ri&&"documentMode"in document?document.documentMode:null,R2=!(!ri||!("InputEvent"in window)||M2)&&"getTargetRanges"in new window.InputEvent("input"),O2=ri&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Kd=ri&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,$2=ri&&/^(?=.*Chrome).*/i.test(navigator.userAgent),D2=ri&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!$2,Zd=_n();let js=class bp extends Bt{static getType(){return"quote"}static clone(t){return new bp(t.__key)}createDOM(t){const n=document.createElement("blockquote");return $t(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:t=>({conversion:V2,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if($e(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return oo().updateFromJSON(t)}insertNewAfter(t,n){const r=ve(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const t=ve();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}};function oo(){return ft(new js)}function ka(e){return e instanceof js}let so=class vp extends Bt{static getType(){return"heading"}static clone(t){return new vp(t.__tag,t.__key)}constructor(t,n){super(n),this.__tag=t}getTag(){return this.__tag}setTag(t){const n=this.getWritable();return this.__tag=t,n}createDOM(t){const n=this.__tag,r=document.createElement(n),i=t.theme.heading;if(i!==void 0){const o=i[n];$t(r,o)}return r}updateDOM(t,n,r){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:Er,priority:0}),h2:t=>({conversion:Er,priority:0}),h3:t=>({conversion:Er,priority:0}),h4:t=>({conversion:Er,priority:0}),h5:t=>({conversion:Er,priority:0}),h6:t=>({conversion:Er,priority:0}),p:t=>{const n=t.firstChild;return n!==null&&Gd(n)?{conversion:()=>({node:null}),priority:3}:null},span:t=>Gd(t)?{conversion:n=>({node:qt("h1")}),priority:3}:null}}exportDOM(t){const{element:n}=super.exportDOM(t);if($e(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return qt(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,n=!0){const r=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&r===i.getTextContentSize()||!t?ve():qt(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,n),r===0&&!this.isEmpty()&&t){const l=ve();l.select(),this.replace(l,!0)}return o}collapseAtStart(){const t=this.isEmpty()?ve():qt(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function Gd(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function Er(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=qt(t),e.style!==null&&(Gu(e,n),n.setFormat(e.style.textAlign))),{node:n}}function V2(e){const t=oo();return e.style!==null&&(t.setFormat(e.style.textAlign),Gu(e,t)),{node:t}}function qt(e="h1"){return ft(new so(e))}function Us(e){return e instanceof so}function wo(e){let t=null;if(Nn(e,DragEvent)?t=e.dataTransfer:Nn(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function qd(e){const t=U();if(!D(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const o=r[i],s=o.getKey();if(n.has(s))continue;const l=Vn(o,u=>O(u)&&!u.isInline());if(l===null)continue;const a=l.getKey();l.canIndent()&&!n.has(a)&&(n.add(a),e(l))}return n.size>0}function ko(e){const t=en(e);return xe(t)}function El(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function H2(e){return ht(e.registerCommand(Es,t=>{const n=U();return!!ze(n)&&(n.clear(),!0)},0),e.registerCommand(nr,t=>{const n=U();return!!D(n)&&(n.deleteCharacter(t),!0)},ge),e.registerCommand(Vi,t=>{const n=U();return!!D(n)&&(n.deleteWord(t),!0)},ge),e.registerCommand(Hi,t=>{const n=U();return!!D(n)&&(n.deleteLine(t),!0)},ge),e.registerCommand(Rr,t=>{const n=U();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)zd(r,n,e);else if(D(n)){const i=t.data;return i&&n.insertText(i),!0}}return!0},ge),e.registerCommand(oa,()=>{const t=U();return!!D(t)&&(t.removeText(),!0)},ge),e.registerCommand(pn,t=>{const n=U();return!!D(n)&&(n.formatText(t),!0)},ge),e.registerCommand(gx,t=>{const n=U();if(!D(n)&&!ze(n))return!1;const r=n.getNodes();for(const i of r){const o=Vn(i,s=>O(s)&&!s.isInline());o!==null&&o.setFormat(t)}return!0},ge),e.registerCommand(Mr,t=>{const n=U();return!!D(n)&&(n.insertLineBreak(t),!0)},ge),e.registerCommand(Di,()=>{const t=U();return!!D(t)&&(t.insertParagraph(),!0)},ge),e.registerCommand(wg,()=>(Qr([Yr()]),!0),ge),e.registerCommand(Yo,()=>qd(t=>{const n=t.getIndent();t.setIndent(n+1)}),ge),e.registerCommand(sa,()=>qd(t=>{const n=t.getIndent();n>0&&t.setIndent(n-1)}),ge),e.registerCommand(ku,t=>{const n=U();if(ze(n)&&!ko(t.target)){const r=n.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(D(n)){const r=ma(n.focus,!0);if(!t.shiftKey&&xe(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},ge),e.registerCommand(Su,t=>{const n=U();if(ze(n)){const r=n.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(D(n)){if(function(i){const o=i.focus;return o.key==="root"&&o.offset===Ee().getChildrenSize()}(n))return t.preventDefault(),!0;const r=ma(n.focus,!1);if(!t.shiftKey&&xe(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},ge),e.registerCommand(wu,t=>{const n=U();if(ze(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}if(!D(n))return!1;if($d(n,!0)){const r=t.shiftKey;return t.preventDefault(),Dd(n,r,!0),!0}return!1},ge),e.registerCommand(Cg,t=>{const n=U();if(ze(n)&&!ko(t.target)){const i=n.getNodes();if(i.length>0)return t.preventDefault(),i[0].selectNext(0,0),!0}if(!D(n))return!1;const r=t.shiftKey;return!!$d(n,!1)&&(t.preventDefault(),Dd(n,r,!1),!0)},ge),e.registerCommand(As,t=>{if(ko(t.target))return!1;const n=U();if(!D(n))return!1;const{anchor:r}=n,i=r.getNode();return n.isCollapsed()&&r.offset===0&&!Xe(i)&&_a(i).getIndent()>0?(t.preventDefault(),e.dispatchCommand(sa,void 0)):(!Kd||navigator.language!=="ko-KR")&&(t.preventDefault(),e.dispatchCommand(nr,!0))},ge),e.registerCommand(Ns,t=>{if(ko(t.target))return!1;const n=U();return!!D(n)&&(t.preventDefault(),e.dispatchCommand(nr,!1))},ge),e.registerCommand(Bi,t=>{const n=U();if(!D(n))return!1;if(El(n),t!==null){if((Kd||O2||D2)&&R2)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(Mr,!1)}return e.dispatchCommand(Di,void 0)},ge),e.registerCommand(qi,()=>{const t=U();return!!D(t)&&(e.blur(),!0)},ge),e.registerCommand(Iu,t=>{const[,n]=wo(t);if(n.length>0){const i=Jd(t.clientX,t.clientY);if(i!==null){const{offset:o,node:s}=i,l=en(s);if(l!==null){const a=Qi();if(J(l))a.anchor.set(l.getKey(),o,"text"),a.focus.set(l.getKey(),o,"text");else{const c=l.getParentOrThrow().getKey(),d=l.getIndexWithinParent()+1;a.anchor.set(c,d,"element"),a.focus.set(c,d,"element")}const u=ur(a);Be(u)}e.dispatchCommand(Zd,n)}return t.preventDefault(),!0}const r=U();return!!D(r)},ge),e.registerCommand(Ls,t=>{const[n]=wo(t),r=U();return!(n&&!D(r))},ge),e.registerCommand(Au,t=>{const[n]=wo(t),r=U();if(n&&!D(r))return!1;const i=Jd(t.clientX,t.clientY);if(i!==null){const o=en(i.node);xe(o)&&t.preventDefault()}return!0},ge),e.registerCommand(la,()=>(Ox(),!0),ge),e.registerCommand(Fs,t=>(Ud(e,Nn(t,ClipboardEvent)?t:null),!0),ge),e.registerCommand(Nu,t=>(async function(n,r){await Ud(r,Nn(n,ClipboardEvent)?n:null),r.update(()=>{const i=U();D(i)?i.removeText():ze(i)&&i.getNodes().forEach(o=>o.remove())})}(t,e),!0),ge),e.registerCommand(Gi,t=>{const[,n,r]=wo(t);return n.length>0&&!r?(e.dispatchCommand(Zd,n),!0):ti(t.target)&&Hu(t.target)?!1:U()!==null&&(function(i,o){i.preventDefault(),o.update(()=>{const s=U(),l=Nn(i,InputEvent)||Nn(i,KeyboardEvent)?null:i.clipboardData;l!=null&&s!==null&&zd(l,s,o)},{tag:"paste"})}(t,e),!0)},ge),e.registerCommand(Eu,t=>{const n=U();return D(n)&&El(n),!1},ge),e.registerCommand(Tu,t=>{const n=U();return D(n)&&El(n),!1},ge))}function yt(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function _t(e,t){return e.length>0?(yt(e,e.length,0,t),e):t}const Jt=Hn(/[A-Za-z]/),Ft=Hn(/[\dA-Za-z]/),B2=Hn(/[#-'*+\--9=?A-Z^-~]/);function Sa(e){return e!==null&&(e<32||e===127)}const Ea=Hn(/\d/),z2=Hn(/[\dA-Fa-f]/),j2=Hn(/[!-/:-@[-`{-~]/);function re(e){return e!==null&&e<-2}function De(e){return e!==null&&(e<0||e===32)}function pe(e){return e===-2||e===-1||e===32}const U2=Hn(new RegExp("\\p{P}|\\p{S}","u")),fn=Hn(/\s/);function Hn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Jr(e){if(e===null||De(e)||fn(e))return 1;if(U2(e))return 2}function Ws(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}function W2(e){let n={}.singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},f=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],h=l.parser.constructs.insideSpan.null;h&&yt(f,f.length,0,Ws(h,s.slice(u+1,a),l)),yt(f,f.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),yt(s,u-1,a-u+3,f),a=u+f.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const u=this.previous,c=this.events;let d=0;return f;function f(g){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(g):(s.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const x=Jr(u);if(g===126)return d>1?a(g):(s.consume(g),d++,h);if(d<2&&!n)return a(g);const b=s.exit("strikethroughSequenceTemporary"),y=Jr(g);return b._open=!y||y===2&&!!x,b._close=!x||x===2&&!!y,l(g)}}}const J2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];_p.peek=Y2;function K2(){return{canContainEols:["delete"],enter:{strikethrough:G2},exit:{strikethrough:q2}}}function Z2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:J2}],handlers:{delete:_p}}}function G2(e){this.enter({type:"delete",children:[]},e)}function q2(e){this.exit(e)}function _p(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function Y2(){return"~"}function Yd(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const X2=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Xd={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Cp(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function Q2(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function ey(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function Qd(e){return ey(e)||Cp(e)}const ef=document.createElement("i");function ji(e){const t="&"+e+";";ef.innerHTML=t;const n=ef.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const ty=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function ny(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let o=0,s=-1,l="",a,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,a=n.position.start):a=n.position);let c=(a?a.line:0)||1,d=(a?a.column:0)||1,f=g(),h;for(o--;++o<=e.length;)if(h===10&&(d=(u?u[s]:0)||1),h=e.charCodeAt(o),h===38){const y=e.charCodeAt(o+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||r&&y===r){l+=String.fromCharCode(h),d++;continue}const m=o+1;let p=m,v=m,k;if(y===35){v=++p;const L=e.charCodeAt(v);L===88||L===120?(k="hexadecimal",v=++p):k="decimal"}else k="named";let _="",C="",w="";const T=k==="named"?Qd:k==="decimal"?Cp:Q2;for(v--;++v<=e.length;){const L=e.charCodeAt(v);if(!T(L))break;w+=String.fromCharCode(L),k==="named"&&X2.includes(w)&&(_=w,C=ji(w))}let F=e.charCodeAt(v)===59;if(F){v++;const L=k==="named"?ji(w):!1;L&&(_=w,C=L)}let M=1+v-m,R="";if(!(!F&&n.nonTerminated===!1))if(!w)k!=="named"&&x(4,M);else if(k==="named"){if(F&&!C)x(5,1);else if(_!==w&&(v=p+_.length,M=1+v-p,F=!1),!F){const L=_?1:3;if(n.attribute){const H=e.charCodeAt(v);H===61?(x(L,M),C=""):Qd(H)?C="":x(L,M)}else x(L,M)}R=C}else{F||x(2,M);let L=Number.parseInt(w,k==="hexadecimal"?16:10);if(ry(L))x(7,M),R="�";else if(L in Xd)x(6,M),R=Xd[L];else{let H="";iy(L)&&x(6,M),L>65535&&(L-=65536,H+=String.fromCharCode(L>>>10|55296),L=56320|L&1023),R=H+String.fromCharCode(L)}}if(R){b(),f=g(),o=v-1,d+=v-m+1,i.push(R);const L=g();L.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,R,{start:f,end:L},e.slice(m-1,v)),f=L}else w=e.slice(m-1,v),l+=w,d+=w.length,o=v-1}else h===10&&(c++,s++,d=0),Number.isNaN(h)?b():(l+=String.fromCharCode(h),d++);return i.join("");function g(){return{line:c,column:d,offset:o+((a?a.offset:0)||0)}}function x(y,m){let p;n.warning&&(p=g(),p.column+=m,p.offset+=m,n.warning.call(n.warningContext||void 0,ty[y],p,y))}function b(){l&&(i.push(l),n.text&&n.text.call(n.textContext||void 0,l,{start:f,end:g()}),l="")}}function ry(e){return e>=55296&&e<=57343||e>1114111}function iy(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const oy=/["&'<>`]/g,sy=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ly=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ay=/[|\\{}()[\]^$+*?.]/g,tf=new WeakMap;function uy(e,t){if(e=e.replace(t.subset?cy(t.subset):oy,r),t.subset||t.escapeOnly)return e;return e.replace(sy,n).replace(ly,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function cy(e){let t=tf.get(e);return t||(t=dy(e),tf.set(e,t)),t}function dy(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(ay,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function fy(e){return"&#x"+e.toString(16).toUpperCase()+";"}function hy(e,t){return uy(e,Object.assign({format:fy},t))}function mn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nf(e.position):"start"in e||"end"in e?nf(e):"line"in e||"column"in e?Ta(e):""}function Ta(e){return rf(e&&e.line)+":"+rf(e&&e.column)}function nf(e){return Ta(e&&e.start)+"-"+Ta(e&&e.end)}function rf(e){return e&&typeof e=="number"?e:1}class we extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=mn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}we.prototype.file="";we.prototype.name="";we.prototype.reason="";we.prototype.message="";we.prototype.stack="";we.prototype.column=void 0;we.prototype.line=void 0;we.prototype.ancestors=void 0;we.prototype.cause=void 0;we.prototype.fatal=void 0;we.prototype.place=void 0;we.prototype.ruleId=void 0;we.prototype.source=void 0;const wp=" ";function gy(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:s,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:s},exit:{mdxJsxFlowTagClosingMarker:l,mdxJsxFlowTagNamePrimary:a,mdxJsxFlowTagNameMember:u,mdxJsxFlowTagNameLocal:c,mdxJsxFlowTagExpressionAttribute:h,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:g,mdxJsxFlowTagAttributeNameLocal:x,mdxJsxFlowTagAttributeValueLiteral:b,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:y,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:m,mdxJsxFlowTag:p,mdxJsxTextTagClosingMarker:l,mdxJsxTextTagNamePrimary:a,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:c,mdxJsxTextTagExpressionAttribute:h,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:g,mdxJsxTextTagAttributeNameLocal:x,mdxJsxTextTagAttributeValueLiteral:b,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:y,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:m,mdxJsxTextTag:p}};function e(){this.buffer()}function t(C){return{line:C.line,column:C.column,offset:C.offset}}function n(C){this.config.enter.data.call(this,C),this.config.exit.data.call(this,C)}function r(C){const w={name:void 0,attributes:[],close:!1,selfClosing:!1,start:C.start,end:C.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=w,this.buffer()}function i(C){if(this.data.mdxJsxTagStack.length===0)throw new we("Unexpected closing slash `/` in tag, expected an open tag first",{start:C.start,end:C.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function o(C){if(this.data.mdxJsxTag.close)throw new we("Unexpected attribute in closing tag, expected the end of the tag",{start:C.start,end:C.end},"mdast-util-mdx-jsx:unexpected-attribute")}function s(C){if(this.data.mdxJsxTag.close)throw new we("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:C.start,end:C.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function l(){const C=this.data.mdxJsxTag;C.close=!0}function a(C){const w=this.data.mdxJsxTag;w.name=this.sliceSerialize(C)}function u(C){const w=this.data.mdxJsxTag;w.name+="."+this.sliceSerialize(C)}function c(C){const w=this.data.mdxJsxTag;w.name+=":"+this.sliceSerialize(C)}function d(C){const w=this.data.mdxJsxTag;o.call(this,C),w.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(C.start),end:void 0}})}function f(C){const w=this.data.mdxJsxTag;o.call(this,C),w.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(C.start),end:void 0}}),this.buffer()}function h(C){const w=this.data.mdxJsxTag,T=w.attributes[w.attributes.length-1];T.type;const F=C.estree;T.value=this.resume(),T.position,T.position.end=t(C.end),F&&(T.data={estree:F})}function g(C){const w=this.data.mdxJsxTag,T=w.attributes[w.attributes.length-1];T.type,T.name=this.sliceSerialize(C),T.position,T.position.end=t(C.end)}function x(C){const w=this.data.mdxJsxTag,T=w.attributes[w.attributes.length-1];T.type,T.name+=":"+this.sliceSerialize(C),T.position,T.position.end=t(C.end)}function b(C){const w=this.data.mdxJsxTag,T=w.attributes[w.attributes.length-1];T.value=ny(this.resume(),{nonTerminated:!1}),T.position,T.position.end=t(C.end)}function y(C){const w=this.data.mdxJsxTag,T=w.attributes[w.attributes.length-1];T.type;const F={type:"mdxJsxAttributeValueExpression",value:this.resume()},M=C.estree;M&&(F.data={estree:M}),T.value=F,T.position,T.position.end=t(C.end)}function m(){const C=this.data.mdxJsxTag;C.selfClosing=!0}function p(C){const w=this.data.mdxJsxTag,T=this.data.mdxJsxTagStack,F=T[T.length-1];if(w.close&&F.name!==w.name)throw new we("Unexpected closing tag `"+_(w)+"`, expected corresponding closing tag for `"+_(F)+"` ("+mn(F)+")",{start:C.start,end:C.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),w.close?T.pop():this.enter({type:C.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:w.name||null,attributes:w.attributes,children:[]},C,v),w.selfClosing||w.close?this.exit(C,k):T.push(w)}function v(C,w){const T=this.data.mdxJsxTagStack,F=T[T.length-1],M=C?" before the end of `"+C.type+"`":"",R=C?{start:C.start,end:C.end}:void 0;throw new we("Expected a closing tag for `"+_(F)+"` ("+mn({start:w.start,end:w.end})+")"+M,R,"mdast-util-mdx-jsx:end-tag-mismatch")}function k(C,w){const T=this.data.mdxJsxTag;throw new we("Expected the closing tag `"+_(T)+"` either after the end of `"+w.type+"` ("+mn(w.end)+") or another opening tag after the start of `"+w.type+"` ("+mn(w.start)+")",{start:C.start,end:C.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function _(C){return"<"+(C.close?"/":"")+(C.name||"")+">"}}function py(e){const t={},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,o=t.printWidth||Number.POSITIVE_INFINITY,s=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return l.peek=xy,{handlers:{mdxJsxFlowElement:l,mdxJsxTextElement:l},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function l(a,u,c,d){const f=a.type==="mdxJsxFlowElement",h=a.name?!a.children||a.children.length===0:!1,g=kp(c),x=Sp(g),b=c.createTracker(d),y=c.createTracker(d),m=[],p=(f?x:"")+"<"+(a.name||""),v=c.enter(a.type);if(b.move(p),y.move(p),a.attributes&&a.attributes.length>0){if(!a.name)throw new Error("Cannot serialize fragment w/ attributes");let T=-1;for(;++T<a.attributes.length;){const F=a.attributes[T];let M;if(F.type==="mdxJsxExpressionAttribute")M="{"+(F.value||"")+"}";else{if(!F.name)throw new Error("Cannot serialize attribute w/o name");const R=F.value,L=F.name;let H="";if(R!=null)if(typeof R=="object")H="{"+(R.value||"")+"}";else{const B=r&&Yd(R,n)>Yd(R,s)?s:n;H=B+hy(R,{subset:[B]})+B}M=L+(H?"=":"")+H}m.push(M)}}let k=!1;const _=m.join(" ");f&&(/\r?\n|\r/.test(_)||b.current().now.column+_.length+(h?i?2:3:1)>o)&&(k=!0);let C=b,w=p;if(k){C=y;let T=-1;for(;++T<m.length;)m[T]=x+wp+m[T];w+=C.move(`
|
|
19
|
+
`+m.join(`
|
|
20
|
+
`)+`
|
|
21
|
+
`+x)}else _&&(w+=C.move(" "+_));return h&&(w+=C.move((i||k?"":" ")+"/")),w+=C.move(">"),a.children&&a.children.length>0&&(a.type==="mdxJsxTextElement"?w+=C.move(c.containerPhrasing(a,{...C.current(),before:">",after:"<"})):(C.shift(2),w+=C.move(`
|
|
22
|
+
`),w+=C.move(my(a,c,C.current())),w+=C.move(`
|
|
23
|
+
`))),h||(w+=C.move((f?x:"")+"</"+(a.name||"")+">")),v(),w}}function my(e,t,n){const r=t.indexStack,i=e.children,o=t.createTracker(n),s=Sp(kp(t)),l=[];let a=-1;for(r.push(-1);++a<i.length;){const u=i[a];r[r.length-1]=a;const c={before:`
|
|
24
|
+
`,after:`
|
|
25
|
+
`,...o.current()},d=t.handle(u,e,t,c),f=u.type==="mdxJsxFlowElement"?d:t.indentLines(d,function(h,g,x){return(x?"":s)+h});l.push(o.move(f)),u.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&l.push(o.move(`
|
|
26
|
+
|
|
27
|
+
`))}return r.pop(),l.join("")}function kp(e){let t=0,n=e.stack.length;for(;--n>-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}function Sp(e){return wp.repeat(e)}function xy(){return"<"}const yy=/[$_\p{ID_Start}]/u,by=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,vy=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,_y={};function Et(e){return e?yy.test(String.fromCodePoint(e)):!1}function hi(e,t){const r=(t||_y).jsx?vy:by;return e?r.test(String.fromCodePoint(e)):!1}function be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return pe(a)?(e.enter(n),l(a)):t(a)}function l(a){return pe(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}const Cy={}.hasOwnProperty,wy=Symbol("continue"),Tl=Symbol("exit"),ky=Symbol("skip");function Sy(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(o,s,l,a){return Il(o)&&(u.displayName="node ("+o.type+")"),u;function u(){const c=n?of(n(o,s,l,a)):[];if(c[0]===Tl)return c;if(c[0]!==ky){let d;for(d in o)if(Cy.call(o,d)&&o[d]&&typeof o[d]=="object"&&d!=="data"&&d!=="position"){const f=a.concat(o),h=o[d];if(Array.isArray(h)){const g=h;let x=0;for(;x>-1&&x<g.length;){const b=g[x];if(Il(b)){const y=i(b,d,x,f)();if(y[0]===Tl)return y;x=typeof y[1]=="number"?y[1]:x+1}else x++}}else if(Il(h)){const g=i(h,d,void 0,f)();if(g[0]===Tl)return g}}}return r?of(r(o,s,l,a)):c}}}function of(e){return Array.isArray(e)?e:typeof e=="number"?[wy,e]:[e]}function Il(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}function Ey(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),o=[],s=[],l=i.onComment,a=i.onToken;let u=!1,c,d;const f=Object.assign({},i,{onComment:o,preserveParens:!0});a&&(f.onToken=s);const h=Ty(e,t.tokenTypes),g=h.value,x=n+g+r,b=sf(g);if(b&&!t.allowEmpty)throw new we("Unexpected empty expression",{place:m(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{c=t.expression&&!b?t.acorn.parseExpressionAt(x,0,f):t.acorn.parse(x,f)}catch(p){const v=p,k=m(v.pos);v.message=String(v.message).replace(/ \(\d+:\d+\)$/,""),v.pos=k.offset,v.loc={line:k.line,column:k.column-1},d=v,u=v.raisedAt>=n.length+g.length||v.message==="Unterminated comment"}if(c&&t.expression&&!b)if(sf(x.slice(c.end,x.length-r.length)))c={type:"Program",start:0,end:n.length+g.length,body:[{type:"ExpressionStatement",expression:c,start:0,end:n.length+g.length}],sourceType:"module",comments:[]};else{const p=m(c.end),v=new Error("Unexpected content after expression");v.pos=p.offset,v.loc={line:p.line,column:p.column-1},d=v,c=void 0}if(c){if(c.comments=o,Sy(c,function(p,v,k,_){let C=_[_.length-1],w=v;p.type==="ParenthesizedExpression"&&C&&w&&(typeof k=="number"&&(C=C[w],w=k),C[w]=p.expression),y(p)}),Array.isArray(l))l.push(...o);else if(typeof l=="function")for(const p of o)l(p.type==="Block",p.value,p.start,p.end,p.loc.start,p.loc.end);for(const p of s)p.end<=n.length||p.start-n.length>=g.length||(y(p),Array.isArray(a)?a.push(p):a(p))}return{estree:c,error:d,swallow:u};function y(p){const v=m(p.start),k=m(p.end);p.start=v.offset,p.end=k.offset,p.loc={start:{line:v.line,column:v.column-1,offset:v.offset},end:{line:k.line,column:k.column-1,offset:k.offset}},p.range=[p.start,p.end]}function m(p){let v=p-n.length;v<0?v=0:v>g.length&&(v=g.length);let k=Iy(h.stops,v);return k||(k={line:t.start.line,column:t.start.column,offset:t.start.offset}),k}}function sf(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function Ty(e,t){const n={value:"",stops:[]};let r=-1;for(;++r<e.length;){const i=e[r];if(i[0]==="enter"){const o=i[1].type;if(o==="lineEnding"||t.includes(o)){const s=i[2].sliceStream(i[1]);for(;s.length>0&&s[0]===-1;)s.shift();const l=Ay(s);n.stops.push([n.value.length,i[1].start]),n.value+=l,n.stops.push([n.value.length,i[1].end])}}}return n}function Iy(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;const[r,i]=e[n-1],o=t-r;return{line:i.line,column:i.column+o,offset:i.offset+o}}function Ay(e){let t=-1;const n=[];let r;for(;++t<e.length;){const i=e[t];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
|
|
28
|
+
`;break}case-3:{o=`\r
|
|
29
|
+
`;break}case-2:{o=" ";break}case-1:{if(r)continue;o=" ";break}default:o=String.fromCharCode(i)}r=i===-2,n.push(o)}return n.join("")}function Al(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=lf(n.start,r[0]||t.start),o=lf(n.end,r[1]||t.end);if(i&&o)return{start:i,end:o}}function lf(e,t){if(e&&typeof e=="object"){const n="line"in e?Nl(e.line):void 0,r="column"in e?Nl(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:Nl(t)}}}function Nl(e){return typeof e=="number"&&e>-1?e:void 0}const Ny=2,Lr="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",Ly="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",Fy="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",af="#unexpected-type-in-code-expected-an-object-spread-spread",Py="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",My="#could-not-parse-expression-with-acorn";function uf(e,t,n,r,i,o,s,l,a,u,c){const d=this,f=this.events.length+3;let h=0,g,x;return b;function b(v){return e.enter(n),e.enter(r),e.consume(v),e.exit(r),g=d.now(),y}function y(v){if(v===null){if(x)throw x;const k=new we("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw k.url=Lr+Ly,k}if(re(v))return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p;if(v===125&&h===0){const k=o?Ry.call(d,o,s,i,f,g,u||!1,a||!1):{type:"ok",estree:void 0};if(k.type==="ok"){e.enter(r),e.consume(v),e.exit(r);const _=e.exit(n);return l&&k.estree&&Object.assign(_,{estree:k.estree}),t}return x=k.message,e.enter(i),e.consume(v),m}return e.enter(i),m(v)}function m(v){return v===125&&h===0||v===null||re(v)?(e.exit(i),y(v)):(v===123&&!o?h+=1:v===125&&(h-=1),e.consume(v),m)}function p(v){const k=d.now();if(k.line!==g.line&&!c&&d.parser.lazy[k.line]){const _=new we("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw _.url=Lr+Fy,_}return pe(v)?be(e,y,"linePrefix",Ny+1)(v):y(v)}}function Ry(e,t,n,r,i,o,s){const l=Ey(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:o,prefix:s?"({":"",suffix:s?"})":""}),a=l.estree;if(s&&a){const u=a.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const c=Al(u),d=new we("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw d.url=Lr+af,d}if(u.expression.properties[1]){const c=Al(u.expression.properties[1]),d=new we("Unexpected extra content in spread: only a single spread is supported",{place:c.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw d.url=Lr+Py,d}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const c=Al(u.expression.properties[0]),d=new we("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw d.url=Lr+af,d}}if(l.error){const u=new we("Could not parse expression with acorn",{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=Lr+My,{type:"nok",message:u}}return{type:"ok",estree:a}}const cf="https://github.com/micromark/micromark-extension-mdx-jsx";function Ep(e,t,n,r,i,o,s,l,a,u,c,d,f,h,g,x,b,y,m,p,v,k,_,C,w,T,F,M,R,L,H,B){const q=this;let Z,ne;return ee;function ee(E){return e.enter(l),e.enter(a),e.consume(E),e.exit(a),I}function I(E){return De(E)?n(E):(Z=oe,ke(E))}function oe(E){if(E===47)return e.enter(u),e.consume(E),e.exit(u),Z=ce,ke;if(E===62)return St(E);if(E!==null&&E>=0&&Et(E))return e.enter(d),e.enter(f),e.consume(E),A;V(E,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(E===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function ce(E){if(E===62)return St(E);if(E!==null&&E>=0&&Et(E))return e.enter(d),e.enter(f),e.consume(E),A;V(E,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(E===42||E===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function A(E){if(E!==null&&E>=0&&hi(E,{jsx:!0}))return e.consume(E),A;if(E===46||E===47||E===58||E===62||E===123||De(E)||fn(E))return e.exit(f),Z=de,ke(E);V(E,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(E===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function de(E){if(E===46)return e.enter(h),e.consume(E),e.exit(h),Z=he,ke;if(E===58)return e.enter(x),e.consume(E),e.exit(x),Z=W,ke;if(E===47||E===62||E===123||E!==null&&E>=0&&Et(E))return e.exit(d),ie(E);V(E,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(E){if(E!==null&&E>=0&&Et(E))return e.enter(g),e.consume(E),se;V(E,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function se(E){if(E!==null&&E>=0&&hi(E,{jsx:!0}))return e.consume(E),se;if(E===46||E===47||E===62||E===123||De(E)||fn(E))return e.exit(g),Z=j,ke(E);V(E,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(E===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function j(E){if(E===46)return e.enter(h),e.consume(E),e.exit(h),Z=he,ke;if(E===47||E===62||E===123||E!==null&&E>=0&&Et(E))return e.exit(d),ie(E);V(E,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function W(E){if(E!==null&&E>=0&&Et(E))return e.enter(b),e.consume(E),Y;V(E,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(E===43||E!==null&&E>46&&E<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function Y(E){if(E!==null&&E>=0&&hi(E,{jsx:!0}))return e.consume(E),Y;if(E===47||E===62||E===123||De(E)||fn(E))return e.exit(b),Z=X,ke(E);V(E,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function X(E){if(E===47||E===62||E===123||E!==null&&E>=0&&Et(E))return e.exit(d),ie(E);V(E,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ie(E){if(E===47)return e.enter(c),e.consume(E),e.exit(c),Z=Gn,ke;if(E===62)return St(E);if(E===123)return uf.call(q,e,ue,y,m,p,r,i,o,!0,!1,s)(E);if(E!==null&&E>=0&&Et(E))return e.enter(v),e.enter(k),e.enter(_),e.consume(E),Ae;V(E,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ue(E){return Z=ie,ke(E)}function Ae(E){if(E!==null&&E>=0&&hi(E,{jsx:!0}))return e.consume(E),Ae;if(E===47||E===58||E===61||E===62||E===123||De(E)||fn(E))return e.exit(_),Z=He,ke(E);V(E,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function He(E){if(E===58)return e.enter(C),e.consume(E),e.exit(C),Z=Je,ke;if(E===61)return e.exit(k),e.enter(T),e.consume(E),e.exit(T),Z=Sn,ke;if(E===47||E===62||E===123||De(E)||fn(E)||E!==null&&E>=0&&Et(E))return e.exit(k),e.exit(v),Z=ie,ke(E);V(E,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Je(E){if(E!==null&&E>=0&&Et(E))return e.enter(w),e.consume(E),Ke;V(E,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ke(E){if(E!==null&&E>=0&&hi(E,{jsx:!0}))return e.consume(E),Ke;if(E===47||E===61||E===62||E===123||De(E)||fn(E))return e.exit(w),e.exit(k),Z=Ge,ke(E);V(E,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Ge(E){if(E===61)return e.enter(T),e.consume(E),e.exit(T),Z=Sn,ke;if(E===47||E===62||E===123||E!==null&&E>=0&&Et(E))return e.exit(v),ie(E);V(E,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Sn(E){if(E===34||E===39)return e.enter(F),e.enter(M),e.consume(E),e.exit(M),ne=E,jt;if(E===123)return uf.call(q,e,gt,L,H,B,r,i,o,!1,!1,s)(E);V(E,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(E===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function gt(E){return e.exit(v),Z=ie,ke(E)}function jt(E){return E===null&&V(E,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(ne)+"`"),E===ne?(e.enter(M),e.consume(E),e.exit(M),e.exit(F),e.exit(v),ne=void 0,Z=ie,ke):re(E)?(Z=jt,ke(E)):(e.enter(R),it(E))}function it(E){return E===null||E===ne||re(E)?(e.exit(R),jt(E)):(e.consume(E),it)}function Gn(E){if(E===62)return St(E);V(E,"after self-closing slash","`>` to end the tag"+(E===42||E===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function St(E){return e.enter(a),e.consume(E),e.exit(a),e.exit(l),t}function ke(E){return re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),$):pe(E)||fn(E)?(e.enter("esWhitespace"),pt(E)):Z(E)}function pt(E){return re(E)?(e.exit("esWhitespace"),ke(E)):pe(E)||fn(E)?(e.consume(E),pt):(e.exit("esWhitespace"),Z(E))}function $(E){if(!s&&q.parser.lazy[q.now().line]){const le=new we("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",q.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw le.url=cf+"#unexpected-lazy-line-in-container-expected-line-to-be",le}return ke(E)}function V(E,le,fe){const Te=new we("Unexpected "+(E===null?"end of file":"character `"+(E===96?"` ` `":String.fromCodePoint(E))+"` ("+Oy(E)+")")+" "+le+", expected "+fe,q.now(),"micromark-extension-mdx-jsx:unexpected-"+(E===null?"eof":"character"));throw Te.url=cf+(E===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),Te}}function Oy(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function $y(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,o){return Ep.call(this,r,i,o,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function Dy(e,t){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,o){const s=this;return l;function l(d){return a(d)}function a(d){return Ep.call(s,r,u,o,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(d)}function u(d){return pe(d)?be(r,c,"whitespace")(d):c(d)}function c(d){const f=s.parser.constructs.flow[123],h=Array.isArray(f)?f:f?[f]:[];let g;for(const x of h)if(x.name==="mdxFlowExpression"){g=x;break}return d===60?l(d):d===123&&g?r.attempt(g,c,o)(d):d===null||re(d)?i(d):o(d)}}}function Vy(e){const t={},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:Dy(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:$y(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function Hy(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const df={}.hasOwnProperty;function By(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const l=r.handlers;if(i&&df.call(i,e)){const a=String(i[e]);s=df.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const zy={}.hasOwnProperty;function Tp(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Tp(e,t.extensions[n]);for(r in t)if(zy.call(t,r))switch(r){case"extensions":break;case"unsafe":{ff(e[r],t[r]);break}case"join":{ff(e[r],t[r]);break}case"handlers":{jy(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function ff(e,t){t&&e.push(...t)}function jy(e,t){t&&Object.assign(e,t)}function Uy(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),Wy);return i(),s}function Wy(e,t,n){return">"+(n?"":" ")+e}function Ip(e,t){return hf(e,t.inConstruct,!0)&&!hf(e,t.notInConstruct,!1)}function hf(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function gf(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
30
|
+
`&&Ip(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
31
|
+
`}function Jy(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function Ia(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Ky(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Zy(e,t,n,r){const i=Ky(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Ia(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(o,Gy);return d(),f}const l=n.createTracker(r),a=i.repeat(Math.max(Jy(o,i)+1,3)),u=n.enter("codeFenced");let c=l.move(a);if(e.lang){const d=n.enter(`codeFencedLang${s}`);c+=l.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);c+=l.move(" "),c+=l.move(n.safe(e.meta,{before:c,after:`
|
|
32
|
+
`,encode:["`"],...l.current()})),d()}return c+=l.move(`
|
|
33
|
+
`),o&&(c+=l.move(o+`
|
|
34
|
+
`)),c+=l.move(a),u(),c}function Gy(e,t,n){return(n?"":" ")+e}function rc(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function qy(e,t,n,r){const i=rc(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
35
|
+
`,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function Yy(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function On(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ss(e,t,n){const r=Jr(e),i=Jr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ap.peek=Xy;function Ap(e,t,n,r){const i=Yy(n),o=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=a.charCodeAt(0),c=ss(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=On(u)+a.slice(1));const d=a.charCodeAt(a.length-1),f=ss(r.after.charCodeAt(0),d,i);f.inside&&(a=a.slice(0,-1)+On(d));const h=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},l+a+h}function Xy(e,t,n){return n.options.emphasis||"*"}const ic=function(e){if(e==null)return nb;if(typeof e=="function")return Js(e);if(typeof e=="object")return Array.isArray(e)?Qy(e):eb(e);if(typeof e=="string")return tb(e);throw new Error("Expected function, string, or object as test")};function Qy(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ic(e[n]);return Js(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function eb(e){const t=e;return Js(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function tb(e){return Js(t);function t(n){return n&&n.type===e}}function Js(e){return t;function t(n,r,i){return!!(rb(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function nb(){return!0}function rb(e){return e!==null&&typeof e=="object"&&"type"in e}const Np=[],ib=!0,Aa=!1,ob="skip";function sb(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=ic(i),s=r?-1:1;l(e,void 0,[])();function l(a,u,c){const d=a&&typeof a=="object"?a:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(a.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=Np,g,x,b;if((!t||o(a,u,c[c.length-1]||void 0))&&(h=lb(n(a,c)),h[0]===Aa))return h;if("children"in a&&a.children){const y=a;if(y.children&&h[0]!==ob)for(x=(r?y.children.length:-1)+s,b=c.concat(y);x>-1&&x<y.children.length;){const m=y.children[x];if(g=l(m,x,b)(),g[0]===Aa)return g;x=typeof g[1]=="number"?g[1]:x+s}}return h}}}function lb(e){return Array.isArray(e)?e:typeof e=="number"?[ib,e]:e==null?Np:[e]}function ab(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),sb(e,o,l,i);function l(a,u){const c=u[u.length-1],d=c?c.children.indexOf(a):void 0;return s(a,d,c)}}const ub={};function oc(e,t){const n=ub,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Lp(e,r,i)}function Lp(e,t,n){if(cb(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return pf(e.children,t,n)}return Array.isArray(e)?pf(e,t,n):""}function pf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Lp(e[i],t,n);return r.join("")}function cb(e){return!!(e&&typeof e=="object")}function Fp(e,t){let n=!1;return ab(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Aa}),!!((!e.depth||e.depth<3)&&oc(e)&&(t.options.setext||n))}function db(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Fp(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...o.current(),before:`
|
|
36
|
+
`,after:`
|
|
37
|
+
`});return d(),c(),f+`
|
|
38
|
+
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
39
|
+
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
40
|
+
`,...o.current()});return/^[\t ]/.test(u)&&(u=On(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}Pp.peek=fb;function Pp(e){return e.value||""}function fb(){return"<"}Mp.peek=hb;function Mp(e,t,n,r){const i=rc(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function hb(){return"!"}Rp.peek=gb;function Rp(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function gb(){return"!"}Op.peek=pb;function Op(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let a;if(s.atBreak)for(;a=l.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function pb(){return"`"}function $p(e,t){const n=oc(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Dp.peek=mb;function Dp(e,t,n,r){const i=rc(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,a;if($p(e,n)){const c=n.stack;n.stack=[],l=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),l(),n.stack=c,d}l=n.enter("link"),a=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function mb(e,t,n){return $p(e,n)?"<":"["}Vp.peek=xb;function Vp(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function xb(){return"["}function sc(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function yb(e){const t=sc(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function bb(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Hp(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function vb(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?bb(n):sc(n);const l=e.ordered?s==="."?")":".":yb(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),Hp(n)===s&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function _b(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Cb(e,t,n,r){const i=_b(n);let o=n.bulletCurrent||sc(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(d,f,h){return f?(h?"":" ".repeat(s))+d:(h?o:o+" ".repeat(s-o.length))+d}}function wb(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const kb=ic(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Sb(e,t,n,r){return(e.children.some(function(s){return kb(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Eb(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Bp.peek=Tb;function Bp(e,t,n,r){const i=Eb(n),o=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=a.charCodeAt(0),c=ss(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=On(u)+a.slice(1));const d=a.charCodeAt(a.length-1),f=ss(r.after.charCodeAt(0),d,i);f.inside&&(a=a.slice(0,-1)+On(d));const h=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},l+a+h}function Tb(e,t,n){return n.options.strong||"*"}function Ib(e,t,n,r){return n.safe(e.value,r)}function Ab(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Nb(e,t,n){const r=(Hp(n)+(n.options.ruleSpaces?" ":"")).repeat(Ab(n));return n.options.ruleSpaces?r.slice(0,-1):r}const zp={blockquote:Uy,break:gf,code:Zy,definition:qy,emphasis:Ap,hardBreak:gf,heading:db,html:Pp,image:Mp,imageReference:Rp,inlineCode:Op,link:Dp,linkReference:Vp,list:vb,listItem:Cb,paragraph:wb,root:Sb,strong:Bp,text:Ib,thematicBreak:Nb},Lb=[Fb];function Fb(e,t,n,r){if(t.type==="code"&&Ia(t,r)&&(e.type==="list"||e.type===t.type&&Ia(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Fp(t,r))?void 0:n.spread?1:0}const Yn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Pb=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
|
|
41
|
+
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Yn},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
42
|
+
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Yn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
43
|
+
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Yn},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
44
|
+
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
|
45
|
+
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
|
46
|
+
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Yn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Yn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Yn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Yn},{atBreak:!0,character:"~"}];function jp(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const Mb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Up(e){return e.replace(Mb,Rb)}function Rb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return jp(n.slice(o?2:1),o?16:10)}return ji(n)||e}function Ob(e){return e.label||!e.identifier?e.label||"":Up(e.identifier)}function $b(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function Db(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,l=n.before,a;r.push(-1);let u=t.createTracker(n);for(;++s<i.length;){const c=i[s];let d;if(r[r.length-1]=s,s+1<i.length){let g=t.handle.handlers[i[s+1].type];g&&g.peek&&(g=g.peek),d=g?g(i[s+1],e,t,{before:"",after:"",...u.current()}).charAt(0):""}else d=n.after;o.length>0&&(l==="\r"||l===`
|
|
47
|
+
`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),l=" ",u=t.createTracker(n),u.move(o.join("")));let f=t.handle(c,e,t,{...u.current(),after:d,before:l});a&&a===f.slice(0,1)&&(f=On(a.charCodeAt(0))+f.slice(1));const h=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,a=void 0,h&&(o.length>0&&h.before&&l===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+On(l.charCodeAt(0))),h.after&&(a=d)),u.move(f),o.push(f),l=f.slice(-1)}return r.pop(),o.join("")}function Vb(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),s=[];let l=-1;for(r.push(-1);++l<i.length;){const a=i[l];r[r.length-1]=l,s.push(o.move(t.handle(a,e,t,{before:`
|
|
48
|
+
`,after:`
|
|
49
|
+
`,...o.current()}))),a.type!=="list"&&(t.bulletLastUsed=void 0),l<i.length-1&&s.push(o.move(Hb(a,i[l+1],e,t)))}return r.pop(),s.join("")}function Hb(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
|
|
50
|
+
`.repeat(1+o);if(o===!1)return`
|
|
51
|
+
|
|
52
|
+
<!---->
|
|
53
|
+
|
|
54
|
+
`}return`
|
|
55
|
+
|
|
56
|
+
`}const Bb=/\r?\n|\r/g;function zb(e,t){const n=[];let r=0,i=0,o;for(;o=Bb.exec(e);)s(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(e.slice(r)),n.join("");function s(l){n.push(t(l,i,!l))}}function jb(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],s={};let l=-1;for(;++l<e.unsafe.length;){const c=e.unsafe[l];if(!Ip(e.stack,c))continue;const d=e.compilePattern(c);let f;for(;f=d.exec(r);){const h="before"in c||!!c.atBreak,g="after"in c,x=f.index+(h?f[1].length:0);i.includes(x)?(s[x].before&&!h&&(s[x].before=!1),s[x].after&&!g&&(s[x].after=!1)):(i.push(x),s[x]={before:h,after:g})}}i.sort(Ub);let a=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(l=-1;++l<i.length;){const c=i[l];c<a||c>=u||c+1<u&&i[l+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[l-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(a!==c&&o.push(mf(r.slice(a,c),"\\")),a=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push(On(r.charCodeAt(c))),a++))}return o.push(mf(r.slice(a,u),n.after)),o.join("")}function Ub(e,t){return e-t}function mf(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let s=-1,l=0,a;for(;a=n.exec(o);)r.push(a.index);for(;++s<r.length;)l!==r[s]&&i.push(e.slice(l,r[s])),i.push("\\"),l=r[s];return i.push(e.slice(l)),i.join("")}function Wb(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:a,current:s,shift:l};function s(){return{now:{line:i,column:o},lineShift:r}}function l(u){r+=u}function a(u){const c=u||"",d=c.split(/\r?\n|\r/g),f=d[d.length-1];return i+=d.length-1,o=d.length===1?o+f.length:1+f.length+r,c}}function Wp(e,t){const n=t||{},r={associationId:Ob,containerPhrasing:Gb,containerFlow:qb,createTracker:Wb,compilePattern:$b,enter:o,handlers:{...zp},handle:void 0,indentLines:zb,indexStack:[],join:[...Lb],options:{},safe:Yb,stack:[],unsafe:[...Pb]};Tp(r,n),r.options.tightDefinitions&&r.join.push(Zb),r.handle=By("type",{invalid:Jb,unknown:Kb,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
|
|
57
|
+
`,after:`
|
|
58
|
+
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
59
|
+
`),i;function o(s){return r.stack.push(s),l;function l(){r.stack.pop()}}}function Jb(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Kb(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function Zb(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function Gb(e,t){return Db(e,this,t)}function qb(e,t){return Vb(e,this,t)}function Yb(e,t){return jb(this,e,t)}const Xb=["mdxJsxTextElement","mdxJsxFlowElement"];function Jp(e){return Xb.includes(e.type)&&Qb.includes(e.name.toLowerCase())}const Qb=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function ev(e,t){const n=xf(e),r=xf(t),i={...n,...r};return tv(i)}function xf(e){const t={};return e.split(";").filter(r=>r.trim()!=="").forEach(r=>{const[i,o]=r.split(":").map(s=>s.trim());t[i]=o}),t}function tv(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}function nv(e){return e.children instanceof Array}function rv({root:e,visitors:t,jsxComponentDescriptors:n,jsxIsAvailable:r,addImportStatements:i=!0}){let o=null;const s=new Set,l=new Map;t=t.sort((y,m)=>(m.priority??0)-(y.priority??0)),d(e,null);function a(y,m){s.add(y),m&&l.set(y,{...m})}function u(y,m){if(o===null)return o=m,o;if(!nv(y))throw new Error("Attempting to append children to a non-parent");const p=y.children,v=p.at(-1);if(v){const k=t.find(_=>{var C;return(C=_.shouldJoin)==null?void 0:C.call(_,v,m)});if(k){const _=k.join(v,m);return p.splice(p.length-1,1,_),_}}return p.push(m),m}function c(y,m){y.getChildren().forEach(p=>{d(p,m)})}function d(y,m,p=null){var v;const k=t.find((_,C)=>{var w;return p!=null&&p.has(C)?!1:(w=_.testLexicalNode)==null?void 0:w.call(_,y)});if(!k)throw new Error(`no lexical visitor found for ${y.getType()}`,{cause:y});(v=k.visitLexicalNode)==null||v.call(k,{lexicalNode:y,mdastParent:m,actions:{addAndStepInto(_,C={},w=!0){const T={type:_,...C,...w?{children:[]}:{}};u(m,T),O(y)&&w&&c(y,T)},appendToParent:u,visitChildren:c,visit:d,registerReferredComponent:a,nextVisitor(){d(y,m,(p??new Set).add(t.indexOf(k)))}}})}if(o===null)throw new Error("traversal ended with no root element");const f=new Map,h=new Map;for(const y of s){const m=n.find(p=>p.name===y)??l.get(y)??n.find(p=>p.name==="*");if(!m)throw new Error(`Component ${y} is used but not imported`);if(m.source)if(m.defaultExport)h.set(y,m.source);else{const{source:p}=m,v=f.get(p);v?v.push(y):f.set(p,[y])}}if(!i){for(const[y,m]of f.entries()){const p=m.filter(v=>l.has(v));p.length>0?f.set(y,p):f.delete(y)}for(const y of h.keys())l.has(y)||h.delete(y)}const g=Array.from(f).map(([y,m])=>({type:"mdxjsEsm",value:`import { ${m.join(", ")} } from '${y}'`}));g.push(...Array.from(h).map(([y,m])=>({type:"mdxjsEsm",value:`import ${y} from '${m}'`})));const x=o,b=x.children.find(y=>y.type==="yaml");return b?x.children.splice(x.children.indexOf(b)+1,0,...g):x.children.unshift(...g),Ro(x,[]),Kp(x),r||Zp(x),x}function Kp(e){if("children"in e&&e.children.length>0){if(Jp(e)&&e.children.length===1){const t=e.children[0];t.type==="mdxJsxTextElement"&&t.name==="span"&&(t.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const r=e.attributes.find(i=>i.type==="mdxJsxAttribute"&&i.name===n.name);if(r)if(n.name==="className"){const i=new Set([...r.value.split(" "),...n.value.split(" ")]);r.value=Array.from(i).join(" ")}else n.name==="style"&&(r.value=ev(r.value,n.value));else e.attributes.push(n)}}),e.children=t.children)}e.children.forEach(t=>{Kp(t)})}}function Zp(e){if(Object.hasOwn(e,"children")){const t=e,n=[];t.children.forEach(r=>{r.type==="mdxJsxTextElement"&&r.name==="u"?n.push({type:"html",value:"<u>"},...r.children,{type:"html",value:"</u>"}):(n.push(r),Zp(r))}),t.children=n}}const yf=/\s+$/,bf=/^\s+/;function Ro(e,t){if(e.type==="strong"||e.type==="emphasis"){const n=e.children.at(-1);if((n==null?void 0:n.type)==="text"){const i=n.value.match(yf);if(i){n.value=n.value.replace(yf,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e)+1,0,{type:"text",value:i[0]}),Ro(o,t.slice(0,-1)))}}const r=e.children.at(0);if((r==null?void 0:r.type)==="text"){const i=r.value.match(bf);if(i){r.value=r.value.replace(bf,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e),0,{type:"text",value:i[0]}),Ro(o,t.slice(0,-1)))}}}if("children"in e&&e.children.length>0){const n=e;n.children.forEach(r=>{Ro(r,[...t,n])})}}function iv({root:e,toMarkdownOptions:t,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}){return Wp(rv({root:e,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}),{extensions:n,...t})+`
|
|
60
|
+
`}const vf={}.hasOwnProperty;function ov(e){const t={};let n=-1;for(;++n<e.length;)sv(t,e[n]);return t}function sv(e,t){let n;for(n in t){const i=(vf.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){vf.call(i,s)||(i[s]=[]);const l=o[s];lv(i[s],Array.isArray(l)?l:l?[l]:[])}}}function lv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);yt(e,0,0,r)}function Dr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const av={tokenize:uv};function uv(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),be(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return re(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const cv={tokenize:dv},_f={tokenize:fv};function dv(e){const t=this,n=[];let r=0,i,o,s;return l;function l(p){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,a,u)(p)}return u(p)}function a(p){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const v=t.events.length;let k=v,_;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){_=t.events[k][1].end;break}y(r);let C=v;for(;C<t.events.length;)t.events[C][1].end={..._},C++;return yt(t.events,k+1,0,t.events.slice(v)),t.events.length=C,u(p)}return l(p)}function u(p){if(r===n.length){if(!i)return f(p);if(i.currentConstruct&&i.currentConstruct.concrete)return g(p);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_f,c,d)(p)}function c(p){return i&&m(),y(r),f(p)}function d(p){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(p)}function f(p){return t.containerState={},e.attempt(_f,h,g)(p)}function h(p){return r++,n.push([t.currentConstruct,t.containerState]),f(p)}function g(p){if(p===null){i&&m(),y(0),e.consume(p);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(p)}function x(p){if(p===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(p);return}return re(p)?(e.consume(p),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(p),x)}function b(p,v){const k=t.sliceStream(p);if(v&&k.push(null),p.previous=o,o&&(o.next=p),o=p,i.defineSkip(p.start),i.write(k),t.parser.lazy[p.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<s&&(!i.events[_][1].end||i.events[_][1].end.offset>s))return;const C=t.events.length;let w=C,T,F;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){if(T){F=t.events[w][1].end;break}T=!0}for(y(r),_=C;_<t.events.length;)t.events[_][1].end={...F},_++;yt(t.events,w+1,0,t.events.slice(C)),t.events.length=_}}function y(p){let v=n.length;for(;v-- >p;){const k=n[v];t.containerState=k[1],k[0].exit.call(t,e)}n.length=p}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function fv(e,t,n){return be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const Na={name:"attention",resolveAll:hv,tokenize:gv};function hv(e,t){let n=-1,r,i,o,s,l,a,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Cf(d,-a),Cf(f,a),s={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=_t(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=_t(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=_t(u,Ws(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=_t(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=_t(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,yt(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function gv(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Jr(r);let o;return s;function s(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const u=e.exit("attentionSequence"),c=Jr(a),d=!c||c===2&&i||n.includes(a),f=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?d:d&&(i||!f)),u._close=!!(o===42?f:f&&(c||!d)),t(a)}}function Cf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const pv={name:"autolink",tokenize:mv};function mv(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return Jt(h)?(e.consume(h),s):h===64?n(h):u(h)}function s(h){return h===43||h===45||h===46||Ft(h)?(r=1,l(h)):u(h)}function l(h){return h===58?(e.consume(h),r=0,a):(h===43||h===45||h===46||Ft(h))&&r++<32?(e.consume(h),l):(r=0,u(h))}function a(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Sa(h)?n(h):(e.consume(h),a)}function u(h){return h===64?(e.consume(h),c):B2(h)?(e.consume(h),u):n(h)}function c(h){return Ft(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||Ft(h))&&r++<63){const g=h===45?f:d;return e.consume(h),g}return n(h)}}const Ks={partial:!0,tokenize:xv};function xv(e,t,n){return r;function r(o){return pe(o)?be(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||re(o)?t(o):n(o)}}const Gp={continuation:{tokenize:bv},exit:vv,name:"blockQuote",tokenize:yv};function yv(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return pe(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function bv(e,t,n){const r=this;return i;function i(s){return pe(s)?be(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Gp,t,n)(s)}}function vv(e){e.exit("blockQuote")}const qp={name:"characterEscape",tokenize:_v};function _v(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return j2(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Yp={name:"characterReference",tokenize:Cv};function Cv(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=Ft,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=z2,c):(e.enter("characterReferenceValue"),o=7,s=Ea,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===Ft&&!ji(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),c):n(d)}}const wf={partial:!0,tokenize:kv},kf={concrete:!0,name:"codeFenced",tokenize:wv};function wv(e,t,n){const r=this,i={partial:!0,tokenize:k};let o=0,s=0,l;return a;function a(_){return u(_)}function u(_){const C=r.events[r.events.length-1];return o=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,l=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(_)}function c(_){return _===l?(s++,e.consume(_),c):s<3?n(_):(e.exit("codeFencedFenceSequence"),pe(_)?be(e,d,"whitespace")(_):d(_))}function d(_){return _===null||re(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(wf,x,v)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===null||re(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(_)):pe(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,h,"whitespace")(_)):_===96&&_===l?n(_):(e.consume(_),f)}function h(_){return _===null||re(_)?d(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(_))}function g(_){return _===null||re(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(_)):_===96&&_===l?n(_):(e.consume(_),g)}function x(_){return e.attempt(i,v,b)(_)}function b(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),y}function y(_){return o>0&&pe(_)?be(e,m,"linePrefix",o+1)(_):m(_)}function m(_){return _===null||re(_)?e.check(wf,x,v)(_):(e.enter("codeFlowValue"),p(_))}function p(_){return _===null||re(_)?(e.exit("codeFlowValue"),m(_)):(e.consume(_),p)}function v(_){return e.exit("codeFenced"),t(_)}function k(_,C,w){let T=0;return F;function F(B){return _.enter("lineEnding"),_.consume(B),_.exit("lineEnding"),M}function M(B){return _.enter("codeFencedFence"),pe(B)?be(_,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):R(B)}function R(B){return B===l?(_.enter("codeFencedFenceSequence"),L(B)):w(B)}function L(B){return B===l?(T++,_.consume(B),L):T>=s?(_.exit("codeFencedFenceSequence"),pe(B)?be(_,H,"whitespace")(B):H(B)):w(B)}function H(B){return B===null||re(B)?(_.exit("codeFencedFence"),C(B)):w(B)}}}function kv(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ll={name:"codeIndented",tokenize:Ev},Sv={partial:!0,tokenize:Tv};function Ev(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),be(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?a(u):re(u)?e.attempt(Sv,s,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||re(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function Tv(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):re(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):be(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):re(s)?i(s):n(s)}}const Iv={name:"codeText",previous:Nv,resolve:Av,tokenize:Lv};function Av(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Nv(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Lv(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):re(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||re(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class Fv{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&gi(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),gi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),gi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);gi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);gi(this.left,n.reverse())}}}function gi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Xp(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new Fv(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Pv(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return yt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function Pv(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,a=[],u={};let c,d,f=-1,h=n,g=0,x=0;const b=[x];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(x=f+1,b.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),f=b.length;f--;){const y=l.slice(b[f],b[f+1]),m=o.pop();a.push([m,m+y.length-1]),e.splice(m,2,y)}for(a.reverse(),f=-1;++f<a.length;)u[g+a[f][0]]=g+a[f][1],g+=a[f][1]-a[f][0]-1;return u}const Mv={resolve:Ov,tokenize:$v},Rv={partial:!0,tokenize:Dv};function Ov(e){return Xp(e),e}function $v(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):re(l)?e.check(Rv,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Dv(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),be(e,o,"linePrefix")}function o(s){if(s===null||re(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Qp(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),f):y===null||y===32||y===41||Sa(y)?n(y):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(y))}function f(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(l),f(y)):y===null||y===60||re(y)?n(y):(e.consume(y),y===92?g:h)}function g(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function x(y){return!c&&(y===null||y===41||De(y))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(y)):c<u&&y===40?(e.consume(y),c++,x):y===41?(e.consume(y),c--,x):y===null||y===32||y===40||Sa(y)?n(y):(e.consume(y),y===92?b:x)}function b(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function e1(e,t,n,r,i,o){const s=this;let l=0,a;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),c}function c(h){return l>999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):re(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||re(h)||l++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!pe(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function t1(e,t,n,r,i,o){let s;return l;function l(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,a):n(f)}function a(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),u(f))}function u(f){return f===s?(e.exit(o),a(s)):f===null?n(f):re(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),be(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||re(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===s||f===92?(e.consume(f),c):c(f)}}function Ii(e,t){let n;return r;function r(i){return re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):pe(i)?be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Vv={name:"definition",tokenize:Bv},Hv={partial:!0,tokenize:zv};function Bv(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return e1.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return i=Dr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return De(h)?Ii(e,u)(h):u(h)}function u(h){return Qp(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(Hv,d,d)(h)}function d(h){return pe(h)?be(e,f,"whitespace")(h):f(h)}function f(h){return h===null||re(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function zv(e,t,n){return r;function r(l){return De(l)?Ii(e,i)(l):n(l)}function i(l){return t1(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return pe(l)?be(e,s,"whitespace")(l):s(l)}function s(l){return l===null||re(l)?t(l):n(l)}}const jv={name:"hardBreakEscape",tokenize:Uv};function Uv(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return re(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Wv={name:"headingAtx",resolve:Jv,tokenize:Kv};function Jv(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},yt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Kv(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||De(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||re(c)?(e.exit("atxHeading"),t(c)):pe(c)?be(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||De(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const Zv=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Sf=["pre","script","style","textarea"],Gv={concrete:!0,name:"htmlFlow",resolveTo:Xv,tokenize:Qv},qv={partial:!0,tokenize:t_},Yv={partial:!0,tokenize:e_};function Xv(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Qv(e,t,n){const r=this;let i,o,s,l,a;return u;function u(A){return c(A)}function c(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),d}function d(A){return A===33?(e.consume(A),f):A===47?(e.consume(A),o=!0,x):A===63?(e.consume(A),i=3,r.interrupt?t:I):Jt(A)?(e.consume(A),s=String.fromCharCode(A),b):n(A)}function f(A){return A===45?(e.consume(A),i=2,h):A===91?(e.consume(A),i=5,l=0,g):Jt(A)?(e.consume(A),i=4,r.interrupt?t:I):n(A)}function h(A){return A===45?(e.consume(A),r.interrupt?t:I):n(A)}function g(A){const de="CDATA[";return A===de.charCodeAt(l++)?(e.consume(A),l===de.length?r.interrupt?t:R:g):n(A)}function x(A){return Jt(A)?(e.consume(A),s=String.fromCharCode(A),b):n(A)}function b(A){if(A===null||A===47||A===62||De(A)){const de=A===47,he=s.toLowerCase();return!de&&!o&&Sf.includes(he)?(i=1,r.interrupt?t(A):R(A)):Zv.includes(s.toLowerCase())?(i=6,de?(e.consume(A),y):r.interrupt?t(A):R(A)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):o?m(A):p(A))}return A===45||Ft(A)?(e.consume(A),s+=String.fromCharCode(A),b):n(A)}function y(A){return A===62?(e.consume(A),r.interrupt?t:R):n(A)}function m(A){return pe(A)?(e.consume(A),m):F(A)}function p(A){return A===47?(e.consume(A),F):A===58||A===95||Jt(A)?(e.consume(A),v):pe(A)?(e.consume(A),p):F(A)}function v(A){return A===45||A===46||A===58||A===95||Ft(A)?(e.consume(A),v):k(A)}function k(A){return A===61?(e.consume(A),_):pe(A)?(e.consume(A),k):p(A)}function _(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),a=A,C):pe(A)?(e.consume(A),_):w(A)}function C(A){return A===a?(e.consume(A),a=null,T):A===null||re(A)?n(A):(e.consume(A),C)}function w(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||De(A)?k(A):(e.consume(A),w)}function T(A){return A===47||A===62||pe(A)?p(A):n(A)}function F(A){return A===62?(e.consume(A),M):n(A)}function M(A){return A===null||re(A)?R(A):pe(A)?(e.consume(A),M):n(A)}function R(A){return A===45&&i===2?(e.consume(A),q):A===60&&i===1?(e.consume(A),Z):A===62&&i===4?(e.consume(A),oe):A===63&&i===3?(e.consume(A),I):A===93&&i===5?(e.consume(A),ee):re(A)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(qv,ce,L)(A)):A===null||re(A)?(e.exit("htmlFlowData"),L(A)):(e.consume(A),R)}function L(A){return e.check(Yv,H,ce)(A)}function H(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),B}function B(A){return A===null||re(A)?L(A):(e.enter("htmlFlowData"),R(A))}function q(A){return A===45?(e.consume(A),I):R(A)}function Z(A){return A===47?(e.consume(A),s="",ne):R(A)}function ne(A){if(A===62){const de=s.toLowerCase();return Sf.includes(de)?(e.consume(A),oe):R(A)}return Jt(A)&&s.length<8?(e.consume(A),s+=String.fromCharCode(A),ne):R(A)}function ee(A){return A===93?(e.consume(A),I):R(A)}function I(A){return A===62?(e.consume(A),oe):A===45&&i===2?(e.consume(A),I):R(A)}function oe(A){return A===null||re(A)?(e.exit("htmlFlowData"),ce(A)):(e.consume(A),oe)}function ce(A){return e.exit("htmlFlow"),t(A)}}function e_(e,t,n){const r=this;return i;function i(s){return re(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function t_(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ks,t,n)}}const n_={name:"htmlText",tokenize:r_};function r_(e,t,n){const r=this;let i,o,s;return l;function l(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),a}function a(I){return I===33?(e.consume(I),u):I===47?(e.consume(I),k):I===63?(e.consume(I),p):Jt(I)?(e.consume(I),w):n(I)}function u(I){return I===45?(e.consume(I),c):I===91?(e.consume(I),o=0,g):Jt(I)?(e.consume(I),m):n(I)}function c(I){return I===45?(e.consume(I),h):n(I)}function d(I){return I===null?n(I):I===45?(e.consume(I),f):re(I)?(s=d,Z(I)):(e.consume(I),d)}function f(I){return I===45?(e.consume(I),h):d(I)}function h(I){return I===62?q(I):I===45?f(I):d(I)}function g(I){const oe="CDATA[";return I===oe.charCodeAt(o++)?(e.consume(I),o===oe.length?x:g):n(I)}function x(I){return I===null?n(I):I===93?(e.consume(I),b):re(I)?(s=x,Z(I)):(e.consume(I),x)}function b(I){return I===93?(e.consume(I),y):x(I)}function y(I){return I===62?q(I):I===93?(e.consume(I),y):x(I)}function m(I){return I===null||I===62?q(I):re(I)?(s=m,Z(I)):(e.consume(I),m)}function p(I){return I===null?n(I):I===63?(e.consume(I),v):re(I)?(s=p,Z(I)):(e.consume(I),p)}function v(I){return I===62?q(I):p(I)}function k(I){return Jt(I)?(e.consume(I),_):n(I)}function _(I){return I===45||Ft(I)?(e.consume(I),_):C(I)}function C(I){return re(I)?(s=C,Z(I)):pe(I)?(e.consume(I),C):q(I)}function w(I){return I===45||Ft(I)?(e.consume(I),w):I===47||I===62||De(I)?T(I):n(I)}function T(I){return I===47?(e.consume(I),q):I===58||I===95||Jt(I)?(e.consume(I),F):re(I)?(s=T,Z(I)):pe(I)?(e.consume(I),T):q(I)}function F(I){return I===45||I===46||I===58||I===95||Ft(I)?(e.consume(I),F):M(I)}function M(I){return I===61?(e.consume(I),R):re(I)?(s=M,Z(I)):pe(I)?(e.consume(I),M):T(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),i=I,L):re(I)?(s=R,Z(I)):pe(I)?(e.consume(I),R):(e.consume(I),H)}function L(I){return I===i?(e.consume(I),i=void 0,B):I===null?n(I):re(I)?(s=L,Z(I)):(e.consume(I),L)}function H(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||De(I)?T(I):(e.consume(I),H)}function B(I){return I===47||I===62||De(I)?T(I):n(I)}function q(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function Z(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),ne}function ne(I){return pe(I)?be(e,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):ee(I)}function ee(I){return e.enter("htmlTextData"),s(I)}}const lc={name:"labelEnd",resolveAll:l_,resolveTo:a_,tokenize:u_},i_={tokenize:c_},o_={tokenize:d_},s_={tokenize:f_};function l_(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&yt(e,0,e.length,n),e}function a_(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const a={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",a,t],["enter",u,t]],l=_t(l,e.slice(o+1,o+r+3)),l=_t(l,[["enter",c,t]]),l=_t(l,Ws(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=_t(l,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),l=_t(l,e.slice(s+1)),l=_t(l,[["exit",a,t]]),yt(e,o,e.length,l),e}function u_(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(f){return o?o._inactive?d(f):(s=r.parser.defined.includes(Dr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),a):n(f)}function a(f){return f===40?e.attempt(i_,c,s?c:d)(f):f===91?e.attempt(o_,c,s?u:d)(f):s?c(f):d(f)}function u(f){return e.attempt(s_,c,d)(f)}function c(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function c_(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return De(d)?Ii(e,o)(d):o(d)}function o(d){return d===41?c(d):Qp(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return De(d)?Ii(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?t1(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return De(d)?Ii(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function d_(e,t,n){const r=this;return i;function i(l){return e1.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(Dr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function f_(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const h_={name:"labelStartImage",resolveAll:lc.resolveAll,tokenize:g_};function g_(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const p_={name:"labelStartLink",resolveAll:lc.resolveAll,tokenize:m_};function m_(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Fl={name:"lineEnding",tokenize:x_};function x_(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,t,"linePrefix")}}const Oo={name:"thematicBreak",tokenize:y_};function y_(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||re(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),pe(u)?be(e,l,"whitespace")(u):l(u))}}const ct={continuation:{tokenize:C_},exit:k_,name:"list",tokenize:__},b_={partial:!0,tokenize:S_},v_={partial:!0,tokenize:w_};function __(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Ea(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Oo,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return Ea(h)&&++s<10?(e.consume(h),a):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ks,r.interrupt?n:c,e.attempt(b_,f,d))}function c(h){return r.containerState.initialBlankLine=!0,o++,f(h)}function d(h){return pe(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function C_(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ks,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!pe(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(v_,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(ct,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function w_(e,t,n){const r=this;return be(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function k_(e){e.exit(this.containerState.type)}function S_(e,t,n){const r=this;return be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!pe(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Ef={name:"setextUnderline",resolveTo:E_,tokenize:T_};function E_(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function T_(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),pe(u)?be(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||re(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const I_={tokenize:A_};function A_(e){const t=this,n=e.attempt(Ks,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Mv,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const N_={resolveAll:r1()},L_=n1("string"),F_=n1("text");function n1(e){return{resolveAll:r1(e==="text"?P_:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function r1(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function P_(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,a;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)a=!0,l++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const M_={42:ct,43:ct,45:ct,48:ct,49:ct,50:ct,51:ct,52:ct,53:ct,54:ct,55:ct,56:ct,57:ct,62:Gp},R_={91:Vv},O_={[-2]:Ll,[-1]:Ll,32:Ll},$_={35:Wv,42:Oo,45:[Ef,Oo],60:Gv,61:Ef,95:Oo,96:kf,126:kf},D_={38:Yp,92:qp},V_={[-5]:Fl,[-4]:Fl,[-3]:Fl,33:h_,38:Yp,42:Na,60:[pv,n_],91:p_,92:[jv,qp],93:lc,95:Na,96:Iv},H_={null:[Na,N_]},B_={null:[42,95]},z_={null:[]},j_=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:B_,contentInitial:R_,disable:z_,document:M_,flow:$_,flowInitial:O_,insideSpan:H_,string:D_,text:V_},Symbol.toStringTag,{value:"Module"}));function U_(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const a={attempt:C(k),check:C(_),consume:m,enter:p,exit:v,interrupt:C(_,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function d(M){return s=_t(s,M),b(),s[s.length-1]!==null?[]:(w(t,0),u.events=Ws(o,u.events,u),u.events)}function f(M,R){return J_(h(M),R)}function h(M){return W_(s,M)}function g(){const{_bufferIndex:M,_index:R,line:L,column:H,offset:B}=r;return{_bufferIndex:M,_index:R,line:L,column:H,offset:B}}function x(M){i[M.line]=M.column,F()}function b(){let M;for(;r._index<s.length;){const R=s[r._index];if(typeof R=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<R.length;)y(R.charCodeAt(r._bufferIndex));else y(R)}}function y(M){c=c(M)}function m(M){re(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,F()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=M}function p(M,R){const L=R||{};return L.type=M,L.start=g(),u.events.push(["enter",L,u]),l.push(L),L}function v(M){const R=l.pop();return R.end=g(),u.events.push(["exit",R,u]),R}function k(M,R){w(M,R.from)}function _(M,R){R.restore()}function C(M,R){return L;function L(H,B,q){let Z,ne,ee,I;return Array.isArray(H)?ce(H):"tokenize"in H?ce([H]):oe(H);function oe(se){return j;function j(W){const Y=W!==null&&se[W],X=W!==null&&se.null,ie=[...Array.isArray(Y)?Y:Y?[Y]:[],...Array.isArray(X)?X:X?[X]:[]];return ce(ie)(W)}}function ce(se){return Z=se,ne=0,se.length===0?q:A(se[ne])}function A(se){return j;function j(W){return I=T(),ee=se,se.partial||(u.currentConstruct=se),se.name&&u.parser.constructs.disable.null.includes(se.name)?he():se.tokenize.call(R?Object.assign(Object.create(u),R):u,a,de,he)(W)}}function de(se){return M(ee,I),B}function he(se){return I.restore(),++ne<Z.length?A(Z[ne]):q}}}function w(M,R){M.resolveAll&&!o.includes(M)&&o.push(M),M.resolve&&yt(u.events,R,u.events.length-R,M.resolve(u.events.slice(R),u)),M.resolveTo&&(u.events=M.resolveTo(u.events,u))}function T(){const M=g(),R=u.previous,L=u.currentConstruct,H=u.events.length,B=Array.from(l);return{from:H,restore:q};function q(){r=M,u.previous=R,u.currentConstruct=L,u.events.length=H,l=B,F()}}function F(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function W_(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function J_(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
61
|
+
`;break}case-3:{s=`\r
|
|
62
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function K_(e){const r={constructs:ov([j_,...(e||{}).extensions||[]]),content:i(av),defined:[],document:i(cv),flow:i(I_),lazy:{},string:i(L_),text:i(F_)};return r;function i(o){return s;function s(l){return U_(r,o,l)}}}function Z_(e){for(;!Xp(e););return e}const Tf=/[\0\t\n\r]/g;function G_(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const a=[];let u,c,d,f,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(Tf.lastIndex=d,u=Tf.exec(o),f=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(f),!u){t=o.slice(d);break}if(h===10&&d===f&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),d<f&&(a.push(o.slice(d,f)),e+=f-d),h){case 0:{a.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,a.push(-2);e++<c;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return l&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const i1={}.hasOwnProperty;function q_(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Y_(n)(Z_(K_(n).document().write(G_()(e,t,!0))))}function Y_(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(gt),autolinkProtocol:T,autolinkEmail:T,atxHeading:o(Je),blockQuote:o(X),characterEscape:T,characterReference:T,codeFenced:o(ie),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ie,s),codeText:o(ue,s),codeTextData:T,data:T,codeFlowValue:T,definition:o(Ae),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(He),hardBreakEscape:o(Ke),hardBreakTrailing:o(Ke),htmlFlow:o(Ge,s),htmlFlowData:T,htmlText:o(Ge,s),htmlTextData:T,image:o(Sn),label:s,link:o(gt),listItem:o(it),listItemValue:f,listOrdered:o(jt,d),listUnordered:o(jt),paragraph:o(Gn),reference:A,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Je),strong:o(St),thematicBreak:o(pt)},exit:{atxHeading:a(),atxHeadingSequence:k,autolink:a(),autolinkEmail:Y,autolinkProtocol:W,blockQuote:a(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:se,characterReference:j,codeFenced:a(b),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:F,codeIndented:a(y),codeText:a(B),codeTextData:F,data:F,definition:a(),definitionDestinationString:v,definitionLabelString:m,definitionTitleString:p,emphasis:a(),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(L),htmlFlowData:F,htmlText:a(H),htmlTextData:F,image:a(Z),label:ee,labelText:ne,lineEnding:M,link:a(q),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:de,resourceDestinationString:I,resourceTitleString:oe,resource:ce,setextHeading:a(w),setextHeadingLineSequence:C,setextHeadingText:_,strong:a(),thematicBreak:a()}};o1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r($){let V={type:"root",children:[]};const E={stack:[V],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:c,data:n},le=[];let fe=-1;for(;++fe<$.length;)if($[fe][1].type==="listOrdered"||$[fe][1].type==="listUnordered")if($[fe][0]==="enter")le.push(fe);else{const Te=le.pop();fe=i($,Te,fe)}for(fe=-1;++fe<$.length;){const Te=t[$[fe][0]];i1.call(Te,$[fe][1].type)&&Te[$[fe][1].type].call(Object.assign({sliceSerialize:$[fe][2].sliceSerialize},E),$[fe][1])}if(E.tokenStack.length>0){const Te=E.tokenStack[E.tokenStack.length-1];(Te[1]||If).call(E,void 0,Te[0])}for(V.position={start:En($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:En($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)V=t.transforms[fe](V)||V;return V}function i($,V,E){let le=V-1,fe=-1,Te=!1,sn,ln,ui,ci;for(;++le<=E;){const mt=$[le];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?fe++:fe--,ci=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(sn&&!ci&&!fe&&!ui&&(ui=le),ci=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ci=void 0}if(!fe&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||fe===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(sn){let wr=le;for(ln=void 0;wr--;){const an=$[wr];if(an[1].type==="lineEnding"||an[1].type==="lineEndingBlank"){if(an[0]==="exit")continue;ln&&($[ln][1].type="lineEndingBlank",Te=!0),an[1].type="lineEnding",ln=wr}else if(!(an[1].type==="linePrefix"||an[1].type==="blockQuotePrefix"||an[1].type==="blockQuotePrefixWhitespace"||an[1].type==="blockQuoteMarker"||an[1].type==="listItemIndent"))break}ui&&(!ln||ui<ln)&&(sn._spread=!0),sn.end=Object.assign({},ln?$[ln][1].start:mt[1].end),$.splice(ln||le,0,["exit",sn,mt[2]]),le++,E++}if(mt[1].type==="listItemPrefix"){const wr={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};sn=wr,$.splice(le,0,["enter",wr,mt[2]]),le++,E++,ui=void 0,ci=!0}}}return $[V][1]._spread=Te,E}function o($,V){return E;function E(le){l.call(this,$(le),le),V&&V.call(this,le)}}function s(){this.stack.push({type:"fragment",children:[]})}function l($,V,E){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([V,E||void 0]),$.position={start:En(V.start),end:void 0}}function a($){return V;function V(E){$&&$.call(this,E),u.call(this,E)}}function u($,V){const E=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==$.type&&(V?V.call(this,$,le[0]):(le[1]||If).call(this,$,le[0]));else throw new Error("Cannot close `"+$.type+"` ("+mn({start:$.start,end:$.end})+"): it’s not open");E.position.end=En($.end)}function c(){return oc(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f($){if(this.data.expectingFirstListItemValue){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function h(){const $=this.resume(),V=this.stack[this.stack.length-1];V.lang=$}function g(){const $=this.resume(),V=this.stack[this.stack.length-1];V.meta=$}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$.replace(/(\r?\n|\r)$/g,"")}function m($){const V=this.resume(),E=this.stack[this.stack.length-1];E.label=V,E.identifier=Dr(this.sliceSerialize($)).toLowerCase()}function p(){const $=this.resume(),V=this.stack[this.stack.length-1];V.title=$}function v(){const $=this.resume(),V=this.stack[this.stack.length-1];V.url=$}function k($){const V=this.stack[this.stack.length-1];if(!V.depth){const E=this.sliceSerialize($).length;V.depth=E}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function C($){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T($){const E=this.stack[this.stack.length-1].children;let le=E[E.length-1];(!le||le.type!=="text")&&(le=ke(),le.position={start:En($.start),end:void 0},E.push(le)),this.stack.push(le)}function F($){const V=this.stack.pop();V.value+=this.sliceSerialize($),V.position.end=En($.end)}function M($){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const E=V.children[V.children.length-1];E.position.end=En($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(T.call(this,$),F.call(this,$))}function R(){this.data.atHardBreak=!0}function L(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$}function H(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$}function B(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$}function q(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=V,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function Z(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=V,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ne($){const V=this.sliceSerialize($),E=this.stack[this.stack.length-2];E.label=Up(V),E.identifier=Dr(V).toLowerCase()}function ee(){const $=this.stack[this.stack.length-1],V=this.resume(),E=this.stack[this.stack.length-1];if(this.data.inReference=!0,E.type==="link"){const le=$.children;E.children=le}else E.alt=V}function I(){const $=this.resume(),V=this.stack[this.stack.length-1];V.url=$}function oe(){const $=this.resume(),V=this.stack[this.stack.length-1];V.title=$}function ce(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function de($){const V=this.resume(),E=this.stack[this.stack.length-1];E.label=V,E.identifier=Dr(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function he($){this.data.characterReferenceType=$.type}function se($){const V=this.sliceSerialize($),E=this.data.characterReferenceType;let le;E?(le=jp(V,E==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=ji(V);const fe=this.stack[this.stack.length-1];fe.value+=le}function j($){const V=this.stack.pop();V.position.end=En($.end)}function W($){F.call(this,$);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize($)}function Y($){F.call(this,$);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize($)}function X(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function ue(){return{type:"inlineCode",value:""}}function Ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function He(){return{type:"emphasis",children:[]}}function Je(){return{type:"heading",depth:0,children:[]}}function Ke(){return{type:"break"}}function Ge(){return{type:"html",value:""}}function Sn(){return{type:"image",title:null,url:"",alt:null}}function gt(){return{type:"link",title:null,url:"",children:[]}}function jt($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function it($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function Gn(){return{type:"paragraph",children:[]}}function St(){return{type:"strong",children:[]}}function ke(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function En(e){return{line:e.line,column:e.column,offset:e.offset}}function o1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?o1(e,r):X_(e,r)}}function X_(e,t){let n;for(n in t)if(i1.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function If(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+mn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+mn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+mn({start:t.start,end:t.end})+") is still open")}function pi(e){return e.children instanceof Array}class La extends Error{constructor(t,n){super(t),this.name="MarkdownParseError",this.cause=n}}class Fa extends Error{constructor(t){super(t),this.name="UnrecognizedMarkdownConstructError"}}function Q_(e){const t=new Map;return e.type!=="root"?{importDeclarations:{}}:(e.children.filter(r=>r.type==="mdxjsEsm").filter(r=>r.value.startsWith("import ")).forEach(r=>{var i,o;(((o=(i=r.data)==null?void 0:i.estree)==null?void 0:o.body)??[]).forEach(s=>{s.type==="ImportDeclaration"&&s.specifiers.forEach(l=>{t.set(l.local.name,{source:`${s.source.value}`,defaultExport:l.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(t.entries())})}function eC({root:e,markdown:t,visitors:n,syntaxExtensions:r,mdastExtensions:i,...o}){var s;let l;try{l=q_(t,{extensions:r,mdastExtensions:i})}catch(a){throw a instanceof Error?new La(`Error parsing markdown: ${a.message}`,a):new La(`Error parsing markdown: ${a}`,a)}l.children.length===0&&l.children.push({type:"paragraph",children:[]}),((s=l.children.at(-1))==null?void 0:s.type)!=="paragraph"&&l.children.push({type:"paragraph",children:[]}),tC({root:e,mdastRoot:l,visitors:n,...o})}function tC({root:e,mdastRoot:t,visitors:n,...r}){const i=new WeakMap,o=new WeakMap,s=Q_(t);n=n.sort((u,c)=>(c.priority??0)-(u.priority??0));function l(u,c){if(!pi(u))throw new Error("Attempting to visit children of a non-parent");u.children.forEach(d=>{a(d,c,u)})}function a(u,c,d,f=null){const h=n.find((g,x)=>f!=null&&f.has(x)?!1:typeof g.testNode=="string"?g.testNode===u.type:g.testNode(u,r));if(!h)try{throw new Fa(`Unsupported markdown syntax: ${Wp(u)}`)}catch{throw new Fa(`Parsing of the following markdown structure failed: ${JSON.stringify({type:u.type,name:"name"in u?u.name:"N/A"})}`)}h.visitNode({mdastNode:u,lexicalParent:c,mdastParent:d,descriptors:r,metaData:s,actions:{visitChildren:l,nextVisitor(){a(u,c,d,(f??new Set).add(n.indexOf(h)))},addAndStepInto(g){c.append(g),pi(u)&&l(u,g)},addFormatting(g,x){x||pi(u)&&(x=u),x&&i.set(x,g|(i.get(d)??0))},removeFormatting(g,x){x||pi(u)&&(x=u),x&&i.set(x,g^(i.get(d)??0))},getParentFormatting(){return i.get(d)??0},addStyle(g,x){x||pi(u)&&(x=u),x&&o.set(x,g)},getParentStyle(){return o.get(d)??""}}})}a(t,e,null)}var nC=Object.defineProperty,rC=(e,t,n)=>t in e?nC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pl=(e,t,n)=>(rC(e,typeof t!="symbol"?t+"":t,n),n);const Af="generic-html";class lo extends Bt{constructor(t,n,r,i){super(i),Pl(this,"__tag"),Pl(this,"__nodeType"),Pl(this,"__attributes"),this.__tag=t,this.__nodeType=n,this.__attributes=r}static getType(){return Af}static clone(t){return new lo(t.__tag,t.__nodeType,t.__attributes,t.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(t){const n=this.getWritable();n.__attributes=t}getStyle(){var t;return(t=this.__attributes.find(n=>n.name==="style"))==null?void 0:t.value}createDOM(){const t=this.__tag,n=document.createElement(t);return this.__attributes.forEach(r=>{n.setAttribute(r.name,r.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(t){const{element:n}=super.exportDOM(t);return{element:n}}static importJSON(t){const n=s1(t.tag,t.mdxType,t.attributes);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:Af,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function s1(e,t,n){return ft(new lo(e,t,n))}function iC(e){return e instanceof lo}const oC={testLexicalNode:iC,visitLexicalNode({actions:e,lexicalNode:t}){e.addAndStepInto("mdxJsxTextElement",{name:t.getTag(),type:t.getNodeType(),attributes:t.getAttributes()})},priority:-100},sC={testLexicalNode:Mt,visitLexicalNode:({mdastParent:e,actions:t})=>{t.appendToParent(e,{type:"text",value:`
|
|
63
|
+
`})}},lC={testLexicalNode:Vu,visitLexicalNode:({actions:e})=>{e.addAndStepInto("paragraph")}},aC={testLexicalNode:Xe,visitLexicalNode:({actions:e})=>{e.addAndStepInto("root")}},Ai=1,Ni=2,$o=4,Li=8,ac=16,Do=32,Vo=64;function Nf(e){return e.type==="text"}const uC=["u","span","sub","sup"],cC={shouldJoin:(e,t)=>{if(["text","emphasis","strong"].includes(e.type))return e.type===t.type;if(e.type==="mdxJsxTextElement"&&t.type==="mdxJsxTextElement"&&uC.includes(t.name)){const n=t;return e.name===n.name&&JSON.stringify(e.attributes)===JSON.stringify(n.attributes)}return!1},join(e,t){return Nf(e)&&Nf(t)?{type:"text",value:e.value+t.value}:{...e,children:[...e.children,...t.children]}},testLexicalNode:J,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getPreviousSibling(),i=J(r)?r.getFormat():0,o=e.getTextContent(),s=e.getFormat(),l=e.getStyle();let a=t;if(l&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:l}]})),i&s&Li&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&s&Vo&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&s&Do&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),i&s&Ni&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),i&s&Ai&&(a=n.appendToParent(a,{type:"strong",children:[]})),i&s&$o&&(a=n.appendToParent(a,{type:"delete",children:[]})),s&Li&&!(i&Li)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),s&Vo&&!(i&Vo)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),s&Do&&!(i&Do)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),s&Ni&&!(i&Ni)&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),s&Ai&&!(i&Ai)&&(a=n.appendToParent(a,{type:"strong",children:[]})),s&$o&&!(i&$o)&&(a=n.appendToParent(a,{type:"delete",children:[]})),s&ac){n.appendToParent(a,{type:"inlineCode",value:o});return}n.appendToParent(a,{type:"text",value:o})}},dC={testNode:"break",visitNode:function({lexicalParent:e}){e.append(Rt())}};function So(e,t){return[{testNode:n=>n.type==="mdxJsxTextElement"&&n.name===e,visitNode({actions:n,mdastNode:r,lexicalParent:i}){n.addFormatting(t),n.visitChildren(r,i)}},{testNode:n=>n.type==="html"&&n.value===`<${e}>`,visitNode({actions:n,mdastParent:r}){n.addFormatting(t,r)}},{testNode:n=>n.type==="html"&&n.value===`</${e}>`,visitNode({actions:n,mdastParent:r}){n.removeFormatting(t,r)}}]}const fC={testNode:"delete",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting($o),t.visitChildren(e,n)}},hC={testNode:"inlineCode",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Ne(e.value).setFormat(t.getParentFormatting()|ac))}},gC={testNode:"emphasis",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(Ni),t.visitChildren(e,n)}},pC={testNode:"strong",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(Ai),t.visitChildren(e,n)}},mC=[gC,pC,...So("u",Li),...So("code",ac),hC,fC,...So("sup",Vo),...So("sub",Do)],xC={testNode:Jp,visitNode:function({mdastNode:e,actions:t,lexicalParent:n}){e.name==="span"&&e.attributes.length===1&&e.attributes[0].type==="mdxJsxAttribute"&&e.attributes[0].name==="style"?(t.addStyle(e.attributes[0].value,e),t.visitChildren(e,n)):t.addAndStepInto(s1(e.name,e.type,e.attributes))},priority:-100},yC=["listitem","quote","admonition"],bC={testNode:"paragraph",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){yC.includes(t.getType())?n.visitChildren(e,t):n.addAndStepInto(ve())}},vC={testNode:"root",visitNode({actions:e,mdastNode:t,lexicalParent:n}){e.visitChildren(t,n)}},_C={testNode:"text",visitNode({mdastNode:e,actions:t}){const n=Ne(e.value);n.setFormat(t.getParentFormatting());const r=t.getParentStyle();r!==""&&n.setStyle(r),t.addAndStepInto(n)}},CC=()=>S.createElement(w2,{externalHistoryState:wt(GC)}),Tt={eof:null,exclamationMark:33,dash:45,greaterThan:62},Xn={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix"};function wC(e){return{canContainEols:["comment"],enter:{comment(t){this.buffer()}},exit:{comment(t){this.resume()}}}}const Lf=(e,t,n)=>{return r;function r(g){return e.enter("comment"),e.consume(g),i}function i(g){return g===Tt.exclamationMark?(e.consume(g),o):n(g)}function o(g){return g===Tt.dash?(e.consume(g),s):n(g)}function s(g){return g===Tt.dash?(e.consume(g),l):n(g)}function l(g){return g===Tt.greaterThan?n(g):re(g)?c(g):(e.enter(Xn.data),g===Tt.dash?(e.consume(g),a):u(g))}function a(g){return g===Tt.greaterThan?n(g):u(g)}function u(g){return g===Tt.eof?n(g):g===Tt.dash?(e.consume(g),f):re(g)?(e.exit(Xn.data),c(g)):(e.consume(g),u)}function c(g){return e.enter(Xn.lineEnding),e.consume(g),e.exit(Xn.lineEnding),be(e,d,Xn.linePrefix)}function d(g){return re(g)?c(g):(e.enter(Xn.data),u(g))}function f(g){return g===Tt.dash?(e.consume(g),h):u(g)}function h(g){return g===Tt.greaterThan?(e.exit(Xn.data),e.enter("commentEnd"),e.consume(g),e.exit("commentEnd"),e.exit("comment"),t(g)):g===Tt.dash?(e.consume(g),h):u(g)}},kC={flow:{60:{tokenize:Lf,concrete:!0}},text:{60:{tokenize:Lf}}},SC="_bold_1tncs_10",EC="_italic_1tncs_14",TC="_underline_1tncs_18",IC="_strikethrough_1tncs_34",AC="_underlineStrikethrough_1tncs_38",NC="_subscript_1tncs_42",LC="_superscript_1tncs_47",FC="_code_1tncs_52",PC="_nestedListItem_1tncs_59",MC="_listitem_1tncs_69",RC="_listItemChecked_1tncs_73",OC="_listItemUnchecked_1tncs_74",$C="_admonitionDanger_1tncs_151",DC="_admonitionInfo_1tncs_152",VC="_admonitionNote_1tncs_153",HC="_admonitionTip_1tncs_154",BC="_admonitionCaution_1tncs_155",qe={bold:SC,italic:EC,underline:TC,strikethrough:IC,underlineStrikethrough:AC,subscript:NC,superscript:LC,code:FC,nestedListItem:PC,listitem:MC,listItemChecked:RC,listItemUnchecked:OC,admonitionDanger:$C,admonitionInfo:DC,admonitionNote:VC,admonitionTip:HC,admonitionCaution:BC},uc={text:{bold:qe.bold,italic:qe.italic,underline:qe.underline,code:qe.code,strikethrough:qe.strikethrough,subscript:qe.subscript,superscript:qe.superscript,underlineStrikethrough:qe.underlineStrikethrough},list:{listitem:qe.listitem,listitemChecked:qe.listItemChecked,listitemUnchecked:qe.listItemUnchecked,nested:{listitem:qe.nestedListItem}},admonition:{danger:qe.admonitionDanger,info:qe.admonitionInfo,note:qe.admonitionNote,tip:qe.admonitionTip,caution:qe.admonitionCaution}},cc=_n(),Bn=te(null),Ve=te(null),Pa=te(""),Ma=te(!0),Dt=te(!1,e=>{e.sub(e.pipe(Dt,Pe(Bn)),([t,n])=>{n==null||n.setEditable(!t)})}),Ra=te(""),Ff=te(!1),Ui=te(!1),l1=te(0),ls=te(null),Oa=We(e=>{e.link(e.pipe(ls,Zi(t=>t!==null)),Oa)}),a1=We(e=>{e.sub(e.pipe(a1,Pe(Ve)),([t,n])=>{n==null||n.dispatchCommand(pn,t)})}),Kr=te(null,e=>{e.sub(e.pipe(Kr,Pe(Ve)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:Vn(r,l=>{const a=l.getParent();return a!==null&&Me(a)});i===null&&(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null){const l=Us(i)?i.getTag():i.getType();e.pub(A1,l)}})}),u1=te(""),pr=te(""),as=te(!1),Zs=We(e=>{e.link(pr,Zs),e.sub(u1,t=>{e.pubIn({[as]:!0,[pr]:t})})}),$a=We(e=>{e.link(e.pipe(Zs,Pe(Ba),Zi(([,t])=>!t),Fr(([t])=>t)),$a)}),c1=te([]),d1=te([]),f1=te([]),h1=te([]),g1=te([]),p1=te([]),Da=te({}),zC=te(!1),m1=te([]),jC=te([]),Gs=te([]),ao=te(null),UC=te(null),zn=ut(d1),vn=ut(c1),Va=ut(f1),Ha=ut(h1),jn=ut(g1),x1=ut(p1),Ba=te(!1),dc=We(e=>{e.sub(e.pipe(dc,Pe(pr,Bn,Ui),Zi(([t,n])=>t.trim()!==n.trim())),([t,,n,r])=>{e.pub(Ba,!0),n==null||n.update(()=>{Ee().clear(),fc(e,Ee(),t),r?n.focus():Be(null)},{onUpdate:()=>{e.pub(Ba,!1)}})})}),y1=We(e=>{e.sub(e.pipe(y1,Pe(Ve,Ui)),([t,n,r])=>{n==null||n.update(()=>{const i=U();if(i!==null){const o={children:[],append(s){this.children.push(s)},getType(){return i.getNodes()[0].getType()}};fc(e,o,t),Qr(o.children)}r?n.focus():Be(null)})})});function b1(){return ig((e,[t,n])=>(e.forEach(r=>{if(!r)throw new Error("You have a subscription that does not return a teardown");r()}),n?t.map(r=>r(n)):[]),[])}const v1=te([],e=>{e.pipe(e.combine(v1,Ve),b1())}),_1=te([],e=>{e.pipe(e.combine(_1,Bn),b1())}),WC=te(null),za=We(),Un=te(e=>{throw new Error(`No icon component for ${e}`)});function ut(e,t){return We((n,r)=>{n.changeWith(e,r,(i,o)=>{Array.isArray(o)||(o=[o]);let s=i;for(const l of o)i.includes(l)||(s=[...s,l]);return s}),t==null||t(n,r)})}function C1(e){const t=U();D(t)&&e.pubIn({[Kr]:t,[l1]:t.format})}const w1=ut(_1,(e,t)=>{e.pub(t,[n=>n.registerCommand(Ss,(r,i)=>(e.pubIn({[Ve]:i,[Ui]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{e.pub(WC,{rootNode:Ee(),editorType:"lexical"})}),C1(e),!1),bn),n=>n.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:o})=>{if(e.getValue(ls)!==null||r.size===0&&i.size===0)return;let l;o.read(()=>{Ee().getLastChild()instanceof to&&n.update(()=>{Ee().append(ve())},{discrete:!0}),l=iv({root:Ee(),visitors:e.getValue(g1),jsxComponentDescriptors:e.getValue(m1),toMarkdownExtensions:e.getValue(p1),toMarkdownOptions:e.getValue(Da),jsxIsAvailable:e.getValue(zC)})}),e.pub(pr,l.trim()),e.pub(as,!1)}),n=>n.registerCommand(kg,()=>(e.pub(Ui,!0),!1),bn)])}),Wi=ut(v1,(e,t)=>{e.pub(t,[n=>n.registerUpdateListener(({editorState:r})=>{r.read(()=>{C1(e)})}),n=>n.registerCommand(Sg,r=>{var i;const o=e.getValue(Bn);return o&&!((i=o.getRootElement())!=null&&i.contains(r.relatedTarget))&&e.pubIn({[Ui]:!1,[za]:r}),!1},bn)])});function fc(e,t,n){try{eC({root:t,visitors:e.getValue(c1),mdastExtensions:e.getValue(h1),markdown:n,syntaxExtensions:e.getValue(f1),jsxComponentDescriptors:e.getValue(m1),directiveDescriptors:e.getValue(jC),codeBlockEditorDescriptors:e.getValue(Gs)}),e.pub(ls,null)}catch(r){if(r instanceof La||r instanceof Fa)e.pubIn({[pr]:n,[ls]:{error:r.message,source:n}});else throw r}}const k1=te([]),_r=ut(k1),S1=te([]),JC=ut(S1),E1=te([]),KC=ut(E1),T1=te([]);ut(T1);const ZC=te([]),I1=ut(ZC),GC=te(gp()),A1=te("");We();const us=We(e=>{e.sub(e.pipe(us,Pe(Ve)),([t,n])=>{n==null||n.update(()=>{const r=U();D(r)&&(s2(r,t),setTimeout(()=>{n.focus()}))})})}),N1=We(e=>{e.sub(e.pipe(N1,Pe(Ve)),([t,n])=>{n==null||n.focus(()=>{n.getEditorState().read(()=>{const r=U();D(r)&&(n.update(()=>{const i=t();i.isInline()?(Qr([i]),Me(i.getParentOrThrow())&&nc(i,ve).selectEnd()):hp(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{n.dispatchCommand(cc,void 0)}))})},{defaultSelection:"rootEnd"})})}),cs=te("rich-text",e=>{function t(){return ig((n,r)=>({current:n.next,next:r}),{current:"rich-text",next:"rich-text"})}e.sub(e.pipe(cs,t(),Pe(ds)),([{current:n},r])=>{(n==="source"||n==="diff")&&e.pub(dc,r)}),e.sub(e.pipe(cs,t(),Zi(n=>n.current==="rich-text"),Pe(Ve)),([,n])=>{n==null||n.dispatchCommand(cc,void 0)})}),ds=te("",e=>{e.link(pr,ds),e.link(ds,Zs)}),hc=te([]),ii=ut(hc),L1=te(()=>{throw new Error("No translation function provided")}),Pf=te(uc),qC=Vt({init(e,t){const n=(t==null?void 0:t.initialMarkdown)??"";e.register(w1),e.register(Wi),e.register(Zs),e.pubIn({[u1]:t!=null&&t.trim?n.trim():n,[Un]:t==null?void 0:t.iconComponentFor,[vn]:[vC,bC,_C,dC,...mC],[zn]:[ei,rn,lo],[jn]:[aC,lC,cC,sC,oC],[_r]:CC,[Pa]:t==null?void 0:t.contentEditableClassName,[Ma]:t==null?void 0:t.spellCheck,[Da]:t==null?void 0:t.toMarkdownOptions,[Ff]:t==null?void 0:t.autoFocus,[Ra]:t==null?void 0:t.placeholder,[Dt]:t==null?void 0:t.readOnly,[L1]:t==null?void 0:t.translation,[Ha]:K2(),[Va]:W2(),[x1]:[py(),Z2()],[Pf]:(t==null?void 0:t.lexicalTheme)??uc}),e.singletonSub(Oa,t==null?void 0:t.onError),e.singletonSub($a,r=>{t==null||t.onChange(r,e.getValue(as))}),e.singletonSub(za,t==null?void 0:t.onBlur),t!=null&&t.suppressHtmlProcessing||e.pubIn({[Ha]:[gy(),wC()],[Va]:[Vy(),Hy(),kC],[vn]:xC})},postInit(e,t){const n=Fx({editable:(t==null?void 0:t.readOnly)!==!0,namespace:"MDXEditor",nodes:e.getValue(d1),onError:r=>{throw r},theme:e.getValue(Pf)});n.update(()=>{const r=(t==null?void 0:t.initialMarkdown.trim())??"";fc(e,Ee(),r);const i=t==null?void 0:t.autoFocus;if(i){if(i===!0){setTimeout(()=>{n.focus(Pr,{defaultSelection:"rootStart"})});return}setTimeout(()=>{n.focus(Pr,{defaultSelection:i.defaultSelection??"rootStart"})})}}),e.pub(Bn,n),e.pub(Ve,n)},update(e,t){e.pubIn({[Pa]:t==null?void 0:t.contentEditableClassName,[Ma]:t==null?void 0:t.spellCheck,[Da]:t==null?void 0:t.toMarkdownOptions,[Ff]:t==null?void 0:t.autoFocus,[Ra]:t==null?void 0:t.placeholder,[Dt]:t==null?void 0:t.readOnly}),e.singletonSub($a,n=>{t==null||t.onChange(n,e.getValue(as))}),e.singletonSub(za,t==null?void 0:t.onBlur),e.singletonSub(Oa,t==null?void 0:t.onError)}});function wn(){return wt(L1)}function YC(){return Ee().getTextContent()}function XC(e,t=!0){if(e)return!1;let n=YC();return t&&(n=n.trim()),n===""}function QC(e){if(!XC(e,!1))return!1;const t=Ee().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(xe(i))return!1;if(O(i)){if(!Vu(i)||i.__indent!==0)return!1;const o=i.getChildren(),s=o.length;for(let l=0;l<s;l++){const a=o[r];if(!J(a))return!1}}}return!0}function F1(e){return()=>QC(e)}const P1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?N.useLayoutEffect:N.useEffect;function e9({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:o,ariaExpanded:s,ariaInvalid:l,ariaLabel:a,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:d,ariaRequired:f,autoCapitalize:h,className:g,id:x,role:b="textbox",spellCheck:y=!0,style:m,tabIndex:p,"data-testid":v,...k},_){const[C,w]=N.useState(e.isEditable()),T=N.useCallback(M=>{M&&M.ownerDocument&&M.ownerDocument.defaultView?e.setRootElement(M):e.setRootElement(null)},[e]),F=N.useMemo(()=>function(...M){return R=>{M.forEach(L=>{typeof L=="function"?L(R):L!=null&&(L.current=R)})}}(_,T),[T,_]);return P1(()=>(w(e.isEditable()),e.registerEditableListener(M=>{w(M)})),[e]),P.jsx("div",{"aria-activedescendant":C?t:void 0,"aria-autocomplete":C?n:"none","aria-controls":C?r:void 0,"aria-describedby":i,...o!=null?{"aria-errormessage":o}:{},"aria-expanded":C&&b==="combobox"?!!s:void 0,...l!=null?{"aria-invalid":l}:{},"aria-label":a,"aria-labelledby":u,"aria-multiline":c,"aria-owns":C?d:void 0,"aria-readonly":!C||void 0,"aria-required":f,autoCapitalize:h,className:g,contentEditable:C,"data-testid":v,id:x,ref:F,role:C?b:void 0,spellCheck:y,style:m,tabIndex:p,...k})}const t9=N.forwardRef(e9);function Mf(e){return e.getEditorState().read(F1(e.isComposing()))}const n9=N.forwardRef(r9);function r9(e,t){const{placeholder:n,...r}=e,[i]=rt();return P.jsxs(P.Fragment,{children:[P.jsx(t9,{editor:i,...r,ref:t}),n!=null&&P.jsx(i9,{editor:i,content:n})]})}function i9({content:e,editor:t}){const n=function(s){const[l,a]=N.useState(()=>Mf(s));return P1(()=>{function u(){const c=Mf(s);a(c)}return u(),ht(s.registerUpdateListener(()=>{u()}),s.registerEditableListener(()=>{u()}))},[s]),l}(t),[r,i]=N.useState(t.isEditable());if(N.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(s=>{i(s)})),[t]),!n)return null;let o=null;return typeof e=="function"?o=e(r):e!==null&&(o=e),o===null?null:P.jsx("div",{"aria-hidden":!0,children:o})}const o9=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?N.useLayoutEffect:N.useEffect;function s9(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function l9(){return function(e){const[t]=rt(),n=N.useMemo(()=>e(t),[t,e]),[r,i]=N.useState(()=>n.initialValueFn()),o=N.useRef(r);return o9(()=>{const{initialValueFn:s,subscribe:l}=n,a=s();return o.current!==a&&(o.current=a,i(a)),l(u=>{o.current=u,i(u)})},[n,e]),r}(s9)}function a9(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let s;try{s=JSON.parse(o)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const l=s.payload;if(l&&l.functionId==="makeChanges"){const a=l.args;if(a){const[u,c,d,f,h,g]=a;e.update(()=>{const x=U();if(D(x)){const b=x.anchor;let y=b.getNode(),m=0,p=0;if(J(y)&&u>=0&&c>=0&&(m=u,p=u+c,x.setTextNodeRange(y,m,y,p)),m===p&&d===""||(x.insertRawText(d),y=b.getNode()),J(y)){m=f,p=f+h;const v=y.getTextContentSize();m=m>v?v:m,p=p>v?v:p,x.setTextNodeRange(y,m,y,p)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const ja=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?N.useLayoutEffect:N.useEffect;function Rf(e){return e.getEditorState().read(F1(e.isComposing()))}function u9({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=rt(),i=function(o,s){const[l,a]=N.useState(()=>o.getDecorators());return ja(()=>o.registerDecoratorListener(u=>{zo.flushSync(()=>{a(u)})}),[o]),N.useEffect(()=>{a(o.getDecorators())},[o]),N.useMemo(()=>{const u=[],c=Object.keys(l);for(let d=0;d<c.length;d++){const f=c[d],h=P.jsx(s,{onError:x=>o._onError(x),children:P.jsx(N.Suspense,{fallback:null,children:l[f]})}),g=o.getElementByKey(f);g!==null&&u.push(zo.createPortal(h,g,f))}return u},[s,l,o])}(r,n);return function(o){ja(()=>ht(H2(o),a9(o)),[o])}(r),P.jsxs(P.Fragment,{children:[e,P.jsx(c9,{content:t}),i]})}function c9({content:e}){const[t]=rt(),n=function(i){const[o,s]=N.useState(()=>Rf(i));return ja(()=>{function l(){const a=Rf(i);s(a)}return l(),ht(i.registerUpdateListener(()=>{l()}),i.registerEditableListener(()=>{l()}))},[i]),o}(t),r=l9();return n?typeof e=="function"?e(r):e:null}var Ml={exports:{}};/*!
|
|
64
|
+
Copyright (c) 2018 Jed Watson.
|
|
65
|
+
Licensed under the MIT License (MIT), see
|
|
66
|
+
http://jedwatson.github.io/classnames
|
|
67
|
+
*/var Of;function d9(){return Of||(Of=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(o=i(o,r(l)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var l in o)t.call(o,l)&&o[l]&&(s=i(s,l));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(Ml)),Ml.exports}var f9=d9();const Ce=$h(f9),h9="_editorRoot_sects_53",g9="_editorWrapper_sects_155",p9="_toolbarRoot_sects_162",m9="_readOnlyToolbarRoot_sects_189",x9="_toolbarToggleItem_sects_208",y9="_toolbarGroupOfGroups_sects_219",b9="_toolbarToggleSingleGroup_sects_224",v9="_toolbarButton_sects_239",_9="_selectContainer_sects_288",C9="_selectItem_sects_301",w9="_selectTrigger_sects_308",k9="_selectDropdownArrow_sects_374",S9="_contentEditable_sects_380",E9="_iconButton_sects_457",T9="_primaryButton_sects_507",I9="_secondaryButton_sects_508",A9="_linkDialogEditForm_sects_541",N9="_linkDialogAnchor_sects_587",L9="_linkDialogPopoverContent_sects_601",F9="_dialogContent_sects_603",P9="_popoverArrow_sects_650",M9="_linkDialogPreviewAnchor_sects_654",R9="_tooltipTrigger_sects_677",O9="_tooltipContent_sects_681",$9="_actionButton_sects_695",D9="_dialogOverlay_sects_870",V9="_focusedImage_sects_916",H9="_imageWrapper_sects_920",B9="_editImageToolbar_sects_933",z9="_editImageButton_sects_937",j9="_imageControlWrapperResizing_sects_1032",U9="_imageResizer_sects_1036",W9="_imageResizerN_sects_1045",J9="_imageResizerNe_sects_1051",K9="_imageResizerE_sects_1057",Z9="_imageResizerSe_sects_1063",G9="_imageResizerS_sects_1063",q9="_imageResizerSw_sects_1075",Y9="_imageResizerW_sects_1081",X9="_imageResizerNw_sects_1087",Q9="_imagePlaceholder_sects_1093",ew="_placeholder_sects_1101",tw="_rootContentEditableWrapper_sects_1114",nw="_downshiftInputWrapper_sects_1124",rw="_downshiftInput_sects_1124",iw="_downshiftAutocompleteContainer_sects_1155",ow="_textInput_sects_1201",sw="_multiFieldForm_sects_1209",lw="_formField_sects_1215",aw="_popupContainer_sects_1235",G={editorRoot:h9,editorWrapper:g9,toolbarRoot:p9,readOnlyToolbarRoot:m9,toolbarToggleItem:x9,toolbarGroupOfGroups:y9,toolbarToggleSingleGroup:b9,toolbarButton:v9,selectContainer:_9,selectItem:C9,selectTrigger:w9,selectDropdownArrow:k9,contentEditable:S9,iconButton:E9,primaryButton:T9,secondaryButton:I9,linkDialogEditForm:A9,linkDialogAnchor:N9,linkDialogPopoverContent:L9,dialogContent:F9,popoverArrow:P9,linkDialogPreviewAnchor:M9,tooltipTrigger:R9,tooltipContent:O9,actionButton:$9,dialogOverlay:D9,focusedImage:V9,imageWrapper:H9,editImageToolbar:B9,editImageButton:z9,imageControlWrapperResizing:j9,imageResizer:U9,imageResizerN:W9,imageResizerNe:J9,imageResizerE:K9,imageResizerSe:Z9,imageResizerS:G9,imageResizerSw:q9,imageResizerW:Y9,imageResizerNw:X9,imagePlaceholder:Q9,placeholder:ew,rootContentEditableWrapper:tw,downshiftInputWrapper:nw,downshiftInput:rw,downshiftAutocompleteContainer:iw,textInput:ow,multiFieldForm:sw,formField:lw,popupContainer:aw},uw={undo:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),code:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17.1128 7.03475 15.9538L8.6385 15.2635C8.91667 16.0444 9.3545 16.6867 9.952 17.1905C10.5493 17.6944 11.2923 17.9463 12.1808 17.9463C12.9578 17.9463 13.6744 17.7508 14.3307 17.3598C14.9872 16.9686 15.3155 16.3487 15.3155 15.5C15.3155 15.123 15.2555 14.7968 15.1355 14.5213C15.0157 14.2456 14.8462 13.9885 14.627 13.75H16.677C16.7987 13.9705 16.8932 14.2256 16.9605 14.5153C17.0278 14.8051 17.0615 15.1334 17.0615 15.5C17.0615 16.8372 16.5747 17.8702 15.601 18.599C14.6272 19.3279 13.4768 19.6923 12.15 19.6923ZM2.25 11.75V10.25H21.75V11.75H2.25ZM12.05 4.19629C13.0475 4.19629 13.9123 4.42704 14.6443 4.88854C15.3763 5.35004 15.9673 6.05896 16.4173 7.01529L14.823 7.73079C14.6218 7.26029 14.2978 6.84462 13.851 6.48379C13.4042 6.12279 12.8141 5.94229 12.0808 5.94229C11.2244 5.94229 10.5392 6.16221 10.025 6.60204C9.51083 7.04171 9.264 7.59104 9.2845 8.25004H7.5385C7.50133 7.16421 7.89783 6.21712 8.728 5.40879C9.558 4.60046 10.6653 4.19629 12.05 4.19629Z",fill:"currentColor"})),superscript:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M16.6924 8V6.2115C16.6924 5.95383 16.7786 5.73875 16.9511 5.56625C17.1235 5.39392 17.3385 5.30775 17.5961 5.30775H19.5001V4.38475H16.6924V3.5H19.4809C19.7385 3.5 19.9536 3.58625 20.1261 3.75875C20.2985 3.93108 20.3846 4.14617 20.3846 4.404V5.2885C20.3846 5.54617 20.2985 5.76125 20.1261 5.93375C19.9536 6.10608 19.7385 6.19225 19.4809 6.19225H17.5771V7.1155H20.3846V8H16.6924ZM4.44238 18.5L8.84638 11.6287L4.77713 5.30775H6.74438L9.95963 10.404H10.0214L13.2501 5.30775H15.2329L11.1194 11.6287L15.5579 18.5H13.5751L10.0214 12.9308H9.95963L6.42513 18.5H4.44238Z",fill:"currentColor"})),subscript:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M16.6924 20.5V18.7115C16.6924 18.4538 16.7786 18.2387 16.9511 18.0662C17.1235 17.8939 17.3385 17.8077 17.5961 17.8077H19.5001V16.8845H16.6924V16H19.4809C19.7385 16 19.9536 16.0863 20.1261 16.2587C20.2985 16.4311 20.3846 16.6461 20.3846 16.9038V17.7885C20.3846 18.0462 20.2985 18.2612 20.1261 18.4337C19.9536 18.6061 19.7385 18.6923 19.4809 18.6923H17.5771V19.6152H20.3846V20.5H16.6924ZM4.44238 18.6923L8.84638 11.8212L4.77713 5.5H6.74438L9.95963 10.5962H10.0214L13.2501 5.5H15.2329L11.1194 11.8212L15.5579 18.6923H13.5751L10.0214 13.123H9.95963L6.42513 18.6923H4.44238Z",fill:"currentColor"})),format_list_bulleted:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75005V5.25005H20.5V6.75005H9.30775ZM5.1635 19.6635C4.706 19.6635 4.31442 19.5006 3.98875 19.1748C3.66292 18.8491 3.5 18.4575 3.5 18C3.5 17.5425 3.66292 17.151 3.98875 16.8253C4.31442 16.4995 4.706 16.3365 5.1635 16.3365C5.621 16.3365 6.01258 16.4995 6.33825 16.8253C6.66408 17.151 6.827 17.5425 6.827 18C6.827 18.4575 6.66408 18.8491 6.33825 19.1748C6.01258 19.5006 5.621 19.6635 5.1635 19.6635ZM5.1635 13.6635C4.706 13.6635 4.31442 13.5006 3.98875 13.1748C3.66292 12.8491 3.5 12.4575 3.5 12C3.5 11.5425 3.66292 11.151 3.98875 10.8253C4.31442 10.4995 4.706 10.3365 5.1635 10.3365C5.621 10.3365 6.01258 10.4995 6.33825 10.8253C6.66408 11.151 6.827 11.5425 6.827 12C6.827 12.4575 6.66408 12.8491 6.33825 13.1748C6.01258 13.5006 5.621 13.6635 5.1635 13.6635ZM5.1635 7.66355C4.706 7.66355 4.31442 7.50063 3.98875 7.1748C3.66292 6.84913 3.5 6.45755 3.5 6.00005C3.5 5.54255 3.66292 5.15096 3.98875 4.8253C4.31442 4.49946 4.706 4.33655 5.1635 4.33655C5.621 4.33655 6.01258 4.49946 6.33825 4.8253C6.66408 5.15096 6.827 5.54255 6.827 6.00005C6.827 6.45755 6.66408 6.84913 6.33825 7.1748C6.01258 7.50063 5.621 7.66355 5.1635 7.66355Z",fill:"currentColor"})),format_list_numbered:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M3.5 21.5V20.3078H6V19.25H4.5V18.0577H6V17H3.5V15.8077H6.34625C6.58592 15.8077 6.78683 15.8888 6.949 16.051C7.11117 16.2132 7.19225 16.4141 7.19225 16.6538V17.8462C7.19225 18.0859 7.11117 18.2868 6.949 18.449C6.78683 18.6112 6.58592 18.6923 6.34625 18.6923C6.58592 18.6923 6.78683 18.7733 6.949 18.9355C7.11117 19.0977 7.19225 19.2987 7.19225 19.5385V20.6538C7.19225 20.8936 7.11117 21.0946 6.949 21.2568C6.78683 21.4189 6.58592 21.5 6.34625 21.5H3.5ZM3.5 14.8463V12.25C3.5 12.0103 3.58108 11.8093 3.74325 11.647C3.90542 11.4848 4.10642 11.4038 4.34625 11.4038H6V10.3462H3.5V9.15375H6.34625C6.58592 9.15375 6.78683 9.23483 6.949 9.397C7.11117 9.55933 7.19225 9.76033 7.19225 10V11.75C7.19225 11.9897 7.11117 12.1907 6.949 12.353C6.78683 12.5152 6.58592 12.5963 6.34625 12.5963H4.69225V13.6538H7.19225V14.8463H3.5ZM5 8.19225V3.69225H3.5V2.5H6.19225V8.19225H5ZM9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75V5.25H20.5V6.75H9.30775Z",fill:"currentColor"})),format_list_checked:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M5.69425 18.452L2.5 15.2578L3.54425 14.2135L5.66925 16.3385L9.91925 12.0885L10.9635 13.1578L5.69425 18.452ZM5.69425 10.8365L2.5 7.64227L3.54425 6.59802L5.66925 8.72302L9.91925 4.47302L10.9635 5.54227L5.69425 10.8365ZM13.0095 16.5578V15.0578H21.5095V16.5578H13.0095ZM13.0095 8.94227V7.44227H21.5095V8.94227H13.0095Z",fill:"currentColor"})),link:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M10.8077 16.5385H7.0385C5.78283 16.5385 4.7125 16.096 3.8275 15.211C2.9425 14.3262 2.5 13.256 2.5 12.0005C2.5 10.745 2.9425 9.67471 3.8275 8.78955C4.7125 7.90421 5.78283 7.46155 7.0385 7.46155H10.8077V8.96155H7.0385C6.19867 8.96155 5.48233 9.25805 4.8895 9.85105C4.2965 10.444 4 11.1604 4 12C4 12.8397 4.2965 13.556 4.8895 14.149C5.48233 14.742 6.19867 15.0385 7.0385 15.0385H10.8077V16.5385ZM8.25 12.75V11.25H15.75V12.75H8.25ZM13.1923 16.5385V15.0385H16.9615C17.8013 15.0385 18.5177 14.742 19.1105 14.149C19.7035 13.556 20 12.8397 20 12C20 11.1604 19.7035 10.444 19.1105 9.85105C18.5177 9.25805 17.8013 8.96155 16.9615 8.96155H13.1923V7.46155H16.9615C18.2172 7.46155 19.2875 7.90405 20.1725 8.78905C21.0575 9.67388 21.5 10.744 21.5 11.9995C21.5 13.255 21.0575 14.3254 20.1725 15.2105C19.2875 16.0959 18.2172 16.5385 16.9615 16.5385H13.1923Z",fill:"currentColor"})),add_photo:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M5.11537 20.5C4.6182 20.5 4.19262 20.323 3.83862 19.969C3.48462 19.615 3.30762 19.1894 3.30762 18.6922V5.30773C3.30762 4.81056 3.48462 4.38498 3.83862 4.03098C4.19262 3.67698 4.6182 3.49998 5.11537 3.49998H13.8076V4.99998H5.11537C5.02553 4.99998 4.95178 5.02881 4.89412 5.08648C4.83645 5.14415 4.80762 5.2179 4.80762 5.30773V18.6922C4.80762 18.7821 4.83645 18.8558 4.89412 18.9135C4.95178 18.9711 5.02553 19 5.11537 19H18.4999C18.5895 19 18.6633 18.9711 18.7211 18.9135C18.7788 18.8558 18.8076 18.7821 18.8076 18.6922V9.99998H20.3076V18.6922C20.3076 19.1894 20.1306 19.615 19.7766 19.969C19.4226 20.323 18.997 20.5 18.4999 20.5H5.11537ZM17.1921 8.61523V6.61523H15.1921V5.11548H17.1921V3.11548H18.6921V5.11548H20.6921V6.61523H18.6921V8.61523H17.1921ZM6.55762 16.75H17.1344L13.8459 12.3655L11.0384 16.0192L9.03837 13.4615L6.55762 16.75Z",fill:"currentColor"})),table:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M3.5 18.6923V5.30775C3.5 4.81058 3.677 4.385 4.031 4.031C4.385 3.677 4.81058 3.5 5.30775 3.5H18.6923C19.1894 3.5 19.615 3.677 19.969 4.031C20.323 4.385 20.5 4.81058 20.5 5.30775V18.6923C20.5 19.1894 20.323 19.615 19.969 19.969C19.615 20.323 19.1894 20.5 18.6923 20.5H5.30775C4.81058 20.5 4.385 20.323 4.031 19.969C3.677 19.615 3.5 19.1894 3.5 18.6923ZM5 9.077H19V5.30775C19 5.21792 18.9712 5.14417 18.9135 5.0865C18.8558 5.02883 18.7821 5 18.6923 5H5.30775C5.21792 5 5.14417 5.02883 5.0865 5.0865C5.02883 5.14417 5 5.21792 5 5.30775V9.077ZM10.1615 14.0385H13.8385V10.577H10.1615V14.0385ZM10.1615 19H13.8385V15.5385H10.1615V19ZM5 14.0385H8.6615V10.577H5V14.0385ZM15.3385 14.0385H19V10.577H15.3385V14.0385ZM5.30775 19H8.6615V15.5385H5V18.6923C5 18.7821 5.02883 18.8558 5.0865 18.9135C5.14417 18.9712 5.21792 19 5.30775 19ZM15.3385 19H18.6923C18.7821 19 18.8558 18.9712 18.9135 18.9135C18.9712 18.8558 19 18.7821 19 18.6923V15.5385H15.3385V19Z",fill:"currentColor"})),horizontal_rule:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),S.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),S.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),S.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),S.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),S.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M8.6 15.2443L5.35575 12L8.6 8.75575L9.64425 9.825L7.46925 12L9.64425 14.175L8.6 15.2443ZM15.4 15.2443L14.3558 14.175L16.5307 12L14.3558 9.825L15.4 8.75575L18.6443 12L15.4 15.2443ZM5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V15H5V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H9V20.5H5.30775ZM15 20.5V19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V15H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H15ZM3.5 9V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H9V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V9H3.5ZM19 9V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H15V3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V9H19Z",fill:"currentColor"})),arrow_drop_down:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M12.0001 21.4C11.7654 21.4 11.5385 21.3548 11.3193 21.2645C11.1002 21.174 10.9002 21.0435 10.7193 20.873L3.1271 13.2807C2.9566 13.0999 2.8261 12.8999 2.7356 12.6807C2.64526 12.4616 2.6001 12.2346 2.6001 12C2.6001 11.7653 2.64526 11.5358 2.7356 11.3115C2.8261 11.0871 2.9566 10.8897 3.1271 10.7192L10.7193 3.12698C10.9002 2.94614 11.1002 2.81314 11.3193 2.72798C11.5385 2.64264 11.7654 2.59998 12.0001 2.59998C12.2348 2.59998 12.4643 2.64264 12.6886 2.72798C12.9129 2.81314 13.1103 2.94614 13.2808 3.12698L20.8731 10.7192C21.0539 10.8897 21.1869 11.0871 21.2721 11.3115C21.3574 11.5358 21.4001 11.7653 21.4001 12C21.4001 12.2346 21.3574 12.4616 21.2721 12.6807C21.1869 12.8999 21.0539 13.0999 20.8731 13.2807L13.2808 20.873C13.1103 21.0435 12.9129 21.174 12.6886 21.2645C12.4643 21.3548 12.2348 21.4 12.0001 21.4ZM12.2213 19.8037L19.8039 12.2212C19.8552 12.1699 19.8808 12.0961 19.8808 12C19.8808 11.9038 19.8552 11.8301 19.8039 11.7787L12.2213 4.19623C12.17 4.14489 12.0963 4.11923 12.0001 4.11923C11.9039 4.11923 11.8302 4.14489 11.7788 4.19623L4.19635 11.7787C4.14501 11.8301 4.11935 11.9038 4.11935 12C4.11935 12.0961 4.14501 12.1699 4.19635 12.2212L11.7788 19.8037C11.8302 19.8551 11.9039 19.8807 12.0001 19.8807C12.0963 19.8807 12.17 19.8551 12.2213 19.8037ZM11.2501 13.0865H12.7501V7.47123H11.2501V13.0865ZM12.0001 15.702C12.2258 15.702 12.4168 15.6237 12.5731 15.4672C12.7296 15.3109 12.8078 15.1199 12.8078 14.8942C12.8078 14.6686 12.7296 14.4776 12.5731 14.3212C12.4168 14.1647 12.2258 14.0865 12.0001 14.0865C11.7744 14.0865 11.5834 14.1647 11.4271 14.3212C11.2706 14.4776 11.1923 14.6686 11.1923 14.8942C11.1923 15.1199 11.2706 15.3109 11.4271 15.4672C11.5834 15.6237 11.7744 15.702 12.0001 15.702Z",fill:"currentColor"})),sandpack:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M12.9999 22.5C12.4947 22.5 12.0671 22.325 11.7171 21.975C11.3671 21.625 11.1921 21.1974 11.1921 20.6922V7.30775C11.1921 6.80258 11.3671 6.375 11.7171 6.025C12.0671 5.675 12.4947 5.5 12.9999 5.5H16.3844C16.8895 5.5 17.3171 5.675 17.6671 6.025C18.0171 6.375 18.1921 6.80258 18.1921 7.30775V20.6922C18.1921 21.1974 18.0171 21.625 17.6671 21.975C17.3171 22.325 16.8895 22.5 16.3844 22.5H12.9999ZM12.6921 7.30775V20.6922C12.6921 20.7692 12.7242 20.8398 12.7884 20.9038C12.8524 20.9679 12.9229 21 12.9999 21H16.3844C16.4614 21 16.5319 20.9679 16.5959 20.9038C16.66 20.8398 16.6921 20.7692 16.6921 20.6922V7.30775C16.6921 7.23075 16.66 7.16025 16.5959 7.09625C16.5319 7.03208 16.4614 7 16.3844 7H12.9999C12.9229 7 12.8524 7.03208 12.7884 7.09625C12.7242 7.16025 12.6921 7.23075 12.6921 7.30775ZM6.61537 18.5C6.1102 18.5 5.68262 18.325 5.33262 17.975C4.98262 17.625 4.80762 17.1974 4.80762 16.6923V3.30775C4.80762 2.80258 4.98262 2.375 5.33262 2.025C5.68262 1.675 6.1102 1.5 6.61537 1.5H9.99987C10.505 1.5 10.9326 1.675 11.2826 2.025C11.6326 2.375 11.8076 2.80258 11.8076 3.30775V16.6923C11.8076 17.1974 11.6326 17.625 11.2826 17.975C10.9326 18.325 10.505 18.5 9.99987 18.5H6.61537ZM6.30762 3.30775V16.6923C6.30762 16.7692 6.3397 16.8398 6.40387 16.9038C6.46787 16.9679 6.53837 17 6.61537 17H9.99987C10.0769 17 10.1474 16.9679 10.2114 16.9038C10.2755 16.8398 10.3076 16.7692 10.3076 16.6923V3.30775C10.3076 3.23075 10.2755 3.16025 10.2114 3.09625C10.1474 3.03208 10.0769 3 9.99987 3H6.61537C6.53837 3 6.46787 3.03208 6.40387 3.09625C6.3397 3.16025 6.30762 3.23075 6.30762 3.30775Z",fill:"currentColor"})),rich_text:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19ZM6.75 17H17.3268L14 12.3655L11.2308 16.0192L9 13.4615L6.75 17Z",fill:"currentColor"}),S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12V6.5H9.1925C9.5925 6.5 9.9425 6.65 10.2425 6.95C10.5425 7.25 10.6925 7.6 10.6925 8V8.6925C10.6925 9.03733 10.605 9.32675 10.43 9.56075C10.255 9.79458 10.0168 9.97817 9.7155 10.1115L10.6155 12H9.404L8.504 10.1925H7.1925V12H6ZM9.1925 9H7.1925V7.6925H9.1925C9.26933 7.6925 9.33983 7.7245 9.404 7.7885C9.468 7.85267 9.5 7.92317 9.5 8V8.6925C9.5 8.76933 9.468 8.83983 9.404 8.904C9.33983 8.968 9.26933 9 9.1925 9Z",fill:"currentColor"}),S.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),S.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),S.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),S.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),S.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),S.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),S.createElement("path",{d:"M15.9921 15.5833L13.2886 12.8797L14.0546 12.1137L15.4504 13.5016V7.99597L16.5336 7.99993V13.5016L17.9296 12.1137L18.6954 12.8797L15.9921 15.5833Z",fill:"currentColor"})),open_in_new:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H11.6152V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V12.3848H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM9.71925 15.3345L8.6655 14.2808L17.9462 5H14V3.5H20.5V10H19V6.05375L9.71925 15.3345Z",fill:"currentColor"})),link_off:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M18.8843 16.1038L17.7498 14.9385C18.4228 14.7552 18.9661 14.3946 19.3796 13.8568C19.7931 13.319 19.9998 12.7 19.9998 12C19.9998 11.1604 19.705 10.444 19.1153 9.85105C18.5255 9.25805 17.8139 8.96155 16.9806 8.96155H13.1728V7.46155H16.9806C18.2293 7.46155 19.2947 7.90422 20.1768 8.78955C21.0588 9.67472 21.4998 10.7449 21.4998 12C21.4998 12.8859 21.262 13.6951 20.7863 14.4278C20.3107 15.1606 19.6767 15.7193 18.8843 16.1038ZM15.5806 12.75L14.0806 11.25H15.7306V12.75H15.5806ZM20.1461 22.2538L1.74609 3.8538L2.79984 2.80005L21.1998 21.2L20.1461 22.2538ZM10.8268 16.5386H7.03834C5.78318 16.5386 4.71301 16.0959 3.82784 15.2105C2.94251 14.3254 2.49984 13.2552 2.49984 12C2.49984 10.8885 2.85784 9.91322 3.57384 9.07405C4.28984 8.23505 5.18826 7.72838 6.26909 7.55405H6.49984L7.90759 8.96155H7.03834C6.19851 8.96155 5.48218 9.25805 4.88934 9.85105C4.29634 10.444 3.99984 11.1604 3.99984 12C3.99984 12.8397 4.29634 13.556 4.88934 14.149C5.48218 14.742 6.19851 15.0385 7.03834 15.0385H10.8268V16.5386ZM8.26909 12.75V11.25H10.2113L11.6863 12.75H8.26909Z",fill:"currentColor"})),edit:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M5 19H6.2615L16.498 8.7635L15.2365 7.502L5 17.7385V19ZM3.5 20.5V17.1155L16.6905 3.93075C16.8417 3.79342 17.0086 3.68733 17.1913 3.6125C17.3741 3.5375 17.5658 3.5 17.7663 3.5C17.9668 3.5 18.1609 3.53558 18.3488 3.60675C18.5367 3.67792 18.7032 3.79108 18.848 3.94625L20.0693 5.18275C20.2244 5.32758 20.335 5.49425 20.401 5.68275C20.467 5.87125 20.5 6.05975 20.5 6.24825C20.5 6.44942 20.4657 6.64133 20.397 6.824C20.3283 7.00683 20.2191 7.17383 20.0693 7.325L6.8845 20.5H3.5ZM15.8562 8.14375L15.2365 7.502L16.498 8.7635L15.8562 8.14375Z",fill:"currentColor"})),content_copy:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M9.05775 17.5C8.55258 17.5 8.125 17.325 7.775 16.975C7.425 16.625 7.25 16.1974 7.25 15.6923V4.30775C7.25 3.80258 7.425 3.375 7.775 3.025C8.125 2.675 8.55258 2.5 9.05775 2.5H17.4423C17.9474 2.5 18.375 2.675 18.725 3.025C19.075 3.375 19.25 3.80258 19.25 4.30775V15.6923C19.25 16.1974 19.075 16.625 18.725 16.975C18.375 17.325 17.9474 17.5 17.4423 17.5H9.05775ZM9.05775 16H17.4423C17.5192 16 17.5898 15.9679 17.6538 15.9038C17.7179 15.8398 17.75 15.7692 17.75 15.6923V4.30775C17.75 4.23075 17.7179 4.16025 17.6538 4.09625C17.5898 4.03208 17.5192 4 17.4423 4H9.05775C8.98075 4 8.91025 4.03208 8.84625 4.09625C8.78208 4.16025 8.75 4.23075 8.75 4.30775V15.6923C8.75 15.7692 8.78208 15.8398 8.84625 15.9038C8.91025 15.9679 8.98075 16 9.05775 16ZM5.55775 21C5.05258 21 4.625 20.825 4.275 20.475C3.925 20.125 3.75 19.6974 3.75 19.1923V6.30775H5.25V19.1923C5.25 19.2693 5.28208 19.3398 5.34625 19.4038C5.41025 19.4679 5.48075 19.5 5.55775 19.5H15.4423V21H5.55775Z",fill:"currentColor"})),more_horiz:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M6.23096 13.5C5.81846 13.5 5.46537 13.3531 5.17171 13.0592C4.87787 12.7656 4.73096 12.4125 4.73096 12C4.73096 11.5875 4.87787 11.2344 5.17171 10.9408C5.46537 10.6469 5.81846 10.5 6.23096 10.5C6.64346 10.5 6.99662 10.6469 7.29046 10.9408C7.58412 11.2344 7.73096 11.5875 7.73096 12C7.73096 12.4125 7.58412 12.7656 7.29046 13.0592C6.99662 13.3531 6.64346 13.5 6.23096 13.5ZM12.0002 13.5C11.5877 13.5 11.2346 13.3531 10.941 13.0592C10.6471 12.7656 10.5002 12.4125 10.5002 12C10.5002 11.5875 10.6471 11.2344 10.941 10.9408C11.2346 10.6469 11.5877 10.5 12.0002 10.5C12.4127 10.5 12.7658 10.6469 13.0595 10.9408C13.3533 11.2344 13.5002 11.5875 13.5002 12C13.5002 12.4125 13.3533 12.7656 13.0595 13.0592C12.7658 13.3531 12.4127 13.5 12.0002 13.5ZM17.7695 13.5C17.357 13.5 17.0038 13.3531 16.71 13.0592C16.4163 12.7656 16.2695 12.4125 16.2695 12C16.2695 11.5875 16.4163 11.2344 16.71 10.9408C17.0038 10.6469 17.357 10.5 17.7695 10.5C18.182 10.5 18.535 10.6469 18.8287 10.9408C19.1225 11.2344 19.2695 11.5875 19.2695 12C19.2695 12.4125 19.1225 12.7656 18.8287 13.0592C18.535 13.3531 18.182 13.5 17.7695 13.5Z",fill:"currentColor"})),more_vert:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M12 19.2692C11.5875 19.2692 11.2344 19.1223 10.9408 18.8285C10.6469 18.5348 10.5 18.1817 10.5 17.7692C10.5 17.3567 10.6469 17.0035 10.9408 16.7097C11.2344 16.416 11.5875 16.2692 12 16.2692C12.4125 16.2692 12.7656 16.416 13.0592 16.7097C13.3531 17.0035 13.5 17.3567 13.5 17.7692C13.5 18.1817 13.3531 18.5348 13.0592 18.8285C12.7656 19.1223 12.4125 19.2692 12 19.2692ZM12 13.5C11.5875 13.5 11.2344 13.353 10.9408 13.0592C10.6469 12.7655 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9407C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9407C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7655 13.0592 13.0592C12.7656 13.353 12.4125 13.5 12 13.5ZM12 7.73071C11.5875 7.73071 11.2344 7.58388 10.9408 7.29021C10.6469 6.99638 10.5 6.64321 10.5 6.23071C10.5 5.81821 10.6469 5.46513 10.9408 5.17146C11.2344 4.87763 11.5875 4.73071 12 4.73071C12.4125 4.73071 12.7656 4.87763 13.0592 5.17146C13.3531 5.46513 13.5 5.81821 13.5 6.23071C13.5 6.64321 13.3531 6.99638 13.0592 7.29021C12.7656 7.58388 12.4125 7.73071 12 7.73071Z",fill:"currentColor"})),close:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M6.39994 18.6538L5.34619 17.6L10.9462 12L5.34619 6.4L6.39994 5.34625L11.9999 10.9463L17.5999 5.34625L18.6537 6.4L13.0537 12L18.6537 17.6L17.5999 18.6538L11.9999 13.0538L6.39994 18.6538Z",fill:"currentColor"})),settings:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M9.69225 21.5L9.3115 18.4538C9.04367 18.3641 8.769 18.2385 8.4875 18.077C8.20617 17.9153 7.95459 17.7422 7.73275 17.5577L4.9115 18.75L2.604 14.75L5.04425 12.9058C5.02125 12.7571 5.00492 12.6077 4.99525 12.4578C4.98559 12.3078 4.98075 12.1583 4.98075 12.0095C4.98075 11.8673 4.98559 11.7228 4.99525 11.576C5.00492 11.4292 5.02125 11.2686 5.04425 11.0943L2.604 9.25L4.9115 5.26925L7.723 6.452C7.96417 6.261 8.22159 6.08633 8.49525 5.928C8.76892 5.76967 9.03784 5.64242 9.302 5.54625L9.69225 2.5H14.3078L14.6885 5.55575C14.9885 5.66475 15.2599 5.792 15.5028 5.9375C15.7458 6.083 15.991 6.2545 16.2385 6.452L19.0885 5.26925L21.396 9.25L18.9173 11.123C18.9531 11.2845 18.9727 11.4355 18.976 11.576C18.9792 11.7163 18.9808 11.8577 18.9808 12C18.9808 12.1358 18.9775 12.274 18.971 12.4145C18.9647 12.5548 18.9417 12.7154 18.902 12.8963L21.3615 14.75L19.0538 18.75L16.2385 17.548C15.991 17.7455 15.7384 17.9202 15.4808 18.072C15.2231 18.224 14.959 18.3481 14.6885 18.4443L14.3078 21.5H9.69225ZM11 20H12.9655L13.325 17.3212C13.8353 17.1879 14.3017 16.9985 14.724 16.753C15.1465 16.5073 15.5539 16.1916 15.9463 15.8057L18.4308 16.85L19.4155 15.15L17.2463 13.5155C17.3296 13.2565 17.3863 13.0026 17.4163 12.7537C17.4464 12.5051 17.4615 12.2538 17.4615 12C17.4615 11.7397 17.4464 11.4884 17.4163 11.2463C17.3863 11.0039 17.3296 10.7564 17.2463 10.5038L19.4345 8.85L18.45 7.15L15.9365 8.2095C15.6018 7.85183 15.2009 7.53583 14.7338 7.2615C14.2664 6.98717 13.7937 6.79292 13.3155 6.67875L13 4H11.0155L10.6845 6.66925C10.1743 6.78975 9.70325 6.97433 9.27125 7.223C8.83909 7.47183 8.42684 7.79233 8.0345 8.1845L5.55 7.15L4.5655 8.85L6.725 10.4595C6.64167 10.6968 6.58334 10.9437 6.55 11.2C6.51667 11.4563 6.5 11.7262 6.5 12.0095C6.5 12.2698 6.51667 12.525 6.55 12.775C6.58334 13.025 6.6385 13.2718 6.7155 13.5155L4.5655 15.15L5.55 16.85L8.025 15.8C8.4045 16.1897 8.81025 16.5089 9.24225 16.7578C9.67442 17.0064 10.152 17.1974 10.675 17.3307L11 20ZM12.0115 15C12.8435 15 13.5515 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.168 14.7195 10.46 14.1355 9.876C13.5515 9.292 12.8435 9 12.0115 9C11.1692 9 10.4586 9.292 9.87975 9.876C9.30092 10.46 9.0115 11.168 9.0115 12C9.0115 12.832 9.30092 13.54 9.87975 14.124C10.4586 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})),delete_big:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),delete_small:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),format_align_center:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM7.5 16.625V15.125H16.5V16.625H7.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM7.5 8.875V7.375H16.5V8.875H7.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_left:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM3.5 16.625V15.125H14.5V16.625H3.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM3.5 8.875V7.375H14.5V8.875H3.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_right:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M3.5 5V3.5H20.5V5H3.5ZM9.5 8.875V7.375H20.5V8.875H9.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM9.5 16.625V15.125H20.5V16.625H9.5ZM3.5 20.5V19H20.5V20.5H3.5Z",fill:"currentColor"})),add_row:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 10.2077C4.375 9.85775 4.80258 9.68275 5.30775 9.68275H6.5V11.1827H5.30775C5.21792 11.1827 5.14417 11.2116 5.0865 11.2693C5.02883 11.3269 5 11.4007 5 11.4905V16.1923C5 16.2821 5.02883 16.3558 5.0865 16.4135C5.14417 16.4712 5.21792 16.5 5.30775 16.5H18.6923C18.7821 16.5 18.8558 16.4712 18.9135 16.4135C18.9712 16.3558 19 16.2821 19 16.1923V11.4905C19 11.4007 18.9712 11.3269 18.9135 11.2693C18.8558 11.2116 18.7821 11.1827 18.6923 11.1827H17.6923V9.68275H18.6923C19.1974 9.68275 19.625 9.85775 19.975 10.2077C20.325 10.5577 20.5 10.9853 20.5 11.4905V16.1923C20.5 16.6974 20.325 17.125 19.975 17.475C19.625 17.825 19.1974 18 18.6923 18H5.30775C4.80258 18 4.375 17.825 4.025 17.475C3.675 17.125 3.5 16.6974 3.5 16.1923V11.4905C3.5 10.9853 3.675 10.5577 4.025 10.2077Z",fill:"currentColor"}),S.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70775 4.025C9.35775 4.375 9.18275 4.80258 9.18275 5.30775V6.5H10.6827V5.30775C10.6827 5.21792 10.7116 5.14417 10.7693 5.0865C10.8269 5.02883 10.9007 5 10.9905 5H15.6923C15.7821 5 15.8558 5.02883 15.9135 5.0865C15.9712 5.14417 16 5.21792 16 5.30775V18.6923C16 18.7821 15.9712 18.8558 15.9135 18.9135C15.8558 18.9712 15.7821 19 15.6923 19H10.9905C10.9007 19 10.8269 18.9712 10.7693 18.9135C10.7116 18.8558 10.6827 18.7821 10.6827 18.6923V17.6923H9.18275V18.6923C9.18275 19.1974 9.35775 19.625 9.70775 19.975C10.0577 20.325 10.4853 20.5 10.9905 20.5H15.6923C16.1974 20.5 16.625 20.325 16.975 19.975C17.325 19.625 17.5 19.1974 17.5 18.6923V5.30775C17.5 4.80258 17.325 4.375 16.975 4.025C16.625 3.675 16.1974 3.5 15.6923 3.5H10.9905C10.4853 3.5 10.0577 3.675 9.70775 4.025Z",fill:"currentColor"}),S.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M13.0001 20.1152H8.67713H8.75388H8.69238H13.0001ZM7.19238 19.8075C7.19238 20.3127 7.36738 20.7402 7.71738 21.0902C8.06738 21.4402 8.49497 21.6152 9.00013 21.6152H12.6924C13.1975 21.6152 13.6251 21.4402 13.9751 21.0902C14.3251 20.7402 14.5001 20.3127 14.5001 19.8075V10.423H13.0001V19.8075C13.0001 19.8973 12.9713 19.9711 12.9136 20.0287C12.856 20.0864 12.7822 20.1152 12.6924 20.1152H9.00013C8.9103 20.1152 8.83655 20.0864 8.77888 20.0287C8.72122 19.9711 8.69238 19.8973 8.69238 19.8075V4.69223C8.26422 4.74357 7.90722 4.93299 7.62138 5.26048C7.33538 5.58798 7.19238 5.97548 7.19238 6.42298V19.8075ZM13.0001 2.49998V4.61523H10.8846V6.11523H13.0001V8.23073H14.5001V6.11523H16.6154V4.61523H14.5001V2.49998H13.0001Z",fill:"currentColor"})),insert_row_above:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M20.1152 9.99987V14.3229V14.2461V14.3076V9.99987ZM19.8075 15.8076C20.3127 15.8076 20.7402 15.6326 21.0902 15.2826C21.4402 14.9326 21.6152 14.505 21.6152 13.9999V10.3076C21.6152 9.80245 21.4402 9.37487 21.0902 9.02487C20.7402 8.67487 20.3127 8.49987 19.8075 8.49987H10.423V9.99987H19.8075C19.8973 9.99987 19.9711 10.0287 20.0287 10.0864C20.0864 10.144 20.1152 10.2178 20.1152 10.3076V13.9999C20.1152 14.0897 20.0864 14.1635 20.0287 14.2211C19.9711 14.2788 19.8973 14.3076 19.8075 14.3076H4.69223C4.74357 14.7358 4.93299 15.0928 5.26048 15.3786C5.58798 15.6646 5.97548 15.8076 6.42298 15.8076H19.8075ZM2.49998 9.99987H4.61523V12.1154H6.11523V9.99987H8.23073V8.49987H6.11523V6.38462H4.61523V8.49987H2.49998V9.99987Z",fill:"currentColor"})),insert_row_below:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M20.1152 14.1924V9.86939V9.94614V9.88464V14.1924ZM19.8075 8.38464C20.3127 8.38464 20.7402 8.55964 21.0902 8.90964C21.4402 9.25964 21.6152 9.68723 21.6152 10.1924V13.8846C21.6152 14.3898 21.4402 14.8174 21.0902 15.1674C20.7402 15.5174 20.3127 15.6924 19.8075 15.6924H10.423V14.1924H19.8075C19.8973 14.1924 19.9711 14.1636 20.0287 14.1059C20.0864 14.0482 20.1152 13.9745 20.1152 13.8846V10.1924C20.1152 10.1026 20.0864 10.0288 20.0287 9.97114C19.9711 9.91348 19.8973 9.88464 19.8075 9.88464H4.69223C4.74357 9.45648 4.93299 9.09948 5.26048 8.81364C5.58798 8.52764 5.97548 8.38464 6.42298 8.38464H19.8075ZM2.49998 14.1924H4.61523V12.0769H6.11523V14.1924H8.23073V15.6924H6.11523V17.8076H4.61523V15.6924H2.49998V14.1924Z",fill:"currentColor"})),insert_col_right:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M10.8075 20.1152H15.1305H15.0537H15.1152H10.8075ZM16.6152 19.8075C16.6152 20.3127 16.4402 20.7402 16.0902 21.0902C15.7402 21.4402 15.3127 21.6152 14.8075 21.6152H11.1152C10.6101 21.6152 10.1825 21.4402 9.83248 21.0902C9.48248 20.7402 9.30748 20.3127 9.30748 19.8075V10.423H10.8075V19.8075C10.8075 19.8973 10.8363 19.9711 10.894 20.0287C10.9517 20.0864 11.0254 20.1152 11.1152 20.1152H14.8075C14.8973 20.1152 14.9711 20.0864 15.0287 20.0287C15.0864 19.9711 15.1152 19.8973 15.1152 19.8075V4.69223C15.5434 4.74357 15.9004 4.93299 16.1862 5.26048C16.4722 5.58798 16.6152 5.97548 16.6152 6.42298V19.8075ZM10.8075 2.49998V4.61523H12.923V6.11523H10.8075V8.23073H9.30748V6.11523H7.19223V4.61523H9.30748V2.49998H10.8075Z",fill:"currentColor"})),check:S.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S.createElement("path",{d:"M9.54983 17.6537L4.21533 12.3192L5.28433 11.25L9.54983 15.5155L18.7153 6.34998L19.7843 7.41923L9.54983 17.6537Z",fill:"currentColor"}))};function Ua(e,t){return Ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ua(e,t)}var $f={error:null},cw=function(e){var t,n;function r(){for(var o,s=arguments.length,l=new Array(s),a=0;a<s;a++)l[a]=arguments[a];return(o=e.call.apply(e,[this].concat(l))||this).state=$f,o.resetErrorBoundary=function(){for(var u,c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];o.props.onReset==null||(u=o.props).onReset.apply(u,d),o.reset()},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ua(t,n),r.getDerivedStateFromError=function(o){return{error:o}};var i=r.prototype;return i.reset=function(){this.setState($f)},i.componentDidCatch=function(o,s){var l,a;(l=(a=this.props).onError)==null||l.call(a,o,s)},i.componentDidUpdate=function(o,s){var l,a,u,c,d=this.state.error,f=this.props.resetKeys;d!==null&&s.error!==null&&((u=o.resetKeys)===void 0&&(u=[]),(c=f)===void 0&&(c=[]),u.length!==c.length||u.some(function(h,g){return!Object.is(h,c[g])}))&&((l=(a=this.props).onResetKeysChange)==null||l.call(a,o.resetKeys,f),this.reset())},i.render=function(){var o=this.state.error,s=this.props,l=s.fallbackRender,a=s.FallbackComponent,u=s.fallback;if(o!==null){var c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(N.isValidElement(u))return u;if(typeof l=="function")return l(c);if(a)return N.createElement(a,c);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(N.Component);function dw({children:e,onError:t}){return P.jsx(cw,{fallback:P.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const fw=({children:e})=>{const t=wt(Bn),n=S.useMemo(()=>[t,O5(null,uc)],[t]);return S.createElement(og.Provider,{value:n},e)},hw=()=>{const e=wn(),t=xt(UC),n=c=>{t({current:c})},[r,i,o,s,l,a,u]=nn(Pa,Ma,k1,S1,T1,Ra,E1);return S.createElement(S.Fragment,null,s.map((c,d)=>S.createElement(c,{key:d})),S.createElement(M1,{wrappers:l},S.createElement("div",{className:Ce(G.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},S.createElement(u9,{contentEditable:S.createElement("div",{ref:n},S.createElement(n9,{className:Ce(G.contentEditable,r),ariaLabel:e("contentArea.editableMarkdown","editable markdown"),spellCheck:i})),placeholder:S.createElement("div",{className:Ce(G.contentEditable,G.placeholder,r)},S.createElement("p",null,a)),ErrorBoundary:dw}))),o.map((c,d)=>S.createElement(c,{key:d})),u.map((c,d)=>S.createElement(c,{key:d})))},gw={listItemIndent:"one"},pw=e=>uw[e];function mw(e,t,n={}){let r=t;for(const[i,o]of Object.entries(n))r=r.replaceAll(`{{${i}}}`,String(o));return r}const M1=({wrappers:e,children:t})=>{if(e.length===0)return S.createElement(S.Fragment,null,t);const n=e[0];return S.createElement(n,null,S.createElement(M1,{wrappers:e.slice(1)},t))},xw=({children:e,className:t,overlayContainer:n})=>{const r=S.useRef(null),i=xt(ao);return S.useEffect(()=>{const o=document.createElement("div");return o.classList.add("mdxeditor-popup-container",G.editorRoot,G.popupContainer,...(t??"").trim().split(" ").filter(Boolean)),(n??document.body).appendChild(o),r.current=o,i(r),()=>{o.remove()}},[t,r,n,i]),S.createElement("div",{className:Ce("mdxeditor",G.editorRoot,G.editorWrapper,t)},e)},yw=({mdxRef:e})=>{const t=Cs();return S.useImperativeHandle(e,()=>({getMarkdown:()=>{const n=t.getValue(cs);return n==="source"||n==="diff"?t.getValue(ds):t.getValue(pr)},setMarkdown:n=>{t.pub(dc,n)},insertMarkdown:n=>{t.pub(y1,n)},focus:(n,r)=>{var i;(i=t.getValue(Bn))==null||i.focus(n,r)}}),[t]),null},bw=S.forwardRef((e,t)=>S.createElement(R5,{plugins:[qC({contentEditableClassName:e.contentEditableClassName??"",spellCheck:e.spellCheck??!0,initialMarkdown:e.markdown,onChange:e.onChange??Pr,onBlur:e.onBlur??Pr,toMarkdownOptions:e.toMarkdownOptions??gw,autoFocus:e.autoFocus??!1,placeholder:e.placeholder??"",readOnly:!!e.readOnly,iconComponentFor:e.iconComponentFor??pw,suppressHtmlProcessing:e.suppressHtmlProcessing??!1,onError:e.onError??Pr,translation:e.translation??mw,trim:e.trim??!0,lexicalTheme:e.lexicalTheme}),...e.plugins??[]]},S.createElement(xw,{className:e.className,overlayContainer:e.overlayContainer},S.createElement(fw,null,S.createElement(hw,null))),S.createElement(yw,{mdxRef:t}))),R1=typeof window<"u"&&typeof window.document.createElement<"u",fs=R1&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);function vw(e,t){return fs?e:t}const _w={testLexicalNode:Us,visitLexicalNode:({lexicalNode:e,actions:t})=>{const n=parseInt(e.getTag()[1],10);t.addAndStepInto("heading",{depth:n})}},Cw={testNode:"heading",visitNode:function({mdastNode:e,actions:t}){t.addAndStepInto(qt(`h${e.depth}`))}},ww=[48,49,50,51,52,53,54],O1=[1,2,3,4,5,6],kw={49:1,50:2,51:3,52:4,53:5,54:6},qs=te(O1,e=>{e.pub(w1,t=>t.registerCommand(_g,n=>{const{keyCode:r,ctrlKey:i,metaKey:o,altKey:s}=n;return ww.includes(r)&&vw(o,i)&&s?(n.preventDefault(),t.update(()=>{if(r===48)e.pub(us,()=>ve());else{const l=e.getValue(qs),a=kw[r];l.includes(a)||e.pub(us,()=>qt(`h${a}`))}}),!0):!1},Ie))}),Sw=Vt({init(e){e.pubIn({[ii]:"headings",[vn]:Cw,[zn]:so,[jn]:_w})},update(e,t){e.pub(qs,(t==null?void 0:t.allowedHeadingLevels)??O1)}});function Df(e,t){return e.getEditorState().read(()=>{const n=Fe(t);return n!==null&&n.isSelected()})}function $1(e){const[t]=rt(),[n,r]=N.useState(()=>Df(t,e));return N.useEffect(()=>{let i=!0;const o=t.registerUpdateListener(()=>{i&&r(Df(t,e))});return()=>{i=!1,o()}},[t,e]),[n,N.useCallback(i=>{t.update(()=>{let o=U();ze(o)||(o=Pu(),Be(o)),ze(o)&&(i?o.add(e):o.delete(e))})},[t,e]),N.useCallback(()=>{t.update(()=>{const i=U();ze(i)&&i.clear()})},[t])]}const D1=_n();function Ew({nodeKey:e}){const[t]=rt(),[n,r,i]=$1(e),o=N.useCallback(s=>{const l=U();return n&&ze(l)&&(s.preventDefault(),l.getNodes().forEach(a=>{Ys(a)&&a.remove()})),!1},[n]);return N.useEffect(()=>ht(t.registerCommand(Es,s=>{const l=t.getElementByKey(e);return s.target===l&&(s.shiftKey||i(),r(!n),!0)},Ie),t.registerCommand(Ns,o,Ie),t.registerCommand(As,o,Ie)),[i,t,n,e,o,r]),N.useEffect(()=>{const s=t.getElementByKey(e),l=t._config.theme.hrSelected??"selected";s!==null&&(n?$t(s,l):zs(s,l))},[t,n,e]),null}let uo=class V1 extends to{static getType(){return"horizontalrule"}static clone(t){return new V1(t.__key)}static importJSON(t){return oi().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:Tw,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(t){const n=document.createElement("hr");return $t(n,t.theme.hr),n}getTextContent(){return`
|
|
68
|
+
`}isInline(){return!1}updateDOM(){return!1}decorate(){return P.jsx(Ew,{nodeKey:this.__key})}};function Tw(){return{node:oi()}}function oi(){return ft(new uo)}function Ys(e){return e instanceof uo}function Iw(){const[e]=rt();return N.useEffect(()=>e.registerCommand(D1,t=>{const n=U();if(!D(n))return!1;if(n.focus.getNode()!==null){const r=oi();hp(r)}return!0},ge),[e]),null}const Aw={testLexicalNode:Ys,visitLexicalNode({actions:e}){e.addAndStepInto("thematicBreak")}},Nw={testNode:"thematicBreak",visitNode({actions:e}){e.addAndStepInto(oi())}},Lw=$n(e=>{e.sub(e.pipe(Lw,Pe(Ve)),([,t])=>{t==null||t.dispatchCommand(D1,void 0)})}),Fw=Vt({init(e){e.pubIn({[ii]:"thematicBreak",[vn]:Nw,[zn]:uo,[jn]:Aw,[_r]:Iw})}});function Kt(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Wa(e){let t=1,n=e.getParent();for(;n!=null;){if(me(n)){const r=n.getParent();if(ae(r)){t++,n=r.getParent();continue}Kt(40)}return t}return t}function Ja(e){let t=e.getParent();ae(t)||Kt(40);let n=t;for(;n!==null;)n=n.getParent(),ae(n)&&(t=n);return t}function H1(e){let t=[];const n=e.getChildren().filter(me);for(let r=0;r<n.length;r++){const i=n[r],o=i.getFirstChild();ae(o)?t=t.concat(H1(o)):t.push(i)}return t}function Zt(e){return me(e)&&ae(e.getFirstChild())}function Vf(e){return nt().append(e)}function B1(e,t){return me(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function Ka(e){const t=U();if(t!==null){let n=t.getNodes();if(D(t)){const i=t.getStartEndPoints();i===null&&Kt(143);const[o]=i,s=o.getNode(),l=s.getParent();if(Me(s)){const a=s.getFirstChild();if(a)n=a.selectStart().getNodes();else{const u=ve();s.append(u),n=u.select().getNodes()}}else if(B1(s,n)){const a=tt(e);if(Me(l)){s.replace(a);const u=nt();O(s)&&(u.setFormat(s.getFormatType()),u.setIndent(s.getIndent())),a.append(u)}else if(me(s)){const u=s.getParentOrThrow();mr(a,u.getChildren()),u.replace(a)}return}}const r=new Set;for(let i=0;i<n.length;i++){const o=n[i];if(!O(o)||!o.isEmpty()||me(o)||r.has(o.getKey())){if(Kg(o)){let s=o.getParent();for(;s!=null;){const l=s.getKey();if(ae(s)){if(!r.has(l)){const a=tt(e);mr(a,s.getChildren()),s.replace(a),r.add(l)}break}{const a=s.getParent();if(Me(a)&&!r.has(l)){r.add(l),Hf(s,e);break}s=a}}}}else Hf(o,e)}}}function mr(e,t){e.splice(e.getChildrenSize(),0,t)}function Hf(e,t){if(ae(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=nt();let o;if(mr(i,e.getChildren()),ae(n)&&t===n.getListType())n.append(i),ae(r)&&t===r.getListType()&&(mr(n,r.getChildren()),r.remove()),o=n;else if(ae(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const s=tt(t);s.append(i),e.replace(s),o=s}return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),e.remove(),o}function gc(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&Zt(n)&&Zt(r)&&(gc(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function Pw(){const e=U();if(D(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(B1(r,n))t.add(Ja(r));else for(let i=0;i<n.length;i++){const o=n[i];if(Kg(o)){const s=fp(o,zt);s!=null&&t.add(Ja(s))}}for(const i of t){let o=i;const s=H1(i);for(const l of s){const a=ve().setTextStyle(e.style).setTextFormat(e.format);mr(a,l.getChildren()),o.insertAfter(a),o=a,l.__key===e.anchor.key&&gr(e.anchor,Ct(tn(a,"next"))),l.__key===e.focus.key&&gr(e.focus,Ct(tn(a,"next"))),l.remove()}i.remove()}}}function Mw(e){const t=new Set;if(Zt(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(Zt(r)&&Zt(i)){const o=i.getFirstChild();if(ae(o)){o.append(e);const s=r.getFirstChild();ae(s)&&(mr(o,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(Zt(r)){const o=r.getFirstChild();if(ae(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(e)}}else if(Zt(i)){const o=i.getFirstChild();ae(o)&&o.append(e)}else if(ae(n)){const o=nt().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()),s=tt(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());o.append(s),s.append(e),i?i.insertAfter(o):r?r.insertBefore(o):n.append(o)}}function Rw(e){if(Zt(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(ae(n?n.getParent():void 0)&&me(n)&&ae(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const o=t.getListType(),s=nt(),l=tt(o);s.append(l),e.getPreviousSiblings().forEach(c=>l.append(c));const a=nt(),u=tt(o);a.append(u),mr(u,e.getNextSiblings()),n.insertBefore(s),n.insertAfter(a),n.replace(e)}}}function Ow(){const e=U();if(!D(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!me(t)||t.getChildrenSize()!==0)return!1;const n=Ja(t),r=t.getParent();ae(r)||Kt(40);const i=r.getParent();let o;if(Me(i))o=ve(),n.insertAfter(o);else{if(!me(i))return!1;o=nt(),i.insertAfter(o)}o.setTextStyle(e.style).setTextFormat(e.format).select();const s=t.getNextSiblings();if(s.length>0){const l=tt(r.getListType());if(me(o)){const a=nt();a.append(l),o.insertAfter(a)}else o.insertAfter(l);l.append(...s)}return function(l){let a=l;for(;a.getNextSibling()==null&&a.getPreviousSibling()==null;){const u=a.getParent();if(u==null||!me(u)&&!ae(u))break;a=u}a.remove()}(t),!0}function hs(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}class zt extends Bt{static getType(){return"listitem"}static clone(t){return new zt(t.__value,t.__checked,t.__key)}constructor(t,n,r){super(r),this.__value=t===void 0?1:t,this.__checked=n}createDOM(t){const n=document.createElement("li"),r=this.getParent();ae(r)&&r.getListType()==="check"&&zf(n,this,null),n.value=this.__value,Bf(n,t.theme,this);const i=this.__style||this.__textStyle;return i&&(n.style.cssText=i),n}updateDOM(t,n,r){const i=this.getParent();ae(i)&&i.getListType()==="check"&&zf(n,this,t),n.value=this.__value,Bf(n,r.theme,this);const o=t.__style||t.__textStyle,s=this.__style||this.__textStyle;return o!==s&&(n.style.cssText=s,s===""&&n.removeAttribute("style")),!1}static transform(){return t=>{if(me(t)||Kt(144),t.__checked==null)return;const n=t.getParent();ae(n)&&n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:$w,priority:0})}}static importJSON(t){return nt().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const n=this.createDOM(t._config);n.style.textAlign=this.getFormatType();const r=this.getDirection();return r&&(n.dir=r),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(O(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(t,n){if(me(t))return super.replace(t);this.setIndent(0);const r=this.getParentOrThrow();if(!ae(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{const i=tt(r.getListType());let o=this.getNextSibling();for(;o;){const s=o;o=o.getNextSibling(),i.append(s)}r.insertAfter(t),t.insertAfter(i)}return n&&(O(t)||Kt(139),this.getChildren().forEach(i=>{t.append(i)})),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){const r=this.getParentOrThrow();if(ae(r)||Kt(39),me(t))return super.insertAfter(t,n);const i=this.getNextSiblings();if(r.insertAfter(t,n),i.length!==0){const o=tt(r.getListType());i.forEach(s=>o.append(s)),t.insertAfter(o,n)}return t}remove(t){const n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&Zt(n)&&Zt(r)&&(gc(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(t,n=!0){const r=nt().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,n),r}collapseAtStart(t){const n=ve();this.getChildren().forEach(s=>n.append(s));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),o=me(i);if(r.getChildrenSize()===1)if(o)r.remove(),i.select();else{r.insertBefore(n),r.remove();const s=t.anchor,l=t.focus,a=n.getKey();s.type==="element"&&s.getNode().is(this)&&s.set(a,s.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(a,l.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(t){const n=this.getWritable();return n.__value=t,n}getChecked(){const t=this.getLatest();let n;const r=this.getParent();return ae(r)&&(n=r.getListType()),n==="check"?!!t.__checked:void 0}setChecked(t){const n=this.getWritable();return n.__checked=t,n}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let n=t.getParentOrThrow(),r=0;for(;me(n);)n=n.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(t){typeof t!="number"&&Kt(117),(t=Math.floor(t))>=0||Kt(199);let n=this.getIndent();for(;n!==t;)n<t?(Mw(this),n++):(Rw(this),n--);return this}canInsertAfter(t){return me(t)}canReplaceWith(t){return me(t)}canMergeWith(t){return me(t)||Vu(t)}extractWithChild(t,n){if(!D(n))return!1;const r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return tt("bullet")}canMergeWhenEmpty(){return!0}}function Bf(e,t,n){const r=[],i=[],o=t.list,s=o?o.listitem:void 0;let l;if(o&&o.nested&&(l=o.nested.listitem),s!==void 0&&r.push(...hs(s)),o){const a=n.getParent(),u=ae(a)&&a.getListType()==="check",c=n.getChecked();u&&!c||i.push(o.listitemUnchecked),u&&c||i.push(o.listitemChecked),u&&r.push(c?o.listitemChecked:o.listitemUnchecked)}if(l!==void 0){const a=hs(l);n.getChildren().some(u=>ae(u))?r.push(...a):i.push(...a)}i.length>0&&zs(e,...i),r.length>0&&$t(e,...r)}function zf(e,t,n,r){ae(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function $w(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return Dw(n)}const t=e.getAttribute("aria-checked");return{node:nt(t==="true"||t!=="false"&&void 0)}}function Dw(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:nt(e.hasAttribute("checked"))}}function nt(e){return ft(new zt(void 0,e))}function me(e){return e instanceof zt}class on extends Bt{static getType(){return"list"}static clone(t){const n=t.__listType||Wf[t.__tag];return new on(n,t.__start,t.__key)}constructor(t="number",n=1,r){super(r);const i=Wf[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(t){const n=this.getWritable();return n.__listType=t,n.__tag=t==="number"?"ol":"ul",n}getListType(){return this.__listType}getStart(){return this.__start}setStart(t){const n=this.getWritable();return n.__start=t,n}createDOM(t,n){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,jf(i,t.theme,this),i}updateDOM(t,n,r){return t.__tag!==this.__tag||(jf(n,r.theme,this),!1)}static transform(){return t=>{ae(t)||Kt(163),function(n){const r=n.getNextSibling();ae(r)&&n.getListType()===r.getListType()&&gc(n,r)}(t),function(n){const r=n.getListType()!=="check";let i=n.getStart();for(const o of n.getChildren())me(o)&&(o.getValue()!==i&&o.setValue(i),r&&o.getLatest().__checked!=null&&o.setChecked(void 0),ae(o.getFirstChild())||i++)}(t)}}static importDOM(){return{ol:()=>({conversion:Uf,priority:0}),ul:()=>({conversion:Uf,priority:0})}}static importJSON(t){return tt().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const n=this.createDOM(t._config,t);return $e(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(me(r))super.append(r);else{const i=nt();if(ae(r))i.append(r);else if(O(r))if(r.isInline())i.append(r);else{const o=Ne(r.getTextContent());i.append(o)}else i.append(r);super.append(i)}}return this}extractWithChild(t){return me(t)}}function jf(e,t,n){const r=[],i=[],o=t.list;if(o!==void 0){const s=o[`${n.__tag}Depth`]||[],l=Wa(n)-1,a=l%s.length,u=s[a],c=o[n.__tag];let d;const f=o.nested,h=o.checklist;if(f!==void 0&&f.list&&(d=f.list),c!==void 0&&r.push(c),h!==void 0&&n.__listType==="check"&&r.push(h),u!==void 0){r.push(...hs(u));for(let g=0;g<s.length;g++)g!==a&&i.push(n.__tag+g)}if(d!==void 0){const g=hs(d);l>1?r.push(...g):i.push(...g)}}i.length>0&&zs(e,...i),r.length>0&&$t(e,...r)}function Vw(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(me(r)){t.push(r);const i=r.getChildren();i.length>1&&i.forEach(o=>{ae(o)&&t.push(Vf(o))})}else t.push(Vf(r))}return t}function Uf(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=tt("number",e.start):t==="ul"&&(n=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list"))return!0;for(const i of r.childNodes)if($e(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(e)?tt("check"):tt("bullet")),{after:Vw,node:n}}const Wf={ol:"number",ul:"bullet"};function tt(e="number",t=1){return ft(new on(e,t))}function ae(e){return e instanceof on}const z1=_n(),j1=_n(),U1=_n(),W1=_n();function Hw(e){return ht(e.registerCommand(j1,()=>(Ka("number"),!0),Ie),e.registerCommand(z1,()=>(Ka("bullet"),!0),Ie),e.registerCommand(W1,()=>(Pw(),!0),Ie),e.registerCommand(Di,()=>Ow(),Ie),e.registerNodeTransform(zt,t=>{const n=t.getFirstChild();if(n){if(J(n)){const r=n.getStyle(),i=n.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==i&&t.setTextFormat(i)}}else{const r=U();D(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),e.registerNodeTransform(rn,t=>{const n=t.getParent();if(me(n)&&t.is(n.getFirstChild())){const r=t.getStyle(),i=t.getFormat();r===n.getTextStyle()&&i===n.getTextFormat()||n.setTextStyle(r).setTextFormat(i)}}))}function Bw(e,t){e.update(()=>Ka(t))}const zw={testNode:"list",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){const r=e.children.some(o=>typeof o.checked=="boolean")?"check":e.ordered?"number":"bullet",i=tt(r);if(me(t)){const o=nt();o.append(i),t.insertAfter(o)}else t.append(i);n.visitChildren(e,i)}},jw={testNode:"listItem",visitNode({mdastNode:e,actions:t,lexicalParent:n}){const r=n.getListType()==="check"?e.checked??!1:void 0;t.addAndStepInto(nt(r))}},Uw={testLexicalNode:ae,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("list",{ordered:e.getListType()==="number",spread:!1})}},Ww={testLexicalNode:me,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getChildren(),i=r[0];if(r.length===1&&ae(i)){const o=t.children.at(-1);o?n.visitChildren(e,o):n.visitChildren(i,t)}else{const o=e.getParent(),s=n.appendToParent(t,{type:"listItem",checked:o.getListType()==="check"?!!e.getChecked():void 0,spread:!1,children:[]});let l=null;for(const a of e.getChildren())J(a)||Mt(a)||a.isInline()&&(O(a)||xe(a))?(l||(l=n.appendToParent(s,{type:"paragraph",children:[]})),n.visit(a,l)):(l=null,n.visit(a,s))}}};function Jw(e,t){return ht(e.registerCommand(Tu,n=>{const r=U();if(!D(r))return!1;n.preventDefault();const i=function(o){const s=o.getNodes();if(p2(s,f=>Qo(f)&&f.canIndent()?f:null).length>0)return!0;const l=o.anchor,a=o.focus,u=a.isBefore(l)?a:l,c=u.getNode(),d=_a(c);if(d.canIndent()){const f=d.getKey();let h=Qi();if(h.anchor.set(f,0,"element"),h.focus.set(f,0,"element"),h=ur(h),h.anchor.is(u))return!0}return!1}(r)?n.shiftKey?sa:Yo:wg;return e.dispatchCommand(i,void 0)},ge),e.registerCommand(Yo,()=>{if(t==null)return!1;const n=U();if(!D(n))return!1;const r=n.getNodes().map(i=>_a(i).getIndent());return Math.max(...r)+1>=t},bn))}function Jf({maxIndent:e}){const[t]=rt();return N.useEffect(()=>Jw(t,e),[t,e]),null}function Kf(){const[e]=rt();return N.useEffect(()=>ht(e.registerCommand(U1,()=>(Bw(e,"check"),!0),Ie),e.registerCommand(Su,t=>qf(t,e,!1),Ie),e.registerCommand(ku,t=>qf(t,e,!0),Ie),e.registerCommand(qi,t=>{if(Za()!=null){const n=e.getRootElement();return n!=null&&n.focus(),!0}return!1},Ie),e.registerCommand(Eu,t=>{const n=Za();return!(n==null||!e.isEditable())&&(e.update(()=>{const r=en(n);me(r)&&(t.preventDefault(),r.toggleChecked())}),!0)},Ie),e.registerCommand(wu,t=>e.getEditorState().read(()=>{const n=U();if(D(n)&&n.isCollapsed()){const{anchor:r}=n,i=r.type==="element";if(i||r.offset===0){const o=r.getNode(),s=Vn(o,l=>O(l)&&!l.isInline());if(me(s)){const l=s.getParent();if(ae(l)&&l.getListType()==="check"&&(i||s.getFirstDescendant()===o)){const a=e.getElementByKey(s.__key);if(a!=null&&document.activeElement!==a)return a.focus(),t.preventDefault(),!0}}}}return!1}),Ie),e.registerRootListener((t,n)=>{t!==null&&(t.addEventListener("click",Zf),t.addEventListener("pointerdown",Gf)),n!==null&&(n.removeEventListener("click",Zf),n.removeEventListener("pointerdown",Gf))}))),null}function J1(e,t){const n=e.target;if(!$e(n))return;const r=n.firstChild;if($e(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const i=n.parentNode;if(!i||i.__lexicalListType!=="check")return;const o=n.getBoundingClientRect(),s=e.pageX/m2(n);(n.dir==="rtl"?s<o.right&&s>o.right-20:s>o.left&&s<o.left+20)&&t()}function Zf(e){J1(e,()=>{if($e(e.target)){const t=e.target,n=zu(t);n!=null&&n.isEditable()&&n.update(()=>{const r=en(t);me(r)&&(t.focus(),r.toggleChecked())})}})}function Gf(e){J1(e,()=>{e.preventDefault()})}function Za(){const e=document.activeElement;return $e(e)&&e.tagName==="LI"&&e.parentNode!=null&&e.parentNode.__lexicalListType==="check"?e:null}function qf(e,t,n){const r=Za();return r!=null&&t.update(()=>{const i=en(r);if(!me(i))return;const o=function(s,l){let a=l?s.getPreviousSibling():s.getNextSibling(),u=s;for(;a==null&&me(u);)u=u.getParentOrThrow().getParent(),u!=null&&(a=l?u.getPreviousSibling():u.getNextSibling());for(;me(a);){const c=l?a.getLastChild():a.getFirstChild();if(!ae(c))return a;a=l?c.getLastChild():c.getFirstChild()}return null}(i,n);if(o!=null){o.selectStart();const s=t.getElementByKey(o.__key);s!=null&&(e.preventDefault(),setTimeout(()=>{s.focus()},0))}}),!1}function Yf(){const[e]=rt();return N.useEffect(()=>{if(!e.hasNodes([on,zt]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),function(t){N.useEffect(()=>Hw(t),[t])}(e),null}const Kw={name:"tasklistCheck",tokenize:Gw};function Zw(){return{text:{91:Kw}}}function Gw(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return De(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return re(a)?t(a):pe(a)?e.check({tokenize:qw},t,n)(a):n(a)}}function qw(e,t,n){return be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Yw(){return{exit:{taskListCheckValueChecked:Xf,taskListCheckValueUnchecked:Xf,paragraph:Qw}}}function Xw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:e3}}}function Xf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Qw(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function e3(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let a=zp.listItem(e,t,n,{...r,...l.current()});return o&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(c){return c+s}}const t3=new Map([["number",j1],["bullet",z1],["check",U1],["",W1]]),Qf=te("",e=>{e.sub(e.pipe(Kr,Pe(Ve)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:Vn(r,l=>{const a=l.getParent();return a!==null&&Me(a)});i===null&&(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null)if(ae(i)){const l=fp(r,on),a=l?l.getListType():i.getListType();e.pub(Qf,a)}else e.pub(Qf,"")})}),n3=We(e=>{e.sub(e.pipe(n3,Pe(Ve)),([t,n])=>{n==null||n.dispatchCommand(t3.get(t),void 0)})}),r3=Vt({init(e){var t;(t=e.getValue(Bn))==null||t.registerCommand(Yo,()=>!o3(7),bn),e.pubIn({[ii]:"lists",[Ha]:Yw(),[Va]:Zw(),[vn]:[zw,jw],[zn]:[zt,on],[jn]:[Uw,Ww],[x1]:Xw(),[_r]:[Jf,Yf,Kf],[I1]:[Jf,Yf,Kf]})}});function i3(e){const t=e.getNodes();return t.length===0?new Set([e.anchor.getNode().getParentOrThrow(),e.focus.getNode().getParentOrThrow()]):new Set(t.map(n=>O(n)?n:n.getParentOrThrow()))}function o3(e){const t=U();if(!D(t))return!1;const n=i3(t);let r=0;for(const i of n)if(ae(i))r=Math.max(Wa(i)+1,r);else if(me(i)){const o=i.getParent();if((o==null?void 0:o.getChildren().length)===1){const s=o.getParent();if(me(s)&&s.getChildren().length===1)return!1}if(!ae(o))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(Wa(o)+1,r)}return r<=e}var Xs="Popover",[K1,Rk]=qr(Xs,[vs]),co=vs(),[s3,Wn]=K1(Xs),Z1=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,l=co(t),a=N.useRef(null),[u,c]=N.useState(!1),[d,f]=sr({prop:r,defaultProp:i??!1,onChange:o,caller:Xs});return P.jsx(Dh,{...l,children:P.jsx(s3,{scope:t,contentId:Ki(),triggerRef:a,open:d,onOpenChange:f,onOpenToggle:N.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:u,onCustomAnchorAdd:N.useCallback(()=>c(!0),[]),onCustomAnchorRemove:N.useCallback(()=>c(!1),[]),modal:s,children:n})})};Z1.displayName=Xs;var G1="PopoverAnchor",q1=N.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Wn(G1,n),o=co(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return N.useEffect(()=>(s(),()=>l()),[s,l]),P.jsx(hu,{...o,...r,ref:t})});q1.displayName=G1;var Y1="PopoverTrigger",l3=N.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Wn(Y1,n),o=co(n),s=at(t,i.triggerRef),l=P.jsx(Re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rm(i.open),...r,ref:s,onClick:ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:P.jsx(hu,{asChild:!0,...o,children:l})});l3.displayName=Y1;var pc="PopoverPortal",[a3,u3]=K1(pc,{forceMount:void 0}),X1=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Wn(pc,t);return P.jsx(a3,{scope:t,forceMount:n,children:P.jsx(Qh,{present:n||o.open,children:P.jsx(Vh,{asChild:!0,container:i,children:r})})})};X1.displayName=pc;var Zr="PopoverContent",Q1=N.forwardRef((e,t)=>{const n=u3(Zr,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Wn(Zr,e.__scopePopover);return P.jsx(Qh,{present:r||o.open,children:o.modal?P.jsx(d3,{...i,ref:t}):P.jsx(f3,{...i,ref:t})})});Q1.displayName=Zr;var c3=Bo("PopoverContent.RemoveScroll"),d3=N.forwardRef((e,t)=>{const n=Wn(Zr,e.__scopePopover),r=N.useRef(null),i=at(t,r),o=N.useRef(!1);return N.useEffect(()=>{const s=r.current;if(s)return Bh(s)},[]),P.jsx(zh,{as:c3,allowPinchZoom:!0,children:P.jsx(em,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),o.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ye(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0,u=l.button===2||a;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:ye(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),f3=N.forwardRef((e,t)=>{const n=Wn(Zr,e.__scopePopover),r=N.useRef(!1),i=N.useRef(!1);return P.jsx(em,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),em=N.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:c,...d}=e,f=Wn(Zr,n),h=co(n);return jh(),P.jsx(Uh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:P.jsx(Wh,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:P.jsx(Jh,{"data-state":rm(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),tm="PopoverClose",h3=N.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Wn(tm,n);return P.jsx(Re.button,{type:"button",...r,ref:t,onClick:ye(e.onClick,()=>i.onOpenChange(!1))})});h3.displayName=tm;var g3="PopoverArrow",nm=N.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=co(n);return P.jsx(Hh,{...i,...r,ref:t})});nm.displayName=g3;function rm(e){return e?"open":"closed"}var p3=Z1,m3=q1,x3=X1,y3=Q1,b3=nm;function im(e){const t=e+"CollectionProvider",[n,r]=qr(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:b,children:y}=x,m=S.useRef(null),p=S.useRef(new Map).current;return P.jsx(i,{scope:b,itemMap:p,collectionRef:m,children:y})};s.displayName=t;const l=e+"CollectionSlot",a=Bo(l),u=S.forwardRef((x,b)=>{const{scope:y,children:m}=x,p=o(l,y),v=at(b,p.collectionRef);return P.jsx(a,{ref:v,children:m})});u.displayName=l;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Bo(c),h=S.forwardRef((x,b)=>{const{scope:y,children:m,...p}=x,v=S.useRef(null),k=at(b,v),_=o(c,y);return S.useEffect(()=>(_.itemMap.set(v,{ref:v,...p}),()=>void _.itemMap.delete(v))),P.jsx(f,{[d]:"",ref:k,children:m})});h.displayName=c;function g(x){const b=o(e+"CollectionConsumer",x);return S.useCallback(()=>{const m=b.collectionRef.current;if(!m)return[];const p=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((_,C)=>p.indexOf(_.ref.current)-p.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},g,r]}var v3=N.createContext(void 0);function Qs(e){const t=N.useContext(v3);return e||t||"ltr"}var Rl="rovingFocusGroup.onEntryFocus",_3={bubbles:!1,cancelable:!0},fo="RovingFocusGroup",[Ga,om,C3]=im(fo),[w3,el]=qr(fo,[C3]),[k3,S3]=w3(fo),sm=N.forwardRef((e,t)=>P.jsx(Ga.Provider,{scope:e.__scopeRovingFocusGroup,children:P.jsx(Ga.Slot,{scope:e.__scopeRovingFocusGroup,children:P.jsx(E3,{...e,ref:t})})}));sm.displayName=fo;var E3=N.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=N.useRef(null),h=at(t,f),g=Qs(o),[x,b]=sr({prop:s,defaultProp:l??null,onChange:a,caller:fo}),[y,m]=N.useState(!1),p=Kh(u),v=om(n),k=N.useRef(!1),[_,C]=N.useState(0);return N.useEffect(()=>{const w=f.current;if(w)return w.addEventListener(Rl,p),()=>w.removeEventListener(Rl,p)},[p]),P.jsx(k3,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:x,onItemFocus:N.useCallback(w=>b(w),[b]),onItemShiftTab:N.useCallback(()=>m(!0),[]),onFocusableItemAdd:N.useCallback(()=>C(w=>w+1),[]),onFocusableItemRemove:N.useCallback(()=>C(w=>w-1),[]),children:P.jsx(Re.div,{tabIndex:y||_===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:ye(e.onMouseDown,()=>{k.current=!0}),onFocus:ye(e.onFocus,w=>{const T=!k.current;if(w.target===w.currentTarget&&T&&!y){const F=new CustomEvent(Rl,_3);if(w.currentTarget.dispatchEvent(F),!F.defaultPrevented){const M=v().filter(q=>q.focusable),R=M.find(q=>q.active),L=M.find(q=>q.id===x),B=[R,L,...M].filter(Boolean).map(q=>q.ref.current);um(B,c)}}k.current=!1}),onBlur:ye(e.onBlur,()=>m(!1))})})}),lm="RovingFocusGroupItem",am=N.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:s,...l}=e,a=Ki(),u=o||a,c=S3(lm,n),d=c.currentTabStopId===u,f=om(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:x}=c;return N.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),P.jsx(Ga.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:P.jsx(Re.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...l,ref:t,onMouseDown:ye(e.onMouseDown,b=>{r?c.onItemFocus(u):b.preventDefault()}),onFocus:ye(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:ye(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){c.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=A3(b,c.orientation,c.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let p=f().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")p.reverse();else if(y==="prev"||y==="next"){y==="prev"&&p.reverse();const v=p.indexOf(b.currentTarget);p=c.loop?N3(p,v+1):p.slice(v+1)}setTimeout(()=>um(p))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:x!=null}):s})})});am.displayName=lm;var T3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function I3(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function A3(e,t,n){const r=I3(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return T3[r]}function um(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function N3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var cm=sm,mc=am,dm="Toggle",fm=N.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...o}=e,[s,l]=sr({prop:n,onChange:i,defaultProp:r??!1,caller:dm});return P.jsx(Re.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:ye(e.onClick,()=>{e.disabled||l(!s)})})});fm.displayName=dm;var Jn="ToggleGroup",[hm,gm]=qr(Jn,[el]),pm=el(),xc=S.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return P.jsx(L3,{...i,ref:t})}if(n==="multiple"){const i=r;return P.jsx(F3,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Jn}\``)});xc.displayName=Jn;var[mm,xm]=hm(Jn),L3=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,l]=sr({prop:n,defaultProp:r??"",onChange:i,caller:Jn});return P.jsx(mm,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:P.jsx(ym,{...o,ref:t})})}),F3=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,l]=sr({prop:n,defaultProp:r??[],onChange:i,caller:Jn}),a=S.useCallback(c=>l((d=[])=>[...d,c]),[l]),u=S.useCallback(c=>l((d=[])=>d.filter(f=>f!==c)),[l]);return P.jsx(mm,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:a,onItemDeactivate:u,children:P.jsx(ym,{...o,ref:t})})});xc.displayName=Jn;var[P3,M3]=hm(Jn),ym=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:l=!0,...a}=e,u=pm(n),c=Qs(s),d={role:"group",dir:c,...a};return P.jsx(P3,{scope:n,rovingFocus:i,disabled:r,children:i?P.jsx(cm,{asChild:!0,...u,orientation:o,dir:c,loop:l,children:P.jsx(Re.div,{...d,ref:t})}):P.jsx(Re.div,{...d,ref:t})})}),gs="ToggleGroupItem",bm=S.forwardRef((e,t)=>{const n=xm(gs,e.__scopeToggleGroup),r=M3(gs,e.__scopeToggleGroup),i=pm(e.__scopeToggleGroup),o=n.value.includes(e.value),s=r.disabled||e.disabled,l={...e,pressed:o,disabled:s},a=S.useRef(null);return r.rovingFocus?P.jsx(mc,{asChild:!0,...i,focusable:!s,active:o,ref:a,children:P.jsx(eh,{...l,ref:t})}):P.jsx(eh,{...l,ref:t})});bm.displayName=gs;var eh=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,o=xm(gs,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=o.type==="single"?s:void 0;return P.jsx(fm,{...l,...i,ref:t,onPressedChange:a=>{a?o.onItemActivate(r):o.onItemDeactivate(r)}})}),R3=xc,O3=bm,yc="Toolbar",[$3,Ok]=qr(yc,[el,gm]),bc=el(),vm=gm(),[D3,_m]=$3(yc),Cm=N.forwardRef((e,t)=>{const{__scopeToolbar:n,orientation:r="horizontal",dir:i,loop:o=!0,...s}=e,l=bc(n),a=Qs(i);return P.jsx(D3,{scope:n,orientation:r,dir:a,children:P.jsx(cm,{asChild:!0,...l,orientation:r,dir:a,loop:o,children:P.jsx(Re.div,{role:"toolbar","aria-orientation":r,dir:a,...s,ref:t})})})});Cm.displayName=yc;var wm="ToolbarSeparator",km=N.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=_m(wm,n);return P.jsx(x5,{orientation:i.orientation==="horizontal"?"vertical":"horizontal",...r,ref:t})});km.displayName=wm;var V3="ToolbarButton",vc=N.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=bc(n);return P.jsx(mc,{asChild:!0,...i,focusable:!e.disabled,children:P.jsx(Re.button,{type:"button",...r,ref:t})})});vc.displayName=V3;var H3="ToolbarLink",B3=N.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=bc(n);return P.jsx(mc,{asChild:!0,...i,focusable:!0,children:P.jsx(Re.a,{...r,ref:t,onKeyDown:ye(e.onKeyDown,o=>{o.key===" "&&o.currentTarget.click()})})})});B3.displayName=H3;var Sm="ToolbarToggleGroup",Em=N.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=_m(Sm,n),o=vm(n);return P.jsx(R3,{"data-orientation":i.orientation,dir:i.dir,...o,...r,ref:t,rovingFocus:!1})});Em.displayName=Sm;var z3="ToolbarToggleItem",Tm=N.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=vm(n),o={__scopeToolbar:e.__scopeToolbar};return P.jsx(vc,{asChild:!0,...o,children:P.jsx(O3,{...i,...r,ref:t})})});Tm.displayName=z3;var j3=Cm,U3=km,Im=vc,Am=Em,W3=Tm;const J3=new Set(["http:","https:","mailto:","sms:","tel:"]);class kn extends Bt{static getType(){return"link"}static clone(t){return new kn(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",n={},r){super(r);const{target:i=null,rel:o=null,title:s=null}=n;this.__url=t,this.__target=i,this.__rel=o,this.__title=s}createDOM(t){const n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),$t(n,t.theme.link),n}updateDOM(t,n,r){if(rp(n)){const i=this.__url,o=this.__target,s=this.__rel,l=this.__title;i!==t.__url&&(n.href=i),o!==t.__target&&(o?n.target=o:n.removeAttribute("target")),s!==t.__rel&&(s?n.rel=s:n.removeAttribute("rel")),l!==t.__title&&(l?n.title=l:n.removeAttribute("title"))}return!1}static importDOM(){return{a:t=>({conversion:K3,priority:1})}}static importJSON(t){return xr().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){try{const n=new URL(t);if(!J3.has(n.protocol))return"about:blank"}catch{return t}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const n=this.getWritable();return n.__url=t,n}getTarget(){return this.getLatest().__target}setTarget(t){const n=this.getWritable();return n.__target=t,n}getRel(){return this.getLatest().__rel}setRel(t){const n=this.getWritable();return n.__rel=t,n}getTitle(){return this.getLatest().__title}setTitle(t){const n=this.getWritable();return n.__title=t,n}insertNewAfter(t,n=!0){const r=xr(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n,r){if(!D(n))return!1;const i=n.anchor.getNode(),o=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(o)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function K3(e){let t=null;if(rp(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=xr(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function xr(e="",t){return ft(new kn(e,t))}function Gt(e){return e instanceof kn}class si extends kn{constructor(t="",n={},r){super(t,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}static getType(){return"autolink"}static clone(t){return new si(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const n=this.getWritable();return n.__isUnlinked=t,n}createDOM(t){return this.__isUnlinked?document.createElement("span"):super.createDOM(t)}updateDOM(t,n,r){return super.updateDOM(t,n,r)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return qa().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,n=!0){const r=this.getParentOrThrow().insertNewAfter(t,n);if(O(r)){const i=qa(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}}function qa(e="",t){return ft(new si(e,t))}function er(e){return e instanceof si}const Gr=_n();function th(e,t){if(e.type==="element"){const n=e.getNode();return O(n)||function(r,...i){const o=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const l of i)s.append("v",l);throw o.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),n.getChildren()[e.offset+t]||null}return null}function Ol(e,t={}){const{target:n,title:r}=t,i=t.rel===void 0?"noreferrer":t.rel,o=U();if(!D(o))return;const s=o.extract();if(e===null)return void s.forEach(u=>{const c=Vn(u,d=>!er(d)&&Gt(d));if(c){const d=c.getChildren();for(let f=0;f<d.length;f++)c.insertBefore(d[f]);c.remove()}});const l=new Set,a=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(e),n!==void 0&&u.setTarget(n),i!==void 0&&u.setRel(i),r!==void 0&&u.setTitle(r))};if(s.length===1){const u=nh(s[0],Gt);if(u!==null)return a(u)}(function(u){const c=U();if(!D(c))return u();const d=ur(c),f=d.isBackward(),h=th(d.anchor,f?-1:0),g=th(d.focus,f?0:-1);if(u(),h||g){const x=U();if(D(x)){const b=x.clone();if(h){const y=h.getParent();y&&b.anchor.set(y.getKey(),h.getIndexWithinParent()+(f?1:0),"element")}if(g){const y=g.getParent();y&&b.focus.set(y.getKey(),g.getIndexWithinParent()+(f?0:1),"element")}Be(ur(b))}}})(()=>{let u=null;for(const c of s){if(!c.isAttached())continue;const d=nh(c,Gt);if(d){a(d);continue}if(O(c)){if(!c.isInline())continue;if(Gt(c)){if(!(er(c)||u!==null&&u.getParentOrThrow().isParentOf(c))){a(c),u=c;continue}for(const h of c.getChildren())c.insertBefore(h);c.remove();continue}}const f=c.getPreviousSibling();Gt(f)&&f.is(u)?f.append(c):(u=xr(e,{rel:i,target:n,title:r}),c.insertAfter(u),u.append(c))}})}function nh(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const Z3={testNode:"link",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(xr(e.url,{title:e.title}))}},G3={testLexicalNode:Gt,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("link",{url:e.getURL(),title:e.getTitle()})}};function q3({validateUrl:e,attributes:t}){const[n]=rt();return N.useEffect(()=>{if(!n.hasNodes([kn]))throw new Error("LinkPlugin: LinkNode not registered on editor");return ht(n.registerCommand(Gr,r=>{if(r===null)return Ol(r),!0;if(typeof r=="string")return!(e!==void 0&&!e(r))&&(Ol(r,t),!0);{const{url:i,target:o,rel:s,title:l}=r;return Ol(i,{...t,rel:s,target:o,title:l}),!0}},Ie),e!==void 0?n.registerCommand(Gi,r=>{const i=U();if(!D(i)||i.isCollapsed()||!Nn(r,ClipboardEvent))return!1;const o=r;if(o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return!!e(s)&&!i.getNodes().some(l=>O(l))&&(n.dispatchCommand(Gr,{...t,url:s}),r.preventDefault(),!0)},Ie):()=>{})},[n,e,t]),null}function rh(e,t=n=>n){return n=>{const r=e.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}function Nm(e,t){for(let n=0;n<t.length;n++){const r=t[n](e);if(r)return r}return null}const Y3=/[.,;\s]/;function ps(e){return Y3.test(e)}function Lm(e){return ps(e[e.length-1])}function Ya(e){return ps(e[0])}function Fm(e){let t=e.getPreviousSibling();return O(t)&&(t=t.getLastDescendant()),t===null||Mt(t)||J(t)&&Lm(t.getTextContent())}function Pm(e){let t=e.getNextSibling();return O(t)&&(t=t.getFirstDescendant()),t===null||Mt(t)||J(t)&&Ya(t.getTextContent())}function X3(e,t,n,r){return(e>0?ps(n[e-1]):Fm(r[0]))?t<n.length?ps(n[t]):Pm(r[r.length-1]):!1}function Q3(e,t,n){const r=[],i=[],o=[];let s=0,l=0;const a=[...e];for(;a.length>0;){const u=a[0],c=u.getTextContent().length,d=l;l+c<=t?(r.push(u),s+=c):d>=n?o.push(u):i.push(u),l+=c,a.shift()}return[s,r,i,o]}function e7(e,t,n,r){const i=qa(r.url,r.attributes);if(e.length===1){let o,s=e[0];t===0?[o,s]=s.splitText(n):[,o,s]=s.splitText(t,n);const l=Ne(r.text);return l.setFormat(o.getFormat()),l.setDetail(o.getDetail()),l.setStyle(o.getStyle()),i.append(l),o.replace(i),s}if(e.length>1){const o=e[0];let s,l=o.getTextContent().length;t===0?s=o:[,s]=o.splitText(t);const a=[];let u;for(let h=1;h<e.length;h++){const g=e[h],x=g.getTextContent().length,b=l;if(b<n)if(l+x<=n)a.push(g);else{const[y,m]=g.splitText(n-b);a.push(y),u=m}l+=x}const c=U(),d=c?c.getNodes().find(J):void 0,f=Ne(s.getTextContent());return f.setFormat(s.getFormat()),f.setDetail(s.getDetail()),f.setStyle(s.getStyle()),i.append(f,...a),d&&d===s&&(D(c)?f.select(c.anchor.offset,c.focus.offset):ze(c)&&f.select(0,f.getTextContent().length)),s.replace(i),u}}function $l(e,t,n){const r=e.getChildren(),i=r.length;for(let a=0;a<i;a++){const u=r[a];if(!J(u)||!u.isSimpleText())return Ho(e),void n(null,e.getURL())}const o=e.getTextContent(),s=Nm(o,t);if(s===null||s.text!==o||!Fm(e)||!Pm(e))return Ho(e),void n(null,e.getURL());const l=e.getURL();if(l!==s.url&&(e.setURL(s.url),n(s.url,l)),s.attributes){const a=e.getRel();a!==s.attributes.rel&&(e.setRel(s.attributes.rel||null),n(s.attributes.rel||null,a));const u=e.getTarget();u!==s.attributes.target&&(e.setTarget(s.attributes.target||null),n(s.attributes.target||null,u))}}function Ho(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(n=>n.getLatest())}function t7(e,t,n){N.useEffect(()=>{e.hasNodes([si])||function(i,...o){const s=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;l.append("code",i);for(const a of o)l.append("v",a);throw s.search=l.toString(),Error(`Minified Lexical error #${i}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);const r=(i,o)=>{n&&n(i,o)};return ht(e.registerNodeTransform(rn,i=>{const o=i.getParentOrThrow(),s=i.getPreviousSibling();if(er(o)&&!o.getIsUnlinked())$l(o,t,r);else if(!Gt(o)){if(i.isSimpleText()&&(Ya(i.getTextContent())||!er(s))){const l=function(a){const u=[a];let c=a.getNextSibling();for(;c!==null&&J(c)&&c.isSimpleText()&&(u.push(c),!/[\s]/.test(c.getTextContent()));)c=c.getNextSibling();return u}(i);(function(a,u,c){let d=[...a];const f=d.map(b=>b.getTextContent()).join("");let h,g=f,x=0;for(;(h=Nm(g,u))&&h!==null;){const b=h.index,y=b+h.length;if(X3(x+b,x+y,f,d)){const[m,,p,v]=Q3(d,x+b,x+y),k=e7(p,x+b-m,x+y-m,h);d=k?[k,...v]:v,c(h.url,null),x=0}else x+=y;g=g.substring(y)}})(l,t,r)}(function(l,a,u){const c=l.getPreviousSibling(),d=l.getNextSibling(),f=l.getTextContent();var h;!er(c)||c.getIsUnlinked()||Ya(f)&&(h=f,!(c.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(h):/^\.[a-zA-Z0-9]{1,}/.test(h)))||(c.append(l),$l(c,a,u),u(null,c.getURL())),!er(d)||d.getIsUnlinked()||Lm(f)||(Ho(d),$l(d,a,u),u(null,d.getURL()))})(i,t,r)}}),e.registerCommand(Gr,i=>{const o=U();return i!==null||!D(o)||o.extract().forEach(s=>{const l=s.getParent();if(er(l))return l.setIsUnlinked(!l.getIsUnlinked()),l.markDirty(),!0}),!1},Ie))},[e,t,n])}function n7({matchers:e,onChange:t}){const[n]=rt();return t7(n,e,t),null}const r7=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,i7=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,o7=[rh(r7,e=>e.startsWith("http")?e:`https://${e}`),rh(i7,e=>`mailto:${e}`)],s7=()=>S.createElement(n7,{matchers:o7}),l7=te(!1),a7=Vt({init(e,t){const n=!!(t!=null&&t.disableAutoLink),r=t!=null&&t.validateUrl?{validateUrl:t.validateUrl}:{};e.pubIn({[ii]:"link",[vn]:Z3,[zn]:[kn,si],[jn]:G3,[l7]:n,[_r]:()=>S.createElement(S.Fragment,null,S.createElement(q3,{...r}),n?null:S.createElement(s7,null))})}});function u7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var c7=["color"],d7=N.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=u7(e,c7);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),N.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});const ih=()=>S.createElement("div",{className:G.imagePlaceholder},S.createElement(d7,null));function Xa({nodeKey:e,imageSource:t,initialImagePath:n,title:r,alt:i}){const[o,s,l]=nn(t0,Un,Dt),[a]=rt(),u=xt(Qm),c=wn();return S.createElement("div",{className:G.editImageToolbar},S.createElement("button",{className:G.iconButton,type:"button",title:c("imageEditor.deleteImage","Delete image"),disabled:l,onClick:d=>{d.preventDefault(),a.update(()=>{var f;(f=Fe(e))==null||f.remove()})}},s("delete_small")),!o&&S.createElement("button",{type:"button",className:Ce(G.iconButton,G.editImageButton),title:c("imageEditor.editImage","Edit image"),disabled:l,onClick:()=>{u({nodeKey:e,initialValues:{src:n||t,title:r,altText:i}})}},s("settings")))}function _i(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Le.apply(null,arguments)}var Dl={exports:{}},Vl,oh;function f7(){if(oh)return Vl;oh=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Vl=e,Vl}var Hl,sh;function h7(){if(sh)return Hl;sh=1;var e=f7();function t(){}function n(){}return n.resetWarningCache=t,Hl=function(){function r(s,l,a,u,c,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Hl}var lh;function g7(){return lh||(lh=1,Dl.exports=h7()()),Dl.exports}var p7=g7();const K=$h(p7);var Bl={exports:{}},_e={};/** @license React v17.0.2
|
|
69
|
+
* react-is.production.min.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/var ah;function m7(){if(ah)return _e;ah=1;var e=60103,t=60106,n=60107,r=60108,i=60114,o=60109,s=60110,l=60112,a=60113,u=60120,c=60115,d=60116,f=60121,h=60122,g=60117,x=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),n=y("react.fragment"),r=y("react.strict_mode"),i=y("react.profiler"),o=y("react.provider"),s=y("react.context"),l=y("react.forward_ref"),a=y("react.suspense"),u=y("react.suspense_list"),c=y("react.memo"),d=y("react.lazy"),f=y("react.block"),h=y("react.server.block"),g=y("react.fundamental"),x=y("react.debug_trace_mode"),b=y("react.legacy_hidden")}function m(L){if(typeof L=="object"&&L!==null){var H=L.$$typeof;switch(H){case e:switch(L=L.type,L){case n:case i:case r:case a:case u:return L;default:switch(L=L&&L.$$typeof,L){case s:case l:case d:case c:case o:return L;default:return H}}case t:return H}}}var p=o,v=e,k=l,_=n,C=d,w=c,T=t,F=i,M=r,R=a;return _e.ContextConsumer=s,_e.ContextProvider=p,_e.Element=v,_e.ForwardRef=k,_e.Fragment=_,_e.Lazy=C,_e.Memo=w,_e.Portal=T,_e.Profiler=F,_e.StrictMode=M,_e.Suspense=R,_e.isAsyncMode=function(){return!1},_e.isConcurrentMode=function(){return!1},_e.isContextConsumer=function(L){return m(L)===s},_e.isContextProvider=function(L){return m(L)===o},_e.isElement=function(L){return typeof L=="object"&&L!==null&&L.$$typeof===e},_e.isForwardRef=function(L){return m(L)===l},_e.isFragment=function(L){return m(L)===n},_e.isLazy=function(L){return m(L)===d},_e.isMemo=function(L){return m(L)===c},_e.isPortal=function(L){return m(L)===t},_e.isProfiler=function(L){return m(L)===i},_e.isStrictMode=function(L){return m(L)===r},_e.isSuspense=function(L){return m(L)===a},_e.isValidElementType=function(L){return typeof L=="string"||typeof L=="function"||L===n||L===i||L===x||L===r||L===a||L===u||L===b||typeof L=="object"&&L!==null&&(L.$$typeof===d||L.$$typeof===c||L.$$typeof===o||L.$$typeof===s||L.$$typeof===l||L.$$typeof===g||L.$$typeof===f||L[0]===h)},_e.typeOf=m,_e}var uh;function x7(){return uh||(uh=1,Bl.exports=m7()),Bl.exports}x7();let ch=e=>typeof e=="object"&&e!=null&&e.nodeType===1,dh=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",zl=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return dh(n.overflowY,t)||dh(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},Eo=(e,t,n,r,i,o,s,l)=>o<e&&s>t||o>e&&s<t?0:o<=e&&l<=n||s>=t&&l>=n?o-e-r:s>t&&l<n||o<e&&l>n?s-t+i:0,y7=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var b7=(e,t)=>{var n,r,i,o,s,l;if(typeof document>"u")return[];let{inline:a,boundary:u,skipOverflowHiddenElements:c}=t,d=typeof u=="function"?u:R=>R!==u;if(!ch(e))throw new TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,h=[],g=e;for(;ch(g)&&d(g);){if(g=y7(g),g===f){h.push(g);break}g!=null&&g===document.body&&zl(g)&&!zl(document.documentElement)||g!=null&&zl(g,c)&&h.push(g)}let x=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,b=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,y=(s=window.scrollX)!=null?s:pageXOffset,m=(l=window.scrollY)!=null?l:pageYOffset,{height:p,width:v,top:k,right:_,bottom:C,left:w}=e.getBoundingClientRect(),T=k,F=a==="center"?w+v/2:a==="end"?_:w,M=[];for(let R=0;R<h.length;R++){let L=h[R],{height:H,width:B,top:q,right:Z,bottom:ne,left:ee}=L.getBoundingClientRect();if(k>=0&&w>=0&&C<=b&&_<=x&&k>=q&&C<=ne&&w>=ee&&_<=Z)return M;let I=getComputedStyle(L),oe=parseInt(I.borderLeftWidth,10),ce=parseInt(I.borderTopWidth,10),A=parseInt(I.borderRightWidth,10),de=parseInt(I.borderBottomWidth,10),he=0,se=0,j="offsetWidth"in L?L.offsetWidth-L.clientWidth-oe-A:0,W="offsetHeight"in L?L.offsetHeight-L.clientHeight-ce-de:0,Y="offsetWidth"in L?L.offsetWidth===0?0:B/L.offsetWidth:0,X="offsetHeight"in L?L.offsetHeight===0?0:H/L.offsetHeight:0;if(f===L)he=Eo(m,m+b,b,ce,de,m+T,m+T+p,p),se=a==="start"?F:a==="center"?F-x/2:a==="end"?F-x:Eo(y,y+x,x,oe,A,y+F,y+F+v,v),he=Math.max(0,he+m),se=Math.max(0,se+y);else{he=Eo(q,ne,H,ce,de+W,T,T+p,p),se=a==="start"?F-ee-oe:a==="center"?F-(ee+B/2)+j/2:a==="end"?F-Z+A+j:Eo(ee,Z,B,oe,A+j,F,F+v,v);let{scrollLeft:ie,scrollTop:ue}=L;he=Math.max(0,Math.min(ue+he/X,L.scrollHeight-H/X+W)),se=Math.max(0,Math.min(ie+se/Y,L.scrollWidth-B/Y+j)),T+=ue-he,F+=ie-se}M.push({el:L,top:he,left:se})}return M},v7=0;function Mm(){}function _7(e,t){if(e){var n=b7(e,{boundary:t});n.forEach(function(r){var i=r.el,o=r.top,s=r.left;i.scrollTop=o,i.scrollLeft=s})}}function fh(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function Rm(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];r(),n=setTimeout(function(){n=null,e.apply(void 0,s)},t)}return i.cancel=r,i}function dn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return t.some(function(l){return l&&l.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function To(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function C7(){return String(v7++)}function w7(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Qa(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=Om(t,r)?t[r]:e[r],n},{})}function Om(e,t){return e[t]!==void 0}function k7(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function Io(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var o=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:o+1);var s=t+e;s<0?s=i?o:0:s>o&&(s=i?0:o);var l=Ji(e,s,n,r,i);return l===-1?t>=n?-1:t:l}function Ji(e,t,n,r,i){var o=r(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(var s=t+1;s<n;s++)if(!r(s).hasAttribute("disabled"))return s}else for(var l=t-1;l>=0;l--)if(!r(l).hasAttribute("disabled"))return l;return i?e>0?Ji(1,0,n,r,!1):Ji(-1,n-1,n,r,!1):-1}function hh(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(fh(i,e,n)||r&&fh(i,n.document.activeElement,n))})}var S7=Rm(function(e){$m(e).textContent=""},500);function E7(e,t){var n=$m(t);e&&(n.textContent=e,S7(t))}function $m(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var T7=["isInitialMount","highlightedIndex","items","environment"],Dm={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function I7(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(s){A7(s,e,t,n),n[s]!==t[s]&&(o[s]=n[s])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(Le({type:i},o))}function A7(e,t,n,r){var i=t.props,o=t.type,s="on"+_c(e)+"Change";i[s]&&r[e]!==void 0&&r[e]!==n[e]&&i[s](Le({type:o},r))}function N7(e,t){return t.changes}function L7(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var F7=Rm(function(e,t){E7(e(),t)},200),P7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?N.useLayoutEffect:N.useEffect;function M7(e){var t=e.id,n=t===void 0?"downshift-"+C7():t,r=e.labelId,i=e.menuId,o=e.getItemId,s=e.toggleButtonId,l=e.inputId,a=N.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(u){return n+"-item-"+u},toggleButtonId:s||n+"-toggle-button",inputId:l||n+"-input"});return a.current}function R7(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}function O7(e){return e?String(e):""}function _c(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Vm(e){var t=N.useRef(e);return t.current=e,t}function $7(e,t,n){var r=N.useRef(),i=N.useRef(),o=N.useCallback(function(f,h){i.current=h,f=Qa(f,h.props);var g=e(f,h),x=h.props.stateReducer(f,Le({},h,{changes:g}));return x},[e]),s=N.useReducer(o,t),l=s[0],a=s[1],u=Vm(n),c=N.useCallback(function(f){return a(Le({props:u.current},f))},[u]),d=i.current;return N.useEffect(function(){d&&r.current&&r.current!==l&&I7(d,Qa(r.current,d.props),l),r.current=l},[l,n,d]),[l,c]}var Fi={itemToString:O7,stateReducer:N7,getA11ySelectionMessage:L7,scrollIntoView:_7,environment:typeof window>"u"?{}:window};function Yt(e,t,n){n===void 0&&(n=Dm);var r=e["default"+_c(t)];return r!==void 0?r:n[t]}function Ao(e,t,n){n===void 0&&(n=Dm);var r=e[t];if(r!==void 0)return r;var i=e["initial"+_c(t)];return i!==void 0?i:Yt(e,t,n)}function D7(e){var t=Ao(e,"selectedItem"),n=Ao(e,"isOpen"),r=Ao(e,"highlightedIndex"),i=Ao(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function Pi(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,s=t.selectedItem,l=t.highlightedIndex;return r.length===0?-1:i!==void 0&&l===i?i:o!==void 0?o:s?r.indexOf(s):n===0?-1:n<0?r.length-1:0}function V7(e,t,n,r){var i=N.useRef({isMouseDown:!1,isTouchMove:!1});return N.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var o=function(){i.current.isMouseDown=!0},s=function(d){i.current.isMouseDown=!1,e&&!hh(d.target,t.map(function(f){return f.current}),n)&&r()},l=function(){i.current.isTouchMove=!1},a=function(){i.current.isTouchMove=!0},u=function(d){e&&!i.current.isTouchMove&&!hh(d.target,t.map(function(f){return f.current}),n,!1)&&r()};return n.addEventListener("mousedown",o),n.addEventListener("mouseup",s),n.addEventListener("touchstart",l),n.addEventListener("touchmove",a),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",s),n.removeEventListener("touchstart",l),n.removeEventListener("touchmove",a),n.removeEventListener("touchend",u)}}},[e,n]),i}var H7=function(){return Mm};function gh(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,s=n.environment,l=_i(n,T7);N.useEffect(function(){r||F7(function(){return e(Le({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},l))},s.document)},t)}function B7(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,s=e.scrollIntoView,l=N.useRef(!0);return P7(function(){t<0||!n||!Object.keys(r.current).length||(l.current===!1?l.current=!0:s(i(t),o))},[t]),l}var z7=Mm;function ph(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return Le({isOpen:!1,highlightedIndex:-1},i&&Le({selectedItem:e.items[t],isOpen:Yt(e,"isOpen"),highlightedIndex:Yt(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function j7(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Pi(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:Pi(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:Yt(i,"highlightedIndex"),isOpen:Yt(i,"isOpen"),selectedItem:Yt(i,"selectedItem"),inputValue:Yt(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Le({},e,o)}K.array.isRequired,K.func,K.func,K.func,K.number,K.number,K.number,K.bool,K.bool,K.bool,K.any,K.any,K.any,K.string,K.string,K.string,K.func,K.string,K.func,K.func,K.func,K.func,K.func,K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})});function U7(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}Wc(Wc({},Fi),{getA11yStatusMessage:U7});var Cc=0,wc=1,kc=2,Sc=3,Ec=4,Tc=5,Ic=6,Ac=7,Nc=8,ms=9,Lc=10,Hm=11,Bm=12,Fc=13,zm=14,jm=15,Um=16,Wm=17,Jm=18,Pc=19,Km=20,Zm=21,Mc=22,Gm=Object.freeze({__proto__:null,InputKeyDownArrowDown:Cc,InputKeyDownArrowUp:wc,InputKeyDownEscape:kc,InputKeyDownHome:Sc,InputKeyDownEnd:Ec,InputKeyDownPageUp:Tc,InputKeyDownPageDown:Ic,InputKeyDownEnter:Ac,InputChange:Nc,InputBlur:ms,InputFocus:Lc,MenuMouseLeave:Hm,ItemMouseMove:Bm,ItemClick:Fc,ToggleButtonClick:zm,FunctionToggleMenu:jm,FunctionOpenMenu:Um,FunctionCloseMenu:Wm,FunctionSetHighlightedIndex:Jm,FunctionSelectItem:Pc,FunctionSetInputValue:Km,FunctionReset:Zm,ControlledPropUpdatedSelectedItem:Mc});function W7(e){var t=D7(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),Le({},t,{inputValue:r})}K.array.isRequired,K.func,K.func,K.func,K.func,K.number,K.number,K.number,K.bool,K.bool,K.bool,K.any,K.any,K.any,K.string,K.string,K.string,K.string,K.string,K.string,K.func,K.string,K.string,K.func,K.func,K.func,K.func,K.func,K.func,K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})});function J7(e,t,n){var r=N.useRef(),i=$7(e,t,n),o=i[0],s=i[1];return N.useEffect(function(){Om(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&s({type:Mc,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[Qa(o,n),s]}var K7=Le({},Fi,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:w7});function Z7(e,t){var n,r=t.type,i=t.props,o=t.altKey,s;switch(r){case Fc:s={isOpen:Yt(i,"isOpen"),highlightedIndex:Yt(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case Cc:e.isOpen?s={highlightedIndex:Io(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:o&&e.selectedItem==null?-1:Pi(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case wc:e.isOpen?o?s=ph(i,e.highlightedIndex):s={highlightedIndex:Io(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:Pi(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case Ac:s=ph(i,e.highlightedIndex);break;case kc:s=Le({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Tc:s={highlightedIndex:Io(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case Ic:s={highlightedIndex:Io(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case Sc:s={highlightedIndex:Ji(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case Ec:s={highlightedIndex:Ji(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case ms:s=Le({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case Nc:s={isOpen:!0,highlightedIndex:Yt(i,"highlightedIndex"),inputValue:t.inputValue};break;case Lc:s={isOpen:!0,highlightedIndex:Pi(i,e,0)};break;case Pc:s={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case Mc:s={inputValue:t.inputValue};break;default:return j7(e,t,Gm)}return Le({},e,s)}var G7=["onMouseLeave","refKey","ref"],q7=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],Y7=["onClick","onPress","refKey","ref"],X7=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];qm.stateChangeTypes=Gm;function qm(e){e===void 0&&(e={});var t=Le({},K7,e),n=t.initialIsOpen,r=t.defaultIsOpen,i=t.items,o=t.scrollIntoView,s=t.environment,l=t.getA11yStatusMessage,a=t.getA11ySelectionMessage,u=t.itemToString,c=W7(t),d=J7(Z7,c,t),f=d[0],h=d[1],g=f.isOpen,x=f.highlightedIndex,b=f.selectedItem,y=f.inputValue,m=N.useRef(null),p=N.useRef({}),v=N.useRef(null),k=N.useRef(null),_=N.useRef(!0),C=M7(t),w=N.useRef(),T=Vm({state:f,props:t}),F=N.useCallback(function(j){return p.current[C.getItemId(j)]},[C]);gh(l,[g,x,y,i],Le({isInitialMount:_.current,previousResultCount:w.current,items:i,environment:s,itemToString:u},f)),gh(a,[b],Le({isInitialMount:_.current,previousResultCount:w.current,items:i,environment:s,itemToString:u},f));var M=B7({menuElement:m.current,highlightedIndex:x,isOpen:g,itemRefs:p,scrollIntoView:o,getItemNodeFromIndex:F});z7({isInitialMount:_.current}),N.useEffect(function(){var j=n||r||g;j&&v.current&&v.current.focus()},[]),N.useEffect(function(){_.current||(w.current=i.length)});var R=V7(g,[v,m,k],s,function(){h({type:ms,selectItem:!1})}),L=H7();N.useEffect(function(){return _.current=!1,function(){_.current=!0}},[]),N.useEffect(function(){var j;if(!g)p.current={};else if(((j=s.document)==null?void 0:j.activeElement)!==v.current){var W;v==null||(W=v.current)==null||W.focus()}},[g,s]);var H=N.useMemo(function(){return{ArrowDown:function(W){W.preventDefault(),h({type:Cc,altKey:W.altKey,getItemNodeFromIndex:F})},ArrowUp:function(W){W.preventDefault(),h({type:wc,altKey:W.altKey,getItemNodeFromIndex:F})},Home:function(W){T.current.state.isOpen&&(W.preventDefault(),h({type:Sc,getItemNodeFromIndex:F}))},End:function(W){T.current.state.isOpen&&(W.preventDefault(),h({type:Ec,getItemNodeFromIndex:F}))},Escape:function(W){var Y=T.current.state;(Y.isOpen||Y.inputValue||Y.selectedItem||Y.highlightedIndex>-1)&&(W.preventDefault(),h({type:kc}))},Enter:function(W){var Y=T.current.state;!Y.isOpen||W.which===229||(W.preventDefault(),h({type:Ac,getItemNodeFromIndex:F}))},PageUp:function(W){T.current.state.isOpen&&(W.preventDefault(),h({type:Tc,getItemNodeFromIndex:F}))},PageDown:function(W){T.current.state.isOpen&&(W.preventDefault(),h({type:Ic,getItemNodeFromIndex:F}))}}},[h,T,F]),B=N.useCallback(function(j){return Le({id:C.labelId,htmlFor:C.inputId},j)},[C]),q=N.useCallback(function(j,W){var Y,X=j===void 0?{}:j,ie=X.onMouseLeave,ue=X.refKey,Ae=ue===void 0?"ref":ue,He=X.ref,Je=_i(X,G7),Ke=W===void 0?{}:W;return Ke.suppressRefError,Le((Y={},Y[Ae]=To(He,function(Ge){m.current=Ge}),Y.id=C.menuId,Y.role="listbox",Y["aria-labelledby"]=Je&&Je["aria-label"]?void 0:""+C.labelId,Y.onMouseLeave=dn(ie,function(){h({type:Hm})}),Y),Je)},[h,L,C]),Z=N.useCallback(function(j){var W,Y,X=j===void 0?{}:j,ie=X.item,ue=X.index,Ae=X.refKey,He=Ae===void 0?"ref":Ae,Je=X.ref,Ke=X.onMouseMove,Ge=X.onMouseDown,Sn=X.onClick;X.onPress;var gt=X.disabled,jt=_i(X,q7),it=T.current,Gn=it.props,St=it.state,ke=R7(ie,ue,Gn.items,"Pass either item or index to getItemProps!"),pt=ke[1],$="onClick",V=Sn,E=function(){pt!==St.highlightedIndex&&(M.current=!1,h({type:Bm,index:pt,disabled:gt}))},le=function(){h({type:Fc,index:pt})},fe=function(sn){return sn.preventDefault()};return Le((W={},W[He]=To(Je,function(Te){Te&&(p.current[C.getItemId(pt)]=Te)}),W.disabled=gt,W.role="option",W["aria-selected"]=""+(pt===St.highlightedIndex),W.id=C.getItemId(pt),W),!gt&&(Y={},Y[$]=dn(V,le),Y),{onMouseMove:dn(Ke,E),onMouseDown:dn(Ge,fe)},jt)},[h,T,M,C]),ne=N.useCallback(function(j){var W,Y=j===void 0?{}:j,X=Y.onClick;Y.onPress;var ie=Y.refKey,ue=ie===void 0?"ref":ie,Ae=Y.ref,He=_i(Y,Y7),Je=T.current.state,Ke=function(){h({type:zm})};return Le((W={},W[ue]=To(Ae,function(Ge){k.current=Ge}),W["aria-controls"]=C.menuId,W["aria-expanded"]=Je.isOpen,W.id=C.toggleButtonId,W.tabIndex=-1,W),!He.disabled&&Le({},{onClick:dn(X,Ke)}),He)},[h,T,C]),ee=N.useCallback(function(j,W){var Y,X=j===void 0?{}:j,ie=X.onKeyDown,ue=X.onChange,Ae=X.onInput,He=X.onFocus,Je=X.onBlur;X.onChangeText;var Ke=X.refKey,Ge=Ke===void 0?"ref":Ke,Sn=X.ref,gt=_i(X,X7),jt=W===void 0?{}:W;jt.suppressRefError;var it=T.current.state,Gn=function(fe){var Te=k7(fe);Te&&H[Te]&&H[Te](fe)},St=function(fe){h({type:Nc,inputValue:fe.target.value})},ke=function(fe){if(it.isOpen&&!R.current.isMouseDown){var Te=fe.relatedTarget===null&&s.document.activeElement!==s.document.body;h({type:ms,selectItem:!Te})}},pt=function(){it.isOpen||h({type:Lc})},$="onChange",V={};if(!gt.disabled){var E;V=(E={},E[$]=dn(ue,Ae,St),E.onKeyDown=dn(ie,Gn),E.onBlur=dn(Je,ke),E.onFocus=dn(He,pt),E)}return Le((Y={},Y[Ge]=To(Sn,function(le){v.current=le}),Y["aria-activedescendant"]=it.isOpen&&it.highlightedIndex>-1?C.getItemId(it.highlightedIndex):"",Y["aria-autocomplete"]="list",Y["aria-controls"]=C.menuId,Y["aria-expanded"]=it.isOpen,Y["aria-labelledby"]=gt&>["aria-label"]?void 0:""+C.labelId,Y.autoComplete="off",Y.id=C.inputId,Y.role="combobox",Y.value=it.inputValue,Y),V,gt)},[L,T,C,H,h,R,s]),I=N.useCallback(function(){h({type:jm})},[h]),oe=N.useCallback(function(){h({type:Wm})},[h]),ce=N.useCallback(function(){h({type:Um})},[h]),A=N.useCallback(function(j){h({type:Jm,highlightedIndex:j})},[h]),de=N.useCallback(function(j){h({type:Pc,selectedItem:j})},[h]),he=N.useCallback(function(j){h({type:Km,inputValue:j})},[h]),se=N.useCallback(function(){h({type:Zm})},[h]);return{getItemProps:Z,getLabelProps:B,getMenuProps:q,getInputProps:ee,getToggleButtonProps:ne,toggleMenu:I,openMenu:ce,closeMenu:oe,setHighlightedIndex:A,setInputValue:he,selectItem:de,reset:se,highlightedIndex:x,isOpen:g,selectedItem:b,inputValue:y}}K.array,K.array,K.array,K.func,K.func,K.func,K.number,K.number,K.number,K.func,K.func,K.string,K.string,K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})});Fi.itemToString,Fi.stateReducer,Fi.environment;const mh=20,Ym=e=>e.suggestions.length>0?S.createElement(Q7,{...e}):S.createElement("input",{className:G.textInput,size:40,autoFocus:!0,...e.register(e.inputName)}),Q7=({autofocus:e,suggestions:t,control:n,inputName:r,placeholder:i,initialInputValue:o,setValue:s})=>{const[l,a]=S.useState(t.slice(0,mh)),u=wt(Un),c=t.length>0,{isOpen:d,getToggleButtonProps:f,getMenuProps:h,getInputProps:g,highlightedIndex:x,getItemProps:b,selectedItem:y}=qm({initialInputValue:o,onInputValueChange({inputValue:p=""}){s(r,p),p=p.toLowerCase()||"";const v=[];for(const k of t)if(k.toLowerCase().includes(p)&&(v.push(k),v.length>=mh))break;a(v)},items:l,itemToString(p){return p??""}}),m=d&&l.length>0;return S.createElement("div",{className:G.downshiftAutocompleteContainer},S.createElement("div",{"data-visible-dropdown":m,className:G.downshiftInputWrapper},S.createElement(c5,{name:r,control:n,render:({field:p})=>{const v=g();return S.createElement("input",{...v,name:p.name,placeholder:i,className:G.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:e})}}),c&&S.createElement("button",{"aria-label":"toggle menu",type:"button",...f()},u("arrow_drop_down"))),S.createElement("div",{className:G.downshiftAutocompleteContainer},S.createElement("ul",{...h(),"data-visible":m},l.map((p,v)=>S.createElement("li",{"data-selected":y===p,"data-highlighted":x===v,key:`${p}${v}`,...b({item:p,index:v})},p)))))},e6=()=>{const[e,t,n,r]=nn(eu,or,ao,Ln),i=xt(n0),o=xt(e0),s=wn(),{register:l,handleSubmit:a,control:u,setValue:c,reset:d}=fu({values:t.type==="editing"?t.initialValues:{}});return t.type==="inactive"?null:S.createElement(y5,{open:!0,onOpenChange:f=>{f||(o(),d({src:"",title:"",altText:""}))}},S.createElement(b5,{container:n==null?void 0:n.current},S.createElement(v5,{className:G.dialogOverlay}),S.createElement(_5,{className:G.dialogContent,onOpenAutoFocus:f=>{f.preventDefault()}},S.createElement(C5,null,s("uploadImage.dialogTitle","Upload an image")),S.createElement("form",{onSubmit:async f=>{f.preventDefault(),f.stopPropagation(),await a(i)(f),d({src:"",title:"",altText:""})},className:G.multiFieldForm},r===null?S.createElement("input",{type:"hidden",accept:"image/*",...l("file")}):S.createElement("div",{className:G.formField},S.createElement("label",{htmlFor:"file"},s("uploadImage.uploadInstructions","Upload an image from your device:")),S.createElement("input",{type:"file",accept:"image/*",...l("file")})),S.createElement("div",{className:G.formField},S.createElement("label",{htmlFor:"src"},r!==null?s("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):s("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),S.createElement(Ym,{register:l,initialInputValue:t.type==="editing"?t.initialValues.src??"":"",inputName:"src",suggestions:e,setValue:c,control:u,placeholder:s("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),S.createElement("div",{className:G.formField},S.createElement("label",{htmlFor:"alt"},s("uploadImage.alt","Alt:")),S.createElement("input",{type:"text",...l("altText"),className:G.textInput})),S.createElement("div",{className:G.formField},S.createElement("label",{htmlFor:"title"},s("uploadImage.title","Title:")),S.createElement("input",{type:"text",...l("title"),className:G.textInput})),S.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},S.createElement("button",{type:"submit",title:s("dialogControls.save","Save"),"aria-label":s("dialogControls.save","Save"),className:Ce(G.primaryButton)},s("dialogControls.save","Save")),S.createElement(w5,{asChild:!0},S.createElement("button",{type:"reset",title:s("dialogControls.cancel","Cancel"),"aria-label":s("dialogControls.cancel","Cancel"),className:Ce(G.secondaryButton)},s("dialogControls.cancel","Cancel"))))))))};function jl(e,t,n){return Math.min(Math.max(e,t),n)}const Se={east:1,north:8,south:2,west:4};function t6({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:i}){const o=N.useRef(null),s=N.useRef({priority:"",value:"default"}),l=N.useRef({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),a=i.getRootElement(),u=r||(a!==null?a.getBoundingClientRect().width-20:100),c=a!==null?a.getBoundingClientRect().height-20:100,d=100,f=100,h=m=>{const p=m===Se.east||m===Se.west,v=m===Se.north||m===Se.south,k=m&Se.north&&m&Se.west||m&Se.south&&m&Se.east,_=p?"ew":v?"ns":k?"nwse":"nesw";a!==null&&a.style.setProperty("cursor",`${_}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${_}-resize`,"important"),s.current.value=document.body.style.getPropertyValue("-webkit-user-select"),s.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},g=()=>{a!==null&&a.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",s.current.value,s.current.priority))},x=(m,p)=>{if(!i.isEditable())return;const v=n.current,k=o.current;if(v!==null&&k!==null){m.preventDefault();const{width:_,height:C}=v.getBoundingClientRect(),w=l.current;w.startWidth=_,w.startHeight=C,w.ratio=_/C,w.currentWidth=_,w.currentHeight=C,w.startX=m.clientX,w.startY=m.clientY,w.isResizing=!0,w.direction=p,h(p),e(),k.classList.add(G.imageControlWrapperResizing),v.style.height=`${C}px`,v.style.width=`${_}px`,document.addEventListener("pointermove",b),document.addEventListener("pointerup",y)}},b=m=>{const p=n.current,v=l.current,k=v.direction&(Se.east|Se.west),_=v.direction&(Se.south|Se.north);if(p!==null&&v.isResizing)if(k&&_){let C=Math.floor(v.startX-m.clientX);C=v.direction&Se.east?-C:C;const w=jl(v.startWidth+C,d,u),T=w/v.ratio;p.style.width=`${w}px`,p.style.height=`${T}px`,v.currentHeight=T,v.currentWidth=w}else if(_){let C=Math.floor(v.startY-m.clientY);C=v.direction&Se.south?-C:C;const w=jl(v.startHeight+C,f,c);p.style.height=`${w}px`,v.currentHeight=w}else{let C=Math.floor(v.startX-m.clientX);C=v.direction&Se.east?-C:C;const w=jl(v.startWidth+C,d,u);p.style.width=`${w}px`,v.currentWidth=w}},y=()=>{const m=n.current,p=l.current,v=o.current;if(m!==null&&v!==null&&p.isResizing){const k=p.currentWidth,_=p.currentHeight;p.startWidth=0,p.startHeight=0,p.ratio=0,p.startX=0,p.startY=0,p.currentWidth=0,p.currentHeight=0,p.isResizing=!1,v.classList.remove(G.imageControlWrapperResizing),g(),t(k,_),document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",y)}};return N.createElement("div",{ref:o},N.createElement("div",{className:Ce(G.imageResizer,G.imageResizerN),onPointerDown:m=>{x(m,Se.north)}}),N.createElement("div",{className:Ce(G.imageResizer,G.imageResizerNe),onPointerDown:m=>{x(m,Se.north|Se.east)}}),N.createElement("div",{className:Ce(G.imageResizer,G.imageResizerE),onPointerDown:m=>{x(m,Se.east)}}),N.createElement("div",{className:Ce(G.imageResizer,G.imageResizerSe),onPointerDown:m=>{x(m,Se.south|Se.east)}}),N.createElement("div",{className:Ce(G.imageResizer,G.imageResizerS),onPointerDown:m=>{x(m,Se.south)}}),N.createElement("div",{className:Ce(G.imageResizer,G.imageResizerSw),onPointerDown:m=>{x(m,Se.south|Se.west)}}),N.createElement("div",{className:Ce(G.imageResizer,G.imageResizerW),onPointerDown:m=>{x(m,Se.west)}}),N.createElement("div",{className:Ce(G.imageResizer,G.imageResizerNw),onPointerDown:m=>{x(m,Se.north|Se.west)}}))}const n6="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(`
|
|
76
|
+
<svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
|
|
77
|
+
<rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" />
|
|
78
|
+
<text x="50" y="55" text-anchor="middle" font-size="20" fill="red">⚠️</text>
|
|
79
|
+
</svg>
|
|
80
|
+
`),r6={__cache:{},read(e){if(this.__cache[e]||(this.__cache[e]=new Promise(t=>{const n=new Image;n.onerror=()=>{this.__cache[e]=n6,t()},n.onload=()=>{this.__cache[e]=e,t()},n.src=e})),this.__cache[e]instanceof Promise)throw this.__cache[e];return this.__cache[e]}};function i6({title:e,alt:t,className:n,imageRef:r,src:i,width:o,height:s}){return S.createElement("img",{className:n??void 0,alt:t,src:r6.read(i),title:e,ref:r,draggable:"false",width:o,height:s})}function o6({src:e,title:t,alt:n,nodeKey:r,width:i,height:o,rest:s}){const[l,a,u,c,d]=nn(ru,tu,nu,Dt,iu),f=S.useRef(null),h=S.useRef(null),[g,x,b]=$1(r),[y]=rt(),[m,p]=S.useState(null),v=S.useRef(null),[k,_]=S.useState(!1),[C,w]=S.useState(null),[T,F]=S.useState(null),M=S.useCallback(ee=>{if(g&&ze(U())){ee.preventDefault();const oe=Fe(r);xs(oe)&&oe.remove()}return!1},[g,r]),R=S.useCallback(ee=>{const I=U(),oe=h.current;return g&&ze(I)&&I.getNodes().length===1&&oe!==null&&oe!==document.activeElement?(ee.preventDefault(),oe.focus(),!0):!1},[g]),L=S.useCallback(ee=>h.current===ee.target?(Be(null),y.update(()=>{x(!0);const I=y.getRootElement();I!==null&&I.focus()}),!0):!1,[y,x]);S.useEffect(()=>{u?(async()=>{T||F(e);const I=await u(e);w(I)})().catch(I=>{console.error(I)}):w(e)},[e,u,T]),S.useEffect(()=>{let ee=!0;const I=ht(y.registerUpdateListener(({editorState:oe})=>{ee&&p(oe.read(()=>U()))}),y.registerCommand(Ss,(oe,ce)=>(v.current=ce,!1),Ie),y.registerCommand(Es,oe=>{const ce=oe;return k?!0:ce.target===f.current?(ce.shiftKey?x(!g):(b(),x(!0)),!0):!1},Ie),y.registerCommand(Ls,oe=>oe.target===f.current?(oe.preventDefault(),!0):!1,Ie),y.registerCommand(Ns,M,Ie),y.registerCommand(As,M,Ie),y.registerCommand(Bi,R,Ie),y.registerCommand(qi,L,Ie));return()=>{ee=!1,I()}},[b,y,k,g,r,M,R,L,x]);const H=(ee,I)=>{setTimeout(()=>{_(!1)},200),y.update(()=>{const oe=Fe(r);xs(oe)&&oe.setWidthAndHeight(ee,I)})},B=()=>{_(!0)},q=ze(m),Z=g,ne=S.useMemo(()=>{if(s.length===0)return null;const ee=s.find(I=>I.type==="mdxJsxAttribute"&&(I.name==="class"||I.name==="className"));return ee?ee.value:null},[s]);return C!==null?S.createElement(S.Suspense,{fallback:l?S.createElement(l,null):null},S.createElement("div",{className:G.imageWrapper,"data-editor-block-type":"image"},S.createElement("div",{draggable:q},S.createElement(i6,{width:i,height:o,className:Ce({[G.focusedImage]:Z},ne),src:C,title:t??"",alt:n??"",imageRef:f})),q&&Z&&!a&&S.createElement(t6,{editor:y,imageRef:f,onResizeStart:B,onResizeEnd:H}),c||S.createElement(d,{nodeKey:r,imageSource:C,initialImagePath:T,title:t??"",alt:n??""}))):null}var s6=Object.defineProperty,l6=(e,t,n)=>t in e?s6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tr=(e,t,n)=>(l6(e,typeof t!="symbol"?t+"":t,n),n);function a6(e){if(e instanceof HTMLImageElement){const{alt:t,src:n,title:r,width:i,height:o}=e;return{node:Cr({altText:t,src:n,title:r,width:i,height:o})}}return null}class ho extends to{constructor(t,n,r,i,o,s,l){super(l),Tr(this,"__src"),Tr(this,"__altText"),Tr(this,"__title"),Tr(this,"__width"),Tr(this,"__height"),Tr(this,"__rest"),this.__src=t,this.__title=r,this.__altText=n,this.__width=i||"inherit",this.__height=o||"inherit",this.__rest=s??[]}static getType(){return"image"}static clone(t){return new ho(t.__src,t.__altText,t.__title,t.__width,t.__height,t.__rest,t.__key)}static importJSON(t){const{altText:n,title:r,src:i,width:o,rest:s,height:l}=t;return Cr({altText:n,title:r,src:i,height:l,width:o,rest:s})}exportDOM(){const t=document.createElement("img");return t.setAttribute("src",this.__src),t.setAttribute("alt",this.__altText),this.__title&&t.setAttribute("title",this.__title),this.__width&&t.setAttribute("width",this.__width.toString()),this.__height&&t.setAttribute("height",this.__height.toString()),{element:t}}static importDOM(){return{img:()=>({conversion:a6,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?0:this.__height,width:this.__width==="inherit"?0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(t,n){const r=this.getWritable();r.__width=t,r.__height=n}createDOM(t){const n=document.createElement("span"),i=t.theme.image;return i!==void 0&&(n.className=i),n}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(t){this.getWritable().__title=t}setSrc(t){this.getWritable().__src=t}setAltText(t){this.getWritable().__altText=t??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(t){return S.createElement(o6,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function Cr(e){const{altText:t,title:n,src:r,key:i,width:o,height:s,rest:l}=e;return new ho(r,t,n,o,s,l,i)}function xs(e){return e instanceof ho}const u6={testLexicalNode:xs,visitLexicalNode({mdastParent:e,lexicalNode:t,actions:n}){if(t.shouldBeSerializedAsElement()){const r=new Image;t.getHeight()!=="inherit"&&(r.height=t.getHeight()),t.getWidth()!=="inherit"&&(r.width=t.getWidth()),t.getAltText()&&(r.alt=t.getAltText()),t.getTitle()&&(r.title=t.getTitle());for(const i of t.getRest())i.type==="mdxJsxAttribute"&&typeof i.value=="string"&&r.setAttribute(i.name,i.value);n.appendToParent(e,{type:"html",value:r.outerHTML.replace(/>$/,` src="${t.getSrc()}" />`)})}else n.appendToParent(e,{type:"image",url:t.getSrc(),alt:t.getAltText(),title:t.getTitle()})}},c6={testNode:"image",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Cr({src:e.url,altText:e.alt??"",title:e.title??""}))}},d6={testNode:e=>e.type==="html"&&e.value.trim().startsWith("<img"),visitNode({mdastNode:e,lexicalParent:t}){const n=document.createElement("div");n.innerHTML=e.value;const r=n.querySelector("img");if(!r)throw new Error("Invalid HTML image");const i=r.src,o=r.alt,s=r.title,l=r.width,a=r.height,u=Cr({src:i||"",altText:o,title:s,width:l,height:a});if(t.getType()==="root"){const c=ve();c.append(u),t.append(c)}else t.append(u)}};function mi(e,t){const n=e.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===t);if(n)return n.value}const f6={testNode:e=>(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement")&&e.name==="img",visitNode({mdastNode:e,lexicalParent:t}){const n=mi(e,"src");if(!n)return;const r=mi(e,"alt")??"",i=mi(e,"title"),o=mi(e,"height"),s=mi(e,"width"),l=e.attributes.filter(u=>u.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(u.name)),a=Cr({src:n,altText:r,title:i,width:s?parseInt(s,10):void 0,height:o?parseInt(o,10):void 0,rest:l});if(t.getType()==="root"){const u=ve();u.append(a),t.append(u)}else t.append(a)}},Rc=We(e=>{e.sub(e.pipe(Rc,Pe(Ve)),([t,n])=>{n==null||n.update(()=>{const r=Cr({altText:t.altText??"",src:t.src,title:t.title??""});Qr([r]),Me(r.getParentOrThrow())&&nc(r,ve).selectEnd()})})}),h6=We(e=>{e.sub(e.pipe(h6,Pe(Ln)),([t,n])=>{const r=i=>{e.pub(Rc,{...t,src:i})};"file"in t?n==null||n(t.file).then(r).catch(i=>{throw i}):r(t.src)})}),eu=te([]),tu=te(!1),Ln=te(null),nu=te(null),ru=te(null),or=te({type:"inactive"},e=>{e.sub(e.pipe(n0,Pe(Ve,Ln,or)),([t,n,r,i])=>{const o=i.type==="editing"?s=>{n==null||n.update(()=>{const{nodeKey:l}=i,a=Fe(l);a.setTitle(t.title),a.setAltText(t.altText),a.setSrc(s)}),e.pub(or,{type:"inactive"})}:s=>{e.pub(Rc,{...t,src:s}),e.pub(or,{type:"inactive"})};t.file&&t.file.length>0?r==null||r(t.file.item(0)).then(o).catch(s=>{throw s}):t.src&&o(t.src)}),e.pub(Wi,t=>{const n=e.getValue(Ln);return ht(t.registerCommand(ys,r=>{const i=Cr(r);return Qr([i]),Me(i.getParentOrThrow())&&nc(i,ve).selectEnd(),!0},ge),t.registerCommand(Ls,r=>x6(r),pa),t.registerCommand(Au,r=>y6(r,!!n),Ie),t.registerCommand(Iu,r=>b6(r,t,e.getValue(Ln)),pa),t.registerCommand(Gi,r=>{var i,o;if(!n){let u=Array.from(((i=r.clipboardData)==null?void 0:i.items)??[]);return u=u.filter(c=>c.type.includes("text")),!u.length||u.length===0}const s=Array.from(((o=r.clipboardData)==null?void 0:o.items)??[]);if(s.some(u=>!u.type.includes("image"))||!s.length||s.length===0)return!1;const a=e.getValue(Ln);return Promise.all(s.map(u=>a(u.getAsFile()))).then(u=>{u.forEach(c=>{t.dispatchCommand(ys,{src:c,altText:""})})}).catch(u=>{throw u}),!0},bn))})}),Xm=$n(e=>{e.link(e.pipe(Xm,rg({type:"new"})),or)}),Qm=We(e=>{e.link(e.pipe(Qm,Fr(t=>({type:"editing",...t}))),or)}),e0=$n(e=>{e.link(e.pipe(e0,rg({type:"inactive"})),or)}),t0=te(!1),n0=We(),iu=te(Xa),g6=Vt({init(e,t){e.pubIn({[vn]:[c6,d6,f6],[zn]:ho,[jn]:u6,[_r]:(t==null?void 0:t.ImageDialog)??e6,[Ln]:(t==null?void 0:t.imageUploadHandler)??null,[eu]:(t==null?void 0:t.imageAutocompleteSuggestions)??[],[tu]:!!(t!=null&&t.disableImageResize),[t0]:!!(t!=null&&t.disableImageSettingsButton),[nu]:(t==null?void 0:t.imagePreviewHandler)??null,[iu]:(t==null?void 0:t.EditImageToolbar)??Xa,[ru]:(t==null?void 0:t.imagePlaceholder)??ih})},update(e,t){e.pubIn({[Ln]:(t==null?void 0:t.imageUploadHandler)??null,[eu]:(t==null?void 0:t.imageAutocompleteSuggestions)??[],[tu]:!!(t!=null&&t.disableImageResize),[nu]:(t==null?void 0:t.imagePreviewHandler)??null,[iu]:(t==null?void 0:t.EditImageToolbar)??Xa,[ru]:(t==null?void 0:t.imagePlaceholder)??ih})}}),p6=e=>R1?(e??window).getSelection():null,ys=_n(),m6="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function x6(e){const t=Oc();if(!t)return!1;const n=e.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const r=document.createElement("img");return r.src=m6,n.setDragImage(r,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:t.__altText,title:t.__title,key:t.getKey(),src:t.__src},type:"image"})),!0}function y6(e,t){var n;if(t){let i=Array.from(((n=e.dataTransfer)==null?void 0:n.items)??[]);if(i=i.filter(o=>o.type.includes("image")),i.length>0)return e.preventDefault(),!0}return Oc()?(r0(e)||e.preventDefault(),!0):!1}function b6(e,t,n){var r;let i=Array.from(((r=e.dataTransfer)==null?void 0:r.items)??[]);if(i=i.filter(l=>l.type.includes("image")),i.length>0&&n!==null)return e.preventDefault(),Promise.all(i.map(l=>l.kind==="string"?new Promise(a=>{l.getAsString(a)}):n(l.getAsFile()))).then(l=>{l.forEach(a=>{t.dispatchCommand(ys,{src:a,altText:""})})}).catch(l=>{throw l}),!0;const o=Oc();if(!o)return!1;const s=v6(e);if(!s)return!1;if(e.preventDefault(),r0(e)){const l=_6(e);o.remove();const a=Qi();l!=null&&a.applyDOMRange(l),Be(a),t.dispatchCommand(ys,s)}return!0}function Oc(){const e=U();if(!ze(e))return null;const n=e.getNodes()[0];return xs(n)?n:null}function v6(e){var t;const n=(t=e.dataTransfer)==null?void 0:t.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);return r!=="image"?null:i}function r0(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&t.parentElement)}function _6(e){let t;const n=e.target,r=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,i=p6(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&i!==null)i.collapse(e.rangeParent,e.rangeOffset??0),t=i.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}const C6={testNode:"blockquote",visitNode({actions:e}){e.addAndStepInto(oo())}},w6={testLexicalNode:ka,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r={type:"paragraph",children:[]};n.appendToParent(t,{type:"blockquote",children:[r]}),n.visitChildren(e,r)}},k6=Vt({init(e){e.pubIn({[ii]:"quote",[vn]:C6,[zn]:js,[jn]:w6})}});function S6(){let e=Pr;return{publish:()=>{e()},subscribe:t=>{e=t}}}var E6=Object.defineProperty,T6=(e,t,n)=>t in e?E6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tn=(e,t,n)=>(T6(e,typeof t!="symbol"?t+"":t,n),n);class li extends to{constructor(t,n,r,i){super(i),Tn(this,"__code"),Tn(this,"__meta"),Tn(this,"__language"),Tn(this,"__focusEmitter",S6()),Tn(this,"setCode",o=>{o!==this.__code&&(this.getWritable().__code=o)}),Tn(this,"setMeta",o=>{o!==this.__meta&&(this.getWritable().__meta=o)}),Tn(this,"setLanguage",o=>{o!==this.__language&&(this.getWritable().__language=o)}),Tn(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=t,this.__meta=r,this.__language=n}static getType(){return"codeblock"}static clone(t){return new li(t.__code,t.__language,t.__meta,t.__key)}static importJSON(t){const{code:n,meta:r,language:i}=t;return go({code:n,language:i,meta:r})}static importDOM(){return{pre:()=>({conversion:F6,priority:3})}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(t){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(t){return S.createElement(N6,{parentEditor:t,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const i0=S.createContext(null),I6=({parentEditor:e,lexicalNode:t,children:n})=>{const r=S.useMemo(()=>({lexicalNode:t,parentEditor:e,setCode:i=>{e.update(()=>{t.setCode(i),setTimeout(()=>{e.dispatchCommand(cc,void 0)},0)})},setLanguage:i=>{e.update(()=>{t.setLanguage(i)})},setMeta:i=>{e.update(()=>{t.setMeta(i)})}}),[t,e]);return S.createElement(i0.Provider,{value:r},n)};function A6(){const e=S.useContext(i0);if(!e)throw new Error("useCodeBlockEditor must be used within a CodeBlockEditor");return e}const N6=e=>{const t=wt(Gs),n=wt($c);let r=t.sort((a,u)=>u.priority-a.priority).find(a=>a.match(e.language||"",e.meta||""));if(r||(r=t.find(a=>a.match(n||"",e.meta||""))),!r)throw new Error(`No CodeBlockEditor registered for language=${e.language} meta=${e.meta}`);const i=r.Editor,{codeBlockNode:o,parentEditor:s,...l}=e;return S.createElement(I6,{parentEditor:e.parentEditor,lexicalNode:e.codeBlockNode},S.createElement(i,{...l}))};function go(e){const{code:t="",language:n="",meta:r=""}=e;return new li(t,n,r)}function L6(e){return e instanceof li}function F6(e){const t=e,n=t.textContent??"",r=e.getAttribute("class")??"",i=e.getAttribute("data-language")??"",o=r.match(/language-(\w+)/),s=o?o[1]:i,l=t.getAttribute("data-meta")??"";return{node:go({code:n,language:s,meta:l})}}const P6={testLexicalNode:L6,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("code",{value:e.getCode(),lang:e.getLanguage(),meta:e.getMeta()})}},M6={testNode:(e,{codeBlockEditorDescriptors:t})=>e.type==="code"?t.find(r=>r.match(e.lang,e.meta))!==void 0:!1,visitNode({mdastNode:e,actions:t}){t.addAndStepInto(go({code:e.value,language:e.lang,meta:e.meta}))}},$c=te(""),R6=We(e=>{e.link(e.pipe(R6,Pe($c),Fr(([t,n])=>()=>go({language:n,...t}))),N1)});ut(Gs);const O6=Vt({update(e,t){e.pub($c,(t==null?void 0:t.defaultCodeBlockLanguage)??"")},init(e,t){e.pubIn({[ii]:"codeblock",[Gs]:(t==null?void 0:t.codeBlockEditorDescriptors)??[],[vn]:M6,[zn]:li,[jn]:P6})}});function xh(e,[t,n]){return Math.min(n,Math.max(t,e))}var $6=[" ","Enter","ArrowUp","ArrowDown"],D6=[" ","Enter"],yr="Select",[tl,nl,V6]=im(yr),[ai,$k]=qr(yr,[V6,vs]),rl=vs(),[H6,Kn]=ai(yr),[B6,z6]=ai(yr),o0=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:l,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:f,required:h,form:g}=e,x=rl(t),[b,y]=N.useState(null),[m,p]=N.useState(null),[v,k]=N.useState(!1),_=Qs(u),[C,w]=sr({prop:r,defaultProp:i??!1,onChange:o,caller:yr}),[T,F]=sr({prop:s,defaultProp:l,onChange:a,caller:yr}),M=N.useRef(null),R=b?g||!!b.closest("form"):!0,[L,H]=N.useState(new Set),B=Array.from(L).map(q=>q.props.value).join(";");return P.jsx(Dh,{...x,children:P.jsxs(H6,{required:h,scope:t,trigger:b,onTriggerChange:y,valueNode:m,onValueNodeChange:p,valueNodeHasChildren:v,onValueNodeHasChildrenChange:k,contentId:Ki(),value:T,onValueChange:F,open:C,onOpenChange:w,dir:_,triggerPointerDownPosRef:M,disabled:f,children:[P.jsx(tl.Provider,{scope:t,children:P.jsx(B6,{scope:e.__scopeSelect,onNativeOptionAdd:N.useCallback(q=>{H(Z=>new Set(Z).add(q))},[]),onNativeOptionRemove:N.useCallback(q=>{H(Z=>{const ne=new Set(Z);return ne.delete(q),ne})},[]),children:n})}),R?P.jsxs(S0,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:q=>F(q.target.value),disabled:f,form:g,children:[T===void 0?P.jsx("option",{value:""}):null,Array.from(L)]},B):null]})})};o0.displayName=yr;var s0="SelectTrigger",l0=N.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=rl(n),s=Kn(s0,n),l=s.disabled||r,a=at(t,s.onTriggerChange),u=nl(n),c=N.useRef("touch"),[d,f,h]=T0(x=>{const b=u().filter(p=>!p.disabled),y=b.find(p=>p.value===s.value),m=I0(b,x,y);m!==void 0&&s.onValueChange(m.value)}),g=x=>{l||(s.onOpenChange(!0),h()),x&&(s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return P.jsx(hu,{asChild:!0,...o,children:P.jsx(Re.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":E0(s.value)?"":void 0,...i,ref:a,onClick:ye(i.onClick,x=>{x.currentTarget.focus(),c.current!=="mouse"&&g(x)}),onPointerDown:ye(i.onPointerDown,x=>{c.current=x.pointerType;const b=x.target;b.hasPointerCapture(x.pointerId)&&b.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(g(x),x.preventDefault())}),onKeyDown:ye(i.onKeyDown,x=>{const b=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(b&&x.key===" ")&&$6.includes(x.key)&&(g(),x.preventDefault())})})})});l0.displayName=s0;var a0="SelectValue",u0=N.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...l}=e,a=Kn(a0,n),{onValueNodeHasChildrenChange:u}=a,c=o!==void 0,d=at(t,a.onValueNodeChange);return Pn(()=>{u(c)},[u,c]),P.jsx(Re.span,{...l,ref:d,style:{pointerEvents:"none"},children:E0(a.value)?P.jsx(P.Fragment,{children:s}):o})});u0.displayName=a0;var j6="SelectIcon",c0=N.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return P.jsx(Re.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});c0.displayName=j6;var U6="SelectPortal",d0=e=>P.jsx(Vh,{asChild:!0,...e});d0.displayName=U6;var br="SelectContent",f0=N.forwardRef((e,t)=>{const n=Kn(br,e.__scopeSelect),[r,i]=N.useState();if(Pn(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?zo.createPortal(P.jsx(h0,{scope:e.__scopeSelect,children:P.jsx(tl.Slot,{scope:e.__scopeSelect,children:P.jsx("div",{children:e.children})})}),o):null}return P.jsx(g0,{...e,ref:t})});f0.displayName=br;var At=10,[h0,Zn]=ai(br),W6="SelectContentImpl",J6=Bo("SelectContent.RemoveScroll"),g0=N.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:x,avoidCollisions:b,...y}=e,m=Kn(br,n),[p,v]=N.useState(null),[k,_]=N.useState(null),C=at(t,j=>v(j)),[w,T]=N.useState(null),[F,M]=N.useState(null),R=nl(n),[L,H]=N.useState(!1),B=N.useRef(!1);N.useEffect(()=>{if(p)return Bh(p)},[p]),jh();const q=N.useCallback(j=>{const[W,...Y]=R().map(ue=>ue.ref.current),[X]=Y.slice(-1),ie=document.activeElement;for(const ue of j)if(ue===ie||(ue==null||ue.scrollIntoView({block:"nearest"}),ue===W&&k&&(k.scrollTop=0),ue===X&&k&&(k.scrollTop=k.scrollHeight),ue==null||ue.focus(),document.activeElement!==ie))return},[R,k]),Z=N.useCallback(()=>q([w,p]),[q,w,p]);N.useEffect(()=>{L&&Z()},[L,Z]);const{onOpenChange:ne,triggerPointerDownPosRef:ee}=m;N.useEffect(()=>{if(p){let j={x:0,y:0};const W=X=>{var ie,ue;j={x:Math.abs(Math.round(X.pageX)-(((ie=ee.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round(X.pageY)-(((ue=ee.current)==null?void 0:ue.y)??0))}},Y=X=>{j.x<=10&&j.y<=10?X.preventDefault():p.contains(X.target)||ne(!1),document.removeEventListener("pointermove",W),ee.current=null};return ee.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",Y,{capture:!0})}}},[p,ne,ee]),N.useEffect(()=>{const j=()=>ne(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[ne]);const[I,oe]=T0(j=>{const W=R().filter(ie=>!ie.disabled),Y=W.find(ie=>ie.ref.current===document.activeElement),X=I0(W,j,Y);X&&setTimeout(()=>X.ref.current.focus())}),ce=N.useCallback((j,W,Y)=>{const X=!B.current&&!Y;(m.value!==void 0&&m.value===W||X)&&(T(j),X&&(B.current=!0))},[m.value]),A=N.useCallback(()=>p==null?void 0:p.focus(),[p]),de=N.useCallback((j,W,Y)=>{const X=!B.current&&!Y;(m.value!==void 0&&m.value===W||X)&&M(j)},[m.value]),he=r==="popper"?ou:p0,se=he===ou?{side:l,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:x,avoidCollisions:b}:{};return P.jsx(h0,{scope:n,content:p,viewport:k,onViewportChange:_,itemRefCallback:ce,selectedItem:w,onItemLeave:A,itemTextRefCallback:de,focusSelectedItem:Z,selectedItemText:F,position:r,isPositioned:L,searchRef:I,children:P.jsx(zh,{as:J6,allowPinchZoom:!0,children:P.jsx(Uh,{asChild:!0,trapped:m.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:ye(i,j=>{var W;(W=m.trigger)==null||W.focus({preventScroll:!0}),j.preventDefault()}),children:P.jsx(Wh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:P.jsx(he,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:j=>j.preventDefault(),...y,...se,onPlaced:()=>H(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ye(y.onKeyDown,j=>{const W=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!W&&j.key.length===1&&oe(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let X=R().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(j.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const ie=j.target,ue=X.indexOf(ie);X=X.slice(ue+1)}setTimeout(()=>q(X)),j.preventDefault()}})})})})})})});g0.displayName=W6;var K6="SelectItemAlignedPosition",p0=N.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Kn(br,n),s=Zn(br,n),[l,a]=N.useState(null),[u,c]=N.useState(null),d=at(t,C=>c(C)),f=nl(n),h=N.useRef(!1),g=N.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:y,focusSelectedItem:m}=s,p=N.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&x&&b&&y){const C=o.trigger.getBoundingClientRect(),w=u.getBoundingClientRect(),T=o.valueNode.getBoundingClientRect(),F=y.getBoundingClientRect();if(o.dir!=="rtl"){const ie=F.left-w.left,ue=T.left-ie,Ae=C.left-ue,He=C.width+Ae,Je=Math.max(He,w.width),Ke=window.innerWidth-At,Ge=xh(ue,[At,Math.max(At,Ke-Je)]);l.style.minWidth=He+"px",l.style.left=Ge+"px"}else{const ie=w.right-F.right,ue=window.innerWidth-T.right-ie,Ae=window.innerWidth-C.right-ue,He=C.width+Ae,Je=Math.max(He,w.width),Ke=window.innerWidth-At,Ge=xh(ue,[At,Math.max(At,Ke-Je)]);l.style.minWidth=He+"px",l.style.right=Ge+"px"}const M=f(),R=window.innerHeight-At*2,L=x.scrollHeight,H=window.getComputedStyle(u),B=parseInt(H.borderTopWidth,10),q=parseInt(H.paddingTop,10),Z=parseInt(H.borderBottomWidth,10),ne=parseInt(H.paddingBottom,10),ee=B+q+L+ne+Z,I=Math.min(b.offsetHeight*5,ee),oe=window.getComputedStyle(x),ce=parseInt(oe.paddingTop,10),A=parseInt(oe.paddingBottom,10),de=C.top+C.height/2-At,he=R-de,se=b.offsetHeight/2,j=b.offsetTop+se,W=B+q+j,Y=ee-W;if(W<=de){const ie=M.length>0&&b===M[M.length-1].ref.current;l.style.bottom="0px";const ue=u.clientHeight-x.offsetTop-x.offsetHeight,Ae=Math.max(he,se+(ie?A:0)+ue+Z),He=W+Ae;l.style.height=He+"px"}else{const ie=M.length>0&&b===M[0].ref.current;l.style.top="0px";const Ae=Math.max(de,B+x.offsetTop+(ie?ce:0)+se)+Y;l.style.height=Ae+"px",x.scrollTop=W-de+x.offsetTop}l.style.margin=`${At}px 0`,l.style.minHeight=I+"px",l.style.maxHeight=R+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,o.trigger,o.valueNode,l,u,x,b,y,o.dir,r]);Pn(()=>p(),[p]);const[v,k]=N.useState();Pn(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const _=N.useCallback(C=>{C&&g.current===!0&&(p(),m==null||m(),g.current=!1)},[p,m]);return P.jsx(G6,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:_,children:P.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:v},children:P.jsx(Re.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});p0.displayName=K6;var Z6="SelectPopperPosition",ou=N.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=At,...o}=e,s=rl(n);return P.jsx(Jh,{...s,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ou.displayName=Z6;var[G6,Dc]=ai(br,{}),su="SelectViewport",m0=N.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Zn(su,n),s=Dc(su,n),l=at(t,o.onViewportChange),a=N.useRef(0);return P.jsxs(P.Fragment,{children:[P.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),P.jsx(tl.Slot,{scope:n,children:P.jsx(Re.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ye(i.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f!=null&&f.current&&d){const h=Math.abs(a.current-c.scrollTop);if(h>0){const g=window.innerHeight-At*2,x=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),y=Math.max(x,b);if(y<g){const m=y+h,p=Math.min(g,m),v=m-p;d.style.height=p+"px",d.style.bottom==="0px"&&(c.scrollTop=v>0?v:0,d.style.justifyContent="flex-end")}}}a.current=c.scrollTop})})})]})});m0.displayName=su;var x0="SelectGroup",[q6,Y6]=ai(x0),X6=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ki();return P.jsx(q6,{scope:n,id:i,children:P.jsx(Re.div,{role:"group","aria-labelledby":i,...r,ref:t})})});X6.displayName=x0;var y0="SelectLabel",Q6=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Y6(y0,n);return P.jsx(Re.div,{id:i.id,...r,ref:t})});Q6.displayName=y0;var bs="SelectItem",[e8,b0]=ai(bs),v0=N.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,l=Kn(bs,n),a=Zn(bs,n),u=l.value===r,[c,d]=N.useState(o??""),[f,h]=N.useState(!1),g=at(t,m=>{var p;return(p=a.itemRefCallback)==null?void 0:p.call(a,m,r,i)}),x=Ki(),b=N.useRef("touch"),y=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return P.jsx(e8,{scope:n,value:r,disabled:i,textId:x,isSelected:u,onItemTextChange:N.useCallback(m=>{d(p=>p||((m==null?void 0:m.textContent)??"").trim())},[]),children:P.jsx(tl.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:P.jsx(Re.div,{role:"option","aria-labelledby":x,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:g,onFocus:ye(s.onFocus,()=>h(!0)),onBlur:ye(s.onBlur,()=>h(!1)),onClick:ye(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:ye(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:ye(s.onPointerDown,m=>{b.current=m.pointerType}),onPointerMove:ye(s.onPointerMove,m=>{var p;b.current=m.pointerType,i?(p=a.onItemLeave)==null||p.call(a):b.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ye(s.onPointerLeave,m=>{var p;m.currentTarget===document.activeElement&&((p=a.onItemLeave)==null||p.call(a))}),onKeyDown:ye(s.onKeyDown,m=>{var v;((v=a.searchRef)==null?void 0:v.current)!==""&&m.key===" "||(D6.includes(m.key)&&y(),m.key===" "&&m.preventDefault())})})})})});v0.displayName=bs;var Ci="SelectItemText",_0=N.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=Kn(Ci,n),l=Zn(Ci,n),a=b0(Ci,n),u=z6(Ci,n),[c,d]=N.useState(null),f=at(t,y=>d(y),a.onItemTextChange,y=>{var m;return(m=l.itemTextRefCallback)==null?void 0:m.call(l,y,a.value,a.disabled)}),h=c==null?void 0:c.textContent,g=N.useMemo(()=>P.jsx("option",{value:a.value,disabled:a.disabled,children:h},a.value),[a.disabled,a.value,h]),{onNativeOptionAdd:x,onNativeOptionRemove:b}=u;return Pn(()=>(x(g),()=>b(g)),[x,b,g]),P.jsxs(P.Fragment,{children:[P.jsx(Re.span,{id:a.textId,...o,ref:f}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?zo.createPortal(o.children,s.valueNode):null]})});_0.displayName=Ci;var C0="SelectItemIndicator",t8=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b0(C0,n).isSelected?P.jsx(Re.span,{"aria-hidden":!0,...r,ref:t}):null});t8.displayName=C0;var lu="SelectScrollUpButton",n8=N.forwardRef((e,t)=>{const n=Zn(lu,e.__scopeSelect),r=Dc(lu,e.__scopeSelect),[i,o]=N.useState(!1),s=at(t,r.onScrollButtonChange);return Pn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=a.scrollTop>0;o(u)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?P.jsx(w0,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});n8.displayName=lu;var au="SelectScrollDownButton",r8=N.forwardRef((e,t)=>{const n=Zn(au,e.__scopeSelect),r=Dc(au,e.__scopeSelect),[i,o]=N.useState(!1),s=at(t,r.onScrollButtonChange);return Pn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,c=Math.ceil(a.scrollTop)<u;o(c)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?P.jsx(w0,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});r8.displayName=au;var w0=N.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Zn("SelectScrollButton",n),s=N.useRef(null),l=nl(n),a=N.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return N.useEffect(()=>()=>a(),[a]),Pn(()=>{var c;const u=l().find(d=>d.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[l]),P.jsx(Re.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ye(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:ye(i.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:ye(i.onPointerLeave,()=>{a()})})}),i8="SelectSeparator",k0=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return P.jsx(Re.div,{"aria-hidden":!0,...r,ref:t})});k0.displayName=i8;var uu="SelectArrow",o8=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=rl(n),o=Kn(uu,n),s=Zn(uu,n);return o.open&&s.position==="popper"?P.jsx(Hh,{...i,...r,ref:t}):null});o8.displayName=uu;var s8="SelectBubbleInput",S0=N.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=N.useRef(null),o=at(r,i),s=d5(t);return N.useEffect(()=>{const l=i.current;if(!l)return;const a=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==t&&c){const d=new Event("change",{bubbles:!0});c.call(l,t),l.dispatchEvent(d)}},[s,t]),P.jsx(Re.select,{...n,style:{...k5,...n.style},ref:o,defaultValue:t})});S0.displayName=s8;function E0(e){return e===""||e===void 0}function T0(e){const t=Kh(e),n=N.useRef(""),r=N.useRef(0),i=N.useCallback(s=>{const l=n.current+s;t(l),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(l)},[t]),o=N.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function I0(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=l8(e,Math.max(o,0));i.length===1&&(s=s.filter(u=>u!==n));const a=s.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}function l8(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var a8=o0,u8=l0,c8=u0,d8=c0,f8=d0,h8=f0,g8=m0,p8=v0,m8=_0,x8=k0;const Vc=S.forwardRef(({title:e,children:t},n)=>{const r=wt(ao);return S.createElement(Zh,{delayDuration:100},S.createElement(Gh,null,S.createElement(qh,{ref:n,asChild:!0},S.createElement("span",{className:G.tooltipTrigger},t)),S.createElement(Yh,{container:r==null?void 0:r.current},S.createElement(Xh,{className:Ce(G.tooltipContent),sideOffset:10},e))))}),y8=S.forwardRef(({children:e,className:t,...n},r)=>S.createElement(p8,{...n,ref:r,className:Ce(t,G.selectItem)},S.createElement(m8,null,e))),b8=({title:e,placeholder:t,className:n})=>{const[r,i]=nn(Dt,Un);return S.createElement(Vc,{title:e},S.createElement(u8,{"aria-label":t,className:Ce(G.selectTrigger,n),"data-toolbar-item":!0,disabled:r},S.createElement(c8,{placeholder:t}),S.createElement(d8,{className:G.selectDropdownArrow},i("arrow_drop_down"))))},v8=({children:e,className:t=G.selectContainer})=>{const n=wt(ao);return S.createElement(f8,{container:n==null?void 0:n.current},S.createElement(h8,{className:Ce(t,"mdxeditor-select-content"),onCloseAutoFocus:r=>{r.preventDefault()},position:"popper"},S.createElement(g8,{"data-editor-dropdown":!0},e)))},_8=e=>S.createElement(a8,{value:e.value||"",onValueChange:e.onChange,disabled:e.disabled},S.createElement(b8,{title:e.triggerTitle,placeholder:e.placeholder}),S.createElement(v8,null,e.items.map((t,n)=>t==="separator"?S.createElement(x8,{key:n}):S.createElement(y8,{key:n,value:t.value},t.label))));function C8(e){try{const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?Od(n)?r:i:Od(t)?r:i}catch{return null}}function A0(e){const t=U(),n=window.getSelection(),r=document.activeElement,i=e.getRootElement();if(t!==null&&n!==null&&i!==null&&i.contains(n.anchorNode)&&e.isEditable()){const o=n.getRangeAt(0);let s;if(n.isCollapsed){let l=n.anchorNode;(l==null?void 0:l.nodeType)==3&&(l=l.parentNode),s=l.getBoundingClientRect(),s.width=0}else if(n.anchorNode===i){let l=i;for(;l.firstElementChild!=null;)l=l.firstElementChild;s=l.getBoundingClientRect()}else s=o.getBoundingClientRect();return{top:Math.round(s.top),left:Math.round(s.left),width:Math.round(s.width),height:Math.round(s.height)}}else if(!r||r.className!=="link-input")return null;return null}function w8({url:e,title:t,onSubmit:n,onCancel:r,linkAutocompleteSuggestions:i}){const{register:o,handleSubmit:s,control:l,setValue:a,reset:u}=fu({values:{url:e,title:t}}),c=wn();return S.createElement("form",{onSubmit:d=>{s(n)(d),d.stopPropagation(),d.preventDefault()},onReset:d=>{d.stopPropagation(),r()},className:Ce(G.multiFieldForm,G.linkDialogEditForm)},S.createElement("div",{className:G.formField},S.createElement("label",{htmlFor:"link-url"},c("createLink.url","URL")),S.createElement(Ym,{register:o,initialInputValue:e,inputName:"url",suggestions:i,setValue:a,control:l,placeholder:c("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),S.createElement("div",{className:G.formField},S.createElement("label",{htmlFor:"link-title"},c("createLink.title","Title")),S.createElement("input",{id:"link-title",className:G.textInput,size:40,...o("title")})),S.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},S.createElement("button",{type:"submit",title:c("createLink.saveTooltip","Set URL"),"aria-label":c("createLink.saveTooltip","Set URL"),className:Ce(G.primaryButton)},c("dialogControls.save","Save")),S.createElement("button",{type:"reset",title:c("createLink.cancelTooltip","Cancel change"),"aria-label":c("createLink.cancelTooltip","Cancel change"),className:Ce(G.secondaryButton)},c("dialogControls.cancel","Cancel"))))}const k8=()=>{const[e,t,n,r,i,o]=nn(ao,Ve,Un,ot,O0,$0),s=xt(N0),l=xt(L0),a=xt(F0),u=xt(P0),c=xt(M0);S.useEffect(()=>{const b=()=>{t==null||t.getEditorState().read(()=>{s(!0)})};return window.addEventListener("resize",b),window.addEventListener("scroll",b),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b)}},[t,s]);const[d,f]=S.useState(!1),h=wn();if(r.type==="inactive")return null;const g=r.rectangle,x=r.type==="preview"&&r.url.startsWith("http");return S.createElement(p3,{open:!0},S.createElement(m3,{"data-visible":r.type==="edit",className:G.linkDialogAnchor,style:{top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`,height:`${g.height}px`}}),S.createElement(x3,{container:e==null?void 0:e.current},S.createElement(y3,{className:Ce(G.linkDialogPopoverContent),sideOffset:5,onOpenAutoFocus:b=>{b.preventDefault()},key:r.linkNodeKey},r.type==="edit"&&S.createElement(w8,{url:r.url,title:r.title,onSubmit:l,onCancel:a.bind(null),linkAutocompleteSuggestions:i}),r.type==="preview"&&S.createElement(S.Fragment,null,S.createElement("a",{className:G.linkDialogPreviewAnchor,href:r.url,...x?{target:"_blank",rel:"noreferrer"}:{},onClick:b=>{o!==null&&(b.preventDefault(),o(r.url))},title:x?h("linkPreview.open","Open {{url}} in new window",{url:r.url}):r.url},S.createElement("span",null,r.url),x&&n("open_in_new")),S.createElement(Ul,{onClick:()=>{u()},title:h("linkPreview.edit","Edit link URL"),"aria-label":h("linkPreview.edit","Edit link URL")},n("edit")),S.createElement(Zh,null,S.createElement(Gh,{open:d},S.createElement(qh,{asChild:!0},S.createElement(Ul,{title:h("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":h("linkPreview.copyToClipboard","Copy to clipboard"),onClick:()=>{window.navigator.clipboard.writeText(r.url).then(()=>{f(!0),setTimeout(()=>{f(!1)},1e3)})}},n(d?"check":"content_copy"))),S.createElement(Yh,{container:e==null?void 0:e.current},S.createElement(Xh,{className:Ce(G.tooltipContent),sideOffset:5},h("linkPreview.copied","Copied!"),S.createElement(S5,null))))),S.createElement(Ul,{title:h("linkPreview.remove","Remove link"),"aria-label":h("linkPreview.remove","Remove link"),onClick:()=>{c()}},n("link_off"))),S.createElement(b3,{className:G.popoverArrow}))))},Ul=S.forwardRef(({className:e,...t},n)=>S.createElement("button",{className:Ce(G.actionButton,e),ref:n,...t}));function cu(e){if(!e)return null;const t=C8(e);if(t===null)return null;const n=t.getParent();return Gt(n)?n:Gt(t)?t:null}const N0=We(),ot=te({type:"inactive"},e=>{e.pub(Wi,t=>t.registerCommand(qi,()=>e.getValue(ot).type==="preview"?(e.pub(ot,{type:"inactive"}),!0):!1,Ie)),e.sub(e.pipe(cs),t=>{t!=="rich-text"&&e.pub(ot,{type:"inactive"})}),e.pub(Wi,t=>t.registerCommand(Eg,n=>{if(n.key==="k"&&(fs?n.metaKey:n.ctrlKey)&&!e.getValue(Dt)){const r=U();return D(r)?(e.pub(R0),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},pa)),e.link(e.pipe(P0,Pe(ot),Fr(([,t])=>{if(t.type==="preview")return{type:"edit",initialUrl:t.url,url:t.url,title:t.title,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot switch to edit mode when not in preview mode")})),ot),e.sub(e.pipe(L0,Pe(Ve,ot,Kr)),([t,n,r,i])=>{var o,s;const l=((o=t.url)==null?void 0:o.trim())??"",a=((s=t.title)==null?void 0:s.trim())??"";if(l!==""){if(i!=null&&i.isCollapsed()){const u=a||l;n==null||n.update(()=>{const c=cu(i);if(c)c.setURL(l),c.setTitle(a);else{const d=xr(l,{title:a});d.append(Ne(u)),Qr([d]),d.select()}},{discrete:!0})}else n==null||n.dispatchCommand(Gr,{url:l,title:a});e.pub(ot,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:a,url:l})}else r.type==="edit"&&r.initialUrl!==""&&(n==null||n.dispatchCommand(Gr,null)),e.pub(ot,{type:"inactive"})}),e.link(e.pipe(F0,Pe(ot,Ve),Fr(([,t,n])=>{if(t.type==="edit")return n==null||n.focus(),t.initialUrl===""?{type:"inactive"}:{type:"preview",url:t.initialUrl,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),ot),e.link(e.pipe(e.combine(Kr,N0),Pe(Ve,ot,Dt),Fr(([[t],n,r,i])=>{if(D(t)&&n&&!i){const o=cu(t);if(o){const s=A0(n);return s?{type:"preview",url:o.getURL(),linkNodeKey:o.getKey(),title:o.getTitle(),rectangle:s}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),ot)}),L0=We(),F0=$n();$n();const P0=$n(),M0=$n(e=>{e.sub(e.pipe(M0,Pe(Ve)),([,t])=>{t==null||t.dispatchCommand(Gr,null)})}),R0=$n(e=>{e.sub(e.pipe(R0,Pe(Kr,Ve),Zi(([,t])=>D(t))),([,t,n])=>{n==null||n.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const r=cu(t),i=A0(n);r?e.pub(ot,{type:"edit",initialUrl:r.getURL(),initialTitle:r.getTitle()??"",url:r.getURL(),title:r.getTitle()??"",linkNodeKey:r.getKey(),rectangle:i}):e.pub(ot,{type:"edit",initialUrl:"",initialTitle:"",title:"",url:"",linkNodeKey:"",rectangle:i})})})})})}),O0=te([]),$0=te(null),D0=te(null,e=>{e.pub(Wi,t=>{function n(r){const[i,o]=e.getValues([Dt,D0]);!i||o===null||t.update(()=>{const s=en(r.target);if(s!==null){const l=Vn(s,a=>a instanceof kn);l!==null&&o(r,l,l.getURL())}})}return t.registerRootListener((r,i)=>{r&&r.addEventListener("click",n),i&&i.removeEventListener("click",n)})})}),S8=Vt({init(e,t){e.pub(_r,(t==null?void 0:t.LinkDialog)??k8),e.pub($0,(t==null?void 0:t.onClickLinkCallback)??null),e.pub(D0,(t==null?void 0:t.onReadOnlyClickLinkCallback)??null)},update(e,t={}){e.pub(O0,t.linkAutocompleteSuggestions??[])}});function Hc(e,t){return S.forwardRef((n,r)=>{const i=Ce(t.className,n.className);return S.createElement(e,{...t,...n,className:i,ref:r})})}const E8=({readOnly:e,children:t,className:n})=>S.createElement(j3,{className:Ce("mdxeditor-toolbar",G.toolbarRoot,{[G.readOnlyToolbarRoot]:e},n),...e?{tabIndex:-1}:{}},t);Hc(Im,{className:G.toolbarButton,"data-toolbar-item":!0});const T8=Hc(W3,{className:G.toolbarToggleItem,"data-toolbar-item":!0});Hc(Am,{type:"single",className:G.toolbarToggleSingleGroup});const V0=S.forwardRef(({on:e,title:t,children:n,disabled:r,...i},o)=>S.createElement(Am,{type:"single",className:G.toolbarToggleSingleGroup,...i,value:e?"on":"off",ref:o},S.createElement(T8,{"aria-label":t,value:"on",disabled:r},S.createElement(Vc,{title:t},n)))),I8=({items:e})=>S.createElement("div",{className:G.toolbarGroupOfGroups},e.map((t,n)=>S.createElement(V0,{key:n,title:t.title,on:t.active,onValueChange:r=>{t.onChange(r==="on")},disabled:t.disabled},t.contents))),A8=U3,Wl=te(()=>null),Jl=te(""),yh=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components</> }}` to the toolbarPlugin to customize it.",N8=Vt({init(e,t){const n=(t==null?void 0:t.toolbarPosition)==="bottom"?KC:JC;e.pubIn({[Wl]:(t==null?void 0:t.toolbarContents)??yh,[Jl]:(t==null?void 0:t.toolbarClassName)??"",[n]:()=>{const[r,i,o]=nn(Wl,Dt,Jl);return S.createElement(E8,{className:o,readOnly:i},r())}})},update(e,t){e.pub(Wl,(t==null?void 0:t.toolbarContents)??yh),e.pub(Jl,(t==null?void 0:t.toolbarClassName)??"")}});var Kl={exports:{}},bh;function L8(){return bh||(bh=1,function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
81
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
82
|
+
*
|
|
83
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
84
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
85
|
+
* @namespace
|
|
86
|
+
* @public
|
|
87
|
+
*/var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function m(p){return p instanceof a?new a(p.type,m(p.content),p.alias):Array.isArray(p)?p.map(m):p.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++o}),m.__id},clone:function m(p,v){v=v||{};var k,_;switch(l.util.type(p)){case"Object":if(_=l.util.objId(p),v[_])return v[_];k={},v[_]=k;for(var C in p)p.hasOwnProperty(C)&&(k[C]=m(p[C],v));return k;case"Array":return _=l.util.objId(p),v[_]?v[_]:(k=[],v[_]=k,p.forEach(function(w,T){k[T]=m(w,v)}),k);default:return p}},getLanguage:function(m){for(;m;){var p=i.exec(m.className);if(p)return p[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,p){m.className=m.className.replace(RegExp(i,"gi"),""),m.classList.add("language-"+p)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(k){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(m){var p=document.getElementsByTagName("script");for(var v in p)if(p[v].src==m)return p[v]}return null}},isActive:function(m,p,v){for(var k="no-"+p;m;){var _=m.classList;if(_.contains(p))return!0;if(_.contains(k))return!1;m=m.parentElement}return!!v}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(m,p){var v=l.util.clone(l.languages[m]);for(var k in p)v[k]=p[k];return v},insertBefore:function(m,p,v,k){k=k||l.languages;var _=k[m],C={};for(var w in _)if(_.hasOwnProperty(w)){if(w==p)for(var T in v)v.hasOwnProperty(T)&&(C[T]=v[T]);v.hasOwnProperty(w)||(C[w]=_[w])}var F=k[m];return k[m]=C,l.languages.DFS(l.languages,function(M,R){R===F&&M!=m&&(this[M]=C)}),C},DFS:function m(p,v,k,_){_=_||{};var C=l.util.objId;for(var w in p)if(p.hasOwnProperty(w)){v.call(p,w,p[w],k||w);var T=p[w],F=l.util.type(T);F==="Object"&&!_[C(T)]?(_[C(T)]=!0,m(T,v,null,_)):F==="Array"&&!_[C(T)]&&(_[C(T)]=!0,m(T,v,w,_))}}},plugins:{},highlightAll:function(m,p){l.highlightAllUnder(document,m,p)},highlightAllUnder:function(m,p,v){var k={callback:v,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),l.hooks.run("before-all-elements-highlight",k);for(var _=0,C;C=k.elements[_++];)l.highlightElement(C,p===!0,k.callback)},highlightElement:function(m,p,v){var k=l.util.getLanguage(m),_=l.languages[k];l.util.setLanguage(m,k);var C=m.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(C,k);var w=m.textContent,T={element:m,language:k,grammar:_,code:w};function F(R){T.highlightedCode=R,l.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,l.hooks.run("after-highlight",T),l.hooks.run("complete",T),v&&v.call(T.element)}if(l.hooks.run("before-sanity-check",T),C=T.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!T.code){l.hooks.run("complete",T),v&&v.call(T.element);return}if(l.hooks.run("before-highlight",T),!T.grammar){F(l.util.encode(T.code));return}if(p&&r.Worker){var M=new Worker(l.filename);M.onmessage=function(R){F(R.data)},M.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else F(l.highlight(T.code,T.grammar,T.language))},highlight:function(m,p,v){var k={code:m,grammar:p,language:v};if(l.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=l.tokenize(k.code,k.grammar),l.hooks.run("after-tokenize",k),a.stringify(l.util.encode(k.tokens),k.language)},tokenize:function(m,p){var v=p.rest;if(v){for(var k in v)p[k]=v[k];delete p.rest}var _=new d;return f(_,_.head,m),c(m,_,p,_.head,0),g(_)},hooks:{all:{},add:function(m,p){var v=l.hooks.all;v[m]=v[m]||[],v[m].push(p)},run:function(m,p){var v=l.hooks.all[m];if(!(!v||!v.length))for(var k=0,_;_=v[k++];)_(p)}},Token:a};r.Prism=l;function a(m,p,v,k){this.type=m,this.content=p,this.alias=v,this.length=(k||"").length|0}a.stringify=function m(p,v){if(typeof p=="string")return p;if(Array.isArray(p)){var k="";return p.forEach(function(F){k+=m(F,v)}),k}var _={type:p.type,content:m(p.content,v),tag:"span",classes:["token",p.type],attributes:{},language:v},C=p.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(_.classes,C):_.classes.push(C)),l.hooks.run("wrap",_);var w="";for(var T in _.attributes)w+=" "+T+'="'+(_.attributes[T]||"").replace(/"/g,""")+'"';return"<"+_.tag+' class="'+_.classes.join(" ")+'"'+w+">"+_.content+"</"+_.tag+">"};function u(m,p,v,k){m.lastIndex=p;var _=m.exec(v);if(_&&k&&_[1]){var C=_[1].length;_.index+=C,_[0]=_[0].slice(C)}return _}function c(m,p,v,k,_,C){for(var w in v)if(!(!v.hasOwnProperty(w)||!v[w])){var T=v[w];T=Array.isArray(T)?T:[T];for(var F=0;F<T.length;++F){if(C&&C.cause==w+","+F)return;var M=T[F],R=M.inside,L=!!M.lookbehind,H=!!M.greedy,B=M.alias;if(H&&!M.pattern.global){var q=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,q+"g")}for(var Z=M.pattern||M,ne=k.next,ee=_;ne!==p.tail&&!(C&&ee>=C.reach);ee+=ne.value.length,ne=ne.next){var I=ne.value;if(p.length>m.length)return;if(!(I instanceof a)){var oe=1,ce;if(H){if(ce=u(Z,ee,m,L),!ce||ce.index>=m.length)break;var se=ce.index,A=ce.index+ce[0].length,de=ee;for(de+=ne.value.length;se>=de;)ne=ne.next,de+=ne.value.length;if(de-=ne.value.length,ee=de,ne.value instanceof a)continue;for(var he=ne;he!==p.tail&&(de<A||typeof he.value=="string");he=he.next)oe++,de+=he.value.length;oe--,I=m.slice(ee,de),ce.index-=ee}else if(ce=u(Z,0,I,L),!ce)continue;var se=ce.index,j=ce[0],W=I.slice(0,se),Y=I.slice(se+j.length),X=ee+I.length;C&&X>C.reach&&(C.reach=X);var ie=ne.prev;W&&(ie=f(p,ie,W),ee+=W.length),h(p,ie,oe);var ue=new a(w,R?l.tokenize(j,R):j,B,j);if(ne=f(p,ie,ue),Y&&f(p,ne,Y),oe>1){var Ae={cause:w+","+F,reach:X};c(m,p,v,ne.prev,ee,Ae),C&&Ae.reach>C.reach&&(C.reach=Ae.reach)}}}}}}function d(){var m={value:null,prev:null,next:null},p={value:null,prev:m,next:null};m.next=p,this.head=m,this.tail=p,this.length=0}function f(m,p,v){var k=p.next,_={value:v,prev:p,next:k};return p.next=_,k.prev=_,m.length++,_}function h(m,p,v){for(var k=p.next,_=0;_<v&&k!==m.tail;_++)k=k.next;p.next=k,k.prev=p,m.length-=_}function g(m){for(var p=[],v=m.head.next;v!==m.tail;)p.push(v.value),v=v.next;return p}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(m){var p=JSON.parse(m.data),v=p.language,k=p.code,_=p.immediateClose;r.postMessage(l.highlight(k,l.languages[v],v)),_&&r.close()},!1)),l;var x=l.util.currentScript();x&&(l.filename=x.src,x.hasAttribute("data-manual")&&(l.manual=!0));function b(){l.manual||l.highlightAll()}if(!l.manual){var y=document.readyState;y==="loading"||y==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return l}(t);e.exports&&(e.exports=n),typeof Uc<"u"&&(Uc.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};l["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var a={};a[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:l},n.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(x,b){return"✖ Error "+x+" while fetching file: "+b},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",u="loaded",c="failed",d="pre[data-src]:not(["+l+'="'+u+'"]):not(['+l+'="'+a+'"])';function f(x,b,y){var m=new XMLHttpRequest;m.open("GET",x,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?b(m.responseText):m.status>=400?y(i(m.status,m.statusText)):y(o))},m.send(null)}function h(x){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(b){var y=Number(b[1]),m=b[2],p=b[3];return m?p?[y,Number(p)]:[y,void 0]:[y,y]}}n.hooks.add("before-highlightall",function(x){x.selector+=", "+d}),n.hooks.add("before-sanity-check",function(x){var b=x.element;if(b.matches(d)){x.code="",b.setAttribute(l,a);var y=b.appendChild(document.createElement("CODE"));y.textContent=r;var m=b.getAttribute("data-src"),p=x.language;if(p==="none"){var v=(/\.(\w+)$/.exec(m)||[,"none"])[1];p=s[v]||v}n.util.setLanguage(y,p),n.util.setLanguage(b,p);var k=n.plugins.autoloader;k&&k.loadLanguages(p),f(m,function(_){b.setAttribute(l,u);var C=h(b.getAttribute("data-range"));if(C){var w=_.split(/\r\n?|\n/g),T=C[0],F=C[1]==null?w.length:C[1];T<0&&(T+=w.length),T=Math.max(0,Math.min(T-1,w.length)),F<0&&(F+=w.length),F=Math.max(0,Math.min(F,w.length)),_=w.slice(T,F).join(`
|
|
88
|
+
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(T+1))}y.textContent=_,n.highlightElement(y)},function(_){b.setAttribute(l,c),y.textContent=_})}}),n.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(d),m=0,p;p=y[m++];)n.highlightElement(p)}};var g=!1;n.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()}(Kl)),Kl.exports}L8();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(e.languages.markdown[c].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(f){if(!(!f||typeof f=="string"))for(var h=0,g=f.length;h<g;h++){var x=f[h];if(x.type!=="code"){d(x.content);continue}var b=x.content[1],y=x.content[3];if(b&&y&&b.type==="code-language"&&y.type==="code-block"&&typeof b.content=="string"){var m=b.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase();var p="language-"+m;y.alias?typeof y.alias=="string"?y.alias=[y.alias,p]:y.alias.push(p):y.alias=[p]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",f=0,h=c.classes.length;f<h;f++){var g=c.classes[f],x=/language-(.+)/.exec(g);if(x){d=x[1];break}}var b=e.languages[d];if(b)c.content=e.highlight(u(c.content),b,d);else if(d&&d!=="none"&&e.plugins.autoloader){var y="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=y,e.plugins.autoloader.loadLanguages(d,function(){var m=document.getElementById(y);m&&(m.innerHTML=e.highlight(m.textContent,e.languages[d],d))})}}});var s=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,h){if(h=h.toLowerCase(),h[0]==="#"){var g;return h[1]==="x"?g=parseInt(h.slice(2),16):g=Number(h.slice(1)),a(g)}else{var x=l[h];return x||f}}),d}e.languages.md=e.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}})(Prism);var vh={},_h;function F8(){return _h||(_h=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),vh}F8();var Ch={},wh;function P8(){return wh||(wh=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),Ch}P8();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});var kh={},Sh;function M8(){return Sh||(Sh=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),kh}M8();var Eh={},Th;function R8(){return Th||(Th=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)),Eh}R8();var Ih={},Ah;function O8(){return Ah||(Ah=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),Ih}O8();const $8=globalThis.Prism||window.Prism,Nh=e=>{try{return!!e&&$8.languages.hasOwnProperty(e)}catch{return!1}};function H0(e,t){for(const n of e.childNodes){if($e(n)&&n.tagName===t)return!0;H0(n,t)}return!1}const wi="data-language",No="data-highlight-language";let Bc=class B0 extends Bt{static getType(){return"code"}static clone(t){return new B0(t.__language,t.__key)}constructor(t,n){super(n),this.__language=t||void 0,this.__isSyntaxHighlightSupported=Nh(t)}createDOM(t){const n=document.createElement("code");$t(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(wi,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(No,r)),n}updateDOM(t,n,r){const i=this.__language,o=t.__language;return i?i!==o&&(n.setAttribute(wi,i),this.__isSyntaxHighlightSupported&&n.setAttribute(No,i)):o&&(n.removeAttribute(wi),t.__isSyntaxHighlightSupported&&n.removeAttribute(No)),!1}exportDOM(t){const n=document.createElement("pre");$t(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(wi,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(No,r)),{element:n}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||H0(t,"BR"))?{conversion:Lh,priority:1}:null,div:()=>({conversion:D8,priority:1}),pre:()=>({conversion:Lh,priority:0}),table:t=>Zl(t)?{conversion:V8,priority:3}:null,td:t=>{const n=t,r=n.closest("table");return n.classList.contains("js-file-line")||r&&Zl(r)?{conversion:Fh,priority:3}:null},tr:t=>{const n=t.closest("table");return n&&Zl(n)?{conversion:Fh,priority:3}:null}}}static importJSON(t){return xn().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage()}}insertNewAfter(t,n=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
|
|
89
|
+
`&&r[i-2].getTextContent()===`
|
|
90
|
+
`&&t.isCollapsed()&&t.anchor.key===this.__key&&t.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const a=ve();return this.insertAfter(a,n),a}const{anchor:o,focus:s}=t,l=(o.isBefore(s)?o:s).getNode();if(J(l)){let a=B8(l);const u=[];for(;;)if(Fu(a))u.push(Yr()),a=a.getNextSibling();else{if(!j0(a))break;{let b=0;const y=a.getTextContent(),m=a.getTextContentSize();for(;b<m&&y[b]===" ";)b++;if(b!==0&&u.push(z0(" ".repeat(b))),b!==m)break;a=a.getNextSibling()}}const c=l.splitText(o.offset)[0],d=o.offset===0?0:1,f=c.getIndexWithinParent()+d,h=l.getParentOrThrow(),g=[Rt(),...u];h.splice(f,0,g);const x=u[u.length-1];x?x.select():o.offset===0?c.selectPrevious():c.getNextSibling().selectNext(0,0)}if(zc(l)){const{offset:a}=t.anchor;l.splice(a,0,[Rt()]),l.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const t=ve();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}setLanguage(t){const n=this.getWritable();return n.__language=t||void 0,n.__isSyntaxHighlightSupported=Nh(t),n}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}};function xn(e){return ft(new Bc(e))}function zc(e){return e instanceof Bc}function Lh(e){return{node:xn(e.getAttribute(wi))}}function D8(e){const t=e,n=Ph(t);return n||function(r){let i=r.parentElement;for(;i!==null;){if(Ph(i))return!0;i=i.parentElement}return!1}(t)?{node:n?xn():null}:{node:null}}function V8(){return{node:xn()}}function Fh(){return{node:null}}function Ph(e){return e.style.fontFamily.match("monospace")!==null}function Zl(e){return e.classList.contains("js-file-line-container")}class il extends rn{constructor(t="",n,r){super(t,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(t){return new il(t.__text,t.__highlightType||void 0,t.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const n=this.getWritable();return n.__highlightType=t||void 0,n}canHaveFormat(){return!1}createDOM(t){const n=super.createDOM(t),r=Gl(t.theme,this.__highlightType);return $t(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),o=Gl(r.theme,t.__highlightType),s=Gl(r.theme,this.__highlightType);return o!==s&&(o&&zs(n,o),s&&$t(n,s)),i}static importJSON(t){return z0().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return xn()}}function Gl(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function z0(e="",t){return ft(new il(e,t))}function j0(e){return e instanceof il}function H8(e,t){let n=e;for(let r=et(e,t);r&&(j0(r.origin)||Fu(r.origin));r=g2(r))n=r.origin;return n}function B8(e){return H8(e,"previous")}function du(e,t){const n={};for(const r of e){const i=t(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}function z8(e){const t=du(e,n=>n.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const Mh=/[!-/:-@[-`{-~\s]/,U0=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,j8=U0&&"documentMode"in document?document.documentMode:null;U0&&"InputEvent"in window&&!j8&&new window.InputEvent("input");function U8(e){return J(e)&&!e.hasFormat("code")}function W8(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Rh(e,t,n){const r=n.length;for(let i=t;i>=r;i--){const o=i-r;if(W0(e,o,n,0,r)&&e[o+r]!==" ")return o}return-1}function W0(e,t,n,r,i){for(let o=0;o<i;o++)if(e[t+o]!==n[r+o])return!1;return!0}function J8(e,t=o5){const n=z8(t),r=du(n.textFormat,({tag:s})=>s[s.length-1]),i=du(n.textMatch,({trigger:s})=>s);for(const s of t){const l=s.type;if(l==="element"||l==="text-match"||l==="multiline-element"){const a=s.dependencies;for(const u of a)e.hasNode(u)||W8(173,u.getType())}}const o=(s,l,a)=>{(function(u,c,d,f){const h=u.getParent();if(!Me(h)||u.getFirstChild()!==c)return!1;const g=c.getTextContent();if(g[d-1]!==" ")return!1;for(const{regExp:x,replace:b}of f){const y=g.match(x);if(y&&y[0].length===(y[0].endsWith(" ")?d:d-1)){const m=c.getNextSiblings(),[p,v]=c.splitText(d);if(p.remove(),b(u,v?[v,...m]:m,y,!1)!==!1)return!0}}return!1})(s,l,a,n.element)||function(u,c,d,f){const h=u.getParent();if(!Me(h)||u.getFirstChild()!==c)return!1;const g=c.getTextContent();if(g[d-1]!==" ")return!1;for(const{regExpStart:x,replace:b,regExpEnd:y}of f){if(y&&!("optional"in y)||y&&"optional"in y&&!y.optional)continue;const m=g.match(x);if(m&&m[0].length===(m[0].endsWith(" ")?d:d-1)){const p=c.getNextSiblings(),[v,k]=c.splitText(d);if(v.remove(),b(u,k?[k,...p]:p,m,null,null,!1)!==!1)return!0}}return!1}(s,l,a,n.multilineElement)||function(u,c,d){let f=u.getTextContent();const h=d[f[c-1]];if(h==null)return!1;c<f.length&&(f=f.slice(0,c));for(const g of h){if(!g.replace||!g.regExp)continue;const x=f.match(g.regExp);if(x===null)continue;const b=x.index||0,y=b+x[0].length;let m;return b===0?[m]=u.splitText(y):[,m]=u.splitText(b,y),m.selectNext(0,0),g.replace(m,x),!0}return!1}(l,a,i)||function(u,c,d){const f=u.getTextContent(),h=c-1,g=f[h],x=d[g];if(!x)return!1;for(const b of x){const{tag:y}=b,m=y.length,p=h-m+1;if(m>1&&!W0(f,p,y,0,m)||f[p-1]===" ")continue;const v=f[h+1];if(b.intraword===!1&&v&&!Mh.test(v))continue;const k=u;let _=k,C=Rh(f,p,y),w=_;for(;C<0&&(w=w.getPreviousSibling())&&!Mt(w);)if(J(w)){const Z=w.getTextContent();_=w,C=Rh(Z,Z.length,y)}if(C<0||_===k&&C+m===p)continue;const T=_.getTextContent();if(C>0&&T[C-1]===g)continue;const F=T[C-1];if(b.intraword===!1&&F&&!Mh.test(F))continue;const M=k.getTextContent(),R=M.slice(0,p)+M.slice(h+1);k.setTextContent(R);const L=_===k?R:T;_.setTextContent(L.slice(0,C)+L.slice(C+m));const H=U(),B=Qi();Be(B);const q=h-m*(_===k?2:1)+1;B.anchor.set(_.__key,C,"text"),B.focus.set(k.__key,q,"text");for(const Z of b.format)B.hasFormat(Z)||B.formatText(Z);B.anchor.set(B.focus.key,B.focus.offset,B.focus.type);for(const Z of b.format)B.hasFormat(Z)&&B.toggleFormat(Z);return D(H)&&(B.format=H.format),!0}}(l,a,r)};return e.registerUpdateListener(({tags:s,dirtyLeaves:l,editorState:a,prevEditorState:u})=>{if(s.has("collaboration")||s.has("historic")||e.isComposing())return;const c=a.read(U),d=u.read(U);if(!D(d)||!D(c)||!c.isCollapsed()||c.is(d))return;const f=c.anchor.key,h=c.anchor.offset,g=a._nodeMap.get(f);!J(g)||!l.has(f)||h!==1&&h>d.anchor.offset+1||e.update(()=>{if(!U8(g))return;const x=g.getParent();x===null||zc(x)||o(x,g,c.anchor.offset)})})}const K8=/^(\s*)(\d{1,})\.\s/,Z8=/^(\s*)[-*+]\s/,G8=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,q8=/^(#{1,6})\s/,Y8=/^>\s/,X8=/^[ \t]*```(\w+)?/,Q8=/[ \t]*```$/,J0=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},jc=e=>(t,n,r)=>{const i=t.getPreviousSibling(),o=t.getNextSibling(),s=nt(e==="check"?r[3]==="x":void 0);if(ae(o)&&o.getListType()===e){const a=o.getFirstChild();a!==null?a.insertBefore(s):o.append(s),t.remove()}else if(ae(i)&&i.getListType()===e)i.append(s),t.remove();else{const a=tt(e,e==="number"?Number(r[2]):void 0);a.append(s),t.replace(a)}s.append(...n),s.select(0,0);const l=function(a){const u=a.match(/\t/g),c=a.match(/ /g);let d=0;return u&&(d+=u.length),c&&(d+=Math.floor(c.length/4)),d}(r[1]);l&&s.setIndent(l)},ol=(e,t,n)=>{const r=[],i=e.getChildren();let o=0;for(const s of i)if(me(s)){if(s.getChildrenSize()===1){const c=s.getFirstChild();if(ae(c)){r.push(ol(c,t,n+1));continue}}const l=" ".repeat(4*n),a=e.getListType(),u=a==="number"?`${e.getStart()+o}. `:a==="check"?`- [${s.getChecked()?"x":" "}] `:"- ";r.push(l+u+t(s)),o++}return r.join(`
|
|
91
|
+
`)},ek={dependencies:[so],export:(e,t)=>{if(!Us(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:q8,replace:J0(e=>{const t="h"+e[1].length;return qt(t)}),type:"element"},K0={dependencies:[js],export:(e,t)=>{if(!ka(e))return null;const n=t(e).split(`
|
|
92
|
+
`),r=[];for(const i of n)r.push("> "+i);return r.join(`
|
|
93
|
+
`)},regExp:Y8,replace:(e,t,n,r)=>{if(r){const o=e.getPreviousSibling();if(ka(o))return o.splice(o.getChildrenSize(),0,[Rt(),...t]),o.select(0,0),void e.remove()}const i=oo();i.append(...t),e.replace(i),i.select(0,0)},type:"element"},Z0={dependencies:[Bc],export:e=>{if(!zc(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?`
|
|
94
|
+
`+t:"")+"\n```"},regExpEnd:{optional:!0,regExp:Q8},regExpStart:X8,replace:(e,t,n,r,i,o)=>{let s,l;if(!t&&i){if(i.length===1)r?(s=xn(),l=n[1]+i[0]):(s=xn(n[1]),l=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{if(s=xn(n[1]),i[0].trim().length===0)for(;i.length>0&&!i[0].length;)i.shift();else i[0]=i[0].startsWith(" ")?i[0].slice(1):i[0];for(;i.length>0&&!i[i.length-1].length;)i.pop();l=i.join(`
|
|
95
|
+
`)}const a=Ne(l);s.append(a),e.append(s)}else t&&J0(a=>xn(a?a[1]:void 0))(e,t,n,o)},type:"multiline-element"},G0={dependencies:[on,zt],export:(e,t)=>ae(e)?ol(e,t,0):null,regExp:Z8,replace:jc("bullet"),type:"element"},tk={dependencies:[on,zt],export:(e,t)=>ae(e)?ol(e,t,0):null,regExp:G8,replace:jc("check"),type:"element"},q0={dependencies:[on,zt],export:(e,t)=>ae(e)?ol(e,t,0):null,regExp:K8,replace:jc("number"),type:"element"},Y0={format:["code"],tag:"`",type:"text-format"},nk={format:["highlight"],tag:"==",type:"text-format"},X0={format:["bold","italic"],tag:"***",type:"text-format"},Q0={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},e5={format:["bold"],tag:"**",type:"text-format"},t5={format:["bold"],intraword:!1,tag:"__",type:"text-format"},rk={format:["strikethrough"],tag:"~~",type:"text-format"},n5={format:["italic"],tag:"*",type:"text-format"},r5={format:["italic"],intraword:!1,tag:"_",type:"text-format"},i5={dependencies:[kn],export:(e,t,n)=>{if(!Gt(e))return null;const r=e.getTitle(),i=t(e);return r?`[${i}](${e.getURL()} "${r}")`:`[${i}](${e.getURL()})`},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{const[,n,r,i]=t,o=xr(r,{title:i}),s=Ne(n);return s.setFormat(e.getFormat()),o.append(s),e.replace(o),s},trigger:")",type:"text-match"},ik=[ek,K0,G0,q0],ok=[Z0],sk=[Y0,X0,Q0,e5,t5,nk,n5,r5,rk],lk=[i5],o5=[...ik,...ok,...sk,...lk],ak=[{dependencies:[uo],export:e=>Ys(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=oi();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"},...o5];function Oh({transformers:e=ak}){const[t]=rt();return N.useEffect(()=>J8(t,e),[t,e]),null}const uk=Vt({init(e){const t=e.getValue(hc),n=t.includes("headings")?e.getValue(qs):[],r=fk(t,n);e.pubIn({[_r]:()=>S.createElement(Oh,{transformers:r}),[I1]:()=>S.createElement(Oh,{transformers:r})})}}),ck=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},dk={dependencies:[uo],export:e=>Ys(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=oi();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"};function fk(e,t){const n=[X0,Q0,e5,t5,Y0,n5,r5];if(e.includes("headings")){const r=Math.min(...t),i=Math.max(...t),o=new RegExp(`^(#{${r},${i}})\\s`),s={dependencies:[so],export:(l,a)=>{if(!Us(l))return null;const u=Number(l.getTag().slice(1));return"#".repeat(u)+" "+a(l)},regExp:o,replace:ck(l=>{const a=`h${l[1].length}`;return qt(a)}),type:"element"};n.push(s)}if(e.includes("thematicBreak")&&n.push(dk),e.includes("quote")&&n.push(K0),e.includes("link")&&n.push(i5),e.includes("lists")&&n.push(q0,G0,tk),e.includes("codeblock")){const r={...Z0,dependencies:[li],replace:(i,o,s)=>{const l=go({code:"",language:s[1]??"",meta:""});i.replace(l),setTimeout(()=>{l.select()},80)}};n.push(r)}return n}const hk=()=>{const e=xt(us),t=wt(A1),n=wt(hc),r=n.includes("quote"),i=n.includes("headings"),o=wn();if(!r&&!i)return null;const s=[{label:o("toolbar.blockTypes.paragraph","Paragraph"),value:"paragraph"}];if(r&&s.push({label:o("toolbar.blockTypes.quote","Quote"),value:"quote"}),i){const l=wt(qs);s.push(...l.map(a=>({label:o("toolbar.blockTypes.heading","Heading {{level}}",{level:a}),value:`h${a}`})))}return S.createElement(_8,{value:t,onChange:l=>{switch(l){case"quote":e(()=>oo());break;case"paragraph":e(()=>ve());break;case"":break;default:if(l.startsWith("h"))e(()=>qt(l));else throw new Error(`Unknown block type: ${l}`)}},triggerTitle:o("toolbar.blockTypeSelect.selectBlockTypeTooltip","Select block type"),placeholder:o("toolbar.blockTypeSelect.placeholder","Block type"),items:s})},ql=({format:e,addTitle:t,removeTitle:n,icon:r,formatName:i})=>{const[o,s]=nn(l1,Un),l=xt(a1),a=(o&e)!==0;return S.createElement(V0,{title:a?n:t,on:a,onValueChange:()=>{l(i)}},s(r))},gk=({options:e})=>{const t=wn(),n=typeof e>"u";return S.createElement("div",{className:G.toolbarGroupOfGroups},n||e.includes("Bold")?S.createElement(ql,{format:Ai,addTitle:t("toolbar.bold","Bold"),removeTitle:t("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,n||e.includes("Italic")?S.createElement(ql,{format:Ni,addTitle:t("toolbar.italic","Italic"),removeTitle:t("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,n||e.includes("Underline")?S.createElement(ql,{format:Li,addTitle:t("toolbar.underline","Underline"),removeTitle:t("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},pk=S.forwardRef((e,t)=>{const n=xt(Xm),[r,i]=nn(Dt,Un),o=wn();return S.createElement(Im,{className:G.toolbarButton,ref:t,disabled:r,onClick:()=>{n()}},S.createElement(Vc,{title:o("toolbar.image","Insert image")},i("add_photo")))}),mk=()=>{const[e,t]=nn(Un,Ve),[n,r]=S.useState(!1),[i,o]=S.useState(!1),s=wn();return S.useEffect(()=>{if(t)return ht(t.registerCommand(bi,l=>(r(l),!1),bn),t.registerCommand(yi,l=>(o(l),!1),bn))},[t]),S.createElement(I8,{items:[{title:s("toolbar.undo","Undo {{shortcut}}",{shortcut:fs?"⌘Z":"Ctrl+Z"}),disabled:!n,contents:e("undo"),active:!1,onChange:()=>t==null?void 0:t.dispatchCommand(Ts,void 0)},{title:s("toolbar.redo","Redo {{shortcut}}",{shortcut:fs?"⌘Y":"Ctrl+Y"}),disabled:!i,contents:e("redo"),active:!1,onChange:()=>t==null?void 0:t.dispatchCommand(Is,void 0)}]})},xk="_mdxeditor_nfuje_2",yk={mdxeditor:xk},bk={match:(e,t)=>!0,priority:0,Editor:e=>{const t=A6();return P.jsxs("div",{className:"flex flex-col bg-gray-100 my-4",onKeyDown:n=>n.nativeEvent.stopImmediatePropagation(),children:[P.jsx("input",{defaultValue:e.language}),P.jsx("textarea",{className:"flex-1",defaultValue:e.code,onChange:n=>t.setCode(n.target.value)})]})}};function vk({className:e,markdown:t,onChange:n}){return P.jsx(bw,{className:m5("flex flex-col w-full rounded-md border border-input bg-transparent text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",yk.mdxeditor,e),suppressHtmlProcessing:!0,markdown:t,onChange:n,plugins:[Sw(),r3(),a7(),S8(),k6(),g6({disableImageResize:!0,disableImageSettingsButton:!0}),Fw(),uk(),O6({codeBlockEditorDescriptors:[bk]}),N8({toolbarClassName:"flex flex-row overflow-hidden shrink-0 h-10 border-b bg-white rounded-none",toolbarContents:()=>P.jsx(P.Fragment,{children:P.jsxs("div",{className:"flex items-center flex-1 gap-1",children:[P.jsx(hk,{}),P.jsx(gk,{}),P.jsx(A8,{}),P.jsx(pk,{}),P.jsx("div",{className:"ml-auto",children:P.jsx(mk,{})})]})})})]})}function _k({...e}){return P.jsxs("div",{className:"relative flex justify-center items-center",children:[P.jsx(Yl,{...e}),e.value&&P.jsx(a5,{to:e.value,className:"flex items-center absolute right-0 mr-3",children:P.jsx(E5,{className:"h-4"})})]})}function Dk({itemType:e,fields:t,data:n,isNew:r}){const[i]=g5(),[o]=p5(),s=N.useCallback(c=>({id:(n==null?void 0:n.id)??"",...Object.fromEntries(Object.keys(c).map(d=>[d,(n==null?void 0:n[d])??(c[d].type==="boolean"?!1:"")]))}),[n,t]),l=fu({defaultValues:s(t)});async function a(c){r?i({...c,type:e}):o({...c,type:e})}const u=N.useMemo(()=>Object.entries(t).filter(([,c])=>c.type==="boolean"),[t]);return P.jsx(f5,{...l,children:P.jsxs("form",{onSubmit:l.handleSubmit(a),className:"space-y-4 max-w-[800px] w-[800px]",children:[P.jsx(sl,{name:"id",control:l.control,disabled:(n==null?void 0:n.id)==="default",rules:{required:!0},render:({field:c})=>P.jsxs(ll,{children:[P.jsx(po,{className:"flex gap-1 items-baseline",children:"ID"}),P.jsx(al,{children:P.jsx(Yl,{placeholder:"url-slug",...c})}),(n==null?void 0:n.id)!=="default"&&P.jsx(ul,{children:"Choose a descriptive ID, since it will be part of the URL"}),P.jsx(cl,{})]})}),u.length>0&&P.jsxs("div",{className:"flex flex-col gap-3",children:[P.jsx(po,{children:"Flags"}),P.jsx("div",{className:"flex flex-row flex-wrap gap-4",children:u.map(([c,d])=>P.jsx(sl,{name:c,control:l.control,render:({field:f})=>P.jsxs(ll,{className:"flex flex-col items-start",children:[P.jsxs("div",{className:"flex flex-row space-x-2",children:[P.jsx(al,{children:P.jsx(h5,{checked:f.value==="true",onCheckedChange:h=>{f.onChange(h===!0?"true":"false")}})}),P.jsx(po,{className:"flex gap-1 items-baseline",children:d.displayName})]}),d.displayExtra&&P.jsx(ul,{children:d.displayExtra}),P.jsx(cl,{})]})},c))})]}),Object.entries(t).filter(([,c])=>c.type!=="boolean").map(([c,d])=>P.jsx(sl,{name:c,control:l.control,rules:{required:d.isRequired},render:({field:f})=>P.jsxs(ll,{children:[P.jsxs(po,{className:"flex gap-1 items-baseline",children:[d.displayName,!d.isRequired&&P.jsx("span",{className:"text-gray-400",children:"(optional)"})]}),P.jsx(al,{children:d.type==="markdown"?P.jsx(vk,{className:"h-52",markdown:f.value,onChange:f.onChange,placeholder:d.placeholder}):d.type==="url"?P.jsx(_k,{placeholder:d.placeholder??"https://",...f}):P.jsx(Yl,{placeholder:d.placeholder,...f})}),d.displayExtra&&P.jsx(ul,{children:d.displayExtra}),P.jsx(cl,{})]})},c)),P.jsxs(u5,{disabled:!l.formState.isDirty&&!r,type:"submit",children:[P.jsx(A5,{})," Save"]})]})})}export{Dk as I};
|