bible-note 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bible-note.cjs +25 -26
- package/dist/bible-note.css +1 -1
- package/dist/bible-note.mjs +7167 -7205
- package/dist/chunks/{ContentEditable-C_wyHFh1.mjs → ContentEditable-BaXBKC3m.mjs} +1 -1
- package/dist/chunks/{ContentEditable-DgthEFHJ.cjs → ContentEditable-Ce294XLd.cjs} +2 -2
- package/dist/chunks/{ExcalidrawComponent-bEqDGYRW.cjs → ExcalidrawComponent-DdmtbuXc.cjs} +1 -1
- package/dist/chunks/{ExcalidrawComponent-iTobN_Hf.mjs → ExcalidrawComponent-OMjYgJCL.mjs} +2 -2
- package/dist/chunks/{ExcalidrawModal-DAEdxIBk.mjs → ExcalidrawModal-DSotOBGc.mjs} +2 -2
- package/dist/chunks/{ExcalidrawModal-Bbez9U5x.cjs → ExcalidrawModal-Db1LI01l.cjs} +2 -2
- package/dist/chunks/LexicalUtils.prod-CYv8J7Gq.cjs +3 -0
- package/dist/chunks/{LexicalUtils.prod-5zbJxaQa.mjs → LexicalUtils.prod-D2Igim2c.mjs} +28 -32
- package/dist/chunks/{MediaComponent-BTaaADsV.mjs → MediaComponent-D-AMKM9e.mjs} +3 -3
- package/dist/chunks/{MediaComponent-BhjGu3D-.cjs → MediaComponent-D69mEyrJ.cjs} +1 -1
- package/dist/chunks/{MediaResizer-C7UGQ3Kl.mjs → MediaResizer-C_ZJbHAU.mjs} +1 -1
- package/dist/chunks/{MediaResizer-DGw5LvDR.cjs → MediaResizer-Dzro5TVg.cjs} +1 -1
- package/dist/chunks/{StickyComponent-B8skHBRs.mjs → StickyComponent-B1GQ5G8T.mjs} +2 -2
- package/dist/chunks/{StickyComponent-C6xBrvrK.cjs → StickyComponent-DsQhvYHJ.cjs} +1 -1
- package/dist/chunks/{StickyNode-GgIn3-zY.cjs → StickyNode-B7sXOkJV.cjs} +1 -1
- package/dist/chunks/{StickyNode-B2B6di-N.mjs → StickyNode-C5dwEb8E.mjs} +3 -3
- package/dist/chunks/{TreeViewPlugin-DkUjU27t.cjs → TreeViewPlugin-8-uPZF17.cjs} +3 -3
- package/dist/chunks/{TreeViewPlugin-B0UnxNiM.mjs → TreeViewPlugin-Cd1KNBRW.mjs} +18 -18
- package/knowledge/development.md +2 -2
- package/knowledge/ui-rag.md +182 -134
- package/package.json +1 -1
- package/dist/chunks/LexicalUtils.prod-W-Xb5dGB.cjs +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as e, $t as t, An as n, Ar as r, At as i, Bt as a, D as o, Dr as s, E as c, Er as l, Et as u, Fr as d, Gn as f, Gt as p, H as m, I as h, In as g, Ir as ee, J as te, Jr as ne, Jt as _, Kn as re, Lt as ie, M as v, Nn as y, O as ae, Pn as oe, Q as se, R as ce, Rn as le, Rr as ue, Sn as b, Sr as de, Tr as fe, Tt as pe, Un as me, Ur as x, Vr as he, Wt as ge, X as _e, Xr as ve, Yn as S, Yt as ye, Z as be, _r as xe, ar as Se, bn as C, ct as Ce, d as we, dt as Te, en as Ee, er as De, fr as Oe, g as ke, gt as Ae, h as je, hn as Me, hr as w, ht as Ne, in as Pe, j as Fe, k as Ie, kn as Le, kr as Re, kt as ze, lr as Be, mn as Ve, mr as He, nn as Ue, nr as We, nt as Ge, oi as Ke, on as qe, or as Je, pn as Ye, pr as Xe, q as Ze, qt as T, ri as Qe, rr as $e, s as E, st as D, t as et, tt as O, ut as tt, v as k, vr as nt, vt as A, x as rt, zn as it } from "./Lexical.prod-DYDuARMX.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { E as at, d as ot, o as st, s as ct, t as lt } from "./LexicalUtils.prod-D2Igim2c.mjs";
|
|
3
3
|
import { Component as ut, createContext as dt, forwardRef as ft, useCallback as pt, useContext as mt, useEffect as ht, useLayoutEffect as gt, useMemo as _t, useState as vt } from "react";
|
|
4
4
|
import { Fragment as yt, jsx as j, jsxs as bt } from "react/jsx-runtime";
|
|
5
5
|
//#region node_modules/@lexical/extension/dist/LexicalExtension.prod.mjs
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-D_FWMvbo.cjs"),t=require("./Lexical.prod-C9Xekspf.cjs"),n=require("./LexicalUtils.prod-W-Xb5dGB.cjs");let r=require("react");r=e.a(r,1);let i=require("react/jsx-runtime");var a=Symbol.for(`preact-signals`);function o(){if(d>1)return void d--;let e,t=!1;for(function(){let e=u;for(u=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();c!==void 0;){let n=c;for(c=void 0,f++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&v(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(f=0,d--,t)throw e}var s,c;function l(e){let t=s;s=void 0;try{return e()}finally{s=t}}var u,d=0,f=0,p=0,m=0;function h(e){if(s===void 0)return;let t=e.n;return t===void 0||t.t!==s?(t={i:0,S:e,p:s.s,n:void 0,t:s,e:void 0,x:void 0,r:t},s.s!==void 0&&(s.s.n=t),s.s=t,e.n=t,32&s.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=s.s,t.n=void 0,s.s.n=t,s.s=t),t):void 0}function g(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function _(e,t){return new g(e,t)}function v(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function y(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function b(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function x(e,t){g.call(this,void 0),this.x=e,this.s=void 0,this.g=m-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function S(e){let t=e.m;if(e.m=void 0,typeof t==`function`){d++;let n=s;s=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,C(e),t}finally{s=n,o()}}}function C(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,S(e)}function ee(e){if(s!==this)throw Error(`Out-of-order effect`);b(this),s=e,this.f&=-2,8&this.f&&C(this),o()}function w(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function T(e,t){let n=new w(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}function E(e,t={}){let n={};for(let r in e){let i=t[r];n[r]=_(i===void 0?e[r]:i)}return n}g.prototype.brand=a,g.prototype.h=function(){return!0},g.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?l(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},g.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&l(()=>{var e;(e=this.Z)==null||e.call(this)}))}},g.prototype.subscribe=function(e){return T(()=>{let t=this.value,n=s;s=void 0;try{e(t)}finally{s=n}},{name:`sub`})},g.prototype.valueOf=function(){return this.value},g.prototype.toString=function(){return this.value+``},g.prototype.toJSON=function(){return this.value},g.prototype.peek=function(){let e=s;s=void 0;try{return this.value}finally{s=e}},Object.defineProperty(g.prototype,"value",{get(){let e=h(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(f>100)throw Error(`Cycle detected`);(function(e){d!==0&&f===0&&e.l!==p&&(e.l=p,u={S:e,v:e.v,i:e.i,o:u})})(this),this.v=e,this.i++,m++,d++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{o()}}}}),x.prototype=new g,x.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===m))return!0;if(this.g=m,this.f|=1,this.i>0&&!v(this))return this.f&=-2,!0;let e=s;try{y(this),s=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return s=e,b(this),this.f&=-2,!0},x.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}g.prototype.S.call(this,e)},x.prototype.U=function(e){if(this.t!==void 0&&(g.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},x.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(x.prototype,"value",{get(){if(1&this.f)throw Error(`Cycle detected`);let e=h(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),w.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},w.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,S(this),y(this),d++;let e=s;return s=this,ee.bind(this,e)},w.prototype.N=function(){2&this.f||(this.f|=2,this.u=c,c=this)},w.prototype.d=function(){this.f|=8,1&this.f||C(this)},w.prototype.dispose=function(){this.d()};function te(){let e=t.Dr(),n=t.tt(),r=t.Ar();e.clear(),e.append(r),n!==null&&r.select(),t.bn(n)&&(n.format=0)}function ne(e,n=te){return e.registerCommand(t.hn,()=>(n(),!0),0)}function re(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}function ie(e,t){let n;return _(e(),{unwatched(){n&&=(n(),void 0)},watched(){this.value=e(),n=t(this)}})}function D(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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.`)}var ae;try{ae=`0.48.0+prod.esm`}catch{}var oe=ae??`"<unknown>+source"`,se=new Set([`__proto__`,`constructor`,`prototype`]);function ce(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)!se.has(e)&&Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=ce(n[e],r[e]));return e}return t}var O=0,k=1,le=2,ue=3,A=4,j=5,M=6,N=7;function P(e){return e.id===O}function de(e){return e.id===le}function fe(e){return function(e){return e.id===k}(e)||D(305,String(e.id),String(k)),Object.assign(e,{id:le})}var pe=new Set,me=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:O}}mergeConfigs(){let e=this.extension.config||{},n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):t.d;for(let t of this.configs)e=n(e,t);return e}init(e){let t=this.state;de(t)||D(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:ue,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:A,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==A&&D(307,String(t.id),String(j)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:j,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==j&&D(308,String(n.id),String(j));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:M})}(n),()=>{let e=this.state;e.id!==N&&D(309,String(n.id),String(N)),this.state=function(e){return Object.assign(e,{id:j})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==M&&D(310,String(t.id),String(M)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:N})}(t),n}getSignal(){return this._signal===void 0&&D(311),this._signal}getInitResult(){this.extension.init===void 0&&D(312,this.extension.name);let e=this.state;return function(e){return e.id>=A}(e)||D(313,String(e.id),String(A)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=ue}(e)||D(314,String(e.id),String(ue)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&D(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&D(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=N}(e)||D(316,String(e.id),String(N)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||pe}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=j})(e)||D(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},he={tag:t.Jr};function ge(){let e=t.Dr();e.isEmpty()&&e.append(t.Ar())}var _e=t.hr({config:t.Xr({setOptions:he,updateOptions:he}),init:({$initialEditorState:e=ge})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:n,setOptions:r},i){let a=i.getInitResult();if(!a.initialized){a.initialized=!0;let{$initialEditorState:i}=a;if(t.Lt(i))e.setEditorState(i,r);else if(typeof i==`function`)e.update(()=>{i(e)},n);else if(i&&(typeof i==`string`||typeof i==`object`)){let t=e.parseEditorState(i);e.setEditorState(t,r)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[t.q,t.Wt,t.H,t.in,t.Et]}),ve=Symbol.for(`@lexical/extension/LexicalBuilder`);function ye(){}function be(e){throw e}function F(e){return Array.isArray(e)?e:[e]}var xe=oe,Se=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=xe,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[F(_e)];for(let e of t)n.push(F(e));return new e(n)}static maybeFromEditor(t){let n=t[ve];return n&&(n.PACKAGE_VERSION!==xe&&D(292,n.PACKAGE_VERSION,xe),n instanceof e||D(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&D(294),n}constructEditor(){let{$initialEditorState:e,onError:n,onWarn:r,...i}=this.buildCreateEditorArgs(),a=Object.assign(t.mr({...i,...n?{onError:e=>{n(e,a)}}:{},...r?{onWarn:e=>{r(e,a)}}:{}}),{[ve]:this});for(let e of this.sortedExtensionReps())e.build(a);return a}buildEditor(){let e=ye;function n(){try{e()}finally{e=ye}}let r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return e=t.Yn(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&D(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&D(296);let[t]=F(e);typeof t.name!=`string`&&D(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&D(298,t.name),!n){n=new me(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&D(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&D(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=F(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(de(i))return;let a=n.extension.name;var o;P(i)||D(300,a,r||`[unknown]`),P(o=i)||D(304,String(o.id),String(O)),i=Object.assign(o,{id:k}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=fe(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())P(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&D(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],a=r.signal;for(let t of n){let n=t.register(e,a);n&&i.push(n)}for(let t of n){let n=t.afterRegistration(e);n&&i.push(n)}return t.Yn(...i)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.onWarn!==void 0&&(e.onWarn=o.onWarn),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of re(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&D(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&ce(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=[...t]);let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=be,e}};function Ce(e,t){let n=Se.fromEditor(e).getExtensionRep(t);return n===void 0&&D(303,t.name),n.getExtensionDependency()}function I(e,t){let n=Se.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function we(e){return I(t.s(),e)}var Te=t.x(`INSERT_HORIZONTAL_RULE_COMMAND`),L=class e extends t.I{static getType(){return`horizontalrule`}static clone(t){return new e(t.__key)}static importJSON(e){return R().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:Ee,priority:0})}}exportDOM(){return{element:t.qt().createElement(`hr`)}}createDOM(e){let n=t.qt().createElement(`hr`);return t.Vr(n,e.theme.hr),n}getTextContent(){return`
|
|
2
|
-
`}isInline(){return!1}updateDOM(){return!1}};function Ee(){return{node:R()}}function R(){return t.k(L)}function De(e){return e instanceof L}t.ft,t.Jn,Date.now;function Oe(e){return e.canIndent()}function ke(e,r,i=Oe){return t.Yn(e.registerCommand(t.zn,r=>{let i=t.tt();if(!t.bn(i))return!1;r.preventDefault();let a=function(e){if(e.getNodes().filter(e=>t.st(e)&&e.canIndent()).length>0)return!0;let r=e.anchor,i=e.focus,a=i.isBefore(r)?i:r,o=n.o(a.getNode());if(o.canIndent()){let e=o.getKey(),n=t.h();if(n.anchor.set(e,0,`element`),n.focus.set(e,0,`element`),n=t.R(n),n.anchor.is(a))return!0}return!1}(i)?r.shiftKey?t.pr:t.on:t.Pn;return e.dispatchCommand(a,void 0)},0),e.registerCommand(t.on,()=>{let e=typeof r==`number`?r:r?r.peek():null;if(!t.bn(t.tt()))return!1;let a=typeof i==`function`?i:i.peek();return n.t(t=>{if(a(t)){let n=t.getIndent()+1;(!e||n<e)&&t.setIndent(n)}})},4))}function Ae(){return t.Dr().getTextContent()}function je(e,t=!0){if(e)return!1;let n=Ae();return t&&(n=n.trim()),n===``}function Me(e){if(!je(e,!1))return!1;let n=t.Dr().getChildren(),r=n.length;if(r>1)return!1;for(let e=0;e<r;e++){let r=n[e];if(t.$(r))return!1;if(t.vt(r)){if(!t.kn(r)||r.__indent!==0)return!1;let n=r.getChildren(),i=n.length;for(let r=0;r<i;r++){let r=n[e];if(!t.Jt(r))return!1}}}return!0}function Ne(e){return()=>Me(e)}function Pe(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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 Fe(e,n,r,i){let a=e=>e instanceof r,o=e=>{let n=t.D(e.getTextContent());n.setFormat(e.getFormat()),e.replace(n)};return[e.registerNodeTransform(t.Wt,e=>{if(!e.isSimpleText())return;let r,s=e.getPreviousSibling(),c=e.getTextContent(),l=e;if(t.Jt(s)){let t=s.getTextContent(),r=n(t+c);if(a(s)){if(r===null||(e=>e.getLatest().__mode)(s)!==0)return void o(s);{let n=r.end-t.length;if(n>0){let r=t+c.slice(0,n);if(s.select(),s.setTextContent(r),n===c.length)e.remove();else{let t=c.slice(n);e.setTextContent(t)}return}}}else if(r===null||r.start<t.length)return}let u=0;for(;;){r=n(c);let e,d=r===null?``:c.slice(r.end);if(c=d,d===``){let e=l.getNextSibling();if(t.Jt(e)){d=l.getTextContent()+e.getTextContent();let t=n(d);if(t===null)return void(a(e)?o(e):e.markDirty());if(t.start!==0)return}}if(r===null)return;if(r.start===0&&t.Jt(s)&&s.isTextEntity()){u+=r.end;continue}r.start===0?[e,l]=l.splitText(r.end):[,e,l]=l.splitText(r.start+u,r.end+u),e===void 0&&Pe(165,`nodeToReplace`);let f=i(e);if(f.setFormat(e.getFormat()),e.replace(f),l==null)return;u=0,s=f}}),e.registerNodeTransform(r,e=>{let r=e.getTextContent(),i=n(r);if(i===null||i.start!==0)return void o(e);if(r.length>i.end)return void e.splitText(i.end);let s=e.getPreviousSibling();t.Jt(s)&&s.isTextEntity()&&(o(s),o(e));let c=e.getNextSibling();t.Jt(c)&&c.isTextEntity()&&(o(c),a(e)&&o(e))})]}var Ie=t.ar?r.useLayoutEffect:r.useEffect;function Le({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:a,ariaDescribedBy:o,ariaErrorMessage:s,ariaExpanded:c,ariaInvalid:l,ariaLabel:u,ariaLabelledBy:d,ariaMultiline:f,ariaOwns:p,ariaRequired:m,autoCapitalize:h,className:g,id:_,role:v=`textbox`,spellCheck:y=!0,style:b,tabIndex:x,"data-testid":S,...C},ee){let[w,T]=(0,r.useState)(e.isEditable()),E=(0,r.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),te=(0,r.useMemo)(()=>function(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}(ee,E),[E,ee]);return Ie(()=>(T(e.isEditable()),e.registerEditableListener(e=>{T(e)})),[e]),(0,i.jsx)(`div`,{"aria-activedescendant":w?t:void 0,"aria-autocomplete":w?n:`none`,"aria-controls":w?a:void 0,"aria-describedby":o,...s==null?{}:{"aria-errormessage":s},"aria-expanded":w&&v===`combobox`?!!c:void 0,...l==null?{}:{"aria-invalid":l},"aria-label":u,"aria-labelledby":d,"aria-multiline":f,"aria-owns":w?p:void 0,"aria-readonly":!w||void 0,"aria-required":m,autoCapitalize:h,className:g,contentEditable:w,"data-testid":S,id:_,ref:te,role:v,spellCheck:y,style:b,tabIndex:x??(w?void 0:-1),...C})}var Re=(0,r.forwardRef)(Le);function ze(e){return e.read(`latest`,Ne(e.isComposing()))}var Be=(0,r.forwardRef)(Ve);function Ve(e,n){let{placeholder:r,...a}=e,[o]=t.oi();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Re,{editor:o,...a,ref:n}),r!=null&&(0,i.jsx)(He,{editor:o,content:r})]})}function He({content:e,editor:n}){let a=function(e){let[n,i]=(0,r.useState)(()=>ze(e));return Ie(()=>{function n(){let t=ze(e);i(t)}return n(),t.Yn(e.registerUpdateListener(()=>{n()}),e.registerEditableListener(()=>{n()}))},[e]),n}(n),[o,s]=(0,r.useState)(n.isEditable());if((0,r.useLayoutEffect)(()=>(s(n.isEditable()),n.registerEditableListener(e=>{s(e)})),[n]),!a)return null;let c=null;return typeof e==`function`?c=e(o):e!==null&&(c=e),c===null?null:(0,i.jsx)(`div`,{"aria-hidden":!0,children:c})}var Ue=class extends r.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e instanceof Error?e:Error(String(e),{cause:e}),t)}render(){return this.state.hasError?this.props.fallback:this.props.children}};function We({children:e,fallback:t,onError:n}){return(0,i.jsx)(Ue,{fallback:t===void 0?(0,i.jsx)(`div`,{style:{border:`1px solid #f00`,color:`#f00`,padding:`8px`},children:`An error was thrown.`}):t,onError:n,children:e})}var Ge=t.hr({name:`@lexical/react/ReactProvider`});function z(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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.`)}var B;function Ke(e,t){let{key:n}=t;return e&&n in e?e[n]:t.defaultValue}function qe(e){return B&&B.editor===e?B:void 0}function Je(e,t){if(`cfg`in t){let{cfg:n,updater:r}=t;return[n,r(Ke(e,n))]}return t}function Ye(e,t){let n=t;for(let r of e){let[e,i]=Je(n,r),a=e.key;if(n===t&&Ke(n,e)===i)continue;let o=n===t||n===void 0?Xe(t):n;o[a]=i,n=o}return n}function Xe(e){return Object.create(e||null)}function Ze(e,t){return[e,t]}function Qe(e,n,r,i=t.s()){let a=B,o=qe(i);try{return B={...o,editor:i,[e]:n},r()}finally{B=a}}function $e(e,n=()=>{}){return(r,i=t.s())=>t=>{let a=qe(i),o=a&&a[e],s=Ye(r,o||n(i));return s&&s!==o?Qe(e,s,t,i):t()}}function et(e,n,r,i){return Object.assign(t.rr(Symbol(n),{isEqual:i,parse:r}),{[e]:!0})}function tt(e){if(!t.X(e))return;let r=e;if(r.querySelector(`style`)===null)return;let i=new Map;function a(e){let t=i.get(e);if(t===void 0){t=new Set;for(let n=0;n<e.style.length;n++)t.add(e.style[n]);i.set(e,t)}return t}try{for(let e of Array.from(r.styleSheets)){let i;try{i=e.cssRules}catch{continue}for(let e of Array.from(i)){if(!n.s(e,CSSStyleRule))continue;let i;try{i=r.querySelectorAll(e.selectorText)}catch{continue}for(let n of Array.from(i)){if(!t.Sn(n))continue;let r=a(n);for(let t=0;t<e.style.length;t++){let i=e.style[t];r.has(i)||n.style.setProperty(i,e.style.getPropertyValue(i),e.style.getPropertyPriority(i))}}}}}catch{}}var nt=`@lexical/html/DOM`,rt=Symbol.for(`@lexical/html/DOMExportContext`),it=Symbol.for(`@lexical/html/DOMImportContext`);function at(e,t,n){return et(rt,e,t,n)}var ot=at(`isExport`,Boolean);function st(e){let t=I(e,nt);return t?t.output.defaults:void 0}function ct(e){let t=I(e,nt);return t?t.output.runtime:void 0}function lt(e=t.s()){let n=ct(e);return n?n.getSessionConfig():t.kt(e)}var ut=$e(rt,st),V=Symbol.for(`@lexical/html/SelectorImpl`);function H(e,n){let r={kind:`element`,predicate:(i=n,i.length===0?t.Sn:i.length===1?i[0]:(e,t)=>{for(let n of i)if(!n(e,t))return!1;return!0}),tags:e};var i;let a=t=>H(e,[...n,t]);return{[V]:r,attr:(e,t,n)=>a(U(e,t,n)),classAll:(...e)=>a(ft(e)),classAny:(...e)=>a(function(e){let n=dt(e);return n.length===0?()=>!1:e=>{if(!t.Sn(e))return!1;let r=e.classList;for(let e of n)if(r.contains(e))return!0;return!1}}(e)),styleAny:(e,n,r)=>a(function(e,n,r){if(typeof n==`string`)return r=>t.Sn(r)&&r.style.getPropertyValue(e)===n;if(n instanceof RegExp){let i=r&&r.capture,a=n;return(n,r)=>{if(!t.Sn(n))return!1;let o=n.style.getPropertyValue(e);if(!o)return!1;let s=o.match(a);return s!==null&&(i!==void 0&&(r[i]=s),!0)}}z(362,JSON.stringify(e))}(e,n,r))}}function dt(e){let t=[];for(let n of e)n&&t.push(n);return t}function ft(e){let n=dt(e);return n.length===0?()=>!0:e=>{if(!t.Sn(e))return!1;let r=e.classList;for(let e of n)if(!r.contains(e))return!1;return!0}}function U(e,n,r){if(!0===n)return n=>t.Sn(n)&&n.hasAttribute(e);if(typeof n==`string`)return r=>t.Sn(r)&&r.getAttribute(e)===n;if(n instanceof RegExp){let i=r&&r.capture,a=n;return(n,r)=>{if(!t.Sn(n))return!1;let o=n.getAttribute(e);if(o==null)return!1;let s=o.match(a);return s!==null&&(i!==void 0&&(r[i]=s),!0)}}z(361,JSON.stringify(e))}var pt={kind:`text`,predicate:t.nt,tags:new Set},mt={[V]:pt},ht={kind:`comment`,predicate:e=>e.nodeType===8,tags:new Set},gt={[V]:ht},W={any:()=>H(new Set,[]),comment:()=>gt,tag(...e){e.length>0||z(363);let t=new Set;for(let n of e)t.add(n.toUpperCase());return H(t,[])},text:()=>mt};function _t(e,n){return t.Sn(e)&&e.nodeName===n.toUpperCase()}var vt=/[A-Za-z0-9_-]/,yt=class{constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||``}consume(){return this.source[this.pos++]||``}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){let e=this.pos;for(;!this.eof()&&vt.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){let e=this.consume();this.assert(e===`"`||e===`'`,`expected quote`);let t=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()===`\\`?this.pos+=2:this.pos++;this.assert(!this.eof(),`unterminated string`);let n=this.source.slice(t,this.pos);return this.pos++,n.replace(/\\(.)/g,`$1`)}assert(e,t){e||z(364,String(this.pos+1),t,this.source)}};function bt(e){let t=new Set,n=[],r=[];if(e.skipWhitespace(),e.peek()===`*`)e.consume();else if(vt.test(e.peek())){let n=e.readIdent();n&&t.add(n.toUpperCase())}for(;!e.eof();){let t=e.peek();if(t===`.`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected class name after "."`),r.push(t)}else if(t===`#`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected id after "#"`),n.push(U(`id`,t))}else{if(t!==`[`)break;{e.consume(),e.skipWhitespace();let t=e.readIdent();e.assert(t!==``,`expected attribute name after "["`),e.skipWhitespace();let r=!0;if(e.peek()===`=`){e.consume(),e.skipWhitespace();let t=e.peek();t===`"`||t===`'`?r=e.readQuoted():(r=e.readIdent(),e.assert(r!==``,`expected attribute value`)),e.skipWhitespace()}e.assert(e.peek()===`]`,`expected "]"`),e.consume(),n.push(U(t,r))}}}return r.length>0&&n.push(ft(r)),{predicates:n,tags:t}}function xt(e){let t=new yt(e,0),n=[];for(;;){let e=bt(t);if(n.push(e),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===`,`,`expected "," (selector lists are the only supported combinator)`),t.consume(),t.skipWhitespace()}if(n.length===1)return H(n[0].tags,n[0].predicates);let r=new Set;for(let e of n)for(let t of e.tags)r.add(t);return H(r,[(e,t)=>{for(let r of n){let n=e.nodeName;if(r.tags.size>0&&!r.tags.has(n))continue;let i=!0;for(let n of r.predicates)if(!n(e,t)){i=!1;break}if(i)return!0}return!1}])}function St(e){return e}function Ct(e,t,n){return et(it,e,t,n)}var wt=Ct(`textFormat`,()=>0),Tt=Ct(`textStyle`,()=>({}));function G(e){return t.st(e)||t.$(e)&&!e.isInline()}function Et(e,n){let r=[],i=[],a=()=>{i.length!==0&&(r.push(n().splice(0,0,i)),i=[])};for(let o of e)if(G(o)){if(a(),t.vt(o)){let e=Et(o.getChildren(),n);o.splice(0,o.getChildrenSize(),e)}r.push(o)}else i.push(o);return a(),r}function Dt(e,n){if(!t.Sn(n))return e;let r=n.style.textAlign;if(!jt(r))return e;for(let n of e)t.st(n)&&n.getFormatType()===``&&n.setFormat(r);return e}function Ot(e,n,r){e.length===1&&t._r(e[0])&&(e=[]);let i=t.Ar();if(t.Sn(r)){let e=r.style.textAlign;jt(e)&&i.setFormat(e)}return[i.splice(0,0,e)]}var kt={$accepts:G,$packageRun:Ot,name:`BlockSchema`},K=W,At=new Set([`center`,`end`,`justify`,`left`,`right`,`start`]);function jt(e){return At.has(e)}K.tag(`b`,`strong`,`em`,`i`,`code`,`mark`,`s`,`sub`,`sup`,`u`,`span`),K.text(),K.tag(`script`,`style`),K.tag(`br`),K.tag(`p`),K.tag(`hr`),K.any();function Mt(e,t){let n=[],r=0,i=0;for(;r<e.length&&i<t.length;)e[r]<=t[i]?n.push(e[r++]):n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);for(;i<t.length;)n.push(t[i++]);return n}function Nt(e){let t=[],n=new Map,r=[],i=[],a=[],o=new Set;e.forEach((e,s)=>{let c=function(e){let t=e[V];return t===void 0&&z(360),t}(e.match),l=e.name||function(e,t){return e.kind===`text`?`#text@${t}`:e.kind===`comment`?`#comment@${t}`:e.tags.size===0?`*@${t}`:`${Array.from(e.tags).join(`,`).toLowerCase()}@${t}`}(c,s);if(e.name&&o.add(e.name),t.push({$import:e.$import,name:l,predicate:c.predicate}),c.kind===`text`)i.push(s);else if(c.kind===`comment`)a.push(s);else if(c.tags.size===0)r.push(s);else for(let e of c.tags){let t=n.get(e);t||(t=[],n.set(e,t)),t.push(s)}});let s=new Map;if(r.length===0)for(let[e,t]of n)s.set(e,t);else for(let[e,t]of n)s.set(e,Mt(t,r));return{byTag:s,commentIndices:a,rules:t,textIndices:i,wildcardIndices:r}}Object.freeze([]);function Pt(e){let t=[];for(let n of e)if(Ft(n))for(let e of n.rules)t.push(e);else t.push(n);return t}function Ft(e){return typeof e==`object`&&!!e&&`__type`in e&&e.__type===`CompiledOverlayRules`}function It(e){let t=Pt(e);return{__type:`CompiledOverlayRules`,dispatch:Nt(t),rules:t}}Object.freeze({}),W.any();var Lt={any:W.any,comment:W.comment,css:xt,tag:W.tag,text:W.text},Rt=new Set([`STYLE`,`SCRIPT`]);function zt(e,n){tt(n);let r=t.X(n)?n.body.childNodes:n.childNodes,i=[],a=[];for(let t of r)if(!Rt.has(t.nodeName)){let n=Ut(t,e,a,!1);if(n!==null)for(let e of n)i.push(e)}return function(e){for(let n of e)n.getParent()&&n.getNextSibling()instanceof t.j&&n.insertAfter(t.Bt());for(let t of e){let e=t.getParent();e&&e.splice(t.getIndexWithinParent(),1,t.getChildren())}}(a),i}function Bt(e,n=null,r=t.s()){return ut([Ze(ot,!0)],r)(()=>{let i=t.Dr(),a=lt(r),o=t.bn(n)?t.Tr(n.anchor.getNode()):null,s=e.append.bind(e);for(let e of(t.vt(o)?o:i).getChildren())Ht(r,e,s,n,a);return e})}function Vt(e,n=null){return(typeof document>`u`||typeof window>`u`&&global.window===void 0)&&z(338),t.Rn(e),Bt(t.qt().createElement(`div`),n,e).innerHTML}function Ht(e,r,i,a=null,o=t.kt(e)){let s=o.$shouldInclude(r,a,e),c=o.$shouldExclude(r,a,e),l=r;a!==null&&t.Jt(r)&&(l=n.D(a,r,`clone`));let{element:u,after:d,append:f,$getChildNodes:p}=o.$exportDOM(l,e);if(!u)return!1;let m=t.qt().createDocumentFragment(),h=p?p():t.vt(l)?l.getChildren():[],g=s&&t.Fr(a)&&t.vt(r)?null:a,_=m.append.bind(m);for(let t of h){let n=Ht(e,t,_,g,o);!s&&n&&o.$extractWithChild(r,t,a,`html`,e)&&(s=!0)}if(s&&!c){if((t.Sn(u)||t.Nn(u))&&(f?f(m):u.append(m)),i(u),d){let e=d.call(l,u);e&&(t.Nn(u)?u.replaceChildren(e):u.replaceWith(e))}}else i(m);return s}function Ut(e,n,r,i,a=new Map,o){let s=[];if(Rt.has(e.nodeName))return s;let c=null,l=function(e,t){let{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase()),i=null;if(r!==void 0)for(let t of r){let n=t(e);n!==null&&(i===null||(i.priority||0)<=(n.priority||0))&&(i=n)}return i===null?null:i.conversion}(e,n),u=l?l(e):null,d=null;if(u!==null){d=u.after;let t=u.node;if(c=Array.isArray(t)?t[t.length-1]:t,c!==null){for(let[,e]of a)if(c=e(c,o),!c)break;c&&s.push(...Array.isArray(t)?t:[c])}u.forChild!=null&&a.set(e.nodeName,u.forChild)}let f=e.childNodes,p=[],m=(c==null||!t.J(c))&&(c!=null&&t.st(c)||i);for(let e=0;e<f.length;e++)p.push(...Ut(f[e],n,r,m,new Map(a),c));if(d!=null&&(p=d(p)),t.er(e)&&(p=Wt(e,p,m?()=>{let e=new t.j;return r.push(e),e}:t.Ar)),c==null)if(p.length>0)for(let e of p)s.push(e);else t.er(e)&&function(e){return e.nextSibling==null||e.previousSibling==null?!1:t.fr(e.nextSibling)&&t.fr(e.previousSibling)}(e)&&s.push(t.Bt());else t.vt(c)&&c.append(...p);return s}function Wt(e,n,r){let i=e.style.textAlign,a=[],o=[];for(let e=0;e<n.length;e++){let s=n[e];if(t.st(s))i&&!s.getFormat()&&s.setFormat(i),a.push(s);else if(o.push(s),e===n.length-1||e<n.length-1&&t.st(n[e+1])){let e=r();e.setFormat(i),e.append(...o),a.push(e),o=[]}}return a}function Gt(e,n,r=null){let i=t.E(r),a=r?t.vr(r):[],o=r!==null&&a.length>0;if(o&&typeof i.caretPositionFromPoint==`function`){let o=i.caretPositionFromPoint(e,n,{shadowRoots:a});if(o!==null&&function(e,n){for(let r=e;r!==null;){if(r===n)return!0;r=t.ut(r)}return!1}(o.offsetNode,r))return{node:o.offsetNode,offset:o.offset}}if(o){let a=r.getRootNode();if(t.Gn(a)){let t=a.elementFromPoint(e,n);if(t!==null&&r.contains(t)){let r=function(e,t,n,r){let i=r.createRange(),a=e=>t<e.top?e.top-t:t>e.bottom?t-e.bottom:0,o=t=>e<t.left?t.left-e:e>t.right?e-t.right:0,s=r.createTreeWalker(n,NodeFilter.SHOW_TEXT),c=null,l=1/0,u=1/0;for(let e=s.nextNode();e;e=s.nextNode()){i.selectNodeContents(e);for(let t of i.getClientRects()){let n=a(t),r=o(t);(n<l||n===l&&r<u)&&(l=n,u=r,c=e)}}if(c===null)return null;let d=0,f=1/0,p=1/0;for(let t=0;t<=c.length;t++){i.setStart(c,t),i.collapse(!0);let n=i.getBoundingClientRect(),r=a(n),o=Math.abs(e-n.left);(r<f||r===f&&o<p)&&(f=r,p=o,d=t)}return{node:c,offset:d}}(e,n,t,i);if(r!==null)return r}}}if(typeof i.caretRangeFromPoint==`function`){let t=i.caretRangeFromPoint(e,n);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(typeof i.caretPositionFromPoint==`function`){let t=i.caretPositionFromPoint(e,n);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}function q(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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.`)}var J={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Kt(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy(`lexical`,{createHTML:e=>e}).createHTML(e):e}var qt=(e,n)=>{if(!t.bn(n))return n.insertRawText(e),!0;let r=e=>{let n=t.tt();t.bn(n)&&e(n)};return t.Kn(e,{linebreak:()=>r(e=>e.insertParagraph()),tab:()=>r(e=>e.insertNodes([t.kr()])),text:e=>r(t=>t.insertText(e))}),!0},Y={"application/x-lexical-editor":[(e,n,r)=>{try{let r=t.s(),i=JSON.parse(e);if(i&&i.namespace===r._config.namespace&&Array.isArray(i.nodes))return Z(r,ln(i.nodes),n),!0}catch(e){console.error(e)}return r()}],"text/html":[(e,n,r)=>{try{let r=t.s();return Z(r,zt(r,new DOMParser().parseFromString(Kt(e),`text/html`)),n),!0}catch(e){return console.error(e),r()}}],"text/plain":[qt],"text/uri-list":[qt]};function Jt(e,t,n,r){if(!e)return!1;let i=a=>!!e[a]&&e[a](t,n,i.bind(null,a-1),r);return i(e.length-1)}function Yt(e,t,n){let r=t.getData(`text/plain`);for(let i of function(e){return Object.keys(e.$importMimeType).filter(t=>e.$importMimeType[t]!==void 0).sort((t,n)=>{let r=e.priority[t],i=e.priority[n];return r===void 0&&i===void 0?t<n?-1:+(t>n):r===void 0?1:i===void 0?-1:r-i})}(e)){let a=t.getData(i);if(a&&(i!==`text/html`||a!==r)&&Jt(e.$importMimeType[i],a,n,t))return!0}return!1}var Xt={$importMimeType:Y,$insertDataTransfer:(e,t)=>Yt({$importMimeType:Y,priority:J},e,t),priority:J},Zt=t.hr({build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(e,n)=>Yt(t,e,n),priority:t.priority}),config:t.Xr({$importMimeType:Y,priority:J}),mergeConfig(e,n){let r=t.d(e,n);if(n.$importMimeType){let t={...e.$importMimeType};for(let[e,r]of Object.entries(n.$importMimeType))if(r){let n=t[e];t[e]=n?[...n,...r]:r}r.$importMimeType=t}return n.priority&&(r.priority={...e.priority,...n.priority}),r},name:`@lexical/clipboard/Import`});function X(e,n=t.tt()){return n??q(166),t.bn(n)&&n.isCollapsed()||n.getNodes().length===0?``:Vt(e,n)}function Qt(e,n=t.tt()){return n??q(166),t.bn(n)&&n.isCollapsed()||n.getNodes().length===0?null:JSON.stringify(cn(e,n))}function $t(e,t){let n=e.getData(`text/plain`)||e.getData(`text/uri-list`);n!=null&&t.insertRawText(n)}function en(e,t,n){(function(){let e=we(Zt.name);return e?e.output:Xt})().$insertDataTransfer(e,t)}var tn=`application/x-lexical-drag`;function nn(e,t){let n={editorKey:t.getKey()};e.setData(tn,JSON.stringify(n))}function rn(e,n,r){let i=e.dataTransfer;if(i===null)return!1;let a=function(e){let t=e.getData(tn);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}return(r=n)!==null&&typeof r==`object`&&`editorKey`in r&&typeof r.editorKey==`string`?n:null;var r}(i);if(a===null)return!1;let o=function(e,n){let r=Gt(e.clientX,e.clientY,n.getRootElement());if(r===null)return null;let i=t.Yt(r.node);if(i===null)return null;if(t.Jt(i))return t.gt(i,`next`,r.offset);if(t.vt(i))return t.Ir(i,r.offset,`next`);let a=i.getParent();return a===null?null:t.Ir(a,i.getIndexWithinParent()+1,`next`)}(e,n);if(o===null)return!1;let s=t.In(o);if(s===null)return!1;let c=a.editorKey===n.getKey(),l=t.tt();if(c){if(!t.bn(l)||l.isCollapsed())return!1;if(function(e,n){let{anchor:r,focus:i}=t.pn(t.An(n),`next`);return t.Un(r,e)<0&&t.Un(e,i)<0}(o,l))return e.preventDefault(),!0;l.removeText()}if(!s.origin.isAttached())return e.preventDefault(),!0;if(r(i,t.en(t.t(s)),n),!c){let e=n.getRootElement(),r=e?e.ownerDocument:null,i=r?function(e,n){for(let r of t.$t(n)){let n=t.g(r);if(t.ct(n)&&n.getKey()===e&&t.Sn(r))return r}return null}(a.editorKey,r):null;i!==null&&i.dispatchEvent(new InputEvent(`beforeinput`,{bubbles:!0,cancelable:!0,inputType:`deleteByDrag`}))}return e.preventDefault(),!0}function an(e,t){return rn(e,t,en)}function on(e,t){return rn(e,t,(e,t)=>$t(e,t))}function Z(e,n,r){e.dispatchCommand(t.Q,{nodes:n,selection:r})||(r.insertNodes(n),function(e){if(t.bn(e)&&e.isCollapsed()){let n=e.anchor,r=null,i=t.Gt(n,`previous`);if(i)if(t.mn(i))r=i.origin;else{let e=t.O(i,t.Z(t.Dr(),`next`).getFlipped());for(let n of e){if(t.Jt(n.origin)){r=n.origin;break}if(t.vt(n.origin)&&!n.origin.isInline())break}}if(r&&t.Jt(r)){let t=r.getFormat(),n=r.getStyle();e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}}}(r))}function sn(e,r,i,a=[]){let o=r===null||i.isSelected(r),s=t.vt(i)&&i.excludeFromCopy(`html`),c=i;r!==null&&t.Jt(c)&&(c=n.D(r,c,`clone`));let l=t.vt(c)?c.getChildren():[],u=function(e){let n=e.exportJSON(),r=e.constructor;if(n.type!==r.getType()&&q(58,r.name),t.vt(e)){let e=n.children;Array.isArray(e)||q(59,r.name)}return n}(c);t.Jt(c)&&c.getTextContentSize()===0&&(o=!1);let d=o&&t.Fr(r)&&t.vt(i)?null:r;for(let n=0;n<l.length;n++){let a=l[n],s=sn(e,d,a,u.children);!o&&t.vt(i)&&s&&i.extractWithChild(a,r,`clone`)&&(o=!0)}if(o&&!s){let n=t.or(c);if(n.length>0){let r={};for(let i of n){let n=t.lr(c,i);n===null&&q(366,c.constructor.name,i);let a=[];sn(e,null,n,a),a.length===1&&a[0].type===n.getType()||q(385,i,c.constructor.name,String(a.length),String(a.length>0?a[0].type:`none`)),r[i]=a[0]}u.$slots=r}}if(o&&!s)a.push(u);else if(Array.isArray(u.children))for(let e=0;e<u.children.length;e++){let t=u.children[e];a.push(t)}return o}function cn(e,n){let r=[],i=t.Dr(),a=t.bn(n)?n.anchor.getNode():t.Fr(n)?n.getNodes()[0]??null:null,o=a===null?null:t.Tr(a),s=(t.vt(o)?o:i).getChildren();for(let t=0;t<s.length;t++)sn(e,n,s[t],r);return{namespace:e._config.namespace,nodes:r}}function ln(e){let n=[];for(let r of e)n.push(t.At(r));return n}var Q=null;async function un(e,r,i){if(Q!==null)return!1;if(r!==null)return new Promise((t,n)=>{e.update(()=>{t(dn(e,r,i))})});let a=e.getRootElement(),o=e._window||window,s=o.document,c=t.M(o);if(a===null||c===null)return!1;let l=s.createElement(`span`);l.style.position=`fixed`,l.style.top=`-1000px`,l.append(s.createTextNode(`#`)),a.append(l);let u=s.createRange();return u.setStart(l,0),u.setEnd(l,1),c.removeAllRanges(),c.addRange(u),new Promise((r,a)=>{let c=e.registerCommand(t.Rr,t=>(n.s(t,ClipboardEvent)&&(c(),Q!==null&&(o.clearTimeout(Q),Q=null),r(dn(e,t,i))),!0),4);Q=o.setTimeout(()=>{c(),Q=null,r(!1)},50),s.execCommand(`copy`),l.remove()})}function dn(e,n,r){if(r===void 0){let n=t.M(e._window),i=t.tt();if(!i||i.isCollapsed()||!n)return!1;let a=t.Er(n,e.getRootElement()),o=a.anchorNode,s=a.focusNode;if(o!==null&&s!==null&&!t.ht(e,o,s))return!1;r=pn(i)}n.preventDefault();let i=n.clipboardData;return i!==null&&(mn(i,r),!0)}var fn=[[`text/html`,X],[`application/x-lexical-editor`,Qt]];function pn(e=t.tt()){return function(e,t){let n={"text/plain":``};for(let[r,i]of Object.entries(e))if(i){let e=_n(i,t);e!==null&&(n[r]=e)}return n}(hn(),e)}function mn(e,t){for(let[n]of fn)t[n]===void 0&&e.setData(n,``);for(let n in t){let r=t[n];r!==void 0&&e.setData(n,r)}}function hn(e=t.s()){let n=I(e,vn.name);return n?n.output:gn}var gn={"application/x-lexical-editor":[(e,n)=>e?Qt(t.s(),e):n()],"text/html":[(e,n)=>e?X(t.s(),e):n()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function _n(e,t){let n=r=>e[r]?e[r](t,n.bind(null,r-1)):null;return n(e.length-1)}var vn=t.hr({build:(e,t,n)=>t.$exportMimeType,config:t.Xr({$exportMimeType:gn}),mergeConfig(e,n){let r=t.d(e,n);if(n.$exportMimeType){let t={...e.$exportMimeType};for(let[e,r]of Object.entries(n.$exportMimeType))if(r){let n=t[e];t[e]=n?[...n,...r]:r}r.$exportMimeType=t}return r},name:`@lexical/clipboard/GetClipboardData`}),yn={bold:`bold`,italic:`italic`,strikeThrough:`strikethrough`,subscript:`subscript`,superscript:`superscript`,underline:`underline`},$=Symbol.for(`@lexical/dragon/WindowState`);function bn(e,t,n){let r=function(e){let t=e[$];return t===void 0&&(t={dispose:()=>{},editors:new Map,installs:new Set},e[$]=t),t}(e);if(r.installs.size===0){let t=wn.bind(e);e.addEventListener(`message`,t,!0),r.dispose=()=>{e.removeEventListener(`message`,t,!0)}}if(r.installs.add(t),n){let e=r.editors.get(n)||new Set;e.add(t),r.editors.set(n,e)}return xn.bind(null,e,r,t,n)}function xn(e,t,n,r){if(r){let e=t.editors.get(r);e&&e.delete(n)&&e.size===0&&t.editors.delete(r)}t.installs.delete(n)&&t.installs.size===0&&(t.dispose(),delete e[$])}function Sn(e){return e&&e.ownerDocument.defaultView}function Cn(e){let t=ie(()=>Sn(e.getRootElement()),t=>e.registerRootListener(e=>{t.value=Sn(e)}));return T(()=>{let n=t.value;if(n)return bn(n,Symbol(`@lexical/dragon/editorInstall`),e)})}function wn(e){if(e.origin!==this.location.origin)return;let n=function(e){let n=e[$];if(n===void 0)return null;let r=t.g(t.Sr(e.document));return t.ct(r)&&n.editors.has(r)?r:null}(this);if(n===null)return;let r=e.data;if(typeof r==`string`){let i;try{i=JSON.parse(r)}catch{return}if(i&&i.protocol===`nuanria_messaging`&&i.type===`request`){let r=i.payload;if(r&&r.functionId===`makeChanges`){let i=r.args;if(Array.isArray(i)){let[r,a,o,s,c,l]=i;if(![r,a,s,c].every(Number.isFinite)||typeof o!=`string`&&o!==-1)return;n.update(()=>{let n=t.tt();if(t.bn(n)){let i=n.anchor,u=i.getNode(),d=0,f=0;if(t.Jt(u)&&r>=0&&a>=0&&(d=r,f=r+a,n.setTextNodeRange(u,d,u,f)),typeof o!=`string`||d===f&&o===``||(n.insertRawText(o),u=i.getNode()),t.Jt(u)){let e=u.getTextContentSize();d=Math.min(Math.max(s,0),e),f=s<0||c<0?d:Math.min(s+c,e),n.setTextNodeRange(u,d,u,f)}if(typeof l==`string`&&c>0&&!n.isCollapsed()){let e=yn[l];e!==void 0&&n.formatText(e)}e.stopImmediatePropagation()}})}}}}}function Tn(e,n,r,i,a){if(e===null||r.size===0&&i.size===0&&!a)return 0;let o=n._selection,s=e._selection;if(a)return 1;if(!(t.bn(o)&&t.bn(s)&&s.isCollapsed()&&o.isCollapsed()))return 0;let c=function(e,n,r){let i=e._nodeMap,a=[];for(let e of n){let t=i.get(e);t!==void 0&&a.push(t)}for(let[e,n]of r){if(!n)continue;let r=i.get(e);r===void 0||t.ri(r)||a.push(r)}return a}(n,r,i);if(c.length===0)return 0;if(c.length>1){let r=n._nodeMap,i=r.get(o.anchor.key),a=r.get(s.anchor.key);return i&&a&&!e._nodeMap.has(i.__key)&&t.Jt(i)&&i.__text.length===1&&o.anchor.offset===1?2:0}let l=c[0],u=e._nodeMap.get(l.__key);if(!t.Jt(u)||!t.Jt(l)||u.__mode!==l.__mode)return 0;let d=u.__text,f=l.__text;if(d===f)return 0;let p=o.anchor,m=s.anchor;if(p.key!==m.key||p.type!==`text`)return 0;let h=p.offset,g=m.offset,_=f.length-d.length;return _===1&&g===h-1?2:_===-1&&g===h+1?3:_===-1&&g===h?4:0}function En(e,n,r){let i=r(),a=0,o=i,s=0,c=null;return(l,u,d,f,p,m)=>{let h=r();if(m.has(`composition-start`)&&(o=i,s=a,c=l),m.has(`historic`))return a=0,i=h,2;m.has(`composition-end`)&&c&&(i=o,a=s,l=c);let g=m.has(`paste`)||m.has(`cut`)?0:Tn(l,u,f,p,e.isComposing()),_=(()=>{let r=d===null||d.editor===e,o=m.has(t.nr);if(!o&&r&&m.has(`history-merge`))return 0;if(g===1)return 2;if(l===null)return 1;let s=u._selection;if(!(f.size>0||p.size>0))return s===null?2:0;let c=typeof n==`number`?n:n.peek();return!1===o&&g!==0&&g===a&&h<i+c&&r||f.size===1&&function(e,n,r){let i=n._nodeMap.get(e),a=r._nodeMap.get(e),o=n._selection,s=r._selection;return!(t.bn(o)&&t.bn(s)&&o.anchor.type===`element`&&o.focus.type===`element`&&s.anchor.type===`text`&&s.focus.type===`text`||!t.Jt(i)||!t.Jt(a)||i.__parent!==a.__parent)&&JSON.stringify(n.read(()=>i.exportJSON()))===JSON.stringify(r.read(()=>a.exportJSON()))}(Array.from(f)[0],l,u)?0:1})();return i=h,a=g,_}}function Dn(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}function On(e,n,r,i=Date.now,a,o=null){let s=En(e,r,i),c=()=>{a&&a(n)};return c(),t.Yn(e.registerCommand(t.Tt,()=>(function(e,n,r){let i=n.redoStack,a=n.undoStack;if(a.length!==0){let o=n.current,s=a.pop();o!==null&&(i.push(o),e.dispatchCommand(t.Ur,!0)),a.length===0&&e.dispatchCommand(t.v,!1),n.current=s||null,r&&r(n),s&&s.editor.setEditorState(s.editorState,{tag:`historic`})}}(e,n,a),!0),0),e.registerCommand(t.nn,()=>(function(e,n,r){let i=n.redoStack,a=n.undoStack;if(i.length!==0){let o=n.current;o!==null&&(a.push(o),e.dispatchCommand(t.v,!0));let s=i.pop();i.length===0&&e.dispatchCommand(t.Ur,!1),n.current=s||null,r&&r(n),s&&s.editor.setEditorState(s.editorState,{tag:`historic`})}}(e,n,a),!0),0),e.registerCommand(t.hn,()=>(Dn(n,a),!1),0),e.registerCommand(t.dt,()=>(Dn(n,a),e.dispatchCommand(t.Ur,!1),e.dispatchCommand(t.v,!1),!0),0),e.registerUpdateListener(({editorState:r,prevEditorState:i,dirtyLeaves:a,dirtyElements:l,tags:u})=>{let d=n.current,f=n.redoStack,p=n.undoStack,m=d===null?null:d.editorState;if(d!==null&&r===m)return;let h=s(i,r,d,a,l,u);if(h===1){if(f.length!==0&&(n.redoStack=[],e.dispatchCommand(t.Ur,!1)),d!==null){p.push({...d});let n=typeof o==`number`||o===null?o:o.peek();n!==null&&p.length>n&&p.splice(0,p.length-n),e.dispatchCommand(t.v,!0)}}else if(h===2)return;n.current={editor:e,editorState:r},c()}))}function kn(){return{current:null,redoStack:[],undoStack:[]}}Date.now;function An({delay:e,externalHistoryState:n}){let[i]=t.oi();return function(e,t,n=1e3){let i=(0,r.useMemo)(()=>t||kn(),[t]);(0,r.useEffect)(()=>On(e,i,n),[n,e,i])}(i,n,e),null}var jn=(0,r.createContext)({}),Mn=({children:e})=>{let t=(0,r.useMemo)(()=>({historyState:kn()}),[]);return(0,i.jsx)(jn.Provider,{value:t,children:e})},Nn=()=>(0,r.useContext)(jn);function Pn(e){return Number.isFinite(e)&&e>0?e:1}function Fn(e,t){try{return n.d(e,t)}catch{return 1}}function In(e){return Pn(Fn(e,!0))}function Ln(e){return Pn(Fn(e,!0)/Fn(e,!1))}function Rn({className:e,"data-test-id":t,onFocus:n,onPointerDownCapture:r,placeholder:a,placeholderClassName:o}){return(0,i.jsx)(Be,{className:e??`ContentEditable__root`,"aria-placeholder":a,onFocus:n,onPointerDownCapture:r,...t?{"data-test-id":t}:{},placeholder:(0,i.jsx)(`div`,{className:o??`ContentEditable__placeholder`,children:a})})}Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Nn}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return un}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return mn}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return en}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Mn}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Ln}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return An}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return on}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return In}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Cn}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Rn}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return pn}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return ke}});
|
|
1
|
+
const e=require("./rolldown-runtime-D_FWMvbo.cjs"),t=require("./Lexical.prod-C9Xekspf.cjs"),n=require("./LexicalUtils.prod-CYv8J7Gq.cjs");let r=require("react");r=e.a(r,1);let i=require("react/jsx-runtime");var a=Symbol.for(`preact-signals`);function o(){if(d>1)return void d--;let e,t=!1;for(function(){let e=u;for(u=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();c!==void 0;){let n=c;for(c=void 0,f++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&v(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(f=0,d--,t)throw e}var s,c;function l(e){let t=s;s=void 0;try{return e()}finally{s=t}}var u,d=0,f=0,p=0,m=0;function h(e){if(s===void 0)return;let t=e.n;return t===void 0||t.t!==s?(t={i:0,S:e,p:s.s,n:void 0,t:s,e:void 0,x:void 0,r:t},s.s!==void 0&&(s.s.n=t),s.s=t,e.n=t,32&s.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=s.s,t.n=void 0,s.s.n=t,s.s=t),t):void 0}function g(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function _(e,t){return new g(e,t)}function v(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function y(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function b(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function x(e,t){g.call(this,void 0),this.x=e,this.s=void 0,this.g=m-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function S(e){let t=e.m;if(e.m=void 0,typeof t==`function`){d++;let n=s;s=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,C(e),t}finally{s=n,o()}}}function C(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,S(e)}function ee(e){if(s!==this)throw Error(`Out-of-order effect`);b(this),s=e,this.f&=-2,8&this.f&&C(this),o()}function w(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function T(e,t){let n=new w(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}function E(e,t={}){let n={};for(let r in e){let i=t[r];n[r]=_(i===void 0?e[r]:i)}return n}g.prototype.brand=a,g.prototype.h=function(){return!0},g.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?l(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},g.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&l(()=>{var e;(e=this.Z)==null||e.call(this)}))}},g.prototype.subscribe=function(e){return T(()=>{let t=this.value,n=s;s=void 0;try{e(t)}finally{s=n}},{name:`sub`})},g.prototype.valueOf=function(){return this.value},g.prototype.toString=function(){return this.value+``},g.prototype.toJSON=function(){return this.value},g.prototype.peek=function(){let e=s;s=void 0;try{return this.value}finally{s=e}},Object.defineProperty(g.prototype,"value",{get(){let e=h(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(f>100)throw Error(`Cycle detected`);(function(e){d!==0&&f===0&&e.l!==p&&(e.l=p,u={S:e,v:e.v,i:e.i,o:u})})(this),this.v=e,this.i++,m++,d++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{o()}}}}),x.prototype=new g,x.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===m))return!0;if(this.g=m,this.f|=1,this.i>0&&!v(this))return this.f&=-2,!0;let e=s;try{y(this),s=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return s=e,b(this),this.f&=-2,!0},x.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}g.prototype.S.call(this,e)},x.prototype.U=function(e){if(this.t!==void 0&&(g.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},x.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(x.prototype,"value",{get(){if(1&this.f)throw Error(`Cycle detected`);let e=h(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),w.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},w.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,S(this),y(this),d++;let e=s;return s=this,ee.bind(this,e)},w.prototype.N=function(){2&this.f||(this.f|=2,this.u=c,c=this)},w.prototype.d=function(){this.f|=8,1&this.f||C(this)},w.prototype.dispose=function(){this.d()};function te(){let e=t.Dr(),n=t.tt(),r=t.Ar();e.clear(),e.append(r),n!==null&&r.select(),t.bn(n)&&(n.format=0)}function ne(e,n=te){return e.registerCommand(t.hn,()=>(n(),!0),0)}function re(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}function ie(e,t){let n;return _(e(),{unwatched(){n&&=(n(),void 0)},watched(){this.value=e(),n=t(this)}})}function D(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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.`)}var ae;try{ae=`0.48.0+prod.esm`}catch{}var oe=ae??`"<unknown>+source"`,se=new Set([`__proto__`,`constructor`,`prototype`]);function ce(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)!se.has(e)&&Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=ce(n[e],r[e]));return e}return t}var O=0,k=1,le=2,ue=3,A=4,j=5,M=6,N=7;function P(e){return e.id===O}function de(e){return e.id===le}function fe(e){return function(e){return e.id===k}(e)||D(305,String(e.id),String(k)),Object.assign(e,{id:le})}var pe=new Set,me=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:O}}mergeConfigs(){let e=this.extension.config||{},n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):t.d;for(let t of this.configs)e=n(e,t);return e}init(e){let t=this.state;de(t)||D(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:ue,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:A,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==A&&D(307,String(t.id),String(j)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:j,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==j&&D(308,String(n.id),String(j));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:M})}(n),()=>{let e=this.state;e.id!==N&&D(309,String(n.id),String(N)),this.state=function(e){return Object.assign(e,{id:j})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==M&&D(310,String(t.id),String(M)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:N})}(t),n}getSignal(){return this._signal===void 0&&D(311),this._signal}getInitResult(){this.extension.init===void 0&&D(312,this.extension.name);let e=this.state;return function(e){return e.id>=A}(e)||D(313,String(e.id),String(A)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=ue}(e)||D(314,String(e.id),String(ue)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&D(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&D(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=N}(e)||D(316,String(e.id),String(N)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||pe}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=j})(e)||D(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},he={tag:t.Jr};function ge(){let e=t.Dr();e.isEmpty()&&e.append(t.Ar())}var _e=t.hr({config:t.Xr({setOptions:he,updateOptions:he}),init:({$initialEditorState:e=ge})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:n,setOptions:r},i){let a=i.getInitResult();if(!a.initialized){a.initialized=!0;let{$initialEditorState:i}=a;if(t.Lt(i))e.setEditorState(i,r);else if(typeof i==`function`)e.update(()=>{i(e)},n);else if(i&&(typeof i==`string`||typeof i==`object`)){let t=e.parseEditorState(i);e.setEditorState(t,r)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[t.q,t.Wt,t.H,t.in,t.Et]}),ve=Symbol.for(`@lexical/extension/LexicalBuilder`);function ye(){}function be(e){throw e}function F(e){return Array.isArray(e)?e:[e]}var xe=oe,Se=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=xe,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[F(_e)];for(let e of t)n.push(F(e));return new e(n)}static maybeFromEditor(t){let n=t[ve];return n&&(n.PACKAGE_VERSION!==xe&&D(292,n.PACKAGE_VERSION,xe),n instanceof e||D(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&D(294),n}constructEditor(){let{$initialEditorState:e,onError:n,onWarn:r,...i}=this.buildCreateEditorArgs(),a=Object.assign(t.mr({...i,...n?{onError:e=>{n(e,a)}}:{},...r?{onWarn:e=>{r(e,a)}}:{}}),{[ve]:this});for(let e of this.sortedExtensionReps())e.build(a);return a}buildEditor(){let e=ye;function n(){try{e()}finally{e=ye}}let r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return e=t.Yn(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&D(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&D(296);let[t]=F(e);typeof t.name!=`string`&&D(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&D(298,t.name),!n){n=new me(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&D(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&D(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=F(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(de(i))return;let a=n.extension.name;var o;P(i)||D(300,a,r||`[unknown]`),P(o=i)||D(304,String(o.id),String(O)),i=Object.assign(o,{id:k}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=fe(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())P(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&D(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],a=r.signal;for(let t of n){let n=t.register(e,a);n&&i.push(n)}for(let t of n){let n=t.afterRegistration(e);n&&i.push(n)}return t.Yn(...i)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.onWarn!==void 0&&(e.onWarn=o.onWarn),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of re(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&D(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&ce(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=[...t]);let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=be,e}};function Ce(e,t){let n=Se.fromEditor(e).getExtensionRep(t);return n===void 0&&D(303,t.name),n.getExtensionDependency()}function I(e,t){let n=Se.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function we(e){return I(t.s(),e)}var Te=t.x(`INSERT_HORIZONTAL_RULE_COMMAND`),L=class e extends t.I{static getType(){return`horizontalrule`}static clone(t){return new e(t.__key)}static importJSON(e){return R().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:Ee,priority:0})}}exportDOM(){return{element:t.qt().createElement(`hr`)}}createDOM(e){let n=t.qt().createElement(`hr`);return t.Vr(n,e.theme.hr),n}getTextContent(){return`
|
|
2
|
+
`}isInline(){return!1}updateDOM(){return!1}};function Ee(){return{node:R()}}function R(){return t.k(L)}function De(e){return e instanceof L}t.ft,t.Jn,Date.now;function Oe(e){return e.canIndent()}function ke(e,r,i=Oe){return t.Yn(e.registerCommand(t.zn,r=>{let i=t.tt();if(!t.bn(i))return!1;r.preventDefault();let a=function(e){if(e.getNodes().filter(e=>t.st(e)&&e.canIndent()).length>0)return!0;let r=e.anchor,i=e.focus,a=i.isBefore(r)?i:r,o=n.o(a.getNode());if(o.canIndent()){let e=o.getKey(),n=t.h();if(n.anchor.set(e,0,`element`),n.focus.set(e,0,`element`),n=t.R(n),n.anchor.is(a))return!0}return!1}(i)?r.shiftKey?t.pr:t.on:t.Pn;return e.dispatchCommand(a,void 0)},0),e.registerCommand(t.on,()=>{let e=typeof r==`number`?r:r?r.peek():null;if(!t.bn(t.tt()))return!1;let a=typeof i==`function`?i:i.peek();return n.t(t=>{if(a(t)){let n=t.getIndent()+1;(!e||n<e)&&t.setIndent(n)}})},4))}function Ae(){return t.Dr().getTextContent()}function je(e,t=!0){if(e)return!1;let n=Ae();return t&&(n=n.trim()),n===``}function Me(e){if(!je(e,!1))return!1;let n=t.Dr().getChildren(),r=n.length;if(r>1)return!1;for(let e=0;e<r;e++){let r=n[e];if(t.$(r))return!1;if(t.vt(r)){if(!t.kn(r)||r.__indent!==0)return!1;let n=r.getChildren(),i=n.length;for(let r=0;r<i;r++){let r=n[e];if(!t.Jt(r))return!1}}}return!0}function Ne(e){return()=>Me(e)}function Pe(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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 Fe(e,n,r,i){let a=e=>e instanceof r,o=e=>{let n=t.D(e.getTextContent());n.setFormat(e.getFormat()),e.replace(n)};return[e.registerNodeTransform(t.Wt,e=>{if(!e.isSimpleText())return;let r,s=e.getPreviousSibling(),c=e.getTextContent(),l=e;if(t.Jt(s)){let t=s.getTextContent(),r=n(t+c);if(a(s)){if(r===null||(e=>e.getLatest().__mode)(s)!==0)return void o(s);{let n=r.end-t.length;if(n>0){let r=t+c.slice(0,n);if(s.select(),s.setTextContent(r),n===c.length)e.remove();else{let t=c.slice(n);e.setTextContent(t)}return}}}else if(r===null||r.start<t.length)return}let u=0;for(;;){r=n(c);let e,d=r===null?``:c.slice(r.end);if(c=d,d===``){let e=l.getNextSibling();if(t.Jt(e)){d=l.getTextContent()+e.getTextContent();let t=n(d);if(t===null)return void(a(e)?o(e):e.markDirty());if(t.start!==0)return}}if(r===null)return;if(r.start===0&&t.Jt(s)&&s.isTextEntity()){u+=r.end;continue}r.start===0?[e,l]=l.splitText(r.end):[,e,l]=l.splitText(r.start+u,r.end+u),e===void 0&&Pe(165,`nodeToReplace`);let f=i(e);if(f.setFormat(e.getFormat()),e.replace(f),l==null)return;u=0,s=f}}),e.registerNodeTransform(r,e=>{let r=e.getTextContent(),i=n(r);if(i===null||i.start!==0)return void o(e);if(r.length>i.end)return void e.splitText(i.end);let s=e.getPreviousSibling();t.Jt(s)&&s.isTextEntity()&&(o(s),o(e));let c=e.getNextSibling();t.Jt(c)&&c.isTextEntity()&&(o(c),a(e)&&o(e))})]}var Ie=t.ar?r.useLayoutEffect:r.useEffect;function Le({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:a,ariaDescribedBy:o,ariaErrorMessage:s,ariaExpanded:c,ariaInvalid:l,ariaLabel:u,ariaLabelledBy:d,ariaMultiline:f,ariaOwns:p,ariaRequired:m,autoCapitalize:h,className:g,id:_,role:v=`textbox`,spellCheck:y=!0,style:b,tabIndex:x,"data-testid":S,...C},ee){let[w,T]=(0,r.useState)(e.isEditable()),E=(0,r.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),te=(0,r.useMemo)(()=>function(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}(ee,E),[E,ee]);return Ie(()=>(T(e.isEditable()),e.registerEditableListener(e=>{T(e)})),[e]),(0,i.jsx)(`div`,{"aria-activedescendant":w?t:void 0,"aria-autocomplete":w?n:`none`,"aria-controls":w?a:void 0,"aria-describedby":o,...s==null?{}:{"aria-errormessage":s},"aria-expanded":w&&v===`combobox`?!!c:void 0,...l==null?{}:{"aria-invalid":l},"aria-label":u,"aria-labelledby":d,"aria-multiline":f,"aria-owns":w?p:void 0,"aria-readonly":!w||void 0,"aria-required":m,autoCapitalize:h,className:g,contentEditable:w,"data-testid":S,id:_,ref:te,role:v,spellCheck:y,style:b,tabIndex:x??(w?void 0:-1),...C})}var Re=(0,r.forwardRef)(Le);function ze(e){return e.read(`latest`,Ne(e.isComposing()))}var Be=(0,r.forwardRef)(Ve);function Ve(e,n){let{placeholder:r,...a}=e,[o]=t.oi();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Re,{editor:o,...a,ref:n}),r!=null&&(0,i.jsx)(He,{editor:o,content:r})]})}function He({content:e,editor:n}){let a=function(e){let[n,i]=(0,r.useState)(()=>ze(e));return Ie(()=>{function n(){let t=ze(e);i(t)}return n(),t.Yn(e.registerUpdateListener(()=>{n()}),e.registerEditableListener(()=>{n()}))},[e]),n}(n),[o,s]=(0,r.useState)(n.isEditable());if((0,r.useLayoutEffect)(()=>(s(n.isEditable()),n.registerEditableListener(e=>{s(e)})),[n]),!a)return null;let c=null;return typeof e==`function`?c=e(o):e!==null&&(c=e),c===null?null:(0,i.jsx)(`div`,{"aria-hidden":!0,children:c})}var Ue=class extends r.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e instanceof Error?e:Error(String(e),{cause:e}),t)}render(){return this.state.hasError?this.props.fallback:this.props.children}};function We({children:e,fallback:t,onError:n}){return(0,i.jsx)(Ue,{fallback:t===void 0?(0,i.jsx)(`div`,{style:{border:`1px solid #f00`,color:`#f00`,padding:`8px`},children:`An error was thrown.`}):t,onError:n,children:e})}var Ge=t.hr({name:`@lexical/react/ReactProvider`});function z(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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.`)}var B;function Ke(e,t){let{key:n}=t;return e&&n in e?e[n]:t.defaultValue}function qe(e){return B&&B.editor===e?B:void 0}function Je(e,t){if(`cfg`in t){let{cfg:n,updater:r}=t;return[n,r(Ke(e,n))]}return t}function Ye(e,t){let n=t;for(let r of e){let[e,i]=Je(n,r),a=e.key;if(n===t&&Ke(n,e)===i)continue;let o=n===t||n===void 0?Xe(t):n;o[a]=i,n=o}return n}function Xe(e){return Object.create(e||null)}function Ze(e,t){return[e,t]}function Qe(e,n,r,i=t.s()){let a=B,o=qe(i);try{return B={...o,editor:i,[e]:n},r()}finally{B=a}}function $e(e,n=()=>{}){return(r,i=t.s())=>t=>{let a=qe(i),o=a&&a[e],s=Ye(r,o||n(i));return s&&s!==o?Qe(e,s,t,i):t()}}function et(e,n,r,i){return Object.assign(t.rr(Symbol(n),{isEqual:i,parse:r}),{[e]:!0})}function tt(e){if(!t.X(e))return;let r=e;if(r.querySelector(`style`)===null)return;let i=new Map;function a(e){let t=i.get(e);if(t===void 0){t=new Set;for(let n=0;n<e.style.length;n++)t.add(e.style[n]);i.set(e,t)}return t}try{for(let e of Array.from(r.styleSheets)){let i;try{i=e.cssRules}catch{continue}for(let e of Array.from(i)){if(!n.s(e,CSSStyleRule))continue;let i;try{i=r.querySelectorAll(e.selectorText)}catch{continue}for(let n of Array.from(i)){if(!t.Sn(n))continue;let r=a(n);for(let t=0;t<e.style.length;t++){let i=e.style[t];r.has(i)||n.style.setProperty(i,e.style.getPropertyValue(i),e.style.getPropertyPriority(i))}}}}}catch{}}var nt=`@lexical/html/DOM`,rt=Symbol.for(`@lexical/html/DOMExportContext`),it=Symbol.for(`@lexical/html/DOMImportContext`);function at(e,t,n){return et(rt,e,t,n)}var ot=at(`isExport`,Boolean);function st(e){let t=I(e,nt);return t?t.output.defaults:void 0}function ct(e){let t=I(e,nt);return t?t.output.runtime:void 0}function lt(e=t.s()){let n=ct(e);return n?n.getSessionConfig():t.kt(e)}var ut=$e(rt,st),V=Symbol.for(`@lexical/html/SelectorImpl`);function H(e,n){let r={kind:`element`,predicate:(i=n,i.length===0?t.Sn:i.length===1?i[0]:(e,t)=>{for(let n of i)if(!n(e,t))return!1;return!0}),tags:e};var i;let a=t=>H(e,[...n,t]);return{[V]:r,attr:(e,t,n)=>a(U(e,t,n)),classAll:(...e)=>a(ft(e)),classAny:(...e)=>a(function(e){let n=dt(e);return n.length===0?()=>!1:e=>{if(!t.Sn(e))return!1;let r=e.classList;for(let e of n)if(r.contains(e))return!0;return!1}}(e)),styleAny:(e,n,r)=>a(function(e,n,r){if(typeof n==`string`)return r=>t.Sn(r)&&r.style.getPropertyValue(e)===n;if(n instanceof RegExp){let i=r&&r.capture,a=n;return(n,r)=>{if(!t.Sn(n))return!1;let o=n.style.getPropertyValue(e);if(!o)return!1;let s=o.match(a);return s!==null&&(i!==void 0&&(r[i]=s),!0)}}z(362,JSON.stringify(e))}(e,n,r))}}function dt(e){let t=[];for(let n of e)n&&t.push(n);return t}function ft(e){let n=dt(e);return n.length===0?()=>!0:e=>{if(!t.Sn(e))return!1;let r=e.classList;for(let e of n)if(!r.contains(e))return!1;return!0}}function U(e,n,r){if(!0===n)return n=>t.Sn(n)&&n.hasAttribute(e);if(typeof n==`string`)return r=>t.Sn(r)&&r.getAttribute(e)===n;if(n instanceof RegExp){let i=r&&r.capture,a=n;return(n,r)=>{if(!t.Sn(n))return!1;let o=n.getAttribute(e);if(o==null)return!1;let s=o.match(a);return s!==null&&(i!==void 0&&(r[i]=s),!0)}}z(361,JSON.stringify(e))}var pt={kind:`text`,predicate:t.nt,tags:new Set},mt={[V]:pt},ht={kind:`comment`,predicate:e=>e.nodeType===8,tags:new Set},gt={[V]:ht},W={any:()=>H(new Set,[]),comment:()=>gt,tag(...e){e.length>0||z(363);let t=new Set;for(let n of e)t.add(n.toUpperCase());return H(t,[])},text:()=>mt};function _t(e,n){return t.Sn(e)&&e.nodeName===n.toUpperCase()}var vt=/[A-Za-z0-9_-]/,yt=class{constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||``}consume(){return this.source[this.pos++]||``}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){let e=this.pos;for(;!this.eof()&&vt.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){let e=this.consume();this.assert(e===`"`||e===`'`,`expected quote`);let t=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()===`\\`?this.pos+=2:this.pos++;this.assert(!this.eof(),`unterminated string`);let n=this.source.slice(t,this.pos);return this.pos++,n.replace(/\\(.)/g,`$1`)}assert(e,t){e||z(364,String(this.pos+1),t,this.source)}};function bt(e){let t=new Set,n=[],r=[];if(e.skipWhitespace(),e.peek()===`*`)e.consume();else if(vt.test(e.peek())){let n=e.readIdent();n&&t.add(n.toUpperCase())}for(;!e.eof();){let t=e.peek();if(t===`.`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected class name after "."`),r.push(t)}else if(t===`#`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected id after "#"`),n.push(U(`id`,t))}else{if(t!==`[`)break;{e.consume(),e.skipWhitespace();let t=e.readIdent();e.assert(t!==``,`expected attribute name after "["`),e.skipWhitespace();let r=!0;if(e.peek()===`=`){e.consume(),e.skipWhitespace();let t=e.peek();t===`"`||t===`'`?r=e.readQuoted():(r=e.readIdent(),e.assert(r!==``,`expected attribute value`)),e.skipWhitespace()}e.assert(e.peek()===`]`,`expected "]"`),e.consume(),n.push(U(t,r))}}}return r.length>0&&n.push(ft(r)),{predicates:n,tags:t}}function xt(e){let t=new yt(e,0),n=[];for(;;){let e=bt(t);if(n.push(e),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===`,`,`expected "," (selector lists are the only supported combinator)`),t.consume(),t.skipWhitespace()}if(n.length===1)return H(n[0].tags,n[0].predicates);let r=new Set;for(let e of n)for(let t of e.tags)r.add(t);return H(r,[(e,t)=>{for(let r of n){let n=e.nodeName;if(r.tags.size>0&&!r.tags.has(n))continue;let i=!0;for(let n of r.predicates)if(!n(e,t)){i=!1;break}if(i)return!0}return!1}])}function St(e){return e}function Ct(e,t,n){return et(it,e,t,n)}var wt=Ct(`textFormat`,()=>0),Tt=Ct(`textStyle`,()=>({}));function G(e){return t.st(e)||t.$(e)&&!e.isInline()}function Et(e,n){let r=[],i=[],a=()=>{i.length!==0&&(r.push(n().splice(0,0,i)),i=[])};for(let o of e)if(G(o)){if(a(),t.vt(o)){let e=Et(o.getChildren(),n);o.splice(0,o.getChildrenSize(),e)}r.push(o)}else i.push(o);return a(),r}function Dt(e,n){if(!t.Sn(n))return e;let r=n.style.textAlign;if(!jt(r))return e;for(let n of e)t.st(n)&&n.getFormatType()===``&&n.setFormat(r);return e}function Ot(e,n,r){e.length===1&&t._r(e[0])&&(e=[]);let i=t.Ar();if(t.Sn(r)){let e=r.style.textAlign;jt(e)&&i.setFormat(e)}return[i.splice(0,0,e)]}var kt={$accepts:G,$packageRun:Ot,name:`BlockSchema`},K=W,At=new Set([`center`,`end`,`justify`,`left`,`right`,`start`]);function jt(e){return At.has(e)}K.tag(`b`,`strong`,`em`,`i`,`code`,`mark`,`s`,`sub`,`sup`,`u`,`span`),K.text(),K.tag(`script`,`style`),K.tag(`br`),K.tag(`p`),K.tag(`hr`),K.any();function Mt(e,t){let n=[],r=0,i=0;for(;r<e.length&&i<t.length;)e[r]<=t[i]?n.push(e[r++]):n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);for(;i<t.length;)n.push(t[i++]);return n}function Nt(e){let t=[],n=new Map,r=[],i=[],a=[],o=new Set;e.forEach((e,s)=>{let c=function(e){let t=e[V];return t===void 0&&z(360),t}(e.match),l=e.name||function(e,t){return e.kind===`text`?`#text@${t}`:e.kind===`comment`?`#comment@${t}`:e.tags.size===0?`*@${t}`:`${Array.from(e.tags).join(`,`).toLowerCase()}@${t}`}(c,s);if(e.name&&o.add(e.name),t.push({$import:e.$import,name:l,predicate:c.predicate}),c.kind===`text`)i.push(s);else if(c.kind===`comment`)a.push(s);else if(c.tags.size===0)r.push(s);else for(let e of c.tags){let t=n.get(e);t||(t=[],n.set(e,t)),t.push(s)}});let s=new Map;if(r.length===0)for(let[e,t]of n)s.set(e,t);else for(let[e,t]of n)s.set(e,Mt(t,r));return{byTag:s,commentIndices:a,rules:t,textIndices:i,wildcardIndices:r}}Object.freeze([]);function Pt(e){let t=[];for(let n of e)if(Ft(n))for(let e of n.rules)t.push(e);else t.push(n);return t}function Ft(e){return typeof e==`object`&&!!e&&`__type`in e&&e.__type===`CompiledOverlayRules`}function It(e){let t=Pt(e);return{__type:`CompiledOverlayRules`,dispatch:Nt(t),rules:t}}Object.freeze({}),W.any();var Lt={any:W.any,comment:W.comment,css:xt,tag:W.tag,text:W.text},Rt=new Set([`STYLE`,`SCRIPT`]);function zt(e,n){tt(n);let r=t.X(n)?n.body.childNodes:n.childNodes,i=[],a=[];for(let t of r)if(!Rt.has(t.nodeName)){let n=Ut(t,e,a,!1);if(n!==null)for(let e of n)i.push(e)}return function(e){for(let n of e)n.getParent()&&n.getNextSibling()instanceof t.j&&n.insertAfter(t.Bt());for(let t of e){let e=t.getParent();e&&e.splice(t.getIndexWithinParent(),1,t.getChildren())}}(a),i}function Bt(e,n=null,r=t.s()){return ut([Ze(ot,!0)],r)(()=>{let i=t.Dr(),a=lt(r),o=t.bn(n)?t.Tr(n.anchor.getNode()):null,s=e.append.bind(e);for(let e of(t.vt(o)?o:i).getChildren())Ht(r,e,s,n,a);return e})}function Vt(e,n=null){return(typeof document>`u`||typeof window>`u`&&global.window===void 0)&&z(338),t.Rn(e),Bt(t.qt().createElement(`div`),n,e).innerHTML}function Ht(e,r,i,a=null,o=t.kt(e)){let s=o.$shouldInclude(r,a,e),c=o.$shouldExclude(r,a,e),l=r;a!==null&&t.Jt(r)&&(l=n.E(a,r,`clone`));let{element:u,after:d,append:f,$getChildNodes:p}=o.$exportDOM(l,e);if(!u)return!1;let m=t.qt().createDocumentFragment(),h=p?p():t.vt(l)?l.getChildren():[],g=s&&t.Fr(a)&&t.vt(r)?null:a,_=m.append.bind(m);for(let t of h){let n=Ht(e,t,_,g,o);!s&&n&&o.$extractWithChild(r,t,a,`html`,e)&&(s=!0)}if(s&&!c){if((t.Sn(u)||t.Nn(u))&&(f?f(m):u.append(m)),i(u),d){let e=d.call(l,u);e&&(t.Nn(u)?u.replaceChildren(e):u.replaceWith(e))}}else i(m);return s}function Ut(e,n,r,i,a=new Map,o){let s=[];if(Rt.has(e.nodeName))return s;let c=null,l=function(e,t){let{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase()),i=null;if(r!==void 0)for(let t of r){let n=t(e);n!==null&&(i===null||(i.priority||0)<=(n.priority||0))&&(i=n)}return i===null?null:i.conversion}(e,n),u=l?l(e):null,d=null;if(u!==null){d=u.after;let t=u.node;if(c=Array.isArray(t)?t[t.length-1]:t,c!==null){for(let[,e]of a)if(c=e(c,o),!c)break;c&&s.push(...Array.isArray(t)?t:[c])}u.forChild!=null&&a.set(e.nodeName,u.forChild)}let f=e.childNodes,p=[],m=(c==null||!t.J(c))&&(c!=null&&t.st(c)||i);for(let e=0;e<f.length;e++)p.push(...Ut(f[e],n,r,m,new Map(a),c));if(d!=null&&(p=d(p)),t.er(e)&&(p=Wt(e,p,m?()=>{let e=new t.j;return r.push(e),e}:t.Ar)),c==null)if(p.length>0)for(let e of p)s.push(e);else t.er(e)&&function(e){return e.nextSibling==null||e.previousSibling==null?!1:t.fr(e.nextSibling)&&t.fr(e.previousSibling)}(e)&&s.push(t.Bt());else t.vt(c)&&c.append(...p);return s}function Wt(e,n,r){let i=e.style.textAlign,a=[],o=[];for(let e=0;e<n.length;e++){let s=n[e];if(t.st(s))i&&!s.getFormat()&&s.setFormat(i),a.push(s);else if(o.push(s),e===n.length-1||e<n.length-1&&t.st(n[e+1])){let e=r();e.setFormat(i),e.append(...o),a.push(e),o=[]}}return a}function Gt(e,n,r=null){let i=t.E(r),a=r?t.vr(r):[],o=r!==null&&a.length>0;if(o&&typeof i.caretPositionFromPoint==`function`){let o=i.caretPositionFromPoint(e,n,{shadowRoots:a});if(o!==null&&function(e,n){for(let r=e;r!==null;){if(r===n)return!0;r=t.ut(r)}return!1}(o.offsetNode,r))return{node:o.offsetNode,offset:o.offset}}if(o){let a=r.getRootNode();if(t.Gn(a)){let t=a.elementFromPoint(e,n);if(t!==null&&r.contains(t)){let r=function(e,t,n,r){let i=r.createRange(),a=e=>t<e.top?e.top-t:t>e.bottom?t-e.bottom:0,o=t=>e<t.left?t.left-e:e>t.right?e-t.right:0,s=r.createTreeWalker(n,NodeFilter.SHOW_TEXT),c=null,l=1/0,u=1/0;for(let e=s.nextNode();e;e=s.nextNode()){i.selectNodeContents(e);for(let t of i.getClientRects()){let n=a(t),r=o(t);(n<l||n===l&&r<u)&&(l=n,u=r,c=e)}}if(c===null)return null;let d=0,f=1/0,p=1/0;for(let t=0;t<=c.length;t++){i.setStart(c,t),i.collapse(!0);let n=i.getBoundingClientRect(),r=a(n),o=Math.abs(e-n.left);(r<f||r===f&&o<p)&&(f=r,p=o,d=t)}return{node:c,offset:d}}(e,n,t,i);if(r!==null)return r}}}if(typeof i.caretRangeFromPoint==`function`){let t=i.caretRangeFromPoint(e,n);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(typeof i.caretPositionFromPoint==`function`){let t=i.caretPositionFromPoint(e,n);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}function q(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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.`)}var J={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Kt(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy(`lexical`,{createHTML:e=>e}).createHTML(e):e}var qt=(e,n)=>{if(!t.bn(n))return n.insertRawText(e),!0;let r=e=>{let n=t.tt();t.bn(n)&&e(n)};return t.Kn(e,{linebreak:()=>r(e=>e.insertParagraph()),tab:()=>r(e=>e.insertNodes([t.kr()])),text:e=>r(t=>t.insertText(e))}),!0},Y={"application/x-lexical-editor":[(e,n,r)=>{try{let r=t.s(),i=JSON.parse(e);if(i&&i.namespace===r._config.namespace&&Array.isArray(i.nodes))return Z(r,ln(i.nodes),n),!0}catch(e){console.error(e)}return r()}],"text/html":[(e,n,r)=>{try{let r=t.s();return Z(r,zt(r,new DOMParser().parseFromString(Kt(e),`text/html`)),n),!0}catch(e){return console.error(e),r()}}],"text/plain":[qt],"text/uri-list":[qt]};function Jt(e,t,n,r){if(!e)return!1;let i=a=>!!e[a]&&e[a](t,n,i.bind(null,a-1),r);return i(e.length-1)}function Yt(e,t,n){let r=t.getData(`text/plain`);for(let i of function(e){return Object.keys(e.$importMimeType).filter(t=>e.$importMimeType[t]!==void 0).sort((t,n)=>{let r=e.priority[t],i=e.priority[n];return r===void 0&&i===void 0?t<n?-1:+(t>n):r===void 0?1:i===void 0?-1:r-i})}(e)){let a=t.getData(i);if(a&&(i!==`text/html`||a!==r)&&Jt(e.$importMimeType[i],a,n,t))return!0}return!1}var Xt={$importMimeType:Y,$insertDataTransfer:(e,t)=>Yt({$importMimeType:Y,priority:J},e,t),priority:J},Zt=t.hr({build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(e,n)=>Yt(t,e,n),priority:t.priority}),config:t.Xr({$importMimeType:Y,priority:J}),mergeConfig(e,n){let r=t.d(e,n);if(n.$importMimeType){let t={...e.$importMimeType};for(let[e,r]of Object.entries(n.$importMimeType))if(r){let n=t[e];t[e]=n?[...n,...r]:r}r.$importMimeType=t}return n.priority&&(r.priority={...e.priority,...n.priority}),r},name:`@lexical/clipboard/Import`});function X(e,n=t.tt()){return n??q(166),t.bn(n)&&n.isCollapsed()||n.getNodes().length===0?``:Vt(e,n)}function Qt(e,n=t.tt()){return n??q(166),t.bn(n)&&n.isCollapsed()||n.getNodes().length===0?null:JSON.stringify(cn(e,n))}function $t(e,t){let n=e.getData(`text/plain`)||e.getData(`text/uri-list`);n!=null&&t.insertRawText(n)}function en(e,t,n){(function(){let e=we(Zt.name);return e?e.output:Xt})().$insertDataTransfer(e,t)}var tn=`application/x-lexical-drag`;function nn(e,t){let n={editorKey:t.getKey()};e.setData(tn,JSON.stringify(n))}function rn(e,n,r){let i=e.dataTransfer;if(i===null)return!1;let a=function(e){let t=e.getData(tn);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}return(r=n)!==null&&typeof r==`object`&&`editorKey`in r&&typeof r.editorKey==`string`?n:null;var r}(i);if(a===null)return!1;let o=function(e,n){let r=Gt(e.clientX,e.clientY,n.getRootElement());if(r===null)return null;let i=t.Yt(r.node);if(i===null)return null;if(t.Jt(i))return t.gt(i,`next`,r.offset);if(t.vt(i))return t.Ir(i,r.offset,`next`);let a=i.getParent();return a===null?null:t.Ir(a,i.getIndexWithinParent()+1,`next`)}(e,n);if(o===null)return!1;let s=t.In(o);if(s===null)return!1;let c=a.editorKey===n.getKey(),l=t.tt();if(c){if(!t.bn(l)||l.isCollapsed())return!1;if(function(e,n){let{anchor:r,focus:i}=t.pn(t.An(n),`next`);return t.Un(r,e)<0&&t.Un(e,i)<0}(o,l))return e.preventDefault(),!0;l.removeText()}if(!s.origin.isAttached())return e.preventDefault(),!0;if(r(i,t.en(t.t(s)),n),!c){let e=n.getRootElement(),r=e?e.ownerDocument:null,i=r?function(e,n){for(let r of t.$t(n)){let n=t.g(r);if(t.ct(n)&&n.getKey()===e&&t.Sn(r))return r}return null}(a.editorKey,r):null;i!==null&&i.dispatchEvent(new InputEvent(`beforeinput`,{bubbles:!0,cancelable:!0,inputType:`deleteByDrag`}))}return e.preventDefault(),!0}function an(e,t){return rn(e,t,en)}function on(e,t){return rn(e,t,(e,t)=>$t(e,t))}function Z(e,n,r){e.dispatchCommand(t.Q,{nodes:n,selection:r})||(r.insertNodes(n),function(e){if(t.bn(e)&&e.isCollapsed()){let n=e.anchor,r=null,i=t.Gt(n,`previous`);if(i)if(t.mn(i))r=i.origin;else{let e=t.O(i,t.Z(t.Dr(),`next`).getFlipped());for(let n of e){if(t.Jt(n.origin)){r=n.origin;break}if(t.vt(n.origin)&&!n.origin.isInline())break}}if(r&&t.Jt(r)){let t=r.getFormat(),n=r.getStyle();e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}}}(r))}function sn(e,r,i,a=[]){let o=r===null||i.isSelected(r),s=t.vt(i)&&i.excludeFromCopy(`html`),c=i;r!==null&&t.Jt(c)&&(c=n.E(r,c,`clone`));let l=t.vt(c)?c.getChildren():[],u=function(e){let n=e.exportJSON(),r=e.constructor;if(n.type!==r.getType()&&q(58,r.name),t.vt(e)){let e=n.children;Array.isArray(e)||q(59,r.name)}return n}(c);t.Jt(c)&&c.getTextContentSize()===0&&(o=!1);let d=o&&t.Fr(r)&&t.vt(i)?null:r;for(let n=0;n<l.length;n++){let a=l[n],s=sn(e,d,a,u.children);!o&&t.vt(i)&&s&&i.extractWithChild(a,r,`clone`)&&(o=!0)}if(o&&!s){let n=t.or(c);if(n.length>0){let r={};for(let i of n){let n=t.lr(c,i);n===null&&q(366,c.constructor.name,i);let a=[];sn(e,null,n,a),a.length===1&&a[0].type===n.getType()||q(385,i,c.constructor.name,String(a.length),String(a.length>0?a[0].type:`none`)),r[i]=a[0]}u.$slots=r}}if(o&&!s)a.push(u);else if(Array.isArray(u.children))for(let e=0;e<u.children.length;e++){let t=u.children[e];a.push(t)}return o}function cn(e,n){let r=[],i=t.Dr(),a=t.bn(n)?n.anchor.getNode():t.Fr(n)?n.getNodes()[0]??null:null,o=a===null?null:t.Tr(a),s=(t.vt(o)?o:i).getChildren();for(let t=0;t<s.length;t++)sn(e,n,s[t],r);return{namespace:e._config.namespace,nodes:r}}function ln(e){let n=[];for(let r of e)n.push(t.At(r));return n}var Q=null;async function un(e,r,i){if(Q!==null)return!1;if(r!==null)return new Promise((t,n)=>{e.update(()=>{t(dn(e,r,i))})});let a=e.getRootElement(),o=e._window||window,s=o.document,c=t.M(o);if(a===null||c===null)return!1;let l=s.createElement(`span`);l.style.position=`fixed`,l.style.top=`-1000px`,l.append(s.createTextNode(`#`)),a.append(l);let u=s.createRange();return u.setStart(l,0),u.setEnd(l,1),c.removeAllRanges(),c.addRange(u),new Promise((r,a)=>{let c=e.registerCommand(t.Rr,t=>(n.s(t,ClipboardEvent)&&(c(),Q!==null&&(o.clearTimeout(Q),Q=null),r(dn(e,t,i))),!0),4);Q=o.setTimeout(()=>{c(),Q=null,r(!1)},50),s.execCommand(`copy`),l.remove()})}function dn(e,n,r){if(r===void 0){let n=t.M(e._window),i=t.tt();if(!i||i.isCollapsed()||!n)return!1;let a=t.Er(n,e.getRootElement()),o=a.anchorNode,s=a.focusNode;if(o!==null&&s!==null&&!t.ht(e,o,s))return!1;r=pn(i)}n.preventDefault();let i=n.clipboardData;return i!==null&&(mn(i,r),!0)}var fn=[[`text/html`,X],[`application/x-lexical-editor`,Qt]];function pn(e=t.tt()){return function(e,t){let n={"text/plain":``};for(let[r,i]of Object.entries(e))if(i){let e=_n(i,t);e!==null&&(n[r]=e)}return n}(hn(),e)}function mn(e,t){for(let[n]of fn)t[n]===void 0&&e.setData(n,``);for(let n in t){let r=t[n];r!==void 0&&e.setData(n,r)}}function hn(e=t.s()){let n=I(e,vn.name);return n?n.output:gn}var gn={"application/x-lexical-editor":[(e,n)=>e?Qt(t.s(),e):n()],"text/html":[(e,n)=>e?X(t.s(),e):n()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function _n(e,t){let n=r=>e[r]?e[r](t,n.bind(null,r-1)):null;return n(e.length-1)}var vn=t.hr({build:(e,t,n)=>t.$exportMimeType,config:t.Xr({$exportMimeType:gn}),mergeConfig(e,n){let r=t.d(e,n);if(n.$exportMimeType){let t={...e.$exportMimeType};for(let[e,r]of Object.entries(n.$exportMimeType))if(r){let n=t[e];t[e]=n?[...n,...r]:r}r.$exportMimeType=t}return r},name:`@lexical/clipboard/GetClipboardData`}),yn={bold:`bold`,italic:`italic`,strikeThrough:`strikethrough`,subscript:`subscript`,superscript:`superscript`,underline:`underline`},$=Symbol.for(`@lexical/dragon/WindowState`);function bn(e,t,n){let r=function(e){let t=e[$];return t===void 0&&(t={dispose:()=>{},editors:new Map,installs:new Set},e[$]=t),t}(e);if(r.installs.size===0){let t=wn.bind(e);e.addEventListener(`message`,t,!0),r.dispose=()=>{e.removeEventListener(`message`,t,!0)}}if(r.installs.add(t),n){let e=r.editors.get(n)||new Set;e.add(t),r.editors.set(n,e)}return xn.bind(null,e,r,t,n)}function xn(e,t,n,r){if(r){let e=t.editors.get(r);e&&e.delete(n)&&e.size===0&&t.editors.delete(r)}t.installs.delete(n)&&t.installs.size===0&&(t.dispose(),delete e[$])}function Sn(e){return e&&e.ownerDocument.defaultView}function Cn(e){let t=ie(()=>Sn(e.getRootElement()),t=>e.registerRootListener(e=>{t.value=Sn(e)}));return T(()=>{let n=t.value;if(n)return bn(n,Symbol(`@lexical/dragon/editorInstall`),e)})}function wn(e){if(e.origin!==this.location.origin)return;let n=function(e){let n=e[$];if(n===void 0)return null;let r=t.g(t.Sr(e.document));return t.ct(r)&&n.editors.has(r)?r:null}(this);if(n===null)return;let r=e.data;if(typeof r==`string`){let i;try{i=JSON.parse(r)}catch{return}if(i&&i.protocol===`nuanria_messaging`&&i.type===`request`){let r=i.payload;if(r&&r.functionId===`makeChanges`){let i=r.args;if(Array.isArray(i)){let[r,a,o,s,c,l]=i;if(![r,a,s,c].every(Number.isFinite)||typeof o!=`string`&&o!==-1)return;n.update(()=>{let n=t.tt();if(t.bn(n)){let i=n.anchor,u=i.getNode(),d=0,f=0;if(t.Jt(u)&&r>=0&&a>=0&&(d=r,f=r+a,n.setTextNodeRange(u,d,u,f)),typeof o!=`string`||d===f&&o===``||(n.insertRawText(o),u=i.getNode()),t.Jt(u)){let e=u.getTextContentSize();d=Math.min(Math.max(s,0),e),f=s<0||c<0?d:Math.min(s+c,e),n.setTextNodeRange(u,d,u,f)}if(typeof l==`string`&&c>0&&!n.isCollapsed()){let e=yn[l];e!==void 0&&n.formatText(e)}e.stopImmediatePropagation()}})}}}}}function Tn(e,n,r,i,a){if(e===null||r.size===0&&i.size===0&&!a)return 0;let o=n._selection,s=e._selection;if(a)return 1;if(!(t.bn(o)&&t.bn(s)&&s.isCollapsed()&&o.isCollapsed()))return 0;let c=function(e,n,r){let i=e._nodeMap,a=[];for(let e of n){let t=i.get(e);t!==void 0&&a.push(t)}for(let[e,n]of r){if(!n)continue;let r=i.get(e);r===void 0||t.ri(r)||a.push(r)}return a}(n,r,i);if(c.length===0)return 0;if(c.length>1){let r=n._nodeMap,i=r.get(o.anchor.key),a=r.get(s.anchor.key);return i&&a&&!e._nodeMap.has(i.__key)&&t.Jt(i)&&i.__text.length===1&&o.anchor.offset===1?2:0}let l=c[0],u=e._nodeMap.get(l.__key);if(!t.Jt(u)||!t.Jt(l)||u.__mode!==l.__mode)return 0;let d=u.__text,f=l.__text;if(d===f)return 0;let p=o.anchor,m=s.anchor;if(p.key!==m.key||p.type!==`text`)return 0;let h=p.offset,g=m.offset,_=f.length-d.length;return _===1&&g===h-1?2:_===-1&&g===h+1?3:_===-1&&g===h?4:0}function En(e,n,r){let i=r(),a=0,o=i,s=0,c=null;return(l,u,d,f,p,m)=>{let h=r();if(m.has(`composition-start`)&&(o=i,s=a,c=l),m.has(`historic`))return a=0,i=h,2;m.has(`composition-end`)&&c&&(i=o,a=s,l=c);let g=m.has(`paste`)||m.has(`cut`)?0:Tn(l,u,f,p,e.isComposing()),_=(()=>{let r=d===null||d.editor===e,o=m.has(t.nr);if(!o&&r&&m.has(`history-merge`))return 0;if(g===1)return 2;if(l===null)return 1;let s=u._selection;if(!(f.size>0||p.size>0))return s===null?2:0;let c=typeof n==`number`?n:n.peek();return!1===o&&g!==0&&g===a&&h<i+c&&r||f.size===1&&function(e,n,r){let i=n._nodeMap.get(e),a=r._nodeMap.get(e),o=n._selection,s=r._selection;return!(t.bn(o)&&t.bn(s)&&o.anchor.type===`element`&&o.focus.type===`element`&&s.anchor.type===`text`&&s.focus.type===`text`||!t.Jt(i)||!t.Jt(a)||i.__parent!==a.__parent)&&JSON.stringify(n.read(()=>i.exportJSON()))===JSON.stringify(r.read(()=>a.exportJSON()))}(Array.from(f)[0],l,u)?0:1})();return i=h,a=g,_}}function Dn(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}function On(e,n,r,i=Date.now,a,o=null){let s=En(e,r,i),c=()=>{a&&a(n)};return c(),t.Yn(e.registerCommand(t.Tt,()=>(function(e,n,r){let i=n.redoStack,a=n.undoStack;if(a.length!==0){let o=n.current,s=a.pop();o!==null&&(i.push(o),e.dispatchCommand(t.Ur,!0)),a.length===0&&e.dispatchCommand(t.v,!1),n.current=s||null,r&&r(n),s&&s.editor.setEditorState(s.editorState,{tag:`historic`})}}(e,n,a),!0),0),e.registerCommand(t.nn,()=>(function(e,n,r){let i=n.redoStack,a=n.undoStack;if(i.length!==0){let o=n.current;o!==null&&(a.push(o),e.dispatchCommand(t.v,!0));let s=i.pop();i.length===0&&e.dispatchCommand(t.Ur,!1),n.current=s||null,r&&r(n),s&&s.editor.setEditorState(s.editorState,{tag:`historic`})}}(e,n,a),!0),0),e.registerCommand(t.hn,()=>(Dn(n,a),!1),0),e.registerCommand(t.dt,()=>(Dn(n,a),e.dispatchCommand(t.Ur,!1),e.dispatchCommand(t.v,!1),!0),0),e.registerUpdateListener(({editorState:r,prevEditorState:i,dirtyLeaves:a,dirtyElements:l,tags:u})=>{let d=n.current,f=n.redoStack,p=n.undoStack,m=d===null?null:d.editorState;if(d!==null&&r===m)return;let h=s(i,r,d,a,l,u);if(h===1){if(f.length!==0&&(n.redoStack=[],e.dispatchCommand(t.Ur,!1)),d!==null){p.push({...d});let n=typeof o==`number`||o===null?o:o.peek();n!==null&&p.length>n&&p.splice(0,p.length-n),e.dispatchCommand(t.v,!0)}}else if(h===2)return;n.current={editor:e,editorState:r},c()}))}function kn(){return{current:null,redoStack:[],undoStack:[]}}Date.now;function An({delay:e,externalHistoryState:n}){let[i]=t.oi();return function(e,t,n=1e3){let i=(0,r.useMemo)(()=>t||kn(),[t]);(0,r.useEffect)(()=>On(e,i,n),[n,e,i])}(i,n,e),null}var jn=(0,r.createContext)({}),Mn=({children:e})=>{let t=(0,r.useMemo)(()=>({historyState:kn()}),[]);return(0,i.jsx)(jn.Provider,{value:t,children:e})},Nn=()=>(0,r.useContext)(jn);function Pn(e){return Number.isFinite(e)&&e>0?e:1}function Fn(e,t){try{return n.d(e,t)}catch{return 1}}function In(e){return Pn(Fn(e,!0))}function Ln(e){return Pn(Fn(e,!0)/Fn(e,!1))}function Rn({className:e,"data-test-id":t,onFocus:n,onPointerDownCapture:r,placeholder:a,placeholderClassName:o}){return(0,i.jsx)(Be,{className:e??`ContentEditable__root`,"aria-placeholder":a,onFocus:n,onPointerDownCapture:r,...t?{"data-test-id":t}:{},placeholder:(0,i.jsx)(`div`,{className:o??`ContentEditable__placeholder`,children:a})})}Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Nn}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return un}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return mn}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return en}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Mn}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Ln}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return An}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return on}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return In}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Cn}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Rn}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return pn}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return ke}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-D_FWMvbo.cjs"),t=require("./Lexical.prod-C9Xekspf.cjs"),n=require("./MediaResizer-
|
|
1
|
+
const e=require("./rolldown-runtime-D_FWMvbo.cjs"),t=require("./Lexical.prod-C9Xekspf.cjs"),n=require("./MediaResizer-Dzro5TVg.cjs"),r=require("./ExcalidrawModal-Db1LI01l.cjs"),i=require("./useLexicalNodeSelection.prod-DXhTEgoC.cjs"),a=require("./useLexicalEditable.prod-B2XnDcjV.cjs"),o=require("./chunk-K2UTITRG-0LZxlwq1.cjs");let s=require("react");s=e.a(s,1);let c=require("react/jsx-runtime");var l=[],u=new Set([`#fff`,`#ffffff`,`rgb(255, 255, 255)`,`white`]);function d(e){return typeof e!=`string`||e.trim()===``||u.has(e.trim().toLowerCase())}function f(e){let t=e.exportWithDarkMode===!0||e.theme===`dark`;return e.exportBackground!==!1&&d(e.viewBackgroundColor)?{...e,exportBackground:!1,...t?{exportWithDarkMode:!0}:{}}:e}var p=e=>{let t=e?.firstElementChild?.firstElementChild,n=e.getAttribute(`viewBox`);if(n!=null){let t=n.split(` `);e.setAttribute(`width`,t[2]),e.setAttribute(`height`,t[3])}t&&t.tagName===`style`&&t.remove()};function m({elements:e,files:t,extraFontFamilies:n=l,imageContainerRef:i,appState:a,rootClassName:u=null,width:d=`inherit`,height:m=`inherit`}){let[h,g]=(0,s.useState)(null);(0,s.useEffect)(()=>{let i=!0;return(async()=>{await r.n(n);let s=await o.al({appState:f(a),elements:e,files:t});p(s),s.setAttribute(`width`,`100%`),s.setAttribute(`height`,`100%`),s.setAttribute(`display`,`block`),i&&g(s)})().catch(e=>{console.error(e)}),()=>{i=!1}},[e,t,a,n]);let _={};return d!==`inherit`&&(_.width=`${d}px`),m!==`inherit`&&(_.height=`${m}px`),(0,c.jsx)(`div`,{ref:e=>{e&&i&&(i.current=e)},className:u??``,style:_,dangerouslySetInnerHTML:{__html:h?.outerHTML??``}})}function h({nodeKey:e,data:o,width:l,height:u}){let[d]=t.oi(),f=a.t(),[p,h]=(0,s.useState)(o===`[]`&&d.isEditable()),g=(0,s.useRef)(null),_=(0,s.useRef)(null),v=(0,s.useRef)(null),[y,b,x]=i.t(e),[S,C]=(0,s.useState)(!1),{clearLibrariesFileList:w,detectTextLanguage:T,extraFontFamilies:E,libraryItems:D,loadLibrariesFileList:O,saveLibrariesFile:k}=r.m();(0,s.useEffect)(()=>{if(!f){y&&x();return}return t.Yn(d.registerCommand(t.K,e=>{let n=_.current,r=e.target;return S?!0:n!==null&&t.Ln(r)&&n.contains(r)?(e.shiftKey||x(),b(!y),e.detail>1&&h(!0),!0):!1},1))},[x,d,y,S,b,f]);let A=(0,s.useCallback)(()=>(h(!1),d.update(()=>{let n=t.Ht(e);n&&n.remove()})),[d,e]),j=(n,i,a)=>d.update(()=>{let o=t.Ht(e);r.i(o)&&(n&&n.length>0||Object.keys(a).length>0?o.setData(JSON.stringify({appState:i,elements:n,files:a})):o.remove())}),M=()=>{C(!0)},N=(n,i)=>{setTimeout(()=>{C(!1)},200),d.update(()=>{let a=t.Ht(e);r.i(a)&&(a.setWidth(n),a.setHeight(i))})},P=(0,s.useCallback)(()=>{h(!0)},[]),{elements:F=[],files:I={},appState:L={}}=(0,s.useMemo)(()=>JSON.parse(o),[o]),R=(0,s.useCallback)(()=>{h(!1),F.length===0&&d.update(()=>{let n=t.Ht(e);n&&n.remove()})},[d,e,F.length]);return(0,c.jsxs)(c.Fragment,{children:[f&&p&&(0,c.jsx)(r.t,{clearLibrariesFileList:w,detectTextLanguage:T,extraFontFamilies:E,initialElements:F,initialFiles:I,initialAppState:L,isShown:p,loadLibrariesFileList:O,libraryItems:D,saveLibrariesFile:k,onDelete:A,onClose:R,onSave:(e,t,n)=>{j(e,t,n),h(!1)},closeOnClickOutside:!1}),F.length>0&&(0,c.jsxs)(`button`,{ref:_,className:`excalidraw-button ${y?`selected`:``}`,children:[(0,c.jsx)(m,{imageContainerRef:g,className:`image`,elements:F,extraFontFamilies:E,files:I,appState:L,width:l,height:u}),y&&f&&(0,c.jsx)(`div`,{className:`media-edit-button`,role:`button`,tabIndex:0,onMouseDown:e=>e.preventDefault(),onClick:P,children:(0,c.jsx)(`i`,{className:`bi bi-pencil-fill`})}),(y||S)&&f&&(0,c.jsx)(n.t,{buttonRef:v,showCaption:!0,setShowCaption:()=>null,mediaRef:g,editor:d,onResizeStart:M,onResizeEnd:N,captionsEnabled:!0})]})]})}exports.default=h;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ht as e, K as t, Ln as n, Yn as r, oi as i } from "./Lexical.prod-DYDuARMX.mjs";
|
|
2
|
-
import { t as a } from "./MediaResizer-
|
|
3
|
-
import { i as o, m as s, n as c, t as l } from "./ExcalidrawModal-
|
|
2
|
+
import { t as a } from "./MediaResizer-C_ZJbHAU.mjs";
|
|
3
|
+
import { i as o, m as s, n as c, t as l } from "./ExcalidrawModal-DSotOBGc.mjs";
|
|
4
4
|
import { t as u } from "./useLexicalNodeSelection.prod-CEfV63CR.mjs";
|
|
5
5
|
import { t as d } from "./useLexicalEditable.prod-CgMasHPY.mjs";
|
|
6
6
|
import { al as f } from "./chunk-K2UTITRG-BL2g1KW8.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as e, t } from "./rolldown-runtime-DY7j01NX.mjs";
|
|
2
2
|
import { I as n, Ln as r } from "./Lexical.prod-DYDuARMX.mjs";
|
|
3
|
-
import { r as i } from "./MediaResizer-
|
|
3
|
+
import { r as i } from "./MediaResizer-C_ZJbHAU.mjs";
|
|
4
4
|
import { t as a } from "./Button-D0cER-Xl.mjs";
|
|
5
5
|
import { $ as o, $a as s, $c as c, $l as l, $n as u, $o as d, $r as f, $s as p, $t as m, A as h, Aa as g, Ac as _, Ai as v, Al as y, An as b, Ao as x, Ar as S, As as ee, At as te, Au as ne, B as re, Ba as ie, Bc as ae, Bi as oe, Bl as se, Bn as ce, Bo as le, Br as ue, Bs as de, Bt as C, Bu as w, C as fe, Ca as pe, Cc as me, Ci as he, Cl as ge, Cn as _e, Co as ve, Cr as ye, Cs as be, Ct as xe, Cu as Se, D as Ce, Da as we, Dc as Te, Di as Ee, Dl as De, Dn as Oe, Do as ke, Dr as Ae, Dt as je, Du as Me, E as Ne, Ea as Pe, Ec as Fe, Ei as Ie, El as Le, En as Re, Eo as T, Er as ze, Es as Be, Et as Ve, Eu as He, F as Ue, Fa as We, Fc as Ge, Fi as Ke, Fl as qe, Fn as Je, Fo as Ye, Fr as Xe, Fs as Ze, Ft as Qe, Fu as $e, G as et, Ga as tt, Gc as nt, Gi as rt, Gl as it, Gn as at, Go as ot, Gr as st, Gs as ct, Gt as lt, Gu as ut, H as dt, Ha as ft, Hc as pt, Hi as mt, Hl as ht, Hn as gt, Ho as _t, Hr as vt, Hs as yt, Ht as bt, Hu as xt, I as St, Ia as Ct, Ic as wt, Ii as Tt, Il as Et, In as Dt, Io as Ot, Ir as E, Is as kt, It as At, Iu as jt, J as Mt, Ja as Nt, Jc as Pt, Ji as Ft, Jl as It, Jn as Lt, Jo as Rt, Jr as zt, Js as Bt, Jt as Vt, K as Ht, Ka as Ut, Kc as Wt, Ki as Gt, Kl as Kt, Kn as qt, Ko as Jt, Kr as Yt, Ks as Xt, Kt as Zt, L as Qt, La as $t, Lc as en, Li as tn, Ll as nn, Ln as rn, Lo as an, Lr as on, Ls as sn, Lt as cn, Lu as ln, M as un, Ma as dn, Mc as fn, Mi as pn, Ml as mn, Mn as hn, Mo as gn, Mr as _n, Ms as vn, Mt as yn, Mu as bn, N as xn, Na as Sn, Nc as Cn, Ni as wn, Nl as D, Nn as Tn, No as En, Nr as Dn, Ns as On, Nt as kn, Nu as An, O as jn, Oc as Mn, Oi as Nn, Ol as Pn, On as Fn, Oo as In, Or as Ln, Os as Rn, Ot as zn, Ou as Bn, P as Vn, Pa as Hn, Pc as Un, Pi as Wn, Pl as Gn, Pn as Kn, Po as qn, Pr as Jn, Ps as Yn, Pt as Xn, Pu as Zn, Q as Qn, Qa as $n, Qc as er, Qi as tr, Ql as nr, Qn as rr, Qo as ir, Qr as ar, Qs as or, Qt as sr, R as cr, Rc as lr, Ri as ur, Rl as dr, Rn as fr, Ro as pr, Rr as mr, Rs as hr, Rt as gr, Ru as _r, S as vr, Sa as yr, Sc as br, Si as xr, Sl as Sr, Sn as Cr, So as wr, Sr as Tr, Ss as Er, St as Dr, Su as Or, T as kr, Ta as Ar, Tc as jr, Ti as Mr, Tl as O, Tn as Nr, To as Pr, Tr as Fr, Ts as Ir, Tt as Lr, Tu as Rr, U as k, Ua as zr, Uc as Br, Ui as Vr, Ul as Hr, Un as Ur, Uo as Wr, Ur as Gr, Us as A, Ut as Kr, Uu as qr, V as Jr, Va as Yr, Vc as Xr, Vi as Zr, Vl as Qr, Vn as $r, Vo as ei, Vr as ti, Vs as ni, Vt as ri, Vu as ii, W as ai, Wa as oi, Wc as si, Wi as ci, Wl as li, Wn as ui, Wo as di, Wr as fi, Ws as pi, Wt as mi, Wu as hi, X as gi, Xa as _i, Xc as vi, Xi as yi, Xl as bi, Xn as xi, Xo as Si, Xr as Ci, Xs as wi, Xt as Ti, Y as Ei, Ya as j, Yc as Di, Yi as Oi, Yl as ki, Yn as Ai, Yo as ji, Yr as Mi, Ys as Ni, Yt as Pi, Z as Fi, Za as Ii, Zc as Li, Zi as M, Zl as Ri, Zn as zi, Zo as Bi, Zr as Vi, Zs as Hi, Zt as Ui, _ as Wi, _a as Gi, _c as Ki, _i as qi, _l as Ji, _n as Yi, _o as Xi, _r as Zi, _s as Qi, _u as $i, a as ea, aa as ta, ac as na, ai as ra, al as ia, an as aa, ao as oa, ar as sa, as as ca, at as la, au as ua, b as da, ba as fa, bc as pa, bi as ma, bl as ha, bn as ga, bo as _a, br as va, bs as ya, bt as ba, c as xa, ca as N, cc as Sa, ci as Ca, cl as wa, cn as Ta, co as Ea, cr as Da, cs as Oa, ct as ka, cu as Aa, d as ja, da as Ma, dc as Na, di as Pa, dl as Fa, dn as Ia, do as La, dr as Ra, ds as za, dt as Ba, du as Va, ea as Ha, ec as Ua, ei as Wa, el as Ga, en as Ka, eo as qa, er as Ja, es as Ya, et as Xa, eu as Za, f as Qa, fa as $a, fc as eo, fi as to, fl as no, fn as ro, fo as io, fr as ao, fs as oo, ft as so, fu as co, g as lo, ga as uo, gc as fo, gi as po, gl as mo, gn as ho, go, gr as _o, gs as vo, gt as yo, gu as bo, h as xo, ha as So, hc as Co, hi as wo, hl as To, hn as Eo, ho as Do, hr as Oo, hs as ko, ht as Ao, hu as jo, i as Mo, ia as No, ic as Po, ii as Fo, il as Io, in as Lo, io as Ro, ir as zo, is as Bo, it as Vo, iu as Ho, j as Uo, ja as Wo, jc as Go, ji as Ko, jl as qo, jn as P, jo as F, jr as Jo, js as Yo, jt as Xo, ju as Zo, k as Qo, ka as $o, kc as es, ki as ts, kl as ns, kn as rs, ko as is, kr as as, ks as os, kt as ss, ku as I, l as cs, la as ls, lc as us, li as ds, ll as fs, ln as ps, lo as ms, lr as hs, ls as gs, lt as _s, lu as vs, m as ys, ma as bs, mc as xs, mi as Ss, ml as Cs, mn as ws, mo as L, mr as Ts, ms as Es, mt as Ds, mu as Os, n as ks, na as As, nc as js, ni as Ms, nl as Ns, nn as Ps, no as Fs, nr as Is, ns as Ls, nt as Rs, nu as zs, o as Bs, oa as Vs, oc as Hs, oi as Us, ol as Ws, on as Gs, oo as Ks, or as qs, os as Js, ot as Ys, ou as Xs, p as Zs, pa as Qs, pc as $s, pi as ec, pl as tc, pn as nc, po as rc, pr as ic, ps as ac, pt as oc, pu as sc, q as cc, qa as lc, qc as uc, qi as dc, ql as fc, qn as pc, qo as mc, qr as hc, qs as R, qt as gc, r as _c, ra as vc, rc as yc, ri as bc, rl as xc, rn as Sc, ro as Cc, rr as wc, rs as Tc, rt as Ec, ru as Dc, s as Oc, sa as kc, sc as Ac, si as jc, sl as Mc, sn as Nc, so as Pc, sr as Fc, ss as Ic, st as Lc, su as Rc, t as zc, ta as Bc, tc as Vc, ti as Hc, tl as Uc, tn as Wc, to as Gc, tr as Kc, ts as qc, tt as Jc, tu as Yc, u as Xc, ua as Zc, uc as Qc, ui as $c, ul as el, un as tl, uo as nl, ur as rl, us as il, ut as al, uu as ol, v as sl, va as cl, vc as ll, vi as ul, vl as dl, vn as fl, vo as pl, vr as ml, vs as hl, vt as gl, vu as _l, w as vl, wa as yl, wc as bl, wi as xl, wl as Sl, wn as Cl, wo as wl, wr as Tl, ws as El, wt as Dl, wu as Ol, x as kl, xa as Al, xc as jl, xi as Ml, xl as Nl, xn as Pl, xo as Fl, xr as Il, xs as Ll, xt as Rl, xu as zl, y as Bl, ya as Vl, yc as Hl, yi as Ul, yl as Wl, yn as Gl, yo as Kl, yr as ql, ys as Jl, yt as Yl, yu as Xl, z as Zl, za as Ql, zc as $l, zi as eu, zl as tu, zn as nu, zo as ru, zr as iu, zs as au, zt as ou, zu as su } from "./chunk-K2UTITRG-BL2g1KW8.mjs";
|
|
6
6
|
import { i as z, n as cu, r as lu } from "./chunk-SRAX5OIU-BPnQAKNS.mjs";
|
|
@@ -164,7 +164,7 @@ function id(e) {
|
|
|
164
164
|
}
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region src/nodes/ExcalidrawNode/index.tsx
|
|
167
|
-
var ad = B.lazy(() => import("./ExcalidrawComponent-
|
|
167
|
+
var ad = B.lazy(() => import("./ExcalidrawComponent-OMjYgJCL.mjs"));
|
|
168
168
|
function od(e) {
|
|
169
169
|
let t = e.getAttribute("data-lexical-excalidraw-json"), n = window.getComputedStyle(e), r = n.getPropertyValue("height"), i = n.getPropertyValue("width");
|
|
170
170
|
return t ? { node: cd(t, !i || i === "inherit" ? "inherit" : parseInt(i, 10), !r || r === "inherit" ? "inherit" : parseInt(r, 10)) } : null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-D_FWMvbo.cjs"),t=require("./Lexical.prod-C9Xekspf.cjs"),n=require("./MediaResizer-
|
|
1
|
+
const e=require("./rolldown-runtime-D_FWMvbo.cjs"),t=require("./Lexical.prod-C9Xekspf.cjs"),n=require("./MediaResizer-Dzro5TVg.cjs"),r=require("./Button-DoHOTdXN.cjs"),i=require("./chunk-K2UTITRG-0LZxlwq1.cjs"),a=require("./chunk-SRAX5OIU-C0DwbKUW.cjs"),o=require("./chunk-6U3AYISY-DXfTCN6j.cjs"),s=require("./chunk-Z3N5DIM6-sOhN64_W.cjs"),c=require("./floating-ui.react-dom-5SucL1Ke.cjs");let l=require("react"),u=e.a(l,1);l=e.a(l);let d=require("react/jsx-runtime"),f=require("react-dom");f=e.a(f,1);let p=require("use-sync-external-store/shim/with-selector.js");p=e.a(p,1);var m=[],h=[],g=(0,u.createContext)({extraFontFamilies:m,libraryItems:h});function _({children:e,clearLibrariesFileList:t,detectTextLanguage:n,extraFontFamilies:r=m,loadLibrariesFileList:i,libraryItems:a=h,saveLibrariesFile:o}){let s=(0,u.useMemo)(()=>({clearLibrariesFileList:t,detectTextLanguage:n,extraFontFamilies:r,libraryItems:a,loadLibrariesFileList:i,saveLibrariesFile:o}),[t,n,r,a,i,o]);return(0,d.jsx)(g.Provider,{value:s,children:e})}function v(){return(0,u.useContext)(g)}function y({onClose:e,children:n,title:r,closeOnClickOutside:i}){let a=(0,u.useRef)(null);return(0,u.useEffect)(()=>{a.current!==null&&a.current.focus()},[]),(0,u.useEffect)(()=>{let n=null,r=t=>{t.key===`Escape`&&e()},o=n=>{let r=n.target;a.current!==null&&t.Ln(r)&&!a.current.contains(r)&&i&&e()},s=a.current;return s!==null&&(n=s.parentElement,n!==null&&n.addEventListener(`click`,o)),window.addEventListener(`keydown`,r),()=>{window.removeEventListener(`keydown`,r),n!==null&&n?.removeEventListener(`click`,o)}},[i,e]),(0,d.jsx)(`div`,{className:`Modal__overlay d-flex justify-content-center align-items-center flex-column position-fixed top-0 bottom-0 start-0 end-0`,role:`dialog`,children:(0,d.jsxs)(`div`,{className:`Modal__modal d-flex flex-column p-4 position-relative`,tabIndex:-1,ref:a,children:[(0,d.jsx)(`h2`,{className:`Modal__title m-0 pb-2`,children:r}),(0,d.jsx)(`button`,{className:`Modal__closeButton d-flex justify-content-center align-items-center position-absolute top-0 end-0 mt-3 me-3`,"aria-label":`Close modal`,type:`button`,onClick:e,children:`X`}),(0,d.jsx)(`div`,{className:`Modal__content pt-4`,children:n})]})})}function b({onClose:e,children:t,title:n,closeOnClickOutside:r=!1}){return(0,f.createPortal)((0,d.jsx)(y,{onClose:e,title:n,closeOnClickOutside:r,children:t}),document.body)}var x=[[`Arial`,`Arial`,`en`],[`Courier New`,`Courier New`,`en`],[`Georgia`,`Georgia`,`en`],[`Times New Roman`,`Times New Roman`,`en`],[`Trebuchet MS`,`Trebuchet MS`,`en`],[`Verdana`,`Verdana`,`en`]];function S(e){let t=[...x],n=new Set(x.map(([e])=>e));return e.forEach(([e,r])=>{n.has(e)||(t.push([e,e,r]),n.add(e))}),t.sort(([,e],[,t])=>e.localeCompare(t))}function C(e,t){return e.find(([,,e])=>e===t)?.[0]??null}var w=/^(\(.+\)\s(.+))\n([\s\S]+)$/,T=/(?=\([\p{Decimal_Number}]+\):\s+)/u;function E(e){let t=e.trimEnd().split(T).map(e=>e.trim()).filter(e=>e!==``);return t.length>0?t:[e.trimEnd()]}function D(e){let t=w.exec(e.replace(/\r\n?/g,`
|
|
2
2
|
`).trimEnd());return t===null?null:{body:t[3].trimEnd(),header:t[1].trim(),title:t[2].trim()}}function O(e){return`${e.header}\n${E(e.body).join(`
|
|
3
3
|
`)}`}function k(e){return e.body.split(`
|
|
4
|
-
`)}function ee(e){return`${e.header}\n${e.body}`}var te=u.lazy(()=>Promise.resolve().then(()=>require("./ExcalidrawComponent-bEqDGYRW.cjs")));function ne(e){let t=e.getAttribute(`data-lexical-excalidraw-json`),n=window.getComputedStyle(e),r=n.getPropertyValue(`height`),i=n.getPropertyValue(`width`);return t?{node:ie(t,!i||i===`inherit`?`inherit`:parseInt(i,10),!r||r===`inherit`?`inherit`:parseInt(r,10))}:null}var re=class e extends t.I{__data;__width;__height;static getType(){return`excalidraw`}static clone(t){return new e(t.__data,t.__width,t.__height,t.__key)}static importJSON(t){return new e(t.data,t.width??`inherit`,t.height??`inherit`).updateFromJSON(t)}exportJSON(){return{...super.exportJSON(),data:this.__data,height:this.__height===`inherit`?void 0:this.__height,width:this.__width===`inherit`?void 0:this.__width}}constructor(e=`[]`,t=`inherit`,n=`inherit`,r){super(r),this.__data=e,this.__width=t,this.__height=n}createDOM(e){let t=document.createElement(`span`),n=e.theme.image;return n!==void 0&&(t.className=n),t}updateDOM(){return!1}static importDOM(){return{span:e=>e.hasAttribute(`data-lexical-excalidraw-json`)?{conversion:ne,priority:1}:null}}exportDOM(e){let t=document.createElement(`span`);t.style.display=`inline-block`;let n=e.getElementByKey(this.getKey());if(n!==null){let e=n.querySelector(`svg`);e!==null&&(t.innerHTML=e.outerHTML)}return t.style.width=this.__width===`inherit`?`inherit`:`${this.__width}px`,t.style.height=this.__height===`inherit`?`inherit`:`${this.__height}px`,t.setAttribute(`data-lexical-excalidraw-json`,this.__data),{element:t}}setData(e){let t=this.getWritable();t.__data=e}getWidth(){return this.getLatest().__width}setWidth(e){let t=this.getWritable();t.__width=e}getHeight(){return this.getLatest().__height}setHeight(e){let t=this.getWritable();t.__height=e}decorate(e,t){return(0,d.jsx)(te,{nodeKey:this.getKey(),data:this.__data,width:this.__width,height:this.__height})}};function ie(e=`[]`,t=`inherit`,n=`inherit`){return new re(e,t,n)}function ae(e){return e instanceof re}var oe=0;function A(e,t){let n=`atom${++oe}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=se,r.write=ce),t&&(r.write=t),r}function se(e){return e(this)}function ce(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var le=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,ue=e=>`init`in e,de=e=>!!e.write,fe=new WeakMap,pe=e=>ge(e)&&!fe.get(e)?.[1],me=(e,t)=>{let n=fe.get(e);n&&(n[1]=!0,n[0].forEach(e=>e(t)))},he=e=>{if(fe.has(e))return;let t=[new Set,!1];fe.set(e,t);let n=()=>{t[1]=!0};e.then(n,n),e.onCancel=e=>{t[0].add(e)}},ge=e=>typeof e?.then==`function`,_e=e=>`v`in e||`e`in e,ve=e=>{if(`e`in e)throw e.e;return e.v},ye=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then(()=>{n.p.delete(e)},()=>{n.p.delete(e)}))},be=(e,t,n,r,i)=>{var a;n.d.set(r,i.n),pe(n.v)&&ye(t,n.v,i),(a=i.m)==null||a.t.add(t),e&&we(e,r,t)},xe=()=>({D:new Map,H:new Set,M:new Set,L:new Set}),Se=(e,t,n)=>{e[t].add(n)},Ce=(e,t,n)=>{e.D.has(t)||(e.D.set(t,new Set),Se(e,`M`,()=>{var t;(t=n.m)==null||t.l.forEach(t=>Se(e,`M`,t))}))},we=(e,t,n)=>{let r=e.D.get(t);r&&r.add(n)},Te=(e,t)=>e.D.get(t),Ee=e=>{let t,n=!1,r=e=>{try{e()}catch(e){n||=(t=e,!0)}};for(;e.H.size||e.M.size||e.L.size;)e.D.clear(),e.H.forEach(r),e.H.clear(),e.M.forEach(r),e.M.clear(),e.L.forEach(r),e.L.clear();if(n)throw t},De=(...[e,t,n,r])=>{let i=(t,n,r)=>{let i=`v`in n,a=n.v,o=pe(n.v)?n.v:null;if(ge(r)){he(r);for(let i of n.d.keys())ye(t,r,e(i));n.v=r}else n.v=r;delete n.e,delete n.x,(!i||!Object.is(a,n.v))&&(++n.n,o&&me(o,r))},a=(n,r)=>{var o;let s=e(r);if(_e(s)&&(s.m&&!s.x||Array.from(s.d).every(([e,t])=>a(n,e).n===t)))return s;s.d.clear();let c=!0,l=t=>{if(le(r,t)){let n=e(t);if(!_e(n))if(ue(t))i(t,n,t.init);else throw Error(`no atom init`);return ve(n)}let o=a(n,t);try{return ve(o)}finally{if(c)be(n,r,s,t,o);else{let e=xe();be(e,r,s,t,o),d(e,r,s),Ee(e)}}},f,p,m={get signal(){return f||=new AbortController,f.signal},get setSelf(){return!p&&de(r)&&(p=(...e)=>{if(!c)return u(r,...e)}),p}};try{let e=t(r,l,m);if(i(r,s,e),ge(e)){(o=e.onCancel)==null||o.call(e,()=>f?.abort());let t=()=>{if(s.m){let e=xe();d(e,r,s),Ee(e)}};e.then(t,t)}return s}catch(e){return delete s.v,s.e=e,delete s.x,++s.n,s}finally{c=!1}},o=e=>ve(a(void 0,e)),s=(t,n,r)=>{var i;let a=new Map;for(let t of r.m?.t||[]){let n=e(t);n.m&&a.set(t,n)}for(let t of r.p)a.set(t,e(t));return(i=Te(t,n))==null||i.forEach(t=>{a.set(t,e(t))}),a},c=(e,t,n)=>{let r=[],i=new Set,o=new Set,c=[[t,n]];for(;c.length>0;){let[t,n]=c[c.length-1];if(o.has(t)){c.pop();continue}if(i.has(t)){r.push([t,n,n.n]),o.add(t),n.x=!0,c.pop();continue}i.add(t);for(let[r,a]of s(e,t,n))t!==r&&!i.has(r)&&c.push([r,a])}Se(e,`H`,()=>{let n=new Set([t]);for(let t=r.length-1;t>=0;--t){let[i,o,s]=r[t],c=!1;for(let e of o.d.keys())if(e!==i&&n.has(e)){c=!0;break}c&&(a(e,i),d(e,i,o),s!==o.n&&(Ce(e,i,o),n.add(i))),delete o.x}})},l=(t,r,...o)=>{let s=!0,u=e=>ve(a(t,e)),f=(n,...a)=>{let o=e(n);try{if(le(r,n)){if(!ue(n))throw Error(`atom not writable`);let e=o.n,r=a[0];i(n,o,r),d(t,n,o),e!==o.n&&(Ce(t,n,o),c(t,n,o));return}else return l(t,n,...a)}finally{s||Ee(t)}};try{return n(r,u,f,...o)}finally{s=!1}},u=(e,...t)=>{let n=xe();try{return l(n,e,...t)}finally{Ee(n)}},d=(t,n,r)=>{if(r.m&&!pe(r.v)){for(let i of r.d.keys())r.m.d.has(i)||(f(t,i,e(i)).t.add(n),r.m.d.add(i));for(let i of r.m.d||[])r.d.has(i)||(r.m.d.delete(i),p(t,i,e(i))?.t.delete(n))}},f=(t,n,i)=>{if(!i.m){a(t,n);for(let r of i.d.keys())f(t,r,e(r)).t.add(n);if(i.m={l:new Set,d:new Set(i.d.keys()),t:new Set},de(n)){let e=i.m,a,o=(e,t)=>{let r=!0;a=(...t)=>{try{return l(e,n,...t)}finally{r||Ee(e)}};try{return t()}finally{r=!1}};Se(t,`L`,()=>{let i=o(t,()=>r(n,(...e)=>a(...e)));i&&(e.u=e=>o(e,i))})}}return i.m},p=(t,n,r)=>{if(r.m&&!r.m.l.size&&!Array.from(r.m.t).some(t=>e(t).m?.d.has(n))){let i=r.m.u;i&&Se(t,`L`,()=>i(t)),delete r.m;for(let i of r.d.keys())p(t,i,e(i))?.t.delete(n);return}return r.m};return{get:o,set:u,sub:(t,n)=>{let r=xe(),i=e(t),a=f(r,t,i).l;return a.add(n),Ee(r),()=>{a.delete(n);let e=xe();p(e,t,i),Ee(e)}},unstable_derive:i=>De(...i(e,t,n,r))}},Oe=()=>{let e=new WeakMap;return De(t=>{let n=e.get(t);return n||(n={d:new Map,p:new Set,n:0},e.set(t,n)),n},(e,...t)=>e.read(...t),(e,...t)=>e.write(...t),(e,...t)=>e.onMount?.call(e,...t))},ke,Ae=()=>(ke||=Oe(),ke),je=(0,u.createContext)(void 0),Me=e=>{let t=(0,u.useContext)(je);return e?.store||t||Ae()},Ne=e=>typeof e?.then==`function`,Pe=e=>{e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t})},Fe=u.default.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(Pe(e),e)}),Ie=new WeakMap,Le=e=>{let t=Ie.get(e);return t||(t=new Promise((n,r)=>{let i=e,a=e=>t=>{i===e&&n(t)},o=e=>t=>{i===e&&r(t)},s=e=>{`onCancel`in e&&typeof e.onCancel==`function`&&e.onCancel(e=>{Ne(e)?(Ie.set(e,t),i=e,e.then(a(e),o(e)),s(e)):n(e)})};e.then(a(e),o(e)),s(e)}),Ie.set(e,t)),t};function Re(e,t){let n=Me(t),[[r,i,a],o]=(0,u.useReducer)(t=>{let r=n.get(e);return Object.is(t[0],r)&&t[1]===n&&t[2]===e?t:[r,n,e]},void 0,()=>[n.get(e),n,e]),s=r;(i!==n||a!==e)&&(o(),s=n.get(e));let c=t?.delay;return(0,u.useEffect)(()=>{let t=n.sub(e,()=>{if(typeof c==`number`){let t=n.get(e);Ne(t)&&Pe(Le(t)),setTimeout(o,c);return}o()});return o(),t},[n,e,c]),(0,u.useDebugValue)(s),Ne(s)?Fe(Le(s)):s}function ze(e,t){let n=Me(t);return(0,u.useCallback)((...t)=>n.set(e,...t),[n,e])}function Be(e,t){return[Re(e,t),ze(e,t)]}var Ve=new WeakMap;function He(e,t){let n=Me(t),r=Ue(n);for(let[i,a]of e)(!r.has(i)||t?.dangerouslyForceHydrate)&&(r.add(i),n.set(i,a))}var Ue=e=>{let t=Ve.get(e);return t||(t=new WeakSet,Ve.set(e,t)),t};function We(){return We=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},We.apply(this,arguments)}function Ge(){let e=(0,l.createContext)(null);function t({store:t,initialValues:n=[],children:r}){let i=(0,l.useRef)(t);return i.current||=Oe(),He(n,{store:i.current}),(0,d.jsx)(e.Provider,{value:i.current,children:r})}let n=t=>{let n=(0,l.useContext)(e);if(!n)throw Error(`Missing Provider from createIsolation`);return Me(We({store:n},t))};return{Provider:t,useStore:n,useAtom:(e,t)=>{let r=n();return Be(e,We({store:r},t))},useAtomValue:(e,t)=>{let r=n();return Re(e,We({store:r},t))},useSetAtom:(e,t)=>{let r=n();return ze(e,We({store:r},t))}}}var Ke={};process.env.NODE_ENV!==`production`&&(Ke.name=`unscoped`,Ke.toString=Ye);var{read:qe,write:Je}=A(null);function Ye(){return this.name}(0,l.createContext)({scope:void 0,baseStore:void 0});function Xe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ze(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Qe(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ze(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ze(e[t],null)}}}}function $e(...e){return u.useCallback(Qe(...e),e)}function et(e,t=[]){let n=[];function r(t,r){let i=u.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=u.useMemo(()=>o,Object.values(o));return(0,d.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=u.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>u.createContext(e));return function(n){let r=n?.[e]||t;return u.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,tt(i,...t)]}function tt(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var nt=u.forwardRef((e,t)=>{let{children:n,...r}=e,i=u.Children.toArray(n),a=i.find(at);if(a){let e=a.props.children,n=i.map(t=>t===a?u.Children.count(e)>1?u.Children.only(null):u.isValidElement(e)?e.props.children:null:t);return(0,d.jsx)(rt,{...r,ref:t,children:u.isValidElement(e)?u.cloneElement(e,void 0,n):null})}return(0,d.jsx)(rt,{...r,ref:t,children:n})});nt.displayName=`Slot`;var rt=u.forwardRef((e,t)=>{let{children:n,...r}=e;if(u.isValidElement(n)){let e=st(n),i=ot(r,n.props);return n.type!==u.Fragment&&(i.ref=t?Qe(t,e):e),u.cloneElement(n,i)}return u.Children.count(n)>1?u.Children.only(null):null});rt.displayName=`SlotClone`;var it=({children:e})=>(0,d.jsx)(d.Fragment,{children:e});function at(e){return u.isValidElement(e)&&e.type===it}function ot(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function st(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ct=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=u.forwardRef((e,n)=>{let{asChild:r,...i}=e,a=r?nt:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(a,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lt(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}function ut(e){let t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...e)=>t.current?.(...e),[])}function dt(e,t=globalThis?.document){let n=ut(e);u.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ft=`DismissableLayer`,pt=`dismissableLayer.update`,mt=`dismissableLayer.pointerDownOutside`,ht=`dismissableLayer.focusOutside`,gt,_t=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vt=u.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=u.useContext(_t),[f,p]=u.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=u.useState({}),g=$e(t,e=>p(e)),_=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(v),b=f?_.indexOf(f):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=xt(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!S||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},m),w=St(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},m);return dt(e=>{b===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},m),u.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(gt=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),Ct(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=gt)}},[f,m,n,l]),u.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),Ct())},[f,l]),u.useEffect(()=>{let e=()=>h({});return document.addEventListener(pt,e),()=>document.removeEventListener(pt,e)},[]),(0,d.jsx)(ct.div,{...c,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Xe(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Xe(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Xe(e.onPointerDownCapture,C.onPointerDownCapture)})});vt.displayName=ft;var yt=`DismissableLayerBranch`,bt=u.forwardRef((e,t)=>{let n=u.useContext(_t),r=u.useRef(null),i=$e(t,r);return u.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,d.jsx)(ct.div,{...e,ref:i})});bt.displayName=yt;function xt(e,t=globalThis?.document){let n=ut(e),r=u.useRef(!1),i=u.useRef(()=>{});return u.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){wt(mt,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function St(e,t=globalThis?.document){let n=ut(e),r=u.useRef(!1);return u.useEffect(()=>{let e=e=>{e.target&&!r.current&&wt(ht,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ct(){let e=new CustomEvent(pt);document.dispatchEvent(e)}function wt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?lt(i,a):i.dispatchEvent(a)}var Tt=0;function Et(){u.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Dt()),document.body.insertAdjacentElement(`beforeend`,e[1]??Dt()),Tt++,()=>{Tt===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Tt--}},[])}function Dt(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Ot=`focusScope.autoFocusOnMount`,kt=`focusScope.autoFocusOnUnmount`,At={bubbles:!1,cancelable:!0},jt=`FocusScope`,Mt=u.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=u.useState(null),l=ut(i),f=ut(a),p=u.useRef(null),m=$e(t,e=>c(e)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?p.current=t:zt(p.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||zt(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&zt(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),u.useEffect(()=>{if(s){Bt.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ot,At);s.addEventListener(Ot,l),s.dispatchEvent(t),t.defaultPrevented||(Nt(Ut(Ft(s)),{select:!0}),document.activeElement===e&&zt(s))}return()=>{s.removeEventListener(Ot,l),setTimeout(()=>{let t=new CustomEvent(kt,At);s.addEventListener(kt,f),s.dispatchEvent(t),t.defaultPrevented||zt(e??document.body,{select:!0}),s.removeEventListener(kt,f),Bt.remove(h)},0)}}},[s,l,f,h]);let g=u.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Pt(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&zt(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&zt(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,d.jsx)(ct.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})});Mt.displayName=jt;function Nt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(zt(r,{select:t}),document.activeElement!==n)return}function Pt(e){let t=Ft(e);return[It(t,e),It(t.reverse(),e)]}function Ft(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function It(e,t){for(let n of e)if(!Lt(n,{upTo:t}))return n}function Lt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Rt(e){return e instanceof HTMLInputElement&&`select`in e}function zt(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Rt(e)&&t&&e.select()}}var Bt=Vt();function Vt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ht(e,t),e.unshift(t)},remove(t){e=Ht(e,t),e[0]?.resume()}}}function Ht(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ut(e){return e.filter(e=>e.tagName!==`A`)}var Wt=globalThis?.document?u.useLayoutEffect:()=>{},Gt=u.useId||(()=>void 0),Kt=0;function qt(e){let[t,n]=u.useState(Gt());return Wt(()=>{e||n(e=>e??String(Kt++))},[e]),e||(t?`radix-${t}`:``)}var Jt=`Arrow`,Yt=u.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,d.jsx)(ct.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,d.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Yt.displayName=Jt;var Xt=Yt;function Zt(e){let[t,n]=u.useState(void 0);return Wt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Qt=`Popper`,[$t,en]=et(Qt),[tn,nn]=$t(Qt),rn=e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null);return(0,d.jsx)(tn,{scope:t,anchor:r,onAnchorChange:i,children:n})};rn.displayName=Qt;var an=`PopperAnchor`,on=u.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=nn(an,n),o=u.useRef(null),s=$e(t,o);return u.useEffect(()=>{a.onAnchorChange(r?.current||o.current)}),r?null:(0,d.jsx)(ct.div,{...i,ref:s})});on.displayName=an;var sn=`PopperContent`,[cn,ln]=$t(sn),un=u.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m=`partial`,hideWhenDetached:h=!1,updatePositionStrategy:g=`optimized`,onPlaced:_,...v}=e,y=nn(sn,n),[b,x]=u.useState(null),S=$e(t,e=>x(e)),[C,w]=u.useState(null),T=Zt(C),E=T?.width??0,D=T?.height??0,O=r+(a===`center`?``:`-`+a),k=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},ee=Array.isArray(f)?f:[f],te=ee.length>0,ne={padding:k,boundary:ee.filter(mn),altBoundary:te},{refs:re,floatingStyles:ie,placement:ae,isPositioned:oe,middlewareData:A}=c.c({strategy:`fixed`,placement:O,whileElementsMounted:(...e)=>c.l(...e,{animationFrame:g===`always`}),elements:{reference:y.anchor},middleware:[c.a({mainAxis:i+D,alignmentAxis:o}),l&&c.o({mainAxis:!0,crossAxis:!1,limiter:m===`partial`?c.i():void 0,...ne}),l&&c.n({...ne}),c.s({...ne,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),C&&c.t({element:C,padding:s}),hn({arrowWidth:E,arrowHeight:D}),h&&c.r({strategy:`referenceHidden`,...ne})]}),[se,ce]=gn(ae),le=ut(_);Wt(()=>{oe&&le?.()},[oe,le]);let ue=A.arrow?.x,de=A.arrow?.y,fe=A.arrow?.centerOffset!==0,[pe,me]=u.useState();return Wt(()=>{b&&me(window.getComputedStyle(b).zIndex)},[b]),(0,d.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:oe?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:pe,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(` `),...A.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(cn,{scope:n,placedSide:se,onArrowChange:w,arrowX:ue,arrowY:de,shouldHideArrow:fe,children:(0,d.jsx)(ct.div,{"data-side":se,"data-align":ce,...v,ref:S,style:{...v.style,animation:oe?void 0:`none`}})})})});un.displayName=sn;var dn=`PopperArrow`,fn={top:`bottom`,right:`left`,bottom:`top`,left:`right`},pn=u.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=ln(dn,n),a=fn[i.placedSide];return(0,d.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,d.jsx)(Xt,{...r,ref:t,style:{...r.style,display:`block`}})})});pn.displayName=dn;function mn(e){return e!==null}var hn=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=gn(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function gn(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var _n=rn,vn=on,yn=un,bn=pn,xn=`Portal`,Sn=u.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=u.useState(!1);Wt(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?f.default.createPortal((0,d.jsx)(ct.div,{...r,ref:t}),o):null});Sn.displayName=xn;function Cn(e,t){return u.useReducer((e,n)=>t[e][n]??e,e)}var wn=e=>{let{present:t,children:n}=e,r=Tn(t),i=typeof n==`function`?n({present:r.isPresent}):u.Children.only(n),a=$e(r.ref,Dn(i));return typeof n==`function`||r.isPresent?u.cloneElement(i,{ref:a}):null};wn.displayName=`Presence`;function Tn(e){let[t,n]=u.useState(),r=u.useRef({}),i=u.useRef(e),a=u.useRef(`none`),[o,s]=Cn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return u.useEffect(()=>{let e=En(r.current);a.current=o===`mounted`?e:`none`},[o]),Wt(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=En(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Wt(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=En(r.current).includes(a.animationName);if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=En(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:u.useCallback(e=>{e&&(r.current=getComputedStyle(e)),n(e)},[])}}function En(e){return e?.animationName||`none`}function Dn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function On({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=kn({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=ut(n);return[o,u.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function kn({defaultProp:e,onChange:t}){let n=u.useState(e),[r]=n,i=u.useRef(r),a=ut(t);return u.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var An=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},jn=new WeakMap,Mn=new WeakMap,Nn={},Pn=0,Fn=function(e){return e&&(e.host||Fn(e.parentNode))},In=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Fn(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ln=function(e,t,n,r){var i=In(t,Array.isArray(e)?e:[e]);Nn[n]||(Nn[n]=new WeakMap);var a=Nn[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(jn.get(e)||0)+1,l=(a.get(e)||0)+1;jn.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Mn.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Pn++,function(){o.forEach(function(e){var t=jn.get(e)-1,i=a.get(e)-1;jn.set(e,t),a.set(e,i),t||(Mn.has(e)||e.removeAttribute(r),Mn.delete(e)),i||e.removeAttribute(n)}),Pn--,Pn||(jn=new WeakMap,jn=new WeakMap,Mn=new WeakMap,Nn={})}},Rn=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||An(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ln(r,i,n,`aria-hidden`)):function(){return null}},zn=function(){return zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zn.apply(this,arguments)};function Bn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Vn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Hn=`right-scroll-bar-position`,Un=`width-before-scroll-bar`,Wn=`with-scroll-bars-hidden`,Gn=`--removed-body-scroll-bar-size`;function Kn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function qn(e,t){var n=(0,l.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Jn=typeof window<`u`?l.useLayoutEffect:l.useEffect,Yn=new WeakMap;function Xn(e,t){var n=qn(t||null,function(t){return e.forEach(function(e){return Kn(e,t)})});return Jn(function(){var t=Yn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Kn(e,null)}),i.forEach(function(e){r.has(e)||Kn(e,a)})}Yn.set(n,e)},[e]),n}function Zn(e){return e}function Qn(e,t){t===void 0&&(t=Zn);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function $n(e){e===void 0&&(e={});var t=Qn(null);return t.options=zn({async:!0,ssr:!1},e),t}var er=function(e){var t=e.sideCar,n=Bn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return l.createElement(r,zn({},n))};er.isSideCarExport=!0;function tr(e,t){return e.useMedium(t),er}var nr=$n(),rr=function(){},ir=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:rr,onWheelCapture:rr,onTouchMoveCapture:rr}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Bn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Xn([n,t]),w=zn(zn({},x),i);return l.createElement(l.Fragment,null,d&&l.createElement(S,{sideCar:nr,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?l.cloneElement(l.Children.only(s),zn(zn({},w),{ref:C})):l.createElement(y,zn({},w,{className:c,ref:C}),s))});ir.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ir.classNames={fullWidth:Un,zeroRight:Hn};var ar,or=function(){if(ar)return ar;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function sr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=or();return t&&e.setAttribute(`nonce`,t),e}function cr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lr(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ur=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sr())&&(cr(t,n),lr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dr=function(){var e=ur();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fr=function(){var e=dr();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},pr={left:0,top:0,right:0,gap:0},mr=function(e){return parseInt(e||``,10)||0},hr=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[mr(n),mr(r),mr(i)]},gr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return pr;var t=hr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},_r=fr(),vr=`data-scroll-locked`,yr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
4
|
+
`)}function ee(e){return`${e.header}\n${e.body}`}var te=u.lazy(()=>Promise.resolve().then(()=>require("./ExcalidrawComponent-DdmtbuXc.cjs")));function ne(e){let t=e.getAttribute(`data-lexical-excalidraw-json`),n=window.getComputedStyle(e),r=n.getPropertyValue(`height`),i=n.getPropertyValue(`width`);return t?{node:ie(t,!i||i===`inherit`?`inherit`:parseInt(i,10),!r||r===`inherit`?`inherit`:parseInt(r,10))}:null}var re=class e extends t.I{__data;__width;__height;static getType(){return`excalidraw`}static clone(t){return new e(t.__data,t.__width,t.__height,t.__key)}static importJSON(t){return new e(t.data,t.width??`inherit`,t.height??`inherit`).updateFromJSON(t)}exportJSON(){return{...super.exportJSON(),data:this.__data,height:this.__height===`inherit`?void 0:this.__height,width:this.__width===`inherit`?void 0:this.__width}}constructor(e=`[]`,t=`inherit`,n=`inherit`,r){super(r),this.__data=e,this.__width=t,this.__height=n}createDOM(e){let t=document.createElement(`span`),n=e.theme.image;return n!==void 0&&(t.className=n),t}updateDOM(){return!1}static importDOM(){return{span:e=>e.hasAttribute(`data-lexical-excalidraw-json`)?{conversion:ne,priority:1}:null}}exportDOM(e){let t=document.createElement(`span`);t.style.display=`inline-block`;let n=e.getElementByKey(this.getKey());if(n!==null){let e=n.querySelector(`svg`);e!==null&&(t.innerHTML=e.outerHTML)}return t.style.width=this.__width===`inherit`?`inherit`:`${this.__width}px`,t.style.height=this.__height===`inherit`?`inherit`:`${this.__height}px`,t.setAttribute(`data-lexical-excalidraw-json`,this.__data),{element:t}}setData(e){let t=this.getWritable();t.__data=e}getWidth(){return this.getLatest().__width}setWidth(e){let t=this.getWritable();t.__width=e}getHeight(){return this.getLatest().__height}setHeight(e){let t=this.getWritable();t.__height=e}decorate(e,t){return(0,d.jsx)(te,{nodeKey:this.getKey(),data:this.__data,width:this.__width,height:this.__height})}};function ie(e=`[]`,t=`inherit`,n=`inherit`){return new re(e,t,n)}function ae(e){return e instanceof re}var oe=0;function A(e,t){let n=`atom${++oe}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=se,r.write=ce),t&&(r.write=t),r}function se(e){return e(this)}function ce(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var le=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,ue=e=>`init`in e,de=e=>!!e.write,fe=new WeakMap,pe=e=>ge(e)&&!fe.get(e)?.[1],me=(e,t)=>{let n=fe.get(e);n&&(n[1]=!0,n[0].forEach(e=>e(t)))},he=e=>{if(fe.has(e))return;let t=[new Set,!1];fe.set(e,t);let n=()=>{t[1]=!0};e.then(n,n),e.onCancel=e=>{t[0].add(e)}},ge=e=>typeof e?.then==`function`,_e=e=>`v`in e||`e`in e,ve=e=>{if(`e`in e)throw e.e;return e.v},ye=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then(()=>{n.p.delete(e)},()=>{n.p.delete(e)}))},be=(e,t,n,r,i)=>{var a;n.d.set(r,i.n),pe(n.v)&&ye(t,n.v,i),(a=i.m)==null||a.t.add(t),e&&we(e,r,t)},xe=()=>({D:new Map,H:new Set,M:new Set,L:new Set}),Se=(e,t,n)=>{e[t].add(n)},Ce=(e,t,n)=>{e.D.has(t)||(e.D.set(t,new Set),Se(e,`M`,()=>{var t;(t=n.m)==null||t.l.forEach(t=>Se(e,`M`,t))}))},we=(e,t,n)=>{let r=e.D.get(t);r&&r.add(n)},Te=(e,t)=>e.D.get(t),Ee=e=>{let t,n=!1,r=e=>{try{e()}catch(e){n||=(t=e,!0)}};for(;e.H.size||e.M.size||e.L.size;)e.D.clear(),e.H.forEach(r),e.H.clear(),e.M.forEach(r),e.M.clear(),e.L.forEach(r),e.L.clear();if(n)throw t},De=(...[e,t,n,r])=>{let i=(t,n,r)=>{let i=`v`in n,a=n.v,o=pe(n.v)?n.v:null;if(ge(r)){he(r);for(let i of n.d.keys())ye(t,r,e(i));n.v=r}else n.v=r;delete n.e,delete n.x,(!i||!Object.is(a,n.v))&&(++n.n,o&&me(o,r))},a=(n,r)=>{var o;let s=e(r);if(_e(s)&&(s.m&&!s.x||Array.from(s.d).every(([e,t])=>a(n,e).n===t)))return s;s.d.clear();let c=!0,l=t=>{if(le(r,t)){let n=e(t);if(!_e(n))if(ue(t))i(t,n,t.init);else throw Error(`no atom init`);return ve(n)}let o=a(n,t);try{return ve(o)}finally{if(c)be(n,r,s,t,o);else{let e=xe();be(e,r,s,t,o),d(e,r,s),Ee(e)}}},f,p,m={get signal(){return f||=new AbortController,f.signal},get setSelf(){return!p&&de(r)&&(p=(...e)=>{if(!c)return u(r,...e)}),p}};try{let e=t(r,l,m);if(i(r,s,e),ge(e)){(o=e.onCancel)==null||o.call(e,()=>f?.abort());let t=()=>{if(s.m){let e=xe();d(e,r,s),Ee(e)}};e.then(t,t)}return s}catch(e){return delete s.v,s.e=e,delete s.x,++s.n,s}finally{c=!1}},o=e=>ve(a(void 0,e)),s=(t,n,r)=>{var i;let a=new Map;for(let t of r.m?.t||[]){let n=e(t);n.m&&a.set(t,n)}for(let t of r.p)a.set(t,e(t));return(i=Te(t,n))==null||i.forEach(t=>{a.set(t,e(t))}),a},c=(e,t,n)=>{let r=[],i=new Set,o=new Set,c=[[t,n]];for(;c.length>0;){let[t,n]=c[c.length-1];if(o.has(t)){c.pop();continue}if(i.has(t)){r.push([t,n,n.n]),o.add(t),n.x=!0,c.pop();continue}i.add(t);for(let[r,a]of s(e,t,n))t!==r&&!i.has(r)&&c.push([r,a])}Se(e,`H`,()=>{let n=new Set([t]);for(let t=r.length-1;t>=0;--t){let[i,o,s]=r[t],c=!1;for(let e of o.d.keys())if(e!==i&&n.has(e)){c=!0;break}c&&(a(e,i),d(e,i,o),s!==o.n&&(Ce(e,i,o),n.add(i))),delete o.x}})},l=(t,r,...o)=>{let s=!0,u=e=>ve(a(t,e)),f=(n,...a)=>{let o=e(n);try{if(le(r,n)){if(!ue(n))throw Error(`atom not writable`);let e=o.n,r=a[0];i(n,o,r),d(t,n,o),e!==o.n&&(Ce(t,n,o),c(t,n,o));return}else return l(t,n,...a)}finally{s||Ee(t)}};try{return n(r,u,f,...o)}finally{s=!1}},u=(e,...t)=>{let n=xe();try{return l(n,e,...t)}finally{Ee(n)}},d=(t,n,r)=>{if(r.m&&!pe(r.v)){for(let i of r.d.keys())r.m.d.has(i)||(f(t,i,e(i)).t.add(n),r.m.d.add(i));for(let i of r.m.d||[])r.d.has(i)||(r.m.d.delete(i),p(t,i,e(i))?.t.delete(n))}},f=(t,n,i)=>{if(!i.m){a(t,n);for(let r of i.d.keys())f(t,r,e(r)).t.add(n);if(i.m={l:new Set,d:new Set(i.d.keys()),t:new Set},de(n)){let e=i.m,a,o=(e,t)=>{let r=!0;a=(...t)=>{try{return l(e,n,...t)}finally{r||Ee(e)}};try{return t()}finally{r=!1}};Se(t,`L`,()=>{let i=o(t,()=>r(n,(...e)=>a(...e)));i&&(e.u=e=>o(e,i))})}}return i.m},p=(t,n,r)=>{if(r.m&&!r.m.l.size&&!Array.from(r.m.t).some(t=>e(t).m?.d.has(n))){let i=r.m.u;i&&Se(t,`L`,()=>i(t)),delete r.m;for(let i of r.d.keys())p(t,i,e(i))?.t.delete(n);return}return r.m};return{get:o,set:u,sub:(t,n)=>{let r=xe(),i=e(t),a=f(r,t,i).l;return a.add(n),Ee(r),()=>{a.delete(n);let e=xe();p(e,t,i),Ee(e)}},unstable_derive:i=>De(...i(e,t,n,r))}},Oe=()=>{let e=new WeakMap;return De(t=>{let n=e.get(t);return n||(n={d:new Map,p:new Set,n:0},e.set(t,n)),n},(e,...t)=>e.read(...t),(e,...t)=>e.write(...t),(e,...t)=>e.onMount?.call(e,...t))},ke,Ae=()=>(ke||=Oe(),ke),je=(0,u.createContext)(void 0),Me=e=>{let t=(0,u.useContext)(je);return e?.store||t||Ae()},Ne=e=>typeof e?.then==`function`,Pe=e=>{e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t})},Fe=u.default.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(Pe(e),e)}),Ie=new WeakMap,Le=e=>{let t=Ie.get(e);return t||(t=new Promise((n,r)=>{let i=e,a=e=>t=>{i===e&&n(t)},o=e=>t=>{i===e&&r(t)},s=e=>{`onCancel`in e&&typeof e.onCancel==`function`&&e.onCancel(e=>{Ne(e)?(Ie.set(e,t),i=e,e.then(a(e),o(e)),s(e)):n(e)})};e.then(a(e),o(e)),s(e)}),Ie.set(e,t)),t};function Re(e,t){let n=Me(t),[[r,i,a],o]=(0,u.useReducer)(t=>{let r=n.get(e);return Object.is(t[0],r)&&t[1]===n&&t[2]===e?t:[r,n,e]},void 0,()=>[n.get(e),n,e]),s=r;(i!==n||a!==e)&&(o(),s=n.get(e));let c=t?.delay;return(0,u.useEffect)(()=>{let t=n.sub(e,()=>{if(typeof c==`number`){let t=n.get(e);Ne(t)&&Pe(Le(t)),setTimeout(o,c);return}o()});return o(),t},[n,e,c]),(0,u.useDebugValue)(s),Ne(s)?Fe(Le(s)):s}function ze(e,t){let n=Me(t);return(0,u.useCallback)((...t)=>n.set(e,...t),[n,e])}function Be(e,t){return[Re(e,t),ze(e,t)]}var Ve=new WeakMap;function He(e,t){let n=Me(t),r=Ue(n);for(let[i,a]of e)(!r.has(i)||t?.dangerouslyForceHydrate)&&(r.add(i),n.set(i,a))}var Ue=e=>{let t=Ve.get(e);return t||(t=new WeakSet,Ve.set(e,t)),t};function We(){return We=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},We.apply(this,arguments)}function Ge(){let e=(0,l.createContext)(null);function t({store:t,initialValues:n=[],children:r}){let i=(0,l.useRef)(t);return i.current||=Oe(),He(n,{store:i.current}),(0,d.jsx)(e.Provider,{value:i.current,children:r})}let n=t=>{let n=(0,l.useContext)(e);if(!n)throw Error(`Missing Provider from createIsolation`);return Me(We({store:n},t))};return{Provider:t,useStore:n,useAtom:(e,t)=>{let r=n();return Be(e,We({store:r},t))},useAtomValue:(e,t)=>{let r=n();return Re(e,We({store:r},t))},useSetAtom:(e,t)=>{let r=n();return ze(e,We({store:r},t))}}}var Ke={};process.env.NODE_ENV!==`production`&&(Ke.name=`unscoped`,Ke.toString=Ye);var{read:qe,write:Je}=A(null);function Ye(){return this.name}(0,l.createContext)({scope:void 0,baseStore:void 0});function Xe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ze(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Qe(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ze(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ze(e[t],null)}}}}function $e(...e){return u.useCallback(Qe(...e),e)}function et(e,t=[]){let n=[];function r(t,r){let i=u.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=u.useMemo(()=>o,Object.values(o));return(0,d.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=u.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>u.createContext(e));return function(n){let r=n?.[e]||t;return u.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,tt(i,...t)]}function tt(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var nt=u.forwardRef((e,t)=>{let{children:n,...r}=e,i=u.Children.toArray(n),a=i.find(at);if(a){let e=a.props.children,n=i.map(t=>t===a?u.Children.count(e)>1?u.Children.only(null):u.isValidElement(e)?e.props.children:null:t);return(0,d.jsx)(rt,{...r,ref:t,children:u.isValidElement(e)?u.cloneElement(e,void 0,n):null})}return(0,d.jsx)(rt,{...r,ref:t,children:n})});nt.displayName=`Slot`;var rt=u.forwardRef((e,t)=>{let{children:n,...r}=e;if(u.isValidElement(n)){let e=st(n),i=ot(r,n.props);return n.type!==u.Fragment&&(i.ref=t?Qe(t,e):e),u.cloneElement(n,i)}return u.Children.count(n)>1?u.Children.only(null):null});rt.displayName=`SlotClone`;var it=({children:e})=>(0,d.jsx)(d.Fragment,{children:e});function at(e){return u.isValidElement(e)&&e.type===it}function ot(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function st(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ct=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=u.forwardRef((e,n)=>{let{asChild:r,...i}=e,a=r?nt:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(a,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lt(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}function ut(e){let t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...e)=>t.current?.(...e),[])}function dt(e,t=globalThis?.document){let n=ut(e);u.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ft=`DismissableLayer`,pt=`dismissableLayer.update`,mt=`dismissableLayer.pointerDownOutside`,ht=`dismissableLayer.focusOutside`,gt,_t=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vt=u.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=u.useContext(_t),[f,p]=u.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=u.useState({}),g=$e(t,e=>p(e)),_=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(v),b=f?_.indexOf(f):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=xt(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!S||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},m),w=St(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},m);return dt(e=>{b===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},m),u.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(gt=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),Ct(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=gt)}},[f,m,n,l]),u.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),Ct())},[f,l]),u.useEffect(()=>{let e=()=>h({});return document.addEventListener(pt,e),()=>document.removeEventListener(pt,e)},[]),(0,d.jsx)(ct.div,{...c,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Xe(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Xe(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Xe(e.onPointerDownCapture,C.onPointerDownCapture)})});vt.displayName=ft;var yt=`DismissableLayerBranch`,bt=u.forwardRef((e,t)=>{let n=u.useContext(_t),r=u.useRef(null),i=$e(t,r);return u.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,d.jsx)(ct.div,{...e,ref:i})});bt.displayName=yt;function xt(e,t=globalThis?.document){let n=ut(e),r=u.useRef(!1),i=u.useRef(()=>{});return u.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){wt(mt,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function St(e,t=globalThis?.document){let n=ut(e),r=u.useRef(!1);return u.useEffect(()=>{let e=e=>{e.target&&!r.current&&wt(ht,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ct(){let e=new CustomEvent(pt);document.dispatchEvent(e)}function wt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?lt(i,a):i.dispatchEvent(a)}var Tt=0;function Et(){u.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Dt()),document.body.insertAdjacentElement(`beforeend`,e[1]??Dt()),Tt++,()=>{Tt===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Tt--}},[])}function Dt(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Ot=`focusScope.autoFocusOnMount`,kt=`focusScope.autoFocusOnUnmount`,At={bubbles:!1,cancelable:!0},jt=`FocusScope`,Mt=u.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=u.useState(null),l=ut(i),f=ut(a),p=u.useRef(null),m=$e(t,e=>c(e)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?p.current=t:zt(p.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||zt(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&zt(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),u.useEffect(()=>{if(s){Bt.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ot,At);s.addEventListener(Ot,l),s.dispatchEvent(t),t.defaultPrevented||(Nt(Ut(Ft(s)),{select:!0}),document.activeElement===e&&zt(s))}return()=>{s.removeEventListener(Ot,l),setTimeout(()=>{let t=new CustomEvent(kt,At);s.addEventListener(kt,f),s.dispatchEvent(t),t.defaultPrevented||zt(e??document.body,{select:!0}),s.removeEventListener(kt,f),Bt.remove(h)},0)}}},[s,l,f,h]);let g=u.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Pt(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&zt(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&zt(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,d.jsx)(ct.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})});Mt.displayName=jt;function Nt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(zt(r,{select:t}),document.activeElement!==n)return}function Pt(e){let t=Ft(e);return[It(t,e),It(t.reverse(),e)]}function Ft(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function It(e,t){for(let n of e)if(!Lt(n,{upTo:t}))return n}function Lt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Rt(e){return e instanceof HTMLInputElement&&`select`in e}function zt(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Rt(e)&&t&&e.select()}}var Bt=Vt();function Vt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ht(e,t),e.unshift(t)},remove(t){e=Ht(e,t),e[0]?.resume()}}}function Ht(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ut(e){return e.filter(e=>e.tagName!==`A`)}var Wt=globalThis?.document?u.useLayoutEffect:()=>{},Gt=u.useId||(()=>void 0),Kt=0;function qt(e){let[t,n]=u.useState(Gt());return Wt(()=>{e||n(e=>e??String(Kt++))},[e]),e||(t?`radix-${t}`:``)}var Jt=`Arrow`,Yt=u.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,d.jsx)(ct.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,d.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Yt.displayName=Jt;var Xt=Yt;function Zt(e){let[t,n]=u.useState(void 0);return Wt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Qt=`Popper`,[$t,en]=et(Qt),[tn,nn]=$t(Qt),rn=e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null);return(0,d.jsx)(tn,{scope:t,anchor:r,onAnchorChange:i,children:n})};rn.displayName=Qt;var an=`PopperAnchor`,on=u.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=nn(an,n),o=u.useRef(null),s=$e(t,o);return u.useEffect(()=>{a.onAnchorChange(r?.current||o.current)}),r?null:(0,d.jsx)(ct.div,{...i,ref:s})});on.displayName=an;var sn=`PopperContent`,[cn,ln]=$t(sn),un=u.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m=`partial`,hideWhenDetached:h=!1,updatePositionStrategy:g=`optimized`,onPlaced:_,...v}=e,y=nn(sn,n),[b,x]=u.useState(null),S=$e(t,e=>x(e)),[C,w]=u.useState(null),T=Zt(C),E=T?.width??0,D=T?.height??0,O=r+(a===`center`?``:`-`+a),k=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},ee=Array.isArray(f)?f:[f],te=ee.length>0,ne={padding:k,boundary:ee.filter(mn),altBoundary:te},{refs:re,floatingStyles:ie,placement:ae,isPositioned:oe,middlewareData:A}=c.c({strategy:`fixed`,placement:O,whileElementsMounted:(...e)=>c.l(...e,{animationFrame:g===`always`}),elements:{reference:y.anchor},middleware:[c.a({mainAxis:i+D,alignmentAxis:o}),l&&c.o({mainAxis:!0,crossAxis:!1,limiter:m===`partial`?c.i():void 0,...ne}),l&&c.n({...ne}),c.s({...ne,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),C&&c.t({element:C,padding:s}),hn({arrowWidth:E,arrowHeight:D}),h&&c.r({strategy:`referenceHidden`,...ne})]}),[se,ce]=gn(ae),le=ut(_);Wt(()=>{oe&&le?.()},[oe,le]);let ue=A.arrow?.x,de=A.arrow?.y,fe=A.arrow?.centerOffset!==0,[pe,me]=u.useState();return Wt(()=>{b&&me(window.getComputedStyle(b).zIndex)},[b]),(0,d.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:oe?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:pe,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(` `),...A.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(cn,{scope:n,placedSide:se,onArrowChange:w,arrowX:ue,arrowY:de,shouldHideArrow:fe,children:(0,d.jsx)(ct.div,{"data-side":se,"data-align":ce,...v,ref:S,style:{...v.style,animation:oe?void 0:`none`}})})})});un.displayName=sn;var dn=`PopperArrow`,fn={top:`bottom`,right:`left`,bottom:`top`,left:`right`},pn=u.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=ln(dn,n),a=fn[i.placedSide];return(0,d.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,d.jsx)(Xt,{...r,ref:t,style:{...r.style,display:`block`}})})});pn.displayName=dn;function mn(e){return e!==null}var hn=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=gn(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function gn(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var _n=rn,vn=on,yn=un,bn=pn,xn=`Portal`,Sn=u.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=u.useState(!1);Wt(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?f.default.createPortal((0,d.jsx)(ct.div,{...r,ref:t}),o):null});Sn.displayName=xn;function Cn(e,t){return u.useReducer((e,n)=>t[e][n]??e,e)}var wn=e=>{let{present:t,children:n}=e,r=Tn(t),i=typeof n==`function`?n({present:r.isPresent}):u.Children.only(n),a=$e(r.ref,Dn(i));return typeof n==`function`||r.isPresent?u.cloneElement(i,{ref:a}):null};wn.displayName=`Presence`;function Tn(e){let[t,n]=u.useState(),r=u.useRef({}),i=u.useRef(e),a=u.useRef(`none`),[o,s]=Cn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return u.useEffect(()=>{let e=En(r.current);a.current=o===`mounted`?e:`none`},[o]),Wt(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=En(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Wt(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=En(r.current).includes(a.animationName);if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=En(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:u.useCallback(e=>{e&&(r.current=getComputedStyle(e)),n(e)},[])}}function En(e){return e?.animationName||`none`}function Dn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function On({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=kn({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=ut(n);return[o,u.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function kn({defaultProp:e,onChange:t}){let n=u.useState(e),[r]=n,i=u.useRef(r),a=ut(t);return u.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var An=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},jn=new WeakMap,Mn=new WeakMap,Nn={},Pn=0,Fn=function(e){return e&&(e.host||Fn(e.parentNode))},In=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Fn(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ln=function(e,t,n,r){var i=In(t,Array.isArray(e)?e:[e]);Nn[n]||(Nn[n]=new WeakMap);var a=Nn[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(jn.get(e)||0)+1,l=(a.get(e)||0)+1;jn.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Mn.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Pn++,function(){o.forEach(function(e){var t=jn.get(e)-1,i=a.get(e)-1;jn.set(e,t),a.set(e,i),t||(Mn.has(e)||e.removeAttribute(r),Mn.delete(e)),i||e.removeAttribute(n)}),Pn--,Pn||(jn=new WeakMap,jn=new WeakMap,Mn=new WeakMap,Nn={})}},Rn=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||An(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ln(r,i,n,`aria-hidden`)):function(){return null}},zn=function(){return zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zn.apply(this,arguments)};function Bn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Vn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Hn=`right-scroll-bar-position`,Un=`width-before-scroll-bar`,Wn=`with-scroll-bars-hidden`,Gn=`--removed-body-scroll-bar-size`;function Kn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function qn(e,t){var n=(0,l.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Jn=typeof window<`u`?l.useLayoutEffect:l.useEffect,Yn=new WeakMap;function Xn(e,t){var n=qn(t||null,function(t){return e.forEach(function(e){return Kn(e,t)})});return Jn(function(){var t=Yn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Kn(e,null)}),i.forEach(function(e){r.has(e)||Kn(e,a)})}Yn.set(n,e)},[e]),n}function Zn(e){return e}function Qn(e,t){t===void 0&&(t=Zn);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function $n(e){e===void 0&&(e={});var t=Qn(null);return t.options=zn({async:!0,ssr:!1},e),t}var er=function(e){var t=e.sideCar,n=Bn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return l.createElement(r,zn({},n))};er.isSideCarExport=!0;function tr(e,t){return e.useMedium(t),er}var nr=$n(),rr=function(){},ir=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:rr,onWheelCapture:rr,onTouchMoveCapture:rr}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Bn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Xn([n,t]),w=zn(zn({},x),i);return l.createElement(l.Fragment,null,d&&l.createElement(S,{sideCar:nr,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?l.cloneElement(l.Children.only(s),zn(zn({},w),{ref:C})):l.createElement(y,zn({},w,{className:c,ref:C}),s))});ir.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ir.classNames={fullWidth:Un,zeroRight:Hn};var ar,or=function(){if(ar)return ar;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function sr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=or();return t&&e.setAttribute(`nonce`,t),e}function cr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lr(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ur=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sr())&&(cr(t,n),lr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dr=function(){var e=ur();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fr=function(){var e=dr();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},pr={left:0,top:0,right:0,gap:0},mr=function(e){return parseInt(e||``,10)||0},hr=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[mr(n),mr(r),mr(i)]},gr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return pr;var t=hr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},_r=fr(),vr=`data-scroll-locked`,yr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
5
5
|
.${Wn} {
|
|
6
6
|
overflow: hidden ${r};
|
|
7
7
|
padding-right: ${s}px ${r};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const e=require("./Lexical.prod-C9Xekspf.cjs");function t(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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 n(e){let t=e;for(;t!=null;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function r(e){let t=e.parentNode;if(t==null)throw Error(`Should never happen`);return[t,Array.from(t.childNodes).indexOf(e)]}function i(t,i,a,o,s){let c=i.getKey(),l=o.getKey(),u=e.E(t.getRootElement()).createRange(),d=t.getElementByKey(c),f=t.getElementByKey(l),p=a,m=s;if(e.Jt(i)&&(d=n(d)),e.Jt(o)&&(f=n(f)),i===void 0||o===void 0||d===null||f===null)return null;d.nodeName===`BR`&&([d,p]=r(d)),f.nodeName===`BR`&&([f,m]=r(f));let h=d.firstChild;d===f&&h!=null&&h.nodeName===`BR`&&p===0&&m===0&&(m=1);try{u.setStart(d,p),u.setEnd(f,m)}catch{return null}return!u.collapsed||p===m&&c===l||(u.setStart(f,m),u.setEnd(d,p)),u}function a(e,t){let n=e.getRootElement();if(n===null)return[];let r=n.getBoundingClientRect(),i=getComputedStyle(n),a=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=Array.from(t.getClientRects()),s,c=o.length;o.sort((e,t)=>{let n=e.top-t.top;return Math.abs(n)<=3?e.left-t.left:n});for(let e=0;e<c;e++){let t=o[e],n=s&&s.top<=t.top&&s.top+s.height>t.top&&s.left+s.width>t.left,i=t.width+a===r.width;n||i?(o.splice(e--,1),c--):s=t}return o}function o(e){let t=``;for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function s(t){let n=e.s().getElementByKey(t.getKey());if(n===null)return null;let r=n.ownerDocument.defaultView;return r===null?null:r.getComputedStyle(n)}function c(t){return s(e.ri(t)?t:t.getParentOrThrow())}function l(e){let t=c(e);return t!==null&&t.direction===`rtl`}function u(t,n,r=`self`){let i=t.getStartEndPoints();if(n.isSelected(t)&&!e.L(n)&&i!==null){let[a,o]=i,s=t.isBackward(),c=a.getNode(),l=o.getNode(),u=n.is(c),d=n.is(l);if(u||d){let[i,a]=e.sn(t),o=c.is(l),u=n.is(s?l:c),d=n.is(s?c:l),f,p=0;o?(p=i>a?a:i,f=i>a?i:a):u?(p=s?a:i,f=void 0):d&&(p=0,f=s?i:a);let m=n.__text.slice(p,f);m!==n.__text&&(r===`clone`&&(n=e.r(n)),n.__text=m)}}return n}function d(n){if(n.type===`text`)return n.offset===n.getNode().getTextContentSize();let r=n.getNode();return e.vt(r)||t(177),n.offset===r.getChildrenSize()}function f(t,n,r){let i=n.getNode(),a=r;if(e.vt(i)){let e=i.getDescendantByIndex(n.offset);e!==null&&(i=e)}for(;a>0&&i!==null;){if(e.vt(i)){let e=i.getLastDescendant();e!==null&&(i=e)}let r=i.getPreviousSibling(),o=0;if(r===null){let e=i.getParentOrThrow(),t=e.getPreviousSibling();for(;t===null;){if(e=e.getParent(),e===null){r=null;break}t=e.getPreviousSibling()}e!==null&&(o=e.isInline()?0:2,r=t)}let s=i.getTextContent();s===``&&e.vt(i)&&!i.isInline()&&(s=`
|
|
2
|
+
|
|
3
|
+
`);let c=s.length;if(!e.Jt(i)||a>=c){let t=i.getParent();i.remove(),t==null||t.getChildrenSize()!==0||e.ri(t)||t.remove(),a-=c+o,i=r}else{let r=i.getKey(),o=t.read(`latest`,()=>{let t=e.Ht(r);return e.Jt(t)&&t.isSimpleText()?t.getTextContent():null}),l=c-a,u=s.slice(0,l);if(o!==null&&o!==s){let t=e.Y(),n=i;if(i.isSimpleText())i.setTextContent(o);else{let t=e.D(o);i.replace(t),n=t}if(e.bn(t)&&t.isCollapsed()){let e=t.anchor.offset;n.select(e,e)}}else if(i.isSimpleText()){let e=n.key===r,t=n.offset;t<a&&(t=c);let o=e?t-a:0,s=e?t:l;if(e&&o===0){let[e]=i.splitText(o,s);e.remove()}else{let[,e]=i.splitText(o,s);e.remove()}}else{let t=e.D(u);i.replace(t)}a=0}}}function p(n,r){(e.bn(n)?n.isCollapsed():e.Jt(n)||e.vt(n))||t(280);let i=e.ot(e.bn(n)?n.style:e.Jt(n)?n.getStyle():n.getTextStyle()),a=o(Object.entries(r).reduce((e,[t,r])=>(typeof r==`function`?e[t]=r(i[t],n):r===null?delete e[t]:e[t]=r,e),{...i}));e.bn(n)||e.Jt(n)?n.setStyle(a):n.setTextStyle(a)}function m(t,n){if(e.bn(t)&&t.isCollapsed()){p(t,n);let r=t.anchor.getNode();e.vt(r)&&r.isEmpty()&&p(r,n)}h(e=>{p(e,n)});let r=t.getNodes();if(r.length>0){let t=new Set;for(let i of r){if(!e.vt(i)||!i.canBeEmpty()||i.getChildrenSize()!==0)continue;let r=i.getKey();t.has(r)||(t.add(r),p(i,n))}}}function h(t){let n=e.tt();if(!n)return;let r=new Map,i=e=>r.get(e.getKey())||[0,e.getTextContentSize()];if(e.bn(n))for(let t of e.An(n).getTextSlices())t&&r.set(t.caret.origin.getKey(),t.getSliceIndices());let a=n.getNodes();for(let n of a){if(!e.Jt(n)||!n.canHaveFormat())continue;let[r,a]=i(n);a!==r&&(e.L(n)||r===0&&a===n.getTextContentSize()?t(n):t(n.splitText(r,a)[r===0?0:1]))}e.bn(n)&&n.anchor.type===`text`&&n.focus.type===`text`&&n.anchor.key===n.focus.key&&g(n)}function g(e){if(e.isBackward()){let{anchor:t,focus:n}=e,{key:r,offset:i,type:a}=t;t.set(n.key,n.offset,n.type),n.set(r,i,a)}}function _(e,t){let n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function v(t,n,r){let i=e.Gt(t,r);if(e.$n(i))return!1;for(;i;i=i.getParentCaret()){let e=i.getParentAtCaret();if(!e||i.getNodeAtCaret())return!1;if(n.is(e))return!0}return!1}function y(t,n,r=_){if(!t)return;let i=t.getStartEndPoints(),a=!1,o=null,s=new Map;if(i){let[n,r]=i,c=e.B(n.getNode(),e.Kr);o=e.B(r.getNode(),e.Kr);let l=t.isBackward()?`previous`:`next`;a=e.vt(o)&&!o.is(c)&&function(t,n,r){let i=t.getNode();return(!e.vt(i)||!i.isEmpty())&&v(t,n,r)}(r,o,e.Ot(l)),e.vt(c)&&s.set(c.getKey(),c),e.vt(o)&&!a&&s.set(o.getKey(),o)}for(let n of t.getNodes())if(e.vt(n)&&e.Kr(n)){if(a&&n.is(o))continue;s.set(n.getKey(),n)}else if(!i){let t=e.B(n,e.Kr);e.vt(t)&&s.set(t.getKey(),t)}for(let e of s.values()){let t=n();r(e,t),e.replace(t,!0)}}function b(e){let t=x(e);return t!==null&&t.writingMode===`vertical-rl`}function x(t){let n=t.anchor.getNode();return e.vt(n)?s(n):c(n)}function S(t,n){let r=b(t)?!n:n;w(t)&&(r=!r);let i=e.Gt(t.focus,r?`previous`:`next`);if(e.$n(i))return!1;if(e.mn(i)&&!e.On(i.origin)&&i.origin.isUnmergeable()){let t=i.getNodeAtCaret();if(e.Jt(t)&&!e.On(t))return!0}for(let t of e.Ft(i)){if(e._(t))return!t.origin.isInline();if(!e.vt(t.origin)){if(e.$(t.origin))return!0;break}}return!1}function C(e,t,n,r){e.modify(t?`extend`:`move`,n,r)}function w(e){let t=x(e);return t!==null&&t.direction===`rtl`}function T(e,t,n){let r=w(e),i;i=b(e)||r?!n:n,C(e,t,i,`character`)}function ee(t,n,r){let i=e.ot(t.getStyle());return i!==null&&i[n]||r}function E(t,n,r=``){let i=null,a=t.getNodes(),o,s;if(e.bn(t)){if(t.isCollapsed()&&t.style!==``){let r=e.ot(t.style);if(r!==null&&n in r)return r[n]}let{anchor:r,focus:i}=t,a=t.isBackward(),c=a?i.getNode():r.getNode(),l=a?r.getNode():i.getNode(),u=a?i.offset:r.offset,d=a?r.offset:i.offset;e.Jt(c)&&u===c.getTextContentSize()&&(o=c),d===0&&(s=l)}for(let t=0;t<a.length;t++){let c=a[t];if(e.Jt(c)&&!c.is(t===0?o:s)){let e=ee(c,n,r);if(i===null)i=e;else if(i!==e){i=``;break}}}return i===null?r:i}function D(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);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 O(e){let t=(e,t)=>t.left>=e.left-1&&t.top>=e.top-1&&t.right<=e.right+1&&t.bottom<=e.bottom+1,n=[];for(let r of Array.from(e))if(!(r.width<.5||r.height<.5||n.some(e=>t(r,e)))){for(let e=n.length-1;e>=0;e--)t(n[e],r)&&n.splice(e,1);n.push(r)}return n}function k(e){return`${e}px`}var A={attributes:!0,characterData:!0,childList:!0,subtree:!0};function j(t,n,r){let i=null,o=null,s=null,c=[],l=e.E(t.getRootElement()).createElement(`div`);function u(){i===null&&D(182),o===null&&D(183);let{left:s,top:u}=o.getBoundingClientRect(),d=O(a(t,n));var f,p;l.isConnected||(p=l,(f=o).insertBefore(p,f.firstChild));let m=!1;for(let t=0;t<d.length;t++){let n=d[t],r=c[t]||e.E(i).createElement(`div`),a=r.style;a.position!==`absolute`&&(a.position=`absolute`,m=!0);let o=k(n.left-s);a.left!==o&&(a.left=o,m=!0);let f=k(n.top-u);a.top!==f&&(r.style.top=f,m=!0);let p=k(n.width);a.width!==p&&(r.style.width=p,m=!0);let h=k(n.height);a.height!==h&&(r.style.height=h,m=!0),r.parentNode!==l&&(l.append(r),m=!0),c[t]=r}for(;c.length>d.length;)c.pop()?.remove();m&&r(c)}function d(){o=null,i=null,s!==null&&s.disconnect(),s=null,l.remove();for(let e of c)e.remove();c=[]}l.style.position=`relative`;let f=t.registerRootListener(function n(){let r=t.getRootElement();if(r===null)return d();let a=r.parentElement;if(!e.Sn(a))return d();d(),i=r,o=a,s=new MutationObserver(e=>{let r=t.getRootElement(),a=r&&r.parentElement;if(r!==i||a!==o)return n();for(let t of e)if(!l.contains(t.target))return u()}),s.observe(a,A),u()});return()=>{f(),d()}}function M(t,n,r,i){if(n.type!==`text`&&e.vt(r)){let a=e.Lr(r,i,t);return[a.element,a.getFirstChildOffset()+n.offset]}return[(e.Jt(r)?e.lt(r,i,t):e.ai(i))||i,n.offset]}function te(e){for(let t of e){let e=t.style;e.background!==`Highlight`&&(e.background=`Highlight`),e.color!==`HighlightText`&&(e.color=`HighlightText`),e.marginTop!==k(-1.5)&&(e.marginTop=k(-1.5)),e.paddingTop!==k(4)&&(e.paddingTop=k(4)),e.paddingBottom!==k(0)&&(e.paddingBottom=k(0))}}function ne(t,n=te){let r=null,i=null,a=null,o=null,s=null,c=null,l=()=>{};function u(u){u.read(()=>{let u=e.tt();if(!e.bn(u))return r=null,a=null,o=null,c=null,l(),void(l=()=>{});let[d,f]=function(e){let t=e.getStartEndPoints();return e.isBackward()?[t[1],t[0]]:t}(u),p=d.getNode(),m=p.getKey(),h=d.offset,g=f.getNode(),_=g.getKey(),v=f.offset,y=t.getElementByKey(m),b=t.getElementByKey(_),x=r===null||y!==i||h!==a||m!==r.getKey(),S=o===null||b!==s||v!==c||_!==o.getKey();if((x||S)&&y!==null&&b!==null){let e=function(e,t,n,r,i,a,o){let s=(e._window?e._window.document:document).createRange();return s.setStart(...M(e,t,n,r)),s.setEnd(...M(e,i,a,o)),s}(t,d,p,y,f,g,b);l(),l=j(t,e,n)}r=p,i=y,a=h,o=g,s=b,c=v},{editor:t})}return u(t.getEditorState()),e.Yn(t.registerUpdateListener(({editorState:e})=>u(e)),()=>{l()})}function re(t,n){let r=null,i=()=>{let i=t.getRootElement(),a=i===null?null:i.ownerDocument.defaultView,o=a===null?null:a.getSelection(),s=o===null?null:e.Er(o,i).anchorNode;s!==null&&i!==null&&i.contains(s)?r!==null&&(r(),r=null):r===null&&(r=ne(t,n))};return t.registerRootListener(t=>{if(t){let n=t.ownerDocument,a=e.Yn(e.yt(n,`selectionchange`,i),()=>{r!==null&&r()});return i(),a}})}function N(t,n){let r=t.ownerDocument,i=r.defaultView||window,a=i.getComputedStyle(t),o=a.position===`absolute`,s=n?/(auto|scroll|hidden)/:/(auto|scroll)/;if(a.position===`fixed`)return r.body;for(let n=t;n=e.ut(n);)if(a=i.getComputedStyle(n),(!o||a.position!==`static`)&&s.test(a.overflow+a.overflowY+a.overflowX))return n;return r.body}function P(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function F(e,t){let n=e[Symbol.iterator]();return new Promise((e,r)=>{let i=[],a=()=>{let{done:o,value:s}=n.next();if(o)return e(i);let c=new FileReader;c.addEventListener(`error`,r),c.addEventListener(`load`,()=>{let e=c.result;typeof e==`string`&&i.push({file:s,result:e}),a()}),P(s,t)?c.readAsDataURL(s):a()};a()})}function I(e,t){return Array.from(L(e,t))}function L(e,t){return H(`next`,e,t)}function R(e,t){return Array.from(z(e,t))}function*z(t,n){for(let r of H(`next`,t,n)){yield r;let{node:t,depth:i}=r;if(e.Xt(t)&&!t.is(n))for(let n of e.or(t)){let r=e.lr(t,n);r!==null&&(yield*B(r,i+1))}}}function*B(t,n){yield{depth:n,node:t};let r=n+1;if(e.Xt(t))for(let n of e.or(t)){let i=e.lr(t,n);i!==null&&(yield*B(i,r))}if(e.vt(t))for(let e of t.getChildren())yield*B(e,r)}function V(t,n){let r=e.Mn(e.f(t,n));return r&&r[0]}function H(t,n,r){let i=e.Dr(),a=n||i,o=e.vt(a)?e.Z(a,t):e.f(a,t),s=U(a),c=r?e.ni(e.G(e.f(r,t)))||V(r,t):V(a,t),l=s;return e.z({hasNext:e=>e!==null,initial:o,map:e=>({depth:l,node:e.origin}),step:t=>{if(t.isSameNodeCaret(c))return null;e._(t)&&l++;let n=e.Mn(t);return!n||n[0].isSameNodeCaret(c)?null:(l+=n[1],n[0])}})}function U(t){let n=-1;for(let r=t;r!==null;r=r.getParent()??e.wt(r))n++;return n}function W(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function G(t){let n=e.B(t,t=>e.vt(t)&&!t.isInline());return e.vt(n)||D(4,t.__key),n}function K(e,t,n,r){let i=e=>e instanceof t;return e.registerNodeTransform(t,e=>{let t=(e=>{let t=e.getChildren();for(let e=0;e<t.length;e++){let n=t[e];if(i(n))return null}let n=e,r=e;for(;n!==null;)if(r=n,n=n.getParent(),i(n))return{child:r,parent:n};return null})(e);if(t!==null){let{child:i,parent:a}=t;if(i.is(e)){r(a,e);let t=i.getNextSiblings(),o=t.length;if(a.insertAfter(i),o!==0){let e=n(a);i.insertAfter(e);for(let n=0;n<o;n++)e.append(t[n])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})}function q(t,n){let r=new Map,i=t._pendingEditorState;for(let[t,i]of n._nodeMap)r.set(t,e.rt(i));i&&(i._nodeMap=r),e.an();let a=n._selection;e.En(a===null?null:a.clone())}function J(t){let n=e.tt()||e.Y(),r;if(e.bn(n))r=e.Gt(n.focus,`next`);else{if(n!=null){let t=n.getNodes(),i=t[t.length-1];i&&(r=e.f(i,`next`))}r||=e.Z(e.Dr(),`previous`).getFlipped().insert(e.Ar())}let i=e.cn(t,r),a=e.ni(i);return e.en(e.t(e._(a)?e.wr(a):i)),t.getLatest()}function ie(e,t){let n=t();return e.replace(n),n.append(e),n}function Y(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function ae(e){let t=null;if(Y(e,DragEvent)?t=e.dataTransfer:Y(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];let n=t.types,r=n.includes(`Files`),i=n.includes(`text/html`)||n.includes(`text/plain`);return[r,Array.from(t.files),i]}function oe(t){let n=e.tt();if(!e.bn(n))return!1;let r=new Set,i=n.getNodes();for(let n=0;n<i.length;n++){let a=i[n],o=a.getKey();if(r.has(o))continue;let s=e.B(a,t=>e.vt(t)&&!t.isInline());if(s===null)continue;let c=s.getKey();s.canIndent()&&!r.has(c)&&(r.add(c),t(s))}return r.size>0}function se(t,n){e.Z(t,`next`).insert(n)}var X=!(e.Vn||!e.ar)&&void 0;function ce(t,n=!1){let r=1;if(function(){if(X===void 0){let e=document.createElement(`div`);e.style.position=`absolute`,e.style.opacity=`0`,e.style.width=`100px`,e.style.left=`-1000px`,document.body.appendChild(e);let t=e.getBoundingClientRect();e.style.setProperty(`zoom`,`2`),X=e.getBoundingClientRect().width===t.width,document.body.removeChild(e)}return X}()||n){let n=t&&t.ownerDocument.defaultView||window;for(;t;)r*=Number(n.getComputedStyle(t).getPropertyValue(`zoom`)),t=e.ut(t)}return r}function Z(e){return e._parentEditor!==null}function le(e,t){return Q(e,t,null)}function Q(t,n,r){let i=!1;for(let a of $(t))n(a)?r!==null&&r(a):(i=!0,e.vt(a)&&Q(a,n,r||(e=>a.insertAfter(e))),a.remove());return i}function ue(t,n){let r=[],i=Array.from(t).reverse();for(let t=i.pop();t!==void 0;t=i.pop())if(n(t))r.push(t);else if(e.vt(t))for(let e of $(t))i.push(e);return r}function $(t){return de(e.Z(t,`previous`))}function de(t){return e.z({hasNext:e.Hr,initial:t.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}function fe(t){e.cr(e.f(t,`next`)).splice(1,t.getChildren())}function pe(t,n){let r=e.tt();if(e.bn(r)&&r.isCollapsed()){let i=e.B(r.anchor.getNode(),t);if(i){let t=i.getParent();if(t!==null&&t.getFirstChild()===i&&he(r.anchor,i))return i.insertBefore(e.Ar()).selectEnd(),n&&n.preventDefault(),!0}}return!1}function me(t,n){let r=e.tt();if(e.bn(r)&&r.isCollapsed()){let i=e.B(r.anchor.getNode(),t);if(i){let t=i.getParent();if(t!==null&&t.getLastChild()===i&&ge(r.anchor,i))return i.insertAfter(e.Ar()).selectEnd(),n&&n.preventDefault(),!0}}return!1}function he(e,t){return v(e,t,`previous`)}function ge(e,t){return v(e,t,`next`)}Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return Z}});
|