@payloadcms/richtext-lexical 4.0.0-internal.e387174 → 4.0.0-internal.e7d4ebc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/exports/client/Field-QGSHF22S.js +2 -0
  2. package/dist/exports/client/{Field-7SMBPPJ7.js.map → Field-QGSHF22S.js.map} +3 -3
  3. package/dist/exports/client/bundled.css +1 -1
  4. package/dist/exports/client/index.js +1 -1
  5. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  6. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  7. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  8. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  9. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  10. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  11. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  12. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  13. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  14. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  15. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  16. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  17. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  18. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  19. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  20. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  21. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -1
  22. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  23. package/dist/features/heading/server/schema.d.ts.map +1 -1
  24. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  25. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  26. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  27. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  28. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  29. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  30. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  31. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  32. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  33. package/dist/features/link/server/schema.d.ts.map +1 -1
  34. package/dist/features/link/server/validate.d.ts.map +1 -1
  35. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  36. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  37. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  38. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  39. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  40. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  41. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  42. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  43. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  44. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  45. package/dist/features/toolbars/fixed/client/Toolbar/index.css +2 -4
  46. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  47. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  48. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  49. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  50. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  51. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  52. package/dist/features/upload/server/schema.d.ts.map +1 -1
  53. package/dist/features/upload/server/validate.d.ts.map +1 -1
  54. package/dist/field/bundled.css +1 -1
  55. package/dist/lexical/LexicalEditor.css +18 -20
  56. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  57. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  58. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  59. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  60. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  61. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  62. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  63. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  64. package/dist/lexical/ui/ContentEditable.css +16 -11
  65. package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
  66. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  67. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  68. package/dist/lexical/utils/point.d.ts.map +1 -1
  69. package/dist/lexical/utils/rect.d.ts.map +1 -1
  70. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  71. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  72. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  73. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  74. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  75. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  76. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  77. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  78. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  79. package/dist/utilities/generateImportMap.d.ts +1 -1
  80. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  81. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  82. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  83. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  84. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  85. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  86. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  87. package/dist/validate/index.d.ts.map +1 -1
  88. package/package.json +5 -6
  89. package/dist/exports/client/Field-7SMBPPJ7.js +0 -2
@@ -56,7 +56,7 @@ ${e.map(t1).join(`
56
56
 
57
57
  `,Rs="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",Is="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",s0=new RegExp("^[^"+Is+"]*["+Rs+"]"),a0=new RegExp("^[^"+Rs+"]*["+Is+"]"),c0={bold:O.IS_BOLD,code:O.IS_CODE,highlight:O.IS_HIGHLIGHT,italic:O.IS_ITALIC,strikethrough:O.IS_STRIKETHROUGH,subscript:O.IS_SUBSCRIPT,superscript:O.IS_SUPERSCRIPT,underline:O.IS_UNDERLINE},u0={directionless:O.IS_DIRECTIONLESS,unmergeable:O.IS_UNMERGEABLE},d0={center:O.IS_ALIGN_CENTER,end:O.IS_ALIGN_END,justify:O.IS_ALIGN_JUSTIFY,left:O.IS_ALIGN_LEFT,right:O.IS_ALIGN_RIGHT,start:O.IS_ALIGN_START},m0={[O.IS_ALIGN_CENTER]:"center",[O.IS_ALIGN_END]:"end",[O.IS_ALIGN_JUSTIFY]:"justify",[O.IS_ALIGN_LEFT]:"left",[O.IS_ALIGN_RIGHT]:"right",[O.IS_ALIGN_START]:"start"},p0={normal:O.IS_NORMAL,segmented:O.IS_SEGMENTED,token:O.IS_TOKEN},f0={[O.IS_NORMAL]:"normal",[O.IS_SEGMENTED]:"segmented",[O.IS_TOKEN]:"token"};var Ms={text:({node:t})=>{let e=t.text;return t.format&O.IS_BOLD&&(e=We("strong",{children:e})),t.format&O.IS_ITALIC&&(e=We("em",{children:e})),t.format&O.IS_STRIKETHROUGH&&(e=We("span",{style:{textDecoration:"line-through"},children:e})),t.format&O.IS_UNDERLINE&&(e=We("span",{style:{textDecoration:"underline"},children:e})),t.format&O.IS_CODE&&(e=We("code",{children:e})),t.format&O.IS_SUBSCRIPT&&(e=We("sub",{children:e})),t.format&O.IS_SUPERSCRIPT&&(e=We("sup",{children:e})),e}};import{jsx as It}from"react/jsx-runtime";var As={upload:({node:t})=>{let e=t;if(typeof e.value!="object")return null;let o=e.value,n=e.fields?.alt||o?.alt||"",r=o.url;if(!o.mimeType.startsWith("image"))return It("a",{href:r,rel:"noopener noreferrer",children:o.filename});if(!o.sizes||!Object.keys(o.sizes).length)return It("img",{alt:n,height:o.height,src:r,width:o.width});let l=[];for(let s in o.sizes){let i=o.sizes[s];if(!i||!i.width||!i.height||!i.mimeType||!i.filesize||!i.filename||!i.url)continue;let u=i?.url;l.push(It("source",{media:`(max-width: ${i.width}px)`,srcSet:u,type:i.mimeType},s))}return l.push(It("img",{alt:n,height:o?.height,src:r,width:o?.width},"image")),It("picture",{children:l})}};var st={...Ls,...Ms,...ws,...ks,...vs,..._s,...Ts,...Ns,...Ss({}),...As,...ys};import{jsx as co,Fragment as h0}from"react/jsx-runtime";import ao from"react";function $s(t){if(!!!t?.root?.children?.length)return!1;let o=!1;if(t?.root?.children?.length===1&&t?.root?.children[0]?.type==="paragraph"){let n=t?.root?.children[0];if(!n?.children||n?.children?.length===0)o=!0;else if(n?.children?.length===1){let r=n?.children[0];r?.type==="text"&&(r?.text?.length||(o=!0))}}return!o}function g0(t){return e=>{let o={...e,isEditor:!1,isJSXConverter:!0};if(t.Component)return t.Component(o);if(t.html){let n=typeof t.html=="function"?t.html(o):t.html;return co("span",{dangerouslySetInnerHTML:{__html:n}})}return null}}function Ds(t){return e=>{if(t.Component){let o={...e,isEditor:!1,isJSXConverter:!0};return t.Component(o)}if(t.Block){let o=e.node,n={childIndex:e.childIndex,converters:e.converters,formData:o.fields??{},isEditor:!1,isJSXConverter:!0,node:o,nodesToJSX:e.nodesToJSX,parent:e.parent};return ao.createElement(t.Block,n)}if(t.html){let o={...e,isEditor:!1,isJSXConverter:!0},n=typeof t.html=="function"?t.html(o):t.html;return co("span",{dangerouslySetInnerHTML:{__html:n}})}return null}}function x0(t){let e={};for(let[o,n]of Object.entries(t)){if(!n||typeof n!="object")continue;if(o==="blocks"){e.blocks={};for(let[l,s]of Object.entries(n)){let i=s;(i.Component||i.Block||i.html)&&(e.blocks[l]=Ds(i))}continue}if(o==="inlineBlocks"){e.inlineBlocks={};for(let[l,s]of Object.entries(n)){let i=s;(i.Component||i.Block||i.html)&&(e.inlineBlocks[l]=Ds(i))}continue}let r=n;(r.Component||r.html)&&(e[o]=g0(r))}return e}function Os({converters:t,data:e,disableIndent:o,disableTextAlign:n,nodeMap:r}){if($s(e)){let l=r?x0(r):void 0,s=l?{...t,...l,blocks:{...t.blocks,...l.blocks},inlineBlocks:{...t.inlineBlocks,...l.inlineBlocks}}:t;return Fs({converters:s,disableIndent:o,disableTextAlign:n,nodes:e.root.children,parent:e.root})}return co(h0,{})}function Fs({converters:t,disableIndent:e,disableTextAlign:o,nodes:n,parent:r}){let l=t.unknown;return n.map((i,u)=>{let d;i.type==="block"?(d=t?.blocks?.[i?.fields?.blockType],!d&&!l&&console.error(`Lexical => JSX converter: Blocks converter: found ${i?.fields?.blockType} block, but no converter is provided`)):i.type==="inlineBlock"?(d=t?.inlineBlocks?.[i?.fields?.blockType],!d&&!l&&console.error(`Lexical => JSX converter: Inline Blocks converter: found ${i?.fields?.blockType} inline block, but no converter is provided`)):d=t[i.type];try{!d&&l&&(d=l);let c;d?c=typeof d=="function"?d({childIndex:u,converters:t,node:i,nodesToJSX:p=>Fs({converters:p.converters??t,disableIndent:p.disableIndent??e,disableTextAlign:p.disableTextAlign??o,nodes:p.nodes,parent:p.parent??{...i,parent:r}}),parent:r}):d:c=co("span",{children:"unknown node"},u);let a={};if(!o&&(!Array.isArray(o)||!o?.includes(i.type))&&"format"in i&&i.format)switch(i.format){case"center":a.textAlign="center";break;case"end":a.textAlign="right";break;case"justify":a.textAlign="justify";break;case"left":break;case"right":a.textAlign="right";break;case"start":a.textAlign="left";break}if(!e&&(!Array.isArray(e)||!e?.includes(i.type))&&"indent"in i&&i.indent&&i.type!=="listitem"&&(a.paddingInlineStart=`${Number(i.indent)*40}px`),ao.isValidElement(c)){if(a.textAlign||a.paddingInlineStart){let m={...a,...c?.props?.style??{}};return ao.cloneElement(c,{key:u,style:m})}return ao.cloneElement(c,{key:u})}return c}catch(c){return console.error("Error converting lexical node to JSX:",c,"node:",i),null}}).filter(Boolean)}function wn({className:t,converters:e,data:o,disableContainer:n,disableIndent:r,disableTextAlign:l,nodeMap:s}){if(!o)return null;let i=e,u={};i?typeof i=="function"?u=i({defaultConverters:st}):u=i:u=st;let d=o&&!Array.isArray(o)&&typeof o=="object"&&"root"in o&&Os({converters:u,data:o,disableIndent:r,disableTextAlign:l,nodeMap:s});return n?Bs(C0,{children:d}):Bs("div",{className:t??"payload-richtext",children:d})}function js(){let t=b0(7),[e]=k0(),o;t[0]!==e?(o=()=>e.getEditorState().toJSON(),t[0]=e,t[1]=o):o=t[1];let[n,r]=T0(o),l,s;t[2]!==e?(l=()=>e.registerUpdateListener(u=>{let{editorState:d}=u;r(d.toJSON())}),s=[e],t[2]=e,t[3]=l,t[4]=s):(l=t[3],s=t[4]),_0(l,s);let i;return t[5]!==n?(i=Ps("div",{className:"debug-jsx-converter",children:Ps(wn,{converters:st,data:n})}),t[5]=n,t[6]=i):i=t[6],i}var w0=A({plugins:[{Component:js,position:"bottom"}]});var H={amber:{50:"oklch(0.987 0.022 95.277)",100:"oklch(0.962 0.059 95.617)",200:"oklch(0.924 0.12 95.746)",300:"oklch(0.879 0.169 91.605)",400:"oklch(0.828 0.189 84.429)",500:"oklch(0.769 0.188 70.08)",600:"oklch(0.666 0.179 58.318)",700:"oklch(0.555 0.163 48.998)",800:"oklch(0.473 0.137 46.201)",900:"oklch(0.414 0.112 45.904)",950:"oklch(0.279 0.077 45.635)"},black:"#000",blue:{50:"oklch(0.97 0.014 254.604)",100:"oklch(0.932 0.032 255.585)",200:"oklch(0.882 0.059 254.128)",300:"oklch(0.809 0.105 251.813)",400:"oklch(0.707 0.165 254.624)",500:"oklch(0.623 0.214 259.815)",600:"oklch(0.546 0.245 262.881)",700:"oklch(0.488 0.243 264.376)",800:"oklch(0.424 0.199 265.638)",900:"oklch(0.379 0.146 265.522)",950:"oklch(0.282 0.091 267.935)"},current:"currentColor",cyan:{50:"oklch(0.984 0.019 200.873)",100:"oklch(0.956 0.045 203.388)",200:"oklch(0.917 0.08 205.041)",300:"oklch(0.865 0.127 207.078)",400:"oklch(0.789 0.154 211.53)",500:"oklch(0.715 0.143 215.221)",600:"oklch(0.609 0.126 221.723)",700:"oklch(0.52 0.105 223.128)",800:"oklch(0.45 0.085 224.283)",900:"oklch(0.398 0.07 227.392)",950:"oklch(0.302 0.056 229.695)"},emerald:{50:"oklch(0.979 0.021 166.113)",100:"oklch(0.95 0.052 163.051)",200:"oklch(0.905 0.093 164.15)",300:"oklch(0.845 0.143 164.978)",400:"oklch(0.765 0.177 163.223)",500:"oklch(0.696 0.17 162.48)",600:"oklch(0.596 0.145 163.225)",700:"oklch(0.508 0.118 165.612)",800:"oklch(0.432 0.095 166.913)",900:"oklch(0.378 0.077 168.94)",950:"oklch(0.262 0.051 172.552)"},fuchsia:{50:"oklch(0.977 0.017 320.058)",100:"oklch(0.952 0.037 318.852)",200:"oklch(0.903 0.076 319.62)",300:"oklch(0.833 0.145 321.434)",400:"oklch(0.74 0.238 322.16)",500:"oklch(0.667 0.295 322.15)",600:"oklch(0.591 0.293 322.896)",700:"oklch(0.518 0.253 323.949)",800:"oklch(0.452 0.211 324.591)",900:"oklch(0.401 0.17 325.612)",950:"oklch(0.293 0.136 325.661)"},gray:{50:"oklch(0.985 0.002 247.839)",100:"oklch(0.967 0.003 264.542)",200:"oklch(0.928 0.006 264.531)",300:"oklch(0.872 0.01 258.338)",400:"oklch(0.707 0.022 261.325)",500:"oklch(0.551 0.027 264.364)",600:"oklch(0.446 0.03 256.802)",700:"oklch(0.373 0.034 259.733)",800:"oklch(0.278 0.033 256.848)",900:"oklch(0.21 0.034 264.665)",950:"oklch(0.13 0.028 261.692)"},green:{50:"oklch(0.982 0.018 155.826)",100:"oklch(0.962 0.044 156.743)",200:"oklch(0.925 0.084 155.995)",300:"oklch(0.871 0.15 154.449)",400:"oklch(0.792 0.209 151.711)",500:"oklch(0.723 0.219 149.579)",600:"oklch(0.627 0.194 149.214)",700:"oklch(0.527 0.154 150.069)",800:"oklch(0.448 0.119 151.328)",900:"oklch(0.393 0.095 152.535)",950:"oklch(0.266 0.065 152.934)"},indigo:{50:"oklch(0.962 0.018 272.314)",100:"oklch(0.93 0.034 272.788)",200:"oklch(0.87 0.065 274.039)",300:"oklch(0.785 0.115 274.713)",400:"oklch(0.673 0.182 276.935)",500:"oklch(0.585 0.233 277.117)",600:"oklch(0.511 0.262 276.966)",700:"oklch(0.457 0.24 277.023)",800:"oklch(0.398 0.195 277.366)",900:"oklch(0.359 0.144 278.697)",950:"oklch(0.257 0.09 281.288)"},inherit:"inherit",lime:{50:"oklch(0.986 0.031 120.757)",100:"oklch(0.967 0.067 122.328)",200:"oklch(0.938 0.127 124.321)",300:"oklch(0.897 0.196 126.665)",400:"oklch(0.841 0.238 128.85)",500:"oklch(0.768 0.233 130.85)",600:"oklch(0.648 0.2 131.684)",700:"oklch(0.532 0.157 131.589)",800:"oklch(0.453 0.124 130.933)",900:"oklch(0.405 0.101 131.063)",950:"oklch(0.274 0.072 132.109)"},neutral:{50:"oklch(0.985 0 0)",100:"oklch(0.97 0 0)",200:"oklch(0.922 0 0)",300:"oklch(0.87 0 0)",400:"oklch(0.708 0 0)",500:"oklch(0.556 0 0)",600:"oklch(0.439 0 0)",700:"oklch(0.371 0 0)",800:"oklch(0.269 0 0)",900:"oklch(0.205 0 0)",950:"oklch(0.145 0 0)"},orange:{50:"oklch(0.98 0.016 73.684)",100:"oklch(0.954 0.038 75.164)",200:"oklch(0.901 0.076 70.697)",300:"oklch(0.837 0.128 66.29)",400:"oklch(0.75 0.183 55.934)",500:"oklch(0.705 0.213 47.604)",600:"oklch(0.646 0.222 41.116)",700:"oklch(0.553 0.195 38.402)",800:"oklch(0.47 0.157 37.304)",900:"oklch(0.408 0.123 38.172)",950:"oklch(0.266 0.079 36.259)"},pink:{50:"oklch(0.971 0.014 343.198)",100:"oklch(0.948 0.028 342.258)",200:"oklch(0.899 0.061 343.231)",300:"oklch(0.823 0.12 346.018)",400:"oklch(0.718 0.202 349.761)",500:"oklch(0.656 0.241 354.308)",600:"oklch(0.592 0.249 0.584)",700:"oklch(0.525 0.223 3.958)",800:"oklch(0.459 0.187 3.815)",900:"oklch(0.408 0.153 2.432)",950:"oklch(0.284 0.109 3.907)"},purple:{50:"oklch(0.977 0.014 308.299)",100:"oklch(0.946 0.033 307.174)",200:"oklch(0.902 0.063 306.703)",300:"oklch(0.827 0.119 306.383)",400:"oklch(0.714 0.203 305.504)",500:"oklch(0.627 0.265 303.9)",600:"oklch(0.558 0.288 302.321)",700:"oklch(0.496 0.265 301.924)",800:"oklch(0.438 0.218 303.724)",900:"oklch(0.381 0.176 304.987)",950:"oklch(0.291 0.149 302.717)"},red:{50:"oklch(0.971 0.013 17.38)",100:"oklch(0.936 0.032 17.717)",200:"oklch(0.885 0.062 18.334)",300:"oklch(0.808 0.114 19.571)",400:"oklch(0.704 0.191 22.216)",500:"oklch(0.637 0.237 25.331)",600:"oklch(0.577 0.245 27.325)",700:"oklch(0.505 0.213 27.518)",800:"oklch(0.444 0.177 26.899)",900:"oklch(0.396 0.141 25.723)",950:"oklch(0.258 0.092 26.042)"},rose:{50:"oklch(0.969 0.015 12.422)",100:"oklch(0.941 0.03 12.58)",200:"oklch(0.892 0.058 10.001)",300:"oklch(0.81 0.117 11.638)",400:"oklch(0.712 0.194 13.428)",500:"oklch(0.645 0.246 16.439)",600:"oklch(0.586 0.253 17.585)",700:"oklch(0.514 0.222 16.935)",800:"oklch(0.455 0.188 13.697)",900:"oklch(0.41 0.159 10.272)",950:"oklch(0.271 0.105 12.094)"},sky:{50:"oklch(0.977 0.013 236.62)",100:"oklch(0.951 0.026 236.824)",200:"oklch(0.901 0.058 230.902)",300:"oklch(0.828 0.111 230.318)",400:"oklch(0.746 0.16 232.661)",500:"oklch(0.685 0.169 237.323)",600:"oklch(0.588 0.158 241.966)",700:"oklch(0.5 0.134 242.749)",800:"oklch(0.443 0.11 240.79)",900:"oklch(0.391 0.09 240.876)",950:"oklch(0.293 0.066 243.157)"},slate:{50:"oklch(0.984 0.003 247.858)",100:"oklch(0.968 0.007 247.896)",200:"oklch(0.929 0.013 255.508)",300:"oklch(0.869 0.022 252.894)",400:"oklch(0.704 0.04 256.788)",500:"oklch(0.554 0.046 257.417)",600:"oklch(0.446 0.043 257.281)",700:"oklch(0.372 0.044 257.287)",800:"oklch(0.279 0.041 260.031)",900:"oklch(0.208 0.042 265.755)",950:"oklch(0.129 0.042 264.695)"},stone:{50:"oklch(0.985 0.001 106.423)",100:"oklch(0.97 0.001 106.424)",200:"oklch(0.923 0.003 48.717)",300:"oklch(0.869 0.005 56.366)",400:"oklch(0.709 0.01 56.259)",500:"oklch(0.553 0.013 58.071)",600:"oklch(0.444 0.011 73.639)",700:"oklch(0.374 0.01 67.558)",800:"oklch(0.268 0.007 34.298)",900:"oklch(0.216 0.006 56.043)",950:"oklch(0.147 0.004 49.25)"},teal:{50:"oklch(0.984 0.014 180.72)",100:"oklch(0.953 0.051 180.801)",200:"oklch(0.91 0.096 180.426)",300:"oklch(0.855 0.138 181.071)",400:"oklch(0.777 0.152 181.912)",500:"oklch(0.704 0.14 182.503)",600:"oklch(0.6 0.118 184.704)",700:"oklch(0.511 0.096 186.391)",800:"oklch(0.437 0.078 188.216)",900:"oklch(0.386 0.063 188.416)",950:"oklch(0.277 0.046 192.524)"},transparent:"transparent",violet:{50:"oklch(0.969 0.016 293.756)",100:"oklch(0.943 0.029 294.588)",200:"oklch(0.894 0.057 293.283)",300:"oklch(0.811 0.111 293.571)",400:"oklch(0.702 0.183 293.541)",500:"oklch(0.606 0.25 292.717)",600:"oklch(0.541 0.281 293.009)",700:"oklch(0.491 0.27 292.581)",800:"oklch(0.432 0.232 292.759)",900:"oklch(0.38 0.189 293.745)",950:"oklch(0.283 0.141 291.089)"},white:"#fff",yellow:{50:"oklch(0.987 0.026 102.212)",100:"oklch(0.973 0.071 103.193)",200:"oklch(0.945 0.129 101.54)",300:"oklch(0.905 0.182 98.111)",400:"oklch(0.852 0.199 91.936)",500:"oklch(0.795 0.184 86.047)",600:"oklch(0.681 0.162 75.834)",700:"oklch(0.554 0.135 66.442)",800:"oklch(0.476 0.114 61.907)",900:"oklch(0.421 0.095 57.708)",950:"oklch(0.286 0.066 53.813)"},zinc:{50:"oklch(0.985 0 0)",100:"oklch(0.967 0.001 286.375)",200:"oklch(0.92 0.004 286.32)",300:"oklch(0.871 0.006 286.286)",400:"oklch(0.705 0.015 286.067)",500:"oklch(0.552 0.016 285.938)",600:"oklch(0.442 0.017 285.786)",700:"oklch(0.37 0.013 285.805)",800:"oklch(0.274 0.006 286.033)",900:"oklch(0.21 0.006 285.885)",950:"oklch(0.141 0.005 285.823)"}},E0={text:{"text-red":{css:{color:`light-dark(${H.red[600]}, ${H.red[400]})`},label:"Red"},"text-orange":{css:{color:`light-dark(${H.orange[600]}, ${H.orange[400]})`},label:"Orange"},"text-yellow":{css:{color:`light-dark(${H.yellow[700]}, ${H.yellow[300]})`},label:"Yellow"},"text-green":{css:{color:`light-dark(${H.green[700]}, ${H.green[400]})`},label:"Green"},"text-blue":{css:{color:`light-dark(${H.blue[600]}, ${H.blue[400]})`},label:"Blue"},"text-purple":{css:{color:`light-dark(${H.purple[600]}, ${H.purple[400]})`},label:"Purple"},"text-pink":{css:{color:`light-dark(${H.pink[600]}, ${H.pink[400]})`},label:"Pink"}},background:{"bg-red":{css:{"background-color":`light-dark(${H.red[400]}, ${H.red[600]})`},label:"Red"},"bg-orange":{css:{"background-color":`light-dark(${H.orange[400]}, ${H.orange[600]})`},label:"Orange"},"bg-yellow":{css:{"background-color":`light-dark(${H.yellow[300]}, ${H.yellow[700]})`},label:"Yellow"},"bg-green":{css:{"background-color":`light-dark(${H.green[400]}, ${H.green[700]})`},label:"Green"},"bg-blue":{css:{"background-color":`light-dark(${H.blue[400]}, ${H.blue[600]})`},label:"Blue"},"bg-purple":{css:{"background-color":`light-dark(${H.purple[400]}, ${H.purple[600]})`},label:"Purple"},"bg-pink":{css:{"background-color":`light-dark(${H.pink[400]}, ${H.pink[600]})`},label:"Pink"}}};import{$isNodeSelection as mh}from"lexical";import{jsx as Hs}from"react/jsx-runtime";import"react";var S0="M9.5 6C9.77614 6 10 6.22386 10 6.5C10 6.77614 9.77614 7 9.5 7H7.5C7.22386 7 7 7.22386 7 7.5V16.5C7 16.7761 7.22386 17 7.5 17H16.5C16.7761 17 17 16.7761 17 16.5V14.5C17 14.2239 17.2239 14 17.5 14C17.7761 14 18 14.2239 18 14.5V16.5C18 17.3284 17.3284 18 16.5 18H7.5C6.67157 18 6 17.3284 6 16.5V7.5C6 6.67157 6.67157 6 7.5 6H9.5ZM17.5 6C17.7761 6 18 6.22386 18 6.5V11.5C18 11.7761 17.7761 12 17.5 12C17.2239 12 17 11.7761 17 11.5V7.70703L12.8535 11.8535C12.6583 12.0488 12.3417 12.0488 12.1465 11.8535C11.9512 11.6583 11.9512 11.3417 12.1465 11.1465L16.293 7H12.5C12.2239 7 12 6.77614 12 6.5C12 6.22386 12.2239 6 12.5 6H17.5Z",En=({className:t})=>Hs("svg",{"aria-hidden":"true",className:["icon",t].filter(Boolean).join(" "),fill:"none",focusable:"false",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",children:Hs("path",{d:S0,fill:"currentColor"})});import{jsx as R0}from"react/jsx-runtime";import{$applyNodeReplacement as I0}from"lexical";import*as Us from"react";import{DecoratorBlockNode as N0}from"@lexical/react/LexicalDecoratorBlockNode.js";import{addClassNamesToElement as L0}from"@lexical/utils";import{$applyNodeReplacement as y0}from"lexical";function v0(t){let e=t.getAttribute("data-lexical-relationship-id"),o=t.getAttribute("data-lexical-relationship-relationTo");return e!=null&&o!=null?{node:Gs({relationTo:o,value:e})}:null}var Mt=class extends N0{__data;constructor({data:e,format:o,key:n}){super(o,n),this.__data=e}static clone(e){return new this({data:e.__data,format:e.__format,key:e.__key})}static getType(){return"relationship"}static importDOM(){return{div:e=>!e.hasAttribute("data-lexical-relationship-relationTo")||!e.hasAttribute("data-lexical-relationship-id")?null:{conversion:v0,priority:2}}}static importJSON(e){e.version===1&&e?.value?.id&&(e.value=e.value.id);let o={relationTo:e.relationTo,value:e.value},n=Gs(o);return n.setFormat(e.format),n}static isInline(){return!1}createDOM(e){let o=document.createElement("div");return L0(o,e?.theme?.relationship),o}decorate(e,o){return null}exportDOM(){let e=document.createElement("div");e.setAttribute("data-lexical-relationship-id",String(typeof this.__data?.value=="object"?this.__data?.value?.id:this.__data?.value)),e.setAttribute("data-lexical-relationship-relationTo",this.__data?.relationTo);let o=document.createTextNode(this.getTextContent());return e.append(o),{element:e}}exportJSON(){return{...super.exportJSON(),...this.getData(),type:"relationship",version:2}}getData(){return this.getLatest().__data}getTextContent(){return`${this.__data?.relationTo} relation to ${typeof this.__data?.value=="object"?this.__data?.value?.id:this.__data?.value}`}setData(e){let o=this.getWritable();o.__data=e}};function Gs(t){return y0(new Mt({data:t}))}var M0=Us.lazy(()=>import("./RelationshipComponent-YCPAKOL7.js").then(t=>({default:t.RelationshipComponent})));function A0(t){let e=t.getAttribute("data-lexical-relationship-id"),o=t.getAttribute("data-lexical-relationship-relationTo");return e!=null&&o!=null?{node:ze({relationTo:o,value:e})}:null}var Ne=class extends Mt{static clone(e){return super.clone(e)}static getType(){return super.getType()}static importDOM(){return{div:e=>!e.hasAttribute("data-lexical-relationship-relationTo")||!e.hasAttribute("data-lexical-relationship-id")?null:{conversion:A0,priority:2}}}static importJSON(e){e.version===1&&e?.value?.id&&(e.value=e.value.id);let o={relationTo:e.relationTo,value:e.value},n=ze(o);return n.setFormat(e.format),n}decorate(e,o){return R0(M0,{className:o.theme.relationship??"LexicalEditorTheme__relationship",data:this.__data,format:this.__format,nodeKey:this.getKey()})}exportJSON(){return super.exportJSON()}};function ze(t){return I0(new Ne({data:t}))}function Sn(t){return t instanceof Ne}import{c as eh}from"react/compiler-runtime";import{jsx as th}from"react/jsx-runtime";import{useLexicalComposerContext as oh}from"@lexical/react/LexicalComposerContext.js";import{$insertNodeToNearestRoot as nh}from"@lexical/utils";import{$getPreviousSelection as rh,$getSelection as lh,$isParagraphNode as ih,$isRangeSelection as sh,COMMAND_PRIORITY_EDITOR as ah,createCommand as ch}from"lexical";import{useEffect as uh}from"react";import{c as zs}from"react/compiler-runtime";import{jsx as Nn}from"react/jsx-runtime";import{useLexicalComposerContext as Ks}from"@lexical/react/LexicalComposerContext.js";import{toast as W0}from"@payloadcms/ui";import{$getNodeByKey as z0,COMMAND_PRIORITY_EDITOR as Js}from"lexical";import{useEffect as Xs,useState as K0}from"react";import{c as $0}from"react/compiler-runtime";import{jsx as D0}from"react/jsx-runtime";import{useLexicalComposerContext as O0}from"@lexical/react/LexicalComposerContext";import{useListDrawer as F0,useModal as B0}from"@payloadcms/ui";import{$getNodeByKey as Vs,$getPreviousSelection as P0,$getRoot as j0,$getSelection as H0,$isRangeSelection as G0,$setSelection as U0}from"lexical";import{useEffect as V0,useState as Ws}from"react";var At=t=>{let e=$0(23),[o]=O0(),[n,r]=Ws(null),[l,s]=Ws(!1),[i,u,d]=F0(t),{closeDrawer:c,drawerSlug:a,isDrawerOpen:m,openDrawer:p}=d,{modalState:h}=B0(),f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{let N=H0()??P0();r(N)},e[0]=f):f=e[0];let g=f,_;e[1]!==o||e[2]!==n?(_=()=>{n&&o.update(()=>{if(G0(n)){let{anchor:N,focus:E}=n;Vs(N.key)&&Vs(E.key)&&U0(n.clone())}else j0().selectEnd()},{discrete:!0,skipTransforms:!0})},e[1]=o,e[2]=n,e[3]=_):_=e[3];let L=_,R;e[4]!==c?(R=()=>{c()},e[4]=c,e[5]=R):R=e[5];let b=R,x,C;e[6]!==a||e[7]!==h||e[8]!==L||e[9]!==l?(x=()=>{if(!l)return;let N=h[a];N&&!N?.isOpen&&(s(!1),setTimeout(()=>{L()},1))},C=[h,a,L,l],e[6]=a,e[7]=h,e[8]=L,e[9]=l,e[10]=x,e[11]=C):(x=e[10],C=e[11]),V0(x,C);let k;e[12]!==u?(k=N=>D0(u,{...N,onClick:()=>{g()}}),e[12]=u,e[13]=k):k=e[13];let T;e[14]!==p?(T=()=>{g(),p(),s(!0)},e[14]=p,e[15]=T):T=e[15];let I;return e[16]!==i||e[17]!==b||e[18]!==m||e[19]!==a||e[20]!==k||e[21]!==T?(I={closeListDrawer:b,isListDrawerOpen:m,ListDrawer:i,listDrawerSlug:a,ListDrawerToggler:k,openListDrawer:T},e[16]=i,e[17]=b,e[18]=m,e[19]=a,e[20]=k,e[21]=T,e[22]=I):I=e[22],I};var J0=({editor:t,relationTo:e,replaceNodeKey:o,value:n})=>{o?t.update(()=>{let r=z0(o);r&&r.replace(ze({relationTo:e,value:n}))}):t.dispatchCommand(Ln,{relationTo:e,value:n})},X0=t=>{let e=zs(14),{enabledCollectionSlugs:o}=t,[n]=Ks(),[r,l]=K0(null),s=o?.[0],i;e[0]!==o||e[1]!==s?(i={collectionSlugs:o,selectedCollection:s},e[0]=o,e[1]=s,e[2]=i):i=e[2];let{closeListDrawer:u,ListDrawer:d,openListDrawer:c}=At(i),a,m;e[3]!==n||e[4]!==c?(a=()=>n.registerCommand(qe,g=>(l(g?.replace?g?.replace.nodeKey:null),c(),!0),Js),m=[n,c],e[3]=n,e[4]=c,e[5]=a,e[6]=m):(a=e[5],m=e[6]),Xs(a,m);let p;e[7]!==u||e[8]!==n||e[9]!==r?(p=g=>{let{collectionSlug:_,doc:L}=g;J0({editor:n,relationTo:_,replaceNodeKey:r,value:L.id}),u()},e[7]=u,e[8]=n,e[9]=r,e[10]=p):p=e[10];let h=p,f;return e[11]!==d||e[12]!==h?(f=Nn(d,{onSelect:h}),e[11]=d,e[12]=h,e[13]=f):f=e[13],f},Z0=()=>{let t=zs(3),[e]=Ks(),o,n;return t[0]!==e?(o=()=>e.registerCommand(qe,Y0,Js),n=[e],t[0]=e,t[1]=o,t[2]=n):(o=t[1],n=t[2]),Xs(o,n),null},Zs=({enabledCollectionSlugs:t})=>t?.length?Nn(X0,{enabledCollectionSlugs:t}):Nn(Z0,{});function Y0(){return W0.error("No relationship collections enabled"),!0}import{useConfig as q0,useEntityVisibility as Q0}from"@payloadcms/ui";import*as qs from"react";var Ys=(t,{disabledCollections:e,enabledCollections:o,uploads:n,visibleSlugs:r})=>{let l=o?.length?new Set(o):null,s=e?.length?new Set(e):null;return t.filter(i=>{let{slug:u,admin:d,upload:c}=i;if(r&&!r.includes(u))return!1;if(n){if(!d?.enableRichTextRelationship||!c)return!1}else if(c||!d?.enableRichTextRelationship)return!1;return!(l&&!l.has(u)||s&&s.has(u))})};var uo=t=>{let{collectionSlugsBlacklist:e,collectionSlugsWhitelist:o,uploads:n=!1}=t||{},{config:{collections:r}}=q0(),{visibleEntities:l}=Q0();return qs.useMemo(()=>{let s=Ys(r,{disabledCollections:e,enabledCollections:o,uploads:n,visibleSlugs:l?.collections});return{enabledCollections:s,enabledCollectionSlugs:s.map(i=>i.slug)}},[r,l,n,o,e])};var Ln=ch("INSERT_RELATIONSHIP_COMMAND"),Qs=t=>{let e=eh(8),{clientProps:o}=t,[n]=oh(),r=o?.disabledCollections,l=o?.enabledCollections,s;e[0]!==r||e[1]!==l?(s={collectionSlugsBlacklist:r,collectionSlugsWhitelist:l},e[0]=r,e[1]=l,e[2]=s):s=e[2];let{enabledCollectionSlugs:i}=uo(s),u,d;e[3]!==n?(u=()=>{if(!n.hasNodes([Ne]))throw new Error("RelationshipPlugin: RelationshipNode not registered on editor");return n.registerCommand(Ln,dh,ah)},d=[n],e[3]=n,e[4]=u,e[5]=d):(u=e[4],d=e[5]),uh(u,d);let c;return e[6]!==i?(c=th(Zs,{enabledCollectionSlugs:i}),e[6]=i,e[7]=c):c=e[7],c};function dh(t){let e=lh()||rh();if(sh(e)){let o=ze(t),{focus:n}=e,r=n.getNode();nh(o),ih(r)&&!r.__first&&r.remove()}return!0}var ph=A({nodes:[Ne],plugins:[{Component:Qs,position:"normal"}],slashMenu:{groups:[X([{Icon:En,key:"relationship",keywords:["relationship","relation","rel"],label:({i18n:t})=>t.t("lexical:relationship:label"),onSelect:({editor:t})=>{t.dispatchCommand(qe,{replace:!1})}}])]},toolbarFixed:{groups:[_e([{ChildComponent:En,isActive:({selection:t})=>{if(!mh(t)||!t.getNodes().length)return!1;let e=t.getNodes()[0];return Sn(e)},key:"relationship",label:({i18n:t})=>t.t("lexical:relationship:label"),onSelect:({editor:t})=>{t.dispatchCommand(qe,{replace:!1})}}])]}});import{c as Hh}from"react/compiler-runtime";import{jsx as fe,jsxs as Gh}from"react/jsx-runtime";import{useLexicalComposerContext as Uh}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as ca}from"@lexical/react/useLexicalEditable";import{useScrollInfo as Vh,useThrottledEffect as Wh,useTranslation as zh}from"@payloadcms/ui";import*as ho from"react";import{useMemo as Mn}from"react";import{jsx as fh,jsxs as hh}from"react/jsx-runtime";import{Tooltip as gh,useTranslation as xh}from"@payloadcms/ui";import{$addUpdateTag as Ch}from"lexical";import{useCallback as ea,useEffect as bh,useMemo as ta,useRef as kh,useState as _h}from"react";var yn="toolbar-popup__button",$t=({active:t=!1,children:e,editor:o,enabled:n=!0,item:r})=>{let{i18n:l}=xh(),{fieldProps:{featureClientSchemaMap:s,schemaPath:i}}=U(),[u,d]=_h(!1),c=kh(null);bh(()=>{c.current?.removeAttribute("data-pressing")},[t]);let a=ta(()=>r.label?typeof r.label=="function"?r.label({featureClientSchemaMap:s,i18n:l,schemaPath:i}):r.label:r.key.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,f=>f.toUpperCase()),[s,l,i,r]),m=ta(()=>[yn,n?"":"disabled",t?"active":"",r.key?`${yn}-${r.key}`:""].filter(Boolean).join(" "),[t,n,r.key]),p=ea(()=>{n&&o.focus(()=>{o.update(()=>{Ch("toolbar")}),r.onSelect?.({editor:o,isActive:t})})},[o,r,t,n]),h=ea(f=>{f.preventDefault(),f.currentTarget.setAttribute("data-pressing","")},[]);return hh("button",{"aria-label":a,className:m,"data-button-key":r.key,disabled:!n,onClick:p,onMouseDown:h,onPointerEnter:()=>d(!0),onPointerLeave:()=>{d(!1),c.current?.removeAttribute("data-pressing")},ref:c,type:"button",children:[fh(gh,{className:`${yn}__tooltip`,show:u,children:a}),e]})};import{c as yh}from"react/compiler-runtime";import{jsx as at}from"react/jsx-runtime";import vh,{useMemo as Rh}from"react";import{useTranslation as Ih}from"@payloadcms/ui";import{jsx as Ae,jsxs as oa}from"react/jsx-runtime";import{Button as Th}from"@payloadcms/ui";import{$addUpdateTag as wh,isDOMNode as Eh}from"lexical";import mo,{useCallback as Sh,useEffect as po,useMemo as ra,useRef as vn,useState as Rn}from"react";import{createPortal as Nh}from"react-dom";var na="toolbar-popup__dropdown-item",la=mo.createContext(null);function ia({active:t,children:e,editor:o,enabled:n,Icon:r,item:l,itemKey:s,tooltip:i}){let u=ra(()=>[na,n===!1?"disabled":"",t?"active":"",l?.key?`${na}-${l.key}`:""].filter(Boolean).join(" "),[n,t,l.key]),d=vn(null),c=mo.use(la);if(c===null)throw new Error("DropDownItem must be used within a DropDown");let{registerItem:a}=c;return po(()=>{d?.current!=null&&a(d)},[d,a]),Ae(Th,{"aria-label":i,buttonStyle:"ghost",className:u,disabled:n===!1,extraButtonProps:{"data-item-key":s},icon:r,iconPosition:"left",onClick:()=>{n!==!1&&o.focus(()=>{o.update(()=>{wh("toolbar")}),l.onSelect?.({editor:o,isActive:t})})},onMouseDown:m=>{m.preventDefault()},ref:d,tooltip:i,type:"button",children:e})}function Lh({children:t,dropdownKey:e,dropDownRef:o,itemsContainerClassNames:n,onClose:r}){let[l,s]=Rn(),[i,u]=Rn(),d=Sh(m=>{s(p=>p!=null?[...p,m]:[m])},[s]),c=m=>{if(l==null)return;let{key:p}=m;["ArrowDown","ArrowUp","Escape","Tab"].includes(p)&&m.preventDefault(),p==="Escape"||p==="Tab"?r():p==="ArrowUp"?u(h=>{if(h==null)return l[0];let f=l.indexOf(h)-1;return l[f===-1?l.length-1:f]}):p==="ArrowDown"&&u(h=>h==null?l[0]:l[l.indexOf(h)+1])},a=ra(()=>({registerItem:d}),[d]);return po(()=>{l!=null&&i==null&&u(l[0]),i!=null&&i?.current!=null&&i.current.focus()},[l,i]),Ae(la,{value:a,children:Ae("div",{className:(n??["toolbar-popup__dropdown-items"]).join(" "),"data-dropdown-key":e,"data-theme":"dark",onKeyDown:c,ref:o,children:t})})}function sa({buttonAriaLabel:t,buttonClassName:e,children:o,disabled:n=!1,dropdownKey:r,Icon:l,itemsContainerClassNames:s,label:i,stopCloseOnClickSelf:u}){let d=vn(null),c=vn(null),[a,m]=Rn(!1),p=()=>{m(!1),c?.current!=null&&c.current.focus()};po(()=>{let f=c.current,g=d.current;if(a&&f!==null&&g!==null){let{left:_,top:L}=f.getBoundingClientRect(),R=window.scrollY||document.documentElement.scrollTop;g.style.top=`${L+R+f.offsetHeight+5}px`,g.style.left=`${Math.min(_-5,window.innerWidth-g.offsetWidth-20)}px`}},[d,c,a]),po(()=>{let f=c.current;if(f!==null&&a){let g=_=>{let L=_.target;Eh(L)&&(u&&d.current&&d.current.contains(L)||f.contains(L)||m(!1))};return document.addEventListener("click",g),()=>{document.removeEventListener("click",g)}}},[d,c,a,u]);let h=Nh(Ae(Lh,{dropdownKey:r,dropDownRef:d,itemsContainerClassNames:s,onClose:p,children:o}),document.body);return oa(mo.Fragment,{children:[oa("button",{"aria-label":t,className:e+(a?" active":""),"data-dropdown-key":r,disabled:n,onClick:f=>{f.preventDefault(),m(!a)},onMouseDown:f=>{f.preventDefault()},ref:c,type:"button",children:[l&&Ae(l,{}),i&&Ae("span",{className:"toolbar-popup__dropdown-label",children:i}),Ae("i",{className:"toolbar-popup__dropdown-caret"})]}),a&&Ae(mo.Fragment,{children:h})]})}var In="toolbar-popup__dropdown",Mh=t=>{let e=yh(15),{active:o,anchorElem:n,editor:r,enabled:l,iconOnly:s,item:i}=t,{i18n:u}=Ih(),{fieldProps:d}=U(),{featureClientSchemaMap:c,schemaPath:a}=d;if(i.Component){let p;return e[0]!==o||e[1]!==n||e[2]!==r||e[3]!==l||e[4]!==i?(p=i?.Component&&at(i.Component,{active:o,anchorElem:n,editor:r,enabled:l,item:i},i.key),e[0]=o,e[1]=n,e[2]=r,e[3]=l,e[4]=i,e[5]=p):p=e[5],p}let m;if(e[6]!==o||e[7]!==r||e[8]!==l||e[9]!==c||e[10]!==u||e[11]!==s||e[12]!==i||e[13]!==a){let p=i.key,h;i.label&&(p=typeof i.label=="function"?i.label({featureClientSchemaMap:c,i18n:u,schemaPath:a}):i.label),p.length>25?h=p.substring(0,25)+"...":h=p,m=at(ia,{active:o,editor:r,enabled:l,Icon:i?.ChildComponent?at(i.ChildComponent,{}):void 0,item:i,itemKey:i.key,tooltip:s?p:void 0,children:at("span",{className:"text",children:h})},i.key),e[6]=o,e[7]=r,e[8]=l,e[9]=c,e[10]=u,e[11]=s,e[12]=i,e[13]=a,e[14]=m}else m=e[14];return m},Ah=vh.memo(Mh),Dt=({anchorElem:t,classNames:e,editor:o,group:n,groupState:r,Icon:l,itemsContainerClassNames:s,label:i})=>{let{items:u,key:d}=n,c=Rh(()=>u?.length?u.map(a=>at(Ah,{active:r.activeItemKeys.includes(a.key),anchorElem:t,editor:o,enabled:r.enabledItemKeys.includes(a.key),iconOnly:n.iconOnly,item:a},a.key)):null,[u,r.activeItemKeys,r.enabledItemKeys,t,o]);return at(sa,{buttonAriaLabel:`${d} dropdown`,buttonClassName:[In,`${In}-${d}`,...e||[]].filter(Boolean).join(" "),disabled:!r.enabledGroup,dropdownKey:d,Icon:l,itemsContainerClassNames:[`${In}-items`,...s||[]],label:i,children:c},d)};import{mergeRegister as $h}from"@lexical/utils";import{$getSelection as Dh}from"lexical";import{useCallback as Oh,useDeferredValue as Fh,useEffect as Bh,useRef as aa,useState as Ph}from"react";function jh(t){let e=new Map,o=new Map;if(!t?.length)return{groupStates:o,itemStates:e};for(let n of t){let r=[];for(let l of n.items)e.set(l.key,{active:!1,enabled:!0}),r.push(l.key);o.set(n.key,{activeItemKeys:[],activeItems:[],enabledGroup:!0,enabledItemKeys:r})}return{groupStates:o,itemStates:e}}function fo(t,e){let[o,n]=Ph(()=>jh(e)),r=Fh(o),l=U(),s=aa(l);s.current=l;let i=aa(e);i.current=e;let u=xr(),d=Oh(()=>{t.getEditorState().read(()=>{let c=Dh();if(!c)return;let a=i.current;if(!a?.length)return;let m=s.current,p=new Map,h=new Map;for(let f of a){let g=[],_=[],L=[],R=f.type==="dropdown"?f.maxActiveItems??1:void 0;for(let x of f.items){let C=x.isActive?(!R||g.length<R)&&x.isActive({editor:t,editorConfigContext:m,selection:c}):!1,k=x.isEnabled?x.isEnabled({editor:t,editorConfigContext:m,selection:c}):!0;C&&(g.push(x.key),_.push(x)),k&&L.push(x.key),p.set(x.key,{active:C,enabled:k})}let b=f.type==="dropdown"&&f.isEnabled?f.isEnabled({editor:t,editorConfigContext:m,selection:c}):!0;h.set(f.key,{activeItemKeys:g,activeItems:_,enabledGroup:b,enabledItemKeys:L})}n({groupStates:h,itemStates:p})})},[t]);return Bh(()=>{u(d);let c=()=>{u(d)},a=$h(t.registerUpdateListener(c));return document.addEventListener("mouseup",c),()=>{a(),document.removeEventListener("mouseup",c)}},[t,u,d]),r}function Kh({active:t,anchorElem:e,editor:o,enabled:n,item:r}){return r.Component?r?.Component&&fe(r.Component,{anchorElem:e,editor:o,item:r},r.key):r.ChildComponent?fe($t,{active:t,editor:o,enabled:n,item:r,children:fe(r.ChildComponent,{})},r.key):null}function Jh({anchorElem:t,editor:e,editorConfig:o,group:n,index:r,toolbarStates:l}){let{i18n:s}=zh(),{fieldProps:{featureClientSchemaMap:i,schemaPath:u}}=U(),d=l.groupStates.get(n.key),c=Mn(()=>{if(n.type!=="dropdown")return;let m=d?.activeItems?.[0];return m?m.ChildComponent:n.ChildComponent},[n,d?.activeItems]),a=Mn(()=>{if(n.type!=="dropdown")return;let m=d?.activeItems;if(!m?.length)return;if(m.length>1)return s.t("lexical:general:toolbarItemsActive",{count:m.length});let p=m[0],h=p.key;return p.label&&(h=typeof p.label=="function"?p.label({featureClientSchemaMap:i,i18n:s,schemaPath:u}):p.label),h.length>25&&(h=h.substring(0,25)+"..."),h},[n,d?.activeItems,s,i,u]);return Gh("div",{className:`fixed-toolbar__group fixed-toolbar__group-${n.key}`,"data-toolbar-group-key":n.key,children:[n.type==="dropdown"&&n.items.length&&d?fe(Dt,{anchorElem:t,editor:e,group:n,groupState:d,Icon:c,itemsContainerClassNames:["fixed-toolbar__dropdown-items"],label:a}):null,n.type==="buttons"&&n.items.length?n.items.map(m=>{let p=l.itemStates.get(m.key);return fe(Kh,{active:p?.active??!1,anchorElem:t,editor:e,enabled:p?.enabled??!0,item:m},m.key)}):null,r<o.features.toolbarFixed?.groups.length-1&&fe("div",{className:"divider"})]},n.key)}function Xh({anchorElem:t,clientProps:e,editor:o,editorConfig:n,parentWithFixedToolbar:r}){let l=ho.useRef(null),s=ca(),{y:i}=Vh(),u=fo(o,n?.features?.toolbarFixed?.groups),d=Mn(()=>{if(!r||e?.disableIfParentHasFixedToolbar)return null;let a=r.editorContainerRef.current.previousElementSibling;for(;a;){if(a.classList.contains("fixed-toolbar"))return a;a=a.previousElementSibling}return null},[e?.disableIfParentHasFixedToolbar,r]);return Wh(()=>{if(!d)return;let c=l.current;if(!c)return;let a=c.getBoundingClientRect(),m=d.getBoundingClientRect();if(!(a.bottom<m.top||a.top>m.bottom))c.classList.remove("fixed-toolbar"),c.classList.add("fixed-toolbar","fixed-toolbar--overlapping"),d.classList.remove("fixed-toolbar"),d.classList.add("fixed-toolbar","fixed-toolbar--hide");else{if(!c.classList.contains("fixed-toolbar--overlapping"))return;c.classList.remove("fixed-toolbar--overlapping"),c.classList.add("fixed-toolbar"),d.classList.remove("fixed-toolbar--hide"),d.classList.add("fixed-toolbar")}},50,[l,d,i]),fe("div",{className:"fixed-toolbar",onFocus:c=>{c.stopPropagation()},ref:l,children:s&&fe(ho.Fragment,{children:n?.features&&n.features?.toolbarFixed?.groups.map((c,a)=>fe(Jh,{anchorElem:t,editor:o,editorConfig:n,group:c,index:a,toolbarStates:u},c.key))})})}var ua=t=>{if(t.parentEditor?.editorConfig){if(t.parentEditor?.editorConfig.resolvedFeatureMap.has("toolbarFixed"))return t.parentEditor;if(t.parentEditor)return ua(t.parentEditor)}return!1},da=t=>{let e=Hh(6),{clientProps:o}=t,[n]=Uh(),r=U();if(!ca())return null;let{editorConfig:s}=r,i=o.applyToFocusedEditor&&r.focusedEditor?.editor||n,u=o.applyToFocusedEditor&&r.focusedEditor?.editorConfig||s,d,c;if(e[0]!==o||e[1]!==i||e[2]!==u||e[3]!==r){c=Symbol.for("react.early_return_sentinel");e:{let a=ua(r);if(o?.disableIfParentHasFixedToolbar&&a){c=null;break e}if(!u?.features?.toolbarFixed?.groups?.length){c=null;break e}d=fe(Xh,{anchorElem:document.body,clientProps:o,editor:i,editorConfig:u,parentWithFixedToolbar:a})}e[0]=o,e[1]=i,e[2]=u,e[3]=r,e[4]=d,e[5]=c}else d=e[4],c=e[5];return c!==Symbol.for("react.early_return_sentinel")?c:d};var Zh=A({plugins:[{Component:da,position:"aboveContainer"}]});import{c as Yh}from"react/compiler-runtime";import{jsx as Le,jsxs as fa}from"react/jsx-runtime";import{useLexicalComposerContext as qh}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as Qh}from"@lexical/react/useLexicalEditable";import{mergeRegister as ha}from"@lexical/utils";import{$getSelection as ga,$isRangeSelection as ma,$isTextNode as e5,COMMAND_PRIORITY_LOW as t5,getDOMSelection as xa,SELECTION_CHANGE_COMMAND as o5}from"lexical";import{useCallback as xo,useEffect as Ot,useMemo as n5,useRef as pa,useState as r5}from"react";import"react";import{createPortal as l5}from"react-dom";function An(t,e){let o=t.getRangeAt(0),n;if(t.anchorNode===e){let r=e;for(;r.firstElementChild!=null;)r=r.firstElementChild;n=r.getBoundingClientRect()}else n=o.getBoundingClientRect();return n}function go(t){let{alwaysDisplayOnTop:e=!1,anchorElem:o,anchorFlippedOffset:n=0,floatingElem:r,horizontalOffset:l=32,horizontalPosition:s="left",specialHandlingForCaret:i=!1,targetRect:u,verticalGap:d=10}=t,c=o.parentElement;if(u===null||c==null){r.style.opacity="0",r.style.transform="translate(-10000px, -10000px)";return}let a=r.getBoundingClientRect(),m=o.getBoundingClientRect(),p=c.getBoundingClientRect(),h=u.top-a.height-d,f=u.left-l;s==="center"&&(f=u.left+u.width/2-a.width/2);let g=0;return!e&&h<p.top&&!i&&(g=a.height+u.height+d*2,h+=g),s==="center"?f+a.width>p.right?f=p.right-a.width-l:f<p.left&&(f=p.left+l):f+a.width>p.right&&(f=p.right-a.width-l),f-=m.left,r.style.opacity="1",i&&n!==0?(h-=m.bottom-n+a.height-3,r.style.transform=`translate(${f}px, ${h}px) rotate(180deg)`):(h-=m.top,r.style.transform=`translate(${f}px, ${h}px)`),g}function i5({active:t,anchorElem:e,editor:o,enabled:n,item:r}){return r.Component?r?.Component&&Le(r.Component,{anchorElem:e,editor:o,item:r},r.key):r.ChildComponent?Le($t,{active:t,editor:o,enabled:n,item:r,children:Le(r.ChildComponent,{})},r.key):null}function s5({anchorElem:t,editor:e,group:o,index:n,toolbarStates:r}){let{editorConfig:l}=U(),s=r.groupStates.get(o.key),i=n5(()=>o.type!=="dropdown"?void 0:s?.activeItems?.[0]?.ChildComponent??o.ChildComponent,[o,s?.activeItems]);return fa("div",{className:`inline-toolbar-popup__group inline-toolbar-popup__group-${o.key}`,"data-toolbar-group-key":o.key,children:[o.type==="dropdown"&&o.items.length&&s?Le(Dt,{anchorElem:t,editor:e,group:o,groupState:s,Icon:i}):null,o.type==="buttons"&&o.items.length?o.items.map(u=>{let d=r.itemStates.get(u.key);return Le(i5,{active:d?.active??!1,anchorElem:t,editor:e,enabled:d?.enabled??!0,item:u},u.key)}):null,n<l.features.toolbarInline?.groups.length-1&&Le("div",{className:"divider"})]},o.key)}function a5({anchorElem:t,editor:e}){let o=pa(null),n=pa(null),{editorConfig:r}=U(),l=fo(e,r?.features?.toolbarInline?.groups),s=xo(()=>{if(o?.current){let c=o.current.style.opacity==="0",a=o.current.style.pointerEvents==="none";c||(o.current.style.opacity="0"),a||(o.current.style.pointerEvents="none")}},[o]),i=xo(c=>{if(o?.current&&(c.buttons===1||c.buttons===3)){let a=o.current.style.opacity==="0",m=o.current.style.pointerEvents==="none";if(!a||!m){let p=c.clientX,h=c.clientY,f=document.elementFromPoint(p,h);o.current.contains(f)||s()}}},[s]),u=xo(()=>{o?.current&&(o.current.style.opacity!=="1"&&(o.current.style.opacity="1"),o.current.style.pointerEvents!=="auto"&&(o.current.style.pointerEvents="auto"))},[]);Ot(()=>(document.addEventListener("mousemove",i),document.addEventListener("mouseup",u),()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",u)}),[o,i,u]);let d=xo(()=>{let c=ga(),a=xa(e._window);if(o.current===null)return;let m=t.querySelector(":scope > .link-editor"),p=m!==null&&"style"in m&&m?.style?.opacity==="1",h=e.getRootElement();if(c!==null&&a!==null&&!a.isCollapsed&&h!==null&&h.contains(a.anchorNode)){let f=An(a,h),g=go({alwaysDisplayOnTop:p,anchorElem:t,floatingElem:o.current,horizontalPosition:"center",targetRect:f});n.current&&go({anchorElem:o.current,anchorFlippedOffset:g,floatingElem:n.current,horizontalOffset:5,horizontalPosition:"center",specialHandlingForCaret:!0,targetRect:f,verticalGap:8})}else s()},[e,s,t]);return Ot(()=>{let c=t.parentElement,a=()=>{e.getEditorState().read(()=>{d()})};return window.addEventListener("resize",a),c&&c.addEventListener("scroll",a),()=>{window.removeEventListener("resize",a),c&&c.removeEventListener("scroll",a)}},[e,d,t]),Ot(()=>(e.getEditorState().read(()=>{d()}),ha(e.registerUpdateListener(({editorState:c})=>{c.read(()=>{d()})}),e.registerCommand(o5,()=>(d(),!1),t5))),[e,d]),fa("div",{className:"inline-toolbar-popup",ref:o,children:[Le("div",{className:"caret",ref:n}),r?.features&&r.features?.toolbarInline?.groups.map((c,a)=>Le(s5,{anchorElem:t,editor:e,group:c,index:a,toolbarStates:l},c.key))]})}function c5(t,e){let o=Yh(12),[n,r]=r5(!1),l=Qh(),s;o[0]!==t?(s=()=>{t.getEditorState().read(()=>{if(t.isComposing())return;let p=ga(),h=xa(t._window),f=t.getRootElement();if(h!==null&&(!ma(p)||f===null||!f.contains(h.anchorNode))){r(!1);return}if(!ma(p))return;if(p.getTextContent()!==""){let _=p.getNodes(),L=!1;for(let R of _)if(e5(R)){r(!0),L=!0;break}L||r(!1)}else r(!1);let g=p.getTextContent().replace(/\n/g,"");if(!p.isCollapsed()&&g===""){r(!1);return}})},o[0]=t,o[1]=s):s=o[1];let i=s,u,d;o[2]!==i?(u=()=>(document.addEventListener("selectionchange",i),document.addEventListener("mouseup",i),()=>{document.removeEventListener("selectionchange",i),document.removeEventListener("mouseup",i)}),d=[i],o[2]=i,o[3]=u,o[4]=d):(u=o[3],d=o[4]),Ot(u,d);let c,a;if(o[5]!==t||o[6]!==i?(c=()=>ha(t.registerUpdateListener(()=>{i()}),t.registerRootListener(()=>{t.getRootElement()===null&&r(!1)})),a=[t,i],o[5]=t,o[6]=i,o[7]=c,o[8]=a):(c=o[7],a=o[8]),Ot(c,a),!n||!l)return null;let m;return o[9]!==e||o[10]!==t?(m=l5(Le(a5,{anchorElem:e,editor:t}),e),o[9]=e,o[10]=t,o[11]=m):m=o[11],m}var Ca=t=>{let{anchorElem:e}=t,[o]=qh();return c5(o,e)};var u5=A({plugins:[{Component:Ca,position:"floatingAnchorElem"}]});import{TableCellNode as t2,TableNode as o2,TableRowNode as n2}from"@lexical/table";import{jsx as ba}from"react/jsx-runtime";import"react";var d5={16:"M7 4h4.5a.5.5 0 0 1 .5.5V6H7zM6 4H4.5a.5.5 0 0 0-.5.5V6h2zm0 3H4v2h2zm0 3H4v1.5a.5.5 0 0 0 .5.5H6zm1 2h4.5a.5.5 0 0 0 .5-.5V10H7zm0-3V7h5v2zM3 4.5A1.5 1.5 0 0 1 4.5 3h7A1.5 1.5 0 0 1 13 4.5v7a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 3 11.5z",24:"M17.204 6.51A2 2 0 0 1 19 8.5V16l-.011.204a2 2 0 0 1-1.785 1.785L17 18H7l-.204-.01a2 2 0 0 1-1.786-1.786L5 16V8.5a2 2 0 0 1 1.796-1.99L7 6.5h10zM6 16a1 1 0 0 0 1 1h2v-2.5H6zm4-1.5V17h7a1 1 0 0 0 .995-.898L18 16v-1.5zm-4-1h3V11H6zm4-2.5v2.5h8V11zM7 7.5a1 1 0 0 0-.995.897L6 8.5V10h3V7.5zm3 2.5h8V8.5a1 1 0 0 0-1-1h-7z"},$n=({className:t,size:e=24})=>ba("svg",{className:["icon",t].filter(Boolean).join(" "),fill:"none",height:e,viewBox:`0 0 ${e} ${e}`,width:e,xmlns:"http://www.w3.org/2000/svg",children:ba("path",{clipRule:"evenodd",d:d5[e],fill:"currentColor",fillRule:"evenodd"})});import{$convertToMarkdownString as m5}from"@lexical/markdown";import{$createTableCellNode as p5,$createTableNode as f5,$createTableRowNode as h5,$isTableCellNode as ka,$isTableNode as Dn,$isTableRowNode as On,TableCellHeaderStates as Co,TableCellNode as g5,TableNode as x5,TableRowNode as C5}from"@lexical/table";import{$isParagraphNode as b5,$isTextNode as k5}from"lexical";var Ta=/^\|(.+)\|\s?$/,_5=/^(\| ?:?-*:? ?)+\|\s?$/,wa=({allTransformers:t})=>({type:"element",dependencies:[x5,C5,g5],export:e=>{if(!Dn(e))return null;let o=[];for(let n of e.getChildren()){let r=[];if(!On(n))continue;let l=!1;for(let s of n.getChildren())ka(s)&&(r.push(m5(t,s).replace(/\n/g,"\\n").trim()),s.__headerState===Co.ROW&&(l=!0));o.push(`| ${r.join(" | ")} |`),l&&o.push(`| ${r.map(s=>"---").join(" | ")} |`)}return o.join(`
58
58
  `)},regExp:Ta,replace:(e,o,n)=>{let r=n[0];if(!r)return;if(_5.test(r)){let a=e.getPreviousSibling();if(!a||!Dn(a))return;let m=a.getChildren(),p=m[m.length-1];if(!p||!On(p))return;p.getChildren().forEach(h=>{ka(h)&&h.setHeaderStyles(Co.ROW,Co.ROW)}),e.remove();return}let l=_a(r,t);if(l==null)return;let s=[l],i=e.getPreviousSibling(),u=l.length;for(;i&&!(!b5(i)||i.getChildrenSize()!==1);){let a=i.getFirstChild();if(!k5(a))break;let m=_a(a.getTextContent(),t);if(m==null)break;u=Math.max(u,m.length),s.unshift(m);let p=i.getPreviousSibling();i.remove(),i=p}let d=f5();for(let a of s){let m=h5();d.append(m);for(let p=0;p<u;p++)m.append(p<a.length?a[p]:Ea("",t))}let c=e.getPreviousSibling();Dn(c)&&T5(c)===u?(c.append(...d.getChildren()),e.remove()):e.replace(d),d.selectEnd()}});function T5(t){let e=t.getFirstChild();return On(e)?e.getChildrenSize():0}var Ea=(t,e)=>{t=t.replace(/\\n/g,`
59
- `);let o=p5(Co.NO_STATUS);return Zt(t,e,o,!1,!0),o},_a=(t,e)=>{let o=t.match(Ta);return!o||!o[1]?null:o[1].split("|").map(n=>Ea(n,e))};import{c as E5}from"react/compiler-runtime";import{jsx as j,jsxs as ye}from"react/jsx-runtime";import{useLexicalComposerContext as Ra}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as S5}from"@lexical/react/useLexicalEditable";import{$computeTableMapSkipCellCheck as La,$deleteTableColumnAtSelection as N5,$deleteTableRowAtSelection as L5,$getNodeTriplet as y5,$getTableCellNodeFromLexicalNode as ya,$getTableColumnIndexFromTableCellNode as v5,$getTableNodeFromLexicalNodeOrThrow as De,$getTableRowIndexFromTableCellNode as R5,$insertTableColumnAtSelection as I5,$insertTableRowAtSelection as M5,$isTableCellNode as Ia,$isTableSelection as Ft,$mergeCells as A5,$unmergeCell as $5,getTableElement as Fn,getTableObserverFromTableElement as Bn,TableCellHeaderStates as $e,TableCellNode as D5}from"@lexical/table";import{mergeRegister as O5}from"@lexical/utils";import{useScrollInfo as F5}from"@payloadcms/ui";import{$getSelection as ko,$isElementNode as B5,$isRangeSelection as Pn,$isTextNode as P5,$setSelection as j5,COMMAND_PRIORITY_CRITICAL as H5,getDOMSelection as G5,isDOMNode as U5,SELECTION_CHANGE_COMMAND as V5}from"lexical";import*as jn from"react";import{useCallback as ue,useEffect as ct,useRef as bo,useState as ut}from"react";import{createPortal as Ma}from"react-dom";import{jsx as Sa}from"react/jsx-runtime";import"react";var w5={16:"M5 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2",24:"M7.5 12a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m6 0a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m4.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"},Na=({className:t,size:e=24})=>Sa("svg",{className:t,fill:"none",height:e,viewBox:`0 0 ${e} ${e}`,width:e,xmlns:"http://www.w3.org/2000/svg",children:Sa("path",{clipRule:"evenodd",d:w5[e],fill:"currentColor",fillRule:"evenodd"})});function va(t){let e=t.getShape();return{columns:e.toX-e.fromX+1,rows:e.toY-e.fromY+1}}function W5(){let t=ko();if(Pn(t)&&!t.isCollapsed()||Ft(t)&&!t.anchor.is(t.focus)||!Pn(t)&&!Ft(t))return!1;let[e]=y5(t.anchor);return e.__colSpan>1||e.__rowSpan>1}function z5(t){let e=t.getLastDescendant();P5(e)?e.select():B5(e)?e.selectEnd():e!==null&&e.selectNext()}function K5({cellMerge:t,contextRef:e,onClose:o,setIsMenuOpen:n,tableCellNode:r}){let[l]=Ra(),s=bo(null),[i,u]=ut(r),[d,c]=ut({columns:1,rows:1}),[a,m]=ut(!1),[p,h]=ut(!1),{y:f}=F5();ct(()=>l.registerMutationListener(D5,w=>{w.get(i.getKey())==="updated"&&l.getEditorState().read(()=>{u(i.getLatest())})},{skipInitialization:!0}),[l,i]),ct(()=>{l.getEditorState().read(()=>{let w=ko();if(Ft(w)){let v=va(w);c(va(w)),m(v.columns>1||v.rows>1)}h(W5())})},[l]),ct(()=>{let w=e.current,v=s.current,y=l.getRootElement();if(w!=null&&v!=null&&y!=null){let M=y.getBoundingClientRect(),$=w.getBoundingClientRect();v.style.opacity="1";let D=v.getBoundingClientRect(),F=5,B=$.right+F;if(B+D.width>window.innerWidth||B+D.width>M.right){let J=$.left-D.width-F;B=(J<0?F:J)+window.pageXOffset}v.style.left=`${B+window.pageXOffset}px`;let Y=$.top;if(Y+D.height>window.innerHeight){let J=$.bottom-D.height;Y=J<0?F:J}v.style.top=`${Y}px`}},[e,s,l,f]),ct(()=>{function w(v){s.current!=null&&e.current!=null&&U5(v.target)&&!s.current.contains(v.target)&&!e.current.contains(v.target)&&n(!1)}return window.addEventListener("click",w),()=>window.removeEventListener("click",w)},[n,e]);let g=ue(()=>{l.update(()=>{if(i.isAttached()){let w=De(i),v=Fn(w,l.getElementByKey(w.getKey()));if(v===null)throw new Error("Expected to find tableElement in DOM");let y=Bn(v);y!==null&&y.$clearHighlight(),w.markDirty(),u(i.getLatest())}j5(null)})},[l,i]),_=()=>{l.update(()=>{let w=ko();if(!Ft(w))return;let y=w.getNodes().filter(Ia),M=A5(y);M&&(z5(M),o())})},L=()=>{l.update(()=>{$5()})},R=ue(w=>{l.update(()=>{for(let v=0;v<d.rows;v++)M5(w);o()})},[l,o,d.rows]),b=ue(w=>{l.update(()=>{for(let v=0;v<d.columns;v++)I5(w);o()})},[l,o,d.columns]),x=ue(()=>{l.update(()=>{L5(),o()})},[l,o]),C=ue(()=>{l.update(()=>{De(i).remove(),g(),o()})},[l,i,g,o]),k=ue(()=>{l.update(()=>{N5(),o()})},[l,o]),T=ue(()=>{l.update(()=>{let w=De(i),v=R5(i),[y]=La(w,null,null),M=new Set,$=i.getHeaderStyles()^$e.ROW;if(y[v])for(let D=0;D<y[v].length;D++){let F=y[v][D];F?.cell&&(M.has(F.cell)||(M.add(F.cell),F.cell.setHeaderStyles($,$e.ROW)))}g(),o()})},[l,i,g,o]),I=ue(()=>{l.update(()=>{let w=De(i),v=v5(i),[y]=La(w,null,null),M=new Set,$=i.getHeaderStyles()^$e.COLUMN;if(y)for(let D=0;D<y.length;D++){let F=y?.[D]?.[v];F?.cell&&(M.has(F.cell)||(M.add(F.cell),F.cell.setHeaderStyles($,$e.COLUMN)))}g(),o()})},[l,i,g,o]),N=ue(()=>{l.update(()=>{if(i.isAttached()){let w=De(i);w&&w.setRowStriping(!w.getRowStriping())}g(),o()})},[l,i,g,o]),E=ue(()=>{l.update(()=>{if(i.isAttached()){let w=De(i);w&&w.setFrozenColumns(w.getFrozenColumns()===0?1:0)}g(),o()})},[l,i,g,o]),S=null;return t&&(a?S=j("button",{className:"item","data-test-id":"table-merge-cells",onClick:()=>_(),type:"button",children:j("span",{className:"text",children:"Merge cells"})}):p&&(S=j("button",{className:"item","data-test-id":"table-unmerge-cells",onClick:()=>L(),type:"button",children:j("span",{className:"text",children:"Unmerge cells"})}))),Ma(ye("div",{className:"table-action-menu-dropdown",onClick:w=>{w.stopPropagation()},ref:s,children:[S?ye(jn.Fragment,{children:[S,j("hr",{})]}):null,j("button",{className:"item","data-test-id":"table-row-striping",onClick:()=>N(),type:"button",children:j("span",{className:"text",children:"Toggle row striping"})}),j("button",{className:"item","data-test-id":"table-freeze-first-column",onClick:()=>E(),type:"button",children:j("span",{className:"text",children:"Toggle first column freeze"})}),j("button",{className:"item","data-test-id":"table-insert-row-above",onClick:()=>R(!1),type:"button",children:ye("span",{className:"text",children:["Insert ",d.rows===1?"row":`${d.rows} rows`," above"]})}),j("button",{className:"item","data-test-id":"table-insert-row-below",onClick:()=>R(!0),type:"button",children:ye("span",{className:"text",children:["Insert ",d.rows===1?"row":`${d.rows} rows`," below"]})}),j("hr",{}),j("button",{className:"item","data-test-id":"table-insert-column-before",onClick:()=>b(!1),type:"button",children:ye("span",{className:"text",children:["Insert ",d.columns===1?"column":`${d.columns} columns`," ","left"]})}),j("button",{className:"item","data-test-id":"table-insert-column-after",onClick:()=>b(!0),type:"button",children:ye("span",{className:"text",children:["Insert ",d.columns===1?"column":`${d.columns} columns`," ","right"]})}),j("hr",{}),j("button",{className:"item","data-test-id":"table-delete-columns",onClick:()=>k(),type:"button",children:j("span",{className:"text",children:"Delete column"})}),j("button",{className:"item","data-test-id":"table-delete-rows",onClick:()=>x(),type:"button",children:j("span",{className:"text",children:"Delete row"})}),j("button",{className:"item","data-test-id":"table-delete",onClick:()=>C(),type:"button",children:j("span",{className:"text",children:"Delete table"})}),j("hr",{}),j("button",{className:"item","data-test-id":"table-row-header",onClick:()=>T(),type:"button",children:ye("span",{className:"text",children:[(i.__headerState&$e.ROW)===$e.ROW?"Remove":"Add"," ","row header"]})}),j("button",{className:"item","data-test-id":"table-column-header",onClick:()=>I(),type:"button",children:ye("span",{className:"text",children:[(i.__headerState&$e.COLUMN)===$e.COLUMN?"Remove":"Add"," ","column header"]})})]}),document.body)}function J5({anchorElem:t,cellMerge:e}){let[o]=Ra(),n=bo(null),r=bo(null),[l,s]=ut(!1),[i,u]=ut(null),d=ue(()=>{let a=n.current,m=ko(),p=G5(o._window),h=document.activeElement;function f(){a&&(a.classList.remove("table-cell-action-button-container--active"),a.classList.add("table-cell-action-button-container--inactive")),u(null)}if(m==null||a==null)return f();let g=o.getRootElement(),_=null,L=null;if(Pn(m)&&g!==null&&p!==null&&g.contains(p.anchorNode)){let b=ya(m.anchor.getNode());if(b==null||(L=o.getElementByKey(b.getKey()),L==null||!b.isAttached()))return f();let x=De(b),C=Fn(x,o.getElementByKey(x.getKey()));if(C===null)throw new Error("TableActionMenu: Expected to find tableElement in DOM");_=Bn(C),u(b)}else if(Ft(m)){let b=ya(m.anchor.getNode());if(!Ia(b))throw new Error("TableSelection anchorNode must be a TableCellNode");let x=De(b),C=Fn(x,o.getElementByKey(x.getKey()));if(C===null)throw new Error("TableActionMenu: Expected to find tableElement in DOM");_=Bn(C),L=o.getElementByKey(b.getKey())}else if(!h)return f();if(_===null||L===null)return f();let R=!_||!_.isSelecting;if(a.classList.toggle("table-cell-action-button-container--active",R),a.classList.toggle("table-cell-action-button-container--inactive",!R),R){let b=L.getBoundingClientRect(),x=t.getBoundingClientRect(),C=b.top-x.top,k=b.right-x.left;a.style.transform=`translate(${k}px, ${C}px)`}},[o,t]);ct(()=>{let a,m=()=>{a=void 0,o.getEditorState().read(d)},p=()=>(a===void 0&&(a=setTimeout(m,0)),!1);return O5(o.registerUpdateListener(p),o.registerCommand(V5,p,H5),o.registerRootListener((h,f)=>{f&&f.removeEventListener("pointerup",p),h&&(h.addEventListener("pointerup",p),p())}),()=>clearTimeout(a))});let c=bo(i);return ct(()=>{c.current!==i&&s(!1),c.current=i},[c,i]),j("div",{className:"table-cell-action-button-container",ref:n,children:i!=null&&ye(jn.Fragment,{children:[j("button",{className:"table-cell-action-button",onClick:a=>{a.stopPropagation(),s(!l)},ref:r,type:"button",children:j(Na,{})}),l&&j(K5,{cellMerge:e,contextRef:r,onClose:()=>s(!1),setIsMenuOpen:s,tableCellNode:i})]})})}var Aa=t=>{let e=E5(3),{anchorElem:o}=t,n=S5(),r;return e[0]!==o||e[1]!==n?(r=Ma(n?j(J5,{anchorElem:o??document.body,cellMerge:!0}):null,o??document.body),e[0]=o,e[1]=n,e[2]=r):r=e[2],r};import{c as X5}from"react/compiler-runtime";import{jsx as To,jsxs as Z5}from"react/jsx-runtime";import{useLexicalComposerContext as Y5}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as q5}from"@lexical/react/useLexicalEditable";import{$computeTableMapSkipCellCheck as Q5,$getTableNodeFromLexicalNodeOrThrow as Hn,$getTableRowIndexFromTableCellNode as eg,$isTableCellNode as $a,$isTableRowNode as tg,getDOMCellFromTarget as og,getTableElement as ng,TableNode as Da}from"@lexical/table";import{calculateZoomLevel as Oa,mergeRegister as rg}from"@lexical/utils";import{$getNearestNodeFromDOMNode as Gn,isHTMLElement as lg,SKIP_SCROLL_INTO_VIEW_TAG as Fa}from"lexical";import*as Pa from"react";import{useCallback as Bt,useEffect as Un,useRef as _o,useState as dt}from"react";import{createPortal as ig}from"react-dom";var sg=33,Ba=92;function ag({editor:t}){let e=_o(null),o=_o(null),n=_o(null),[r,l]=dt(!1),s=U(),i=_o(null),[u,d]=dt(null),[c,a]=dt(null),[m,p]=dt(!1),[h,f]=dt(null),g=Bt(()=>{a(null),e.current=null,f(null),i.current=null,n.current=null},[]),_=E=>(E.buttons&1)===1;Un(()=>{let E=new Set;return rg(t.registerMutationListener(Da,S=>{for(let[w,v]of S)v==="destroyed"?E.delete(w):E.add(w);l(E.size>0)}),t.registerNodeTransform(Da,S=>{if(S.getColWidths())return S;let w=S.getColumnCount(),v=Ba;return S.setColWidths(Array(w).fill(v)),S}))},[t]),Un(()=>{if(!r)return;let E=y=>{let M=y.target;if(lg(M)){if(h){d({x:y.clientX,y:y.clientY});return}if(p(_(y)),!(o.current&&o.current.contains(M))&&e.current!==M){e.current=M;let $=og(M);$&&c!==$?t.getEditorState().read(()=>{let D=Gn($.elem);if(!D)throw new Error("TableCellResizer: Table cell node not found.");let F=Hn(D),B=ng(F,t.getElementByKey(F.getKey()));if(!B)throw new Error("TableCellResizer: Table element not found.");e.current=M,n.current=B.getBoundingClientRect(),a($)},{editor:t}):$==null&&g()}}},S=y=>{p(!0)},w=y=>{p(!1)},v=t.registerRootListener((y,M)=>{M?.removeEventListener("mousemove",E),M?.removeEventListener("mousedown",S),M?.removeEventListener("mouseup",w),y?.addEventListener("mousemove",E),y?.addEventListener("mousedown",S),y?.addEventListener("mouseup",w)});return()=>{v()}},[c,h,t,r,g]);let L=E=>E==="bottom",R=Bt(E=>{if(!c)throw new Error("TableCellResizer: Expected active cell.");t.update(()=>{let S=Gn(c.elem);if(!$a(S))throw new Error("TableCellResizer: Table cell node not found.");let w=Hn(S),v=eg(S),y=w.getChildren(),$=S.getColSpan()===w.getColumnCount()?v:v+S.getRowSpan()-1;if($>=y.length||$<0)throw new Error("Expected table cell to be inside of table row.");let D=y[$];if(!tg(D))throw new Error("Expected table row");let F=D.getHeight();if(F===void 0){let Y=D.getChildren();F=Math.min(...Y.map(J=>b(J,t)??1/0))}let B=Math.max(F+E,sg);D.setHeight(B)},{tag:Fa})},[c,t]),b=(E,S)=>S.getElementByKey(E.getKey())?.clientHeight,x=(E,S)=>{let w;return S.forEach(v=>{v.forEach((y,M)=>{y.cell===E&&(w=M)})}),w},C=Bt(E=>{if(!c)throw new Error("TableCellResizer: Expected active cell.");t.update(()=>{let S=Gn(c.elem);if(!$a(S))throw new Error("TableCellResizer: Table cell node not found.");let w=Hn(S),[v]=Q5(w,null,null),y=x(S,v);if(y===void 0)throw new Error("TableCellResizer: Table column not found.");let M=w.getColWidths();if(!M)return;let $=M[y];if($===void 0)return;let D=[...M],F=Math.max($+E,Ba);D[y]=F,w.setColWidths(D)},{tag:Fa})},[c,t]),k=Bt(E=>{let S=w=>{if(w.preventDefault(),w.stopPropagation(),!c)throw new Error("TableCellResizer: Expected active cell.");if(i.current){let{x:v,y}=i.current;if(c===null)return;let M=Oa(w.target);if(L(E)){let $=(w.clientY-y)/M;R($)}else{let $=(w.clientX-v)/M;C($)}g(),document.removeEventListener("mouseup",S)}};return S},[c,g,C,R]),T=Bt(E=>S=>{if(S.preventDefault(),S.stopPropagation(),!c)throw new Error("TableCellResizer: Expected active cell.");i.current={x:S.clientX,y:S.clientY},d(i.current),f(E),document.addEventListener("mouseup",k(E))},[c,k]),[I,N]=dt({bottom:null,left:null,right:null,top:null});return Un(()=>{if(c){let{height:E,left:S,top:w,width:v}=c.elem.getBoundingClientRect(),y=Oa(c.elem),M=10,$={bottom:{backgroundColor:"none",cursor:"row-resize",height:`${M}px`,left:`${window.scrollX+S}px`,top:`${window.scrollY+w+E-M/2}px`,width:`${v}px`},right:{backgroundColor:"none",cursor:"col-resize",height:`${E}px`,left:`${window.scrollX+S+v-M/2}px`,top:`${window.scrollY+w}px`,width:`${M}px`}},D=n.current;h&&u&&D&&(L(h)?($[h].left=`${window.scrollX+D.left}px`,$[h].top=`${window.scrollY+u.y/y}px`,$[h].height="3px",$[h].width=`${D.width}px`):($[h].top=`${window.scrollY+D.top}px`,$[h].left=`${window.scrollX+u.x/y}px`,$[h].width="3px",$[h].height=`${D.height}px`),$[h].backgroundColor="#adf"),N($)}else N({bottom:null,left:null,right:null,top:null})},[c,h,u]),To("div",{ref:o,children:c!=null&&!m&&Z5(Pa.Fragment,{children:[To("div",{className:`${s.editorConfig.lexical.theme.tableCellResizer} TableCellResizer__ui`,onMouseDown:T("right"),style:I.right||void 0}),To("div",{className:`${s.editorConfig.lexical.theme.tableCellResizer} TableCellResizer__ui`,onMouseDown:T("bottom"),style:I.bottom||void 0})]})})}var ja=()=>{let t=X5(3),[e]=Y5(),o=q5(),n;return t[0]!==e||t[1]!==o?(n=o?ig(To(ag,{editor:e}),document.body):null,t[0]=e,t[1]=o,t[2]=n):n=t[2],n};import{c as gg}from"react/compiler-runtime";import{jsx as Vn,jsxs as xg,Fragment as Cg}from"react/jsx-runtime";import{useLexicalComposerContext as bg}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as Ja}from"@lexical/react/useLexicalEditable";import{$getTableAndElementByKey as kg,$getTableColumnIndexFromTableCellNode as _g,$getTableRowIndexFromTableCellNode as Tg,$insertTableColumnAtSelection as wg,$insertTableRowAtSelection as Eg,$isTableCellNode as Sg,$isTableNode as Ua,getTableElement as Ng,TableNode as Lg}from"@lexical/table";import{$findMatchingParent as yg,mergeRegister as vg}from"@lexical/utils";import{$getNearestNodeFromDOMNode as Va,isHTMLElement as Rg}from"lexical";import{useEffect as Wa,useMemo as Ig,useRef as za,useState as wo}from"react";import"react";import{createPortal as Mg}from"react-dom";import{c as pg}from"react/compiler-runtime";import{useEffect as fg,useRef as hg}from"react";var cg="Expected a function",ug=Math.max,dg=Math.min;function mg(t,e,o){let n,r,l=0,s,i=!1,u=!1,d,c,a,m=!0;if(typeof t!="function")throw new TypeError(cg);e=e||0,typeof o=="object"&&(i=!!o.leading,u="maxWait"in o,d=u?ug(o.maxWait||0,e):d,m="trailing"in o?!!o.trailing:m);function p(C){let k=n,T=s;return n=s=void 0,l=C,c=t.apply(T,k),c}function h(C){return l=C,a=setTimeout(_,e),i?p(C):c}function f(C){let k=C-r,T=C-l,I=e-k;return u?dg(I,d-T):I}function g(C){let k=C-r,T=C-l;return r===void 0||k>=e||k<0||u&&T>=d}function _(){let C=Date.now();if(g(C))return L(C);a=setTimeout(_,f(C))}function L(C){return a=void 0,m&&n?p(C):(n=s=void 0,c)}function R(){a!==void 0&&clearTimeout(a),l=0,n=r=s=a=void 0}function b(){return a===void 0?c:L(Date.now())}function x(){let C=Date.now(),k=g(C);if(n=arguments,s=this,r=C,k){if(a===void 0)return h(r);if(u)return clearTimeout(a),a=setTimeout(_,e),p(r)}return a===void 0&&(a=setTimeout(_,e)),c}return x.cancel=R,x.flush=b,x}var Ha=mg;function Ga(t,e,o){let n=pg(6),r=hg(null),l,s;n[0]!==t||n[1]!==o||n[2]!==e?(l=()=>(r.current=Ha(t,e,{maxWait:o}),()=>{r.current?.cancel()}),s=[t,e,o],n[0]=t,n[1]=o,n[2]=e,n[3]=l,n[4]=s):(l=n[3],s=n[4]),fg(l,s);let i;return n[5]===Symbol.for("react.memo_cache_sentinel")?(i=(...d)=>{let c=d;r.current&&r.current(...c)},n[5]=i):i=n[5],i}var Ka=16;function Ag({anchorElem:t}){let[e]=bg(),o=Ja(),n=U(),[r,l]=wo(!1),[s,i]=wo(!1),[u,d]=wo(!1),[c,a]=wo({}),m=za(new Set),p=za(null),h=Ga(_=>{let{isOutside:L,tableDOMNode:R}=$g(_,n.editorConfig?.lexical);if(L){l(!1),i(!1);return}if(!R)return;p.current=R;let b=null,x=null,C=null;if(e.getEditorState().read(()=>{let $=Va(R);if(Sg($)){let D=yg($,F=>Ua(F));if(!Ua(D))return;if(C=Ng(D,e.getElementByKey(D.getKey())),C){let F=D.getChildrenSize(),B=D.getChildAtIndex(0)?.getChildrenSize(),Y=Tg($),J=_g($);Y===F-1?b=$:J===B-1&&(x=$)}}},{editor:e}),!C)return;let k=C.parentElement;if(!k)return;let{bottom:T,height:I,left:N,right:E,width:S,y:w}=C.getBoundingClientRect(),v=!1;k&&k.classList.contains("LexicalEditorTheme__tableScrollableWrapper")&&(v=k.scrollWidth>k.clientWidth);let{left:y,y:M}=t.getBoundingClientRect();b?(i(!1),l(!0),a({height:Ka,left:v&&k?k.offsetLeft:N-y,top:T-M+5,width:v&&k?k.offsetWidth:S})):x&&(i(!0),l(!1),a({height:I,left:E-y+5,top:w-M,width:Ka}))},50,250),f=Ig(()=>new ResizeObserver(()=>{l(!1),i(!1)}),[]);Wa(()=>{if(u)return document.addEventListener("mousemove",h),()=>{l(!1),i(!1),document.removeEventListener("mousemove",h)}},[u,h]),Wa(()=>vg(e.registerMutationListener(Lg,_=>{e.getEditorState().read(()=>{let L=!1;for(let[R,b]of _)switch(b){case"created":{m.current.add(R),L=!0;break}case"destroyed":{m.current.delete(R),L=!0;break}default:break}if(L){f.disconnect();for(let R of m.current){let{tableElement:b}=kg(R);f.observe(b)}d(m.current.size>0)}},{editor:e})},{skipInitialization:!1})),[e,f]);let g=_=>{e.update(()=>{p.current&&(Va(p.current)?.selectEnd(),_?(Eg(),l(!1)):(wg(),i(!1)))})};return o?xg(Cg,{children:[r&&Vn("button",{"aria-label":"Add Row",className:n.editorConfig.lexical.theme.tableAddRows,onClick:()=>g(!0),style:{...c},type:"button"}),s&&Vn("button",{"aria-label":"Add Column",className:n.editorConfig.lexical.theme.tableAddColumns,onClick:()=>g(!1),style:{...c},type:"button"})]}):null}function $g(t,e){let o=t.target;if(Rg(o)){let n=o.closest(`td.${e.theme.tableCell}, th.${e.theme.tableCell}`);return{isOutside:!(n||o.closest(`button.${e.theme.tableAddRows}`)||o.closest(`button.${e.theme.tableAddColumns}`)||o.closest(`div.${e.theme.tableCellResizer}`)),tableDOMNode:n}}else return{isOutside:!0,tableDOMNode:null}}function Xa(t){let e=gg(2),{anchorElem:o}=t,n=o===void 0?document.body:o;if(!Ja())return null;let l;return e[0]!==n?(l=Mg(Vn(Ag,{anchorElem:n}),n),e[0]=n,e[1]=l):l=e[1],l}import{jsx as Kn,jsxs as Bg}from"react/jsx-runtime";import{useLexicalComposerContext as Pg}from"@lexical/react/LexicalComposerContext";import{TablePlugin as jg}from"@lexical/react/LexicalTablePlugin";import{INSERT_TABLE_COMMAND as Hg,TableCellNode as Gg,TableNode as Ug,TableRowNode as Vg}from"@lexical/table";import{mergeRegister as Wg}from"@lexical/utils";import{$getSelection as zg,$isRangeSelection as Kg,$setSelection as Jg,COMMAND_PRIORITY_EDITOR as Xg,createCommand as Zg}from"lexical";import{createContext as Yg,use as qg,useCallback as tc,useEffect as oc,useMemo as Qg,useRef as e2,useState as Eo}from"react";import*as nc from"react";import{jsx as Q,jsxs as ve}from"react/jsx-runtime";import{useCallback as Wn,useEffect as Za,useRef as zn,useState as Pt}from"react";import*as Qa from"react";import{createPortal as Dg}from"react-dom";var Ya=10,qa=7;function Og(){return ve("svg",{fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[Q("rect",{height:"9",rx:"1",stroke:"currentColor",width:"3",x:"1.5",y:"1.5"}),Q("rect",{height:"9",rx:"1",stroke:"currentColor",width:"3",x:"7.5",y:"1.5"})]})}function Fg(){return ve("svg",{fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[Q("rect",{height:"3",rx:"1",stroke:"currentColor",width:"9",x:"1.5",y:"1.5"}),Q("rect",{height:"3",rx:"1",stroke:"currentColor",width:"9",x:"1.5",y:"7.5"})]})}function ec({anchorElem:t,editor:e,isOpen:o,onClose:n,onInsert:r,position:l}){let[s,i]=Pt(0),[u,d]=Pt(0),[c,a]=Pt(""),[m,p]=Pt(""),[h,f]=Pt(null),g=zn(null),_=zn(null),L=zn(null),R=s>0?s:c?parseInt(c,10)||0:5,b=u>0?u:m?parseInt(m,10)||0:5;Za(()=>{o||(i(0),d(0),a(""),p(""),f(null))},[o]),Za(()=>{if(!o)return;let N=E=>{if(E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),n()),E.key==="Enter"&&h){E.preventDefault();let S=parseInt(c,10),w=parseInt(m,10);S>0&&w>0&&r(S,w)}};return document.addEventListener("keydown",N,!0),()=>document.removeEventListener("keydown",N,!0)},[o,n,r,h,c,m]);let x=Wn((N,E)=>{N>0&&E>0&&r(N,E)},[r]),C=Wn((N,E)=>{i(N),d(E)},[]),k=Wn(()=>{i(0),d(0)},[]);if(!o||!l||!t)return null;let T=[];for(let N=1;N<=qa;N++)for(let E=1;E<=Ya;E++){let S=E<=R&&N<=b,w=E<=s&&N<=u,v="table-grid-popup__cell";S&&w?v+=" table-grid-popup__cell--hover":S&&(v+=" table-grid-popup__cell--selected"),T.push(Q("div",{"aria-label":`${E} columns, ${N} rows`,className:v,onClick:()=>x(E,N),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),x(E,N))},onMouseEnter:()=>C(E,N),role:"button",tabIndex:-1},`${N}-${E}`))}let I=s>0&&u>0;return Dg(ve(Qa.Fragment,{children:[Q("div",{className:"table-grid-popup__backdrop",onClick:n}),Q("div",{className:"table-grid-popup",ref:g,style:{transform:`translate(${l.left}px, ${l.top}px)`},children:ve("div",{className:"table-grid-popup__content",children:[ve("div",{className:"table-grid-popup__header",children:[ve("div",{className:`table-grid-popup__input-group${h==="cols"?" table-grid-popup__input-group--focused":""}`,children:[Q("div",{className:"table-grid-popup__input-icon",children:Q(Og,{})}),Q("input",{"aria-label":"Columns",className:"table-grid-popup__input",min:1,onBlur:()=>f(null),onChange:N=>a(N.target.value),onFocus:()=>f("cols"),placeholder:s>0?String(s):"5",ref:_,type:"number",value:c})]}),Q("span",{className:"table-grid-popup__separator",children:"\xD7"}),ve("div",{className:`table-grid-popup__input-group${h==="rows"?" table-grid-popup__input-group--focused":""}`,children:[Q("div",{className:"table-grid-popup__input-icon",children:Q(Fg,{})}),Q("input",{"aria-label":"Rows",className:"table-grid-popup__input",min:1,onBlur:()=>f(null),onChange:N=>p(N.target.value),onFocus:()=>f("rows"),placeholder:u>0?String(u):"5",ref:L,type:"number",value:m})]})]}),ve("div",{className:"table-grid-popup__grid",onMouseLeave:k,children:[T,I&&ve("div",{className:"table-grid-popup__tooltip",style:{left:`calc(${(s-.5)/Ya*100}%)`,top:`calc(${(u-1)/qa*100}%)`},children:[R," \xD7 ",b]})]})]})})]}),t)}var So=Zg("OPEN_EMBED_DRAWER_COMMAND"),rc=Yg({cellEditorConfig:null,cellEditorPlugins:null,set:()=>{}});function lc({children:t}){let[e,o]=Eo({cellEditorConfig:null,cellEditorPlugins:null});return Kn(rc,{value:Qg(()=>({cellEditorConfig:e.cellEditorConfig,cellEditorPlugins:e.cellEditorPlugins,set:(n,r)=>{o({cellEditorConfig:n,cellEditorPlugins:r})}}),[e.cellEditorConfig,e.cellEditorPlugins]),children:t})}var ic=()=>{let[t]=Pg(),e=qg(rc),[o,n]=Eo(!1),[r,l]=Eo(null),s=e2(null),[i,u]=Eo(null);oc(()=>{let a=t.getRootElement();if(a){let m=a.closest(".editor")??null;u(m??a.parentElement)}},[t]),oc(()=>{if(!t.hasNodes([Ug,Vg,Gg]))throw new Error("TablePlugin: TableNode, TableRowNode, or TableCellNode is not registered on editor");return Wg(t.registerCommand(So,()=>{let a=i;if(!a)return!0;let m=a.getBoundingClientRect(),p=null;t.getEditorState().read(()=>{let f=zg();if(Kg(f)){s.current=f.clone();let g=f.anchor.getNode(),_=t.getElementByKey(g.getKey());if(_){let L=_.getBoundingClientRect();L.height>0&&(p={left:L.left-m.left,top:L.bottom-m.top+8})}}});let h=window.getSelection();if(h&&h.rangeCount>0){let g=h.getRangeAt(0).getBoundingClientRect();g.height>0&&(p={left:g.left-m.left,top:g.bottom-m.top+8})}return p||(p={left:0,top:40}),l(p),n(!0),!0},Xg))},[e,t,i]);let d=tc(()=>{n(!1)},[]),c=tc((a,m)=>{n(!1),t.focus(),t.update(()=>{s.current&&Jg(s.current.clone())},{discrete:!0,skipTransforms:!0}),setTimeout(()=>{t.dispatchCommand(Hg,{columns:String(a),rows:String(m)})},1)},[t]);return Bg(nc.Fragment,{children:[Kn(ec,{anchorElem:i,editor:t,isOpen:o,onClose:d,onInsert:c,position:r}),Kn(jg,{hasCellBackgroundColor:!1,hasCellMerge:!0,hasHorizontalScroll:!0})]})};var r2=A({markdownTransformers:[wa],nodes:[o2,t2,n2],plugins:[{Component:ic,position:"normal"},{Component:ja,position:"normal"},{Component:Aa,position:"floatingAnchorElem"},{Component:Xa,position:"floatingAnchorElem"}],providers:[lc],slashMenu:{groups:[X([{Icon:$n,key:"table",keywords:["table"],label:"Table",onSelect:({editor:t})=>{t.dispatchCommand(So,{})}}])]},toolbarFixed:{groups:[_e([{ChildComponent:$n,key:"table",label:"Table",onSelect:({editor:t})=>{t.dispatchCommand(So,{})}}])]}});import{$isNodeSelection as j2}from"lexical";import{jsx as sc}from"react/jsx-runtime";import"react";var l2="M16.2041 6.01074C17.2128 6.113 18 6.96435 18 8V16L17.9893 16.2041C17.8938 17.1457 17.1457 17.8938 16.2041 17.9893L16 18H8C6.96435 18 6.113 17.2128 6.01074 16.2041L6 16V8C6 6.89543 6.89543 6 8 6H16L16.2041 6.01074ZM8 7C7.44772 7 7 7.44772 7 8V16C7 16.5523 7.44772 17 8 17H16C16.5523 17 17 16.5523 17 16V8C17 7.44772 16.5523 7 16 7H8ZM9.72461 11.582C9.91869 11.4539 10.1827 11.4756 10.3535 11.6465L13.8535 15.1465C14.0488 15.3417 14.0488 15.6583 13.8535 15.8535C13.6583 16.0488 13.3417 16.0488 13.1465 15.8535L10 12.707L8.85352 13.8535C8.65825 14.0488 8.34175 14.0488 8.14648 13.8535C7.95122 13.6583 7.95122 13.3417 8.14648 13.1465L9.64648 11.6465L9.72461 11.582ZM14 8C15.1046 8 16 8.89543 16 10C16 11.1046 15.1046 12 14 12C12.8954 12 12 11.1046 12 10C12 8.89543 12.8954 8 14 8ZM14 9C13.4477 9 13 9.44772 13 10C13 10.5523 13.4477 11 14 11C14.5523 11 15 10.5523 15 10C15 9.44772 14.5523 9 14 9Z",Jn=({className:t})=>sc("svg",{"aria-hidden":"true",className:["icon",t].filter(Boolean).join(" "),fill:"none",focusable:"false",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",children:sc("path",{clipRule:"evenodd",d:l2,fill:"currentColor",fillRule:"evenodd"})});import{jsx as mc}from"react/jsx-runtime";import pc from"bson-objectid";import{$applyNodeReplacement as d2}from"lexical";import*as fc from"react";import i2 from"bson-objectid";function No(t,e){if(t.hasAttribute("data-lexical-pending-upload-form-id")){let n=t.getAttribute("data-lexical-pending-upload-form-id");if(n!=null)return{node:e({data:{pending:{formID:n,src:t.getAttribute("src")||""}}})}}if(t.hasAttribute("data-lexical-upload-relation-to")&&t.hasAttribute("data-lexical-upload-id")){let n=t.getAttribute("data-lexical-upload-id"),r=t.getAttribute("data-lexical-upload-relation-to");if(n!=null&&r!=null)return{node:e({data:{fields:{},relationTo:r,value:n}})}}return{node:e({data:{pending:{formID:new i2.default().toHexString(),src:t.getAttribute("src")||""}}})}}import{DecoratorBlockNode as s2}from"@lexical/react/LexicalDecoratorBlockNode.js";import{addClassNamesToElement as a2}from"@lexical/utils";import cc from"bson-objectid";import{$applyNodeReplacement as c2}from"lexical";var jt=class extends s2{__data;constructor({data:e,format:o,key:n}){super(o,n),this.__data=e}static clone(e){return new this({data:e.__data,format:e.__format,key:e.__key})}static getType(){return"upload"}static importDOM(){return{img:e=>({conversion:o=>No(o,ac),priority:0})}}static importJSON(e){e.version===1&&e?.value?.id&&(e.value=e.value.id),e.version===2&&!e?.id&&(e.id=new cc.default().toHexString(),e.version=3);let o={id:e.id,fields:e.fields,pending:e.pending,relationTo:e.relationTo,value:e.value},n=ac({data:o});return n.setFormat(e.format),n}static isInline(){return!1}createDOM(e){let o=document.createElement("div");return a2(o,e?.theme?.upload),o}decorate(){return null}exportDOM(){let e=document.createElement("img"),o=this.__data;return o.pending?(e.setAttribute("data-lexical-pending-upload-form-id",String(o?.pending?.formID)),e.setAttribute("src",o?.pending?.src||"")):(e.setAttribute("data-lexical-upload-id",String(o?.value)),e.setAttribute("data-lexical-upload-relation-to",o?.relationTo)),{element:e}}exportJSON(){return{...super.exportJSON(),...this.getData(),type:"upload",version:3}}getData(){return this.getLatest().__data}setData(e){let o=this.getWritable();o.__data=e}updateDOM(){return!1}};function ac({data:t}){return t?.id||(t.id=new cc.default().toHexString()),c2(new jt({data:t}))}import{jsx as uc}from"react/jsx-runtime";import{ShimmerEffect as u2}from"@payloadcms/ui";var dc=()=>uc("div",{className:"lexical-upload",children:uc(u2,{height:"95px",width:"203px"})});var m2=fc.lazy(()=>import("./component-PHZQBOJE.js").then(t=>({default:t.UploadComponent}))),he=class extends jt{static clone(e){return super.clone(e)}static getType(){return super.getType()}static importDOM(){return{img:e=>({conversion:o=>No(o,ge),priority:0})}}static importJSON(e){e.version===1&&e?.value?.id&&(e.value=e.value.id),e.version===2&&!e?.id&&(e.id=new pc.default().toHexString(),e.version=3);let o={id:e.id,fields:e.fields,pending:e.pending,relationTo:e.relationTo,value:e.value},n=ge({data:o});return n.setFormat(e.format),n}decorate(e,o){return this.__data.pending?mc(dc,{}):mc(m2,{className:o?.theme?.upload??"LexicalEditorTheme__upload",data:this.__data,format:this.__format,nodeKey:this.getKey()})}exportJSON(){return super.exportJSON()}};function ge({data:t}){return t?.id||(t.id=new pc.default().toHexString()),d2(new he({data:t}))}function mt(t){return t instanceof he}import{c as k2}from"react/compiler-runtime";import{jsx as _2}from"react/jsx-runtime";import{useLexicalComposerContext as T2}from"@lexical/react/LexicalComposerContext.js";import{$dfsIterator as Sc,$insertNodeToNearestRoot as Yn,mergeRegister as w2}from"@lexical/utils";import{useBulkUpload as E2,useEffectEvent as S2,useModal as N2}from"@payloadcms/ui";import qn from"bson-objectid";import{$createRangeSelection as L2,$getPreviousSelection as kc,$getSelection as _c,$isParagraphNode as Qn,$isRangeSelection as Tc,$setSelection as y2,COMMAND_PRIORITY_EDITOR as v2,COMMAND_PRIORITY_LOW as wc,createCommand as R2,DROP_COMMAND as I2,getDOMSelectionFromTarget as M2,isHTMLElement as Ec,PASTE_COMMAND as A2}from"lexical";import{useEffect as $2}from"react";import{c as hc}from"react/compiler-runtime";import{jsx as Xn}from"react/jsx-runtime";import{useLexicalComposerContext as gc}from"@lexical/react/LexicalComposerContext.js";import{toast as p2}from"@payloadcms/ui";import{$getNodeByKey as f2,COMMAND_PRIORITY_EDITOR as xc}from"lexical";import{useEffect as Cc,useState as h2}from"react";var g2=({editor:t,relationTo:e,replaceNodeKey:o,value:n})=>{o?t.update(()=>{let r=f2(o);r&&r.replace(ge({data:{fields:null,relationTo:e,value:n}}))}):t.dispatchCommand(Zn,{fields:null,relationTo:e,value:n})},x2=t=>{let e=hc(13),{enabledCollectionSlugs:o}=t,[n]=gc(),[r,l]=h2(null),s;e[0]!==o?(s={collectionSlugs:o,uploads:!0},e[0]=o,e[1]=s):s=e[1];let{closeListDrawer:i,ListDrawer:u,openListDrawer:d}=At(s),c,a;e[2]!==n||e[3]!==d?(c=()=>n.registerCommand(Qe,f=>(l(f?.replace?f?.replace.nodeKey:null),d(),!0),xc),a=[n,d],e[2]=n,e[3]=d,e[4]=c,e[5]=a):(c=e[4],a=e[5]),Cc(c,a);let m;e[6]!==i||e[7]!==n||e[8]!==r?(m=f=>{let{collectionSlug:g,doc:_}=f;i(),g2({editor:n,relationTo:g,replaceNodeKey:r,value:_.id})},e[6]=i,e[7]=n,e[8]=r,e[9]=m):m=e[9];let p=m,h;return e[10]!==u||e[11]!==p?(h=Xn(u,{onSelect:p}),e[10]=u,e[11]=p,e[12]=h):h=e[12],h},C2=()=>{let t=hc(3),[e]=gc(),o,n;return t[0]!==e?(o=()=>e.registerCommand(Qe,b2,xc),n=[e],t[0]=e,t[1]=o,t[2]=n):(o=t[1],n=t[2]),Cc(o,n),null},bc=({enabledCollectionSlugs:t})=>t?.length?Xn(x2,{enabledCollectionSlugs:t}):Xn(C2,{});function b2(){return p2.error("No upload collections enabled"),!0}function D2(t){let e=t.target;return!!(Ec(e)&&!e.closest("code, span.editor-image")&&Ec(e.parentElement)&&e.parentElement.closest("div.ContentEditable__root"))}function O2(t){let e,o=M2(t.target);if(document.caretRangeFromPoint)e=document.caretRangeFromPoint(t.clientX,t.clientY);else if(t.rangeParent&&o!==null)o.collapse(t.rangeParent,t.rangeOffset||0),e=o.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return e}var Zn=R2("INSERT_UPLOAD_COMMAND"),Nc=t=>{let e=k2(21),{clientProps:o}=t,[n]=T2(),r=o?.disabledCollections,l=o?.enabledCollections,s;e[0]!==r||e[1]!==l?(s={collectionSlugsBlacklist:r,collectionSlugsWhitelist:l,uploads:!0},e[0]=r,e[1]=l,e[2]=s):s=e[2];let{enabledCollectionSlugs:i}=uo(s),{modalSlug:u,setCollectionSlug:d,setInitialForms:c,setOnCancel:a,setOnSuccess:m,setSelectableCollections:p}=E2(),{isModalOpen:h,openModal:f}=N2(),g;e[3]!==u||e[4]!==n||e[5]!==i||e[6]!==h||e[7]!==f||e[8]!==d||e[9]!==c||e[10]!==a||e[11]!==m||e[12]!==p?(g=x=>{let{files:C}=x;if(C?.length!==0&&(c(k=>[...k??[],...C.map(F2)]),!h(u))){if(!i.length||!i[0])return;d(i[0]),p(i),a(()=>{n.update(B2)}),m(k=>{let T=new Map(k.map(P2));n.update(()=>{for(let I of Sc()){let N=I.node;if(mt(N)){let E=N.getData();if(E?.pending){let S=T.get(E.pending?.formID);S&&N.replace(ge({data:{id:new qn.default().toHexString(),fields:{},relationTo:S.collectionSlug,value:S.doc.id}}))}}}})}),f(u)}},e[3]=u,e[4]=n,e[5]=i,e[6]=h,e[7]=f,e[8]=d,e[9]=c,e[10]=a,e[11]=m,e[12]=p,e[13]=g):g=e[13];let _=S2(g),L;e[14]!==n||e[15]!==_?(L=()=>{if(!n.hasNodes([he]))throw new Error("UploadPlugin: UploadNode not registered on editor");return w2(n.registerNodeTransform(he,x=>{let C=x.getData();if(!C?.pending)return;(async function(){let I=null,N=C?.pending?.src,E=C?.pending?.formID;if(N?.startsWith("data:")){let S=N.match(/data:(image\/[a-zA-Z]+);base64,/),w=S?S[1]:"image/png",v=N.replace(/^data:image\/[a-zA-Z]+;base64,/,""),y=atob(v),M=new Array(y.length);for(let F=0;F<y.length;F++)M[F]=y.charCodeAt(F);let $=new Uint8Array(M);I={alt:void 0,file:new File([$],"pasted-image."+w?.split("/",2)[1],{type:w}),formID:E}}else if(N?.startsWith("http")||N?.startsWith("https")){let w=await(await fetch(N)).blob(),v=N.split("/").pop()||"pasted-image"+w.type.split("/",2)[1];I={alt:void 0,file:new File([w],v,{type:w.type}),formID:E}}I&&_({files:[I]})})()}),n.registerCommand(Zn,x=>(n.update(()=>{let C=_c()||kc();if(Tc(C)){let k=ge({data:{id:x.id,fields:x.fields,relationTo:x.relationTo,value:x.value}}),{focus:T}=C,I=T.getNode();Yn(k),Qn(I)&&!I.__first&&I.remove()}}),!0),v2),n.registerCommand(A2,x=>{if(!(x instanceof ClipboardEvent))return!1;let C=x.clipboardData;if(!C?.types?.length||C?.types?.includes("text/html"))return!1;let k=[];return C?.files?.length&&Array.from(C.files).forEach(T=>{k.push({alt:"",file:T,formID:new qn.default().toHexString()})}),k.length?(n.update(()=>{let T=_c()||kc();if(Tc(T))for(let I of k){let N=ge({data:{pending:{formID:I.formID,src:URL.createObjectURL(I.file)}}}),{focus:E}=T,S=E.getNode();Yn(N),Qn(S)&&!S.__first&&S.remove()}}),_({files:k}),!0):!1},wc),n.registerCommand(I2,x=>{if(!(x instanceof DragEvent))return!1;let C=x.dataTransfer;if(!C?.types?.length)return!1;let k=[];return C?.files?.length&&Array.from(C.files).forEach(T=>{k.push({alt:"",file:T,formID:new qn.default().toHexString()})}),k.length?(x.preventDefault(),x.stopPropagation(),n.update(()=>{if(D2(x)){let T=O2(x),I=L2();T!=null&&I.applyDOMRange(T),y2(I);for(let N of k){let E=ge({data:{pending:{formID:N.formID,src:URL.createObjectURL(N.file)}}}),{focus:S}=I,w=S.getNode();Yn(E),Qn(w)&&!w.__first&&w.remove()}}}),_({files:k}),!0):!1},wc))},e[14]=n,e[15]=_,e[16]=L):L=e[16];let R;e[17]!==n?(R=[n],e[17]=n,e[18]=R):R=e[18],$2(L,R);let b;return e[19]!==i?(b=_2(bc,{enabledCollectionSlugs:i}),e[19]=i,e[20]=b):b=e[20],b};function F2(t){return{file:t.file,formID:t.formID}}function B2(){for(let t of Sc()){let e=t.node;mt(e)&&e.getData()?.pending&&e.remove()}}function P2(t){return[t.formID,t]}var H2=A({nodes:[he],plugins:[{Component:Nc,position:"normal"}],slashMenu:{groups:[X([{Icon:Jn,key:"upload",keywords:["upload","image","file","img","picture","photo","media"],label:({i18n:t})=>t.t("lexical:upload:label"),onSelect:({editor:t})=>{t.dispatchCommand(Qe,{replace:!1})}}])]},toolbarFixed:{groups:[_e([{ChildComponent:Jn,isActive:({selection:t})=>{if(!j2(t)||!t.getNodes().length)return!1;let e=t.getNodes()[0];return mt(e)},key:"upload",label:({i18n:t})=>t.t("lexical:upload:label"),onSelect:({editor:t})=>{t.dispatchCommand(Qe,{replace:!1})}}])]}});import{c as U2}from"react/compiler-runtime";import{jsx as Lo}from"react/jsx-runtime";import{createElement as V2}from"react";import{ShimmerEffect as W2,useConfig as z2}from"@payloadcms/ui";import{lazy as K2,Suspense as J2,useEffect as X2,useState as Z2}from"react";var Lc={block:"LexicalEditorTheme__block",blockCursor:"LexicalEditorTheme__blockCursor",characterLimit:"LexicalEditorTheme__characterLimit",code:"LexicalEditorTheme__code",inlineBlock:"LexicalEditorTheme__inlineBlock",heading:{h1:"LexicalEditorTheme__h1",h2:"LexicalEditorTheme__h2",h3:"LexicalEditorTheme__h3",h4:"LexicalEditorTheme__h4",h5:"LexicalEditorTheme__h5",h6:"LexicalEditorTheme__h6"},hr:"LexicalEditorTheme__hr",hrSelected:"LexicalEditorTheme__hrSelected",indent:"LexicalEditorTheme__indent",link:"LexicalEditorTheme__link",list:{checklist:"LexicalEditorTheme__checklist",listitem:"LexicalEditorTheme__listItem",listitemChecked:"LexicalEditorTheme__listItemChecked",listitemUnchecked:"LexicalEditorTheme__listItemUnchecked",nested:{listitem:"LexicalEditorTheme__nestedListItem"},olDepth:["LexicalEditorTheme__ol1","LexicalEditorTheme__ol2","LexicalEditorTheme__ol3","LexicalEditorTheme__ol4","LexicalEditorTheme__ol5"],ul:"LexicalEditorTheme__ul"},ltr:"LexicalEditorTheme__ltr",mark:"LexicalEditorTheme__mark",markOverlap:"LexicalEditorTheme__markOverlap",paragraph:"LexicalEditorTheme__paragraph",placeholder:"LexicalEditorTheme__placeholder",quote:"LexicalEditorTheme__quote",relationship:"LexicalEditorTheme__relationship",root:"LexicalEditorTheme",rtl:"LexicalEditorTheme__rtl",tab:"LexicalEditorTheme__tabNode",table:"LexicalEditorTheme__table",tableAddColumns:"LexicalEditorTheme__tableAddColumns",tableAddRows:"LexicalEditorTheme__tableAddRows",tableAlignment:{center:"LexicalEditorTheme__tableAlignmentCenter",right:"LexicalEditorTheme__tableAlignmentRight"},tableCell:"LexicalEditorTheme__tableCell",tableCellActionButton:"LexicalEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"LexicalEditorTheme__tableCellActionButtonContainer",tableCellHeader:"LexicalEditorTheme__tableCellHeader",tableCellResizer:"LexicalEditorTheme__tableCellResizer",tableCellSelected:"LexicalEditorTheme__tableCellSelected",tableFrozenColumn:"LexicalEditorTheme__tableFrozenColumn",tableRowStriping:"LexicalEditorTheme__tableRowStriping",tableScrollableWrapper:"LexicalEditorTheme__tableScrollableWrapper",tableSelected:"LexicalEditorTheme__tableSelected",tableSelection:"LexicalEditorTheme__tableSelection",text:{bold:"LexicalEditorTheme__textBold",code:"LexicalEditorTheme__textCode",italic:"LexicalEditorTheme__textItalic",strikethrough:"LexicalEditorTheme__textStrikethrough",subscript:"LexicalEditorTheme__textSubscript",superscript:"LexicalEditorTheme__textSuperscript",underline:"LexicalEditorTheme__textUnderline",underlineStrikethrough:"LexicalEditorTheme__textUnderlineStrikethrough"},upload:"LexicalEditorTheme__upload"};var er={namespace:"lexical",theme:Lc};function yc({config:t,featureClientImportMap:e,featureClientSchemaMap:o,field:n,schemaPath:r,unSanitizedEditorConfig:l}){let s=new Map,i=[];for(let c of l.features){if(!c?.clientFeatureProps?.featureKey||c?.clientFeatureProps?.order===void 0||c?.clientFeatureProps?.order===null){console.warn("A Feature you have installed does not return the client props as clientFeatureProps. Please make sure to always return those props, even if they are null, as other important props like order and featureKey are later on injected. Skipping feature.");continue}s.set(c.clientFeatureProps.featureKey,c),i.push(c)}l.features=i,l.features=l.features.sort((c,a)=>c.clientFeatureProps.order-a.clientFeatureProps.order);let u=new Map,d=0;for(let c of l.features){let a=typeof c.feature=="function"?c.feature({config:t,featureClientImportMap:e,featureClientSchemaMap:o,featureProviderMap:s,field:n,resolvedFeatures:u,schemaPath:r,unSanitizedEditorConfig:l}):c.feature;a.key=c.clientFeatureProps.featureKey,a.order=d,u.set(c.clientFeatureProps.featureKey,a),d++}return u}import{deepMerge as G2}from"payload/shared";var vc=t=>{let e={enabledFeatures:[],enabledFormats:[],markdownTransformers:[],nodes:[],plugins:[],providers:[],slashMenu:{dynamicGroups:[],groups:[]},toolbarFixed:{groups:[]},toolbarInline:{groups:[]}},o={};if(t.forEach(n=>{n.key==="toolbarFixed"&&n.sanitizedClientFeatureProps?.customGroups&&(o={...o,...n.sanitizedClientFeatureProps.customGroups})}),!t?.size)return e;t.forEach(n=>{if(n.providers?.length&&(e.providers=e.providers.concat(n.providers)),n.enableFormats?.length&&e.enabledFormats.push(...n.enableFormats),n.nodes?.length)for(let r of n.nodes)e.nodes.push(r);if(n.plugins?.length&&n.plugins.forEach((r,l)=>{e.plugins?.push({clientProps:n.sanitizedClientFeatureProps,Component:r.Component,key:n.key+l,position:r.position})}),n.toolbarInline?.groups?.length)for(let r of n.toolbarInline.groups){let l=e.toolbarInline.groups.find(s=>s.key===r.key);l?e.toolbarInline.groups=e.toolbarInline.groups.filter(s=>s.key!==r.key):l={...r,items:[]},r?.items?.length&&(l.items=l.items.concat(r.items)),e.toolbarInline?.groups.push(l)}if(n.toolbarFixed?.groups?.length)for(let r of n.toolbarFixed.groups){let l=e.toolbarFixed.groups.find(s=>s.key===r.key);l?e.toolbarFixed.groups=e.toolbarFixed.groups.filter(s=>s.key!==r.key):l={...r,items:[]},r?.items?.length&&(l.items=l.items.concat(r.items)),e.toolbarFixed?.groups.push(l)}if(n.slashMenu?.groups){n.slashMenu.dynamicGroups?.length&&(e.slashMenu.dynamicGroups=e.slashMenu.dynamicGroups.concat(n.slashMenu.dynamicGroups));for(let r of n.slashMenu.groups){let l=e.slashMenu.groups.find(s=>s.key===r.key);l?e.slashMenu.groups=e.slashMenu.groups.filter(s=>s.key!==r.key):l={...r,items:[]},r?.items?.length&&(l.items=l.items.concat(r.items)),e.slashMenu.groups.push(l)}}if(n.markdownTransformers?.length)for(let r of n.markdownTransformers)typeof r=="function"?e.markdownTransformers.push(r({allNodes:e.nodes,allTransformers:e.markdownTransformers})):e.markdownTransformers.push(r);e.enabledFeatures.push(n.key)}),Object.keys(o).length>0&&(e.toolbarFixed.groups=e.toolbarFixed.groups.map(n=>{let r=o[n.key];return r?G2(n,r):n})),e.toolbarInline.groups.sort((n,r)=>n.order&&r.order?n.order-r.order:n.order?-1:r.order?1:0),e.toolbarFixed.groups.sort((n,r)=>n.order&&r.order?n.order-r.order:n.order?-1:r.order?1:0);for(let n of e.toolbarInline.groups)n.items.sort((r,l)=>r.order&&l.order?r.order-l.order:r.order?-1:l.order?1:0);for(let n of e.toolbarFixed.groups)n.items.sort((r,l)=>r.order&&l.order?r.order-l.order:r.order?-1:l.order?1:0);return e};function tr(t,e,o,n){return{admin:o,features:vc(t),lexical:e,resolvedFeatureMap:t,view:n}}var Y2=K2(()=>import("./Field-7SMBPPJ7.js").then(t=>({default:t.RichText}))),q2=t=>Lo(Fo,{inheritable:!0,views:t.views,children:Lo(Q2,{...t})}),Q2=t=>{let e=U2(23),{admin:o,clientFeatures:n,featureClientImportMap:r,featureClientSchemaMap:l,field:s,lexicalEditorConfig:i,schemaPath:u,views:d}=t,c;e[0]!==o?(c=o===void 0?{}:o,e[0]=o,e[1]=c):c=e[1];let a=c,m;e[2]!==r?(m=r===void 0?{}:r,e[2]=r,e[3]=m):m=e[3];let p=m,h=i===void 0?er:i,{currentView:f}=Bo(),g=d?.[f]?.admin??a,_=d?.[f]?.lexical,L;e[4]!==h||e[5]!==_?(L=typeof _=="function"?_(h):_??h,e[4]=h,e[5]=_,e[6]=L):L=e[6];let R=L,{config:b}=z2(),[x,C]=Z2(null),k,T;e[7]!==n||e[8]!==b||e[9]!==f||e[10]!==g||e[11]!==R||e[12]!==p||e[13]!==l||e[14]!==s||e[15]!==x||e[16]!==u||e[17]!==d?(k=()=>{if(x&&x.view===f)return;let N=d?.[f],E=N?.filterFeatures?N.filterFeatures(n):n,S=[];for(let v of Object.values(E))!v.clientFeatureProvider||!v.clientFeatureProps||S.push(v.clientFeatureProvider(v.clientFeatureProps));let w=yc({config:b,featureClientImportMap:p,featureClientSchemaMap:l,field:s,schemaPath:u??s.name,unSanitizedEditorConfig:{features:S,lexical:R}});C(tr(w,R,g,f))},T=[g,n,b,p,l,s,x,R,u,f,d],e[7]=n,e[8]=b,e[9]=f,e[10]=g,e[11]=R,e[12]=p,e[13]=l,e[14]=s,e[15]=x,e[16]=u,e[17]=d,e[18]=k,e[19]=T):(k=e[18],T=e[19]),X2(k,T);let I;return e[20]!==x||e[21]!==t?(I=Lo(J2,{fallback:Lo(W2,{height:"35vh"}),children:x&&V2(Y2,{...t,editorConfig:x,key:x.view})}),e[20]=x,e[21]=t,e[22]=I):I=e[22],I};function ex(...t){return t.filter(Boolean).join(" ")}var tx=t=>(e,o,n)=>{let r=t(n);r&&(r.append(...o),e.replace(r),r.select(0,0))};var yo=new WeakMap;function Rc(t){let e=t.changedTouches[0];return e===void 0?null:[e.clientX,e.clientY]}function vo(t,e){let o=yo.get(t);if(o===void 0){let n=new Set,r=s=>{o!==void 0&&(o.start=Rc(s))},l=s=>{if(o===void 0)return;let{start:i}=o;if(i===null)return;let u=Rc(s);for(let d of n)u!==null&&d([u[0]-i[0],u[1]-i[1]],s)};t.addEventListener("touchstart",r),t.addEventListener("touchend",l),o={handleTouchend:l,handleTouchstart:r,listeners:n,start:null},yo.set(t,o)}return o.listeners.add(e),()=>{ox(t,e)}}function ox(t,e){let o=yo.get(t);if(o===void 0)return;let{listeners:n}=o;n.delete(e),n.size===0&&(yo.delete(t),t.removeEventListener("touchstart",o.handleTouchstart),t.removeEventListener("touchend",o.handleTouchend))}function nx(t,e){return vo(t,(o,n)=>{let[r,l]=o;r<0&&-r>Math.abs(l)&&e(r,n)})}function rx(t,e){return vo(t,(o,n)=>{let[r,l]=o;r>0&&r>Math.abs(l)&&e(r,n)})}function lx(t,e){return vo(t,(o,n)=>{let[r,l]=o;l<0&&-l>Math.abs(r)&&e(r,n)})}function ix(t,e){return vo(t,(o,n)=>{let[r,l]=o;l>0&&l>Math.abs(r)&&e(r,n)})}import{c as sx}from"react/compiler-runtime";import{jsx as ax}from"react/jsx-runtime";import"react";var cx=()=>{let t=sx(2),{EditButton:e}=be(),o;return t[0]!==e?(o=e?ax(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as ux}from"react/compiler-runtime";import{jsx as dx}from"react/jsx-runtime";import"react";var mx=()=>{let t=ux(2),{RemoveButton:e}=be(),o;return t[0]!==e?(o=e?dx(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as px}from"react/compiler-runtime";import{jsx as fx}from"react/jsx-runtime";import"react";var hx=()=>{let t=px(2),{Label:e}=be(),o;return t[0]!==e?(o=e?fx(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as gx}from"react/compiler-runtime";import{jsx as xx}from"react/jsx-runtime";import"react";var Cx=t=>{let e=gx(3),{children:o}=t,{InlineBlockContainer:n}=be(),r;return e[0]!==n||e[1]!==o?(r=n?xx(n,{children:o}):null,e[0]=n,e[1]=o,e[2]=r):r=e[2],r};import{jsx as bx}from"react/jsx-runtime";import"react";var kx=t=>{let{children:e,...o}=t,{BlockCollapsible:n}=ae();return n?bx(n,{...o,children:e}):null};import{c as _x}from"react/compiler-runtime";import{jsx as Tx}from"react/jsx-runtime";import"react";var wx=()=>{let t=_x(2),{EditButton:e}=ae(),o;return t[0]!==e?(o=e?Tx(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as Ex}from"react/compiler-runtime";import{jsx as Sx}from"react/jsx-runtime";import"react";var Nx=()=>{let t=Ex(2),{RemoveButton:e}=ae(),o;return t[0]!==e?(o=e?Sx(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{stringify as Lx}from"qs-esm";var yx=({apiURL:t,depth:e,draft:o,locale:n})=>async({id:l,collectionSlug:s,select:i})=>{let u=Lx({depth:e??0,draft:o??!1,locale:n,select:i},{addQueryPrefix:!0});return await fetch(`${t}/${s}/${l}${u}`,{credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(c=>c.json())};var Ic={customEndRegex:{optional:!0,regExp:/[ \t]*```$/},customStartRegex:/^[ \t]*```(\w+)?/,doNotTrimChildren:!0,export:({fields:t})=>!t.code.includes(`
59
+ `);let o=p5(Co.NO_STATUS);return Zt(t,e,o,!1,!0),o},_a=(t,e)=>{let o=t.match(Ta);return!o||!o[1]?null:o[1].split("|").map(n=>Ea(n,e))};import{c as E5}from"react/compiler-runtime";import{jsx as j,jsxs as ye}from"react/jsx-runtime";import{useLexicalComposerContext as Ra}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as S5}from"@lexical/react/useLexicalEditable";import{$computeTableMapSkipCellCheck as La,$deleteTableColumnAtSelection as N5,$deleteTableRowAtSelection as L5,$getNodeTriplet as y5,$getTableCellNodeFromLexicalNode as ya,$getTableColumnIndexFromTableCellNode as v5,$getTableNodeFromLexicalNodeOrThrow as De,$getTableRowIndexFromTableCellNode as R5,$insertTableColumnAtSelection as I5,$insertTableRowAtSelection as M5,$isTableCellNode as Ia,$isTableSelection as Ft,$mergeCells as A5,$unmergeCell as $5,getTableElement as Fn,getTableObserverFromTableElement as Bn,TableCellHeaderStates as $e,TableCellNode as D5}from"@lexical/table";import{mergeRegister as O5}from"@lexical/utils";import{useScrollInfo as F5}from"@payloadcms/ui";import{$getSelection as ko,$isElementNode as B5,$isRangeSelection as Pn,$isTextNode as P5,$setSelection as j5,COMMAND_PRIORITY_CRITICAL as H5,getDOMSelection as G5,isDOMNode as U5,SELECTION_CHANGE_COMMAND as V5}from"lexical";import*as jn from"react";import{useCallback as ue,useEffect as ct,useRef as bo,useState as ut}from"react";import{createPortal as Ma}from"react-dom";import{jsx as Sa}from"react/jsx-runtime";import"react";var w5={16:"M5 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2",24:"M7.5 12a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m6 0a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m4.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"},Na=({className:t,size:e=24})=>Sa("svg",{className:t,fill:"none",height:e,viewBox:`0 0 ${e} ${e}`,width:e,xmlns:"http://www.w3.org/2000/svg",children:Sa("path",{clipRule:"evenodd",d:w5[e],fill:"currentColor",fillRule:"evenodd"})});function va(t){let e=t.getShape();return{columns:e.toX-e.fromX+1,rows:e.toY-e.fromY+1}}function W5(){let t=ko();if(Pn(t)&&!t.isCollapsed()||Ft(t)&&!t.anchor.is(t.focus)||!Pn(t)&&!Ft(t))return!1;let[e]=y5(t.anchor);return e.__colSpan>1||e.__rowSpan>1}function z5(t){let e=t.getLastDescendant();P5(e)?e.select():B5(e)?e.selectEnd():e!==null&&e.selectNext()}function K5({cellMerge:t,contextRef:e,onClose:o,setIsMenuOpen:n,tableCellNode:r}){let[l]=Ra(),s=bo(null),[i,u]=ut(r),[d,c]=ut({columns:1,rows:1}),[a,m]=ut(!1),[p,h]=ut(!1),{y:f}=F5();ct(()=>l.registerMutationListener(D5,w=>{w.get(i.getKey())==="updated"&&l.getEditorState().read(()=>{u(i.getLatest())})},{skipInitialization:!0}),[l,i]),ct(()=>{l.getEditorState().read(()=>{let w=ko();if(Ft(w)){let v=va(w);c(va(w)),m(v.columns>1||v.rows>1)}h(W5())})},[l]),ct(()=>{let w=e.current,v=s.current,y=l.getRootElement();if(w!=null&&v!=null&&y!=null){let M=y.getBoundingClientRect(),$=w.getBoundingClientRect();v.style.opacity="1";let D=v.getBoundingClientRect(),F=5,B=$.right+F;if(B+D.width>window.innerWidth||B+D.width>M.right){let J=$.left-D.width-F;B=(J<0?F:J)+window.pageXOffset}v.style.left=`${B+window.pageXOffset}px`;let Y=$.top;if(Y+D.height>window.innerHeight){let J=$.bottom-D.height;Y=J<0?F:J}v.style.top=`${Y}px`}},[e,s,l,f]),ct(()=>{function w(v){s.current!=null&&e.current!=null&&U5(v.target)&&!s.current.contains(v.target)&&!e.current.contains(v.target)&&n(!1)}return window.addEventListener("click",w),()=>window.removeEventListener("click",w)},[n,e]);let g=ue(()=>{l.update(()=>{if(i.isAttached()){let w=De(i),v=Fn(w,l.getElementByKey(w.getKey()));if(v===null)throw new Error("Expected to find tableElement in DOM");let y=Bn(v);y!==null&&y.$clearHighlight(),w.markDirty(),u(i.getLatest())}j5(null)})},[l,i]),_=()=>{l.update(()=>{let w=ko();if(!Ft(w))return;let y=w.getNodes().filter(Ia),M=A5(y);M&&(z5(M),o())})},L=()=>{l.update(()=>{$5()})},R=ue(w=>{l.update(()=>{for(let v=0;v<d.rows;v++)M5(w);o()})},[l,o,d.rows]),b=ue(w=>{l.update(()=>{for(let v=0;v<d.columns;v++)I5(w);o()})},[l,o,d.columns]),x=ue(()=>{l.update(()=>{L5(),o()})},[l,o]),C=ue(()=>{l.update(()=>{De(i).remove(),g(),o()})},[l,i,g,o]),k=ue(()=>{l.update(()=>{N5(),o()})},[l,o]),T=ue(()=>{l.update(()=>{let w=De(i),v=R5(i),[y]=La(w,null,null),M=new Set,$=i.getHeaderStyles()^$e.ROW;if(y[v])for(let D=0;D<y[v].length;D++){let F=y[v][D];F?.cell&&(M.has(F.cell)||(M.add(F.cell),F.cell.setHeaderStyles($,$e.ROW)))}g(),o()})},[l,i,g,o]),I=ue(()=>{l.update(()=>{let w=De(i),v=v5(i),[y]=La(w,null,null),M=new Set,$=i.getHeaderStyles()^$e.COLUMN;if(y)for(let D=0;D<y.length;D++){let F=y?.[D]?.[v];F?.cell&&(M.has(F.cell)||(M.add(F.cell),F.cell.setHeaderStyles($,$e.COLUMN)))}g(),o()})},[l,i,g,o]),N=ue(()=>{l.update(()=>{if(i.isAttached()){let w=De(i);w&&w.setRowStriping(!w.getRowStriping())}g(),o()})},[l,i,g,o]),E=ue(()=>{l.update(()=>{if(i.isAttached()){let w=De(i);w&&w.setFrozenColumns(w.getFrozenColumns()===0?1:0)}g(),o()})},[l,i,g,o]),S=null;return t&&(a?S=j("button",{className:"item","data-test-id":"table-merge-cells",onClick:()=>_(),type:"button",children:j("span",{className:"text",children:"Merge cells"})}):p&&(S=j("button",{className:"item","data-test-id":"table-unmerge-cells",onClick:()=>L(),type:"button",children:j("span",{className:"text",children:"Unmerge cells"})}))),Ma(ye("div",{className:"table-action-menu-dropdown",onClick:w=>{w.stopPropagation()},ref:s,children:[S?ye(jn.Fragment,{children:[S,j("hr",{})]}):null,j("button",{className:"item","data-test-id":"table-row-striping",onClick:()=>N(),type:"button",children:j("span",{className:"text",children:"Toggle row striping"})}),j("button",{className:"item","data-test-id":"table-freeze-first-column",onClick:()=>E(),type:"button",children:j("span",{className:"text",children:"Toggle first column freeze"})}),j("button",{className:"item","data-test-id":"table-insert-row-above",onClick:()=>R(!1),type:"button",children:ye("span",{className:"text",children:["Insert ",d.rows===1?"row":`${d.rows} rows`," above"]})}),j("button",{className:"item","data-test-id":"table-insert-row-below",onClick:()=>R(!0),type:"button",children:ye("span",{className:"text",children:["Insert ",d.rows===1?"row":`${d.rows} rows`," below"]})}),j("hr",{}),j("button",{className:"item","data-test-id":"table-insert-column-before",onClick:()=>b(!1),type:"button",children:ye("span",{className:"text",children:["Insert ",d.columns===1?"column":`${d.columns} columns`," ","left"]})}),j("button",{className:"item","data-test-id":"table-insert-column-after",onClick:()=>b(!0),type:"button",children:ye("span",{className:"text",children:["Insert ",d.columns===1?"column":`${d.columns} columns`," ","right"]})}),j("hr",{}),j("button",{className:"item","data-test-id":"table-delete-columns",onClick:()=>k(),type:"button",children:j("span",{className:"text",children:"Delete column"})}),j("button",{className:"item","data-test-id":"table-delete-rows",onClick:()=>x(),type:"button",children:j("span",{className:"text",children:"Delete row"})}),j("button",{className:"item","data-test-id":"table-delete",onClick:()=>C(),type:"button",children:j("span",{className:"text",children:"Delete table"})}),j("hr",{}),j("button",{className:"item","data-test-id":"table-row-header",onClick:()=>T(),type:"button",children:ye("span",{className:"text",children:[(i.__headerState&$e.ROW)===$e.ROW?"Remove":"Add"," ","row header"]})}),j("button",{className:"item","data-test-id":"table-column-header",onClick:()=>I(),type:"button",children:ye("span",{className:"text",children:[(i.__headerState&$e.COLUMN)===$e.COLUMN?"Remove":"Add"," ","column header"]})})]}),document.body)}function J5({anchorElem:t,cellMerge:e}){let[o]=Ra(),n=bo(null),r=bo(null),[l,s]=ut(!1),[i,u]=ut(null),d=ue(()=>{let a=n.current,m=ko(),p=G5(o._window),h=document.activeElement;function f(){a&&(a.classList.remove("table-cell-action-button-container--active"),a.classList.add("table-cell-action-button-container--inactive")),u(null)}if(m==null||a==null)return f();let g=o.getRootElement(),_=null,L=null;if(Pn(m)&&g!==null&&p!==null&&g.contains(p.anchorNode)){let b=ya(m.anchor.getNode());if(b==null||(L=o.getElementByKey(b.getKey()),L==null||!b.isAttached()))return f();let x=De(b),C=Fn(x,o.getElementByKey(x.getKey()));if(C===null)throw new Error("TableActionMenu: Expected to find tableElement in DOM");_=Bn(C),u(b)}else if(Ft(m)){let b=ya(m.anchor.getNode());if(!Ia(b))throw new Error("TableSelection anchorNode must be a TableCellNode");let x=De(b),C=Fn(x,o.getElementByKey(x.getKey()));if(C===null)throw new Error("TableActionMenu: Expected to find tableElement in DOM");_=Bn(C),L=o.getElementByKey(b.getKey())}else if(!h)return f();if(_===null||L===null)return f();let R=!_||!_.isSelecting;if(a.classList.toggle("table-cell-action-button-container--active",R),a.classList.toggle("table-cell-action-button-container--inactive",!R),R){let b=L.getBoundingClientRect(),x=t.getBoundingClientRect(),C=b.top-x.top,k=b.right-x.left;a.style.transform=`translate(${k}px, ${C}px)`}},[o,t]);ct(()=>{let a,m=()=>{a=void 0,o.getEditorState().read(d)},p=()=>(a===void 0&&(a=setTimeout(m,0)),!1);return O5(o.registerUpdateListener(p),o.registerCommand(V5,p,H5),o.registerRootListener((h,f)=>{f&&f.removeEventListener("pointerup",p),h&&(h.addEventListener("pointerup",p),p())}),()=>clearTimeout(a))});let c=bo(i);return ct(()=>{c.current!==i&&s(!1),c.current=i},[c,i]),j("div",{className:"table-cell-action-button-container",ref:n,children:i!=null&&ye(jn.Fragment,{children:[j("button",{className:"table-cell-action-button",onClick:a=>{a.stopPropagation(),s(!l)},ref:r,type:"button",children:j(Na,{})}),l&&j(K5,{cellMerge:e,contextRef:r,onClose:()=>s(!1),setIsMenuOpen:s,tableCellNode:i})]})})}var Aa=t=>{let e=E5(3),{anchorElem:o}=t,n=S5(),r;return e[0]!==o||e[1]!==n?(r=Ma(n?j(J5,{anchorElem:o??document.body,cellMerge:!0}):null,o??document.body),e[0]=o,e[1]=n,e[2]=r):r=e[2],r};import{c as X5}from"react/compiler-runtime";import{jsx as To,jsxs as Z5}from"react/jsx-runtime";import{useLexicalComposerContext as Y5}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as q5}from"@lexical/react/useLexicalEditable";import{$computeTableMapSkipCellCheck as Q5,$getTableNodeFromLexicalNodeOrThrow as Hn,$getTableRowIndexFromTableCellNode as eg,$isTableCellNode as $a,$isTableRowNode as tg,getDOMCellFromTarget as og,getTableElement as ng,TableNode as Da}from"@lexical/table";import{calculateZoomLevel as Oa,mergeRegister as rg}from"@lexical/utils";import{$getNearestNodeFromDOMNode as Gn,isHTMLElement as lg,SKIP_SCROLL_INTO_VIEW_TAG as Fa}from"lexical";import*as Pa from"react";import{useCallback as Bt,useEffect as Un,useRef as _o,useState as dt}from"react";import{createPortal as ig}from"react-dom";var sg=33,Ba=92;function ag({editor:t}){let e=_o(null),o=_o(null),n=_o(null),[r,l]=dt(!1),s=U(),i=_o(null),[u,d]=dt(null),[c,a]=dt(null),[m,p]=dt(!1),[h,f]=dt(null),g=Bt(()=>{a(null),e.current=null,f(null),i.current=null,n.current=null},[]),_=E=>(E.buttons&1)===1;Un(()=>{let E=new Set;return rg(t.registerMutationListener(Da,S=>{for(let[w,v]of S)v==="destroyed"?E.delete(w):E.add(w);l(E.size>0)}),t.registerNodeTransform(Da,S=>{if(S.getColWidths())return S;let w=S.getColumnCount(),v=Ba;return S.setColWidths(Array(w).fill(v)),S}))},[t]),Un(()=>{if(!r)return;let E=y=>{let M=y.target;if(lg(M)){if(h){d({x:y.clientX,y:y.clientY});return}if(p(_(y)),!(o.current&&o.current.contains(M))&&e.current!==M){e.current=M;let $=og(M);$&&c!==$?t.getEditorState().read(()=>{let D=Gn($.elem);if(!D)throw new Error("TableCellResizer: Table cell node not found.");let F=Hn(D),B=ng(F,t.getElementByKey(F.getKey()));if(!B)throw new Error("TableCellResizer: Table element not found.");e.current=M,n.current=B.getBoundingClientRect(),a($)},{editor:t}):$==null&&g()}}},S=y=>{p(!0)},w=y=>{p(!1)},v=t.registerRootListener((y,M)=>{M?.removeEventListener("mousemove",E),M?.removeEventListener("mousedown",S),M?.removeEventListener("mouseup",w),y?.addEventListener("mousemove",E),y?.addEventListener("mousedown",S),y?.addEventListener("mouseup",w)});return()=>{v()}},[c,h,t,r,g]);let L=E=>E==="bottom",R=Bt(E=>{if(!c)throw new Error("TableCellResizer: Expected active cell.");t.update(()=>{let S=Gn(c.elem);if(!$a(S))throw new Error("TableCellResizer: Table cell node not found.");let w=Hn(S),v=eg(S),y=w.getChildren(),$=S.getColSpan()===w.getColumnCount()?v:v+S.getRowSpan()-1;if($>=y.length||$<0)throw new Error("Expected table cell to be inside of table row.");let D=y[$];if(!tg(D))throw new Error("Expected table row");let F=D.getHeight();if(F===void 0){let Y=D.getChildren();F=Math.min(...Y.map(J=>b(J,t)??1/0))}let B=Math.max(F+E,sg);D.setHeight(B)},{tag:Fa})},[c,t]),b=(E,S)=>S.getElementByKey(E.getKey())?.clientHeight,x=(E,S)=>{let w;return S.forEach(v=>{v.forEach((y,M)=>{y.cell===E&&(w=M)})}),w},C=Bt(E=>{if(!c)throw new Error("TableCellResizer: Expected active cell.");t.update(()=>{let S=Gn(c.elem);if(!$a(S))throw new Error("TableCellResizer: Table cell node not found.");let w=Hn(S),[v]=Q5(w,null,null),y=x(S,v);if(y===void 0)throw new Error("TableCellResizer: Table column not found.");let M=w.getColWidths();if(!M)return;let $=M[y];if($===void 0)return;let D=[...M],F=Math.max($+E,Ba);D[y]=F,w.setColWidths(D)},{tag:Fa})},[c,t]),k=Bt(E=>{let S=w=>{if(w.preventDefault(),w.stopPropagation(),!c)throw new Error("TableCellResizer: Expected active cell.");if(i.current){let{x:v,y}=i.current;if(c===null)return;let M=Oa(w.target);if(L(E)){let $=(w.clientY-y)/M;R($)}else{let $=(w.clientX-v)/M;C($)}g(),document.removeEventListener("mouseup",S)}};return S},[c,g,C,R]),T=Bt(E=>S=>{if(S.preventDefault(),S.stopPropagation(),!c)throw new Error("TableCellResizer: Expected active cell.");i.current={x:S.clientX,y:S.clientY},d(i.current),f(E),document.addEventListener("mouseup",k(E))},[c,k]),[I,N]=dt({bottom:null,left:null,right:null,top:null});return Un(()=>{if(c){let{height:E,left:S,top:w,width:v}=c.elem.getBoundingClientRect(),y=Oa(c.elem),M=10,$={bottom:{backgroundColor:"none",cursor:"row-resize",height:`${M}px`,left:`${window.scrollX+S}px`,top:`${window.scrollY+w+E-M/2}px`,width:`${v}px`},right:{backgroundColor:"none",cursor:"col-resize",height:`${E}px`,left:`${window.scrollX+S+v-M/2}px`,top:`${window.scrollY+w}px`,width:`${M}px`}},D=n.current;h&&u&&D&&(L(h)?($[h].left=`${window.scrollX+D.left}px`,$[h].top=`${window.scrollY+u.y/y}px`,$[h].height="3px",$[h].width=`${D.width}px`):($[h].top=`${window.scrollY+D.top}px`,$[h].left=`${window.scrollX+u.x/y}px`,$[h].width="3px",$[h].height=`${D.height}px`),$[h].backgroundColor="#adf"),N($)}else N({bottom:null,left:null,right:null,top:null})},[c,h,u]),To("div",{ref:o,children:c!=null&&!m&&Z5(Pa.Fragment,{children:[To("div",{className:`${s.editorConfig.lexical.theme.tableCellResizer} TableCellResizer__ui`,onMouseDown:T("right"),style:I.right||void 0}),To("div",{className:`${s.editorConfig.lexical.theme.tableCellResizer} TableCellResizer__ui`,onMouseDown:T("bottom"),style:I.bottom||void 0})]})})}var ja=()=>{let t=X5(3),[e]=Y5(),o=q5(),n;return t[0]!==e||t[1]!==o?(n=o?ig(To(ag,{editor:e}),document.body):null,t[0]=e,t[1]=o,t[2]=n):n=t[2],n};import{c as gg}from"react/compiler-runtime";import{jsx as Vn,jsxs as xg,Fragment as Cg}from"react/jsx-runtime";import{useLexicalComposerContext as bg}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as Ja}from"@lexical/react/useLexicalEditable";import{$getTableAndElementByKey as kg,$getTableColumnIndexFromTableCellNode as _g,$getTableRowIndexFromTableCellNode as Tg,$insertTableColumnAtSelection as wg,$insertTableRowAtSelection as Eg,$isTableCellNode as Sg,$isTableNode as Ua,getTableElement as Ng,TableNode as Lg}from"@lexical/table";import{$findMatchingParent as yg,mergeRegister as vg}from"@lexical/utils";import{$getNearestNodeFromDOMNode as Va,isHTMLElement as Rg}from"lexical";import{useEffect as Wa,useMemo as Ig,useRef as za,useState as wo}from"react";import"react";import{createPortal as Mg}from"react-dom";import{c as pg}from"react/compiler-runtime";import{useEffect as fg,useRef as hg}from"react";var cg="Expected a function",ug=Math.max,dg=Math.min;function mg(t,e,o){let n,r,l=0,s,i=!1,u=!1,d,c,a,m=!0;if(typeof t!="function")throw new TypeError(cg);e=e||0,typeof o=="object"&&(i=!!o.leading,u="maxWait"in o,d=u?ug(o.maxWait||0,e):d,m="trailing"in o?!!o.trailing:m);function p(C){let k=n,T=s;return n=s=void 0,l=C,c=t.apply(T,k),c}function h(C){return l=C,a=setTimeout(_,e),i?p(C):c}function f(C){let k=C-r,T=C-l,I=e-k;return u?dg(I,d-T):I}function g(C){let k=C-r,T=C-l;return r===void 0||k>=e||k<0||u&&T>=d}function _(){let C=Date.now();if(g(C))return L(C);a=setTimeout(_,f(C))}function L(C){return a=void 0,m&&n?p(C):(n=s=void 0,c)}function R(){a!==void 0&&clearTimeout(a),l=0,n=r=s=a=void 0}function b(){return a===void 0?c:L(Date.now())}function x(){let C=Date.now(),k=g(C);if(n=arguments,s=this,r=C,k){if(a===void 0)return h(r);if(u)return clearTimeout(a),a=setTimeout(_,e),p(r)}return a===void 0&&(a=setTimeout(_,e)),c}return x.cancel=R,x.flush=b,x}var Ha=mg;function Ga(t,e,o){let n=pg(6),r=hg(null),l,s;n[0]!==t||n[1]!==o||n[2]!==e?(l=()=>(r.current=Ha(t,e,{maxWait:o}),()=>{r.current?.cancel()}),s=[t,e,o],n[0]=t,n[1]=o,n[2]=e,n[3]=l,n[4]=s):(l=n[3],s=n[4]),fg(l,s);let i;return n[5]===Symbol.for("react.memo_cache_sentinel")?(i=(...d)=>{let c=d;r.current&&r.current(...c)},n[5]=i):i=n[5],i}var Ka=16;function Ag({anchorElem:t}){let[e]=bg(),o=Ja(),n=U(),[r,l]=wo(!1),[s,i]=wo(!1),[u,d]=wo(!1),[c,a]=wo({}),m=za(new Set),p=za(null),h=Ga(_=>{let{isOutside:L,tableDOMNode:R}=$g(_,n.editorConfig?.lexical);if(L){l(!1),i(!1);return}if(!R)return;p.current=R;let b=null,x=null,C=null;if(e.getEditorState().read(()=>{let $=Va(R);if(Sg($)){let D=yg($,F=>Ua(F));if(!Ua(D))return;if(C=Ng(D,e.getElementByKey(D.getKey())),C){let F=D.getChildrenSize(),B=D.getChildAtIndex(0)?.getChildrenSize(),Y=Tg($),J=_g($);Y===F-1?b=$:J===B-1&&(x=$)}}},{editor:e}),!C)return;let k=C.parentElement;if(!k)return;let{bottom:T,height:I,left:N,right:E,width:S,y:w}=C.getBoundingClientRect(),v=!1;k&&k.classList.contains("LexicalEditorTheme__tableScrollableWrapper")&&(v=k.scrollWidth>k.clientWidth);let{left:y,y:M}=t.getBoundingClientRect();b?(i(!1),l(!0),a({height:Ka,left:v&&k?k.offsetLeft:N-y,top:T-M+5,width:v&&k?k.offsetWidth:S})):x&&(i(!0),l(!1),a({height:I,left:E-y+5,top:w-M,width:Ka}))},50,250),f=Ig(()=>new ResizeObserver(()=>{l(!1),i(!1)}),[]);Wa(()=>{if(u)return document.addEventListener("mousemove",h),()=>{l(!1),i(!1),document.removeEventListener("mousemove",h)}},[u,h]),Wa(()=>vg(e.registerMutationListener(Lg,_=>{e.getEditorState().read(()=>{let L=!1;for(let[R,b]of _)switch(b){case"created":{m.current.add(R),L=!0;break}case"destroyed":{m.current.delete(R),L=!0;break}default:break}if(L){f.disconnect();for(let R of m.current){let{tableElement:b}=kg(R);f.observe(b)}d(m.current.size>0)}},{editor:e})},{skipInitialization:!1})),[e,f]);let g=_=>{e.update(()=>{p.current&&(Va(p.current)?.selectEnd(),_?(Eg(),l(!1)):(wg(),i(!1)))})};return o?xg(Cg,{children:[r&&Vn("button",{"aria-label":"Add Row",className:n.editorConfig.lexical.theme.tableAddRows,onClick:()=>g(!0),style:{...c},type:"button"}),s&&Vn("button",{"aria-label":"Add Column",className:n.editorConfig.lexical.theme.tableAddColumns,onClick:()=>g(!1),style:{...c},type:"button"})]}):null}function $g(t,e){let o=t.target;if(Rg(o)){let n=o.closest(`td.${e.theme.tableCell}, th.${e.theme.tableCell}`);return{isOutside:!(n||o.closest(`button.${e.theme.tableAddRows}`)||o.closest(`button.${e.theme.tableAddColumns}`)||o.closest(`div.${e.theme.tableCellResizer}`)),tableDOMNode:n}}else return{isOutside:!0,tableDOMNode:null}}function Xa(t){let e=gg(2),{anchorElem:o}=t,n=o===void 0?document.body:o;if(!Ja())return null;let l;return e[0]!==n?(l=Mg(Vn(Ag,{anchorElem:n}),n),e[0]=n,e[1]=l):l=e[1],l}import{jsx as Kn,jsxs as Bg}from"react/jsx-runtime";import{useLexicalComposerContext as Pg}from"@lexical/react/LexicalComposerContext";import{TablePlugin as jg}from"@lexical/react/LexicalTablePlugin";import{INSERT_TABLE_COMMAND as Hg,TableCellNode as Gg,TableNode as Ug,TableRowNode as Vg}from"@lexical/table";import{mergeRegister as Wg}from"@lexical/utils";import{$getSelection as zg,$isRangeSelection as Kg,$setSelection as Jg,COMMAND_PRIORITY_EDITOR as Xg,createCommand as Zg}from"lexical";import{createContext as Yg,use as qg,useCallback as tc,useEffect as oc,useMemo as Qg,useRef as e2,useState as Eo}from"react";import*as nc from"react";import{jsx as Q,jsxs as ve}from"react/jsx-runtime";import{useCallback as Wn,useEffect as Za,useRef as zn,useState as Pt}from"react";import*as Qa from"react";import{createPortal as Dg}from"react-dom";var Ya=10,qa=7;function Og(){return ve("svg",{fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[Q("rect",{height:"9",rx:"1",stroke:"currentColor",width:"3",x:"1.5",y:"1.5"}),Q("rect",{height:"9",rx:"1",stroke:"currentColor",width:"3",x:"7.5",y:"1.5"})]})}function Fg(){return ve("svg",{fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[Q("rect",{height:"3",rx:"1",stroke:"currentColor",width:"9",x:"1.5",y:"1.5"}),Q("rect",{height:"3",rx:"1",stroke:"currentColor",width:"9",x:"1.5",y:"7.5"})]})}function ec({anchorElem:t,editor:e,isOpen:o,onClose:n,onInsert:r,position:l}){let[s,i]=Pt(0),[u,d]=Pt(0),[c,a]=Pt(""),[m,p]=Pt(""),[h,f]=Pt(null),g=zn(null),_=zn(null),L=zn(null),R=s>0?s:c?parseInt(c,10)||0:5,b=u>0?u:m?parseInt(m,10)||0:5;Za(()=>{o||(i(0),d(0),a(""),p(""),f(null))},[o]),Za(()=>{if(!o)return;let N=E=>{if(E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),n()),E.key==="Enter"&&h){E.preventDefault();let S=parseInt(c,10),w=parseInt(m,10);S>0&&w>0&&r(S,w)}};return document.addEventListener("keydown",N,!0),()=>document.removeEventListener("keydown",N,!0)},[o,n,r,h,c,m]);let x=Wn((N,E)=>{N>0&&E>0&&r(N,E)},[r]),C=Wn((N,E)=>{i(N),d(E)},[]),k=Wn(()=>{i(0),d(0)},[]);if(!o||!l||!t)return null;let T=[];for(let N=1;N<=qa;N++)for(let E=1;E<=Ya;E++){let S=E<=R&&N<=b,w=E<=s&&N<=u,v="table-grid-popup__cell";S&&w?v+=" table-grid-popup__cell--hover":S&&(v+=" table-grid-popup__cell--selected"),T.push(Q("div",{"aria-label":`${E} columns, ${N} rows`,className:v,onClick:()=>x(E,N),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),x(E,N))},onMouseEnter:()=>C(E,N),role:"button",tabIndex:-1},`${N}-${E}`))}let I=s>0&&u>0;return Dg(ve(Qa.Fragment,{children:[Q("div",{className:"table-grid-popup__backdrop",onClick:n}),Q("div",{className:"table-grid-popup",ref:g,style:{transform:`translate(${l.left}px, ${l.top}px)`},children:ve("div",{className:"table-grid-popup__content",children:[ve("div",{className:"table-grid-popup__header",children:[ve("div",{className:`table-grid-popup__input-group${h==="cols"?" table-grid-popup__input-group--focused":""}`,children:[Q("div",{className:"table-grid-popup__input-icon",children:Q(Og,{})}),Q("input",{"aria-label":"Columns",className:"table-grid-popup__input",min:1,onBlur:()=>f(null),onChange:N=>a(N.target.value),onFocus:()=>f("cols"),placeholder:s>0?String(s):"5",ref:_,type:"number",value:c})]}),Q("span",{className:"table-grid-popup__separator",children:"\xD7"}),ve("div",{className:`table-grid-popup__input-group${h==="rows"?" table-grid-popup__input-group--focused":""}`,children:[Q("div",{className:"table-grid-popup__input-icon",children:Q(Fg,{})}),Q("input",{"aria-label":"Rows",className:"table-grid-popup__input",min:1,onBlur:()=>f(null),onChange:N=>p(N.target.value),onFocus:()=>f("rows"),placeholder:u>0?String(u):"5",ref:L,type:"number",value:m})]})]}),ve("div",{className:"table-grid-popup__grid",onMouseLeave:k,children:[T,I&&ve("div",{className:"table-grid-popup__tooltip",style:{left:`calc(${(s-.5)/Ya*100}%)`,top:`calc(${(u-1)/qa*100}%)`},children:[R," \xD7 ",b]})]})]})})]}),t)}var So=Zg("OPEN_EMBED_DRAWER_COMMAND"),rc=Yg({cellEditorConfig:null,cellEditorPlugins:null,set:()=>{}});function lc({children:t}){let[e,o]=Eo({cellEditorConfig:null,cellEditorPlugins:null});return Kn(rc,{value:Qg(()=>({cellEditorConfig:e.cellEditorConfig,cellEditorPlugins:e.cellEditorPlugins,set:(n,r)=>{o({cellEditorConfig:n,cellEditorPlugins:r})}}),[e.cellEditorConfig,e.cellEditorPlugins]),children:t})}var ic=()=>{let[t]=Pg(),e=qg(rc),[o,n]=Eo(!1),[r,l]=Eo(null),s=e2(null),[i,u]=Eo(null);oc(()=>{let a=t.getRootElement();if(a){let m=a.closest(".editor")??null;u(m??a.parentElement)}},[t]),oc(()=>{if(!t.hasNodes([Ug,Vg,Gg]))throw new Error("TablePlugin: TableNode, TableRowNode, or TableCellNode is not registered on editor");return Wg(t.registerCommand(So,()=>{let a=i;if(!a)return!0;let m=a.getBoundingClientRect(),p=null;t.getEditorState().read(()=>{let f=zg();if(Kg(f)){s.current=f.clone();let g=f.anchor.getNode(),_=t.getElementByKey(g.getKey());if(_){let L=_.getBoundingClientRect();L.height>0&&(p={left:L.left-m.left,top:L.bottom-m.top+8})}}});let h=window.getSelection();if(h&&h.rangeCount>0){let g=h.getRangeAt(0).getBoundingClientRect();g.height>0&&(p={left:g.left-m.left,top:g.bottom-m.top+8})}return p||(p={left:0,top:40}),l(p),n(!0),!0},Xg))},[e,t,i]);let d=tc(()=>{n(!1)},[]),c=tc((a,m)=>{n(!1),t.focus(),t.update(()=>{s.current&&Jg(s.current.clone())},{discrete:!0,skipTransforms:!0}),setTimeout(()=>{t.dispatchCommand(Hg,{columns:String(a),rows:String(m)})},1)},[t]);return Bg(nc.Fragment,{children:[Kn(ec,{anchorElem:i,editor:t,isOpen:o,onClose:d,onInsert:c,position:r}),Kn(jg,{hasCellBackgroundColor:!1,hasCellMerge:!0,hasHorizontalScroll:!0})]})};var r2=A({markdownTransformers:[wa],nodes:[o2,t2,n2],plugins:[{Component:ic,position:"normal"},{Component:ja,position:"normal"},{Component:Aa,position:"floatingAnchorElem"},{Component:Xa,position:"floatingAnchorElem"}],providers:[lc],slashMenu:{groups:[X([{Icon:$n,key:"table",keywords:["table"],label:"Table",onSelect:({editor:t})=>{t.dispatchCommand(So,{})}}])]},toolbarFixed:{groups:[_e([{ChildComponent:$n,key:"table",label:"Table",onSelect:({editor:t})=>{t.dispatchCommand(So,{})}}])]}});import{$isNodeSelection as j2}from"lexical";import{jsx as sc}from"react/jsx-runtime";import"react";var l2="M16.2041 6.01074C17.2128 6.113 18 6.96435 18 8V16L17.9893 16.2041C17.8938 17.1457 17.1457 17.8938 16.2041 17.9893L16 18H8C6.96435 18 6.113 17.2128 6.01074 16.2041L6 16V8C6 6.89543 6.89543 6 8 6H16L16.2041 6.01074ZM8 7C7.44772 7 7 7.44772 7 8V16C7 16.5523 7.44772 17 8 17H16C16.5523 17 17 16.5523 17 16V8C17 7.44772 16.5523 7 16 7H8ZM9.72461 11.582C9.91869 11.4539 10.1827 11.4756 10.3535 11.6465L13.8535 15.1465C14.0488 15.3417 14.0488 15.6583 13.8535 15.8535C13.6583 16.0488 13.3417 16.0488 13.1465 15.8535L10 12.707L8.85352 13.8535C8.65825 14.0488 8.34175 14.0488 8.14648 13.8535C7.95122 13.6583 7.95122 13.3417 8.14648 13.1465L9.64648 11.6465L9.72461 11.582ZM14 8C15.1046 8 16 8.89543 16 10C16 11.1046 15.1046 12 14 12C12.8954 12 12 11.1046 12 10C12 8.89543 12.8954 8 14 8ZM14 9C13.4477 9 13 9.44772 13 10C13 10.5523 13.4477 11 14 11C14.5523 11 15 10.5523 15 10C15 9.44772 14.5523 9 14 9Z",Jn=({className:t})=>sc("svg",{"aria-hidden":"true",className:["icon",t].filter(Boolean).join(" "),fill:"none",focusable:"false",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",children:sc("path",{clipRule:"evenodd",d:l2,fill:"currentColor",fillRule:"evenodd"})});import{jsx as mc}from"react/jsx-runtime";import pc from"bson-objectid";import{$applyNodeReplacement as d2}from"lexical";import*as fc from"react";import i2 from"bson-objectid";function No(t,e){if(t.hasAttribute("data-lexical-pending-upload-form-id")){let n=t.getAttribute("data-lexical-pending-upload-form-id");if(n!=null)return{node:e({data:{pending:{formID:n,src:t.getAttribute("src")||""}}})}}if(t.hasAttribute("data-lexical-upload-relation-to")&&t.hasAttribute("data-lexical-upload-id")){let n=t.getAttribute("data-lexical-upload-id"),r=t.getAttribute("data-lexical-upload-relation-to");if(n!=null&&r!=null)return{node:e({data:{fields:{},relationTo:r,value:n}})}}return{node:e({data:{pending:{formID:new i2.default().toHexString(),src:t.getAttribute("src")||""}}})}}import{DecoratorBlockNode as s2}from"@lexical/react/LexicalDecoratorBlockNode.js";import{addClassNamesToElement as a2}from"@lexical/utils";import cc from"bson-objectid";import{$applyNodeReplacement as c2}from"lexical";var jt=class extends s2{__data;constructor({data:e,format:o,key:n}){super(o,n),this.__data=e}static clone(e){return new this({data:e.__data,format:e.__format,key:e.__key})}static getType(){return"upload"}static importDOM(){return{img:e=>({conversion:o=>No(o,ac),priority:0})}}static importJSON(e){e.version===1&&e?.value?.id&&(e.value=e.value.id),e.version===2&&!e?.id&&(e.id=new cc.default().toHexString(),e.version=3);let o={id:e.id,fields:e.fields,pending:e.pending,relationTo:e.relationTo,value:e.value},n=ac({data:o});return n.setFormat(e.format),n}static isInline(){return!1}createDOM(e){let o=document.createElement("div");return a2(o,e?.theme?.upload),o}decorate(){return null}exportDOM(){let e=document.createElement("img"),o=this.__data;return o.pending?(e.setAttribute("data-lexical-pending-upload-form-id",String(o?.pending?.formID)),e.setAttribute("src",o?.pending?.src||"")):(e.setAttribute("data-lexical-upload-id",String(o?.value)),e.setAttribute("data-lexical-upload-relation-to",o?.relationTo)),{element:e}}exportJSON(){return{...super.exportJSON(),...this.getData(),type:"upload",version:3}}getData(){return this.getLatest().__data}setData(e){let o=this.getWritable();o.__data=e}updateDOM(){return!1}};function ac({data:t}){return t?.id||(t.id=new cc.default().toHexString()),c2(new jt({data:t}))}import{jsx as uc}from"react/jsx-runtime";import{ShimmerEffect as u2}from"@payloadcms/ui";var dc=()=>uc("div",{className:"lexical-upload",children:uc(u2,{height:"95px",width:"203px"})});var m2=fc.lazy(()=>import("./component-PHZQBOJE.js").then(t=>({default:t.UploadComponent}))),he=class extends jt{static clone(e){return super.clone(e)}static getType(){return super.getType()}static importDOM(){return{img:e=>({conversion:o=>No(o,ge),priority:0})}}static importJSON(e){e.version===1&&e?.value?.id&&(e.value=e.value.id),e.version===2&&!e?.id&&(e.id=new pc.default().toHexString(),e.version=3);let o={id:e.id,fields:e.fields,pending:e.pending,relationTo:e.relationTo,value:e.value},n=ge({data:o});return n.setFormat(e.format),n}decorate(e,o){return this.__data.pending?mc(dc,{}):mc(m2,{className:o?.theme?.upload??"LexicalEditorTheme__upload",data:this.__data,format:this.__format,nodeKey:this.getKey()})}exportJSON(){return super.exportJSON()}};function ge({data:t}){return t?.id||(t.id=new pc.default().toHexString()),d2(new he({data:t}))}function mt(t){return t instanceof he}import{c as k2}from"react/compiler-runtime";import{jsx as _2}from"react/jsx-runtime";import{useLexicalComposerContext as T2}from"@lexical/react/LexicalComposerContext.js";import{$dfsIterator as Sc,$insertNodeToNearestRoot as Yn,mergeRegister as w2}from"@lexical/utils";import{useBulkUpload as E2,useEffectEvent as S2,useModal as N2}from"@payloadcms/ui";import qn from"bson-objectid";import{$createRangeSelection as L2,$getPreviousSelection as kc,$getSelection as _c,$isParagraphNode as Qn,$isRangeSelection as Tc,$setSelection as y2,COMMAND_PRIORITY_EDITOR as v2,COMMAND_PRIORITY_LOW as wc,createCommand as R2,DROP_COMMAND as I2,getDOMSelectionFromTarget as M2,isHTMLElement as Ec,PASTE_COMMAND as A2}from"lexical";import{useEffect as $2}from"react";import{c as hc}from"react/compiler-runtime";import{jsx as Xn}from"react/jsx-runtime";import{useLexicalComposerContext as gc}from"@lexical/react/LexicalComposerContext.js";import{toast as p2}from"@payloadcms/ui";import{$getNodeByKey as f2,COMMAND_PRIORITY_EDITOR as xc}from"lexical";import{useEffect as Cc,useState as h2}from"react";var g2=({editor:t,relationTo:e,replaceNodeKey:o,value:n})=>{o?t.update(()=>{let r=f2(o);r&&r.replace(ge({data:{fields:null,relationTo:e,value:n}}))}):t.dispatchCommand(Zn,{fields:null,relationTo:e,value:n})},x2=t=>{let e=hc(13),{enabledCollectionSlugs:o}=t,[n]=gc(),[r,l]=h2(null),s;e[0]!==o?(s={collectionSlugs:o,uploads:!0},e[0]=o,e[1]=s):s=e[1];let{closeListDrawer:i,ListDrawer:u,openListDrawer:d}=At(s),c,a;e[2]!==n||e[3]!==d?(c=()=>n.registerCommand(Qe,f=>(l(f?.replace?f?.replace.nodeKey:null),d(),!0),xc),a=[n,d],e[2]=n,e[3]=d,e[4]=c,e[5]=a):(c=e[4],a=e[5]),Cc(c,a);let m;e[6]!==i||e[7]!==n||e[8]!==r?(m=f=>{let{collectionSlug:g,doc:_}=f;i(),g2({editor:n,relationTo:g,replaceNodeKey:r,value:_.id})},e[6]=i,e[7]=n,e[8]=r,e[9]=m):m=e[9];let p=m,h;return e[10]!==u||e[11]!==p?(h=Xn(u,{onSelect:p}),e[10]=u,e[11]=p,e[12]=h):h=e[12],h},C2=()=>{let t=hc(3),[e]=gc(),o,n;return t[0]!==e?(o=()=>e.registerCommand(Qe,b2,xc),n=[e],t[0]=e,t[1]=o,t[2]=n):(o=t[1],n=t[2]),Cc(o,n),null},bc=({enabledCollectionSlugs:t})=>t?.length?Xn(x2,{enabledCollectionSlugs:t}):Xn(C2,{});function b2(){return p2.error("No upload collections enabled"),!0}function D2(t){let e=t.target;return!!(Ec(e)&&!e.closest("code, span.editor-image")&&Ec(e.parentElement)&&e.parentElement.closest("div.ContentEditable__root"))}function O2(t){let e,o=M2(t.target);if(document.caretRangeFromPoint)e=document.caretRangeFromPoint(t.clientX,t.clientY);else if(t.rangeParent&&o!==null)o.collapse(t.rangeParent,t.rangeOffset||0),e=o.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return e}var Zn=R2("INSERT_UPLOAD_COMMAND"),Nc=t=>{let e=k2(21),{clientProps:o}=t,[n]=T2(),r=o?.disabledCollections,l=o?.enabledCollections,s;e[0]!==r||e[1]!==l?(s={collectionSlugsBlacklist:r,collectionSlugsWhitelist:l,uploads:!0},e[0]=r,e[1]=l,e[2]=s):s=e[2];let{enabledCollectionSlugs:i}=uo(s),{modalSlug:u,setCollectionSlug:d,setInitialForms:c,setOnCancel:a,setOnSuccess:m,setSelectableCollections:p}=E2(),{isModalOpen:h,openModal:f}=N2(),g;e[3]!==u||e[4]!==n||e[5]!==i||e[6]!==h||e[7]!==f||e[8]!==d||e[9]!==c||e[10]!==a||e[11]!==m||e[12]!==p?(g=x=>{let{files:C}=x;if(C?.length!==0&&(c(k=>[...k??[],...C.map(F2)]),!h(u))){if(!i.length||!i[0])return;d(i[0]),p(i),a(()=>{n.update(B2)}),m(k=>{let T=new Map(k.map(P2));n.update(()=>{for(let I of Sc()){let N=I.node;if(mt(N)){let E=N.getData();if(E?.pending){let S=T.get(E.pending?.formID);S&&N.replace(ge({data:{id:new qn.default().toHexString(),fields:{},relationTo:S.collectionSlug,value:S.doc.id}}))}}}})}),f(u)}},e[3]=u,e[4]=n,e[5]=i,e[6]=h,e[7]=f,e[8]=d,e[9]=c,e[10]=a,e[11]=m,e[12]=p,e[13]=g):g=e[13];let _=S2(g),L;e[14]!==n||e[15]!==_?(L=()=>{if(!n.hasNodes([he]))throw new Error("UploadPlugin: UploadNode not registered on editor");return w2(n.registerNodeTransform(he,x=>{let C=x.getData();if(!C?.pending)return;(async function(){let I=null,N=C?.pending?.src,E=C?.pending?.formID;if(N?.startsWith("data:")){let S=N.match(/data:(image\/[a-zA-Z]+);base64,/),w=S?S[1]:"image/png",v=N.replace(/^data:image\/[a-zA-Z]+;base64,/,""),y=atob(v),M=new Array(y.length);for(let F=0;F<y.length;F++)M[F]=y.charCodeAt(F);let $=new Uint8Array(M);I={alt:void 0,file:new File([$],"pasted-image."+w?.split("/",2)[1],{type:w}),formID:E}}else if(N?.startsWith("http")||N?.startsWith("https")){let w=await(await fetch(N)).blob(),v=N.split("/").pop()||"pasted-image"+w.type.split("/",2)[1];I={alt:void 0,file:new File([w],v,{type:w.type}),formID:E}}I&&_({files:[I]})})()}),n.registerCommand(Zn,x=>(n.update(()=>{let C=_c()||kc();if(Tc(C)){let k=ge({data:{id:x.id,fields:x.fields,relationTo:x.relationTo,value:x.value}}),{focus:T}=C,I=T.getNode();Yn(k),Qn(I)&&!I.__first&&I.remove()}}),!0),v2),n.registerCommand(A2,x=>{if(!(x instanceof ClipboardEvent))return!1;let C=x.clipboardData;if(!C?.types?.length||C?.types?.includes("text/html"))return!1;let k=[];return C?.files?.length&&Array.from(C.files).forEach(T=>{k.push({alt:"",file:T,formID:new qn.default().toHexString()})}),k.length?(n.update(()=>{let T=_c()||kc();if(Tc(T))for(let I of k){let N=ge({data:{pending:{formID:I.formID,src:URL.createObjectURL(I.file)}}}),{focus:E}=T,S=E.getNode();Yn(N),Qn(S)&&!S.__first&&S.remove()}}),_({files:k}),!0):!1},wc),n.registerCommand(I2,x=>{if(!(x instanceof DragEvent))return!1;let C=x.dataTransfer;if(!C?.types?.length)return!1;let k=[];return C?.files?.length&&Array.from(C.files).forEach(T=>{k.push({alt:"",file:T,formID:new qn.default().toHexString()})}),k.length?(x.preventDefault(),x.stopPropagation(),n.update(()=>{if(D2(x)){let T=O2(x),I=L2();T!=null&&I.applyDOMRange(T),y2(I);for(let N of k){let E=ge({data:{pending:{formID:N.formID,src:URL.createObjectURL(N.file)}}}),{focus:S}=I,w=S.getNode();Yn(E),Qn(w)&&!w.__first&&w.remove()}}}),_({files:k}),!0):!1},wc))},e[14]=n,e[15]=_,e[16]=L):L=e[16];let R;e[17]!==n?(R=[n],e[17]=n,e[18]=R):R=e[18],$2(L,R);let b;return e[19]!==i?(b=_2(bc,{enabledCollectionSlugs:i}),e[19]=i,e[20]=b):b=e[20],b};function F2(t){return{file:t.file,formID:t.formID}}function B2(){for(let t of Sc()){let e=t.node;mt(e)&&e.getData()?.pending&&e.remove()}}function P2(t){return[t.formID,t]}var H2=A({nodes:[he],plugins:[{Component:Nc,position:"normal"}],slashMenu:{groups:[X([{Icon:Jn,key:"upload",keywords:["upload","image","file","img","picture","photo","media"],label:({i18n:t})=>t.t("lexical:upload:label"),onSelect:({editor:t})=>{t.dispatchCommand(Qe,{replace:!1})}}])]},toolbarFixed:{groups:[_e([{ChildComponent:Jn,isActive:({selection:t})=>{if(!j2(t)||!t.getNodes().length)return!1;let e=t.getNodes()[0];return mt(e)},key:"upload",label:({i18n:t})=>t.t("lexical:upload:label"),onSelect:({editor:t})=>{t.dispatchCommand(Qe,{replace:!1})}}])]}});import{c as U2}from"react/compiler-runtime";import{jsx as Lo}from"react/jsx-runtime";import{createElement as V2}from"react";import{ShimmerEffect as W2,useConfig as z2}from"@payloadcms/ui";import{lazy as K2,Suspense as J2,useEffect as X2,useState as Z2}from"react";var Lc={block:"LexicalEditorTheme__block",blockCursor:"LexicalEditorTheme__blockCursor",characterLimit:"LexicalEditorTheme__characterLimit",code:"LexicalEditorTheme__code",inlineBlock:"LexicalEditorTheme__inlineBlock",heading:{h1:"LexicalEditorTheme__h1",h2:"LexicalEditorTheme__h2",h3:"LexicalEditorTheme__h3",h4:"LexicalEditorTheme__h4",h5:"LexicalEditorTheme__h5",h6:"LexicalEditorTheme__h6"},hr:"LexicalEditorTheme__hr",hrSelected:"LexicalEditorTheme__hrSelected",indent:"LexicalEditorTheme__indent",link:"LexicalEditorTheme__link",list:{checklist:"LexicalEditorTheme__checklist",listitem:"LexicalEditorTheme__listItem",listitemChecked:"LexicalEditorTheme__listItemChecked",listitemUnchecked:"LexicalEditorTheme__listItemUnchecked",nested:{listitem:"LexicalEditorTheme__nestedListItem"},olDepth:["LexicalEditorTheme__ol1","LexicalEditorTheme__ol2","LexicalEditorTheme__ol3","LexicalEditorTheme__ol4","LexicalEditorTheme__ol5"],ul:"LexicalEditorTheme__ul"},ltr:"LexicalEditorTheme__ltr",mark:"LexicalEditorTheme__mark",markOverlap:"LexicalEditorTheme__markOverlap",paragraph:"LexicalEditorTheme__paragraph",placeholder:"LexicalEditorTheme__placeholder",quote:"LexicalEditorTheme__quote",relationship:"LexicalEditorTheme__relationship",root:"LexicalEditorTheme",rtl:"LexicalEditorTheme__rtl",tab:"LexicalEditorTheme__tabNode",table:"LexicalEditorTheme__table",tableAddColumns:"LexicalEditorTheme__tableAddColumns",tableAddRows:"LexicalEditorTheme__tableAddRows",tableAlignment:{center:"LexicalEditorTheme__tableAlignmentCenter",right:"LexicalEditorTheme__tableAlignmentRight"},tableCell:"LexicalEditorTheme__tableCell",tableCellActionButton:"LexicalEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"LexicalEditorTheme__tableCellActionButtonContainer",tableCellHeader:"LexicalEditorTheme__tableCellHeader",tableCellResizer:"LexicalEditorTheme__tableCellResizer",tableCellSelected:"LexicalEditorTheme__tableCellSelected",tableFrozenColumn:"LexicalEditorTheme__tableFrozenColumn",tableRowStriping:"LexicalEditorTheme__tableRowStriping",tableScrollableWrapper:"LexicalEditorTheme__tableScrollableWrapper",tableSelected:"LexicalEditorTheme__tableSelected",tableSelection:"LexicalEditorTheme__tableSelection",text:{bold:"LexicalEditorTheme__textBold",code:"LexicalEditorTheme__textCode",italic:"LexicalEditorTheme__textItalic",strikethrough:"LexicalEditorTheme__textStrikethrough",subscript:"LexicalEditorTheme__textSubscript",superscript:"LexicalEditorTheme__textSuperscript",underline:"LexicalEditorTheme__textUnderline",underlineStrikethrough:"LexicalEditorTheme__textUnderlineStrikethrough"},upload:"LexicalEditorTheme__upload"};var er={namespace:"lexical",theme:Lc};function yc({config:t,featureClientImportMap:e,featureClientSchemaMap:o,field:n,schemaPath:r,unSanitizedEditorConfig:l}){let s=new Map,i=[];for(let c of l.features){if(!c?.clientFeatureProps?.featureKey||c?.clientFeatureProps?.order===void 0||c?.clientFeatureProps?.order===null){console.warn("A Feature you have installed does not return the client props as clientFeatureProps. Please make sure to always return those props, even if they are null, as other important props like order and featureKey are later on injected. Skipping feature.");continue}s.set(c.clientFeatureProps.featureKey,c),i.push(c)}l.features=i,l.features=l.features.sort((c,a)=>c.clientFeatureProps.order-a.clientFeatureProps.order);let u=new Map,d=0;for(let c of l.features){let a=typeof c.feature=="function"?c.feature({config:t,featureClientImportMap:e,featureClientSchemaMap:o,featureProviderMap:s,field:n,resolvedFeatures:u,schemaPath:r,unSanitizedEditorConfig:l}):c.feature;a.key=c.clientFeatureProps.featureKey,a.order=d,u.set(c.clientFeatureProps.featureKey,a),d++}return u}import{deepMerge as G2}from"payload/shared";var vc=t=>{let e={enabledFeatures:[],enabledFormats:[],markdownTransformers:[],nodes:[],plugins:[],providers:[],slashMenu:{dynamicGroups:[],groups:[]},toolbarFixed:{groups:[]},toolbarInline:{groups:[]}},o={};if(t.forEach(n=>{n.key==="toolbarFixed"&&n.sanitizedClientFeatureProps?.customGroups&&(o={...o,...n.sanitizedClientFeatureProps.customGroups})}),!t?.size)return e;t.forEach(n=>{if(n.providers?.length&&(e.providers=e.providers.concat(n.providers)),n.enableFormats?.length&&e.enabledFormats.push(...n.enableFormats),n.nodes?.length)for(let r of n.nodes)e.nodes.push(r);if(n.plugins?.length&&n.plugins.forEach((r,l)=>{e.plugins?.push({clientProps:n.sanitizedClientFeatureProps,Component:r.Component,key:n.key+l,position:r.position})}),n.toolbarInline?.groups?.length)for(let r of n.toolbarInline.groups){let l=e.toolbarInline.groups.find(s=>s.key===r.key);l?e.toolbarInline.groups=e.toolbarInline.groups.filter(s=>s.key!==r.key):l={...r,items:[]},r?.items?.length&&(l.items=l.items.concat(r.items)),e.toolbarInline?.groups.push(l)}if(n.toolbarFixed?.groups?.length)for(let r of n.toolbarFixed.groups){let l=e.toolbarFixed.groups.find(s=>s.key===r.key);l?e.toolbarFixed.groups=e.toolbarFixed.groups.filter(s=>s.key!==r.key):l={...r,items:[]},r?.items?.length&&(l.items=l.items.concat(r.items)),e.toolbarFixed?.groups.push(l)}if(n.slashMenu?.groups){n.slashMenu.dynamicGroups?.length&&(e.slashMenu.dynamicGroups=e.slashMenu.dynamicGroups.concat(n.slashMenu.dynamicGroups));for(let r of n.slashMenu.groups){let l=e.slashMenu.groups.find(s=>s.key===r.key);l?e.slashMenu.groups=e.slashMenu.groups.filter(s=>s.key!==r.key):l={...r,items:[]},r?.items?.length&&(l.items=l.items.concat(r.items)),e.slashMenu.groups.push(l)}}if(n.markdownTransformers?.length)for(let r of n.markdownTransformers)typeof r=="function"?e.markdownTransformers.push(r({allNodes:e.nodes,allTransformers:e.markdownTransformers})):e.markdownTransformers.push(r);e.enabledFeatures.push(n.key)}),Object.keys(o).length>0&&(e.toolbarFixed.groups=e.toolbarFixed.groups.map(n=>{let r=o[n.key];return r?G2(n,r):n})),e.toolbarInline.groups.sort((n,r)=>n.order&&r.order?n.order-r.order:n.order?-1:r.order?1:0),e.toolbarFixed.groups.sort((n,r)=>n.order&&r.order?n.order-r.order:n.order?-1:r.order?1:0);for(let n of e.toolbarInline.groups)n.items.sort((r,l)=>r.order&&l.order?r.order-l.order:r.order?-1:l.order?1:0);for(let n of e.toolbarFixed.groups)n.items.sort((r,l)=>r.order&&l.order?r.order-l.order:r.order?-1:l.order?1:0);return e};function tr(t,e,o,n){return{admin:o,features:vc(t),lexical:e,resolvedFeatureMap:t,view:n}}var Y2=K2(()=>import("./Field-QGSHF22S.js").then(t=>({default:t.RichText}))),q2=t=>Lo(Fo,{inheritable:!0,views:t.views,children:Lo(Q2,{...t})}),Q2=t=>{let e=U2(23),{admin:o,clientFeatures:n,featureClientImportMap:r,featureClientSchemaMap:l,field:s,lexicalEditorConfig:i,schemaPath:u,views:d}=t,c;e[0]!==o?(c=o===void 0?{}:o,e[0]=o,e[1]=c):c=e[1];let a=c,m;e[2]!==r?(m=r===void 0?{}:r,e[2]=r,e[3]=m):m=e[3];let p=m,h=i===void 0?er:i,{currentView:f}=Bo(),g=d?.[f]?.admin??a,_=d?.[f]?.lexical,L;e[4]!==h||e[5]!==_?(L=typeof _=="function"?_(h):_??h,e[4]=h,e[5]=_,e[6]=L):L=e[6];let R=L,{config:b}=z2(),[x,C]=Z2(null),k,T;e[7]!==n||e[8]!==b||e[9]!==f||e[10]!==g||e[11]!==R||e[12]!==p||e[13]!==l||e[14]!==s||e[15]!==x||e[16]!==u||e[17]!==d?(k=()=>{if(x&&x.view===f)return;let N=d?.[f],E=N?.filterFeatures?N.filterFeatures(n):n,S=[];for(let v of Object.values(E))!v.clientFeatureProvider||!v.clientFeatureProps||S.push(v.clientFeatureProvider(v.clientFeatureProps));let w=yc({config:b,featureClientImportMap:p,featureClientSchemaMap:l,field:s,schemaPath:u??s.name,unSanitizedEditorConfig:{features:S,lexical:R}});C(tr(w,R,g,f))},T=[g,n,b,p,l,s,x,R,u,f,d],e[7]=n,e[8]=b,e[9]=f,e[10]=g,e[11]=R,e[12]=p,e[13]=l,e[14]=s,e[15]=x,e[16]=u,e[17]=d,e[18]=k,e[19]=T):(k=e[18],T=e[19]),X2(k,T);let I;return e[20]!==x||e[21]!==t?(I=Lo(J2,{fallback:Lo(W2,{height:"35vh"}),children:x&&V2(Y2,{...t,editorConfig:x,key:x.view})}),e[20]=x,e[21]=t,e[22]=I):I=e[22],I};function ex(...t){return t.filter(Boolean).join(" ")}var tx=t=>(e,o,n)=>{let r=t(n);r&&(r.append(...o),e.replace(r),r.select(0,0))};var yo=new WeakMap;function Rc(t){let e=t.changedTouches[0];return e===void 0?null:[e.clientX,e.clientY]}function vo(t,e){let o=yo.get(t);if(o===void 0){let n=new Set,r=s=>{o!==void 0&&(o.start=Rc(s))},l=s=>{if(o===void 0)return;let{start:i}=o;if(i===null)return;let u=Rc(s);for(let d of n)u!==null&&d([u[0]-i[0],u[1]-i[1]],s)};t.addEventListener("touchstart",r),t.addEventListener("touchend",l),o={handleTouchend:l,handleTouchstart:r,listeners:n,start:null},yo.set(t,o)}return o.listeners.add(e),()=>{ox(t,e)}}function ox(t,e){let o=yo.get(t);if(o===void 0)return;let{listeners:n}=o;n.delete(e),n.size===0&&(yo.delete(t),t.removeEventListener("touchstart",o.handleTouchstart),t.removeEventListener("touchend",o.handleTouchend))}function nx(t,e){return vo(t,(o,n)=>{let[r,l]=o;r<0&&-r>Math.abs(l)&&e(r,n)})}function rx(t,e){return vo(t,(o,n)=>{let[r,l]=o;r>0&&r>Math.abs(l)&&e(r,n)})}function lx(t,e){return vo(t,(o,n)=>{let[r,l]=o;l<0&&-l>Math.abs(r)&&e(r,n)})}function ix(t,e){return vo(t,(o,n)=>{let[r,l]=o;l>0&&l>Math.abs(r)&&e(r,n)})}import{c as sx}from"react/compiler-runtime";import{jsx as ax}from"react/jsx-runtime";import"react";var cx=()=>{let t=sx(2),{EditButton:e}=be(),o;return t[0]!==e?(o=e?ax(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as ux}from"react/compiler-runtime";import{jsx as dx}from"react/jsx-runtime";import"react";var mx=()=>{let t=ux(2),{RemoveButton:e}=be(),o;return t[0]!==e?(o=e?dx(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as px}from"react/compiler-runtime";import{jsx as fx}from"react/jsx-runtime";import"react";var hx=()=>{let t=px(2),{Label:e}=be(),o;return t[0]!==e?(o=e?fx(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as gx}from"react/compiler-runtime";import{jsx as xx}from"react/jsx-runtime";import"react";var Cx=t=>{let e=gx(3),{children:o}=t,{InlineBlockContainer:n}=be(),r;return e[0]!==n||e[1]!==o?(r=n?xx(n,{children:o}):null,e[0]=n,e[1]=o,e[2]=r):r=e[2],r};import{jsx as bx}from"react/jsx-runtime";import"react";var kx=t=>{let{children:e,...o}=t,{BlockCollapsible:n}=ae();return n?bx(n,{...o,children:e}):null};import{c as _x}from"react/compiler-runtime";import{jsx as Tx}from"react/jsx-runtime";import"react";var wx=()=>{let t=_x(2),{EditButton:e}=ae(),o;return t[0]!==e?(o=e?Tx(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{c as Ex}from"react/compiler-runtime";import{jsx as Sx}from"react/jsx-runtime";import"react";var Nx=()=>{let t=Ex(2),{RemoveButton:e}=ae(),o;return t[0]!==e?(o=e?Sx(e,{}):null,t[0]=e,t[1]=o):o=t[1],o};import{stringify as Lx}from"qs-esm";var yx=({apiURL:t,depth:e,draft:o,locale:n})=>async({id:l,collectionSlug:s,select:i})=>{let u=Lx({depth:e??0,draft:o??!1,locale:n,select:i},{addQueryPrefix:!0});return await fetch(`${t}/${s}/${l}${u}`,{credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(c=>c.json())};var Ic={customEndRegex:{optional:!0,regExp:/[ \t]*```$/},customStartRegex:/^[ \t]*```(\w+)?/,doNotTrimChildren:!0,export:({fields:t})=>!t.code.includes(`
60
60
  `)&&!t.language?.length?"```"+t.code+"```":"```"+(t.language||"")+(t.code?`
61
61
  `+t.code:"")+"\n```",import:({children:t,closeMatch:e,openMatch:o})=>{let n=o?.[1];return t.startsWith(`
62
62
  `)&&(t=t.slice(1)),t.endsWith(`
@@ -1 +1 @@
1
- {"version":3,"file":"toolbarAlignGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/align/client/toolbarAlignGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,0BAA0B,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAStE,CAAA"}
1
+ {"version":3,"file":"toolbarAlignGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/align/client/toolbarAlignGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,0BAA0B,UAAW,gBAAgB,EAAE,KAAG,YAStE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"InlineBlockContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/blocks/client/componentInline/components/InlineBlockContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,oBAAoB,GAAI,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,6BAI/E,CAAA"}
1
+ {"version":3,"file":"InlineBlockContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/blocks/client/componentInline/components/InlineBlockContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,oBAAoB,iBAAkB;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,6BAI/E,CAAA"}
@@ -6,5 +6,5 @@ import React from 'react';
6
6
  * Priority for URL: images.icon > images.thumbnail > imageURL (deprecated)
7
7
  * Priority for alt: images.icon.alt > images.thumbnail.alt > imageAltText (deprecated)
8
8
  */
9
- export declare function getBlockImageComponent(block: ClientBlock, fallback: React.ElementType): React.ElementType<any, keyof React.JSX.IntrinsicElements> | (() => React.JSX.Element);
9
+ export declare function getBlockImageComponent(block: ClientBlock, fallback: React.ElementType): (() => React.JSX.Element) | React.ElementType<any, keyof React.JSX.IntrinsicElements>;
10
10
  //# sourceMappingURL=getBlockImageComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/markdown/markdownTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACpB,WAAW,EACZ,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,EAGL,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAE5B,MAAM,SAAS,CAAA;AAqBhB,eAAO,MAAM,4BAA4B,GAAI,2BAG1C;IACD,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,KAAG,CAAC,CAAC,KAAK,EAAE;IACX,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,sBAAsB,CAAC,CAAA;IAC5D,eAAe,EAAE,WAAW,EAAE,CAAA;CAC/B,KAAK,2BAA2B,GAAG,oBAAoB,CAAC,EA8BxD,CAAA"}
1
+ {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/markdown/markdownTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACpB,WAAW,EACZ,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,EAGL,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAE5B,MAAM,SAAS,CAAA;AAqBhB,eAAO,MAAM,4BAA4B,8BAGtC;IACD,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,KAAG,CAAC,CAAC,KAAK,EAAE;IACX,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,sBAAsB,CAAC,CAAA;IAC5D,eAAe,EAAE,WAAW,EAAE,CAAA;CAC/B,KAAK,2BAA2B,GAAG,oBAAoB,CAAC,EA8BxD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"BlocksNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/nodes/BlocksNode.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAGlE,MAAM,MAAM,qBAAqB,GAAG,CAClC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,YAAY,EACpB,WAAW,CAAC,EAAE,KAAK,CAAC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AE,KAAK,CAAC,EAAE,CAAC,gCAAgC,CAAC,EACxD,WAAW,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,gCAAgC,CAAC,KACrD,GAAG,CAAC,OAAO,CAAA;AAEhB,qBAAa,eAAgB,SAAQ,qBAAqB;IACxD,OAAgB,KAAK,CAAC,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,CAExE;IAED,OAAgB,OAAO,IAAI,MAAM,CAEhC;IAED,OAAgB,UAAU,CAAC,cAAc,EAAE,yBAAyB,GAAG,eAAe,CAGrF;IAEQ,QAAQ,CACf,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,UAAU,CAAC,2BAA2B,CAAC,GACtF,UAAU,CAAC,2BAA2B,CAAC,CAWzC;IAEQ,UAAU,IAAI,yBAAyB,CAE/C;CACF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC,GAAG,eAAe,CAShG;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,eAAe,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GACrD,IAAI,IAAI,eAAe,CAEzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAIjF,eAAO,MAAM,yBAAyB,GACpC,QAAQ,KAAK,EAAE,KACd,iBAAiB,CAAC,mBAAmB,GAAG,yBAAyB,CAiDnE,CAAA"}
1
+ {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAIjF,eAAO,MAAM,yBAAyB,WAC5B,KAAK,EAAE,KACd,iBAAiB,CAAC,mBAAmB,GAAG,yBAAyB,CAiDnE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/server/markdown/markdownTransformer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAe5D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM;;;EAiB/C;AACD,eAAO,MAAM,4BAA4B,GAAI,2BAG1C;IACD,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,YAAY,EAAE,KAAK,EAAE,CAAA;CACtB,KAAG,CAAC,CAAC,KAAK,EAAE;IACX,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IAC9B,eAAe,EAAE,WAAW,EAAE,CAAA;CAC/B,KAAK,2BAA2B,GAAG,oBAAoB,CAAC,EA+BxD,CAAA"}
1
+ {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/server/markdown/markdownTransformer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,WAAW,EACjB,MAAM,mBAAmB,C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AAiB,EAAE,sBAAsB,CAAC,EAAE,OAAO,GAAG,IAAI;IAQnE,SAAS,IAAI,OAAO;CAG9B;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC,GACvC,qBAAqB,CASvB;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,qBAAqB,GAAG,SAAS,GAC3D,IAAI,IAAI,qBAAqB,CAE/B"}
1
+ {"version":3,"file":"InlineBlocksNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/server/nodes/InlineBlocksNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,WAAW,EACX,OAAO,EACR,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAIhC,OAAO,EAAyB,aAAa,EAAE,MAAM,SAAS,CAAA;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAEhF,qBAAa,qBAAsB,SAAQ,aAAa,CAAC,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC;IACjF,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,iBAAiB,CAAA;IAE3B,YAAY,EACV,WAAW,EACX,MAAM,EACN,GAAG,GACJ,EAAE;QACD,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,MAAM,EAAE,iBAAiB,CAAA;QACzB,GAAG,CAAC,EAAE,OAAO,CAAA;KACd,EAIA;IAED,OAAgB,KAAK,CAAC,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,CAMxE;IAED,OAAgB,OAAO,IAAI,MAAM,CAEhC;IAED,OAAgB,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI,CAEnE;IAED,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M,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC,CAAA;IACrF,MAAM,EAAE,oBAAoB,CAAA;IAC5B,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAChB,GACD,KAAK,CAAA;AAEX,MAAM,MAAM,yBAAyB,CACnC,OAAO,SAAS;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,IAC3D,OAAO,SAAS,OAAO,GACvB;IACE,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IAC5C,IAAI,EAAE,aAAa,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAChB,GACD,KAAK,CAAA;AAyET,eAAO,MAAM,yBAAyB,iBACrB,KAAK,EAAE,KAAG,YA+BxB,CAAA;AAEH,eAAO,MAAM,+BAA+B,uBACrB,KAAK,EAAE,KAAG,YA8B9B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAe,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE9F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,KAAK,EAAE,KACd,cAAc,CAAC,mBAAmB,GAAG,yBAAyB,CAqDhE,CAAA"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAe,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE9F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,WACrB,KAAK,EAAE,KACd,cAAc,CAAC,mBAAmB,GAAG,yBAAyB,CAqDhE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/htmlToLexical/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE7E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,oBAAoB,GAAI,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,EAAE,gCAI/F;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,KAAK;QAC3B,MAAM,EAAE;YACN,QAAQ,EAAE,QAAQ,CAAA;SACnB,CAAA;KACF,CAAA;CACF,KAAG,gBAAgB,CAAC,UAAU,CA2B9B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/htmlToLexical/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE7E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,oBAAoB,GAAI,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,kCAI7F;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,KAAK;QAC3B,MAAM,EAAE;YACN,QAAQ,EAAE,QAAQ,CAAA;SACnB,CAAA;KACF,CAAA;CACF,KAAG,gBAAgB,CAAC,UAAU,CA2B9B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"cssColors.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToHtml/shared/cssColors.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,aA0J3B,CAAA;AAKF,qFAAqF;AACrF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,OAE9C,CAAA"}
1
+ {"version":3,"file":"cssColors.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToHtml/shared/cssColors.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,aA0J3B,CAAA;AAKF,qFAAqF;AACrF,eAAO,MAAM,cAAc,UAAW,MAAM,KAAG,OAE9C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAKpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAInF,eAAO,MAAM,wBAAwB,GAAI,yBAGtC;IACD,IAAI,EAAE,qBAAqB,CAAA;IAC3B,YAAY,EAAE,2BAA2B,CAAA;CAC1C,KAAG,MAoBH,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAKpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAInF,eAAO,MAAM,wBAAwB,4BAGlC;IACD,IAAI,EAAE,qBAAqB,CAAA;IAC3B,YAAY,EAAE,2BAA2B,CAAA;CAC1C,KAAG,MAoBH,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,wBAAwB,GACnC,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,EAC3D,6BAGC;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB,KAAG,gBAAgB,CAAC,UAAU,CA0B9B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,wBAAwB,GACnC,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,+BAI1D;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB,KAAG,gBAAgB,CAAC,UAAU,CA0B9B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../src/features/experimental_table/client/utils/debounce.ts"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,iBAAS,QAAQ,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,EAAE,OAAO,KAAA;;;;EA+HpC;AAGD,eAAe,QAAQ,CAAA"}
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../src/features/experimental_table/client/utils/debounce.ts"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,iBAAS,QAAQ,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,EAAE,OAAO,KAAA;;;;EA+HpC;eAGc,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"toolbarFormatGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/format/shared/toolbarFormatGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,2BAA2B,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAOvE,CAAA"}
1
+ {"version":3,"file":"toolbarFormatGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/format/shared/toolbarFormatGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,2BAA2B,UAAW,gBAAgB,EAAE,KAAG,YAOvE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/heading/server/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,WAAW,qBAAqB,CACpC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,EAC/D,IAAI,SAAS,cAAc,GAAG,cAAc,CAC5C,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,GAAG,EAAE,IAAI,CAAA;IACT,IAAI,EAAE,SAAS,CAAA;CAChB;AAaD,eAAO,MAAM,uBAAuB,GACjC,qBAAqB,cAAc,EAAE,KAAG,YAyBxC,CAAA"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/heading/server/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,WAAW,qBAAqB,CACpC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,EAC/D,IAAI,SAAS,cAAc,GAAG,cAAc,CAC5C,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,GAAG,EAAE,IAAI,CAAA;IACT,IAAI,EAAE,SAAS,CAAA;CAChB;AAaD,eAAO,MAAM,uBAAuB,wBACZ,cAAc,EAAE,KAAG,YAyBxC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalRuleNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/horizontalRule/client/nodes/HorizontalRuleNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAuB,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAKtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAE1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AAEnF,qBAAa,kBAAmB,SAAQ,wBAAwB;WAC9C,KAAK,CAAC,IAAI,EAAE,wBAAwB,GAAG,wBAAwB;WAI/D,OAAO,IAAI,MAAM;IAIjC;;OAEG;WACa,UAAU,CAAC,cAAc,EAAE,4BAA4B,GAAG,kBAAkB;IAI5F;;OAEG;IACM,QAAQ;IAIR,UAAU,IAAI,qBAAqB;CAG7C;AAMD,wBAAgB,yBAAyB,IAAI,kBAAkB,CAE9D;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,kBAAkB,CAE5B"}
1
+ {"version":3,"file":"HorizontalRuleNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/horizontalRule/client/nodes/HorizontalRuleNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAuB,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAKtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAE1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AAEnF,qBAAa,kBAAmB,SAAQ,wBAAwB;IAC9D,OAAgB,KAAK,CAAC,IAAI,EAAE,wBAAwB,GAAG,wBAAwB,CAE9E;IAED,OAAgB,OAAO,IAAI,MAAM,CAEhC;IAED;;OAEG;IACH,OAAgB,UAAU,CAAC,cAAc,EAAE,4BAA4B,GAAG,kBAAkB,CAE3F;IAED;;OAEG;IACM,QAAQ,SAEhB;IAEQ,UAAU,IAAI,qBAAqB,CAE3C;CACF;AAMD,wBAAgB,yBAAyB,IAAI,kBAAkB,CAE9D;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,kBAAkB,CAE5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalRuleNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/horizontalRule/server/nodes/HorizontalRuleNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAGnC,OAAO,EAAwC,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAA;AAEhE,eAAO,MAAM,8BAA8B,EAAE,cAAc,CAAC,IAAI,CAE/D,CAAA;AAED;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,aAAa,CAAC,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC;WACpE,KAAK,CAAC,IAAI,EAAE,wBAAwB,GAAG,wBAAwB;WAI/D,OAAO,IAAI,MAAM;IAIjC;;;;OAIG;WACa,SAAS,IAAI,gBAAgB,GAAG,IAAI;IASpD;;OAEG;WACa,UAAU,CACxB,cAAc,EAAE,4BAA4B,GAC3C,wBAAwB;IAI3B;;OAEG;IACM,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW;IAM5C,QAAQ,IAAI,IAAI,GAAG,KAAK,CAAC,YAAY;IAI9C;;;;OAIG;IACM,SAAS,IAAI,eAAe;IAGrC;;OAEG;IACM,UAAU,IAAI,qBAAqB;IAOnC,cAAc,IAAI,MAAM;IAIxB,QAAQ,IAAI,KAAK;IAIjB,SAAS,IAAI,OAAO;CAG9B;AAMD,wBAAgB,+BAA+B,IAAI,wBAAwB,CAE1E;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,wBAAwB,CAElC"}
1
+ {"version":3,"file":"HorizontalRuleNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/horizontalRule/server/nodes/HorizontalRuleNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,qBAAqB,EACtB,MAAM,SAA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,MAAM,2BAA2B,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAOvE,CAAA"}
1
+ {"version":3,"file":"toolbarIndentGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/indent/client/toolbarIndentGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,2BAA2B,UAAW,gBAAgB,EAAE,KAAG,YAOvE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/link/client/plugins/autoLink/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAOjD,UAAU,iBAAiB;IACzB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,iBAAiB,GAAG,IAAI,CAAA;AAEpE,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,cAAc,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAuB,IAEjD,MAAM,MAAM;;;;;SAYrB;AAwZD,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,WAAW,CAMvD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/link/client/plugins/autoLink/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAOjD,UAAU,iBAAiB;IACzB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,iBAAiB,GAAG,IAAI,CAAA;AAEpE,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,cAAc,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAuB,UAE3C,MAAM;;;;;SAYrB;AAwZD,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,WAAW,CAMvD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../src/features/link/markdownTransformer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAI7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAO5D,MAAM,MAAM,gCAAgC,GAAG;IAC7C;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,kBAAkB,CAAA;KAAE,KAAK,MAAM,CAAA;CACvE,CAAA;AAoBD,eAAO,MAAM,4BAA4B,GACvC,OAAO,gCAAgC,KACtC,oBAiCD,CAAA;AAEF,eAAO,MAAM,YAAY,EAAE,oBAAqD,CAAA"}
1
+ {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../src/features/link/markdownTransformer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAI7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAO5D,MAAM,MAAM,gCAAgC,GAAG;IAC7C;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,kBAAkB,CAAA;KAAE,KAAK,MAAM,CAAA;CACvE,CAAA;AAoBD,eAAO,MAAM,4BAA4B,UAChC,gCAAgC,KACtC,oBAiCD,CAAA;AAEF,eAAO,MAAM,YAAY,EAAE,oBAAqD,CAAA"}