Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
chore(md): bump lexical version (#4308)
Seamusb25bb2966ad8
diff --git a/js/app/package.json b/js/app/package.jsonindex ea5913779b..86daa3b317 100644--- a/js/app/package.json+++ b/js/app/package.json@@ -1,149 +1,149 @@{- "name": "@coparse/monorepo",- "private": true,- "type": "module",- "scripts": {- "dev": "cd packages/app && bun run --bun dev",- "build": "cd packages/app && MODE=development NODE_ENV=production bun run --bun build",- "test": "bunx vitest run",- "local:e2e": "LOCAL_E2E=true bunx playwright test",- "local:e2e:ui": "LOCAL_E2E=true bunx playwright test --ui",- "gen-api": "bun scripts/generate-api-schema.ts",- "gen-tools": "bun scripts/generate-dcs-tools.ts",- "type-check": "tsc --noEmit --skipLibCheck --project packages/app/tsconfig.json",- "check": "bun type-check && bun biome check",- "preview": "cd packages/app && bun run --bun preview:dev",- "lint": "bunx --bun biome lint --skip=suspicious/noImportCycles",- "format": "bunx --bun biome format --write",- "fix": "bunx --bun biome lint --write",- "clean": "bun scripts/clean-env.js",- "knip": "bunx --bun knip"- },- "dependencies": {- "@aws-crypto/sha256-js": "^5.2.0",- "@codemirror/lang-cpp": "^6.0.3",- "@codemirror/lang-css": "^6.3.1",- "@codemirror/lang-html": "^6.4.9",- "@codemirror/lang-javascript": "^6.2.4",- "@codemirror/lang-json": "^6.0.2",- "@codemirror/lang-python": "^6.2.1",- "@codemirror/lang-rust": "^6.0.2",- "@codemirror/language": "^6.11.3",- "@corvu/dialog": "^0.2.4",- "@corvu/drawer": "^0.2.4",- "@date-fns/tz": "^1.4.1",- "@floating-ui/dom": "^1.7.4",- "@fontsource-variable/inter": "^5.2.8",- "@fontsource-variable/playfair-display": "^5.2.8",- "@fontsource-variable/roboto-mono": "^5.2.8",- "@inkibra/tauri-plugins": "git+https://github.com/macro-inc/tauri-plugins.git#26537c8a46bb8424f9cf4021d08aa76aa7cd66ef",- "@kobalte/core": "^0.13.11",- "@leeoniya/ufuzzy": "^1.0.19",- "@lexical/history": "^0.32.1",- "@lexical/html": "^0.32.1",- "@lexical/link": "^0.32.1",- "@lexical/list": "^0.32.1",- "@lexical/mark": "^0.32.1",- "@lexical/markdown": "^0.32.1",- "@lexical/plain-text": "^0.32.1",- "@lexical/rich-text": "^0.32.1",- "@lexical/selection": "^0.32.1",- "@lexical/table": "^0.32.1",- "@lexical/utils": "^0.32.1",- "@livekit/krisp-noise-filter": "^0.4.1",- "@livekit/track-processors": "^0.7.2",- "@lukemorales/query-key-factory": "^1.3.4",- "@normy/query-core": "^0.21.0",- "@phosphor-icons/core": "^2.1.1",- "@solid-primitives/broadcast-channel": "^0.1.1",- "@solid-primitives/context": "^0.3.2",- "@solid-primitives/event-bus": "^1.1.2",- "@solid-primitives/lifecycle": "^0.1.2",- "@solid-primitives/memo": "^1.4.5",- "@solid-primitives/platform": "^0.2.1",- "@solid-primitives/promise": "^1.1.2",- "@solid-primitives/resize-observer": "^2.1.3",- "@solid-primitives/rootless": "^1.5.2",- "@solid-primitives/scheduled": "^1.5.2",- "@solid-primitives/storage": "^4.3.3",- "@solidjs/router": "^0.15.3",- "@tailwindcss/vite": "^4.2.4",- "@tanstack/pacer": "^0.17.3",- "@tanstack/solid-query": "5.90.3",- "@tanstack/solid-virtual": "^3.13.13",- "@tauri-apps/api": "^2.8.0",- "@tauri-apps/plugin-haptics": "~2",- "@tauri-apps/plugin-http": "~2.5.8",- "@tauri-apps/plugin-notification": "~2",- "@tauri-apps/plugin-os": "~2",- "@tauri-apps/plugin-websocket": "~2",- "@thisbeyond/solid-dnd": "^0.7.5",- "@vitest/ui": "^4.0.17",- "@zoompinch/core": "^0.0.38",- "async-mutex": "^0.5.0",- "codemirror": "^6.0.2",- "colorjs.io": "^0.5.2",- "date-fns": "^4.1.0",- "detect-browser": "^5.3.0",- "email-validator": "^2.0.4",- "emojilib": "^4.0.2",- "fuse.js": "^7.1.0",- "katex": "^0.16.22",- "lexical": "^0.32.1",- "libheif-js": "^1.19.8",- "linkify-it": "^5.0.0",- "livekit-client": "^2.18.0",- "loro-crdt": "1.13.3",- "nanoid": "^3.3.7",- "neverthrow": "^8.2.0",- "posthog-js": "^1.387.0",- "short-uuid": "^5.2.0",- "signature_pad": "^5.0.10",- "solid-gesture": "^0.0.3",- "solid-js": "^1.9.7",- "solid-transition-group": "^0.2.3",- "tab-election": "^4.2.8",- "tabbable": "^6.2.0",- "tailwind-merge": "^3.4.0",- "tailwindcss": "^4.2.4",- "tauri-plugin-safe-area-insets": "^0.1.0",- "ts-pattern": "^5.9.0",- "unicode-emoji-json": "^0.8.0",- "uuid": "^10.0.0",- "virtua": "0.48.8",- "vite-plugin-wasm": "^3.5.0",- "zod": "^4.3.6"- },- "devDependencies": {- "@apidevtools/json-schema-ref-parser": "^15.3.5",- "@biomejs/biome": "2.4.12",- "@playwright/test": "^1.55.1",- "@solidjs/meta": "^0.29.4",- "@solidjs/testing-library": "^0.8.10",- "@testing-library/user-event": "^14.6.1",- "@types/facebook-pixel": "^0.0.31",- "@types/gtag.js": "^0.0.20",- "@types/linkify-it": "^5.0.0",- "@types/lodash": "^4.17.20",- "@types/node": "^24.8.0",- "@types/uuid": "^10.0.0",- "@types/wicg-file-system-access": "^2020.9.5",- "@types/ws": "^8.5.14",- "bebop": "3.1.3",- "bebop-tools": "3.1.3",- "concurrently": "^9.2.1",- "json-refs": "^3.0.15",- "json-schema-to-typescript": "^15.0.4",- "json-schema-to-zod": "2.6.1",- "knip": "^6.0.4",- "lightningcss": "^1.30.2",- "openai": "^6.25.0",- "orval": "^7.21.0",- "typescript": "^5.9.3",- "vite": "^6.4.1",- "vite-plugin-solid": "^2.11.8",- "vite-plugin-solid-svg": "^0.8.1",- "vite-tsconfig-paths": "^5.1.4",- "vitest": "^3.2.4"- }+ "name": "@coparse/monorepo",+ "private": true,+ "type": "module",+ "scripts": {+ "dev": "cd packages/app && bun run --bun dev",+ "build": "cd packages/app && MODE=development NODE_ENV=production bun run --bun build",+ "test": "bunx vitest run",+ "local:e2e": "LOCAL_E2E=true bunx playwright test",+ "local:e2e:ui": "LOCAL_E2E=true bunx playwright test --ui",+ "gen-api": "bun scripts/generate-api-schema.ts",+ "gen-tools": "bun scripts/generate-dcs-tools.ts",+ "type-check": "tsc --noEmit --skipLibCheck --project packages/app/tsconfig.json",+ "check": "bun type-check && bun biome check",+ "preview": "cd packages/app && bun run --bun preview:dev",+ "lint": "bunx --bun biome lint --skip=suspicious/noImportCycles",+ "format": "bunx --bun biome format --write",+ "fix": "bunx --bun biome lint --write",+ "clean": "bun scripts/clean-env.js",+ "knip": "bunx --bun knip"+ },+ "dependencies": {+ "@aws-crypto/sha256-js": "^5.2.0",+ "@codemirror/lang-cpp": "^6.0.3",+ "@codemirror/lang-css": "^6.3.1",+ "@codemirror/lang-html": "^6.4.9",+ "@codemirror/lang-javascript": "^6.2.4",+ "@codemirror/lang-json": "^6.0.2",+ "@codemirror/lang-python": "^6.2.1",+ "@codemirror/lang-rust": "^6.0.2",+ "@codemirror/language": "^6.11.3",+ "@corvu/dialog": "^0.2.4",+ "@corvu/drawer": "^0.2.4",+ "@date-fns/tz": "^1.4.1",+ "@floating-ui/dom": "^1.7.4",+ "@fontsource-variable/inter": "^5.2.8",+ "@fontsource-variable/playfair-display": "^5.2.8",+ "@fontsource-variable/roboto-mono": "^5.2.8",+ "@inkibra/tauri-plugins": "git+https://github.com/macro-inc/tauri-plugins.git#26537c8a46bb8424f9cf4021d08aa76aa7cd66ef",+ "@kobalte/core": "^0.13.11",+ "@leeoniya/ufuzzy": "^1.0.19",+ "@lexical/history": "0.45.0",+ "@lexical/html": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/plain-text": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/selection": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/utils": "0.45.0",+ "@livekit/krisp-noise-filter": "^0.4.1",+ "@livekit/track-processors": "^0.7.2",+ "@lukemorales/query-key-factory": "^1.3.4",+ "@normy/query-core": "^0.21.0",+ "@phosphor-icons/core": "^2.1.1",+ "@solid-primitives/broadcast-channel": "^0.1.1",+ "@solid-primitives/context": "^0.3.2",+ "@solid-primitives/event-bus": "^1.1.2",+ "@solid-primitives/lifecycle": "^0.1.2",+ "@solid-primitives/memo": "^1.4.5",+ "@solid-primitives/platform": "^0.2.1",+ "@solid-primitives/promise": "^1.1.2",+ "@solid-primitives/resize-observer": "^2.1.3",+ "@solid-primitives/rootless": "^1.5.2",+ "@solid-primitives/scheduled": "^1.5.2",+ "@solid-primitives/storage": "^4.3.3",+ "@solidjs/router": "^0.15.3",+ "@tailwindcss/vite": "^4.2.4",+ "@tanstack/pacer": "^0.17.3",+ "@tanstack/solid-query": "5.90.3",+ "@tanstack/solid-virtual": "^3.13.13",+ "@tauri-apps/api": "^2.8.0",+ "@tauri-apps/plugin-haptics": "~2",+ "@tauri-apps/plugin-http": "~2.5.8",+ "@tauri-apps/plugin-notification": "~2",+ "@tauri-apps/plugin-os": "~2",+ "@tauri-apps/plugin-websocket": "~2",+ "@thisbeyond/solid-dnd": "^0.7.5",+ "@vitest/ui": "^4.0.17",+ "@zoompinch/core": "^0.0.38",+ "async-mutex": "^0.5.0",+ "codemirror": "^6.0.2",+ "colorjs.io": "^0.5.2",+ "date-fns": "^4.1.0",+ "detect-browser": "^5.3.0",+ "email-validator": "^2.0.4",+ "emojilib": "^4.0.2",+ "fuse.js": "^7.1.0",+ "katex": "^0.16.22",+ "lexical": "0.45.0",+ "libheif-js": "^1.19.8",+ "linkify-it": "^5.0.0",+ "livekit-client": "^2.18.0",+ "loro-crdt": "1.13.3",+ "nanoid": "^3.3.7",+ "neverthrow": "^8.2.0",+ "posthog-js": "^1.387.0",+ "short-uuid": "^5.2.0",+ "signature_pad": "^5.0.10",+ "solid-gesture": "^0.0.3",+ "solid-js": "^1.9.7",+ "solid-transition-group": "^0.2.3",+ "tab-election": "^4.2.8",+ "tabbable": "^6.2.0",+ "tailwind-merge": "^3.4.0",+ "tailwindcss": "^4.2.4",+ "tauri-plugin-safe-area-insets": "^0.1.0",+ "ts-pattern": "^5.9.0",+ "unicode-emoji-json": "^0.8.0",+ "uuid": "^10.0.0",+ "virtua": "0.48.8",+ "vite-plugin-wasm": "^3.5.0",+ "zod": "^4.3.6"+ },+ "devDependencies": {+ "@apidevtools/json-schema-ref-parser": "^15.3.5",+ "@biomejs/biome": "2.4.12",+ "@playwright/test": "^1.55.1",+ "@solidjs/meta": "^0.29.4",+ "@solidjs/testing-library": "^0.8.10",+ "@testing-library/user-event": "^14.6.1",+ "@types/facebook-pixel": "^0.0.31",+ "@types/gtag.js": "^0.0.20",+ "@types/linkify-it": "^5.0.0",+ "@types/lodash": "^4.17.20",+ "@types/node": "^24.8.0",+ "@types/uuid": "^10.0.0",+ "@types/wicg-file-system-access": "^2020.9.5",+ "@types/ws": "^8.5.14",+ "bebop": "3.1.3",+ "bebop-tools": "3.1.3",+ "concurrently": "^9.2.1",+ "json-refs": "^3.0.15",+ "json-schema-to-typescript": "^15.0.4",+ "json-schema-to-zod": "2.6.1",+ "knip": "^6.0.4",+ "lightningcss": "^1.30.2",+ "openai": "^6.25.0",+ "orval": "^7.21.0",+ "typescript": "^5.9.3",+ "vite": "^6.4.1",+ "vite-plugin-solid": "^2.11.8",+ "vite-plugin-solid-svg": "^0.8.1",+ "vite-tsconfig-paths": "^5.1.4",+ "vitest": "^3.2.4"+ }}diff --git a/js/app/patches/@lexical%[email protected] b/js/app/patches/@lexical%[email protected]deleted file mode 100644index d6f551d02e..0000000000--- a/js/app/patches/@lexical%[email protected]+++ /dev/null@@ -1,46 +0,0 @@-diff --git a/LexicalMarkdown.dev.js b/LexicalMarkdown.dev.js-index 2f8fbeaf73d2cb7c84d236c811bc123f1a416c06..4f684e9bb25869a85f079ac1810a1743a71934f5 100644---- a/LexicalMarkdown.dev.js-+++ b/LexicalMarkdown.dev.js-@@ -1072,7 +1072,7 @@ const createBlockNode = createNode => {-- // Amount of spaces that define indentation level- // TODO: should be an option--const LIST_INDENT_SIZE = 4;-+const LIST_INDENT_SIZE = 2;- function getIndent(whitespaces) {- const tabs = whitespaces.match(/\t/g);- const spaces = whitespaces.match(/ /g);-diff --git a/LexicalMarkdown.dev.mjs b/LexicalMarkdown.dev.mjs-index 176b6e1fd28061b070c7ecec3393e2b093f4b67e..212ab6e322764662ceb85db4e3cce05e902da185 100644---- a/LexicalMarkdown.dev.mjs-+++ b/LexicalMarkdown.dev.mjs-@@ -1070,7 +1070,7 @@ const createBlockNode = createNode => {-- // Amount of spaces that define indentation level- // TODO: should be an option--const LIST_INDENT_SIZE = 4;-+const LIST_INDENT_SIZE = 2;- function getIndent(whitespaces) {- const tabs = whitespaces.match(/\t/g);- const spaces = whitespaces.match(/ /g);-diff --git a/LexicalMarkdown.prod.js b/LexicalMarkdown.prod.js-index 2a2432671c07f374f196848593dc79cf74281606..043217b7eb5978f91712ad281d4466505366d063 100644---- a/LexicalMarkdown.prod.js-+++ b/LexicalMarkdown.prod.js-@@ -6,4 +6,4 @@- *- */---"use strict";var e=require("lexical"),t=require("@lexical/list"),n=require("@lexical/rich-text"),o=require("@lexical/utils"),r=require("@lexical/code"),i=require("@lexical/link");function s(e,t){const n={};for(const o of e){const e=t(o);e&&(n[e]?n[e].push(o):n[e]=[o])}return n}function c(e){const t=s(e,(e=>e.type));return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const l=/[!-/:-@[-`{-~\s]/,a=/^\s{0,3}$/;function f(t){if(!e.$isParagraphNode(t))return!1;const n=t.getFirstChild();return null==n||1===t.getChildrenSize()&&e.$isTextNode(n)&&a.test(n.getTextContent())}function d(t,n,o,r){for(const e of n){if(!e.export)continue;const n=e.export(t,(e=>u(e,o,r)));if(null!=n)return n}return e.$isElementNode(t)?u(t,o,r):e.$isDecoratorNode(t)?t.getTextContent():null}function u(t,n,o,r,i){const s=[],c=t.getChildren();r||(r=[]),i||(i=[]);e:for(const t of c){for(const e of o){if(!e.export)continue;const c=e.export(t,(e=>u(e,n,o,r,[...i,...r])),((e,t)=>g(e,t,n,r,i)));if(null!=c){s.push(c);continue e}}e.$isLineBreakNode(t)?s.push("\n"):e.$isTextNode(t)?s.push(g(t,t.getTextContent(),n,r,i)):e.$isElementNode(t)?s.push(u(t,n,o,r,i)):e.$isDecoratorNode(t)&&s.push(t.getTextContent())}return s.join("")}function g(e,t,n,o,r){let i=0===e.getFormat()?t:function(e){return e.replace(/^\s+|\s+$/g,(e=>[...e].map((e=>"&#"+e.codePointAt(0)+";")).join("")))}(t);e.hasFormat("code")||(i=i.replace(/([*_`~\\])/g,"\\$1"));let s="",c="",l="";const a=p(e,!0),f=p(e,!1),d=new Set;for(const t of n){const n=t.format[0],r=t.tag;x(e,n)&&!d.has(n)&&(d.add(n),x(a,n)&&o.find((e=>e.tag===r))||(o.push({format:n,tag:r}),s+=r))}for(let t=0;t<o.length;t++){const n=x(e,o[t].format),i=x(f,o[t].format);if(n&&i)continue;const s=[...o];for(;s.length>t;){const e=s.pop();r&&e&&r.find((t=>t.tag===e.tag))||(e&&"string"==typeof e.tag&&(n?i||(l+=e.tag):c+=e.tag),o.pop())}break}return i=s+i+l,c+i}function p(t,n){let o=n?t.getPreviousSibling():t.getNextSibling();if(!o){const e=t.getParentOrThrow();e.isInline()&&(o=n?e.getPreviousSibling():e.getNextSibling())}for(;o;){if(e.$isElementNode(o)){if(!o.isInline())break;const t=n?o.getLastDescendant():o.getFirstDescendant();if(e.$isTextNode(t))return t;o=n?o.getPreviousSibling():o.getNextSibling()}if(e.$isTextNode(o))return o;if(!e.$isElementNode(o))return null}return null}function x(t,n){return e.$isTextNode(t)&&t.hasFormat(n)}function h(e,t){const n=function(e,t){const n=e.match(t.openTagsRegExp);if(null==n)return null;for(const o of n){const n=o.replace(/^\s/,""),r=t.fullMatchRegExpByTag[n];if(null==r)continue;const i=e.match(r),s=t.transformersByTag[n];if(null!=i&&null!=s){if(!1!==s.intraword)return i;const{index:t=0}=i,n=e[t-1],o=e[t+i[0].length];if((!n||l.test(n))&&(!o||l.test(o)))return i}}return null}(e.getTextContent(),t);if(!n)return null;const o=n.index||0;return{endIndex:o+n[0].length,match:n,startIndex:o,transformer:t.transformersByTag[n[1]]}}function m(t){return e.$isTextNode(t)&&!t.hasFormat("code")}function $(e,t,n){let o=h(e,t),r=function(e,t){const n=e;let o,r,i,s;for(const e of t){if(!e.replace||!e.importRegExp)continue;const t=n.getTextContent().match(e.importRegExp);if(!t)continue;const c=t.index||0,l=e.getEndIndex?e.getEndIndex(n,t):c+t[0].length;!1!==l&&(void 0===o||void 0===r||c<o&&l>r)&&(o=c,r=l,i=e,s=t)}return void 0===o||void 0===r||void 0===i||void 0===s?null:{endIndex:r,match:s,startIndex:o,transformer:i}}(e,n);if(o&&r&&(o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex?r=null:o=null),o){const r=function(e,t,n,o,r){const i=e.getTextContent();let s,c,l;if(r[0]===i?s=e:0===t?[s,c]=e.splitText(n):[l,s,c]=e.splitText(t,n),s.setTextContent(r[2]),o)for(const e of o.format)s.hasFormat(e)||s.toggleFormat(e);return{nodeAfter:c,nodeBefore:l,transformedNode:s}}(e,o.startIndex,o.endIndex,o.transformer,o.match);m(r.nodeAfter)&&$(r.nodeAfter,t,n),m(r.nodeBefore)&&$(r.nodeBefore,t,n),m(r.transformedNode)&&$(r.transformedNode,t,n)}else if(r){const o=function(e,t,n,o,r){let i,s,c;return 0===t?[i,s]=e.splitText(n):[c,i,s]=e.splitText(t,n),o.replace?{nodeAfter:s,nodeBefore:c,transformedNode:o.replace(i,r)||void 0}:null}(e,r.startIndex,r.endIndex,r.transformer,r.match);if(!o)return;m(o.nodeAfter)&&$(o.nodeAfter,t,n),m(o.nodeBefore)&&$(o.nodeBefore,t,n),m(o.transformedNode)&&$(o.transformedNode,t,n)}const i=e.getTextContent().replace(/\\([*_`~\\])/g,"$1").replace(/&#(\d+);/g,((e,t)=>String.fromCodePoint(t)));e.setTextContent(i)}function N(t,n=!1){const o=c(t),r=function(e){const t={},n={},o=[],r="(?<![\\\\])";for(const r of e){const{tag:e}=r;t[e]=r;const i=e.replace(/(\*|\^|\+)/g,"\\$1");o.push(i),1===e.length?n[e]=new RegExp(`(?<![\\\\${i}])(${i})((\\\\${i})?.*?[^${i}\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?![\\\\${i}])`):n[e]=new RegExp(`(?<!\\\\)(${i})((\\\\${i})?.*?[^\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp(`${r}(${o.join("|")})`,"g"),transformersByTag:t}}(o.textFormat);return(t,i)=>{const s=t.split("\n"),c=s.length,l=i||e.$getRoot();l.clear();for(let e=0;e<c;e++){const t=s[e],[i,c]=T(s,e,o.multilineElement,l);i?e=c:E(t,l,o.element,r,o.textMatch,n)}const a=l.getChildren();for(const e of a)!n&&f(e)&&l.getChildrenSize()>1&&e.remove();null!==e.$getSelection()&&l.selectStart()}}function T(e,t,n,o){for(const r of n){const{handleImportAfterStartMatch:n,regExpEnd:i,regExpStart:s,replace:c}=r,l=e[t].match(s);if(!l)continue;if(n){const i=n({lines:e,rootNode:o,startLineIndex:t,startMatch:l,transformer:r});if(null===i)continue;if(i)return i}const a="object"==typeof i&&"regExp"in i?i.regExp:i,f=i&&"object"==typeof i&&"optional"in i?i.optional:!i;let d=t;const u=e.length;for(;d<u;){const n=a?e[d].match(a):null;if(!n&&(!f||f&&d<u-1)){d++;continue}if(n&&t===d&&n.index===l.index){d++;continue}const r=[];if(n&&t===d)r.push(e[t].slice(l[0].length,-n[0].length));else for(let o=t;o<=d;o++)if(o===t){const t=e[o].slice(l[0].length);r.push(t)}else if(o===d&&n){const t=e[o].slice(0,-n[0].length);r.push(t)}else r.push(e[o]);if(!1!==c(o,null,l,n,r,!0))return[!0,d];break}}return[!1,t]}function E(r,i,s,c,l,a){const f=e.$createTextNode(r),d=e.$createParagraphNode();d.append(f),i.append(d);for(const{regExp:e,replace:t}of s){const n=r.match(e);if(n&&(f.setTextContent(r.slice(n[0].length)),!1!==t(d,[f],n,!0)))break}if($(f,c,l),d.isAttached()&&r.length>0){const r=d.getPreviousSibling();if(!a&&(e.$isParagraphNode(r)||n.$isQuoteNode(r)||t.$isListNode(r))){let n=r;if(t.$isListNode(r)){const e=r.getLastDescendant();n=null==e?null:o.$findMatchingParent(e,t.$isListItemNode)}null!=n&&n.getTextContentSize()>0&&(n.splice(n.getChildrenSize(),0,[e.$createLineBreakNode(),...d.getChildren()]),d.remove())}}}function S(e,...t){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const e of t)o.append("v",e);throw n.search=o.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 C(e,t,n){const o=n.length;for(let r=t;r>=o;r--){const t=r-o;if(L(e,t,n,0,o)&&" "!==e[t+o])return t}return-1}function L(e,t,n,o,r){for(let i=0;i<r;i++)if(e[t+i]!==n[o+i])return!1;return!0}const R=/^(\s*)(\d{1,})\.\s/,I=/^(\s*)[-*+]\s/,y=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,v=/^(#{1,6})\s/,_=/^>\s/,b=/^[ \t]*```(\w+)?/,A=/[ \t]*```$/,F=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,O=/^(?:\|)(.+)(?:\|)\s?$/,k=/^(\| ?:?-*:? ?)+\|\s?$/,M=e=>(t,n,o,r)=>{const i=e(o);i.append(...n),t.replace(i),r||i.select(0,0)};const w=e=>(n,o,r,i)=>{const s=n.getPreviousSibling(),c=n.getNextSibling(),l=t.$createListItemNode("check"===e?"x"===r[3]:void 0);if(t.$isListNode(c)&&c.getListType()===e){const e=c.getFirstChild();null!==e?e.insertBefore(l):c.append(l),n.remove()}else if(t.$isListNode(s)&&s.getListType()===e)s.append(l),n.remove();else{const o=t.$createListNode(e,"number"===e?Number(r[2]):void 0);o.append(l),n.replace(o)}l.append(...o),i||l.select(0,0);const a=function(e){const t=e.match(/\t/g),n=e.match(/ /g);let o=0;return t&&(o+=t.length),n&&(o+=Math.floor(n.length/4)),o}(r[1]);a&&l.setIndent(a)},B=(e,n,o)=>{const r=[],i=e.getChildren();let s=0;for(const c of i)if(t.$isListItemNode(c)){if(1===c.getChildrenSize()){const e=c.getFirstChild();if(t.$isListNode(e)){r.push(B(e,n,o+1));continue}}const i=" ".repeat(4*o),l=e.getListType(),a="number"===l?`${e.getStart()+s}. `:"check"===l?`- [${c.getChecked()?"x":" "}] `:"- ";r.push(i+a+n(c)),s++}return r.join("\n")},D={dependencies:[n.HeadingNode],export:(e,t)=>{if(!n.$isHeadingNode(e))return null;const o=Number(e.getTag().slice(1));return"#".repeat(o)+" "+t(e)},regExp:v,replace:M((e=>{const t="h"+e[1].length;return n.$createHeadingNode(t)})),type:"element"},P={dependencies:[n.QuoteNode],export:(e,t)=>{if(!n.$isQuoteNode(e))return null;const o=t(e).split("\n"),r=[];for(const e of o)r.push("> "+e);return r.join("\n")},regExp:_,replace:(t,o,r,i)=>{if(i){const r=t.getPreviousSibling();if(n.$isQuoteNode(r))return r.splice(r.getChildrenSize(),0,[e.$createLineBreakNode(),...o]),void t.remove()}const s=n.$createQuoteNode();s.append(...o),t.replace(s),i||s.select(0,0)},type:"element"},H={dependencies:[r.CodeNode],export:e=>{if(!r.$isCodeNode(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?"\n"+t:"")+"\n```"},regExpEnd:{optional:!0,regExp:A},regExpStart:b,replace:(t,n,o,i,s,c)=>{let l,a;if(!n&&s){if(1===s.length)i?(l=r.$createCodeNode(),a=o[1]+s[0]):(l=r.$createCodeNode(o[1]),a=s[0].startsWith(" ")?s[0].slice(1):s[0]);else{if(l=r.$createCodeNode(o[1]),0===s[0].trim().length)for(;s.length>0&&!s[0].length;)s.shift();else s[0]=s[0].startsWith(" ")?s[0].slice(1):s[0];for(;s.length>0&&!s[s.length-1].length;)s.pop();a=s.join("\n")}const n=e.$createTextNode(a);l.append(n),t.append(l)}else n&&M((e=>r.$createCodeNode(e?e[1]:void 0)))(t,n,o,c)},type:"multiline-element"},U={dependencies:[t.ListNode,t.ListItemNode],export:(e,n)=>t.$isListNode(e)?B(e,n,0):null,regExp:I,replace:w("bullet"),type:"element"},j={dependencies:[t.ListNode,t.ListItemNode],export:(e,n)=>t.$isListNode(e)?B(e,n,0):null,regExp:y,replace:w("check"),type:"element"},q={dependencies:[t.ListNode,t.ListItemNode],export:(e,n)=>t.$isListNode(e)?B(e,n,0):null,regExp:R,replace:w("number"),type:"element"},z={format:["code"],tag:"`",type:"text-format"},G={format:["highlight"],tag:"==",type:"text-format"},Q={format:["bold","italic"],tag:"***",type:"text-format"},W={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},K={format:["bold"],tag:"**",type:"text-format"},X={format:["bold"],intraword:!1,tag:"__",type:"text-format"},J={format:["strikethrough"],tag:"~~",type:"text-format"},V={format:["italic"],tag:"*",type:"text-format"},Y={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Z={dependencies:[i.LinkNode],export:(e,t,n)=>{if(!i.$isLinkNode(e)||i.$isAutoLinkNode(e))return null;const o=e.getTitle(),r=t(e);return o?`[${r}](${e.getURL()} "${o}")`:`[${r}](${e.getURL()})`},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,n)=>{const[,o,r,s]=n,c=i.$createLinkNode(r,{title:s}),l=e.$createTextNode(o);return l.setFormat(t.getFormat()),c.append(l),t.replace(c),l},trigger:")",type:"text-match"};const ee=[D,P,U,q],te=[H],ne=[z,Q,W,K,X,G,V,Y,J],oe=[Z],re=[...ee,...te,...ne,...oe];exports.$convertFromMarkdownString=function(e,t=re,n,o=!1,r=!1){const i=o?e:function(e,t=!1){const n=e.split("\n");let o=!1;const r=[];for(let e=0;e<n.length;e++){const i=n[e],s=r[r.length-1];F.test(i)?r.push(i):b.test(i)||A.test(i)?(o=!o,r.push(i)):o||""===i||""===s||!s||v.test(s)||v.test(i)||_.test(i)||R.test(i)||I.test(i)||y.test(i)||O.test(i)||k.test(i)||!t?r.push(i):r[r.length-1]=s+i}return r.join("\n")}(e,r);return N(t,o)(i,n)},exports.$convertToMarkdownString=function(t=re,n,o=!1){return function(t,n=!1){const o=c(t),r=[...o.multilineElement,...o.element],i=!n,s=o.textFormat.filter((e=>1===e.format.length)).sort(((e,t)=>Number(e.format.includes("code"))-Number(t.format.includes("code"))));return t=>{const n=[],c=(t||e.$getRoot()).getChildren();for(let e=0;e<c.length;e++){const t=c[e],l=d(t,r,s,o.textMatch);null!=l&&n.push(i&&e>0&&!f(t)&&!f(c[e-1])?"\n".concat(l):l)}return n.join("\n")}}(t,o)(n)},exports.BOLD_ITALIC_STAR=Q,exports.BOLD_ITALIC_UNDERSCORE=W,exports.BOLD_STAR=K,exports.BOLD_UNDERSCORE=X,exports.CHECK_LIST=j,exports.CODE=H,exports.ELEMENT_TRANSFORMERS=ee,exports.HEADING=D,exports.HIGHLIGHT=G,exports.INLINE_CODE=z,exports.ITALIC_STAR=V,exports.ITALIC_UNDERSCORE=Y,exports.LINK=Z,exports.MULTILINE_ELEMENT_TRANSFORMERS=te,exports.ORDERED_LIST=q,exports.QUOTE=P,exports.STRIKETHROUGH=J,exports.TEXT_FORMAT_TRANSFORMERS=ne,exports.TEXT_MATCH_TRANSFORMERS=oe,exports.TRANSFORMERS=re,exports.UNORDERED_LIST=U,exports.registerMarkdownShortcuts=function(t,n=re){const o=c(n),i=s(o.textFormat,(({tag:e})=>e[e.length-1])),a=s(o.textMatch,(({trigger:e})=>e));for(const e of n){const n=e.type;if("element"===n||"text-match"===n||"multiline-element"===n){const n=e.dependencies;for(const e of n)t.hasNode(e)||S(173,e.getType())}}const f=(t,n,r)=>{(function(t,n,o,r){const i=t.getParent();if(!e.$isRootOrShadowRoot(i)||t.getFirstChild()!==n)return!1;const s=n.getTextContent();if(" "!==s[o-1])return!1;for(const{regExp:e,replace:i}of r){const r=s.match(e);if(r&&r[0].length===(r[0].endsWith(" ")?o:o-1)){const e=n.getNextSiblings(),[s,c]=n.splitText(o);if(!1!==i(t,c?[c,...e]:e,r,!1))return s.remove(),!0}}return!1})(t,n,r,o.element)||function(t,n,o,r){const i=t.getParent();if(!e.$isRootOrShadowRoot(i)||t.getFirstChild()!==n)return!1;const s=n.getTextContent();if(" "!==s[o-1])return!1;for(const{regExpStart:e,replace:i,regExpEnd:c}of r){if(c&&!("optional"in c)||c&&"optional"in c&&!c.optional)continue;const r=s.match(e);if(r&&r[0].length===(r[0].endsWith(" ")?o:o-1)){const e=n.getNextSiblings(),[s,c]=n.splitText(o);if(!1!==i(t,c?[c,...e]:e,r,null,null,!1))return s.remove(),!0}}return!1}(t,n,r,o.multilineElement)||function(e,t,n){let o=e.getTextContent();const r=n[o[t-1]];if(null==r)return!1;t<o.length&&(o=o.slice(0,t));for(const t of r){if(!t.replace||!t.regExp)continue;const n=o.match(t.regExp);if(null===n)continue;const r=n.index||0,i=r+n[0].length;let s;return 0===r?[s]=e.splitText(i):[,s]=e.splitText(r,i),s.selectNext(0,0),t.replace(s,n),!0}return!1}(n,r,a)||function(t,n,o){const r=t.getTextContent(),i=n-1,s=r[i],c=o[s];if(!c)return!1;for(const n of c){const{tag:o}=n,c=o.length,a=i-c+1;if(c>1&&!L(r,a,o,0,c))continue;if(" "===r[a-1])continue;const f=r[i+1];if(!1===n.intraword&&f&&!l.test(f))continue;const d=t;let u=d,g=C(r,a,o),p=u;for(;g<0&&(p=p.getPreviousSibling())&&!e.$isLineBreakNode(p);)if(e.$isTextNode(p)){if(p.hasFormat("code"))continue;const e=p.getTextContent();u=p,g=C(e,e.length,o)}if(g<0)continue;if(u===d&&g+c===a)continue;const x=u.getTextContent();if(g>0&&x[g-1]===s)continue;const h=x[g-1];if(!1===n.intraword&&h&&!l.test(h))continue;const m=d.getTextContent(),$=m.slice(0,a)+m.slice(i+1);d.setTextContent($);const N=u===d?$:x;u.setTextContent(N.slice(0,g)+N.slice(g+c));const T=e.$getSelection(),E=e.$createRangeSelection();e.$setSelection(E);const S=i-c*(u===d?2:1)+1;E.anchor.set(u.__key,g,"text"),E.focus.set(d.__key,S,"text");for(const e of n.format)E.hasFormat(e)||E.formatText(e);E.anchor.set(E.focus.key,E.focus.offset,E.focus.type);for(const e of n.format)E.hasFormat(e)&&E.toggleFormat(e);return e.$isRangeSelection(T)&&(E.format=T.format),!0}}(n,r,i)};return t.registerUpdateListener((({tags:n,dirtyLeaves:o,editorState:i,prevEditorState:s})=>{if(n.has(e.COLLABORATION_TAG)||n.has(e.HISTORIC_TAG))return;if(t.isComposing())return;const c=i.read(e.$getSelection),l=s.read(e.$getSelection);if(!e.$isRangeSelection(l)||!e.$isRangeSelection(c)||!c.isCollapsed()||c.is(l))return;const a=c.anchor.key,d=c.anchor.offset,u=i._nodeMap.get(a);!e.$isTextNode(u)||!o.has(a)||1!==d&&d>l.anchor.offset+1||t.update((()=>{if(!m(u))return;const e=u.getParent();null===e||r.$isCodeNode(e)||f(e,u,c.anchor.offset)}))}))};-+"use strict";var e=require("lexical"),t=require("@lexical/list"),n=require("@lexical/rich-text"),o=require("@lexical/utils"),r=require("@lexical/code"),i=require("@lexical/link");function s(e,t){const n={};for(const o of e){const e=t(o);e&&(n[e]?n[e].push(o):n[e]=[o])}return n}function c(e){const t=s(e,(e=>e.type));return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const l=/[!-/:-@[-`{-~\s]/,a=/^\s{0,3}$/;function f(t){if(!e.$isParagraphNode(t))return!1;const n=t.getFirstChild();return null==n||1===t.getChildrenSize()&&e.$isTextNode(n)&&a.test(n.getTextContent())}function d(t,n,o,r){for(const e of n){if(!e.export)continue;const n=e.export(t,(e=>u(e,o,r)));if(null!=n)return n}return e.$isElementNode(t)?u(t,o,r):e.$isDecoratorNode(t)?t.getTextContent():null}function u(t,n,o,r,i){const s=[],c=t.getChildren();r||(r=[]),i||(i=[]);e:for(const t of c){for(const e of o){if(!e.export)continue;const c=e.export(t,(e=>u(e,n,o,r,[...i,...r])),((e,t)=>g(e,t,n,r,i)));if(null!=c){s.push(c);continue e}}e.$isLineBreakNode(t)?s.push("\n"):e.$isTextNode(t)?s.push(g(t,t.getTextContent(),n,r,i)):e.$isElementNode(t)?s.push(u(t,n,o,r,i)):e.$isDecoratorNode(t)&&s.push(t.getTextContent())}return s.join("")}function g(e,t,n,o,r){let i=0===e.getFormat()?t:function(e){return e.replace(/^\s+|\s+$/g,(e=>[...e].map((e=>"&#"+e.codePointAt(0)+";")).join("")))}(t);e.hasFormat("code")||(i=i.replace(/([*_`~\\])/g,"\\$1"));let s="",c="",l="";const a=p(e,!0),f=p(e,!1),d=new Set;for(const t of n){const n=t.format[0],r=t.tag;x(e,n)&&!d.has(n)&&(d.add(n),x(a,n)&&o.find((e=>e.tag===r))||(o.push({format:n,tag:r}),s+=r))}for(let t=0;t<o.length;t++){const n=x(e,o[t].format),i=x(f,o[t].format);if(n&&i)continue;const s=[...o];for(;s.length>t;){const e=s.pop();r&&e&&r.find((t=>t.tag===e.tag))||(e&&"string"==typeof e.tag&&(n?i||(l+=e.tag):c+=e.tag),o.pop())}break}return i=s+i+l,c+i}function p(t,n){let o=n?t.getPreviousSibling():t.getNextSibling();if(!o){const e=t.getParentOrThrow();e.isInline()&&(o=n?e.getPreviousSibling():e.getNextSibling())}for(;o;){if(e.$isElementNode(o)){if(!o.isInline())break;const t=n?o.getLastDescendant():o.getFirstDescendant();if(e.$isTextNode(t))return t;o=n?o.getPreviousSibling():o.getNextSibling()}if(e.$isTextNode(o))return o;if(!e.$isElementNode(o))return null}return null}function x(t,n){return e.$isTextNode(t)&&t.hasFormat(n)}function h(e,t){const n=function(e,t){const n=e.match(t.openTagsRegExp);if(null==n)return null;for(const o of n){const n=o.replace(/^\s/,""),r=t.fullMatchRegExpByTag[n];if(null==r)continue;const i=e.match(r),s=t.transformersByTag[n];if(null!=i&&null!=s){if(!1!==s.intraword)return i;const{index:t=0}=i,n=e[t-1],o=e[t+i[0].length];if((!n||l.test(n))&&(!o||l.test(o)))return i}}return null}(e.getTextContent(),t);if(!n)return null;const o=n.index||0;return{endIndex:o+n[0].length,match:n,startIndex:o,transformer:t.transformersByTag[n[1]]}}function m(t){return e.$isTextNode(t)&&!t.hasFormat("code")}function $(e,t,n){let o=h(e,t),r=function(e,t){const n=e;let o,r,i,s;for(const e of t){if(!e.replace||!e.importRegExp)continue;const t=n.getTextContent().match(e.importRegExp);if(!t)continue;const c=t.index||0,l=e.getEndIndex?e.getEndIndex(n,t):c+t[0].length;!1!==l&&(void 0===o||void 0===r||c<o&&l>r)&&(o=c,r=l,i=e,s=t)}return void 0===o||void 0===r||void 0===i||void 0===s?null:{endIndex:r,match:s,startIndex:o,transformer:i}}(e,n);if(o&&r&&(o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex?r=null:o=null),o){const r=function(e,t,n,o,r){const i=e.getTextContent();let s,c,l;if(r[0]===i?s=e:0===t?[s,c]=e.splitText(n):[l,s,c]=e.splitText(t,n),s.setTextContent(r[2]),o)for(const e of o.format)s.hasFormat(e)||s.toggleFormat(e);return{nodeAfter:c,nodeBefore:l,transformedNode:s}}(e,o.startIndex,o.endIndex,o.transformer,o.match);m(r.nodeAfter)&&$(r.nodeAfter,t,n),m(r.nodeBefore)&&$(r.nodeBefore,t,n),m(r.transformedNode)&&$(r.transformedNode,t,n)}else if(r){const o=function(e,t,n,o,r){let i,s,c;return 0===t?[i,s]=e.splitText(n):[c,i,s]=e.splitText(t,n),o.replace?{nodeAfter:s,nodeBefore:c,transformedNode:o.replace(i,r)||void 0}:null}(e,r.startIndex,r.endIndex,r.transformer,r.match);if(!o)return;m(o.nodeAfter)&&$(o.nodeAfter,t,n),m(o.nodeBefore)&&$(o.nodeBefore,t,n),m(o.transformedNode)&&$(o.transformedNode,t,n)}const i=e.getTextContent().replace(/\\([*_`~\\])/g,"$1").replace(/&#(\d+);/g,((e,t)=>String.fromCodePoint(t)));e.setTextContent(i)}function N(t,n=!1){const o=c(t),r=function(e){const t={},n={},o=[],r="(?<![\\\\])";for(const r of e){const{tag:e}=r;t[e]=r;const i=e.replace(/(\*|\^|\+)/g,"\\$1");o.push(i),1===e.length?n[e]=new RegExp(`(?<![\\\\${i}])(${i})((\\\\${i})?.*?[^${i}\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?![\\\\${i}])`):n[e]=new RegExp(`(?<!\\\\)(${i})((\\\\${i})?.*?[^\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp(`${r}(${o.join("|")})`,"g"),transformersByTag:t}}(o.textFormat);return(t,i)=>{const s=t.split("\n"),c=s.length,l=i||e.$getRoot();l.clear();for(let e=0;e<c;e++){const t=s[e],[i,c]=T(s,e,o.multilineElement,l);i?e=c:E(t,l,o.element,r,o.textMatch,n)}const a=l.getChildren();for(const e of a)!n&&f(e)&&l.getChildrenSize()>1&&e.remove();null!==e.$getSelection()&&l.selectStart()}}function T(e,t,n,o){for(const r of n){const{handleImportAfterStartMatch:n,regExpEnd:i,regExpStart:s,replace:c}=r,l=e[t].match(s);if(!l)continue;if(n){const i=n({lines:e,rootNode:o,startLineIndex:t,startMatch:l,transformer:r});if(null===i)continue;if(i)return i}const a="object"==typeof i&&"regExp"in i?i.regExp:i,f=i&&"object"==typeof i&&"optional"in i?i.optional:!i;let d=t;const u=e.length;for(;d<u;){const n=a?e[d].match(a):null;if(!n&&(!f||f&&d<u-1)){d++;continue}if(n&&t===d&&n.index===l.index){d++;continue}const r=[];if(n&&t===d)r.push(e[t].slice(l[0].length,-n[0].length));else for(let o=t;o<=d;o++)if(o===t){const t=e[o].slice(l[0].length);r.push(t)}else if(o===d&&n){const t=e[o].slice(0,-n[0].length);r.push(t)}else r.push(e[o]);if(!1!==c(o,null,l,n,r,!0))return[!0,d];break}}return[!1,t]}function E(r,i,s,c,l,a){const f=e.$createTextNode(r),d=e.$createParagraphNode();d.append(f),i.append(d);for(const{regExp:e,replace:t}of s){const n=r.match(e);if(n&&(f.setTextContent(r.slice(n[0].length)),!1!==t(d,[f],n,!0)))break}if($(f,c,l),d.isAttached()&&r.length>0){const r=d.getPreviousSibling();if(!a&&(e.$isParagraphNode(r)||n.$isQuoteNode(r)||t.$isListNode(r))){let n=r;if(t.$isListNode(r)){const e=r.getLastDescendant();n=null==e?null:o.$findMatchingParent(e,t.$isListItemNode)}null!=n&&n.getTextContentSize()>0&&(n.splice(n.getChildrenSize(),0,[e.$createLineBreakNode(),...d.getChildren()]),d.remove())}}}function S(e,...t){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const e of t)o.append("v",e);throw n.search=o.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 C(e,t,n){const o=n.length;for(let r=t;r>=o;r--){const t=r-o;if(L(e,t,n,0,o)&&" "!==e[t+o])return t}return-1}function L(e,t,n,o,r){for(let i=0;i<r;i++)if(e[t+i]!==n[o+i])return!1;return!0}const R=/^(\s*)(\d{1,})\.\s/,I=/^(\s*)[-*+]\s/,y=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,v=/^(#{1,6})\s/,_=/^>\s/,b=/^[ \t]*```(\w+)?/,A=/[ \t]*```$/,F=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,O=/^(?:\|)(.+)(?:\|)\s?$/,k=/^(\| ?:?-*:? ?)+\|\s?$/,M=e=>(t,n,o,r)=>{const i=e(o);i.append(...n),t.replace(i),r||i.select(0,0)};const w=e=>(n,o,r,i)=>{const s=n.getPreviousSibling(),c=n.getNextSibling(),l=t.$createListItemNode("check"===e?"x"===r[3]:void 0);if(t.$isListNode(c)&&c.getListType()===e){const e=c.getFirstChild();null!==e?e.insertBefore(l):c.append(l),n.remove()}else if(t.$isListNode(s)&&s.getListType()===e)s.append(l),n.remove();else{const o=t.$createListNode(e,"number"===e?Number(r[2]):void 0);o.append(l),n.replace(o)}l.append(...o),i||l.select(0,0);const a=function(e){const t=e.match(/\t/g),n=e.match(/ /g);let o=0;return t&&(o+=t.length),n&&(o+=Math.floor(n.length/2)),o}(r[1]);a&&l.setIndent(a)},B=(e,n,o)=>{const r=[],i=e.getChildren();let s=0;for(const c of i)if(t.$isListItemNode(c)){if(1===c.getChildrenSize()){const e=c.getFirstChild();if(t.$isListNode(e)){r.push(B(e,n,o+1));continue}}const i=" ".repeat(2*o),l=e.getListType(),a="number"===l?`${e.getStart()+s}. `:"check"===l?`- [${c.getChecked()?"x":" "}] `:"- ";r.push(i+a+n(c)),s++}return r.join("\n")},D={dependencies:[n.HeadingNode],export:(e,t)=>{if(!n.$isHeadingNode(e))return null;const o=Number(e.getTag().slice(1));return"#".repeat(o)+" "+t(e)},regExp:v,replace:M((e=>{const t="h"+e[1].length;return n.$createHeadingNode(t)})),type:"element"},P={dependencies:[n.QuoteNode],export:(e,t)=>{if(!n.$isQuoteNode(e))return null;const o=t(e).split("\n"),r=[];for(const e of o)r.push("> "+e);return r.join("\n")},regExp:_,replace:(t,o,r,i)=>{if(i){const r=t.getPreviousSibling();if(n.$isQuoteNode(r))return r.splice(r.getChildrenSize(),0,[e.$createLineBreakNode(),...o]),void t.remove()}const s=n.$createQuoteNode();s.append(...o),t.replace(s),i||s.select(0,0)},type:"element"},H={dependencies:[r.CodeNode],export:e=>{if(!r.$isCodeNode(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?"\n"+t:"")+"\n```"},regExpEnd:{optional:!0,regExp:A},regExpStart:b,replace:(t,n,o,i,s,c)=>{let l,a;if(!n&&s){if(1===s.length)i?(l=r.$createCodeNode(),a=o[1]+s[0]):(l=r.$createCodeNode(o[1]),a=s[0].startsWith(" ")?s[0].slice(1):s[0]);else{if(l=r.$createCodeNode(o[1]),0===s[0].trim().length)for(;s.length>0&&!s[0].length;)s.shift();else s[0]=s[0].startsWith(" ")?s[0].slice(1):s[0];for(;s.length>0&&!s[s.length-1].length;)s.pop();a=s.join("\n")}const n=e.$createTextNode(a);l.append(n),t.append(l)}else n&&M((e=>r.$createCodeNode(e?e[1]:void 0)))(t,n,o,c)},type:"multiline-element"},U={dependencies:[t.ListNode,t.ListItemNode],export:(e,n)=>t.$isListNode(e)?B(e,n,0):null,regExp:I,replace:w("bullet"),type:"element"},j={dependencies:[t.ListNode,t.ListItemNode],export:(e,n)=>t.$isListNode(e)?B(e,n,0):null,regExp:y,replace:w("check"),type:"element"},q={dependencies:[t.ListNode,t.ListItemNode],export:(e,n)=>t.$isListNode(e)?B(e,n,0):null,regExp:R,replace:w("number"),type:"element"},z={format:["code"],tag:"`",type:"text-format"},G={format:["highlight"],tag:"==",type:"text-format"},Q={format:["bold","italic"],tag:"***",type:"text-format"},W={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},K={format:["bold"],tag:"**",type:"text-format"},X={format:["bold"],intraword:!1,tag:"__",type:"text-format"},J={format:["strikethrough"],tag:"~~",type:"text-format"},V={format:["italic"],tag:"*",type:"text-format"},Y={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Z={dependencies:[i.LinkNode],export:(e,t,n)=>{if(!i.$isLinkNode(e)||i.$isAutoLinkNode(e))return null;const o=e.getTitle(),r=t(e);return o?`[${r}](${e.getURL()} "${o}")`:`[${r}](${e.getURL()})`},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,n)=>{const[,o,r,s]=n,c=i.$createLinkNode(r,{title:s}),l=e.$createTextNode(o);return l.setFormat(t.getFormat()),c.append(l),t.replace(c),l},trigger:")",type:"text-match"};const ee=[D,P,U,q],te=[H],ne=[z,Q,W,K,X,G,V,Y,J],oe=[Z],re=[...ee,...te,...ne,...oe];exports.$convertFromMarkdownString=function(e,t=re,n,o=!1,r=!1){const i=o?e:function(e,t=!1){const n=e.split("\n");let o=!1;const r=[];for(let e=0;e<n.length;e++){const i=n[e],s=r[r.length-1];F.test(i)?r.push(i):b.test(i)||A.test(i)?(o=!o,r.push(i)):o||""===i||""===s||!s||v.test(s)||v.test(i)||_.test(i)||R.test(i)||I.test(i)||y.test(i)||O.test(i)||k.test(i)||!t?r.push(i):r[r.length-1]=s+i}return r.join("\n")}(e,r);return N(t,o)(i,n)},exports.$convertToMarkdownString=function(t=re,n,o=!1){return function(t,n=!1){const o=c(t),r=[...o.multilineElement,...o.element],i=!n,s=o.textFormat.filter((e=>1===e.format.length)).sort(((e,t)=>Number(e.format.includes("code"))-Number(t.format.includes("code"))));return t=>{const n=[],c=(t||e.$getRoot()).getChildren();for(let e=0;e<c.length;e++){const t=c[e],l=d(t,r,s,o.textMatch);null!=l&&n.push(i&&e>0&&!f(t)&&!f(c[e-1])?"\n".concat(l):l)}return n.join("\n")}}(t,o)(n)},exports.BOLD_ITALIC_STAR=Q,exports.BOLD_ITALIC_UNDERSCORE=W,exports.BOLD_STAR=K,exports.BOLD_UNDERSCORE=X,exports.CHECK_LIST=j,exports.CODE=H,exports.ELEMENT_TRANSFORMERS=ee,exports.HEADING=D,exports.HIGHLIGHT=G,exports.INLINE_CODE=z,exports.ITALIC_STAR=V,exports.ITALIC_UNDERSCORE=Y,exports.LINK=Z,exports.MULTILINE_ELEMENT_TRANSFORMERS=te,exports.ORDERED_LIST=q,exports.QUOTE=P,exports.STRIKETHROUGH=J,exports.TEXT_FORMAT_TRANSFORMERS=ne,exports.TEXT_MATCH_TRANSFORMERS=oe,exports.TRANSFORMERS=re,exports.UNORDERED_LIST=U,exports.registerMarkdownShortcuts=function(t,n=re){const o=c(n),i=s(o.textFormat,(({tag:e})=>e[e.length-1])),a=s(o.textMatch,(({trigger:e})=>e));for(const e of n){const n=e.type;if("element"===n||"text-match"===n||"multiline-element"===n){const n=e.dependencies;for(const e of n)t.hasNode(e)||S(173,e.getType())}}const f=(t,n,r)=>{(function(t,n,o,r){const i=t.getParent();if(!e.$isRootOrShadowRoot(i)||t.getFirstChild()!==n)return!1;const s=n.getTextContent();if(" "!==s[o-1])return!1;for(const{regExp:e,replace:i}of r){const r=s.match(e);if(r&&r[0].length===(r[0].endsWith(" ")?o:o-1)){const e=n.getNextSiblings(),[s,c]=n.splitText(o);if(!1!==i(t,c?[c,...e]:e,r,!1))return s.remove(),!0}}return!1})(t,n,r,o.element)||function(t,n,o,r){const i=t.getParent();if(!e.$isRootOrShadowRoot(i)||t.getFirstChild()!==n)return!1;const s=n.getTextContent();if(" "!==s[o-1])return!1;for(const{regExpStart:e,replace:i,regExpEnd:c}of r){if(c&&!("optional"in c)||c&&"optional"in c&&!c.optional)continue;const r=s.match(e);if(r&&r[0].length===(r[0].endsWith(" ")?o:o-1)){const e=n.getNextSiblings(),[s,c]=n.splitText(o);if(!1!==i(t,c?[c,...e]:e,r,null,null,!1))return s.remove(),!0}}return!1}(t,n,r,o.multilineElement)||function(e,t,n){let o=e.getTextContent();const r=n[o[t-1]];if(null==r)return!1;t<o.length&&(o=o.slice(0,t));for(const t of r){if(!t.replace||!t.regExp)continue;const n=o.match(t.regExp);if(null===n)continue;const r=n.index||0,i=r+n[0].length;let s;return 0===r?[s]=e.splitText(i):[,s]=e.splitText(r,i),s.selectNext(0,0),t.replace(s,n),!0}return!1}(n,r,a)||function(t,n,o){const r=t.getTextContent(),i=n-1,s=r[i],c=o[s];if(!c)return!1;for(const n of c){const{tag:o}=n,c=o.length,a=i-c+1;if(c>1&&!L(r,a,o,0,c))continue;if(" "===r[a-1])continue;const f=r[i+1];if(!1===n.intraword&&f&&!l.test(f))continue;const d=t;let u=d,g=C(r,a,o),p=u;for(;g<0&&(p=p.getPreviousSibling())&&!e.$isLineBreakNode(p);)if(e.$isTextNode(p)){if(p.hasFormat("code"))continue;const e=p.getTextContent();u=p,g=C(e,e.length,o)}if(g<0)continue;if(u===d&&g+c===a)continue;const x=u.getTextContent();if(g>0&&x[g-1]===s)continue;const h=x[g-1];if(!1===n.intraword&&h&&!l.test(h))continue;const m=d.getTextContent(),$=m.slice(0,a)+m.slice(i+1);d.setTextContent($);const N=u===d?$:x;u.setTextContent(N.slice(0,g)+N.slice(g+c));const T=e.$getSelection(),E=e.$createRangeSelection();e.$setSelection(E);const S=i-c*(u===d?2:1)+1;E.anchor.set(u.__key,g,"text"),E.focus.set(d.__key,S,"text");for(const e of n.format)E.hasFormat(e)||E.formatText(e);E.anchor.set(E.focus.key,E.focus.offset,E.focus.type);for(const e of n.format)E.hasFormat(e)&&E.toggleFormat(e);return e.$isRangeSelection(T)&&(E.format=T.format),!0}}(n,r,i)};return t.registerUpdateListener((({tags:n,dirtyLeaves:o,editorState:i,prevEditorState:s})=>{if(n.has(e.COLLABORATION_TAG)||n.has(e.HISTORIC_TAG))return;if(t.isComposing())return;const c=i.read(e.$getSelection),l=s.read(e.$getSelection);if(!e.$isRangeSelection(l)||!e.$isRangeSelection(c)||!c.isCollapsed()||c.is(l))return;const a=c.anchor.key,d=c.anchor.offset,u=i._nodeMap.get(a);!e.$isTextNode(u)||!o.has(a)||1!==d&&d>l.anchor.offset+1||t.update((()=>{if(!m(u))return;const e=u.getParent();null===e||r.$isCodeNode(e)||f(e,u,c.anchor.offset)}))}))};-diff --git a/LexicalMarkdown.prod.mjs b/LexicalMarkdown.prod.mjs-index 02c05f8d71ee0d127582536812653c79b37b327b..791053a5e759bdc33a860bebed591367aa047450 100644---- a/LexicalMarkdown.prod.mjs-+++ b/LexicalMarkdown.prod.mjs-@@ -6,4 +6,4 @@- *- */---import{$isParagraphNode as t,$isTextNode as e,$getRoot as n,$isElementNode as o,$isDecoratorNode as r,$isLineBreakNode as i,$getSelection as s,$createTextNode as l,$createParagraphNode as c,$createLineBreakNode as f,COLLABORATION_TAG as a,HISTORIC_TAG as u,$isRangeSelection as g,$isRootOrShadowRoot as p,$createRangeSelection as d,$setSelection as m}from"lexical";import{$isListNode as h,$isListItemNode as x,ListNode as T,ListItemNode as C,$createListItemNode as E,$createListNode as y}from"@lexical/list";import{$isQuoteNode as v,HeadingNode as S,$isHeadingNode as $,QuoteNode as b,$createQuoteNode as F,$createHeadingNode as I}from"@lexical/rich-text";import{$findMatchingParent as N}from"@lexical/utils";import{$isCodeNode as w,CodeNode as k,$createCodeNode as L}from"@lexical/code";import{LinkNode as P,$isLinkNode as R,$isAutoLinkNode as _,$createLinkNode as B}from"@lexical/link";function M(t,e){const n={};for(const o of t){const t=e(o);t&&(n[t]?n[t].push(o):n[t]=[o])}return n}function j(t){const e=M(t,(t=>t.type));return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const A=/[!-/:-@[-`{-~\s]/,z=/^\s{0,3}$/;function U(n){if(!t(n))return!1;const o=n.getFirstChild();return null==o||1===n.getChildrenSize()&&e(o)&&z.test(o.getTextContent())}function W(t,e,n,i){for(const o of e){if(!o.export)continue;const e=o.export(t,(t=>D(t,n,i)));if(null!=e)return e}return o(t)?D(t,n,i):r(t)?t.getTextContent():null}function D(t,n,s,l,c){const f=[],a=t.getChildren();l||(l=[]),c||(c=[]);t:for(const t of a){for(const e of s){if(!e.export)continue;const o=e.export(t,(t=>D(t,n,s,l,[...c,...l])),((t,e)=>O(t,e,n,l,c)));if(null!=o){f.push(o);continue t}}i(t)?f.push("\n"):e(t)?f.push(O(t,t.getTextContent(),n,l,c)):o(t)?f.push(D(t,n,s,l,c)):r(t)&&f.push(t.getTextContent())}return f.join("")}function O(t,e,n,o,r){let i=0===t.getFormat()?e:function(t){return t.replace(/^\s+|\s+$/g,(t=>[...t].map((t=>"&#"+t.codePointAt(0)+";")).join("")))}(e);t.hasFormat("code")||(i=i.replace(/([*_`~\\])/g,"\\$1"));let s="",l="",c="";const f=q(t,!0),a=q(t,!1),u=new Set;for(const e of n){const n=e.format[0],r=e.tag;G(t,n)&&!u.has(n)&&(u.add(n),G(f,n)&&o.find((t=>t.tag===r))||(o.push({format:n,tag:r}),s+=r))}for(let e=0;e<o.length;e++){const n=G(t,o[e].format),i=G(a,o[e].format);if(n&&i)continue;const s=[...o];for(;s.length>e;){const t=s.pop();r&&t&&r.find((e=>e.tag===t.tag))||(t&&"string"==typeof t.tag&&(n?i||(c+=t.tag):l+=t.tag),o.pop())}break}return i=s+i+c,l+i}function q(t,n){let r=n?t.getPreviousSibling():t.getNextSibling();if(!r){const e=t.getParentOrThrow();e.isInline()&&(r=n?e.getPreviousSibling():e.getNextSibling())}for(;r;){if(o(r)){if(!r.isInline())break;const t=n?r.getLastDescendant():r.getFirstDescendant();if(e(t))return t;r=n?r.getPreviousSibling():r.getNextSibling()}if(e(r))return r;if(!o(r))return null}return null}function G(t,n){return e(t)&&t.hasFormat(n)}function H(t,e){const n=function(t,e){const n=t.match(e.openTagsRegExp);if(null==n)return null;for(const o of n){const n=o.replace(/^\s/,""),r=e.fullMatchRegExpByTag[n];if(null==r)continue;const i=t.match(r),s=e.transformersByTag[n];if(null!=i&&null!=s){if(!1!==s.intraword)return i;const{index:e=0}=i,n=t[e-1],o=t[e+i[0].length];if((!n||A.test(n))&&(!o||A.test(o)))return i}}return null}(t.getTextContent(),e);if(!n)return null;const o=n.index||0;return{endIndex:o+n[0].length,match:n,startIndex:o,transformer:e.transformersByTag[n[1]]}}function J(t){return e(t)&&!t.hasFormat("code")}function K(t,e,n){let o=H(t,e),r=function(t,e){const n=t;let o,r,i,s;for(const t of e){if(!t.replace||!t.importRegExp)continue;const e=n.getTextContent().match(t.importRegExp);if(!e)continue;const l=e.index||0,c=t.getEndIndex?t.getEndIndex(n,e):l+e[0].length;!1!==c&&(void 0===o||void 0===r||l<o&&c>r)&&(o=l,r=c,i=t,s=e)}return void 0===o||void 0===r||void 0===i||void 0===s?null:{endIndex:r,match:s,startIndex:o,transformer:i}}(t,n);if(o&&r&&(o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex?r=null:o=null),o){const r=function(t,e,n,o,r){const i=t.getTextContent();let s,l,c;if(r[0]===i?s=t:0===e?[s,l]=t.splitText(n):[c,s,l]=t.splitText(e,n),s.setTextContent(r[2]),o)for(const t of o.format)s.hasFormat(t)||s.toggleFormat(t);return{nodeAfter:l,nodeBefore:c,transformedNode:s}}(t,o.startIndex,o.endIndex,o.transformer,o.match);J(r.nodeAfter)&&K(r.nodeAfter,e,n),J(r.nodeBefore)&&K(r.nodeBefore,e,n),J(r.transformedNode)&&K(r.transformedNode,e,n)}else if(r){const o=function(t,e,n,o,r){let i,s,l;return 0===e?[i,s]=t.splitText(n):[l,i,s]=t.splitText(e,n),o.replace?{nodeAfter:s,nodeBefore:l,transformedNode:o.replace(i,r)||void 0}:null}(t,r.startIndex,r.endIndex,r.transformer,r.match);if(!o)return;J(o.nodeAfter)&&K(o.nodeAfter,e,n),J(o.nodeBefore)&&K(o.nodeBefore,e,n),J(o.transformedNode)&&K(o.transformedNode,e,n)}const i=t.getTextContent().replace(/\\([*_`~\\])/g,"$1").replace(/&#(\d+);/g,((t,e)=>String.fromCodePoint(e)));t.setTextContent(i)}function Q(t,e=!1){const o=j(t),r=function(t){const e={},n={},o=[],r="(?<![\\\\])";for(const r of t){const{tag:t}=r;e[t]=r;const i=t.replace(/(\*|\^|\+)/g,"\\$1");o.push(i),1===t.length?n[t]=new RegExp(`(?<![\\\\${i}])(${i})((\\\\${i})?.*?[^${i}\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?![\\\\${i}])`):n[t]=new RegExp(`(?<!\\\\)(${i})((\\\\${i})?.*?[^\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp(`${r}(${o.join("|")})`,"g"),transformersByTag:e}}(o.textFormat);return(t,i)=>{const l=t.split("\n"),c=l.length,f=i||n();f.clear();for(let t=0;t<c;t++){const n=l[t],[i,s]=V(l,t,o.multilineElement,f);i?t=s:X(n,f,o.element,r,o.textMatch,e)}const a=f.getChildren();for(const t of a)!e&&U(t)&&f.getChildrenSize()>1&&t.remove();null!==s()&&f.selectStart()}}function V(t,e,n,o){for(const r of n){const{handleImportAfterStartMatch:n,regExpEnd:i,regExpStart:s,replace:l}=r,c=t[e].match(s);if(!c)continue;if(n){const i=n({lines:t,rootNode:o,startLineIndex:e,startMatch:c,transformer:r});if(null===i)continue;if(i)return i}const f="object"==typeof i&&"regExp"in i?i.regExp:i,a=i&&"object"==typeof i&&"optional"in i?i.optional:!i;let u=e;const g=t.length;for(;u<g;){const n=f?t[u].match(f):null;if(!n&&(!a||a&&u<g-1)){u++;continue}if(n&&e===u&&n.index===c.index){u++;continue}const r=[];if(n&&e===u)r.push(t[e].slice(c[0].length,-n[0].length));else for(let o=e;o<=u;o++)if(o===e){const e=t[o].slice(c[0].length);r.push(e)}else if(o===u&&n){const e=t[o].slice(0,-n[0].length);r.push(e)}else r.push(t[o]);if(!1!==l(o,null,c,n,r,!0))return[!0,u];break}}return[!1,e]}function X(e,n,o,r,i,s){const a=l(e),u=c();u.append(a),n.append(u);for(const{regExp:t,replace:n}of o){const o=e.match(t);if(o&&(a.setTextContent(e.slice(o[0].length)),!1!==n(u,[a],o,!0)))break}if(K(a,r,i),u.isAttached()&&e.length>0){const e=u.getPreviousSibling();if(!s&&(t(e)||v(e)||h(e))){let t=e;if(h(e)){const n=e.getLastDescendant();t=null==n?null:N(n,x)}null!=t&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[f(),...u.getChildren()]),u.remove())}}}function Y(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Z(t,e,n){const o=n.length;for(let r=e;r>=o;r--){const e=r-o;if(tt(t,e,n,0,o)&&" "!==t[e+o])return e}return-1}function tt(t,e,n,o,r){for(let i=0;i<r;i++)if(t[e+i]!==n[o+i])return!1;return!0}function et(t,n=Bt){const o=j(n),r=M(o.textFormat,(({tag:t})=>t[t.length-1])),l=M(o.textMatch,(({trigger:t})=>t));for(const e of n){const n=e.type;if("element"===n||"text-match"===n||"multiline-element"===n){const n=e.dependencies;for(const e of n)t.hasNode(e)||Y(173,e.getType())}}const c=(t,n,c)=>{(function(t,e,n,o){const r=t.getParent();if(!p(r)||t.getFirstChild()!==e)return!1;const i=e.getTextContent();if(" "!==i[n-1])return!1;for(const{regExp:r,replace:s}of o){const o=i.match(r);if(o&&o[0].length===(o[0].endsWith(" ")?n:n-1)){const r=e.getNextSiblings(),[i,l]=e.splitText(n);if(!1!==s(t,l?[l,...r]:r,o,!1))return i.remove(),!0}}return!1})(t,n,c,o.element)||function(t,e,n,o){const r=t.getParent();if(!p(r)||t.getFirstChild()!==e)return!1;const i=e.getTextContent();if(" "!==i[n-1])return!1;for(const{regExpStart:r,replace:s,regExpEnd:l}of o){if(l&&!("optional"in l)||l&&"optional"in l&&!l.optional)continue;const o=i.match(r);if(o&&o[0].length===(o[0].endsWith(" ")?n:n-1)){const r=e.getNextSiblings(),[i,l]=e.splitText(n);if(!1!==s(t,l?[l,...r]:r,o,null,null,!1))return i.remove(),!0}}return!1}(t,n,c,o.multilineElement)||function(t,e,n){let o=t.getTextContent();const r=n[o[e-1]];if(null==r)return!1;e<o.length&&(o=o.slice(0,e));for(const e of r){if(!e.replace||!e.regExp)continue;const n=o.match(e.regExp);if(null===n)continue;const r=n.index||0,i=r+n[0].length;let s;return 0===r?[s]=t.splitText(i):[,s]=t.splitText(r,i),s.selectNext(0,0),e.replace(s,n),!0}return!1}(n,c,l)||function(t,n,o){const r=t.getTextContent(),l=n-1,c=r[l],f=o[c];if(!f)return!1;for(const n of f){const{tag:o}=n,f=o.length,a=l-f+1;if(f>1&&!tt(r,a,o,0,f))continue;if(" "===r[a-1])continue;const u=r[l+1];if(!1===n.intraword&&u&&!A.test(u))continue;const p=t;let h=p,x=Z(r,a,o),T=h;for(;x<0&&(T=T.getPreviousSibling())&&!i(T);)if(e(T)){if(T.hasFormat("code"))continue;const t=T.getTextContent();h=T,x=Z(t,t.length,o)}if(x<0)continue;if(h===p&&x+f===a)continue;const C=h.getTextContent();if(x>0&&C[x-1]===c)continue;const E=C[x-1];if(!1===n.intraword&&E&&!A.test(E))continue;const y=p.getTextContent(),v=y.slice(0,a)+y.slice(l+1);p.setTextContent(v);const S=h===p?v:C;h.setTextContent(S.slice(0,x)+S.slice(x+f));const $=s(),b=d();m(b);const F=l-f*(h===p?2:1)+1;b.anchor.set(h.__key,x,"text"),b.focus.set(p.__key,F,"text");for(const t of n.format)b.hasFormat(t)||b.formatText(t);b.anchor.set(b.focus.key,b.focus.offset,b.focus.type);for(const t of n.format)b.hasFormat(t)&&b.toggleFormat(t);return g($)&&(b.format=$.format),!0}}(n,c,r)};return t.registerUpdateListener((({tags:n,dirtyLeaves:o,editorState:r,prevEditorState:i})=>{if(n.has(a)||n.has(u))return;if(t.isComposing())return;const l=r.read(s),f=i.read(s);if(!g(f)||!g(l)||!l.isCollapsed()||l.is(f))return;const p=l.anchor.key,d=l.anchor.offset,m=r._nodeMap.get(p);!e(m)||!o.has(p)||1!==d&&d>f.anchor.offset+1||t.update((()=>{if(!J(m))return;const t=m.getParent();null===t||w(t)||c(t,m,l.anchor.offset)}))}))}const nt=/^(\s*)(\d{1,})\.\s/,ot=/^(\s*)[-*+]\s/,rt=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,it=/^(#{1,6})\s/,st=/^>\s/,lt=/^[ \t]*```(\w+)?/,ct=/[ \t]*```$/,ft=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,at=/^(?:\|)(.+)(?:\|)\s?$/,ut=/^(\| ?:?-*:? ?)+\|\s?$/,gt=t=>(e,n,o,r)=>{const i=t(o);i.append(...n),e.replace(i),r||i.select(0,0)};const pt=t=>(e,n,o,r)=>{const i=e.getPreviousSibling(),s=e.getNextSibling(),l=E("check"===t?"x"===o[3]:void 0);if(h(s)&&s.getListType()===t){const t=s.getFirstChild();null!==t?t.insertBefore(l):s.append(l),e.remove()}else if(h(i)&&i.getListType()===t)i.append(l),e.remove();else{const n=y(t,"number"===t?Number(o[2]):void 0);n.append(l),e.replace(n)}l.append(...n),r||l.select(0,0);const c=function(t){const e=t.match(/\t/g),n=t.match(/ /g);let o=0;return e&&(o+=e.length),n&&(o+=Math.floor(n.length/4)),o}(o[1]);c&&l.setIndent(c)},dt=(t,e,n)=>{const o=[],r=t.getChildren();let i=0;for(const s of r)if(x(s)){if(1===s.getChildrenSize()){const t=s.getFirstChild();if(h(t)){o.push(dt(t,e,n+1));continue}}const r=" ".repeat(4*n),l=t.getListType(),c="number"===l?`${t.getStart()+i}. `:"check"===l?`- [${s.getChecked()?"x":" "}] `:"- ";o.push(r+c+e(s)),i++}return o.join("\n")},mt={dependencies:[S],export:(t,e)=>{if(!$(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:it,replace:gt((t=>{const e="h"+t[1].length;return I(e)})),type:"element"},ht={dependencies:[b],export:(t,e)=>{if(!v(t))return null;const n=e(t).split("\n"),o=[];for(const t of n)o.push("> "+t);return o.join("\n")},regExp:st,replace:(t,e,n,o)=>{if(o){const n=t.getPreviousSibling();if(v(n))return n.splice(n.getChildrenSize(),0,[f(),...e]),void t.remove()}const r=F();r.append(...e),t.replace(r),o||r.select(0,0)},type:"element"},xt={dependencies:[k],export:t=>{if(!w(t))return null;const e=t.getTextContent();return"```"+(t.getLanguage()||"")+(e?"\n"+e:"")+"\n```"},regExpEnd:{optional:!0,regExp:ct},regExpStart:lt,replace:(t,e,n,o,r,i)=>{let s,c;if(!e&&r){if(1===r.length)o?(s=L(),c=n[1]+r[0]):(s=L(n[1]),c=r[0].startsWith(" ")?r[0].slice(1):r[0]);else{if(s=L(n[1]),0===r[0].trim().length)for(;r.length>0&&!r[0].length;)r.shift();else r[0]=r[0].startsWith(" ")?r[0].slice(1):r[0];for(;r.length>0&&!r[r.length-1].length;)r.pop();c=r.join("\n")}const e=l(c);s.append(e),t.append(s)}else e&>((t=>L(t?t[1]:void 0)))(t,e,n,i)},type:"multiline-element"},Tt={dependencies:[T,C],export:(t,e)=>h(t)?dt(t,e,0):null,regExp:ot,replace:pt("bullet"),type:"element"},Ct={dependencies:[T,C],export:(t,e)=>h(t)?dt(t,e,0):null,regExp:rt,replace:pt("check"),type:"element"},Et={dependencies:[T,C],export:(t,e)=>h(t)?dt(t,e,0):null,regExp:nt,replace:pt("number"),type:"element"},yt={format:["code"],tag:"`",type:"text-format"},vt={format:["highlight"],tag:"==",type:"text-format"},St={format:["bold","italic"],tag:"***",type:"text-format"},$t={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},bt={format:["bold"],tag:"**",type:"text-format"},Ft={format:["bold"],intraword:!1,tag:"__",type:"text-format"},It={format:["strikethrough"],tag:"~~",type:"text-format"},Nt={format:["italic"],tag:"*",type:"text-format"},wt={format:["italic"],intraword:!1,tag:"_",type:"text-format"},kt={dependencies:[P],export:(t,e,n)=>{if(!R(t)||_(t))return null;const o=t.getTitle(),r=e(t);return o?`[${r}](${t.getURL()} "${o}")`:`[${r}](${t.getURL()})`},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{const[,n,o,r]=e,i=B(o,{title:r}),s=l(n);return s.setFormat(t.getFormat()),i.append(s),t.replace(i),s},trigger:")",type:"text-match"};const Lt=[mt,ht,Tt,Et],Pt=[xt],Rt=[yt,St,$t,bt,Ft,vt,Nt,wt,It],_t=[kt],Bt=[...Lt,...Pt,...Rt,..._t];function Mt(t,e=Bt,n,o=!1,r=!1){const i=o?t:function(t,e=!1){const n=t.split("\n");let o=!1;const r=[];for(let t=0;t<n.length;t++){const i=n[t],s=r[r.length-1];ft.test(i)?r.push(i):lt.test(i)||ct.test(i)?(o=!o,r.push(i)):o||""===i||""===s||!s||it.test(s)||it.test(i)||st.test(i)||nt.test(i)||ot.test(i)||rt.test(i)||at.test(i)||ut.test(i)||!e?r.push(i):r[r.length-1]=s+i}return r.join("\n")}(t,r);return Q(e,o)(i,n)}function jt(t=Bt,e,o=!1){const r=function(t,e=!1){const o=j(t),r=[...o.multilineElement,...o.element],i=!e,s=o.textFormat.filter((t=>1===t.format.length)).sort(((t,e)=>Number(t.format.includes("code"))-Number(e.format.includes("code"))));return t=>{const e=[],l=(t||n()).getChildren();for(let t=0;t<l.length;t++){const n=l[t],c=W(n,r,s,o.textMatch);null!=c&&e.push(i&&t>0&&!U(n)&&!U(l[t-1])?"\n".concat(c):c)}return e.join("\n")}}(t,o);return r(e)}export{Mt as $convertFromMarkdownString,jt as $convertToMarkdownString,St as BOLD_ITALIC_STAR,$t as BOLD_ITALIC_UNDERSCORE,bt as BOLD_STAR,Ft as BOLD_UNDERSCORE,Ct as CHECK_LIST,xt as CODE,Lt as ELEMENT_TRANSFORMERS,mt as HEADING,vt as HIGHLIGHT,yt as INLINE_CODE,Nt as ITALIC_STAR,wt as ITALIC_UNDERSCORE,kt as LINK,Pt as MULTILINE_ELEMENT_TRANSFORMERS,Et as ORDERED_LIST,ht as QUOTE,It as STRIKETHROUGH,Rt as TEXT_FORMAT_TRANSFORMERS,_t as TEXT_MATCH_TRANSFORMERS,Bt as TRANSFORMERS,Tt as UNORDERED_LIST,et as registerMarkdownShortcuts};-+import{$isParagraphNode as t,$isTextNode as e,$getRoot as n,$isElementNode as o,$isDecoratorNode as r,$isLineBreakNode as i,$getSelection as s,$createTextNode as l,$createParagraphNode as c,$createLineBreakNode as f,COLLABORATION_TAG as a,HISTORIC_TAG as u,$isRangeSelection as g,$isRootOrShadowRoot as p,$createRangeSelection as d,$setSelection as m}from"lexical";import{$isListNode as h,$isListItemNode as x,ListNode as T,ListItemNode as C,$createListItemNode as E,$createListNode as y}from"@lexical/list";import{$isQuoteNode as v,HeadingNode as S,$isHeadingNode as $,QuoteNode as b,$createQuoteNode as F,$createHeadingNode as I}from"@lexical/rich-text";import{$findMatchingParent as N}from"@lexical/utils";import{$isCodeNode as w,CodeNode as k,$createCodeNode as L}from"@lexical/code";import{LinkNode as P,$isLinkNode as R,$isAutoLinkNode as _,$createLinkNode as B}from"@lexical/link";function M(t,e){const n={};for(const o of t){const t=e(o);t&&(n[t]?n[t].push(o):n[t]=[o])}return n}function j(t){const e=M(t,(t=>t.type));return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const A=/[!-/:-@[-`{-~\s]/,z=/^\s{0,3}$/;function U(n){if(!t(n))return!1;const o=n.getFirstChild();return null==o||1===n.getChildrenSize()&&e(o)&&z.test(o.getTextContent())}function W(t,e,n,i){for(const o of e){if(!o.export)continue;const e=o.export(t,(t=>D(t,n,i)));if(null!=e)return e}return o(t)?D(t,n,i):r(t)?t.getTextContent():null}function D(t,n,s,l,c){const f=[],a=t.getChildren();l||(l=[]),c||(c=[]);t:for(const t of a){for(const e of s){if(!e.export)continue;const o=e.export(t,(t=>D(t,n,s,l,[...c,...l])),((t,e)=>O(t,e,n,l,c)));if(null!=o){f.push(o);continue t}}i(t)?f.push("\n"):e(t)?f.push(O(t,t.getTextContent(),n,l,c)):o(t)?f.push(D(t,n,s,l,c)):r(t)&&f.push(t.getTextContent())}return f.join("")}function O(t,e,n,o,r){let i=0===t.getFormat()?e:function(t){return t.replace(/^\s+|\s+$/g,(t=>[...t].map((t=>"&#"+t.codePointAt(0)+";")).join("")))}(e);t.hasFormat("code")||(i=i.replace(/([*_`~\\])/g,"\\$1"));let s="",l="",c="";const f=q(t,!0),a=q(t,!1),u=new Set;for(const e of n){const n=e.format[0],r=e.tag;G(t,n)&&!u.has(n)&&(u.add(n),G(f,n)&&o.find((t=>t.tag===r))||(o.push({format:n,tag:r}),s+=r))}for(let e=0;e<o.length;e++){const n=G(t,o[e].format),i=G(a,o[e].format);if(n&&i)continue;const s=[...o];for(;s.length>e;){const t=s.pop();r&&t&&r.find((e=>e.tag===t.tag))||(t&&"string"==typeof t.tag&&(n?i||(c+=t.tag):l+=t.tag),o.pop())}break}return i=s+i+c,l+i}function q(t,n){let r=n?t.getPreviousSibling():t.getNextSibling();if(!r){const e=t.getParentOrThrow();e.isInline()&&(r=n?e.getPreviousSibling():e.getNextSibling())}for(;r;){if(o(r)){if(!r.isInline())break;const t=n?r.getLastDescendant():r.getFirstDescendant();if(e(t))return t;r=n?r.getPreviousSibling():r.getNextSibling()}if(e(r))return r;if(!o(r))return null}return null}function G(t,n){return e(t)&&t.hasFormat(n)}function H(t,e){const n=function(t,e){const n=t.match(e.openTagsRegExp);if(null==n)return null;for(const o of n){const n=o.replace(/^\s/,""),r=e.fullMatchRegExpByTag[n];if(null==r)continue;const i=t.match(r),s=e.transformersByTag[n];if(null!=i&&null!=s){if(!1!==s.intraword)return i;const{index:e=0}=i,n=t[e-1],o=t[e+i[0].length];if((!n||A.test(n))&&(!o||A.test(o)))return i}}return null}(t.getTextContent(),e);if(!n)return null;const o=n.index||0;return{endIndex:o+n[0].length,match:n,startIndex:o,transformer:e.transformersByTag[n[1]]}}function J(t){return e(t)&&!t.hasFormat("code")}function K(t,e,n){let o=H(t,e),r=function(t,e){const n=t;let o,r,i,s;for(const t of e){if(!t.replace||!t.importRegExp)continue;const e=n.getTextContent().match(t.importRegExp);if(!e)continue;const l=e.index||0,c=t.getEndIndex?t.getEndIndex(n,e):l+e[0].length;!1!==c&&(void 0===o||void 0===r||l<o&&c>r)&&(o=l,r=c,i=t,s=e)}return void 0===o||void 0===r||void 0===i||void 0===s?null:{endIndex:r,match:s,startIndex:o,transformer:i}}(t,n);if(o&&r&&(o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex?r=null:o=null),o){const r=function(t,e,n,o,r){const i=t.getTextContent();let s,l,c;if(r[0]===i?s=t:0===e?[s,l]=t.splitText(n):[c,s,l]=t.splitText(e,n),s.setTextContent(r[2]),o)for(const t of o.format)s.hasFormat(t)||s.toggleFormat(t);return{nodeAfter:l,nodeBefore:c,transformedNode:s}}(t,o.startIndex,o.endIndex,o.transformer,o.match);J(r.nodeAfter)&&K(r.nodeAfter,e,n),J(r.nodeBefore)&&K(r.nodeBefore,e,n),J(r.transformedNode)&&K(r.transformedNode,e,n)}else if(r){const o=function(t,e,n,o,r){let i,s,l;return 0===e?[i,s]=t.splitText(n):[l,i,s]=t.splitText(e,n),o.replace?{nodeAfter:s,nodeBefore:l,transformedNode:o.replace(i,r)||void 0}:null}(t,r.startIndex,r.endIndex,r.transformer,r.match);if(!o)return;J(o.nodeAfter)&&K(o.nodeAfter,e,n),J(o.nodeBefore)&&K(o.nodeBefore,e,n),J(o.transformedNode)&&K(o.transformedNode,e,n)}const i=t.getTextContent().replace(/\\([*_`~\\])/g,"$1").replace(/&#(\d+);/g,((t,e)=>String.fromCodePoint(e)));t.setTextContent(i)}function Q(t,e=!1){const o=j(t),r=function(t){const e={},n={},o=[],r="(?<![\\\\])";for(const r of t){const{tag:t}=r;e[t]=r;const i=t.replace(/(\*|\^|\+)/g,"\\$1");o.push(i),1===t.length?n[t]=new RegExp(`(?<![\\\\${i}])(${i})((\\\\${i})?.*?[^${i}\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?![\\\\${i}])`):n[t]=new RegExp(`(?<!\\\\)(${i})((\\\\${i})?.*?[^\\s](\\\\${i})?)((?<!\\\\)|(?<=\\\\\\\\))(${i})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp(`${r}(${o.join("|")})`,"g"),transformersByTag:e}}(o.textFormat);return(t,i)=>{const l=t.split("\n"),c=l.length,f=i||n();f.clear();for(let t=0;t<c;t++){const n=l[t],[i,s]=V(l,t,o.multilineElement,f);i?t=s:X(n,f,o.element,r,o.textMatch,e)}const a=f.getChildren();for(const t of a)!e&&U(t)&&f.getChildrenSize()>1&&t.remove();null!==s()&&f.selectStart()}}function V(t,e,n,o){for(const r of n){const{handleImportAfterStartMatch:n,regExpEnd:i,regExpStart:s,replace:l}=r,c=t[e].match(s);if(!c)continue;if(n){const i=n({lines:t,rootNode:o,startLineIndex:e,startMatch:c,transformer:r});if(null===i)continue;if(i)return i}const f="object"==typeof i&&"regExp"in i?i.regExp:i,a=i&&"object"==typeof i&&"optional"in i?i.optional:!i;let u=e;const g=t.length;for(;u<g;){const n=f?t[u].match(f):null;if(!n&&(!a||a&&u<g-1)){u++;continue}if(n&&e===u&&n.index===c.index){u++;continue}const r=[];if(n&&e===u)r.push(t[e].slice(c[0].length,-n[0].length));else for(let o=e;o<=u;o++)if(o===e){const e=t[o].slice(c[0].length);r.push(e)}else if(o===u&&n){const e=t[o].slice(0,-n[0].length);r.push(e)}else r.push(t[o]);if(!1!==l(o,null,c,n,r,!0))return[!0,u];break}}return[!1,e]}function X(e,n,o,r,i,s){const a=l(e),u=c();u.append(a),n.append(u);for(const{regExp:t,replace:n}of o){const o=e.match(t);if(o&&(a.setTextContent(e.slice(o[0].length)),!1!==n(u,[a],o,!0)))break}if(K(a,r,i),u.isAttached()&&e.length>0){const e=u.getPreviousSibling();if(!s&&(t(e)||v(e)||h(e))){let t=e;if(h(e)){const n=e.getLastDescendant();t=null==n?null:N(n,x)}null!=t&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[f(),...u.getChildren()]),u.remove())}}}function Y(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Z(t,e,n){const o=n.length;for(let r=e;r>=o;r--){const e=r-o;if(tt(t,e,n,0,o)&&" "!==t[e+o])return e}return-1}function tt(t,e,n,o,r){for(let i=0;i<r;i++)if(t[e+i]!==n[o+i])return!1;return!0}function et(t,n=Bt){const o=j(n),r=M(o.textFormat,(({tag:t})=>t[t.length-1])),l=M(o.textMatch,(({trigger:t})=>t));for(const e of n){const n=e.type;if("element"===n||"text-match"===n||"multiline-element"===n){const n=e.dependencies;for(const e of n)t.hasNode(e)||Y(173,e.getType())}}const c=(t,n,c)=>{(function(t,e,n,o){const r=t.getParent();if(!p(r)||t.getFirstChild()!==e)return!1;const i=e.getTextContent();if(" "!==i[n-1])return!1;for(const{regExp:r,replace:s}of o){const o=i.match(r);if(o&&o[0].length===(o[0].endsWith(" ")?n:n-1)){const r=e.getNextSiblings(),[i,l]=e.splitText(n);if(!1!==s(t,l?[l,...r]:r,o,!1))return i.remove(),!0}}return!1})(t,n,c,o.element)||function(t,e,n,o){const r=t.getParent();if(!p(r)||t.getFirstChild()!==e)return!1;const i=e.getTextContent();if(" "!==i[n-1])return!1;for(const{regExpStart:r,replace:s,regExpEnd:l}of o){if(l&&!("optional"in l)||l&&"optional"in l&&!l.optional)continue;const o=i.match(r);if(o&&o[0].length===(o[0].endsWith(" ")?n:n-1)){const r=e.getNextSiblings(),[i,l]=e.splitText(n);if(!1!==s(t,l?[l,...r]:r,o,null,null,!1))return i.remove(),!0}}return!1}(t,n,c,o.multilineElement)||function(t,e,n){let o=t.getTextContent();const r=n[o[e-1]];if(null==r)return!1;e<o.length&&(o=o.slice(0,e));for(const e of r){if(!e.replace||!e.regExp)continue;const n=o.match(e.regExp);if(null===n)continue;const r=n.index||0,i=r+n[0].length;let s;return 0===r?[s]=t.splitText(i):[,s]=t.splitText(r,i),s.selectNext(0,0),e.replace(s,n),!0}return!1}(n,c,l)||function(t,n,o){const r=t.getTextContent(),l=n-1,c=r[l],f=o[c];if(!f)return!1;for(const n of f){const{tag:o}=n,f=o.length,a=l-f+1;if(f>1&&!tt(r,a,o,0,f))continue;if(" "===r[a-1])continue;const u=r[l+1];if(!1===n.intraword&&u&&!A.test(u))continue;const p=t;let h=p,x=Z(r,a,o),T=h;for(;x<0&&(T=T.getPreviousSibling())&&!i(T);)if(e(T)){if(T.hasFormat("code"))continue;const t=T.getTextContent();h=T,x=Z(t,t.length,o)}if(x<0)continue;if(h===p&&x+f===a)continue;const C=h.getTextContent();if(x>0&&C[x-1]===c)continue;const E=C[x-1];if(!1===n.intraword&&E&&!A.test(E))continue;const y=p.getTextContent(),v=y.slice(0,a)+y.slice(l+1);p.setTextContent(v);const S=h===p?v:C;h.setTextContent(S.slice(0,x)+S.slice(x+f));const $=s(),b=d();m(b);const F=l-f*(h===p?2:1)+1;b.anchor.set(h.__key,x,"text"),b.focus.set(p.__key,F,"text");for(const t of n.format)b.hasFormat(t)||b.formatText(t);b.anchor.set(b.focus.key,b.focus.offset,b.focus.type);for(const t of n.format)b.hasFormat(t)&&b.toggleFormat(t);return g($)&&(b.format=$.format),!0}}(n,c,r)};return t.registerUpdateListener((({tags:n,dirtyLeaves:o,editorState:r,prevEditorState:i})=>{if(n.has(a)||n.has(u))return;if(t.isComposing())return;const l=r.read(s),f=i.read(s);if(!g(f)||!g(l)||!l.isCollapsed()||l.is(f))return;const p=l.anchor.key,d=l.anchor.offset,m=r._nodeMap.get(p);!e(m)||!o.has(p)||1!==d&&d>f.anchor.offset+1||t.update((()=>{if(!J(m))return;const t=m.getParent();null===t||w(t)||c(t,m,l.anchor.offset)}))}))}const nt=/^(\s*)(\d{1,})\.\s/,ot=/^(\s*)[-*+]\s/,rt=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,it=/^(#{1,6})\s/,st=/^>\s/,lt=/^[ \t]*```(\w+)?/,ct=/[ \t]*```$/,ft=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,at=/^(?:\|)(.+)(?:\|)\s?$/,ut=/^(\| ?:?-*:? ?)+\|\s?$/,gt=t=>(e,n,o,r)=>{const i=t(o);i.append(...n),e.replace(i),r||i.select(0,0)};const pt=t=>(e,n,o,r)=>{const i=e.getPreviousSibling(),s=e.getNextSibling(),l=E("check"===t?"x"===o[3]:void 0);if(h(s)&&s.getListType()===t){const t=s.getFirstChild();null!==t?t.insertBefore(l):s.append(l),e.remove()}else if(h(i)&&i.getListType()===t)i.append(l),e.remove();else{const n=y(t,"number"===t?Number(o[2]):void 0);n.append(l),e.replace(n)}l.append(...n),r||l.select(0,0);const c=function(t){const e=t.match(/\t/g),n=t.match(/ /g);let o=0;return e&&(o+=e.length),n&&(o+=Math.floor(n.length/2)),o}(o[1]);c&&l.setIndent(c)},dt=(t,e,n)=>{const o=[],r=t.getChildren();let i=0;for(const s of r)if(x(s)){if(1===s.getChildrenSize()){const t=s.getFirstChild();if(h(t)){o.push(dt(t,e,n+1));continue}}const r=" ".repeat(2*n),l=t.getListType(),c="number"===l?`${t.getStart()+i}. `:"check"===l?`- [${s.getChecked()?"x":" "}] `:"- ";o.push(r+c+e(s)),i++}return o.join("\n")},mt={dependencies:[S],export:(t,e)=>{if(!$(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:it,replace:gt((t=>{const e="h"+t[1].length;return I(e)})),type:"element"},ht={dependencies:[b],export:(t,e)=>{if(!v(t))return null;const n=e(t).split("\n"),o=[];for(const t of n)o.push("> "+t);return o.join("\n")},regExp:st,replace:(t,e,n,o)=>{if(o){const n=t.getPreviousSibling();if(v(n))return n.splice(n.getChildrenSize(),0,[f(),...e]),void t.remove()}const r=F();r.append(...e),t.replace(r),o||r.select(0,0)},type:"element"},xt={dependencies:[k],export:t=>{if(!w(t))return null;const e=t.getTextContent();return"```"+(t.getLanguage()||"")+(e?"\n"+e:"")+"\n```"},regExpEnd:{optional:!0,regExp:ct},regExpStart:lt,replace:(t,e,n,o,r,i)=>{let s,c;if(!e&&r){if(1===r.length)o?(s=L(),c=n[1]+r[0]):(s=L(n[1]),c=r[0].startsWith(" ")?r[0].slice(1):r[0]);else{if(s=L(n[1]),0===r[0].trim().length)for(;r.length>0&&!r[0].length;)r.shift();else r[0]=r[0].startsWith(" ")?r[0].slice(1):r[0];for(;r.length>0&&!r[r.length-1].length;)r.pop();c=r.join("\n")}const e=l(c);s.append(e),t.append(s)}else e&>((t=>L(t?t[1]:void 0)))(t,e,n,i)},type:"multiline-element"},Tt={dependencies:[T,C],export:(t,e)=>h(t)?dt(t,e,0):null,regExp:ot,replace:pt("bullet"),type:"element"},Ct={dependencies:[T,C],export:(t,e)=>h(t)?dt(t,e,0):null,regExp:rt,replace:pt("check"),type:"element"},Et={dependencies:[T,C],export:(t,e)=>h(t)?dt(t,e,0):null,regExp:nt,replace:pt("number"),type:"element"},yt={format:["code"],tag:"`",type:"text-format"},vt={format:["highlight"],tag:"==",type:"text-format"},St={format:["bold","italic"],tag:"***",type:"text-format"},$t={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},bt={format:["bold"],tag:"**",type:"text-format"},Ft={format:["bold"],intraword:!1,tag:"__",type:"text-format"},It={format:["strikethrough"],tag:"~~",type:"text-format"},Nt={format:["italic"],tag:"*",type:"text-format"},wt={format:["italic"],intraword:!1,tag:"_",type:"text-format"},kt={dependencies:[P],export:(t,e,n)=>{if(!R(t)||_(t))return null;const o=t.getTitle(),r=e(t);return o?`[${r}](${t.getURL()} "${o}")`:`[${r}](${t.getURL()})`},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{const[,n,o,r]=e,i=B(o,{title:r}),s=l(n);return s.setFormat(t.getFormat()),i.append(s),t.replace(i),s},trigger:")",type:"text-match"};const Lt=[mt,ht,Tt,Et],Pt=[xt],Rt=[yt,St,$t,bt,Ft,vt,Nt,wt,It],_t=[kt],Bt=[...Lt,...Pt,...Rt,..._t];function Mt(t,e=Bt,n,o=!1,r=!1){const i=o?t:function(t,e=!1){const n=t.split("\n");let o=!1;const r=[];for(let t=0;t<n.length;t++){const i=n[t],s=r[r.length-1];ft.test(i)?r.push(i):lt.test(i)||ct.test(i)?(o=!o,r.push(i)):o||""===i||""===s||!s||it.test(s)||it.test(i)||st.test(i)||nt.test(i)||ot.test(i)||rt.test(i)||at.test(i)||ut.test(i)||!e?r.push(i):r[r.length-1]=s+i}return r.join("\n")}(t,r);return Q(e,o)(i,n)}function jt(t=Bt,e,o=!1){const r=function(t,e=!1){const o=j(t),r=[...o.multilineElement,...o.element],i=!e,s=o.textFormat.filter((t=>1===t.format.length)).sort(((t,e)=>Number(t.format.includes("code"))-Number(e.format.includes("code"))));return t=>{const e=[],l=(t||n()).getChildren();for(let t=0;t<l.length;t++){const n=l[t],c=W(n,r,s,o.textMatch);null!=c&&e.push(i&&t>0&&!U(n)&&!U(l[t-1])?"\n".concat(c):c)}return e.join("\n")}}(t,o);return r(e)}export{Mt as $convertFromMarkdownString,jt as $convertToMarkdownString,St as BOLD_ITALIC_STAR,$t as BOLD_ITALIC_UNDERSCORE,bt as BOLD_STAR,Ft as BOLD_UNDERSCORE,Ct as CHECK_LIST,xt as CODE,Lt as ELEMENT_TRANSFORMERS,mt as HEADING,vt as HIGHLIGHT,yt as INLINE_CODE,Nt as ITALIC_STAR,wt as ITALIC_UNDERSCORE,kt as LINK,Pt as MULTILINE_ELEMENT_TRANSFORMERS,Et as ORDERED_LIST,ht as QUOTE,It as STRIKETHROUGH,Rt as TEXT_FORMAT_TRANSFORMERS,_t as TEXT_MATCH_TRANSFORMERS,Bt as TRANSFORMERS,Tt as UNORDERED_LIST,et as registerMarkdownShortcuts};diff --git a/js/app/patches/@lexical%[email protected] b/js/app/patches/@lexical%[email protected]new file mode 100644index 0000000000..787edcfd2a--- /dev/null+++ b/js/app/patches/@lexical%[email protected]@@ -0,0 +1,72 @@+diff --git a/dist/LexicalMarkdown.dev.js b/dist/LexicalMarkdown.dev.js+index 105e67a..d4e5e79 100644+--- a/dist/LexicalMarkdown.dev.js++++ b/dist/LexicalMarkdown.dev.js+@@ -165,7 +165,7 @@ const createBlockNode = createNode => {++ // Amount of spaces that define indentation level+ // TODO: should be an option+-const LIST_INDENT_SIZE = 4;++const LIST_INDENT_SIZE = 2;+ function getIndent(whitespaces) {+ const tabs = whitespaces.match(/\t/g);+ const spaces = whitespaces.match(/ /g);+diff --git a/dist/LexicalMarkdown.dev.mjs b/dist/LexicalMarkdown.dev.mjs+index 1a5ed4b..2919adc 100644+--- a/dist/LexicalMarkdown.dev.mjs++++ b/dist/LexicalMarkdown.dev.mjs+@@ -163,7 +163,7 @@ const createBlockNode = createNode => {++ // Amount of spaces that define indentation level+ // TODO: should be an option+-const LIST_INDENT_SIZE = 4;++const LIST_INDENT_SIZE = 2;+ function getIndent(whitespaces) {+ const tabs = whitespaces.match(/\t/g);+ const spaces = whitespaces.match(/ /g);+diff --git a/dist/LexicalMarkdown.prod.js b/dist/LexicalMarkdown.prod.js+index 74bedea..94042d6 100644+--- a/dist/LexicalMarkdown.prod.js++++ b/dist/LexicalMarkdown.prod.js+@@ -6,4 +6,4 @@+ *+ */++-"use strict";var e=require("lexical"),t=require("@lexical/selection"),n=require("@lexical/code-core"),o=require("@lexical/link"),r=require("@lexical/list"),i=require("@lexical/rich-text"),s=require("@lexical/utils");function l(e,t){const n={};for(const o of e){const e=t(o);e&&(n[e]?n[e].push(o):n[e]=[o])}return n}function c(e){const t=l(e,e=>e.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const a=/[!-/:-@[-`{-~\s]/,d=/\s/,f=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,u=/^\s{0,3}$/;function g(t){if(!e.$isParagraphNode(t))return!1;const n=t.getFirstChild();return null==n||1===t.getChildrenSize()&&e.$isTextNode(n)&&u.test(n.getTextContent())}function p(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(Number(t)))}const h=/^(\s*)(\d{1,})\.\s/,x=/^(\s*)[-*+]\s/,m=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,$=/^(#{1,6})\s/,N=/^>\s/,T=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,C=/^[ \t]*`{3,}$/,E=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,S=/^(?:\|)(.+)(?:\|)\s?$/,I=/^(\| ?:?-*:? ?)+\|\s?$/,L=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,R=/^<\/[a-z_][\w-]*\s*>/i,v=e=>new RegExp(`(?:${e.source})$`,e.flags),O=e.createState("mdListMarker",{parse:e=>"string"==typeof e&&/^[-*+]$/.test(e)?e:"-",resetOnCopyNode:!0}),y=e.createState("mdCodeFence",{parse:e=>"string"==typeof e&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),_=e.createState("mdHardLineBreak",{parse:e=>"string"==typeof e&&/^(\\| {2,})$/.test(e)?e:"",resetOnCopyNode:!0});function k(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function w(t){const n=t.getChildren(),o=n.length-1,r=n[o];if(!e.$isTextNode(r))return null;const i=r.getTextContent(),s=k(i);if(null!==s){const[e,t]=s;return r.setTextContent(e),t}return/^ {2,}$/.test(i)&&function(t,n){for(let o=n-1;o>=0;o--){if(e.$isLineBreakNode(t[o]))return!1;if(/\S/.test(t[o].getTextContent()))return!0}return!1}(n,o)?(r.setTextContent(""),i):null}function M(t){const n=e.$createLineBreakNode(),o=w(t);return null!==o&&e.$setState(n,_,o),n}const A=e=>(t,n,o,r)=>{const i=e(o);i.append(...n),t.replace(i),r||i.select(0,0)};const b=t=>(n,o,i,s)=>{const l=n.getPreviousSibling(),c=n.getNextSibling(),a=r.$createListItemNode("check"===t?"x"===i[3]:void 0),d=i[0].trim()[0],f="bullet"!==t&&"check"!==t||d!==O.parse(d)?void 0:d;if(r.$isListNode(c)&&c.getListType()===t){f&&e.$setState(c,O,f);const t=c.getFirstChild();null!==t?t.insertBefore(a):c.append(a),n.remove()}else if(r.$isListNode(l)&&l.getListType()===t)f&&e.$setState(l,O,f),l.append(a),n.remove();else{const o=r.$createListNode(t,"number"===t?Number(i[2]):void 0);f&&e.$setState(o,O,f),o.append(a),n.replace(o)}a.append(...o),s||a.select(0,0);const u=function(e){const t=e.match(/\t/g),n=e.match(/ /g);let o=0;return t&&(o+=t.length),n&&(o+=Math.floor(n.length/4)),o}(i[1]);u&&a.setIndent(u)},F=(t,n,o,i)=>{const s=[],l=t.getChildren();let c=0;for(const a of l)if(r.$isListItemNode(a)){if(1===a.getChildrenSize()){const e=a.getFirstChild();if(r.$isListNode(e)){const t=F(e,n,o+1,i);t&&s.push(t);continue}}if(i&&!a.getChildren().some(e=>e.isSelected(i)))continue;const l=" ".repeat(4*o),d=t.getListType(),f=e.$getState(t,O),u="number"===d?`${t.getStart()+c}. `:"check"===d?`${f} [${a.getChecked()?"x":" "}] `:f+" ";let g=n(a);"number"!==d&&(g=g.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),s.push(l+u+g),c++}return s.join("\n")},B={dependencies:[i.HeadingNode],export:(e,t)=>{if(!i.$isHeadingNode(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:$,replace:A(e=>{const t="h"+e[1].length;return i.$createHeadingNode(t)}),triggerOnEnter:!0,type:"element"},D={dependencies:[i.QuoteNode],export:(e,t)=>{if(!i.$isQuoteNode(e))return null;const n=t(e).split("\n"),o=[];for(const e of n)o.push("> "+e);return o.join("\n")},regExp:N,replace:(e,t,n,o)=>{if(o){const n=e.getPreviousSibling();if(i.$isQuoteNode(n))return n.splice(n.getChildrenSize(),0,[M(n),...t]),void e.remove()}const r=i.$createQuoteNode();r.append(...t),e.replace(r),o||r.select(0,0)},triggerOnEnter:!0,type:"element"},P={dependencies:[n.CodeNode],export:t=>{if(!n.$isCodeNode(t))return null;const o=t.getTextContent();let r=e.$getState(t,y);if(o.indexOf(r)>-1){const e=o.match(/`{3,}/g);if(e){const t=Math.max(...e.map(e=>e.length));r="`".repeat(t+1)}}return r+(t.getLanguage()||"")+(o?"\n"+o:"")+"\n"+r},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:n,startMatch:o})=>{const r=o[1],i=r.trim().length,s=e[n],l=o.index+r.length,c=s.slice(l),a=new RegExp(`\`{${i},}$`);if(a.test(c)){const e=c.match(a),r=c.slice(0,c.lastIndexOf(e[0])),i=[...o];return i[2]="",P.replace(t,null,i,e,[r],!0),[!0,n]}const d=new RegExp(`^[ \\t]*\`{${i},}$`);for(let r=n+1;r<e.length;r++){const i=e[r];if(d.test(i)){const l=i.match(d),c=e.slice(n+1,r),a=s.slice(o[0].length);return a.length>0&&c.unshift(a),P.replace(t,null,o,l,c,!0),[!0,r]}}const f=e.slice(n+1),u=s.slice(o[0].length);return u.length>0&&f.unshift(u),P.replace(t,null,o,null,f,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:C},regExpStart:T,replace:(t,o,r,i,s,l)=>{let c,a;const d=r[1]?r[1].trim():"```",f=r[2]||void 0;if(!o&&s){if(1===s.length)i?(c=n.$createCodeNode(f),a=s[0]):(c=n.$createCodeNode(f),a=s[0].startsWith(" ")?s[0].slice(1):s[0]);else{for(c=n.$createCodeNode(f),s.length>0&&(0===s[0].trim().length?s.shift():s[0].startsWith(" ")&&(s[0]=s[0].slice(1)));s.length>0&&!s[s.length-1].length;)s.pop();a=s.join("\n")}e.$setState(c,y,d);const o=e.$createTextNode(a);c.append(o),t.append(c)}else o&&A(e=>n.$createCodeNode(e?e[2]:void 0))(t,o,r,l)},type:"multiline-element"},H={dependencies:[r.ListNode,r.ListItemNode],export:(e,t,n)=>r.$isListNode(e)?F(e,t,0,n):null,regExp:x,replace:b("bullet"),triggerOnEnter:!0,type:"element"},j={dependencies:[r.ListNode,r.ListItemNode],export:(e,t,n)=>r.$isListNode(e)?F(e,t,0,n):null,regExp:m,replace:b("check"),triggerOnEnter:!0,type:"element"},U={dependencies:[r.ListNode,r.ListItemNode],export:(e,t,n)=>r.$isListNode(e)?F(e,t,0,n):null,regExp:h,replace:b("number"),triggerOnEnter:!0,type:"element"},z={format:["code"],tag:"`",type:"text-format"},G={format:["highlight"],tag:"==",type:"text-format"},W={format:["bold","italic"],tag:"***",type:"text-format"},q={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Q={format:["bold"],tag:"**",type:"text-format"},K={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Y={format:["strikethrough"],tag:"~~",type:"text-format"},X={format:["italic"],tag:"*",type:"text-format"},J={format:["italic"],intraword:!1,tag:"_",type:"text-format"},V={dependencies:[o.LinkNode],export:(e,t,n)=>{if(!o.$isLinkNode(e)||o.$isAutoLinkNode(e))return null;const r=t(e);let i=e.getTitle();null!=i&&(i=i.replace(/([\\"])/g,"\\$1"));return i?`[${r}](${e.getURL()} "${i}")`:`[${r}](${e.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,n)=>{if(e.$findMatchingParent(t,o.$isLinkNode))return;const[,r,i,s]=n,l=null!=i?p(i):void 0,c=null!=s?p(s):void 0,a=o.$createLinkNode(l,{title:c}),d=r.split("[").length-1,f=r.split("]").length-1;let u=r,g="";if(d<f)return;if(d>f){const e=r.split("[");g="["+e[0],u=e.slice(1).join("[")}const h=e.$createTextNode(u);return h.setFormat(t.getFormat()),a.append(h),t.replace(a),g&&a.insertBefore(e.$createTextNode(g)),h},trigger:")",type:"text-match"},Z=[B,D,H,U],ee=[P],te=[z,W,q,Q,K,G,X,J,Y],ne=[V],oe=[...Z,...ee,...te,...ne];function re(t,n,o,r,i,s){let l=t.isSelected(n);for(const c of o){if(!c.export)continue;const o=c.export(t,e=>ie(e,n,r,i,s).markdown,n);if(null!=o){if(!l&&e.$isElementNode(t)){ie(t,n,r,i,s).shouldInclude&&(l=!0)}return{markdown:o,shouldInclude:l}}}if(e.$isElementNode(t)){const e=ie(t,n,r,i,s);return{markdown:e.markdown,shouldInclude:l||e.shouldInclude}}return e.$isDecoratorNode(t)?{markdown:t.getTextContent(),shouldInclude:l}:{markdown:null,shouldInclude:l}}function ie(n,o,r,i,s,l,c){const a=[],d=n.getChildren();let f=!1;l||(l=[]),c||(c=[]);e:for(const n of d){let d=n.isSelected(o);for(const u of i){if(!u.export)continue;const g=u.export(n,e=>ie(e,o,r,i,s,l,[...c,...l]).markdown,(e,n)=>ae(e,t.$sliceSelectedTextNodeContent(o,e,"clone").getTextContent(),r,l,c,s));if(null!=g){!d&&e.$isElementNode(n)&&n.getChildren().some(e=>e.isSelected(o))&&n.extractWithChild(n,o,"html")&&(d=!0),d&&(a.push(g),f=!0);continue e}}if(e.$isLineBreakNode(n))d&&(a.push(ce(n)),f=!0);else if(e.$isTextNode(n)){if(d){const e=t.$sliceSelectedTextNodeContent(o,n,"clone");a.push(ae(n,e.getTextContent(),r,l,c,s)),f=!0}}else if(e.$isElementNode(n)){const e=ie(n,o,r,i,s,l,c);!d&&e.shouldInclude&&n.extractWithChild(n,o,"html")&&(d=!0),(d||e.shouldInclude)&&(a.push(e.markdown),f=!0)}else e.$isDecoratorNode(n)&&d&&(a.push(n.getTextContent()),f=!0)}return{markdown:a.join(""),shouldInclude:f}}function se(t,n,o,r,i){for(const e of n){if(!e.export)continue;const n=e.export(t,e=>le(e,o,r,void 0,void 0,i));if(null!=n)return n}return e.$isElementNode(t)?le(t,o,r,void 0,void 0,i):e.$isDecoratorNode(t)?t.getTextContent():null}function le(t,n,o,r,i,s=!1){const l=[],c=t.getChildren();r||(r=[]),i||(i=[]);e:for(const t of c){for(const e of o){if(!e.export)continue;const c=e.export(t,e=>le(e,n,o,r,[...i,...r],s),(e,t)=>ae(e,t,n,r,i,s));if(null!=c){l.push(c);continue e}}e.$isLineBreakNode(t)?l.push(ce(t)):e.$isTextNode(t)?l.push(ae(t,t.getTextContent(),n,r,i,s)):e.$isElementNode(t)?l.push(le(t,n,o,r,i,s)):e.$isDecoratorNode(t)&&l.push(t.getTextContent())}return l.join("")}function ce(t){return e.$getState(t,_)+"\n"}function ae(e,t,n,o,r,i=!1){let s=t;e.hasFormat("code")||(s=i?s.replace(/([*_`~])/g,"\\$1"):s.replace(/([*_`~\\])/g,"\\$1"));const l=s.match(/^(\s*)(.*?)(\s*)$/s)||["","",s,""],c=l[1],a=l[2],d=l[3],f=""===a;let u="",g="",p="";const h=de(e,!0),x=de(e,!1),m=new Set;for(const t of n){const n=t.format[0],r=t.tag;ue(e,n)&&!m.has(n)&&(m.add(n),ue(h,n)&&o.find(e=>e.tag===r)||(o.push({format:n,tag:r}),u+=r))}for(let t=0;t<o.length;t++){const n=fe(e,o[t].format),i=fe(x,o[t].format);if(n&&i)continue;const s=[...o];for(;s.length>t;){const e=s.pop();r&&e&&r.find(t=>t.tag===e.tag)||(e&&"string"==typeof e.tag&&(n?i||(p+=e.tag):g+=e.tag),o.pop())}break}return f&&!e.hasFormat("code")?g+s:g+c+u+a+p+d}function de(t,n){const o=n?t.getPreviousSibling():t.getNextSibling();return e.$isTextNode(o)?o:null}function fe(t,n){return e.$isTextNode(t)&&t.hasFormat(n)}function ue(e,t){return!!fe(e,t)&&("code"===t||(!e||!/^\s*$/.test(e.getTextContent())))}function ge(e,t){const n=e.getTextContent(),o=t.fullMatchRegExpByTag["`"],r=t.transformersByTag["`"],i=[];let s=null;if(o&&r){const e=new RegExp(o.source,"g"),t=Array.from(n.matchAll(e));for(const e of t){const t=e.index+e[1].length,n=e.index+e[0].length;s||(s={content:e[3],endIndex:n,startIndex:t,tag:"`"}),i.push({end:n,start:t})}}const l=function(e,t,n=[]){const o=[],r=new Set(Object.keys(t.transformersByTag).filter(e=>"`"!==e[0]).map(e=>e[0])),i=t=>{let n=0;for(let o=t-1;o>=0&&"\\"===e[o];o--)n++;return n%2==1},s=e=>n.some(t=>e>=t.start&&e<t.end);let l=0;for(;l<e.length;){const t=e[l];if(!r.has(t)||i(l)||s(l)){l++;continue}let n=1;for(;l+n<e.length&&e[l+n]===t;)n++;const c=pe(t,e,l,n,!0),a=pe(t,e,l,n,!1);(c||a)&&o.push({active:!0,canClose:a,canOpen:c,char:t,index:l,length:n,originalLength:n}),l+=n}return o}(n,t,i),c=l.length>0?function(e,t,n){const o={};let r=0,i=null;for(;r<t.length;){const s=t[r];if(!s.active||!s.canClose||0===s.length){r++;continue}const l=`${s.char}${s.canOpen}`,c=o[l]??-1;let a=!1;for(let o=r-1;o>c;o--){const l=t[o];if(!l.active||!l.canOpen||0===l.length||l.char!==s.char)continue;if(l.canClose||s.canOpen){if((l.originalLength+s.originalLength)%3==0&&l.originalLength%3!=0&&s.originalLength%3!=0)continue}const c=Math.min(l.length,s.length),d=Object.keys(n.transformersByTag).filter(e=>e[0]===l.char&&e.length<=c).sort((e,t)=>t.length-e.length)[0];if(!d)continue;a=!0;const f=d.length,u={content:e.slice(l.index+l.length,s.index),endIndex:s.index+f,startIndex:l.index+(l.length-f),tag:d};(!i||u.startIndex<i.startIndex||u.startIndex===i.startIndex&&u.endIndex>i.endIndex)&&(i=u);for(let e=o+1;e<r;e++)t[e].active=!1;l.length-=f,s.length-=f,l.active=l.length>0,s.length>0?s.index+=f:(s.active=!1,r++);break}a||(o[l]=r-1,s.canOpen||(s.active=!1),r++)}return i}(n,l,t):null;let a=null,d=null;if(s&&c?c.startIndex<=s.startIndex&&c.endIndex>=s.endIndex?(a=c,d=t.transformersByTag[c.tag]):(a=s,d=r):s?(a=s,d=r):c&&(a=c,d=t.transformersByTag[c.tag]),!a||!d)return null;const f=[n.slice(a.startIndex,a.endIndex),a.tag,a.content];return f.index=a.startIndex,f.input=n,{endIndex:a.endIndex,match:f,startIndex:a.startIndex,transformer:d}}function pe(e,t,n,o,r){if(!he(t,n,o,r))return!1;if("*"===e)return!0;if("_"===e){if(!he(t,n,o,!r))return!0;const e=r?t[n-1]:t[n+o];return void 0!==e&&f.test(e)}return!0}function he(e,t,n,o){const r=e[t-1],i=e[t+n],[s,l]=o?[i,r]:[r,i];return void 0!==s&&!d.test(s)&&(!f.test(s)||(void 0===l||d.test(l)||f.test(l)))}function xe(t){return e.$isTextNode(t)&&!t.hasFormat("code")}function me(e,t,n){let o=ge(e,t),r=function(e,t){const n=e;let o,r,i,s;for(const e of t){if(!e.replace||!e.importRegExp)continue;const t=n.getTextContent().match(e.importRegExp);if(!t)continue;const l=t.index||0,c=e.getEndIndex?e.getEndIndex(n,t):l+t[0].length;!1!==c&&(void 0===o||void 0===r||l<o&&(c>r||c<=o))&&(o=l,r=c,i=e,s=t)}return void 0===o||void 0===r||void 0===i||void 0===s?null:{endIndex:r,match:s,startIndex:o,transformer:i}}(e,n);if(o&&r&&(o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex||r.startIndex>o.endIndex?r=null:o=null),o){const r=function(e,t,n,o,r){const i=e.getTextContent();let s,l,c;if(r[0]===i?s=e:0===t?[s,l]=e.splitText(n):[c,s,l]=e.splitText(t,n),s.setTextContent(r[2]),o)for(const e of o.format)s.hasFormat(e)||s.toggleFormat(e);return{nodeAfter:l,nodeBefore:c,transformedNode:s}}(e,o.startIndex,o.endIndex,o.transformer,o.match);xe(r.nodeAfter)&&me(r.nodeAfter,t,n),xe(r.nodeBefore)&&me(r.nodeBefore,t,n),xe(r.transformedNode)&&me(r.transformedNode,t,n)}else if(r){const o=function(e,t,n,o,r){let i,s,l;return 0===t?[i,s]=e.splitText(n):[l,i,s]=e.splitText(t,n),o.replace?{nodeAfter:s,nodeBefore:l,transformedNode:o.replace(i,r)||void 0}:null}(e,r.startIndex,r.endIndex,r.transformer,r.match);if(!o)return;xe(o.nodeAfter)&&me(o.nodeAfter,t,n),xe(o.nodeBefore)&&me(o.nodeBefore,t,n),xe(o.transformedNode)&&me(o.transformedNode,t,n)}const i=p(e.getTextContent());e.setTextContent(i)}function $e(t,n=!1){const o=c(t),r=function(e){const t={},n={},o=[];for(const r of e){const{tag:e}=r;t[e]=r;const i=e.replace(/(\*|\^|\+)/g,"\\$1");o.push(i),1===e.length?n[e]="`"===e?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${i}])(${i})((\\\\${i})?.*?[^${i}\\s](\\\\${i})?)(${i})(?![\\\\${i}])`):n[e]=new RegExp(`(^|[^\\\\])(${i})((\\\\${i})?.*?[^\\s](\\\\${i})?)(${i})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp(`(${o.join("|")})`,"g"),transformersByTag:t}}(o.textFormat);return(t,i)=>{const s=t.split("\n"),l=s.length,c=i||e.$getRoot();c.clear();for(let e=0;e<l;e++){const t=s[e],[i,l]=Ne(s,e,o.multilineElement,c);i?e=l:Te(t,c,o.element,r,o.textMatch,n)}const a=c.getChildren();for(const t of a)if(!n&&g(t)&&c.getChildrenSize()>1)t.remove();else if(e.$isElementNode(t))for(const e of t.getAllTextNodes())Ce(e);null!==e.$getSelection()&&c.selectStart()}}function Ne(e,t,n,o){for(const r of n){const{handleImportAfterStartMatch:n,regExpEnd:i,regExpStart:s,replace:l}=r,c=e[t].match(s);if(!c)continue;if(n){const i=n({lines:e,rootNode:o,startLineIndex:t,startMatch:c,transformer:r});if(null===i)continue;if(i)return i}const a="object"==typeof i&&"regExp"in i?i.regExp:i,d=i&&"object"==typeof i&&"optional"in i?i.optional:!i;let f=t;const u=e.length;for(;f<u;){const n=a?e[f].match(a):null;if(!n&&(!d||d&&f<u-1)){f++;continue}if(n&&t===f&&n.index===c.index){f++;continue}const r=[];if(n&&t===f)r.push(e[t].slice(c[0].length,-n[0].length));else for(let o=t;o<=f;o++)if(o===t){const t=e[o].slice(c[0].length);r.push(t)}else if(o===f&&n){const t=e[o].slice(0,-n[0].length);r.push(t)}else r.push(e[o]);if(!1!==l(o,null,c,n,r,!0))return[!0,f];break}}return[!1,t]}function Te(t,n,o,l,c,a){const d=e.$createTextNode(t),f=e.$createParagraphNode();f.append(d),n.append(f);for(const{regExp:e,replace:n}of o){const o=t.match(e);if(o&&(d.setTextContent(t.slice(o[0].length)),!1!==n(f,[d],o,!0)))break}if(me(d,l,c),f.isAttached()&&t.length>0){const t=f.getPreviousSibling();if(!a&&(e.$isParagraphNode(t)||i.$isQuoteNode(t)||r.$isListNode(t))){let e=t;if(r.$isListNode(t)){const n=t.getLastDescendant();e=null==n?null:s.$findMatchingParent(n,r.$isListItemNode)}null!=e&&e.getTextContentSize()>0&&(e.splice(e.getChildrenSize(),0,[M(e),...f.getChildren()]),f.remove())}}}function Ce(t){const n=new Set,o=t.getTextContent();let r=o.indexOf("\t");for(;-1!==r;)n.add(r),n.add(r+1),r=o.indexOf("\t",r+1);t.splitText(...n).forEach(t=>{"\t"===t.getTextContent()&&t.replace(e.$createTabNode())})}function Ee(e,...t){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const e of t)o.append("v",e);throw n.search=o.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 Se(t,n,o,r,i){const s=t.getParent();if(!e.$isRootOrShadowRoot(s)||t.getFirstChild()!==n)return!1;const l=n.getTextContent();if(!i&&" "!==l[o-1])return!1;for(const{regExp:e,replace:s}of r){const r=l.match(e),c=i||r&&r[0].endsWith(" ")?o:o-1;if(r&&r[0].length===c){const e=n.getNextSiblings(),[i,l]=n.splitText(o);if(!1!==s(t,l?[l,...e]:e,r,!1))return i.remove(),!0}}return!1}function Ie(t,n,o,r,i){const s=t.getParent();if(!e.$isRootOrShadowRoot(s)||t.getFirstChild()!==n)return!1;const l=n.getTextContent();if(!i&&" "!==l[o-1])return!1;for(const{regExpStart:e,replace:s,regExpEnd:c}of r){if(c&&!("optional"in c)||c&&"optional"in c&&!c.optional)continue;const r=l.match(e);if(r){const e=i||r[0].endsWith(" ")?o:o-1;if(r[0].length!==e)continue;const l=n.getNextSiblings(),[c,a]=n.splitText(o);if(!1!==s(t,a?[a,...l]:l,r,null,null,!1))return c.remove(),!0}}return!1}function Le(e,t){let n=0;const o=e.getTextContent();for(let e=0;e<t;e++)"`"===o[e]&&n++;return n%2!=0}function Re(e,t,n){const o=n.length;for(let r=t;r>=o;r--){const t=r-o;if(ve(e,t,n,0,o)&&" "!==e[t+o])return t}return-1}function ve(e,t,n,o,r){for(let i=0;i<r;i++)if(e[t+i]!==n[o+i])return!1;return!0}exports.$convertFromMarkdownString=function(e,t=oe,n,o=!1,r=!1){const i=o?e:function(e,t=!1){const n=e.split("\n");let o=!1;const r=[];for(let e=0;e<n.length;e++){const i=n[e],s=i.trimEnd(),l=r[r.length-1],c=e<n.length-1?k(i):null,a=void 0!==l&&null!==k(l);E.test(s)?r.push(s):T.test(s)||C.test(s)?(o=!o,r.push(s)):o?r.push(i):""===s||""===l||!l||$.test(l)||$.test(s)||N.test(s)||h.test(s)||x.test(s)||m.test(s)||S.test(s)||I.test(s)||a||!t||L.test(s)||R.test(s)||v(R).test(l)||v(L).test(l)||C.test(l)?r.push(!t&&""!==s||null!==c?i:s):r[r.length-1]=l+" "+(null===c?s:i).trimStart()}return r.join("\n")}(e,r);return $e(t,o)(i,n)},exports.$convertSelectionToMarkdownString=function(t=oe,n,o=!1){if(!n||e.$isRangeSelection(n)&&n.isCollapsed())return"";const r=function(t,n=!1){const o=c(t),r=[...o.multilineElement,...o.element],i=!n,s=o.textFormat.filter(e=>1===e.format.length).sort((e,t)=>Number(e.format.includes("code"))-Number(t.format.includes("code")));return t=>{const l=[],c=e.$getRoot().getChildren();for(let e=0;e<c.length;e++){const a=c[e],{shouldInclude:d,markdown:f}=re(a,t,r,s,o.textMatch,n);d&&null!=f&&l.push(i&&e>0&&!g(a)&&!g(c[e-1])?"\n".concat(f):f)}return l.join("\n")}}(t,o);return r(n)},exports.$convertToMarkdownString=function(t=oe,n,o=!1){return function(t,n=!1){const o=c(t),r=[...o.multilineElement,...o.element],i=!n,s=o.textFormat.filter(e=>1===e.format.length).sort((e,t)=>Number(e.format.includes("code"))-Number(t.format.includes("code")));return t=>{const l=[],c=(t||e.$getRoot()).getChildren();for(let e=0;e<c.length;e++){const t=c[e],a=se(t,r,s,o.textMatch,n);null!=a&&l.push(i&&e>0&&!g(t)&&!g(c[e-1])?"\n".concat(a):a)}return l.join("\n")}}(t,o)(n)},exports.BOLD_ITALIC_STAR=W,exports.BOLD_ITALIC_UNDERSCORE=q,exports.BOLD_STAR=Q,exports.BOLD_UNDERSCORE=K,exports.CHECK_LIST=j,exports.CODE=P,exports.ELEMENT_TRANSFORMERS=Z,exports.HEADING=B,exports.HIGHLIGHT=G,exports.INLINE_CODE=z,exports.ITALIC_STAR=X,exports.ITALIC_UNDERSCORE=J,exports.LINK=V,exports.MULTILINE_ELEMENT_TRANSFORMERS=ee,exports.ORDERED_LIST=U,exports.QUOTE=D,exports.STRIKETHROUGH=Y,exports.TEXT_FORMAT_TRANSFORMERS=te,exports.TEXT_MATCH_TRANSFORMERS=ne,exports.TRANSFORMERS=oe,exports.UNORDERED_LIST=H,exports.registerMarkdownShortcuts=function(t,o=oe){const r=c(o),i=r.element.filter(e=>e.triggerOnEnter),s=l(r.textFormat,({tag:e})=>e[e.length-1]),d=l(r.textMatch,({trigger:e})=>e),f=new Set([" "]);for(const e of r.textFormat)f.add(e.tag.slice(-1));for(const e of r.textMatch)void 0!==e.trigger&&f.add(e.trigger);for(const e of o){const n=e.type;if("element"===n||"text-match"===n||"multiline-element"===n){const n=e.dependencies;for(const e of n)t.hasNode(e)||Ee(173,e.getType())}}const u=(t,n,o)=>!!Se(t,n,o,r.element)||(!!Ie(t,n,o,r.multilineElement)||(!!function(e,t,n){let o=e.getTextContent();const r=n[o[t-1]];if(null==r)return!1;t<o.length&&(o=o.slice(0,t));for(const t of r){if(!t.replace||!t.regExp)continue;const n=o.match(t.regExp);if(null===n)continue;const r=n.index||0,i=r+n[0].length;let s;return 0===r?[s]=e.splitText(i):[,s]=e.splitText(r,i),s.selectNext(0,0),t.replace(s,n),!0}return!1}(n,o,d)||!!function(t,n,o){const r=t.getTextContent(),i=n-1,s=r[i],l=o[s];if(!l)return!1;for(const n of l){const{tag:o}=n,l=o.length,c=i-l+1;if(l>1&&!ve(r,c,o,0,l))continue;if(" "===r[c-1])continue;const d=r[i+1];if(!1===n.intraword&&d&&!a.test(d))continue;const f=t;let u=f,g=Re(r,c,o),p=u;for(;g<0&&(p=p.getPreviousSibling())&&!e.$isLineBreakNode(p);)if(e.$isTextNode(p)){if(p.hasFormat("code"))continue;const e=p.getTextContent();u=p,g=Re(e,e.length,o)}if(g<0)continue;if(u===f&&g+l===c)continue;const h=u.getTextContent();if(g>0&&h[g-1]===s)continue;const x=h[g-1];if(!1===n.intraword&&x&&!a.test(x))continue;if(!n.format.includes("code")&&Le(u,g))continue;const m=f.getTextContent(),$=m.slice(0,c)+m.slice(i+1);f.setTextContent($);const N=u===f?$:h;u.setTextContent(N.slice(0,g)+N.slice(g+l));const T=e.$getSelection(),C=e.$createRangeSelection();e.$setSelection(C);const E=i-l*(u===f?2:1)+1;C.anchor.set(u.__key,g,"text"),C.focus.set(f.__key,E,"text");for(const e of n.format)C.hasFormat(e)||C.formatText(e);C.anchor.set(C.focus.key,C.focus.offset,C.focus.type);for(const e of n.format)C.hasFormat(e)&&C.toggleFormat(e);return e.$isRangeSelection(T)&&(C.format=T.format),!0}return!1}(n,o,s)));return e.mergeRegister(t.registerUpdateListener(({tags:o,dirtyLeaves:r,editorState:i,prevEditorState:s})=>{if(o.has(e.COLLABORATION_TAG)||o.has(e.HISTORIC_TAG))return;if(t.isComposing())return;const l=o.has(e.COMPOSITION_END_TAG),c=i.read(e.$getSelection),a=s.read(e.$getSelection);if(!e.$isRangeSelection(a)||!e.$isRangeSelection(c)||!c.isCollapsed()||c.is(a)&&!l)return;const d=c.anchor.key,g=c.anchor.offset,p=i._nodeMap.get(d);if(e.$isTextNode(p)&&r.has(d)&&(l||1===g||!(g>a.anchor.offset+1))){if(l){const e=i.read(()=>p.getTextContent())[g-1];if(!f.has(e))return}t.update(()=>{if(!xe(p))return;const t=p.getParent();null===t||n.$isCodeNode(t)||u(t,p,c.anchor.offset)&&e.$addUpdateTag(e.HISTORY_PUSH_TAG)})}}),t.registerCommand(e.KEY_ENTER_COMMAND,t=>{if(null!==t&&t.shiftKey)return!1;const o=e.$getSelection();if(!e.$isRangeSelection(o)||!o.isCollapsed())return!1;const s=o.anchor.offset,l=o.anchor.getNode();if(!e.$isTextNode(l)||!xe(l))return!1;const c=l.getParent();if(null===c||n.$isCodeNode(c))return!1;return s===l.getTextContent().length&&(!(!Ie(c,l,s,r.multilineElement,!0)&&!Se(c,l,s,i,!0))&&(null!==t&&t.preventDefault(),!0))},e.COMMAND_PRIORITY_LOW))};++"use strict";var e=require("lexical"),t=require("@lexical/selection"),n=require("@lexical/code-core"),o=require("@lexical/link"),r=require("@lexical/list"),i=require("@lexical/rich-text"),s=require("@lexical/utils");function l(e,t){const n={};for(const o of e){const e=t(o);e&&(n[e]?n[e].push(o):n[e]=[o])}return n}function c(e){const t=l(e,e=>e.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const a=/[!-/:-@[-`{-~\s]/,d=/\s/,f=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,u=/^\s{0,3}$/;function g(t){if(!e.$isParagraphNode(t))return!1;const n=t.getFirstChild();return null==n||1===t.getChildrenSize()&&e.$isTextNode(n)&&u.test(n.getTextContent())}function p(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(Number(t)))}const h=/^(\s*)(\d{1,})\.\s/,x=/^(\s*)[-*+]\s/,m=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,$=/^(#{1,6})\s/,N=/^>\s/,T=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,C=/^[ \t]*`{3,}$/,E=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,S=/^(?:\|)(.+)(?:\|)\s?$/,I=/^(\| ?:?-*:? ?)+\|\s?$/,L=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,R=/^<\/[a-z_][\w-]*\s*>/i,v=e=>new RegExp(`(?:${e.source})$`,e.flags),O=e.createState("mdListMarker",{parse:e=>"string"==typeof e&&/^[-*+]$/.test(e)?e:"-",resetOnCopyNode:!0}),y=e.createState("mdCodeFence",{parse:e=>"string"==typeof e&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),_=e.createState("mdHardLineBreak",{parse:e=>"string"==typeof e&&/^(\\| {2,})$/.test(e)?e:"",resetOnCopyNode:!0});function k(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function w(t){const n=t.getChildren(),o=n.length-1,r=n[o];if(!e.$isTextNode(r))return null;const i=r.getTextContent(),s=k(i);if(null!==s){const[e,t]=s;return r.setTextContent(e),t}return/^ {2,}$/.test(i)&&function(t,n){for(let o=n-1;o>=0;o--){if(e.$isLineBreakNode(t[o]))return!1;if(/\S/.test(t[o].getTextContent()))return!0}return!1}(n,o)?(r.setTextContent(""),i):null}function M(t){const n=e.$createLineBreakNode(),o=w(t);return null!==o&&e.$setState(n,_,o),n}const A=e=>(t,n,o,r)=>{const i=e(o);i.append(...n),t.replace(i),r||i.select(0,0)};const b=t=>(n,o,i,s)=>{const l=n.getPreviousSibling(),c=n.getNextSibling(),a=r.$createListItemNode("check"===t?"x"===i[3]:void 0),d=i[0].trim()[0],f="bullet"!==t&&"check"!==t||d!==O.parse(d)?void 0:d;if(r.$isListNode(c)&&c.getListType()===t){f&&e.$setState(c,O,f);const t=c.getFirstChild();null!==t?t.insertBefore(a):c.append(a),n.remove()}else if(r.$isListNode(l)&&l.getListType()===t)f&&e.$setState(l,O,f),l.append(a),n.remove();else{const o=r.$createListNode(t,"number"===t?Number(i[2]):void 0);f&&e.$setState(o,O,f),o.append(a),n.replace(o)}a.append(...o),s||a.select(0,0);const u=function(e){const t=e.match(/\t/g),n=e.match(/ /g);let o=0;return t&&(o+=t.length),n&&(o+=Math.floor(n.length/2)),o}(i[1]);u&&a.setIndent(u)},F=(t,n,o,i)=>{const s=[],l=t.getChildren();let c=0;for(const a of l)if(r.$isListItemNode(a)){if(1===a.getChildrenSize()){const e=a.getFirstChild();if(r.$isListNode(e)){const t=F(e,n,o+1,i);t&&s.push(t);continue}}if(i&&!a.getChildren().some(e=>e.isSelected(i)))continue;const l=" ".repeat(2*o),d=t.getListType(),f=e.$getState(t,O),u="number"===d?`${t.getStart()+c}. `:"check"===d?`${f} [${a.getChecked()?"x":" "}] `:f+" ";let g=n(a);"number"!==d&&(g=g.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),s.push(l+u+g),c++}return s.join("\n")},B={dependencies:[i.HeadingNode],export:(e,t)=>{if(!i.$isHeadingNode(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:$,replace:A(e=>{const t="h"+e[1].length;return i.$createHeadingNode(t)}),triggerOnEnter:!0,type:"element"},D={dependencies:[i.QuoteNode],export:(e,t)=>{if(!i.$isQuoteNode(e))return null;const n=t(e).split("\n"),o=[];for(const e of n)o.push("> "+e);return o.join("\n")},regExp:N,replace:(e,t,n,o)=>{if(o){const n=e.getPreviousSibling();if(i.$isQuoteNode(n))return n.splice(n.getChildrenSize(),0,[M(n),...t]),void e.remove()}const r=i.$createQuoteNode();r.append(...t),e.replace(r),o||r.select(0,0)},triggerOnEnter:!0,type:"element"},P={dependencies:[n.CodeNode],export:t=>{if(!n.$isCodeNode(t))return null;const o=t.getTextContent();let r=e.$getState(t,y);if(o.indexOf(r)>-1){const e=o.match(/`{3,}/g);if(e){const t=Math.max(...e.map(e=>e.length));r="`".repeat(t+1)}}return r+(t.getLanguage()||"")+(o?"\n"+o:"")+"\n"+r},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:n,startMatch:o})=>{const r=o[1],i=r.trim().length,s=e[n],l=o.index+r.length,c=s.slice(l),a=new RegExp(`\`{${i},}$`);if(a.test(c)){const e=c.match(a),r=c.slice(0,c.lastIndexOf(e[0])),i=[...o];return i[2]="",P.replace(t,null,i,e,[r],!0),[!0,n]}const d=new RegExp(`^[ \\t]*\`{${i},}$`);for(let r=n+1;r<e.length;r++){const i=e[r];if(d.test(i)){const l=i.match(d),c=e.slice(n+1,r),a=s.slice(o[0].length);return a.length>0&&c.unshift(a),P.replace(t,null,o,l,c,!0),[!0,r]}}const f=e.slice(n+1),u=s.slice(o[0].length);return u.length>0&&f.unshift(u),P.replace(t,null,o,null,f,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:C},regExpStart:T,replace:(t,o,r,i,s,l)=>{let c,a;const d=r[1]?r[1].trim():"```",f=r[2]||void 0;if(!o&&s){if(1===s.length)i?(c=n.$createCodeNode(f),a=s[0]):(c=n.$createCodeNode(f),a=s[0].startsWith(" ")?s[0].slice(1):s[0]);else{for(c=n.$createCodeNode(f),s.length>0&&(0===s[0].trim().length?s.shift():s[0].startsWith(" ")&&(s[0]=s[0].slice(1)));s.length>0&&!s[s.length-1].length;)s.pop();a=s.join("\n")}e.$setState(c,y,d);const o=e.$createTextNode(a);c.append(o),t.append(c)}else o&&A(e=>n.$createCodeNode(e?e[2]:void 0))(t,o,r,l)},type:"multiline-element"},H={dependencies:[r.ListNode,r.ListItemNode],export:(e,t,n)=>r.$isListNode(e)?F(e,t,0,n):null,regExp:x,replace:b("bullet"),triggerOnEnter:!0,type:"element"},j={dependencies:[r.ListNode,r.ListItemNode],export:(e,t,n)=>r.$isListNode(e)?F(e,t,0,n):null,regExp:m,replace:b("check"),triggerOnEnter:!0,type:"element"},U={dependencies:[r.ListNode,r.ListItemNode],export:(e,t,n)=>r.$isListNode(e)?F(e,t,0,n):null,regExp:h,replace:b("number"),triggerOnEnter:!0,type:"element"},z={format:["code"],tag:"`",type:"text-format"},G={format:["highlight"],tag:"==",type:"text-format"},W={format:["bold","italic"],tag:"***",type:"text-format"},q={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Q={format:["bold"],tag:"**",type:"text-format"},K={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Y={format:["strikethrough"],tag:"~~",type:"text-format"},X={format:["italic"],tag:"*",type:"text-format"},J={format:["italic"],intraword:!1,tag:"_",type:"text-format"},V={dependencies:[o.LinkNode],export:(e,t,n)=>{if(!o.$isLinkNode(e)||o.$isAutoLinkNode(e))return null;const r=t(e);let i=e.getTitle();null!=i&&(i=i.replace(/([\\"])/g,"\\$1"));return i?`[${r}](${e.getURL()} "${i}")`:`[${r}](${e.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,n)=>{if(e.$findMatchingParent(t,o.$isLinkNode))return;const[,r,i,s]=n,l=null!=i?p(i):void 0,c=null!=s?p(s):void 0,a=o.$createLinkNode(l,{title:c}),d=r.split("[").length-1,f=r.split("]").length-1;let u=r,g="";if(d<f)return;if(d>f){const e=r.split("[");g="["+e[0],u=e.slice(1).join("[")}const h=e.$createTextNode(u);return h.setFormat(t.getFormat()),a.append(h),t.replace(a),g&&a.insertBefore(e.$createTextNode(g)),h},trigger:")",type:"text-match"},Z=[B,D,H,U],ee=[P],te=[z,W,q,Q,K,G,X,J,Y],ne=[V],oe=[...Z,...ee,...te,...ne];function re(t,n,o,r,i,s){let l=t.isSelected(n);for(const c of o){if(!c.export)continue;const o=c.export(t,e=>ie(e,n,r,i,s).markdown,n);if(null!=o){if(!l&&e.$isElementNode(t)){ie(t,n,r,i,s).shouldInclude&&(l=!0)}return{markdown:o,shouldInclude:l}}}if(e.$isElementNode(t)){const e=ie(t,n,r,i,s);return{markdown:e.markdown,shouldInclude:l||e.shouldInclude}}return e.$isDecoratorNode(t)?{markdown:t.getTextContent(),shouldInclude:l}:{markdown:null,shouldInclude:l}}function ie(n,o,r,i,s,l,c){const a=[],d=n.getChildren();let f=!1;l||(l=[]),c||(c=[]);e:for(const n of d){let d=n.isSelected(o);for(const u of i){if(!u.export)continue;const g=u.export(n,e=>ie(e,o,r,i,s,l,[...c,...l]).markdown,(e,n)=>ae(e,t.$sliceSelectedTextNodeContent(o,e,"clone").getTextContent(),r,l,c,s));if(null!=g){!d&&e.$isElementNode(n)&&n.getChildren().some(e=>e.isSelected(o))&&n.extractWithChild(n,o,"html")&&(d=!0),d&&(a.push(g),f=!0);continue e}}if(e.$isLineBreakNode(n))d&&(a.push(ce(n)),f=!0);else if(e.$isTextNode(n)){if(d){const e=t.$sliceSelectedTextNodeContent(o,n,"clone");a.push(ae(n,e.getTextContent(),r,l,c,s)),f=!0}}else if(e.$isElementNode(n)){const e=ie(n,o,r,i,s,l,c);!d&&e.shouldInclude&&n.extractWithChild(n,o,"html")&&(d=!0),(d||e.shouldInclude)&&(a.push(e.markdown),f=!0)}else e.$isDecoratorNode(n)&&d&&(a.push(n.getTextContent()),f=!0)}return{markdown:a.join(""),shouldInclude:f}}function se(t,n,o,r,i){for(const e of n){if(!e.export)continue;const n=e.export(t,e=>le(e,o,r,void 0,void 0,i));if(null!=n)return n}return e.$isElementNode(t)?le(t,o,r,void 0,void 0,i):e.$isDecoratorNode(t)?t.getTextContent():null}function le(t,n,o,r,i,s=!1){const l=[],c=t.getChildren();r||(r=[]),i||(i=[]);e:for(const t of c){for(const e of o){if(!e.export)continue;const c=e.export(t,e=>le(e,n,o,r,[...i,...r],s),(e,t)=>ae(e,t,n,r,i,s));if(null!=c){l.push(c);continue e}}e.$isLineBreakNode(t)?l.push(ce(t)):e.$isTextNode(t)?l.push(ae(t,t.getTextContent(),n,r,i,s)):e.$isElementNode(t)?l.push(le(t,n,o,r,i,s)):e.$isDecoratorNode(t)&&l.push(t.getTextContent())}return l.join("")}function ce(t){return e.$getState(t,_)+"\n"}function ae(e,t,n,o,r,i=!1){let s=t;e.hasFormat("code")||(s=i?s.replace(/([*_`~])/g,"\\$1"):s.replace(/([*_`~\\])/g,"\\$1"));const l=s.match(/^(\s*)(.*?)(\s*)$/s)||["","",s,""],c=l[1],a=l[2],d=l[3],f=""===a;let u="",g="",p="";const h=de(e,!0),x=de(e,!1),m=new Set;for(const t of n){const n=t.format[0],r=t.tag;ue(e,n)&&!m.has(n)&&(m.add(n),ue(h,n)&&o.find(e=>e.tag===r)||(o.push({format:n,tag:r}),u+=r))}for(let t=0;t<o.length;t++){const n=fe(e,o[t].format),i=fe(x,o[t].format);if(n&&i)continue;const s=[...o];for(;s.length>t;){const e=s.pop();r&&e&&r.find(t=>t.tag===e.tag)||(e&&"string"==typeof e.tag&&(n?i||(p+=e.tag):g+=e.tag),o.pop())}break}return f&&!e.hasFormat("code")?g+s:g+c+u+a+p+d}function de(t,n){const o=n?t.getPreviousSibling():t.getNextSibling();return e.$isTextNode(o)?o:null}function fe(t,n){return e.$isTextNode(t)&&t.hasFormat(n)}function ue(e,t){return!!fe(e,t)&&("code"===t||(!e||!/^\s*$/.test(e.getTextContent())))}function ge(e,t){const n=e.getTextContent(),o=t.fullMatchRegExpByTag["`"],r=t.transformersByTag["`"],i=[];let s=null;if(o&&r){const e=new RegExp(o.source,"g"),t=Array.from(n.matchAll(e));for(const e of t){const t=e.index+e[1].length,n=e.index+e[0].length;s||(s={content:e[3],endIndex:n,startIndex:t,tag:"`"}),i.push({end:n,start:t})}}const l=function(e,t,n=[]){const o=[],r=new Set(Object.keys(t.transformersByTag).filter(e=>"`"!==e[0]).map(e=>e[0])),i=t=>{let n=0;for(let o=t-1;o>=0&&"\\"===e[o];o--)n++;return n%2==1},s=e=>n.some(t=>e>=t.start&&e<t.end);let l=0;for(;l<e.length;){const t=e[l];if(!r.has(t)||i(l)||s(l)){l++;continue}let n=1;for(;l+n<e.length&&e[l+n]===t;)n++;const c=pe(t,e,l,n,!0),a=pe(t,e,l,n,!1);(c||a)&&o.push({active:!0,canClose:a,canOpen:c,char:t,index:l,length:n,originalLength:n}),l+=n}return o}(n,t,i),c=l.length>0?function(e,t,n){const o={};let r=0,i=null;for(;r<t.length;){const s=t[r];if(!s.active||!s.canClose||0===s.length){r++;continue}const l=`${s.char}${s.canOpen}`,c=o[l]??-1;let a=!1;for(let o=r-1;o>c;o--){const l=t[o];if(!l.active||!l.canOpen||0===l.length||l.char!==s.char)continue;if(l.canClose||s.canOpen){if((l.originalLength+s.originalLength)%3==0&&l.originalLength%3!=0&&s.originalLength%3!=0)continue}const c=Math.min(l.length,s.length),d=Object.keys(n.transformersByTag).filter(e=>e[0]===l.char&&e.length<=c).sort((e,t)=>t.length-e.length)[0];if(!d)continue;a=!0;const f=d.length,u={content:e.slice(l.index+l.length,s.index),endIndex:s.index+f,startIndex:l.index+(l.length-f),tag:d};(!i||u.startIndex<i.startIndex||u.startIndex===i.startIndex&&u.endIndex>i.endIndex)&&(i=u);for(let e=o+1;e<r;e++)t[e].active=!1;l.length-=f,s.length-=f,l.active=l.length>0,s.length>0?s.index+=f:(s.active=!1,r++);break}a||(o[l]=r-1,s.canOpen||(s.active=!1),r++)}return i}(n,l,t):null;let a=null,d=null;if(s&&c?c.startIndex<=s.startIndex&&c.endIndex>=s.endIndex?(a=c,d=t.transformersByTag[c.tag]):(a=s,d=r):s?(a=s,d=r):c&&(a=c,d=t.transformersByTag[c.tag]),!a||!d)return null;const f=[n.slice(a.startIndex,a.endIndex),a.tag,a.content];return f.index=a.startIndex,f.input=n,{endIndex:a.endIndex,match:f,startIndex:a.startIndex,transformer:d}}function pe(e,t,n,o,r){if(!he(t,n,o,r))return!1;if("*"===e)return!0;if("_"===e){if(!he(t,n,o,!r))return!0;const e=r?t[n-1]:t[n+o];return void 0!==e&&f.test(e)}return!0}function he(e,t,n,o){const r=e[t-1],i=e[t+n],[s,l]=o?[i,r]:[r,i];return void 0!==s&&!d.test(s)&&(!f.test(s)||(void 0===l||d.test(l)||f.test(l)))}function xe(t){return e.$isTextNode(t)&&!t.hasFormat("code")}function me(e,t,n){let o=ge(e,t),r=function(e,t){const n=e;let o,r,i,s;for(const e of t){if(!e.replace||!e.importRegExp)continue;const t=n.getTextContent().match(e.importRegExp);if(!t)continue;const l=t.index||0,c=e.getEndIndex?e.getEndIndex(n,t):l+t[0].length;!1!==c&&(void 0===o||void 0===r||l<o&&(c>r||c<=o))&&(o=l,r=c,i=e,s=t)}return void 0===o||void 0===r||void 0===i||void 0===s?null:{endIndex:r,match:s,startIndex:o,transformer:i}}(e,n);if(o&&r&&(o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex||r.startIndex>o.endIndex?r=null:o=null),o){const r=function(e,t,n,o,r){const i=e.getTextContent();let s,l,c;if(r[0]===i?s=e:0===t?[s,l]=e.splitText(n):[c,s,l]=e.splitText(t,n),s.setTextContent(r[2]),o)for(const e of o.format)s.hasFormat(e)||s.toggleFormat(e);return{nodeAfter:l,nodeBefore:c,transformedNode:s}}(e,o.startIndex,o.endIndex,o.transformer,o.match);xe(r.nodeAfter)&&me(r.nodeAfter,t,n),xe(r.nodeBefore)&&me(r.nodeBefore,t,n),xe(r.transformedNode)&&me(r.transformedNode,t,n)}else if(r){const o=function(e,t,n,o,r){let i,s,l;return 0===t?[i,s]=e.splitText(n):[l,i,s]=e.splitText(t,n),o.replace?{nodeAfter:s,nodeBefore:l,transformedNode:o.replace(i,r)||void 0}:null}(e,r.startIndex,r.endIndex,r.transformer,r.match);if(!o)return;xe(o.nodeAfter)&&me(o.nodeAfter,t,n),xe(o.nodeBefore)&&me(o.nodeBefore,t,n),xe(o.transformedNode)&&me(o.transformedNode,t,n)}const i=p(e.getTextContent());e.setTextContent(i)}function $e(t,n=!1){const o=c(t),r=function(e){const t={},n={},o=[];for(const r of e){const{tag:e}=r;t[e]=r;const i=e.replace(/(\*|\^|\+)/g,"\\$1");o.push(i),1===e.length?n[e]="`"===e?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${i}])(${i})((\\\\${i})?.*?[^${i}\\s](\\\\${i})?)(${i})(?![\\\\${i}])`):n[e]=new RegExp(`(^|[^\\\\])(${i})((\\\\${i})?.*?[^\\s](\\\\${i})?)(${i})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp(`(${o.join("|")})`,"g"),transformersByTag:t}}(o.textFormat);return(t,i)=>{const s=t.split("\n"),l=s.length,c=i||e.$getRoot();c.clear();for(let e=0;e<l;e++){const t=s[e],[i,l]=Ne(s,e,o.multilineElement,c);i?e=l:Te(t,c,o.element,r,o.textMatch,n)}const a=c.getChildren();for(const t of a)if(!n&&g(t)&&c.getChildrenSize()>1)t.remove();else if(e.$isElementNode(t))for(const e of t.getAllTextNodes())Ce(e);null!==e.$getSelection()&&c.selectStart()}}function Ne(e,t,n,o){for(const r of n){const{handleImportAfterStartMatch:n,regExpEnd:i,regExpStart:s,replace:l}=r,c=e[t].match(s);if(!c)continue;if(n){const i=n({lines:e,rootNode:o,startLineIndex:t,startMatch:c,transformer:r});if(null===i)continue;if(i)return i}const a="object"==typeof i&&"regExp"in i?i.regExp:i,d=i&&"object"==typeof i&&"optional"in i?i.optional:!i;let f=t;const u=e.length;for(;f<u;){const n=a?e[f].match(a):null;if(!n&&(!d||d&&f<u-1)){f++;continue}if(n&&t===f&&n.index===c.index){f++;continue}const r=[];if(n&&t===f)r.push(e[t].slice(c[0].length,-n[0].length));else for(let o=t;o<=f;o++)if(o===t){const t=e[o].slice(c[0].length);r.push(t)}else if(o===f&&n){const t=e[o].slice(0,-n[0].length);r.push(t)}else r.push(e[o]);if(!1!==l(o,null,c,n,r,!0))return[!0,f];break}}return[!1,t]}function Te(t,n,o,l,c,a){const d=e.$createTextNode(t),f=e.$createParagraphNode();f.append(d),n.append(f);for(const{regExp:e,replace:n}of o){const o=t.match(e);if(o&&(d.setTextContent(t.slice(o[0].length)),!1!==n(f,[d],o,!0)))break}if(me(d,l,c),f.isAttached()&&t.length>0){const t=f.getPreviousSibling();if(!a&&(e.$isParagraphNode(t)||i.$isQuoteNode(t)||r.$isListNode(t))){let e=t;if(r.$isListNode(t)){const n=t.getLastDescendant();e=null==n?null:s.$findMatchingParent(n,r.$isListItemNode)}null!=e&&e.getTextContentSize()>0&&(e.splice(e.getChildrenSize(),0,[M(e),...f.getChildren()]),f.remove())}}}function Ce(t){const n=new Set,o=t.getTextContent();let r=o.indexOf("\t");for(;-1!==r;)n.add(r),n.add(r+1),r=o.indexOf("\t",r+1);t.splitText(...n).forEach(t=>{"\t"===t.getTextContent()&&t.replace(e.$createTabNode())})}function Ee(e,...t){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const e of t)o.append("v",e);throw n.search=o.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 Se(t,n,o,r,i){const s=t.getParent();if(!e.$isRootOrShadowRoot(s)||t.getFirstChild()!==n)return!1;const l=n.getTextContent();if(!i&&" "!==l[o-1])return!1;for(const{regExp:e,replace:s}of r){const r=l.match(e),c=i||r&&r[0].endsWith(" ")?o:o-1;if(r&&r[0].length===c){const e=n.getNextSiblings(),[i,l]=n.splitText(o);if(!1!==s(t,l?[l,...e]:e,r,!1))return i.remove(),!0}}return!1}function Ie(t,n,o,r,i){const s=t.getParent();if(!e.$isRootOrShadowRoot(s)||t.getFirstChild()!==n)return!1;const l=n.getTextContent();if(!i&&" "!==l[o-1])return!1;for(const{regExpStart:e,replace:s,regExpEnd:c}of r){if(c&&!("optional"in c)||c&&"optional"in c&&!c.optional)continue;const r=l.match(e);if(r){const e=i||r[0].endsWith(" ")?o:o-1;if(r[0].length!==e)continue;const l=n.getNextSiblings(),[c,a]=n.splitText(o);if(!1!==s(t,a?[a,...l]:l,r,null,null,!1))return c.remove(),!0}}return!1}function Le(e,t){let n=0;const o=e.getTextContent();for(let e=0;e<t;e++)"`"===o[e]&&n++;return n%2!=0}function Re(e,t,n){const o=n.length;for(let r=t;r>=o;r--){const t=r-o;if(ve(e,t,n,0,o)&&" "!==e[t+o])return t}return-1}function ve(e,t,n,o,r){for(let i=0;i<r;i++)if(e[t+i]!==n[o+i])return!1;return!0}exports.$convertFromMarkdownString=function(e,t=oe,n,o=!1,r=!1){const i=o?e:function(e,t=!1){const n=e.split("\n");let o=!1;const r=[];for(let e=0;e<n.length;e++){const i=n[e],s=i.trimEnd(),l=r[r.length-1],c=e<n.length-1?k(i):null,a=void 0!==l&&null!==k(l);E.test(s)?r.push(s):T.test(s)||C.test(s)?(o=!o,r.push(s)):o?r.push(i):""===s||""===l||!l||$.test(l)||$.test(s)||N.test(s)||h.test(s)||x.test(s)||m.test(s)||S.test(s)||I.test(s)||a||!t||L.test(s)||R.test(s)||v(R).test(l)||v(L).test(l)||C.test(l)?r.push(!t&&""!==s||null!==c?i:s):r[r.length-1]=l+" "+(null===c?s:i).trimStart()}return r.join("\n")}(e,r);return $e(t,o)(i,n)},exports.$convertSelectionToMarkdownString=function(t=oe,n,o=!1){if(!n||e.$isRangeSelection(n)&&n.isCollapsed())return"";const r=function(t,n=!1){const o=c(t),r=[...o.multilineElement,...o.element],i=!n,s=o.textFormat.filter(e=>1===e.format.length).sort((e,t)=>Number(e.format.includes("code"))-Number(t.format.includes("code")));return t=>{const l=[],c=e.$getRoot().getChildren();for(let e=0;e<c.length;e++){const a=c[e],{shouldInclude:d,markdown:f}=re(a,t,r,s,o.textMatch,n);d&&null!=f&&l.push(i&&e>0&&!g(a)&&!g(c[e-1])?"\n".concat(f):f)}return l.join("\n")}}(t,o);return r(n)},exports.$convertToMarkdownString=function(t=oe,n,o=!1){return function(t,n=!1){const o=c(t),r=[...o.multilineElement,...o.element],i=!n,s=o.textFormat.filter(e=>1===e.format.length).sort((e,t)=>Number(e.format.includes("code"))-Number(t.format.includes("code")));return t=>{const l=[],c=(t||e.$getRoot()).getChildren();for(let e=0;e<c.length;e++){const t=c[e],a=se(t,r,s,o.textMatch,n);null!=a&&l.push(i&&e>0&&!g(t)&&!g(c[e-1])?"\n".concat(a):a)}return l.join("\n")}}(t,o)(n)},exports.BOLD_ITALIC_STAR=W,exports.BOLD_ITALIC_UNDERSCORE=q,exports.BOLD_STAR=Q,exports.BOLD_UNDERSCORE=K,exports.CHECK_LIST=j,exports.CODE=P,exports.ELEMENT_TRANSFORMERS=Z,exports.HEADING=B,exports.HIGHLIGHT=G,exports.INLINE_CODE=z,exports.ITALIC_STAR=X,exports.ITALIC_UNDERSCORE=J,exports.LINK=V,exports.MULTILINE_ELEMENT_TRANSFORMERS=ee,exports.ORDERED_LIST=U,exports.QUOTE=D,exports.STRIKETHROUGH=Y,exports.TEXT_FORMAT_TRANSFORMERS=te,exports.TEXT_MATCH_TRANSFORMERS=ne,exports.TRANSFORMERS=oe,exports.UNORDERED_LIST=H,exports.registerMarkdownShortcuts=function(t,o=oe){const r=c(o),i=r.element.filter(e=>e.triggerOnEnter),s=l(r.textFormat,({tag:e})=>e[e.length-1]),d=l(r.textMatch,({trigger:e})=>e),f=new Set([" "]);for(const e of r.textFormat)f.add(e.tag.slice(-1));for(const e of r.textMatch)void 0!==e.trigger&&f.add(e.trigger);for(const e of o){const n=e.type;if("element"===n||"text-match"===n||"multiline-element"===n){const n=e.dependencies;for(const e of n)t.hasNode(e)||Ee(173,e.getType())}}const u=(t,n,o)=>!!Se(t,n,o,r.element)||(!!Ie(t,n,o,r.multilineElement)||(!!function(e,t,n){let o=e.getTextContent();const r=n[o[t-1]];if(null==r)return!1;t<o.length&&(o=o.slice(0,t));for(const t of r){if(!t.replace||!t.regExp)continue;const n=o.match(t.regExp);if(null===n)continue;const r=n.index||0,i=r+n[0].length;let s;return 0===r?[s]=e.splitText(i):[,s]=e.splitText(r,i),s.selectNext(0,0),t.replace(s,n),!0}return!1}(n,o,d)||!!function(t,n,o){const r=t.getTextContent(),i=n-1,s=r[i],l=o[s];if(!l)return!1;for(const n of l){const{tag:o}=n,l=o.length,c=i-l+1;if(l>1&&!ve(r,c,o,0,l))continue;if(" "===r[c-1])continue;const d=r[i+1];if(!1===n.intraword&&d&&!a.test(d))continue;const f=t;let u=f,g=Re(r,c,o),p=u;for(;g<0&&(p=p.getPreviousSibling())&&!e.$isLineBreakNode(p);)if(e.$isTextNode(p)){if(p.hasFormat("code"))continue;const e=p.getTextContent();u=p,g=Re(e,e.length,o)}if(g<0)continue;if(u===f&&g+l===c)continue;const h=u.getTextContent();if(g>0&&h[g-1]===s)continue;const x=h[g-1];if(!1===n.intraword&&x&&!a.test(x))continue;if(!n.format.includes("code")&&Le(u,g))continue;const m=f.getTextContent(),$=m.slice(0,c)+m.slice(i+1);f.setTextContent($);const N=u===f?$:h;u.setTextContent(N.slice(0,g)+N.slice(g+l));const T=e.$getSelection(),C=e.$createRangeSelection();e.$setSelection(C);const E=i-l*(u===f?2:1)+1;C.anchor.set(u.__key,g,"text"),C.focus.set(f.__key,E,"text");for(const e of n.format)C.hasFormat(e)||C.formatText(e);C.anchor.set(C.focus.key,C.focus.offset,C.focus.type);for(const e of n.format)C.hasFormat(e)&&C.toggleFormat(e);return e.$isRangeSelection(T)&&(C.format=T.format),!0}return!1}(n,o,s)));return e.mergeRegister(t.registerUpdateListener(({tags:o,dirtyLeaves:r,editorState:i,prevEditorState:s})=>{if(o.has(e.COLLABORATION_TAG)||o.has(e.HISTORIC_TAG))return;if(t.isComposing())return;const l=o.has(e.COMPOSITION_END_TAG),c=i.read(e.$getSelection),a=s.read(e.$getSelection);if(!e.$isRangeSelection(a)||!e.$isRangeSelection(c)||!c.isCollapsed()||c.is(a)&&!l)return;const d=c.anchor.key,g=c.anchor.offset,p=i._nodeMap.get(d);if(e.$isTextNode(p)&&r.has(d)&&(l||1===g||!(g>a.anchor.offset+1))){if(l){const e=i.read(()=>p.getTextContent())[g-1];if(!f.has(e))return}t.update(()=>{if(!xe(p))return;const t=p.getParent();null===t||n.$isCodeNode(t)||u(t,p,c.anchor.offset)&&e.$addUpdateTag(e.HISTORY_PUSH_TAG)})}}),t.registerCommand(e.KEY_ENTER_COMMAND,t=>{if(null!==t&&t.shiftKey)return!1;const o=e.$getSelection();if(!e.$isRangeSelection(o)||!o.isCollapsed())return!1;const s=o.anchor.offset,l=o.anchor.getNode();if(!e.$isTextNode(l)||!xe(l))return!1;const c=l.getParent();if(null===c||n.$isCodeNode(c))return!1;return s===l.getTextContent().length&&(!(!Ie(c,l,s,r.multilineElement,!0)&&!Se(c,l,s,i,!0))&&(null!==t&&t.preventDefault(),!0))},e.COMMAND_PRIORITY_LOW))};+diff --git a/dist/LexicalMarkdown.prod.mjs b/dist/LexicalMarkdown.prod.mjs+index 47a032f..6f249c3 100644+--- a/dist/LexicalMarkdown.prod.mjs++++ b/dist/LexicalMarkdown.prod.mjs+@@ -6,4 +6,4 @@+ *+ */++-import{$isParagraphNode as t,$isTextNode as e,createState as n,$setState as o,$createTextNode as r,$getState as i,$findMatchingParent as s,$createLineBreakNode as l,$isLineBreakNode as c,$getRoot as a,$isElementNode as f,$isDecoratorNode as u,$getSelection as d,$createParagraphNode as g,$createTabNode as p,mergeRegister as h,COLLABORATION_TAG as x,HISTORIC_TAG as m,COMPOSITION_END_TAG as C,$isRangeSelection as T,$addUpdateTag as E,HISTORY_PUSH_TAG as $,KEY_ENTER_COMMAND as v,COMMAND_PRIORITY_LOW as I,$isRootOrShadowRoot as y,$createRangeSelection as S,$setSelection as b}from"lexical";import{$sliceSelectedTextNodeContent as w}from"@lexical/selection";import{CodeNode as k,$createCodeNode as N,$isCodeNode as F}from"@lexical/code-core";import{LinkNode as L,$isLinkNode as O,$createLinkNode as M,$isAutoLinkNode as R}from"@lexical/link";import{ListNode as B,ListItemNode as _,$isListNode as j,$createListItemNode as A,$createListNode as P,$isListItemNode as z}from"@lexical/list";import{HeadingNode as W,QuoteNode as U,$isHeadingNode as D,$isQuoteNode as H,$createQuoteNode as K,$createHeadingNode as q}from"@lexical/rich-text";import{$findMatchingParent as G}from"@lexical/utils";function J(t,e){const n={};for(const o of t){const t=e(o);t&&(n[t]?n[t].push(o):n[t]=[o])}return n}function Q(t){const e=J(t,t=>t.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const V=/[!-/:-@[-`{-~\s]/,X=/\s/,Y=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,Z=/^\s{0,3}$/;function tt(n){if(!t(n))return!1;const o=n.getFirstChild();return null==o||1===n.getChildrenSize()&&e(o)&&Z.test(o.getTextContent())}function et(t){return t.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,e)=>String.fromCodePoint(Number(e)))}const nt=/^(\s*)(\d{1,})\.\s/,ot=/^(\s*)[-*+]\s/,rt=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,it=/^(#{1,6})\s/,st=/^>\s/,lt=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,ct=/^[ \t]*`{3,}$/,at=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,ft=/^(?:\|)(.+)(?:\|)\s?$/,ut=/^(\| ?:?-*:? ?)+\|\s?$/,dt=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,gt=/^<\/[a-z_][\w-]*\s*>/i,pt=t=>new RegExp(`(?:${t.source})$`,t.flags),ht=n("mdListMarker",{parse:t=>"string"==typeof t&&/^[-*+]$/.test(t)?t:"-",resetOnCopyNode:!0}),xt=n("mdCodeFence",{parse:t=>"string"==typeof t&&/^`{3,}$/.test(t)?t:"```",resetOnCopyNode:!0}),mt=n("mdHardLineBreak",{parse:t=>"string"==typeof t&&/^(\\| {2,})$/.test(t)?t:"",resetOnCopyNode:!0});function Ct(t){if(t.endsWith("\\"))return[t.slice(0,-1),"\\"];const e=t.match(/^(.*?\S)( {2,})$/);return e?[e[1],e[2]]:null}function Tt(t){const n=t.getChildren(),o=n.length-1,r=n[o];if(!e(r))return null;const i=r.getTextContent(),s=Ct(i);if(null!==s){const[t,e]=s;return r.setTextContent(t),e}return/^ {2,}$/.test(i)&&function(t,e){for(let n=e-1;n>=0;n--){if(c(t[n]))return!1;if(/\S/.test(t[n].getTextContent()))return!0}return!1}(n,o)?(r.setTextContent(""),i):null}function Et(t){const e=l(),n=Tt(t);return null!==n&&o(e,mt,n),e}const $t=t=>(e,n,o,r)=>{const i=t(o);i.append(...n),e.replace(i),r||i.select(0,0)};const vt=t=>(e,n,r,i)=>{const s=e.getPreviousSibling(),l=e.getNextSibling(),c=A("check"===t?"x"===r[3]:void 0),a=r[0].trim()[0],f="bullet"!==t&&"check"!==t||a!==ht.parse(a)?void 0:a;if(j(l)&&l.getListType()===t){f&&o(l,ht,f);const t=l.getFirstChild();null!==t?t.insertBefore(c):l.append(c),e.remove()}else if(j(s)&&s.getListType()===t)f&&o(s,ht,f),s.append(c),e.remove();else{const n=P(t,"number"===t?Number(r[2]):void 0);f&&o(n,ht,f),n.append(c),e.replace(n)}c.append(...n),i||c.select(0,0);const u=function(t){const e=t.match(/\t/g),n=t.match(/ /g);let o=0;return e&&(o+=e.length),n&&(o+=Math.floor(n.length/4)),o}(r[1]);u&&c.setIndent(u)},It=(t,e,n,o)=>{const r=[],s=t.getChildren();let l=0;for(const c of s)if(z(c)){if(1===c.getChildrenSize()){const t=c.getFirstChild();if(j(t)){const i=It(t,e,n+1,o);i&&r.push(i);continue}}if(o&&!c.getChildren().some(t=>t.isSelected(o)))continue;const s=" ".repeat(4*n),a=t.getListType(),f=i(t,ht),u="number"===a?`${t.getStart()+l}. `:"check"===a?`${f} [${c.getChecked()?"x":" "}] `:f+" ";let d=e(c);"number"!==a&&(d=d.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),r.push(s+u+d),l++}return r.join("\n")},yt={dependencies:[W],export:(t,e)=>{if(!D(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:it,replace:$t(t=>{const e="h"+t[1].length;return q(e)}),triggerOnEnter:!0,type:"element"},St={dependencies:[U],export:(t,e)=>{if(!H(t))return null;const n=e(t).split("\n"),o=[];for(const t of n)o.push("> "+t);return o.join("\n")},regExp:st,replace:(t,e,n,o)=>{if(o){const n=t.getPreviousSibling();if(H(n))return n.splice(n.getChildrenSize(),0,[Et(n),...e]),void t.remove()}const r=K();r.append(...e),t.replace(r),o||r.select(0,0)},triggerOnEnter:!0,type:"element"},bt={dependencies:[k],export:t=>{if(!F(t))return null;const e=t.getTextContent();let n=i(t,xt);if(e.indexOf(n)>-1){const t=e.match(/`{3,}/g);if(t){const e=Math.max(...t.map(t=>t.length));n="`".repeat(e+1)}}return n+(t.getLanguage()||"")+(e?"\n"+e:"")+"\n"+n},handleImportAfterStartMatch:({lines:t,rootNode:e,startLineIndex:n,startMatch:o})=>{const r=o[1],i=r.trim().length,s=t[n],l=o.index+r.length,c=s.slice(l),a=new RegExp(`\`{${i},}$`);if(a.test(c)){const t=c.match(a),r=c.slice(0,c.lastIndexOf(t[0])),i=[...o];return i[2]="",bt.replace(e,null,i,t,[r],!0),[!0,n]}const f=new RegExp(`^[ \\t]*\`{${i},}$`);for(let r=n+1;r<t.length;r++){const i=t[r];if(f.test(i)){const l=i.match(f),c=t.slice(n+1,r),a=s.slice(o[0].length);return a.length>0&&c.unshift(a),bt.replace(e,null,o,l,c,!0),[!0,r]}}const u=t.slice(n+1),d=s.slice(o[0].length);return d.length>0&&u.unshift(d),bt.replace(e,null,o,null,u,!0),[!0,t.length-1]},regExpEnd:{optional:!0,regExp:ct},regExpStart:lt,replace:(t,e,n,i,s,l)=>{let c,a;const f=n[1]?n[1].trim():"```",u=n[2]||void 0;if(!e&&s){if(1===s.length)i?(c=N(u),a=s[0]):(c=N(u),a=s[0].startsWith(" ")?s[0].slice(1):s[0]);else{for(c=N(u),s.length>0&&(0===s[0].trim().length?s.shift():s[0].startsWith(" ")&&(s[0]=s[0].slice(1)));s.length>0&&!s[s.length-1].length;)s.pop();a=s.join("\n")}o(c,xt,f);const e=r(a);c.append(e),t.append(c)}else e&&$t(t=>N(t?t[2]:void 0))(t,e,n,l)},type:"multiline-element"},wt={dependencies:[B,_],export:(t,e,n)=>j(t)?It(t,e,0,n):null,regExp:ot,replace:vt("bullet"),triggerOnEnter:!0,type:"element"},kt={dependencies:[B,_],export:(t,e,n)=>j(t)?It(t,e,0,n):null,regExp:rt,replace:vt("check"),triggerOnEnter:!0,type:"element"},Nt={dependencies:[B,_],export:(t,e,n)=>j(t)?It(t,e,0,n):null,regExp:nt,replace:vt("number"),triggerOnEnter:!0,type:"element"},Ft={format:["code"],tag:"`",type:"text-format"},Lt={format:["highlight"],tag:"==",type:"text-format"},Ot={format:["bold","italic"],tag:"***",type:"text-format"},Mt={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Rt={format:["bold"],tag:"**",type:"text-format"},Bt={format:["bold"],intraword:!1,tag:"__",type:"text-format"},_t={format:["strikethrough"],tag:"~~",type:"text-format"},jt={format:["italic"],tag:"*",type:"text-format"},At={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Pt={dependencies:[L],export:(t,e,n)=>{if(!O(t)||R(t))return null;const o=e(t);let r=t.getTitle();null!=r&&(r=r.replace(/([\\"])/g,"\\$1"));return r?`[${o}](${t.getURL()} "${r}")`:`[${o}](${t.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{if(s(t,O))return;const[,n,o,i]=e,l=null!=o?et(o):void 0,c=null!=i?et(i):void 0,a=M(l,{title:c}),f=n.split("[").length-1,u=n.split("]").length-1;let d=n,g="";if(f<u)return;if(f>u){const t=n.split("[");g="["+t[0],d=t.slice(1).join("[")}const p=r(d);return p.setFormat(t.getFormat()),a.append(p),t.replace(a),g&&a.insertBefore(r(g)),p},trigger:")",type:"text-match"},zt=[yt,St,wt,Nt],Wt=[bt],Ut=[Ft,Ot,Mt,Rt,Bt,Lt,jt,At,_t],Dt=[Pt],Ht=[...zt,...Wt,...Ut,...Dt];function Kt(t,e,n,o,r,i){let s=t.isSelected(e);for(const l of n){if(!l.export)continue;const n=l.export(t,t=>qt(t,e,o,r,i).markdown,e);if(null!=n){if(!s&&f(t)){qt(t,e,o,r,i).shouldInclude&&(s=!0)}return{markdown:n,shouldInclude:s}}}if(f(t)){const n=qt(t,e,o,r,i);return{markdown:n.markdown,shouldInclude:s||n.shouldInclude}}return u(t)?{markdown:t.getTextContent(),shouldInclude:s}:{markdown:null,shouldInclude:s}}function qt(t,n,o,r,i,s,l){const a=[],d=t.getChildren();let g=!1;s||(s=[]),l||(l=[]);t:for(const t of d){let d=t.isSelected(n);for(const e of r){if(!e.export)continue;const c=e.export(t,t=>qt(t,n,o,r,i,s,[...l,...s]).markdown,(t,e)=>Vt(t,w(n,t,"clone").getTextContent(),o,s,l,i));if(null!=c){!d&&f(t)&&t.getChildren().some(t=>t.isSelected(n))&&t.extractWithChild(t,n,"html")&&(d=!0),d&&(a.push(c),g=!0);continue t}}if(c(t))d&&(a.push(Qt(t)),g=!0);else if(e(t)){if(d){const e=w(n,t,"clone");a.push(Vt(t,e.getTextContent(),o,s,l,i)),g=!0}}else if(f(t)){const e=qt(t,n,o,r,i,s,l);!d&&e.shouldInclude&&t.extractWithChild(t,n,"html")&&(d=!0),(d||e.shouldInclude)&&(a.push(e.markdown),g=!0)}else u(t)&&d&&(a.push(t.getTextContent()),g=!0)}return{markdown:a.join(""),shouldInclude:g}}function Gt(t,e,n,o,r){for(const i of e){if(!i.export)continue;const e=i.export(t,t=>Jt(t,n,o,void 0,void 0,r));if(null!=e)return e}return f(t)?Jt(t,n,o,void 0,void 0,r):u(t)?t.getTextContent():null}function Jt(t,n,o,r,i,s=!1){const l=[],a=t.getChildren();r||(r=[]),i||(i=[]);t:for(const t of a){for(const e of o){if(!e.export)continue;const c=e.export(t,t=>Jt(t,n,o,r,[...i,...r],s),(t,e)=>Vt(t,e,n,r,i,s));if(null!=c){l.push(c);continue t}}c(t)?l.push(Qt(t)):e(t)?l.push(Vt(t,t.getTextContent(),n,r,i,s)):f(t)?l.push(Jt(t,n,o,r,i,s)):u(t)&&l.push(t.getTextContent())}return l.join("")}function Qt(t){return i(t,mt)+"\n"}function Vt(t,e,n,o,r,i=!1){let s=e;t.hasFormat("code")||(s=i?s.replace(/([*_`~])/g,"\\$1"):s.replace(/([*_`~\\])/g,"\\$1"));const l=s.match(/^(\s*)(.*?)(\s*)$/s)||["","",s,""],c=l[1],a=l[2],f=l[3],u=""===a;let d="",g="",p="";const h=Xt(t,!0),x=Xt(t,!1),m=new Set;for(const e of n){const n=e.format[0],r=e.tag;Zt(t,n)&&!m.has(n)&&(m.add(n),Zt(h,n)&&o.find(t=>t.tag===r)||(o.push({format:n,tag:r}),d+=r))}for(let e=0;e<o.length;e++){const n=Yt(t,o[e].format),i=Yt(x,o[e].format);if(n&&i)continue;const s=[...o];for(;s.length>e;){const t=s.pop();r&&t&&r.find(e=>e.tag===t.tag)||(t&&"string"==typeof t.tag&&(n?i||(p+=t.tag):g+=t.tag),o.pop())}break}return u&&!t.hasFormat("code")?g+s:g+c+d+a+p+f}function Xt(t,n){const o=n?t.getPreviousSibling():t.getNextSibling();return e(o)?o:null}function Yt(t,n){return e(t)&&t.hasFormat(n)}function Zt(t,e){return!!Yt(t,e)&&("code"===e||(!t||!/^\s*$/.test(t.getTextContent())))}function te(t,e){const n=t.getTextContent(),o=e.fullMatchRegExpByTag["`"],r=e.transformersByTag["`"],i=[];let s=null;if(o&&r){const t=new RegExp(o.source,"g"),e=Array.from(n.matchAll(t));for(const t of e){const e=t.index+t[1].length,n=t.index+t[0].length;s||(s={content:t[3],endIndex:n,startIndex:e,tag:"`"}),i.push({end:n,start:e})}}const l=function(t,e,n=[]){const o=[],r=new Set(Object.keys(e.transformersByTag).filter(t=>"`"!==t[0]).map(t=>t[0])),i=e=>{let n=0;for(let o=e-1;o>=0&&"\\"===t[o];o--)n++;return n%2==1},s=t=>n.some(e=>t>=e.start&&t<e.end);let l=0;for(;l<t.length;){const e=t[l];if(!r.has(e)||i(l)||s(l)){l++;continue}let n=1;for(;l+n<t.length&&t[l+n]===e;)n++;const c=ee(e,t,l,n,!0),a=ee(e,t,l,n,!1);(c||a)&&o.push({active:!0,canClose:a,canOpen:c,char:e,index:l,length:n,originalLength:n}),l+=n}return o}(n,e,i),c=l.length>0?function(t,e,n){const o={};let r=0,i=null;for(;r<e.length;){const s=e[r];if(!s.active||!s.canClose||0===s.length){r++;continue}const l=`${s.char}${s.canOpen}`,c=o[l]??-1;let a=!1;for(let o=r-1;o>c;o--){const l=e[o];if(!l.active||!l.canOpen||0===l.length||l.char!==s.char)continue;if(l.canClose||s.canOpen){if((l.originalLength+s.originalLength)%3==0&&l.originalLength%3!=0&&s.originalLength%3!=0)continue}const c=Math.min(l.length,s.length),f=Object.keys(n.transformersByTag).filter(t=>t[0]===l.char&&t.length<=c).sort((t,e)=>e.length-t.length)[0];if(!f)continue;a=!0;const u=f.length,d={content:t.slice(l.index+l.length,s.index),endIndex:s.index+u,startIndex:l.index+(l.length-u),tag:f};(!i||d.startIndex<i.startIndex||d.startIndex===i.startIndex&&d.endIndex>i.endIndex)&&(i=d);for(let t=o+1;t<r;t++)e[t].active=!1;l.length-=u,s.length-=u,l.active=l.length>0,s.length>0?s.index+=u:(s.active=!1,r++);break}a||(o[l]=r-1,s.canOpen||(s.active=!1),r++)}return i}(n,l,e):null;let a=null,f=null;if(s&&c?c.startIndex<=s.startIndex&&c.endIndex>=s.endIndex?(a=c,f=e.transformersByTag[c.tag]):(a=s,f=r):s?(a=s,f=r):c&&(a=c,f=e.transformersByTag[c.tag]),!a||!f)return null;const u=[n.slice(a.startIndex,a.endIndex),a.tag,a.content];return u.index=a.startIndex,u.input=n,{endIndex:a.endIndex,match:u,startIndex:a.startIndex,transformer:f}}function ee(t,e,n,o,r){if(!ne(e,n,o,r))return!1;if("*"===t)return!0;if("_"===t){if(!ne(e,n,o,!r))return!0;const t=r?e[n-1]:e[n+o];return void 0!==t&&Y.test(t)}return!0}function ne(t,e,n,o){const r=t[e-1],i=t[e+n],[s,l]=o?[i,r]:[r,i];return void 0!==s&&!X.test(s)&&(!Y.test(s)||(void 0===l||X.test(l)||Y.test(l)))}function oe(t){return e(t)&&!t.hasFormat("code")}function re(t,e,n){let o=te(t,e),r=function(t,e){const n=t;let o,r,i,s;for(const t of e){if(!t.replace||!t.importRegExp)continue;const e=n.getTextContent().match(t.importRegExp);if(!e)continue;const l=e.index||0,c=t.getEndIndex?t.getEndIndex(n,e):l+e[0].length;!1!==c&&(void 0===o||void 0===r||l<o&&(c>r||c<=o))&&(o=l,r=c,i=t,s=e)}return void 0===o||void 0===r||void 0===i||void 0===s?null:{endIndex:r,match:s,startIndex:o,transformer:i}}(t,n);if(o&&r&&(o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex||r.startIndex>o.endIndex?r=null:o=null),o){const r=function(t,e,n,o,r){const i=t.getTextContent();let s,l,c;if(r[0]===i?s=t:0===e?[s,l]=t.splitText(n):[c,s,l]=t.splitText(e,n),s.setTextContent(r[2]),o)for(const t of o.format)s.hasFormat(t)||s.toggleFormat(t);return{nodeAfter:l,nodeBefore:c,transformedNode:s}}(t,o.startIndex,o.endIndex,o.transformer,o.match);oe(r.nodeAfter)&&re(r.nodeAfter,e,n),oe(r.nodeBefore)&&re(r.nodeBefore,e,n),oe(r.transformedNode)&&re(r.transformedNode,e,n)}else if(r){const o=function(t,e,n,o,r){let i,s,l;return 0===e?[i,s]=t.splitText(n):[l,i,s]=t.splitText(e,n),o.replace?{nodeAfter:s,nodeBefore:l,transformedNode:o.replace(i,r)||void 0}:null}(t,r.startIndex,r.endIndex,r.transformer,r.match);if(!o)return;oe(o.nodeAfter)&&re(o.nodeAfter,e,n),oe(o.nodeBefore)&&re(o.nodeBefore,e,n),oe(o.transformedNode)&&re(o.transformedNode,e,n)}const i=et(t.getTextContent());t.setTextContent(i)}function ie(t,e=!1){const n=Q(t),o=function(t){const e={},n={},o=[];for(const r of t){const{tag:t}=r;e[t]=r;const i=t.replace(/(\*|\^|\+)/g,"\\$1");o.push(i),1===t.length?n[t]="`"===t?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${i}])(${i})((\\\\${i})?.*?[^${i}\\s](\\\\${i})?)(${i})(?![\\\\${i}])`):n[t]=new RegExp(`(^|[^\\\\])(${i})((\\\\${i})?.*?[^\\s](\\\\${i})?)(${i})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp(`(${o.join("|")})`,"g"),transformersByTag:e}}(n.textFormat);return(t,r)=>{const i=t.split("\n"),s=i.length,l=r||a();l.clear();for(let t=0;t<s;t++){const r=i[t],[s,c]=se(i,t,n.multilineElement,l);s?t=c:le(r,l,n.element,o,n.textMatch,e)}const c=l.getChildren();for(const t of c)if(!e&&tt(t)&&l.getChildrenSize()>1)t.remove();else if(f(t))for(const e of t.getAllTextNodes())ce(e);null!==d()&&l.selectStart()}}function se(t,e,n,o){for(const r of n){const{handleImportAfterStartMatch:n,regExpEnd:i,regExpStart:s,replace:l}=r,c=t[e].match(s);if(!c)continue;if(n){const i=n({lines:t,rootNode:o,startLineIndex:e,startMatch:c,transformer:r});if(null===i)continue;if(i)return i}const a="object"==typeof i&&"regExp"in i?i.regExp:i,f=i&&"object"==typeof i&&"optional"in i?i.optional:!i;let u=e;const d=t.length;for(;u<d;){const n=a?t[u].match(a):null;if(!n&&(!f||f&&u<d-1)){u++;continue}if(n&&e===u&&n.index===c.index){u++;continue}const r=[];if(n&&e===u)r.push(t[e].slice(c[0].length,-n[0].length));else for(let o=e;o<=u;o++)if(o===e){const e=t[o].slice(c[0].length);r.push(e)}else if(o===u&&n){const e=t[o].slice(0,-n[0].length);r.push(e)}else r.push(t[o]);if(!1!==l(o,null,c,n,r,!0))return[!0,u];break}}return[!1,e]}function le(e,n,o,i,s,l){const c=r(e),a=g();a.append(c),n.append(a);for(const{regExp:t,replace:n}of o){const o=e.match(t);if(o&&(c.setTextContent(e.slice(o[0].length)),!1!==n(a,[c],o,!0)))break}if(re(c,i,s),a.isAttached()&&e.length>0){const e=a.getPreviousSibling();if(!l&&(t(e)||H(e)||j(e))){let t=e;if(j(e)){const n=e.getLastDescendant();t=null==n?null:G(n,z)}null!=t&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[Et(t),...a.getChildren()]),a.remove())}}}function ce(t){const e=new Set,n=t.getTextContent();let o=n.indexOf("\t");for(;-1!==o;)e.add(o),e.add(o+1),o=n.indexOf("\t",o+1);t.splitText(...e).forEach(t=>{"\t"===t.getTextContent()&&t.replace(p())})}function ae(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function fe(t,e,n,o,r){const i=t.getParent();if(!y(i)||t.getFirstChild()!==e)return!1;const s=e.getTextContent();if(!r&&" "!==s[n-1])return!1;for(const{regExp:i,replace:l}of o){const o=s.match(i),c=r||o&&o[0].endsWith(" ")?n:n-1;if(o&&o[0].length===c){const r=e.getNextSiblings(),[i,s]=e.splitText(n);if(!1!==l(t,s?[s,...r]:r,o,!1))return i.remove(),!0}}return!1}function ue(t,e,n,o,r){const i=t.getParent();if(!y(i)||t.getFirstChild()!==e)return!1;const s=e.getTextContent();if(!r&&" "!==s[n-1])return!1;for(const{regExpStart:i,replace:l,regExpEnd:c}of o){if(c&&!("optional"in c)||c&&"optional"in c&&!c.optional)continue;const o=s.match(i);if(o){const i=r||o[0].endsWith(" ")?n:n-1;if(o[0].length!==i)continue;const s=e.getNextSiblings(),[c,a]=e.splitText(n);if(!1!==l(t,a?[a,...s]:s,o,null,null,!1))return c.remove(),!0}}return!1}function de(t,e){let n=0;const o=t.getTextContent();for(let t=0;t<e;t++)"`"===o[t]&&n++;return n%2!=0}function ge(t,e,n){const o=n.length;for(let r=e;r>=o;r--){const e=r-o;if(pe(t,e,n,0,o)&&" "!==t[e+o])return e}return-1}function pe(t,e,n,o,r){for(let i=0;i<r;i++)if(t[e+i]!==n[o+i])return!1;return!0}function he(t,n=Ht){const o=Q(n),r=o.element.filter(t=>t.triggerOnEnter),i=J(o.textFormat,({tag:t})=>t[t.length-1]),s=J(o.textMatch,({trigger:t})=>t),l=new Set([" "]);for(const t of o.textFormat)l.add(t.tag.slice(-1));for(const t of o.textMatch)void 0!==t.trigger&&l.add(t.trigger);for(const e of n){const n=e.type;if("element"===n||"text-match"===n||"multiline-element"===n){const n=e.dependencies;for(const e of n)t.hasNode(e)||ae(173,e.getType())}}const a=(t,n,r)=>!!fe(t,n,r,o.element)||(!!ue(t,n,r,o.multilineElement)||(!!function(t,e,n){let o=t.getTextContent();const r=n[o[e-1]];if(null==r)return!1;e<o.length&&(o=o.slice(0,e));for(const e of r){if(!e.replace||!e.regExp)continue;const n=o.match(e.regExp);if(null===n)continue;const r=n.index||0,i=r+n[0].length;let s;return 0===r?[s]=t.splitText(i):[,s]=t.splitText(r,i),s.selectNext(0,0),e.replace(s,n),!0}return!1}(n,r,s)||!!function(t,n,o){const r=t.getTextContent(),i=n-1,s=r[i],l=o[s];if(!l)return!1;for(const n of l){const{tag:o}=n,l=o.length,a=i-l+1;if(l>1&&!pe(r,a,o,0,l))continue;if(" "===r[a-1])continue;const f=r[i+1];if(!1===n.intraword&&f&&!V.test(f))continue;const u=t;let g=u,p=ge(r,a,o),h=g;for(;p<0&&(h=h.getPreviousSibling())&&!c(h);)if(e(h)){if(h.hasFormat("code"))continue;const t=h.getTextContent();g=h,p=ge(t,t.length,o)}if(p<0)continue;if(g===u&&p+l===a)continue;const x=g.getTextContent();if(p>0&&x[p-1]===s)continue;const m=x[p-1];if(!1===n.intraword&&m&&!V.test(m))continue;if(!n.format.includes("code")&&de(g,p))continue;const C=u.getTextContent(),E=C.slice(0,a)+C.slice(i+1);u.setTextContent(E);const $=g===u?E:x;g.setTextContent($.slice(0,p)+$.slice(p+l));const v=d(),I=S();b(I);const y=i-l*(g===u?2:1)+1;I.anchor.set(g.__key,p,"text"),I.focus.set(u.__key,y,"text");for(const t of n.format)I.hasFormat(t)||I.formatText(t);I.anchor.set(I.focus.key,I.focus.offset,I.focus.type);for(const t of n.format)I.hasFormat(t)&&I.toggleFormat(t);return T(v)&&(I.format=v.format),!0}return!1}(n,r,i)));return h(t.registerUpdateListener(({tags:n,dirtyLeaves:o,editorState:r,prevEditorState:i})=>{if(n.has(x)||n.has(m))return;if(t.isComposing())return;const s=n.has(C),c=r.read(d),f=i.read(d);if(!T(f)||!T(c)||!c.isCollapsed()||c.is(f)&&!s)return;const u=c.anchor.key,g=c.anchor.offset,p=r._nodeMap.get(u);if(e(p)&&o.has(u)&&(s||1===g||!(g>f.anchor.offset+1))){if(s){const t=r.read(()=>p.getTextContent())[g-1];if(!l.has(t))return}t.update(()=>{if(!oe(p))return;const t=p.getParent();null===t||F(t)||a(t,p,c.anchor.offset)&&E($)})}}),t.registerCommand(v,t=>{if(null!==t&&t.shiftKey)return!1;const n=d();if(!T(n)||!n.isCollapsed())return!1;const i=n.anchor.offset,s=n.anchor.getNode();if(!e(s)||!oe(s))return!1;const l=s.getParent();if(null===l||F(l))return!1;return i===s.getTextContent().length&&(!(!ue(l,s,i,o.multilineElement,!0)&&!fe(l,s,i,r,!0))&&(null!==t&&t.preventDefault(),!0))},I))}function xe(t,e=Ht,n,o=!1,r=!1){const i=o?t:function(t,e=!1){const n=t.split("\n");let o=!1;const r=[];for(let t=0;t<n.length;t++){const i=n[t],s=i.trimEnd(),l=r[r.length-1],c=t<n.length-1?Ct(i):null,a=void 0!==l&&null!==Ct(l);at.test(s)?r.push(s):lt.test(s)||ct.test(s)?(o=!o,r.push(s)):o?r.push(i):""===s||""===l||!l||it.test(l)||it.test(s)||st.test(s)||nt.test(s)||ot.test(s)||rt.test(s)||ft.test(s)||ut.test(s)||a||!e||dt.test(s)||gt.test(s)||pt(gt).test(l)||pt(dt).test(l)||ct.test(l)?r.push(!e&&""!==s||null!==c?i:s):r[r.length-1]=l+" "+(null===c?s:i).trimStart()}return r.join("\n")}(t,r);return ie(e,o)(i,n)}function me(t=Ht,e,n=!1){const o=function(t,e=!1){const n=Q(t),o=[...n.multilineElement,...n.element],r=!e,i=n.textFormat.filter(t=>1===t.format.length).sort((t,e)=>Number(t.format.includes("code"))-Number(e.format.includes("code")));return t=>{const s=[],l=(t||a()).getChildren();for(let t=0;t<l.length;t++){const c=l[t],a=Gt(c,o,i,n.textMatch,e);null!=a&&s.push(r&&t>0&&!tt(c)&&!tt(l[t-1])?"\n".concat(a):a)}return s.join("\n")}}(t,n);return o(e)}function Ce(t=Ht,e,n=!1){if(!e||T(e)&&e.isCollapsed())return"";const o=function(t,e=!1){const n=Q(t),o=[...n.multilineElement,...n.element],r=!e,i=n.textFormat.filter(t=>1===t.format.length).sort((t,e)=>Number(t.format.includes("code"))-Number(e.format.includes("code")));return t=>{const s=[],l=a().getChildren();for(let c=0;c<l.length;c++){const a=l[c],{shouldInclude:f,markdown:u}=Kt(a,t,o,i,n.textMatch,e);f&&null!=u&&s.push(r&&c>0&&!tt(a)&&!tt(l[c-1])?"\n".concat(u):u)}return s.join("\n")}}(t,n);return o(e)}export{xe as $convertFromMarkdownString,Ce as $convertSelectionToMarkdownString,me as $convertToMarkdownString,Ot as BOLD_ITALIC_STAR,Mt as BOLD_ITALIC_UNDERSCORE,Rt as BOLD_STAR,Bt as BOLD_UNDERSCORE,kt as CHECK_LIST,bt as CODE,zt as ELEMENT_TRANSFORMERS,yt as HEADING,Lt as HIGHLIGHT,Ft as INLINE_CODE,jt as ITALIC_STAR,At as ITALIC_UNDERSCORE,Pt as LINK,Wt as MULTILINE_ELEMENT_TRANSFORMERS,Nt as ORDERED_LIST,St as QUOTE,_t as STRIKETHROUGH,Ut as TEXT_FORMAT_TRANSFORMERS,Dt as TEXT_MATCH_TRANSFORMERS,Ht as TRANSFORMERS,wt as UNORDERED_LIST,he as registerMarkdownShortcuts};++import{$isParagraphNode as t,$isTextNode as e,createState as n,$setState as o,$createTextNode as r,$getState as i,$findMatchingParent as s,$createLineBreakNode as l,$isLineBreakNode as c,$getRoot as a,$isElementNode as f,$isDecoratorNode as u,$getSelection as d,$createParagraphNode as g,$createTabNode as p,mergeRegister as h,COLLABORATION_TAG as x,HISTORIC_TAG as m,COMPOSITION_END_TAG as C,$isRangeSelection as T,$addUpdateTag as E,HISTORY_PUSH_TAG as $,KEY_ENTER_COMMAND as v,COMMAND_PRIORITY_LOW as I,$isRootOrShadowRoot as y,$createRangeSelection as S,$setSelection as b}from"lexical";import{$sliceSelectedTextNodeContent as w}from"@lexical/selection";import{CodeNode as k,$createCodeNode as N,$isCodeNode as F}from"@lexical/code-core";import{LinkNode as L,$isLinkNode as O,$createLinkNode as M,$isAutoLinkNode as R}from"@lexical/link";import{ListNode as B,ListItemNode as _,$isListNode as j,$createListItemNode as A,$createListNode as P,$isListItemNode as z}from"@lexical/list";import{HeadingNode as W,QuoteNode as U,$isHeadingNode as D,$isQuoteNode as H,$createQuoteNode as K,$createHeadingNode as q}from"@lexical/rich-text";import{$findMatchingParent as G}from"@lexical/utils";function J(t,e){const n={};for(const o of t){const t=e(o);t&&(n[t]?n[t].push(o):n[t]=[o])}return n}function Q(t){const e=J(t,t=>t.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const V=/[!-/:-@[-`{-~\s]/,X=/\s/,Y=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,Z=/^\s{0,3}$/;function tt(n){if(!t(n))return!1;const o=n.getFirstChild();return null==o||1===n.getChildrenSize()&&e(o)&&Z.test(o.getTextContent())}function et(t){return t.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,e)=>String.fromCodePoint(Number(e)))}const nt=/^(\s*)(\d{1,})\.\s/,ot=/^(\s*)[-*+]\s/,rt=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,it=/^(#{1,6})\s/,st=/^>\s/,lt=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,ct=/^[ \t]*`{3,}$/,at=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,ft=/^(?:\|)(.+)(?:\|)\s?$/,ut=/^(\| ?:?-*:? ?)+\|\s?$/,dt=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,gt=/^<\/[a-z_][\w-]*\s*>/i,pt=t=>new RegExp(`(?:${t.source})$`,t.flags),ht=n("mdListMarker",{parse:t=>"string"==typeof t&&/^[-*+]$/.test(t)?t:"-",resetOnCopyNode:!0}),xt=n("mdCodeFence",{parse:t=>"string"==typeof t&&/^`{3,}$/.test(t)?t:"```",resetOnCopyNode:!0}),mt=n("mdHardLineBreak",{parse:t=>"string"==typeof t&&/^(\\| {2,})$/.test(t)?t:"",resetOnCopyNode:!0});function Ct(t){if(t.endsWith("\\"))return[t.slice(0,-1),"\\"];const e=t.match(/^(.*?\S)( {2,})$/);return e?[e[1],e[2]]:null}function Tt(t){const n=t.getChildren(),o=n.length-1,r=n[o];if(!e(r))return null;const i=r.getTextContent(),s=Ct(i);if(null!==s){const[t,e]=s;return r.setTextContent(t),e}return/^ {2,}$/.test(i)&&function(t,e){for(let n=e-1;n>=0;n--){if(c(t[n]))return!1;if(/\S/.test(t[n].getTextContent()))return!0}return!1}(n,o)?(r.setTextContent(""),i):null}function Et(t){const e=l(),n=Tt(t);return null!==n&&o(e,mt,n),e}const $t=t=>(e,n,o,r)=>{const i=t(o);i.append(...n),e.replace(i),r||i.select(0,0)};const vt=t=>(e,n,r,i)=>{const s=e.getPreviousSibling(),l=e.getNextSibling(),c=A("check"===t?"x"===r[3]:void 0),a=r[0].trim()[0],f="bullet"!==t&&"check"!==t||a!==ht.parse(a)?void 0:a;if(j(l)&&l.getListType()===t){f&&o(l,ht,f);const t=l.getFirstChild();null!==t?t.insertBefore(c):l.append(c),e.remove()}else if(j(s)&&s.getListType()===t)f&&o(s,ht,f),s.append(c),e.remove();else{const n=P(t,"number"===t?Number(r[2]):void 0);f&&o(n,ht,f),n.append(c),e.replace(n)}c.append(...n),i||c.select(0,0);const u=function(t){const e=t.match(/\t/g),n=t.match(/ /g);let o=0;return e&&(o+=e.length),n&&(o+=Math.floor(n.length/2)),o}(r[1]);u&&c.setIndent(u)},It=(t,e,n,o)=>{const r=[],s=t.getChildren();let l=0;for(const c of s)if(z(c)){if(1===c.getChildrenSize()){const t=c.getFirstChild();if(j(t)){const i=It(t,e,n+1,o);i&&r.push(i);continue}}if(o&&!c.getChildren().some(t=>t.isSelected(o)))continue;const s=" ".repeat(2*n),a=t.getListType(),f=i(t,ht),u="number"===a?`${t.getStart()+l}. `:"check"===a?`${f} [${c.getChecked()?"x":" "}] `:f+" ";let d=e(c);"number"!==a&&(d=d.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),r.push(s+u+d),l++}return r.join("\n")},yt={dependencies:[W],export:(t,e)=>{if(!D(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:it,replace:$t(t=>{const e="h"+t[1].length;return q(e)}),triggerOnEnter:!0,type:"element"},St={dependencies:[U],export:(t,e)=>{if(!H(t))return null;const n=e(t).split("\n"),o=[];for(const t of n)o.push("> "+t);return o.join("\n")},regExp:st,replace:(t,e,n,o)=>{if(o){const n=t.getPreviousSibling();if(H(n))return n.splice(n.getChildrenSize(),0,[Et(n),...e]),void t.remove()}const r=K();r.append(...e),t.replace(r),o||r.select(0,0)},triggerOnEnter:!0,type:"element"},bt={dependencies:[k],export:t=>{if(!F(t))return null;const e=t.getTextContent();let n=i(t,xt);if(e.indexOf(n)>-1){const t=e.match(/`{3,}/g);if(t){const e=Math.max(...t.map(t=>t.length));n="`".repeat(e+1)}}return n+(t.getLanguage()||"")+(e?"\n"+e:"")+"\n"+n},handleImportAfterStartMatch:({lines:t,rootNode:e,startLineIndex:n,startMatch:o})=>{const r=o[1],i=r.trim().length,s=t[n],l=o.index+r.length,c=s.slice(l),a=new RegExp(`\`{${i},}$`);if(a.test(c)){const t=c.match(a),r=c.slice(0,c.lastIndexOf(t[0])),i=[...o];return i[2]="",bt.replace(e,null,i,t,[r],!0),[!0,n]}const f=new RegExp(`^[ \\t]*\`{${i},}$`);for(let r=n+1;r<t.length;r++){const i=t[r];if(f.test(i)){const l=i.match(f),c=t.slice(n+1,r),a=s.slice(o[0].length);return a.length>0&&c.unshift(a),bt.replace(e,null,o,l,c,!0),[!0,r]}}const u=t.slice(n+1),d=s.slice(o[0].length);return d.length>0&&u.unshift(d),bt.replace(e,null,o,null,u,!0),[!0,t.length-1]},regExpEnd:{optional:!0,regExp:ct},regExpStart:lt,replace:(t,e,n,i,s,l)=>{let c,a;const f=n[1]?n[1].trim():"```",u=n[2]||void 0;if(!e&&s){if(1===s.length)i?(c=N(u),a=s[0]):(c=N(u),a=s[0].startsWith(" ")?s[0].slice(1):s[0]);else{for(c=N(u),s.length>0&&(0===s[0].trim().length?s.shift():s[0].startsWith(" ")&&(s[0]=s[0].slice(1)));s.length>0&&!s[s.length-1].length;)s.pop();a=s.join("\n")}o(c,xt,f);const e=r(a);c.append(e),t.append(c)}else e&&$t(t=>N(t?t[2]:void 0))(t,e,n,l)},type:"multiline-element"},wt={dependencies:[B,_],export:(t,e,n)=>j(t)?It(t,e,0,n):null,regExp:ot,replace:vt("bullet"),triggerOnEnter:!0,type:"element"},kt={dependencies:[B,_],export:(t,e,n)=>j(t)?It(t,e,0,n):null,regExp:rt,replace:vt("check"),triggerOnEnter:!0,type:"element"},Nt={dependencies:[B,_],export:(t,e,n)=>j(t)?It(t,e,0,n):null,regExp:nt,replace:vt("number"),triggerOnEnter:!0,type:"element"},Ft={format:["code"],tag:"`",type:"text-format"},Lt={format:["highlight"],tag:"==",type:"text-format"},Ot={format:["bold","italic"],tag:"***",type:"text-format"},Mt={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Rt={format:["bold"],tag:"**",type:"text-format"},Bt={format:["bold"],intraword:!1,tag:"__",type:"text-format"},_t={format:["strikethrough"],tag:"~~",type:"text-format"},jt={format:["italic"],tag:"*",type:"text-format"},At={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Pt={dependencies:[L],export:(t,e,n)=>{if(!O(t)||R(t))return null;const o=e(t);let r=t.getTitle();null!=r&&(r=r.replace(/([\\"])/g,"\\$1"));return r?`[${o}](${t.getURL()} "${r}")`:`[${o}](${t.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{if(s(t,O))return;const[,n,o,i]=e,l=null!=o?et(o):void 0,c=null!=i?et(i):void 0,a=M(l,{title:c}),f=n.split("[").length-1,u=n.split("]").length-1;let d=n,g="";if(f<u)return;if(f>u){const t=n.split("[");g="["+t[0],d=t.slice(1).join("[")}const p=r(d);return p.setFormat(t.getFormat()),a.append(p),t.replace(a),g&&a.insertBefore(r(g)),p},trigger:")",type:"text-match"},zt=[yt,St,wt,Nt],Wt=[bt],Ut=[Ft,Ot,Mt,Rt,Bt,Lt,jt,At,_t],Dt=[Pt],Ht=[...zt,...Wt,...Ut,...Dt];function Kt(t,e,n,o,r,i){let s=t.isSelected(e);for(const l of n){if(!l.export)continue;const n=l.export(t,t=>qt(t,e,o,r,i).markdown,e);if(null!=n){if(!s&&f(t)){qt(t,e,o,r,i).shouldInclude&&(s=!0)}return{markdown:n,shouldInclude:s}}}if(f(t)){const n=qt(t,e,o,r,i);return{markdown:n.markdown,shouldInclude:s||n.shouldInclude}}return u(t)?{markdown:t.getTextContent(),shouldInclude:s}:{markdown:null,shouldInclude:s}}function qt(t,n,o,r,i,s,l){const a=[],d=t.getChildren();let g=!1;s||(s=[]),l||(l=[]);t:for(const t of d){let d=t.isSelected(n);for(const e of r){if(!e.export)continue;const c=e.export(t,t=>qt(t,n,o,r,i,s,[...l,...s]).markdown,(t,e)=>Vt(t,w(n,t,"clone").getTextContent(),o,s,l,i));if(null!=c){!d&&f(t)&&t.getChildren().some(t=>t.isSelected(n))&&t.extractWithChild(t,n,"html")&&(d=!0),d&&(a.push(c),g=!0);continue t}}if(c(t))d&&(a.push(Qt(t)),g=!0);else if(e(t)){if(d){const e=w(n,t,"clone");a.push(Vt(t,e.getTextContent(),o,s,l,i)),g=!0}}else if(f(t)){const e=qt(t,n,o,r,i,s,l);!d&&e.shouldInclude&&t.extractWithChild(t,n,"html")&&(d=!0),(d||e.shouldInclude)&&(a.push(e.markdown),g=!0)}else u(t)&&d&&(a.push(t.getTextContent()),g=!0)}return{markdown:a.join(""),shouldInclude:g}}function Gt(t,e,n,o,r){for(const i of e){if(!i.export)continue;const e=i.export(t,t=>Jt(t,n,o,void 0,void 0,r));if(null!=e)return e}return f(t)?Jt(t,n,o,void 0,void 0,r):u(t)?t.getTextContent():null}function Jt(t,n,o,r,i,s=!1){const l=[],a=t.getChildren();r||(r=[]),i||(i=[]);t:for(const t of a){for(const e of o){if(!e.export)continue;const c=e.export(t,t=>Jt(t,n,o,r,[...i,...r],s),(t,e)=>Vt(t,e,n,r,i,s));if(null!=c){l.push(c);continue t}}c(t)?l.push(Qt(t)):e(t)?l.push(Vt(t,t.getTextContent(),n,r,i,s)):f(t)?l.push(Jt(t,n,o,r,i,s)):u(t)&&l.push(t.getTextContent())}return l.join("")}function Qt(t){return i(t,mt)+"\n"}function Vt(t,e,n,o,r,i=!1){let s=e;t.hasFormat("code")||(s=i?s.replace(/([*_`~])/g,"\\$1"):s.replace(/([*_`~\\])/g,"\\$1"));const l=s.match(/^(\s*)(.*?)(\s*)$/s)||["","",s,""],c=l[1],a=l[2],f=l[3],u=""===a;let d="",g="",p="";const h=Xt(t,!0),x=Xt(t,!1),m=new Set;for(const e of n){const n=e.format[0],r=e.tag;Zt(t,n)&&!m.has(n)&&(m.add(n),Zt(h,n)&&o.find(t=>t.tag===r)||(o.push({format:n,tag:r}),d+=r))}for(let e=0;e<o.length;e++){const n=Yt(t,o[e].format),i=Yt(x,o[e].format);if(n&&i)continue;const s=[...o];for(;s.length>e;){const t=s.pop();r&&t&&r.find(e=>e.tag===t.tag)||(t&&"string"==typeof t.tag&&(n?i||(p+=t.tag):g+=t.tag),o.pop())}break}return u&&!t.hasFormat("code")?g+s:g+c+d+a+p+f}function Xt(t,n){const o=n?t.getPreviousSibling():t.getNextSibling();return e(o)?o:null}function Yt(t,n){return e(t)&&t.hasFormat(n)}function Zt(t,e){return!!Yt(t,e)&&("code"===e||(!t||!/^\s*$/.test(t.getTextContent())))}function te(t,e){const n=t.getTextContent(),o=e.fullMatchRegExpByTag["`"],r=e.transformersByTag["`"],i=[];let s=null;if(o&&r){const t=new RegExp(o.source,"g"),e=Array.from(n.matchAll(t));for(const t of e){const e=t.index+t[1].length,n=t.index+t[0].length;s||(s={content:t[3],endIndex:n,startIndex:e,tag:"`"}),i.push({end:n,start:e})}}const l=function(t,e,n=[]){const o=[],r=new Set(Object.keys(e.transformersByTag).filter(t=>"`"!==t[0]).map(t=>t[0])),i=e=>{let n=0;for(let o=e-1;o>=0&&"\\"===t[o];o--)n++;return n%2==1},s=t=>n.some(e=>t>=e.start&&t<e.end);let l=0;for(;l<t.length;){const e=t[l];if(!r.has(e)||i(l)||s(l)){l++;continue}let n=1;for(;l+n<t.length&&t[l+n]===e;)n++;const c=ee(e,t,l,n,!0),a=ee(e,t,l,n,!1);(c||a)&&o.push({active:!0,canClose:a,canOpen:c,char:e,index:l,length:n,originalLength:n}),l+=n}return o}(n,e,i),c=l.length>0?function(t,e,n){const o={};let r=0,i=null;for(;r<e.length;){const s=e[r];if(!s.active||!s.canClose||0===s.length){r++;continue}const l=`${s.char}${s.canOpen}`,c=o[l]??-1;let a=!1;for(let o=r-1;o>c;o--){const l=e[o];if(!l.active||!l.canOpen||0===l.length||l.char!==s.char)continue;if(l.canClose||s.canOpen){if((l.originalLength+s.originalLength)%3==0&&l.originalLength%3!=0&&s.originalLength%3!=0)continue}const c=Math.min(l.length,s.length),f=Object.keys(n.transformersByTag).filter(t=>t[0]===l.char&&t.length<=c).sort((t,e)=>e.length-t.length)[0];if(!f)continue;a=!0;const u=f.length,d={content:t.slice(l.index+l.length,s.index),endIndex:s.index+u,startIndex:l.index+(l.length-u),tag:f};(!i||d.startIndex<i.startIndex||d.startIndex===i.startIndex&&d.endIndex>i.endIndex)&&(i=d);for(let t=o+1;t<r;t++)e[t].active=!1;l.length-=u,s.length-=u,l.active=l.length>0,s.length>0?s.index+=u:(s.active=!1,r++);break}a||(o[l]=r-1,s.canOpen||(s.active=!1),r++)}return i}(n,l,e):null;let a=null,f=null;if(s&&c?c.startIndex<=s.startIndex&&c.endIndex>=s.endIndex?(a=c,f=e.transformersByTag[c.tag]):(a=s,f=r):s?(a=s,f=r):c&&(a=c,f=e.transformersByTag[c.tag]),!a||!f)return null;const u=[n.slice(a.startIndex,a.endIndex),a.tag,a.content];return u.index=a.startIndex,u.input=n,{endIndex:a.endIndex,match:u,startIndex:a.startIndex,transformer:f}}function ee(t,e,n,o,r){if(!ne(e,n,o,r))return!1;if("*"===t)return!0;if("_"===t){if(!ne(e,n,o,!r))return!0;const t=r?e[n-1]:e[n+o];return void 0!==t&&Y.test(t)}return!0}function ne(t,e,n,o){const r=t[e-1],i=t[e+n],[s,l]=o?[i,r]:[r,i];return void 0!==s&&!X.test(s)&&(!Y.test(s)||(void 0===l||X.test(l)||Y.test(l)))}function oe(t){return e(t)&&!t.hasFormat("code")}function re(t,e,n){let o=te(t,e),r=function(t,e){const n=t;let o,r,i,s;for(const t of e){if(!t.replace||!t.importRegExp)continue;const e=n.getTextContent().match(t.importRegExp);if(!e)continue;const l=e.index||0,c=t.getEndIndex?t.getEndIndex(n,e):l+e[0].length;!1!==c&&(void 0===o||void 0===r||l<o&&(c>r||c<=o))&&(o=l,r=c,i=t,s=e)}return void 0===o||void 0===r||void 0===i||void 0===s?null:{endIndex:r,match:s,startIndex:o,transformer:i}}(t,n);if(o&&r&&(o.startIndex<=r.startIndex&&o.endIndex>=r.endIndex||r.startIndex>o.endIndex?r=null:o=null),o){const r=function(t,e,n,o,r){const i=t.getTextContent();let s,l,c;if(r[0]===i?s=t:0===e?[s,l]=t.splitText(n):[c,s,l]=t.splitText(e,n),s.setTextContent(r[2]),o)for(const t of o.format)s.hasFormat(t)||s.toggleFormat(t);return{nodeAfter:l,nodeBefore:c,transformedNode:s}}(t,o.startIndex,o.endIndex,o.transformer,o.match);oe(r.nodeAfter)&&re(r.nodeAfter,e,n),oe(r.nodeBefore)&&re(r.nodeBefore,e,n),oe(r.transformedNode)&&re(r.transformedNode,e,n)}else if(r){const o=function(t,e,n,o,r){let i,s,l;return 0===e?[i,s]=t.splitText(n):[l,i,s]=t.splitText(e,n),o.replace?{nodeAfter:s,nodeBefore:l,transformedNode:o.replace(i,r)||void 0}:null}(t,r.startIndex,r.endIndex,r.transformer,r.match);if(!o)return;oe(o.nodeAfter)&&re(o.nodeAfter,e,n),oe(o.nodeBefore)&&re(o.nodeBefore,e,n),oe(o.transformedNode)&&re(o.transformedNode,e,n)}const i=et(t.getTextContent());t.setTextContent(i)}function ie(t,e=!1){const n=Q(t),o=function(t){const e={},n={},o=[];for(const r of t){const{tag:t}=r;e[t]=r;const i=t.replace(/(\*|\^|\+)/g,"\\$1");o.push(i),1===t.length?n[t]="`"===t?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${i}])(${i})((\\\\${i})?.*?[^${i}\\s](\\\\${i})?)(${i})(?![\\\\${i}])`):n[t]=new RegExp(`(^|[^\\\\])(${i})((\\\\${i})?.*?[^\\s](\\\\${i})?)(${i})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:new RegExp(`(${o.join("|")})`,"g"),transformersByTag:e}}(n.textFormat);return(t,r)=>{const i=t.split("\n"),s=i.length,l=r||a();l.clear();for(let t=0;t<s;t++){const r=i[t],[s,c]=se(i,t,n.multilineElement,l);s?t=c:le(r,l,n.element,o,n.textMatch,e)}const c=l.getChildren();for(const t of c)if(!e&&tt(t)&&l.getChildrenSize()>1)t.remove();else if(f(t))for(const e of t.getAllTextNodes())ce(e);null!==d()&&l.selectStart()}}function se(t,e,n,o){for(const r of n){const{handleImportAfterStartMatch:n,regExpEnd:i,regExpStart:s,replace:l}=r,c=t[e].match(s);if(!c)continue;if(n){const i=n({lines:t,rootNode:o,startLineIndex:e,startMatch:c,transformer:r});if(null===i)continue;if(i)return i}const a="object"==typeof i&&"regExp"in i?i.regExp:i,f=i&&"object"==typeof i&&"optional"in i?i.optional:!i;let u=e;const d=t.length;for(;u<d;){const n=a?t[u].match(a):null;if(!n&&(!f||f&&u<d-1)){u++;continue}if(n&&e===u&&n.index===c.index){u++;continue}const r=[];if(n&&e===u)r.push(t[e].slice(c[0].length,-n[0].length));else for(let o=e;o<=u;o++)if(o===e){const e=t[o].slice(c[0].length);r.push(e)}else if(o===u&&n){const e=t[o].slice(0,-n[0].length);r.push(e)}else r.push(t[o]);if(!1!==l(o,null,c,n,r,!0))return[!0,u];break}}return[!1,e]}function le(e,n,o,i,s,l){const c=r(e),a=g();a.append(c),n.append(a);for(const{regExp:t,replace:n}of o){const o=e.match(t);if(o&&(c.setTextContent(e.slice(o[0].length)),!1!==n(a,[c],o,!0)))break}if(re(c,i,s),a.isAttached()&&e.length>0){const e=a.getPreviousSibling();if(!l&&(t(e)||H(e)||j(e))){let t=e;if(j(e)){const n=e.getLastDescendant();t=null==n?null:G(n,z)}null!=t&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[Et(t),...a.getChildren()]),a.remove())}}}function ce(t){const e=new Set,n=t.getTextContent();let o=n.indexOf("\t");for(;-1!==o;)e.add(o),e.add(o+1),o=n.indexOf("\t",o+1);t.splitText(...e).forEach(t=>{"\t"===t.getTextContent()&&t.replace(p())})}function ae(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function fe(t,e,n,o,r){const i=t.getParent();if(!y(i)||t.getFirstChild()!==e)return!1;const s=e.getTextContent();if(!r&&" "!==s[n-1])return!1;for(const{regExp:i,replace:l}of o){const o=s.match(i),c=r||o&&o[0].endsWith(" ")?n:n-1;if(o&&o[0].length===c){const r=e.getNextSiblings(),[i,s]=e.splitText(n);if(!1!==l(t,s?[s,...r]:r,o,!1))return i.remove(),!0}}return!1}function ue(t,e,n,o,r){const i=t.getParent();if(!y(i)||t.getFirstChild()!==e)return!1;const s=e.getTextContent();if(!r&&" "!==s[n-1])return!1;for(const{regExpStart:i,replace:l,regExpEnd:c}of o){if(c&&!("optional"in c)||c&&"optional"in c&&!c.optional)continue;const o=s.match(i);if(o){const i=r||o[0].endsWith(" ")?n:n-1;if(o[0].length!==i)continue;const s=e.getNextSiblings(),[c,a]=e.splitText(n);if(!1!==l(t,a?[a,...s]:s,o,null,null,!1))return c.remove(),!0}}return!1}function de(t,e){let n=0;const o=t.getTextContent();for(let t=0;t<e;t++)"`"===o[t]&&n++;return n%2!=0}function ge(t,e,n){const o=n.length;for(let r=e;r>=o;r--){const e=r-o;if(pe(t,e,n,0,o)&&" "!==t[e+o])return e}return-1}function pe(t,e,n,o,r){for(let i=0;i<r;i++)if(t[e+i]!==n[o+i])return!1;return!0}function he(t,n=Ht){const o=Q(n),r=o.element.filter(t=>t.triggerOnEnter),i=J(o.textFormat,({tag:t})=>t[t.length-1]),s=J(o.textMatch,({trigger:t})=>t),l=new Set([" "]);for(const t of o.textFormat)l.add(t.tag.slice(-1));for(const t of o.textMatch)void 0!==t.trigger&&l.add(t.trigger);for(const e of n){const n=e.type;if("element"===n||"text-match"===n||"multiline-element"===n){const n=e.dependencies;for(const e of n)t.hasNode(e)||ae(173,e.getType())}}const a=(t,n,r)=>!!fe(t,n,r,o.element)||(!!ue(t,n,r,o.multilineElement)||(!!function(t,e,n){let o=t.getTextContent();const r=n[o[e-1]];if(null==r)return!1;e<o.length&&(o=o.slice(0,e));for(const e of r){if(!e.replace||!e.regExp)continue;const n=o.match(e.regExp);if(null===n)continue;const r=n.index||0,i=r+n[0].length;let s;return 0===r?[s]=t.splitText(i):[,s]=t.splitText(r,i),s.selectNext(0,0),e.replace(s,n),!0}return!1}(n,r,s)||!!function(t,n,o){const r=t.getTextContent(),i=n-1,s=r[i],l=o[s];if(!l)return!1;for(const n of l){const{tag:o}=n,l=o.length,a=i-l+1;if(l>1&&!pe(r,a,o,0,l))continue;if(" "===r[a-1])continue;const f=r[i+1];if(!1===n.intraword&&f&&!V.test(f))continue;const u=t;let g=u,p=ge(r,a,o),h=g;for(;p<0&&(h=h.getPreviousSibling())&&!c(h);)if(e(h)){if(h.hasFormat("code"))continue;const t=h.getTextContent();g=h,p=ge(t,t.length,o)}if(p<0)continue;if(g===u&&p+l===a)continue;const x=g.getTextContent();if(p>0&&x[p-1]===s)continue;const m=x[p-1];if(!1===n.intraword&&m&&!V.test(m))continue;if(!n.format.includes("code")&&de(g,p))continue;const C=u.getTextContent(),E=C.slice(0,a)+C.slice(i+1);u.setTextContent(E);const $=g===u?E:x;g.setTextContent($.slice(0,p)+$.slice(p+l));const v=d(),I=S();b(I);const y=i-l*(g===u?2:1)+1;I.anchor.set(g.__key,p,"text"),I.focus.set(u.__key,y,"text");for(const t of n.format)I.hasFormat(t)||I.formatText(t);I.anchor.set(I.focus.key,I.focus.offset,I.focus.type);for(const t of n.format)I.hasFormat(t)&&I.toggleFormat(t);return T(v)&&(I.format=v.format),!0}return!1}(n,r,i)));return h(t.registerUpdateListener(({tags:n,dirtyLeaves:o,editorState:r,prevEditorState:i})=>{if(n.has(x)||n.has(m))return;if(t.isComposing())return;const s=n.has(C),c=r.read(d),f=i.read(d);if(!T(f)||!T(c)||!c.isCollapsed()||c.is(f)&&!s)return;const u=c.anchor.key,g=c.anchor.offset,p=r._nodeMap.get(u);if(e(p)&&o.has(u)&&(s||1===g||!(g>f.anchor.offset+1))){if(s){const t=r.read(()=>p.getTextContent())[g-1];if(!l.has(t))return}t.update(()=>{if(!oe(p))return;const t=p.getParent();null===t||F(t)||a(t,p,c.anchor.offset)&&E($)})}}),t.registerCommand(v,t=>{if(null!==t&&t.shiftKey)return!1;const n=d();if(!T(n)||!n.isCollapsed())return!1;const i=n.anchor.offset,s=n.anchor.getNode();if(!e(s)||!oe(s))return!1;const l=s.getParent();if(null===l||F(l))return!1;return i===s.getTextContent().length&&(!(!ue(l,s,i,o.multilineElement,!0)&&!fe(l,s,i,r,!0))&&(null!==t&&t.preventDefault(),!0))},I))}function xe(t,e=Ht,n,o=!1,r=!1){const i=o?t:function(t,e=!1){const n=t.split("\n");let o=!1;const r=[];for(let t=0;t<n.length;t++){const i=n[t],s=i.trimEnd(),l=r[r.length-1],c=t<n.length-1?Ct(i):null,a=void 0!==l&&null!==Ct(l);at.test(s)?r.push(s):lt.test(s)||ct.test(s)?(o=!o,r.push(s)):o?r.push(i):""===s||""===l||!l||it.test(l)||it.test(s)||st.test(s)||nt.test(s)||ot.test(s)||rt.test(s)||ft.test(s)||ut.test(s)||a||!e||dt.test(s)||gt.test(s)||pt(gt).test(l)||pt(dt).test(l)||ct.test(l)?r.push(!e&&""!==s||null!==c?i:s):r[r.length-1]=l+" "+(null===c?s:i).trimStart()}return r.join("\n")}(t,r);return ie(e,o)(i,n)}function me(t=Ht,e,n=!1){const o=function(t,e=!1){const n=Q(t),o=[...n.multilineElement,...n.element],r=!e,i=n.textFormat.filter(t=>1===t.format.length).sort((t,e)=>Number(t.format.includes("code"))-Number(e.format.includes("code")));return t=>{const s=[],l=(t||a()).getChildren();for(let t=0;t<l.length;t++){const c=l[t],a=Gt(c,o,i,n.textMatch,e);null!=a&&s.push(r&&t>0&&!tt(c)&&!tt(l[t-1])?"\n".concat(a):a)}return s.join("\n")}}(t,n);return o(e)}function Ce(t=Ht,e,n=!1){if(!e||T(e)&&e.isCollapsed())return"";const o=function(t,e=!1){const n=Q(t),o=[...n.multilineElement,...n.element],r=!e,i=n.textFormat.filter(t=>1===t.format.length).sort((t,e)=>Number(t.format.includes("code"))-Number(e.format.includes("code")));return t=>{const s=[],l=a().getChildren();for(let c=0;c<l.length;c++){const a=l[c],{shouldInclude:f,markdown:u}=Kt(a,t,o,i,n.textMatch,e);f&&null!=u&&s.push(r&&c>0&&!tt(a)&&!tt(l[c-1])?"\n".concat(u):u)}return s.join("\n")}}(t,n);return o(e)}export{xe as $convertFromMarkdownString,Ce as $convertSelectionToMarkdownString,me as $convertToMarkdownString,Ot as BOLD_ITALIC_STAR,Mt as BOLD_ITALIC_UNDERSCORE,Rt as BOLD_STAR,Bt as BOLD_UNDERSCORE,kt as CHECK_LIST,bt as CODE,zt as ELEMENT_TRANSFORMERS,yt as HEADING,Lt as HIGHLIGHT,Ft as INLINE_CODE,jt as ITALIC_STAR,At as ITALIC_UNDERSCORE,Pt as LINK,Wt as MULTILINE_ELEMENT_TRANSFORMERS,Nt as ORDERED_LIST,St as QUOTE,_t as STRIKETHROUGH,Ut as TEXT_FORMAT_TRANSFORMERS,Dt as TEXT_MATCH_TRANSFORMERS,Ht as TRANSFORMERS,wt as UNORDERED_LIST,he as registerMarkdownShortcuts};+diff --git a/src/MarkdownTransformers.ts b/src/MarkdownTransformers.ts+index 651f710..8500dad 100644+--- a/src/MarkdownTransformers.ts++++ b/src/MarkdownTransformers.ts+@@ -346,7 +346,7 @@ const createBlockNode = (++ // Amount of spaces that define indentation level+ // TODO: should be an option+-const LIST_INDENT_SIZE = 4;++const LIST_INDENT_SIZE = 2;++ function getIndent(whitespaces: string): number {+ const tabs = whitespaces.match(/\t/g);+diff --git a/src/utils.ts b/src/utils.ts+index 01cd140..e96c1f5 100644+--- a/src/utils.ts++++ b/src/utils.ts+@@ -344,7 +344,7 @@ function listExport(+ }++ // TODO: should be param+-const LIST_INDENT_SIZE = 4;++const LIST_INDENT_SIZE = 2;++ function processNestedLists(+ listNode: ListNode,diff --git a/js/bun.lock b/js/bun.lockindex 35ce168379..5498e98b42 100644--- a/js/bun.lock+++ b/js/bun.lock@@ -5,8 +5,22 @@"": {"name": "@coparse/js","dependencies": {+ "@lexical/code": "0.45.0",+ "@lexical/headless": "0.45.0",+ "@lexical/history": "0.45.0",+ "@lexical/html": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/plain-text": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/selection": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/utils": "0.45.0","bebop-tools": "3.1.3","idb": "^8.0.3",+ "lexical": "0.45.0",},},"app": {@@ -31,17 +45,17 @@"@inkibra/tauri-plugins": "git+https://github.com/macro-inc/tauri-plugins.git#26537c8a46bb8424f9cf4021d08aa76aa7cd66ef","@kobalte/core": "^0.13.11","@leeoniya/ufuzzy": "^1.0.19",- "@lexical/history": "^0.32.1",- "@lexical/html": "^0.32.1",- "@lexical/link": "^0.32.1",- "@lexical/list": "^0.32.1",- "@lexical/mark": "^0.32.1",- "@lexical/markdown": "^0.32.1",- "@lexical/plain-text": "^0.32.1",- "@lexical/rich-text": "^0.32.1",- "@lexical/selection": "^0.32.1",- "@lexical/table": "^0.32.1",- "@lexical/utils": "^0.32.1",+ "@lexical/history": "0.45.0",+ "@lexical/html": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/plain-text": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/selection": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/utils": "0.45.0","@livekit/krisp-noise-filter": "^0.4.1","@livekit/track-processors": "^0.7.2","@lukemorales/query-key-factory": "^1.3.4",@@ -81,7 +95,7 @@"emojilib": "^4.0.2","fuse.js": "^7.1.0","katex": "^0.16.22",- "lexical": "^0.32.1",+ "lexical": "0.45.0","libheif-js": "^1.19.8","linkify-it": "^5.0.0","livekit-client": "^2.18.0",@@ -294,16 +308,16 @@"name": "@macro-inc/lexical-core","version": "0.2.2","dependencies": {- "@lexical/code": "0.32.1",- "@lexical/headless": "0.32.1",- "@lexical/link": "0.32.1",- "@lexical/list": "0.32.1",- "@lexical/mark": "0.32.1",- "@lexical/markdown": "0.32.1",- "@lexical/rich-text": "0.32.1",- "@lexical/table": "0.32.1",- "@lexical/utils": "0.32.1",- "lexical": "0.32.1",+ "@lexical/code": "0.45.0",+ "@lexical/headless": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/utils": "0.45.0",+ "lexical": "0.45.0","loro-crdt": "1.13.3","nanoid": "^5.1.5",},@@ -315,23 +329,23 @@"name": "lexical-service","version": "0.0.1","dependencies": {- "@lexical/code": "0.32.1",- "@lexical/headless": "0.32.1",- "@lexical/history": "0.32.1",- "@lexical/html": "0.32.1",- "@lexical/link": "0.32.1",- "@lexical/list": "0.32.1",- "@lexical/mark": "0.32.1",- "@lexical/markdown": "0.32.1",- "@lexical/plain-text": "0.32.1",- "@lexical/rich-text": "0.32.1",- "@lexical/selection": "0.32.1",- "@lexical/table": "0.32.1",- "@lexical/utils": "0.32.1",+ "@lexical/code": "0.45.0",+ "@lexical/headless": "0.45.0",+ "@lexical/history": "0.45.0",+ "@lexical/html": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/plain-text": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/selection": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/utils": "0.45.0","chanfana": "^3.3.0","hono": "^4.6.20","immer": "^10.0.3",- "lexical": "0.32.1",+ "lexical": "0.45.0","loro-crdt": "1.13.3","nanoid": "^5.1.5","zod": "^4.3.6",@@ -369,14 +383,35 @@"@kobalte/[email protected]": "app/patches/@kobalte%[email protected]","[email protected]": "app/patches/[email protected]","@tanstack/[email protected]": "app/patches/@tanstack%[email protected]",+ "@lexical/[email protected]": "app/patches/@lexical%[email protected]","@thisbeyond/[email protected]": "app/patches/@thisbeyond%[email protected]",- "@lexical/[email protected]": "app/patches/@lexical%[email protected]","[email protected]": "app/patches/[email protected]",},"overrides": {+ "@lexical/clipboard": "0.45.0",+ "@lexical/code": "0.45.0",+ "@lexical/code-core": "0.45.0",+ "@lexical/code-prism": "0.45.0",+ "@lexical/dragon": "0.45.0",+ "@lexical/extension": "0.45.0",+ "@lexical/headless": "0.45.0",+ "@lexical/history": "0.45.0",+ "@lexical/html": "0.45.0",+ "@lexical/internal": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/plain-text": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/selection": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/text": "0.45.0",+ "@lexical/utils": "0.45.0","ajv": ">=6.14.0","cross-spawn": "7.0.6","flatted": ">=3.4.0",+ "lexical": "0.45.0","minimatch": ">=3.1.4","rollup": ">=4.59.0","undici": ">=6.24.0",@@ -894,35 +929,45 @@"@leeoniya/ufuzzy": ["@leeoniya/[email protected]", "", {}, "sha512-0pikDeYt0IHEUPza5RTCDXc/17S1pTrYnReEMp8Aa6k1ovzw5QdZLwicW8TjljwEZRb6oYag0xmALohrcq/yOQ=="],- "@lexical/clipboard": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/html": "0.32.1", "@lexical/list": "0.32.1", "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-oO7CuMVh3EFEqtE6+7Ccf7jMD5RNUmSdTnFm/X4kYNGqs9lgGt8j5PgSk7oP9OuAjxKNdBTbltSlh54CX3AUIg=="],+ "@lexical/clipboard": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/extension": "0.45.0", "@lexical/html": "0.45.0", "@lexical/internal": "0.45.0", "@lexical/list": "0.45.0", "@lexical/selection": "0.45.0", "@lexical/utils": "0.45.0", "@types/trusted-types": "^2.0.7", "lexical": "0.45.0" } }, "sha512-9oDu2SNj/EZGjpXJTruz74Ls3VzF2Q41v1QB7JnTq5lh24byvIOdgEpOFHtr/7WVHssfXCbMtgFb5tW8rMaZ2g=="],- "@lexical/code": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/utils": "0.32.1", "lexical": "0.32.1", "prismjs": "^1.30.0" } }, "sha512-2rXj8s/CG32XKQ2EpORpACfpzyAxB+/SrQW2cjwczarLs5Fxnx6u6HwahZnxaF0z5UHIPUy90qDiOiRExc74Yg=="],+ "@lexical/code": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/code-core": "0.45.0", "@lexical/code-prism": "0.45.0", "@lexical/extension": "0.45.0", "lexical": "0.45.0" } }, "sha512-vtD5IKbJvgIxhKIl96pWKqjlqialzg/WbWNUNbeoyuf9ht0/MQ6WFdEdCNnnXqx4rj7CTzafB3c0jup7h96b6A=="],- "@lexical/headless": ["@lexical/[email protected]", "", { "dependencies": { "lexical": "0.32.1" } }, "sha512-YAb2d36s75p7RKfKz5WqDqgfa/y3oMmCJOCRmjwsN1WHn8BTij4azzx5x3nkp7U9TMaQDdR9uMr4ISZvjeA0Sw=="],+ "@lexical/code-core": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/extension": "0.45.0", "@lexical/html": "0.45.0", "@lexical/internal": "0.45.0", "lexical": "0.45.0" } }, "sha512-zU3noYmfluSK38r0eBz3gHKzsgOksf9eHqoPIwXH6HovKCDo848HoW0i/hCRzRo9oPqydKikx0LIKUvWSaSNIw=="],- "@lexical/history": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-IRsKllumYEWxmzR2evN30MFY+JBM723lSyzm2PAQcgHCeBxi8t0Vc3EdyJRay+YdN65JgrohQi1WbktbK923uQ=="],+ "@lexical/code-prism": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/code-core": "0.45.0", "@lexical/extension": "0.45.0", "lexical": "0.45.0", "prismjs": "^1.30.0" } }, "sha512-eevIcapWzWk4Kb2WE6mmMjTXjf+Mfn4pLXAJ92BkRO6gc5RPkYgpn7zsYTzSBWEM/GptKf7ta+XouLcnLXNOSQ=="],- "@lexical/html": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-uctCdC9gVzx/Sw9CimT4C2IDfSbfEGYunyIrJBpsfcdqp0rroGNizjIoZNBH3xcgkk9UDboSADo+wimbzEoy8A=="],+ "@lexical/dragon": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/extension": "0.45.0", "lexical": "0.45.0" } }, "sha512-34k2/QuM8A9WVqVCtNGx1ySBWXxMVKejKH3VBWnXEb1NdrDa/N8jLpu0gOCLcrrDjMdUzs9uVgW0D4FRf1Lixg=="],- "@lexical/link": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-atdwNpWjZ0U2/kgS0ATTkZ8lJLHiv3TsJgqJL33BuV9Gn7advJokd4faM79Y8XxkhiPi1lVTBSHgI8V4hs+c+Q=="],+ "@lexical/extension": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/internal": "0.45.0", "@lexical/utils": "0.45.0", "@preact/signals-core": "^1.14.1", "lexical": "0.45.0" } }, "sha512-oJs1Zvrsqh32zZmeCkTQi7R2WoVIvaQE265JFZ/VczWlsWRdkkWQbGZ6iOlBZ3AmtiNgHoBeB0gZSoRQtWEQyA=="],- "@lexical/list": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-3zShCfEdAvodR6mQ5CNN1gcEwfV341LXJzWCIkZzG1cPwaiBHUlT7TynQtKTPn1sATCEMmxoDG0/T+itsRNZgA=="],+ "@lexical/headless": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/internal": "0.45.0", "happy-dom": "^20.9.0", "lexical": "0.45.0" } }, "sha512-nzVqV3ne3+6jZainCdYUtKNBRSOb1AOGXDDSypWEFuMGLINV/gYAvLRlsFjp7hauo1ZuAySpWYkQcw6ltKappQ=="],- "@lexical/mark": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-AXF2wmUvvSI45y+sgZKnU0pnUdttd9v75DDQgdplqtCkyDqHVGxVCNCrLE+PJtzIrwJxtA2UyC8yFZMBM92HpA=="],+ "@lexical/history": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/extension": "0.45.0", "@lexical/utils": "0.45.0", "lexical": "0.45.0" } }, "sha512-KihtI8485Wx7kyFCtKNKk/nO2jSibRa8iL0OiKPZsYWVAQF5vFG3J00epX8EkEpeCx8Zjmj+3eytY05HPNd2nA=="],- "@lexical/markdown": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/code": "0.32.1", "@lexical/link": "0.32.1", "@lexical/list": "0.32.1", "@lexical/rich-text": "0.32.1", "@lexical/text": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-AmUTRRx6Je0AOiQqp48Xn92/71AzhFgi4nO1EtPW5eae1CihrtiEh5UQr48mV6EyjvH9D3OlOLU8XrzS+J9a+w=="],+ "@lexical/html": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/extension": "0.45.0", "@lexical/internal": "0.45.0", "@lexical/selection": "0.45.0", "@lexical/utils": "0.45.0", "lexical": "0.45.0" } }, "sha512-eK215f25cnAcIzNB1iRltg8hbvkK5wyyXvKQUqhfG/9HaSSVBCPuCyXKZicjZllQNvbFINGHFhTIqSP56drFSw=="],- "@lexical/plain-text": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/clipboard": "0.32.1", "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-uFS3xoETB3phnYHZXfMKvl8gh6YRW7rpokuJmQVMHNNBklORmMpN00rRQ/zsc/jt/nPzaPpE5cLwSHXeJdqJUg=="],+ "@lexical/internal": ["@lexical/[email protected]", "", {}, "sha512-IhyzCdb1/xdpTtvK0xnqUXpaVRsD2KTZ6EMZpavm6dhKaglf1zorpdbH7r6Hjps6SRb4DCn/t7lac+GMdDFbXg=="],- "@lexical/rich-text": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/clipboard": "0.32.1", "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-SnmpZ7boTLxeYfNezNLvchDiJOAALA2nD0Uq/SpkIOJ6R01R7m1aPdLv55LGKoBT9UxCRdo0HWXytwiVZI+ehQ=="],+ "@lexical/link": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/extension": "0.45.0", "@lexical/html": "0.45.0", "@lexical/internal": "0.45.0", "@lexical/utils": "0.45.0", "lexical": "0.45.0" } }, "sha512-9xpsRQ06IA4eVnx4OtFV0+Tmp2Etvh0dh9FTFd/LJYaqo2A0ZIuNUggueDZ0i2dhi8wWW8J08O7U0HxLcDWHAg=="],- "@lexical/selection": ["@lexical/[email protected]", "", { "dependencies": { "lexical": "0.32.1" } }, "sha512-X1aXJdq/5EOuSuMOqK3t+rEVmpqLf+vc2Kl5YuP8+gGWUbXuxR6iryrQuy1mAViZpF/5qw4HO/Sb+9JjubaZEg=="],+ "@lexical/list": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/extension": "0.45.0", "@lexical/html": "0.45.0", "@lexical/internal": "0.45.0", "@lexical/utils": "0.45.0", "lexical": "0.45.0" } }, "sha512-Eyff9KVLu5mV4QSid2aw9uYmKDKgDYToAaagI9Sp3VgqTMmvRUQJ0w7sr4zq8/FRKSzrsf4V2FjvLAuQE7eBUQ=="],- "@lexical/table": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/clipboard": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-sGk2jUbQHj5hatpxRyl6IE2oWsjRnYhmaP94THzn95/uK69o8eSizcnd148WzYsX8Zz+L9PTLS1xjvCbfLTP+A=="],+ "@lexical/mark": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/utils": "0.45.0", "lexical": "0.45.0" } }, "sha512-PMyGmnF6koE5TKCDlGe1k1t1ZOefReyYaKtx6OY3Tf1AyyKII6zRGR+dANrgWzYliYO7j4mpKBK00ykOnuF3zA=="],- "@lexical/text": ["@lexical/[email protected]", "", { "dependencies": { "lexical": "0.32.1" } }, "sha512-0Ek8F3KC4d16b2YaTHdyYFqDSBZ5KRtGrqU3GBog+VOGxucGaEbXEK1/ypX5CTe/wwkQDrH0FKWPQbd3l5t5YQ=="],+ "@lexical/markdown": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/code-core": "0.45.0", "@lexical/internal": "0.45.0", "@lexical/link": "0.45.0", "@lexical/list": "0.45.0", "@lexical/rich-text": "0.45.0", "@lexical/selection": "0.45.0", "@lexical/text": "0.45.0", "@lexical/utils": "0.45.0", "lexical": "0.45.0" } }, "sha512-fl/UUwudBXGnz44kOS07ZRN0DMfOWNnVl7GSSNyz6zDo1cMD60URt7LjF51bAG2oL8i1eRDX4/GV+7vBcuoGzw=="],- "@lexical/utils": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/list": "0.32.1", "@lexical/selection": "0.32.1", "@lexical/table": "0.32.1", "lexical": "0.32.1" } }, "sha512-ZaqZZksNIHJd+g8GXc11D1ESi8JzsdLVQZ+9odXVaNxtwDIaGIqMSccFyuZ9VSoJDde4JXZkgp/0PShbAZDkyw=="],+ "@lexical/plain-text": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/clipboard": "0.45.0", "@lexical/dragon": "0.45.0", "@lexical/extension": "0.45.0", "@lexical/selection": "0.45.0", "@lexical/utils": "0.45.0", "lexical": "0.45.0" } }, "sha512-453bsKVk3oY5/ktp3A2zO2nFdXniU/zfD87eIcN50aXrIwvNm082GkfmBaDeVujk7fLgC2hG980xdcEH4xcG3w=="],++ "@lexical/rich-text": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/clipboard": "0.45.0", "@lexical/dragon": "0.45.0", "@lexical/extension": "0.45.0", "@lexical/html": "0.45.0", "@lexical/selection": "0.45.0", "@lexical/utils": "0.45.0", "lexical": "0.45.0" } }, "sha512-jd+jIsDirqILuUQiNUJAzZWynVZHuN1ekqYcydgDFaUXMFBQgVr3mBUieQzMw2IDAEk98txntu/mZQav4BryQQ=="],++ "@lexical/selection": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/internal": "0.45.0", "lexical": "0.45.0" } }, "sha512-V2DYMhl84F1aZ24YpWMMqy9ikO7cVfD3G+GjMwrZnMt0JVnIghjPiYIEBb/OtqqA+mCbBwNhfpdK1RtF9HTbJA=="],++ "@lexical/table": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/clipboard": "0.45.0", "@lexical/extension": "0.45.0", "@lexical/html": "0.45.0", "@lexical/internal": "0.45.0", "@lexical/utils": "0.45.0", "lexical": "0.45.0" } }, "sha512-OXbwEg0DqkTdvqnu7z+/u8bgnDz2sjHHXCG3zGRhEzDgHcWoVQ18IciwMdse7dTTNfBIJMuGJcRoWPrHf9UlhQ=="],++ "@lexical/text": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/internal": "0.45.0", "lexical": "0.45.0" } }, "sha512-ozI8fDsLTYAzEWXaBrGYZ0GnRbbIHi4IL99w5q06UfTQzBMYmF7WaccDP1krOOwwioPYQbiqZM7dh/41jsFELQ=="],++ "@lexical/utils": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/internal": "0.45.0", "@lexical/selection": "0.45.0", "lexical": "0.45.0" } }, "sha512-Fo5MMErqoPlUyTw1qVMZ9kE33ZjJF957KU683tsCrrlaVisVxpboL7BbAnxWTwCcIpAsfc6AUndJJ70M9NDMGg=="],"@lezer/common": ["@lezer/[email protected]", "", {}, "sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ=="],@@ -1100,6 +1145,8 @@"@posthog/types": ["@posthog/[email protected]", "", {}, "sha512-XR0B1geABbnUlSNv4RuFWvk19D870B668C/XzcKDctAZ+xCH5gmGM0oltGbA9yj+2ia9Y65nOrDYKN6Whu1oBw=="],+ "@preact/signals-core": ["@preact/[email protected]", "", {}, "sha512-m0K3vnbSLC5rHs2ZVfeAMvBtT1zIyq4mxx5OlNncSgMj5Iz6W5Rn3kPrDxAC+iIKmiVe0lSl6U37t5ZkEWoVAw=="],+"@protobufjs/aspromise": ["@protobufjs/[email protected]", "", {}, "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="],"@protobufjs/base64": ["@protobufjs/[email protected]", "", {}, "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="],@@ -1500,6 +1547,8 @@"@types/uuid": ["@types/[email protected]", "", {}, "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ=="],+ "@types/whatwg-mimetype": ["@types/[email protected]", "", {}, "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA=="],+"@types/wicg-file-system-access": ["@types/[email protected]", "", {}, "sha512-ggMz8nOygG7d/stpH40WVaNvBwuyYLnrg5Mbyf6bmsj/8+gb6Ei4ZZ9/4PNpcPNTT8th9Q8sM8wYmWGjMWLX/A=="],"@types/ws": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],@@ -1680,6 +1729,8 @@"buffer-equal-constant-time": ["[email protected]", "", {}, "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="],+ "buffer-image-size": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ=="],+"buildcheck": ["[email protected]", "", {}, "sha512-lHblz4ahamxpTmnsk+MNTRWsjYKv965MwOrSJyeD588rR3Jcu7swE+0wN5F+PbL5cjgu/9ObkhfzEPuofEMwLA=="],"bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],@@ -1888,7 +1939,7 @@"enquirer": ["[email protected]", "", { "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" } }, "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ=="],- "entities": ["[email protected]", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="],+ "entities": ["[email protected]", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="],"error-stack-parser-es": ["[email protected]", "", {}, "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA=="],@@ -2082,6 +2133,8 @@"gtoken": ["[email protected]", "", { "dependencies": { "gaxios": "^6.0.0", "jws": "^4.0.0" } }, "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw=="],+ "happy-dom": ["[email protected]", "", { "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", "ws": "^8.21.0" } }, "sha512-6QD0ilzDDt93tX44y8tbmZdAcdTRYDhUP+Asgi6pC8Pp5IA3cvaZGyoVN/EGtlq9ziT65iPuBBn3ASLr6hCgVw=="],+"has-bigints": ["[email protected]", "", {}, "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg=="],"has-flag": ["[email protected]", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],@@ -2294,7 +2347,7 @@"levn": ["[email protected]", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="],- "lexical": ["[email protected]", "", {}, "sha512-Rvr9p00zUwzjXIqElIjMDyl/24QHw68yaqmXUWIT3lSdSAr8OpjSJK3iWBLZwVZwwpVhwShZRckomc+3vSb/zw=="],+ "lexical": ["[email protected]", "", { "dependencies": { "@lexical/internal": "0.45.0" } }, "sha512-z2M9C2ILPW7SopQE1aKbOFdZJbe3HvsrgWnJKveMDrSEvVjU9Hce4UpKVsAdkwY7TgY9RDuCV3+sfrGu0WkL+w=="],"lexical-service": ["lexical-service@workspace:lexical-service"],@@ -3340,6 +3393,10 @@"gtoken/gaxios": ["[email protected]", "", { "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", "is-stream": "^2.0.0", "node-fetch": "^2.6.9", "uuid": "^9.0.1" } }, "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ=="],+ "happy-dom/whatwg-mimetype": ["[email protected]", "", {}, "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q=="],++ "happy-dom/ws": ["[email protected]", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g=="],+"inquirer/wrap-ansi": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="],"inquirer-checkbox-plus-prompt/rxjs": ["[email protected]", "", { "dependencies": { "tslib": "^1.9.0" } }, "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ=="],@@ -3384,6 +3441,8 @@"orval/typedoc": ["[email protected]", "", { "dependencies": { "@gerrit0/mini-shiki": "^3.23.0", "lunr": "^2.3.9", "markdown-it": "^14.1.1", "minimatch": "^10.2.5", "yaml": "^2.8.3" }, "peerDependencies": { "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x" }, "bin": { "typedoc": "bin/typedoc" } }, "sha512-wKh+lhdmMFivMlc6vRRcMGXeGEHGU2g8a2CkPTJjJlwRf1iXbimWIPcFolCqe4E0d/FRtGszpIrsp3WLpDB8Pw=="],+ "parse5/entities": ["[email protected]", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="],+"path-scurry/lru-cache": ["[email protected]", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],"pkg-dir/find-up": ["[email protected]", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="],diff --git a/js/lexical-core/package.json b/js/lexical-core/package.jsonindex 9dc155dc5c..094d8cbbf3 100644--- a/js/lexical-core/package.json+++ b/js/lexical-core/package.json@@ -11,17 +11,17 @@"author": "seamus","dependencies": {"nanoid": "^5.1.5",- "lexical": "0.32.1",+ "lexical": "0.45.0","loro-crdt": "1.13.3",- "@lexical/code": "0.32.1",- "@lexical/headless": "0.32.1",- "@lexical/link": "0.32.1",- "@lexical/list": "0.32.1",- "@lexical/mark": "0.32.1",- "@lexical/markdown": "0.32.1",- "@lexical/rich-text": "0.32.1",- "@lexical/table": "0.32.1",- "@lexical/utils": "0.32.1"+ "@lexical/code": "0.45.0",+ "@lexical/headless": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/utils": "0.45.0"},"devDependencies": {"@types/bun": "^1.3.14"diff --git a/js/lexical-service/bun.lock b/js/lexical-service/bun.lockdeleted file mode 100644index 3e6ea6fa96..0000000000--- a/js/lexical-service/bun.lock+++ /dev/null@@ -1,369 +0,0 @@-{- "lockfileVersion": 1,- "configVersion": 0,- "workspaces": {- "": {- "name": "cloudflare-workers-openapi",- "dependencies": {- "@lexical/code": "0.32.1",- "@lexical/headless": "0.32.1",- "@lexical/history": "0.32.1",- "@lexical/html": "0.32.1",- "@lexical/link": "0.32.1",- "@lexical/list": "0.32.1",- "@lexical/mark": "0.32.1",- "@lexical/markdown": "0.32.1",- "@lexical/plain-text": "0.32.1",- "@lexical/rich-text": "0.32.1",- "@lexical/selection": "0.32.1",- "@lexical/table": "0.32.1",- "@lexical/utils": "0.32.1",- "chanfana": "^3.3.0",- "hono": "^4.6.20",- "immer": "^10.0.3",- "lexical": "0.32.1",- "loro-crdt": "1.5.9",- "nanoid": "^5.1.5",- "zod": "^4.3.6",- },- "devDependencies": {- "@types/bun": "^1.2.19",- "@types/node": "22.13.0",- "@types/service-worker-mock": "^2.0.4",- "tsx": "^4.20.3",- "wrangler": "^4.25.1",- },- },- },- "packages": {- "@asteasolutions/zod-to-openapi": ["@asteasolutions/[email protected]", "", { "dependencies": { "openapi3-ts": "^4.1.2" }, "peerDependencies": { "zod": "^4.0.0" } }, "sha512-SABbKiObg5dLRiTFnqiW1WWwGcg1BJfmHtT2asIBnBHg6Smy/Ms2KHc650+JI4Hw7lSkdiNebEGXpwoxfben8Q=="],-- "@cloudflare/kv-asset-handler": ["@cloudflare/[email protected]", "", { "dependencies": { "mime": "^3.0.0" } }, "sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA=="],-- "@cloudflare/unenv-preset": ["@cloudflare/[email protected]", "", { "peerDependencies": { "unenv": "2.0.0-rc.17", "workerd": "^1.20250521.0" }, "optionalPeers": ["workerd"] }, "sha512-70mk5GPv+ozJ5XcIhFpq4ps7HvQYu+As7vwasUy9LcBadsTcWA2iFis/7aFJmQehfKerDwVOHfMYpgTTC+u24Q=="],-- "@cloudflare/workerd-darwin-64": ["@cloudflare/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-M6S6a/LQ0Jb0R+g0XhlYi1adGifvYmxA5mD/i9TuZZgjs2bIm5ELuka/n3SCnI98ltvlx3HahRaHagAtOilsFg=="],-- "@cloudflare/workerd-darwin-arm64": ["@cloudflare/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-7sFzn6rvAcnLy7MktFL42dYtzL0Idw/kiUmNf2P3TvsBRoShhLK5ZKhbw+NAhvU8e4pXWm5lkE0XmpieA0zNjw=="],-- "@cloudflare/workerd-linux-64": ["@cloudflare/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-EFRrGe/bqK7NHtht7vNlbrDpfvH3eRvtJOgsTpEQEysDjVmlK6pVJxSnLy9Hg1zlLY15IfhfGC+K2qisseHGJQ=="],-- "@cloudflare/workerd-linux-arm64": ["@cloudflare/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-rG8JUleddhUHQVwpXOYv0VbL0S9kOtR9PNKecgVhFpxEhC8aTeg2HNBBjo8st7IfcUvY8WaW3pD3qdAMZ05UwQ=="],-- "@cloudflare/workerd-windows-64": ["@cloudflare/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-qS8H5RCYwE21Om9wo5/F807ClBJIfknhuLBj16eYxvJcj9JqgAKWi12BGgjyGxHuJJjeoQ63lr4wHAdbFntDDg=="],-- "@cspotcode/source-map-support": ["@cspotcode/[email protected]", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.9" } }, "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw=="],-- "@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg=="],-- "@esbuild/aix-ppc64": ["@esbuild/[email protected]", "", { "os": "aix", "cpu": "ppc64" }, "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA=="],-- "@esbuild/android-arm": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "arm" }, "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw=="],-- "@esbuild/android-arm64": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w=="],-- "@esbuild/android-x64": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "x64" }, "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA=="],-- "@esbuild/darwin-arm64": ["@esbuild/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw=="],-- "@esbuild/darwin-x64": ["@esbuild/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg=="],-- "@esbuild/freebsd-arm64": ["@esbuild/[email protected]", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA=="],-- "@esbuild/freebsd-x64": ["@esbuild/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw=="],-- "@esbuild/linux-arm": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg=="],-- "@esbuild/linux-arm64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w=="],-- "@esbuild/linux-ia32": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "ia32" }, "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg=="],-- "@esbuild/linux-loong64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ=="],-- "@esbuild/linux-mips64el": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw=="],-- "@esbuild/linux-ppc64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ=="],-- "@esbuild/linux-riscv64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg=="],-- "@esbuild/linux-s390x": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg=="],-- "@esbuild/linux-x64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ=="],-- "@esbuild/netbsd-arm64": ["@esbuild/[email protected]", "", { "os": "none", "cpu": "arm64" }, "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw=="],-- "@esbuild/netbsd-x64": ["@esbuild/[email protected]", "", { "os": "none", "cpu": "x64" }, "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg=="],-- "@esbuild/openbsd-arm64": ["@esbuild/[email protected]", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ=="],-- "@esbuild/openbsd-x64": ["@esbuild/[email protected]", "", { "os": "openbsd", "cpu": "x64" }, "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ=="],-- "@esbuild/openharmony-arm64": ["@esbuild/[email protected]", "", { "os": "none", "cpu": "arm64" }, "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg=="],-- "@esbuild/sunos-x64": ["@esbuild/[email protected]", "", { "os": "sunos", "cpu": "x64" }, "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w=="],-- "@esbuild/win32-arm64": ["@esbuild/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ=="],-- "@esbuild/win32-ia32": ["@esbuild/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg=="],-- "@esbuild/win32-x64": ["@esbuild/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw=="],-- "@img/sharp-darwin-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.0.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ=="],-- "@img/sharp-darwin-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.0.4" }, "os": "darwin", "cpu": "x64" }, "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q=="],-- "@img/sharp-libvips-darwin-arm64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg=="],-- "@img/sharp-libvips-darwin-x64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ=="],-- "@img/sharp-libvips-linux-arm": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g=="],-- "@img/sharp-libvips-linux-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA=="],-- "@img/sharp-libvips-linux-s390x": ["@img/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA=="],-- "@img/sharp-libvips-linux-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw=="],-- "@img/sharp-libvips-linuxmusl-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA=="],-- "@img/sharp-libvips-linuxmusl-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw=="],-- "@img/sharp-linux-arm": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.0.5" }, "os": "linux", "cpu": "arm" }, "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ=="],-- "@img/sharp-linux-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.0.4" }, "os": "linux", "cpu": "arm64" }, "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA=="],-- "@img/sharp-linux-s390x": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.0.4" }, "os": "linux", "cpu": "s390x" }, "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q=="],-- "@img/sharp-linux-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.0.4" }, "os": "linux", "cpu": "x64" }, "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA=="],-- "@img/sharp-linuxmusl-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" }, "os": "linux", "cpu": "arm64" }, "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g=="],-- "@img/sharp-linuxmusl-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.0.4" }, "os": "linux", "cpu": "x64" }, "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw=="],-- "@img/sharp-wasm32": ["@img/[email protected]", "", { "dependencies": { "@emnapi/runtime": "^1.2.0" }, "cpu": "none" }, "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg=="],-- "@img/sharp-win32-ia32": ["@img/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ=="],-- "@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg=="],-- "@jridgewell/resolve-uri": ["@jridgewell/[email protected]", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="],-- "@jridgewell/sourcemap-codec": ["@jridgewell/[email protected]", "", {}, "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw=="],-- "@jridgewell/trace-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="],-- "@lexical/clipboard": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/html": "0.32.1", "@lexical/list": "0.32.1", "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-oO7CuMVh3EFEqtE6+7Ccf7jMD5RNUmSdTnFm/X4kYNGqs9lgGt8j5PgSk7oP9OuAjxKNdBTbltSlh54CX3AUIg=="],-- "@lexical/code": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/utils": "0.32.1", "lexical": "0.32.1", "prismjs": "^1.30.0" } }, "sha512-2rXj8s/CG32XKQ2EpORpACfpzyAxB+/SrQW2cjwczarLs5Fxnx6u6HwahZnxaF0z5UHIPUy90qDiOiRExc74Yg=="],-- "@lexical/headless": ["@lexical/[email protected]", "", { "dependencies": { "lexical": "0.32.1" } }, "sha512-YAb2d36s75p7RKfKz5WqDqgfa/y3oMmCJOCRmjwsN1WHn8BTij4azzx5x3nkp7U9TMaQDdR9uMr4ISZvjeA0Sw=="],-- "@lexical/history": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-IRsKllumYEWxmzR2evN30MFY+JBM723lSyzm2PAQcgHCeBxi8t0Vc3EdyJRay+YdN65JgrohQi1WbktbK923uQ=="],-- "@lexical/html": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-uctCdC9gVzx/Sw9CimT4C2IDfSbfEGYunyIrJBpsfcdqp0rroGNizjIoZNBH3xcgkk9UDboSADo+wimbzEoy8A=="],-- "@lexical/link": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-atdwNpWjZ0U2/kgS0ATTkZ8lJLHiv3TsJgqJL33BuV9Gn7advJokd4faM79Y8XxkhiPi1lVTBSHgI8V4hs+c+Q=="],-- "@lexical/list": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-3zShCfEdAvodR6mQ5CNN1gcEwfV341LXJzWCIkZzG1cPwaiBHUlT7TynQtKTPn1sATCEMmxoDG0/T+itsRNZgA=="],-- "@lexical/mark": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-AXF2wmUvvSI45y+sgZKnU0pnUdttd9v75DDQgdplqtCkyDqHVGxVCNCrLE+PJtzIrwJxtA2UyC8yFZMBM92HpA=="],-- "@lexical/markdown": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/code": "0.32.1", "@lexical/link": "0.32.1", "@lexical/list": "0.32.1", "@lexical/rich-text": "0.32.1", "@lexical/text": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-AmUTRRx6Je0AOiQqp48Xn92/71AzhFgi4nO1EtPW5eae1CihrtiEh5UQr48mV6EyjvH9D3OlOLU8XrzS+J9a+w=="],-- "@lexical/plain-text": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/clipboard": "0.32.1", "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-uFS3xoETB3phnYHZXfMKvl8gh6YRW7rpokuJmQVMHNNBklORmMpN00rRQ/zsc/jt/nPzaPpE5cLwSHXeJdqJUg=="],-- "@lexical/rich-text": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/clipboard": "0.32.1", "@lexical/selection": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-SnmpZ7boTLxeYfNezNLvchDiJOAALA2nD0Uq/SpkIOJ6R01R7m1aPdLv55LGKoBT9UxCRdo0HWXytwiVZI+ehQ=="],-- "@lexical/selection": ["@lexical/[email protected]", "", { "dependencies": { "lexical": "0.32.1" } }, "sha512-X1aXJdq/5EOuSuMOqK3t+rEVmpqLf+vc2Kl5YuP8+gGWUbXuxR6iryrQuy1mAViZpF/5qw4HO/Sb+9JjubaZEg=="],-- "@lexical/table": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/clipboard": "0.32.1", "@lexical/utils": "0.32.1", "lexical": "0.32.1" } }, "sha512-sGk2jUbQHj5hatpxRyl6IE2oWsjRnYhmaP94THzn95/uK69o8eSizcnd148WzYsX8Zz+L9PTLS1xjvCbfLTP+A=="],-- "@lexical/text": ["@lexical/[email protected]", "", { "dependencies": { "lexical": "0.32.1" } }, "sha512-0Ek8F3KC4d16b2YaTHdyYFqDSBZ5KRtGrqU3GBog+VOGxucGaEbXEK1/ypX5CTe/wwkQDrH0FKWPQbd3l5t5YQ=="],-- "@lexical/utils": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/list": "0.32.1", "@lexical/selection": "0.32.1", "@lexical/table": "0.32.1", "lexical": "0.32.1" } }, "sha512-ZaqZZksNIHJd+g8GXc11D1ESi8JzsdLVQZ+9odXVaNxtwDIaGIqMSccFyuZ9VSoJDde4JXZkgp/0PShbAZDkyw=="],-- "@poppinss/colors": ["@poppinss/[email protected]", "", { "dependencies": { "kleur": "^4.1.5" } }, "sha512-FvdDqtcRCtz6hThExcFOgW0cWX+xwSMWcRuQe5ZEb2m7cVQOAVZOIMt+/v9RxGiD9/OY16qJBXK4CVKWAPalBw=="],-- "@poppinss/dumper": ["@poppinss/[email protected]", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@sindresorhus/is": "^7.0.2", "supports-color": "^10.0.0" } }, "sha512-iG0TIdqv8xJ3Lt9O8DrPRxw1MRLjNpoqiSGU03P/wNLP/s0ra0udPJ1J2Tx5M0J3H/cVyEgpbn8xUKRY9j59kQ=="],-- "@poppinss/exception": ["@poppinss/[email protected]", "", {}, "sha512-m7bpKCD4QMlFCjA/nKTs23fuvoVFoA83brRKmObCUNmi/9tVu8Ve3w4YQAnJu4q3Tjf5fr685HYIC/IA2zHRSg=="],-- "@sindresorhus/is": ["@sindresorhus/[email protected]", "", {}, "sha512-d9xRovfKNz1SKieM0qJdO+PQonjnnIfSNWfHYnBSJ9hkjm0ZPw6HlxscDXYstp3z+7V2GOFHc+J0CYrYTjqCJw=="],-- "@speed-highlight/core": ["@speed-highlight/[email protected]", "", {}, "sha512-0dxmVj4gxg3Jg879kvFS/msl4s9F3T9UXC1InxgOf7t5NvcPD97u/WTA5vL/IxWHMn7qSxBozqrnnE2wvl1m8g=="],-- "@types/bun": ["@types/[email protected]", "", { "dependencies": { "bun-types": "1.2.19" } }, "sha512-d9ZCmrH3CJ2uYKXQIUuZ/pUnTqIvLDS0SK7pFmbx8ma+ziH/FRMoAq5bYpRG7y+w1gl+HgyNZbtqgMq4W4e2Lg=="],-- "@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-ClIbNe36lawluuvq3+YYhnIN2CELi+6q8NpnM7PYp4hBn/TatfboPgVSm2rwKRfnV2M+Ty9GWDFI64KEe+kysA=="],-- "@types/react": ["@types/[email protected]", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g=="],-- "@types/service-worker-mock": ["@types/[email protected]", "", {}, "sha512-MEBT2eiqYfhxjqYm/oAf2AvKLbPTPwJJAYrMdheKnGyz1yG9XBRfxCzi93h27qpSvI7jOYfXqFLVMLBXFDqo4A=="],-- "acorn": ["[email protected]", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="],-- "acorn-walk": ["[email protected]", "", {}, "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A=="],-- "argparse": ["[email protected]", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],-- "blake3-wasm": ["[email protected]", "", {}, "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g=="],-- "bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-uAOTaZSPuYsWIXRpj7o56Let0g/wjihKCkeRqUBhlLVM/Bt+Fj9xTo+LhC1OV1XDaGkz4hNC80et5xgy+9KTHQ=="],-- "chanfana": ["[email protected]", "", { "dependencies": { "@asteasolutions/zod-to-openapi": "^8.4.1", "js-yaml": "^4.1.1", "openapi3-ts": "^4.5.0", "yargs-parser": "^22.0.0", "zod": "^4.3.6" }, "bin": { "chanfana": "dist/cli.js" } }, "sha512-YKZkjymihSi9Wiwb4BbdMzXH7j9OxT4KS+5b9Y9ZUsj6Wthfodkw81cgoSEOMvgMTicCryohKhKZSIKCA6GFQA=="],-- "color": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1", "color-string": "^1.9.0" } }, "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A=="],-- "color-convert": ["[email protected]", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],-- "color-name": ["[email protected]", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],-- "color-string": ["[email protected]", "", { "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" } }, "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg=="],-- "cookie": ["[email protected]", "", {}, "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA=="],-- "csstype": ["[email protected]", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],-- "defu": ["[email protected]", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="],-- "detect-libc": ["[email protected]", "", {}, "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA=="],-- "error-stack-parser-es": ["[email protected]", "", {}, "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA=="],-- "esbuild": ["[email protected]", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.8", "@esbuild/android-arm": "0.25.8", "@esbuild/android-arm64": "0.25.8", "@esbuild/android-x64": "0.25.8", "@esbuild/darwin-arm64": "0.25.8", "@esbuild/darwin-x64": "0.25.8", "@esbuild/freebsd-arm64": "0.25.8", "@esbuild/freebsd-x64": "0.25.8", "@esbuild/linux-arm": "0.25.8", "@esbuild/linux-arm64": "0.25.8", "@esbuild/linux-ia32": "0.25.8", "@esbuild/linux-loong64": "0.25.8", "@esbuild/linux-mips64el": "0.25.8", "@esbuild/linux-ppc64": "0.25.8", "@esbuild/linux-riscv64": "0.25.8", "@esbuild/linux-s390x": "0.25.8", "@esbuild/linux-x64": "0.25.8", "@esbuild/netbsd-arm64": "0.25.8", "@esbuild/netbsd-x64": "0.25.8", "@esbuild/openbsd-arm64": "0.25.8", "@esbuild/openbsd-x64": "0.25.8", "@esbuild/openharmony-arm64": "0.25.8", "@esbuild/sunos-x64": "0.25.8", "@esbuild/win32-arm64": "0.25.8", "@esbuild/win32-ia32": "0.25.8", "@esbuild/win32-x64": "0.25.8" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q=="],-- "exit-hook": ["[email protected]", "", {}, "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw=="],-- "exsolve": ["[email protected]", "", {}, "sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw=="],-- "fsevents": ["[email protected]", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],-- "get-tsconfig": ["[email protected]", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ=="],-- "glob-to-regexp": ["[email protected]", "", {}, "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="],-- "hono": ["[email protected]", "", {}, "sha512-Up2cQbtNz1s111qpnnECdTGqSIUIhZJMLikdKkshebQSEBcoUKq6XJayLGqSZWidiH0zfHRCJqFu062Mz5UuRA=="],-- "immer": ["[email protected]", "", {}, "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw=="],-- "is-arrayish": ["[email protected]", "", {}, "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="],-- "js-yaml": ["[email protected]", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="],-- "kleur": ["[email protected]", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="],-- "lexical": ["[email protected]", "", {}, "sha512-Rvr9p00zUwzjXIqElIjMDyl/24QHw68yaqmXUWIT3lSdSAr8OpjSJK3iWBLZwVZwwpVhwShZRckomc+3vSb/zw=="],-- "loro-crdt": ["[email protected]", "", {}, "sha512-edkfCYh5W42O7EmNVCx6iPrI0yTAhn0DRbEAk6tmiKaL42IpUoqyDREvtFDmdVVgofxKNgceDBQx8fIIjMdr2Q=="],-- "mime": ["[email protected]", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="],-- "miniflare": ["[email protected]", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "acorn": "8.14.0", "acorn-walk": "8.3.2", "exit-hook": "2.2.1", "glob-to-regexp": "0.4.1", "sharp": "^0.33.5", "stoppable": "1.1.0", "undici": "^7.10.0", "workerd": "1.20250712.0", "ws": "8.18.0", "youch": "4.1.0-beta.10", "zod": "3.22.3" }, "bin": { "miniflare": "bootstrap.js" } }, "sha512-cZ8WyQBwqfjYLjd61fDR4/j0nAVbjB3Wxbun/brL9S5FAi4RlTR0LyMTKsIVA0s+nL4Pg9VjVMki4M/Jk2cz+Q=="],-- "nanoid": ["[email protected]", "", { "bin": { "nanoid": "bin/nanoid.js" } }, "sha512-Ir/+ZpE9fDsNH0hQ3C68uyThDXzYcim2EqcZ8zn8Chtt1iylPT9xXJB0kPCnqzgcEGikO9RxSrh63MsmVCU7Fw=="],-- "ohash": ["[email protected]", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="],-- "openapi3-ts": ["[email protected]", "", { "dependencies": { "yaml": "^2.8.0" } }, "sha512-jaL+HgTq2Gj5jRcfdutgRGLosCy/hT8sQf6VOy+P+g36cZOjI1iukdPnijC+4CmeRzg/jEllJUboEic2FhxhtQ=="],-- "path-to-regexp": ["[email protected]", "", {}, "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="],-- "pathe": ["[email protected]", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],-- "prismjs": ["[email protected]", "", {}, "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw=="],-- "resolve-pkg-maps": ["[email protected]", "", {}, "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw=="],-- "semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],-- "sharp": ["[email protected]", "", { "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.3", "semver": "^7.6.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.33.5", "@img/sharp-darwin-x64": "0.33.5", "@img/sharp-libvips-darwin-arm64": "1.0.4", "@img/sharp-libvips-darwin-x64": "1.0.4", "@img/sharp-libvips-linux-arm": "1.0.5", "@img/sharp-libvips-linux-arm64": "1.0.4", "@img/sharp-libvips-linux-s390x": "1.0.4", "@img/sharp-libvips-linux-x64": "1.0.4", "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", "@img/sharp-libvips-linuxmusl-x64": "1.0.4", "@img/sharp-linux-arm": "0.33.5", "@img/sharp-linux-arm64": "0.33.5", "@img/sharp-linux-s390x": "0.33.5", "@img/sharp-linux-x64": "0.33.5", "@img/sharp-linuxmusl-arm64": "0.33.5", "@img/sharp-linuxmusl-x64": "0.33.5", "@img/sharp-wasm32": "0.33.5", "@img/sharp-win32-ia32": "0.33.5", "@img/sharp-win32-x64": "0.33.5" } }, "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw=="],-- "simple-swizzle": ["[email protected]", "", { "dependencies": { "is-arrayish": "^0.3.1" } }, "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg=="],-- "stoppable": ["[email protected]", "", {}, "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw=="],-- "supports-color": ["[email protected]", "", {}, "sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ=="],-- "tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],-- "tsx": ["[email protected]", "", { "dependencies": { "esbuild": "~0.25.0", "get-tsconfig": "^4.7.5" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "bin": { "tsx": "dist/cli.mjs" } }, "sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ=="],-- "ufo": ["[email protected]", "", {}, "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA=="],-- "undici": ["[email protected]", "", {}, "sha512-GrKEsc3ughskmGA9jevVlIOPMiiAHJ4OFUtaAH+NhfTUSiZ1wMPIQqQvAJUrJspFXJt3EBWgpAeoHEDVT1IBug=="],-- "undici-types": ["[email protected]", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],-- "unenv": ["[email protected]", "", { "dependencies": { "defu": "^6.1.4", "exsolve": "^1.0.4", "ohash": "^2.0.11", "pathe": "^2.0.3", "ufo": "^1.6.1" } }, "sha512-B06u0wXkEd+o5gOCMl/ZHl5cfpYbDZKAT+HWTL+Hws6jWu7dCiqBBXXXzMFcFVJb8D4ytAnYmxJA83uwOQRSsg=="],-- "workerd": ["[email protected]", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20250712.0", "@cloudflare/workerd-darwin-arm64": "1.20250712.0", "@cloudflare/workerd-linux-64": "1.20250712.0", "@cloudflare/workerd-linux-arm64": "1.20250712.0", "@cloudflare/workerd-windows-64": "1.20250712.0" }, "bin": { "workerd": "bin/workerd" } }, "sha512-7h+k1OxREpiZW0849g0uQNexRWMcs5i5gUGhJzCY8nIx6Tv4D/ndlXJ47lEFj7/LQdp165IL9dM2D5uDiedZrg=="],-- "wrangler": ["[email protected]", "", { "dependencies": { "@cloudflare/kv-asset-handler": "0.4.0", "@cloudflare/unenv-preset": "2.4.1", "blake3-wasm": "2.1.5", "esbuild": "0.25.4", "miniflare": "4.20250712.2", "path-to-regexp": "6.3.0", "unenv": "2.0.0-rc.17", "workerd": "1.20250712.0" }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@cloudflare/workers-types": "^4.20250712.0" }, "optionalPeers": ["@cloudflare/workers-types"], "bin": { "wrangler": "bin/wrangler.js", "wrangler2": "bin/wrangler.js" } }, "sha512-EXuwyWlgYQZv6GJlyE0lVGk9hHqASssuECECT1XC5aIijTwNLQhsj/TOZ0hKSFlMbVr1E+OAdevAxd0kaF4ovA=="],-- "ws": ["[email protected]", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="],-- "yaml": ["[email protected]", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ=="],-- "yargs-parser": ["[email protected]", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="],-- "youch": ["[email protected]", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@poppinss/dumper": "^0.6.4", "@speed-highlight/core": "^1.2.7", "cookie": "^1.0.2", "youch-core": "^0.3.3" } }, "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ=="],-- "youch-core": ["[email protected]", "", { "dependencies": { "@poppinss/exception": "^1.2.2", "error-stack-parser-es": "^1.0.5" } }, "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA=="],-- "zod": ["[email protected]", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],-- "miniflare/zod": ["[email protected]", "", {}, "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug=="],-- "wrangler/esbuild": ["[email protected]", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.4", "@esbuild/android-arm": "0.25.4", "@esbuild/android-arm64": "0.25.4", "@esbuild/android-x64": "0.25.4", "@esbuild/darwin-arm64": "0.25.4", "@esbuild/darwin-x64": "0.25.4", "@esbuild/freebsd-arm64": "0.25.4", "@esbuild/freebsd-x64": "0.25.4", "@esbuild/linux-arm": "0.25.4", "@esbuild/linux-arm64": "0.25.4", "@esbuild/linux-ia32": "0.25.4", "@esbuild/linux-loong64": "0.25.4", "@esbuild/linux-mips64el": "0.25.4", "@esbuild/linux-ppc64": "0.25.4", "@esbuild/linux-riscv64": "0.25.4", "@esbuild/linux-s390x": "0.25.4", "@esbuild/linux-x64": "0.25.4", "@esbuild/netbsd-arm64": "0.25.4", "@esbuild/netbsd-x64": "0.25.4", "@esbuild/openbsd-arm64": "0.25.4", "@esbuild/openbsd-x64": "0.25.4", "@esbuild/sunos-x64": "0.25.4", "@esbuild/win32-arm64": "0.25.4", "@esbuild/win32-ia32": "0.25.4", "@esbuild/win32-x64": "0.25.4" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q=="],-- "wrangler/esbuild/@esbuild/aix-ppc64": ["@esbuild/[email protected]", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q=="],-- "wrangler/esbuild/@esbuild/android-arm": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "arm" }, "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ=="],-- "wrangler/esbuild/@esbuild/android-arm64": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A=="],-- "wrangler/esbuild/@esbuild/android-x64": ["@esbuild/[email protected]", "", { "os": "android", "cpu": "x64" }, "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ=="],-- "wrangler/esbuild/@esbuild/darwin-arm64": ["@esbuild/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g=="],-- "wrangler/esbuild/@esbuild/darwin-x64": ["@esbuild/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A=="],-- "wrangler/esbuild/@esbuild/freebsd-arm64": ["@esbuild/[email protected]", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ=="],-- "wrangler/esbuild/@esbuild/freebsd-x64": ["@esbuild/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ=="],-- "wrangler/esbuild/@esbuild/linux-arm": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ=="],-- "wrangler/esbuild/@esbuild/linux-arm64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ=="],-- "wrangler/esbuild/@esbuild/linux-ia32": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "ia32" }, "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ=="],-- "wrangler/esbuild/@esbuild/linux-loong64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA=="],-- "wrangler/esbuild/@esbuild/linux-mips64el": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg=="],-- "wrangler/esbuild/@esbuild/linux-ppc64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag=="],-- "wrangler/esbuild/@esbuild/linux-riscv64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA=="],-- "wrangler/esbuild/@esbuild/linux-s390x": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g=="],-- "wrangler/esbuild/@esbuild/linux-x64": ["@esbuild/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA=="],-- "wrangler/esbuild/@esbuild/netbsd-arm64": ["@esbuild/[email protected]", "", { "os": "none", "cpu": "arm64" }, "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ=="],-- "wrangler/esbuild/@esbuild/netbsd-x64": ["@esbuild/[email protected]", "", { "os": "none", "cpu": "x64" }, "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw=="],-- "wrangler/esbuild/@esbuild/openbsd-arm64": ["@esbuild/[email protected]", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A=="],-- "wrangler/esbuild/@esbuild/openbsd-x64": ["@esbuild/[email protected]", "", { "os": "openbsd", "cpu": "x64" }, "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw=="],-- "wrangler/esbuild/@esbuild/sunos-x64": ["@esbuild/[email protected]", "", { "os": "sunos", "cpu": "x64" }, "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q=="],-- "wrangler/esbuild/@esbuild/win32-arm64": ["@esbuild/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ=="],-- "wrangler/esbuild/@esbuild/win32-ia32": ["@esbuild/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg=="],-- "wrangler/esbuild/@esbuild/win32-x64": ["@esbuild/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ=="],- }-}diff --git a/js/lexical-service/package.json b/js/lexical-service/package.jsonindex fac1d00120..f1d27237c5 100644--- a/js/lexical-service/package.json+++ b/js/lexical-service/package.json@@ -17,23 +17,23 @@"check": "tsc --noEmit --project tsconfig.check.json"},"dependencies": {- "@lexical/code": "0.32.1",- "@lexical/headless": "0.32.1",- "@lexical/history": "0.32.1",- "@lexical/html": "0.32.1",- "@lexical/link": "0.32.1",- "@lexical/list": "0.32.1",- "@lexical/mark": "0.32.1",- "@lexical/markdown": "0.32.1",- "@lexical/plain-text": "0.32.1",- "@lexical/rich-text": "0.32.1",- "@lexical/selection": "0.32.1",- "@lexical/table": "0.32.1",- "@lexical/utils": "0.32.1",+ "@lexical/code": "0.45.0",+ "@lexical/headless": "0.45.0",+ "@lexical/history": "0.45.0",+ "@lexical/html": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/plain-text": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/selection": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/utils": "0.45.0","chanfana": "^3.3.0","hono": "^4.6.20","immer": "^10.0.3",- "lexical": "0.32.1",+ "lexical": "0.45.0","loro-crdt": "1.13.3","nanoid": "^5.1.5","zod": "^4.3.6"diff --git a/js/lexical-service/src/endpoints/markdown-snapshot.ts b/js/lexical-service/src/endpoints/markdown-snapshot.tsindex 972ca10109..5358e925b2 100644--- a/js/lexical-service/src/endpoints/markdown-snapshot.ts+++ b/js/lexical-service/src/endpoints/markdown-snapshot.ts@@ -47,7 +47,7 @@ export class MarkdownSnapshotEndpoint extends OpenAPIRoute {);}- return c.body(snapshot, 200, {+ return c.body(new Uint8Array(snapshot), 200, {'Content-Type': 'application/octet-stream',});} catch (error) {diff --git a/js/package.json b/js/package.jsonindex 2d83a21f3b..4071ff4656 100644--- a/js/package.json+++ b/js/package.json@@ -1,10 +1,45 @@{"name": "@coparse/js","dependencies": {+ "@lexical/code": "0.45.0",+ "@lexical/headless": "0.45.0",+ "@lexical/history": "0.45.0",+ "@lexical/html": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/plain-text": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/selection": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/utils": "0.45.0","bebop-tools": "3.1.3",- "idb": "^8.0.3"+ "idb": "^8.0.3",+ "lexical": "0.45.0"},"overrides": {+ "@lexical/clipboard": "0.45.0",+ "@lexical/code": "0.45.0",+ "@lexical/code-core": "0.45.0",+ "@lexical/code-prism": "0.45.0",+ "@lexical/dragon": "0.45.0",+ "@lexical/extension": "0.45.0",+ "@lexical/headless": "0.45.0",+ "@lexical/history": "0.45.0",+ "@lexical/html": "0.45.0",+ "@lexical/internal": "0.45.0",+ "@lexical/link": "0.45.0",+ "@lexical/list": "0.45.0",+ "@lexical/mark": "0.45.0",+ "@lexical/markdown": "0.45.0",+ "@lexical/plain-text": "0.45.0",+ "@lexical/rich-text": "0.45.0",+ "@lexical/selection": "0.45.0",+ "@lexical/table": "0.45.0",+ "@lexical/text": "0.45.0",+ "@lexical/utils": "0.45.0",+ "lexical": "0.45.0","cross-spawn": "7.0.6","undici": ">=6.24.0","flatted": ">=3.4.0",@@ -16,7 +51,7 @@"patchedDependencies": {"[email protected]": "app/patches/[email protected]","@thisbeyond/[email protected]": "app/patches/@thisbeyond%[email protected]",- "@lexical/[email protected]": "app/patches/@lexical%[email protected]",+ "@lexical/[email protected]": "app/patches/@lexical%[email protected]","@kobalte/[email protected]": "app/patches/@kobalte%[email protected]","[email protected]": "app/patches/[email protected]","@tanstack/[email protected]": "app/patches/@tanstack%[email protected]"