@frontify/fondue 12.12.4 → 12.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/RichTextEditor/Plugins/MarkPlugin/CodePlugin/index.es.js +11 -5
- package/dist/components/RichTextEditor/Plugins/MarkPlugin/CodePlugin/index.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/packages/components/style.css +1 -1
- package/dist/packages/tokens/tailwind.config.js +1 -1
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createCodePlugin as
|
|
2
|
-
import { Plugin as
|
|
1
|
+
import { createCodePlugin as e } from "@udecode/plate-basic-marks";
|
|
2
|
+
import { Plugin as r } from "../../Plugin.es.js";
|
|
3
3
|
import { CodeButton as t } from "./CodeButton.es.js";
|
|
4
4
|
import { CodeMarkupElement as m } from "./CodeMarkupElement.es.js";
|
|
5
5
|
import { CODE_CLASSES as a, CodeMarkupElementNode as c } from "./CodeMarkupElement.es.js";
|
|
6
6
|
import { CODE_PLUGIN as n } from "./id.es.js";
|
|
7
|
-
class
|
|
7
|
+
class s extends r {
|
|
8
8
|
constructor(o) {
|
|
9
9
|
super(n, {
|
|
10
10
|
button: t,
|
|
@@ -13,13 +13,19 @@ class f extends e {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
plugins() {
|
|
16
|
-
return [
|
|
16
|
+
return [
|
|
17
|
+
e({
|
|
18
|
+
options: {
|
|
19
|
+
hotkey: []
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
];
|
|
17
23
|
}
|
|
18
24
|
}
|
|
19
25
|
export {
|
|
20
26
|
a as CODE_CLASSES,
|
|
21
27
|
m as CodeMarkupElement,
|
|
22
28
|
c as CodeMarkupElementNode,
|
|
23
|
-
|
|
29
|
+
s as CodePlugin
|
|
24
30
|
};
|
|
25
31
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/MarkPlugin/CodePlugin/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { createCodePlugin } from '@udecode/plate-basic-marks';\nimport { type PlatePlugin } from '@udecode/plate-core';\n\nimport { Plugin, type PluginProps } from '../../Plugin';\n\nimport { CodeButton } from './CodeButton';\nimport { CodeMarkupElement } from './CodeMarkupElement';\nimport { CODE_PLUGIN } from './id';\n\nexport class CodePlugin extends Plugin {\n constructor(props?: PluginProps) {\n super(CODE_PLUGIN, {\n button: CodeButton,\n markupElement: new CodeMarkupElement(),\n ...props,\n });\n }\n\n plugins(): PlatePlugin[] {\n return [createCodePlugin()];\n }\n}\n\nexport * from './CodeMarkupElement';\n"],"names":["CodePlugin","Plugin","props","CODE_PLUGIN","CodeButton","CodeMarkupElement","createCodePlugin"],"mappings":";;;;;;AAWO,MAAMA,UAAmBC,EAAO;AAAA,EACnC,YAAYC,GAAqB;AAC7B,UAAMC,GAAa;AAAA,MACf,QAAQC;AAAA,MACR,eAAe,IAAIC,EAAA;AAAA,MACnB,GAAGH;AAAA,IAAA,CACN;AAAA,EACL;AAAA,EAEA,UAAyB;AACrB,WAAO,
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/MarkPlugin/CodePlugin/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { createCodePlugin } from '@udecode/plate-basic-marks';\nimport { type PlatePlugin } from '@udecode/plate-core';\n\nimport { Plugin, type PluginProps } from '../../Plugin';\n\nimport { CodeButton } from './CodeButton';\nimport { CodeMarkupElement } from './CodeMarkupElement';\nimport { CODE_PLUGIN } from './id';\n\nexport class CodePlugin extends Plugin {\n constructor(props?: PluginProps) {\n super(CODE_PLUGIN, {\n button: CodeButton,\n markupElement: new CodeMarkupElement(),\n ...props,\n });\n }\n\n plugins(): PlatePlugin[] {\n return [\n createCodePlugin({\n options: {\n hotkey: [],\n },\n }),\n ];\n }\n}\n\nexport * from './CodeMarkupElement';\n"],"names":["CodePlugin","Plugin","props","CODE_PLUGIN","CodeButton","CodeMarkupElement","createCodePlugin"],"mappings":";;;;;;AAWO,MAAMA,UAAmBC,EAAO;AAAA,EACnC,YAAYC,GAAqB;AAC7B,UAAMC,GAAa;AAAA,MACf,QAAQC;AAAA,MACR,eAAe,IAAIC,EAAA;AAAA,MACnB,GAAGH;AAAA,IAAA,CACN;AAAA,EACL;AAAA,EAEA,UAAyB;AACrB,WAAO;AAAA,MACHI,EAAiB;AAAA,QACb,SAAS;AAAA,UACL,QAAQ,CAAA;AAAA,QAAC;AAAA,MACb,CACH;AAAA,IAAA;AAAA,EAET;AACJ;"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
`),As=500,$G=16,PG=e=>Math.max(0,...e.map(l=>[...l,{buttonGroupWidth:0}].reduce((s,{buttonGroupWidth:o})=>s+o,0))),k0={heading1:{fontSize:"48px",fontWeight:700,fontStyle:"normal"},heading2:{fontSize:"32px",fontWeight:700,fontStyle:"normal"},heading3:{fontSize:"24px",fontWeight:"normal",fontStyle:"normal"},heading4:{fontSize:"18px",fontWeight:"normal",fontStyle:"normal"},custom1:{fontSize:"14px",fontWeight:"normal",fontStyle:"normal"},custom2:{fontSize:"14px",fontWeight:600,fontStyle:"normal"},custom3:{fontSize:"14px",fontWeight:"normal",fontStyle:"normal",textDecoration:"underline"},quote:{fontSize:"16px",fontWeight:"normal",fontStyle:"italic"},"link-plugin":{fontSize:"14px",fontStyle:"normal",color:"rgb(113, 89, 215)",textDecoration:"underline",cursor:"pointer"},p:{fontSize:"14px",fontStyle:"normal",fontWeight:"normal"},imageTitle:{color:"rgb(0, 0, 0)",fontFamily:"Droid Sans",fontSize:"15px",fontStyle:"",fontWeight:"400",letterSpacing:"normal",lineHeight:"1.4",marginBottom:"3px",marginTop:"0",textDecoration:"",textTransform:"none"},imageCaption:{color:"rgb(153, 153, 153)",fontFamily:"Droid Sans",fontSize:"13.5px",lineHeight:"1.5"},"button-plugin":{buttonPrimary:{fontSize:"13px",color:"rgb(255, 255, 255)",paddingTop:"10px",paddingRight:"20px",paddingBottom:"10px",paddingLeft:"20px",fontFamily:"inherit",fontStyle:"",fontWeight:400,textTransform:"none",hover:{color:"rgb(255, 255, 255)",borderColor:"rgb(50, 0, 236)",backgroundColor:"rgb(61, 7, 255)"},lineHeight:"1.3",borderColor:"rgb(102, 60, 255)",borderWidth:"2px",borderRadius:"5px",backgroundColor:"rgb(130, 95, 255)"},buttonSecondary:{fontSize:"13px",color:"rgb(102, 102, 102)",paddingTop:"10px",paddingRight:"20px",paddingBottom:"10px",paddingLeft:"20px",fontFamily:"inherit",fontStyle:"",fontWeight:400,textTransform:"none",hover:{color:"rgb(76, 76, 76)",borderColor:"rgb(155, 155, 155)",backgroundColor:"rgb(172, 172, 172)"},lineHeight:"1.3",borderColor:"rgb(207, 207, 207)",borderWidth:"2px",borderRadius:"5px",backgroundColor:"rgb(230, 230, 230)"},buttonTertiary:{fontSize:"13px",color:"rgb(102, 60, 255)",paddingTop:"10px",paddingRight:"20px",paddingBottom:"10px",paddingLeft:"20px",fontFamily:"inherit",fontStyle:"",fontWeight:400,textTransform:"none",hover:{color:"rgb(53, 0, 244)",borderColor:"rgb(61, 7, 255)",backgroundColor:"rgb(255, 255, 255)"},lineHeight:"1.3",borderColor:"rgb(130, 95, 255)",borderWidth:"2px",borderRadius:"5px",backgroundColor:"rgb(255, 255, 255)"}}},Rs=e=>T.createPlugins(e.plugins,{components:e.elements}),L3=(e,l)=>({plugins:Rs(l),toolbar:s=>l.hasToolbar?t.jsx(ho,{toolbarButtons:l.buttons,editorId:e,toolbarWidth:s}):null,inline:()=>t.jsx(t.Fragment,{children:l.inline.map((s,o)=>t.jsx(s,{},o))}),styles:()=>l.getStyles});class s0{constructor(l,s){E(this,"id");E(this,"button");E(this,"markupElement");E(this,"markupInputElement");E(this,"leafMarkupElements");E(this,"showIn");E(this,"props");E(this,"textStyles");E(this,"styles");this.id=(s==null?void 0:s.id)||l,this.button=s==null?void 0:s.button,this.markupElement=s==null?void 0:s.markupElement,this.markupInputElement=s==null?void 0:s.markupInputElement,this.leafMarkupElements=s==null?void 0:s.leafMarkupElements,this.showIn=(s==null?void 0:s.showIn)??[v0.BOTTOM,v0.TOP,v0.FLOATING],this.props=s}inline(){}}const C0=({icon:e})=>t.jsx("span",{className:"tw-p-2 tw-h-8 tw-justify-center tw-items-center tw-flex",children:e}),j0=({children:e,id:l})=>t.jsx("div",{"data-plugin-id":l,children:e}),D0={left:"tw-text-left",right:"tw-text-right",center:"tw-text-center",justify:"tw-text-justify"},f3={left:"tw-justify-start tw-text-left",center:"tw-justify-center tw-text-center",justify:"tw-text-justify",right:"tw-justify-end tw-text-right"},ys="button",BG=v2.Provider,DG=v2.Root,OG=v2.Trigger,ZG=v2.Portal,_G=v2.Content;function qG(e){const l=a.forwardRef(({tooltip:s,...o},i)=>{const r=t.jsx(e,{ref:i,...o});return s?t.jsx(BG,{children:t.jsxs(DG,{delayDuration:300,children:[t.jsx(OG,{asChild:!0,children:r}),t.jsx(ZG,{children:t.jsx(_G,{style:{zIndex:y2.toolbarTooltip},className:"tw-bg-text tw-border tw-border-line-strong tw-text-box-neutral-strong-inverse tw-py-2 tw-px-3 tw-rounded tw-shadow-lg tw-text-xs",children:s})})]})}):r});return l.displayName="WrappedComponent",l}const bs=a.forwardRef(({isDropdown:e,children:l,pressed:s,...o},i)=>typeof s=="boolean"?t.jsx(Z2.ToolbarToggleGroup,{className:"tw-flex tw-items-center",type:"single",value:"single",disabled:o.disabled,children:t.jsx(Z2.ToggleItem,{ref:i,"data-testid":"ToolbarButton",className:f(["!tw-w-6 !tw-h-6 !tw-items-center !tw-px-2 tw-ml-0.5 !tw-text-text-weak !tw-rounded-md !tw-flex !tw-justify-center disabled:!tw-cursor-not-allowed disabled:!tw-opacity-50 disabled:!tw-pointer-events-auto",s&&!o.disabled?"!tw-bg-box-selected":"",o.disabled?"":"hover:!tw-bg-box-selected hover:!tw-text-box-selected-inverse"]),value:s?"single":"",...o,tabIndex:0,children:e?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"tw-flex tw-flex-1",children:l}),t.jsx("div",{className:"tw-w-4 tw-ml-0.5",children:t.jsx(Fe,{})})]}):l})}):t.jsx("div",{className:"tw-flex tw-items-center",children:t.jsx(Z2.Button,{ref:i,"data-testid":"ToolbarButton",className:f(["!tw-w-6 !tw-h-6 !tw-items-center !tw-px-2 tw-ml-0.5 !tw-text-text-weak !tw-rounded-md !tw-flex !tw-justify-center disabled:!tw-cursor-not-allowed disabled:!tw-opacity-50 disabled:!tw-pointer-events-auto",s&&!o.disabled?"!tw-bg-box-selected":"",o.disabled?"":"hover:!tw-bg-box-selected hover:!tw-text-box-selected-inverse"]),...o,tabIndex:0,children:l})}));bs.displayName="ToolbarButtonComponent";const U0=qG(bs);U0.displayName="ToolbarButton";function UG(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconListCheck16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.254 2.546a.5.5 0 0 1 0 .708l-2.8 2.8-.354.353-.354-.353-1.4-1.4a.5.5 0 0 1 .707-.707L3.1 4.993l2.447-2.447a.5.5 0 0 1 .707 0M4.5 9h-2a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5h2a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5m-2-1A1.5 1.5 0 0 0 1 9.5v2A1.5 1.5 0 0 0 2.5 13h2A1.5 1.5 0 0 0 6 11.5v-2A1.5 1.5 0 0 0 4.5 8zm12.508-4.5a.5.5 0 0 1-.5.5H8.38a.5.5 0 0 1 0-1h6.128a.5.5 0 0 1 .5.5m-1.414 3a.5.5 0 0 1-.5.5H8.38a.5.5 0 1 1 0-1h4.714a.5.5 0 0 1 .5.5m.914 3.5a.5.5 0 1 0 0-1H8.38a.5.5 0 0 0 0 1zm-.914 2.5a.5.5 0 0 1-.5.5H8.38a.5.5 0 0 1 0-1h4.714a.5.5 0 0 1 .5.5",clipRule:"evenodd"})})}const x3=a.memo(UG),Hs="checkbox-list-plugin",E0="checkbox-item",WG=({id:e,type:l=E0})=>{var r,c,d;const s=T.useEditorState(T.useEventPlateId(e)),o=((r=s==null?void 0:s.selection)==null?void 0:r.focus.path)&&O.getNode(s,(d=(c=s==null?void 0:s.selection)==null?void 0:c.focus)==null?void 0:d.path),i=!!(s!=null&&s.selection)&&O.someNode(s,{match:{type:l}});return t.jsx(U0,{pressed:i,onPointerDown:u=>{u.preventDefault(),u.stopPropagation(),GG(s,{type:l,isActive:i,node:o}),J1.focusEditor(s)},children:t.jsx(C0,{icon:t.jsx(x3,{})})})},GG=(e,{type:l,isActive:s,node:o})=>O.withoutNormalizing(e,()=>{var i,r;if(e!=null&&e.selection){if(s||X.unwrapList(e,{}),T.toggleNodeType(e,{activeType:l}),!(o!=null&&o.textStyle)){const c=O.getParentNode(e,(r=(i=e==null?void 0:e.selection)==null?void 0:i.focus)==null?void 0:r.path),d=c&&c[0].type;O.setElements(e,{textStyle:d})}s&&O.setElements(e,{type:(o==null?void 0:o.textStyle)??f1.ELEMENT_PARAGRAPH})}}),KG=({id:e})=>t.jsx(j0,{id:e,children:t.jsx(WG,{id:e})});class o0{constructor(l,s){this.id=l,this.node=s}getId(){return this.id}getNode(){return this.node}}const QG=(e,l)=>e[l.children[0].textStyle],ks="tw-flex tw-flex-row tw-pb-2 tw-gap-1.5 tw-items-start",v3="focus:tw-outline-none tw-w-auto tw-min-w-[10px]",Ts=e=>{const{attributes:l,children:s,nodeProps:o,element:i,editor:r,style:c}=e,d=i.checked,u=i.align??"left",{styles:h}=k1(),m=a.useId();return t.jsxs("div",{...l,style:c,className:f([ks,f3[u]]),children:[t.jsx("div",{contentEditable:!1,className:"tw-flex tw-items-center tw-justify-center tw-select-none tw-h-[1lh]",children:t.jsx("input",{"aria-labelledby":m,"data-test-id":"checkbox-input",className:"tw-w-4 tw-h-4 tw-m-0",type:"checkbox",checked:!!d,onChange:w=>{const L=J1.findNodePath(r,i);O.setNodes(r,{checked:w.target.checked},{at:L})},...o})}),t.jsx("span",{id:m,style:QG(h,i),className:f([v3,d&&"!tw-line-through"]),children:s})]})};class Vs extends o0{constructor(l=E0,s=Ts){super(l,s)}}const Fs=T.createPluginFactory({key:E0,isElement:!0});class $s extends s0{constructor(l){super(Hs,{button:KG,markupElement:new Vs,...l})}plugins(){return[Fs(),ZO.createIndentPlugin({inject:{props:{validTypes:[E0]}}})]}}const XG="align-plugin";class O5 extends s0{constructor({validTypes:s=[],...o}={}){super(XG,{...o});E(this,"validTypes",[]);this.validTypes=s}plugins(){return[D2.createAlignPlugin({inject:{props:{validTypes:[...this.validTypes,f1.ELEMENT_PARAGRAPH,X.ELEMENT_LIC,E0]}}})]}}const b2=a.forwardRef(({value:e,editorId:l,...s},o)=>{const i=T.useEditorState(T.useEventPlateId(l)),r=T.useEditorSelector(c=>{const d=O.findNode(c,{match:u=>Re.isDefined(u[D2.KEY_ALIGN])});if(d&&d.length>0){const u=d[0][D2.KEY_ALIGN];if(u==="right")return"right";if(u==="center")return"center";if(u==="justify")return"justify"}return"left"},[]);return t.jsx(U0,{pressed:r===e,onMouseDown:c=>c.preventDefault(),onClick:()=>D2.setAlign(i,{value:e}),ref:o,...s})});b2.displayName="AlignmentToolbarButton";function YG(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextAlignmentCentre16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.5 4a.5.5 0 0 0 0-1h-11a.5.5 0 0 0 0 1zm-1 3a.5.5 0 0 0 0-1H4a.5.5 0 0 0 0 1zm.5 5.5a.5.5 0 0 1-.5.5H4a.5.5 0 0 1 0-1h8.5a.5.5 0 0 1 .5.5m.5-2.5a.5.5 0 0 0 0-1h-11a.5.5 0 0 0 0 1z",clipRule:"evenodd"})})}const g3=a.memo(YG),JG=({id:e,editorId:l})=>t.jsx(j0,{id:e,children:t.jsx(b2,{editorId:l,value:"center",tooltip:p0("Align center"),children:t.jsx(C0,{icon:t.jsx(g3,{})})})});class EG extends o0{constructor(l="align-center"){super(l)}}class Ps extends O5{constructor(l){super({button:JG,markupElement:new EG,...l})}}function eK(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextAlignmentLeft16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.5 4a.5.5 0 0 1 0-1h11a.5.5 0 0 1 0 1zm0 3a.5.5 0 0 1 0-1H11a.5.5 0 0 1 0 1zM2 12.5a.5.5 0 0 0 .5.5H11a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5m.5-2.5a.5.5 0 0 1 0-1h11a.5.5 0 0 1 0 1z",clipRule:"evenodd"})})}const C3=a.memo(eK),tK=({id:e,editorId:l})=>t.jsx(j0,{id:e,children:t.jsx(b2,{editorId:l,value:"left",tooltip:p0("Align left"),children:t.jsx(C0,{icon:t.jsx(C3,{})})})});class lK extends o0{constructor(l="align-left"){super(l)}}class Bs extends O5{constructor(l){super({button:tK,markupElement:new lK,...l})}}function aK(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextAlignmentJustify16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.5 4a.5.5 0 0 0 0-1h-11a.5.5 0 0 0 0 1zm0 3a.5.5 0 0 0 0-1h-11a.5.5 0 0 0 0 1zm.5 5.5a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1 0-1h11a.5.5 0 0 1 .5.5m-.5-2.5a.5.5 0 0 0 0-1h-11a.5.5 0 0 0 0 1z",clipRule:"evenodd"})})}const j3=a.memo(aK),nK=({id:e,editorId:l})=>t.jsx(j0,{id:e,children:t.jsx(b2,{editorId:l,value:"justify",tooltip:p0("Justify"),children:t.jsx(C0,{icon:t.jsx(j3,{})})})});class sK extends o0{constructor(l="align-justify"){super(l)}}class Ds extends O5{constructor(l){super({button:nK,markupElement:new sK,...l})}}function oK(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextAlignmentRight16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.5 4a.5.5 0 0 0 0-1h-11a.5.5 0 0 0 0 1zm0 3a.5.5 0 0 0 0-1H5a.5.5 0 0 0 0 1zm.5 5.5a.5.5 0 0 1-.5.5H5a.5.5 0 0 1 0-1h8.5a.5.5 0 0 1 .5.5m-.5-2.5a.5.5 0 0 0 0-1h-11a.5.5 0 0 0 0 1z",clipRule:"evenodd"})})}const I3=a.memo(oK),iK=({id:e,editorId:l})=>t.jsx(j0,{id:e,children:t.jsx(b2,{editorId:l,value:"right",tooltip:p0("Align right"),children:t.jsx(C0,{icon:t.jsx(I3,{})})})});class rK extends o0{constructor(l="align-right"){super(l)}}class Os extends O5{constructor(l){super({button:iK,markupElement:new rK,...l})}}function cK({control:e,isOpen:l,setIsOpen:s,children:o}){return t.jsxs(c1.Root,{open:l,onOpenChange:s,children:[t.jsx(c1.Trigger,{asChild:!0,children:e}),t.jsx(c1.Portal,{children:t.jsx(c1.Content,{style:{zIndex:y2.emojiPopover},children:o})})]})}const Zs=()=>{const e=T.useEditorRef(),{options:{createEmoji:l,emojiTriggeringController:s}}=T.getPlugin(e,s1.KEY_EMOJI),{emojiPickerState:o}=s1.useEmojiDropdownMenuState();return{selectEmojiFromDropdown:c=>{O.withoutNormalizing(e,()=>{J1.focusEditor(e);const d=l({key:c.id,text:c.name,data:{id:c.id,emoji:c.skins[0].native,name:c.name,text:c.name}});o.emojiLibrary.updateFrequentCategory(c.id),O.insertText(e,d)})},selectEmojiFromCombobox:c=>{O.withoutNormalizing(e,()=>{O.withoutMergingHistory(e,()=>O.deleteText(e,{distance:s.setIsTriggering(!1).getTextSize(),reverse:!0}));const d=l(c);O.insertText(e,d),o.emojiLibrary.updateFrequentCategory(c.key)})}}};function dK(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconFaceHappy16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0m1 0A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-9.275-.7a.875.875 0 1 0 0-1.75.875.875 0 0 0 0 1.75m5.425-.875a.875.875 0 1 1-1.75 0 .875.875 0 0 1 1.75 0M4.82 9.534a.5.5 0 0 1 .646.281l.002.005.016.035q.024.053.083.15c.08.13.21.308.4.487.374.35 1.004.722 2.034.722s1.66-.373 2.034-.722a2.4 2.4 0 0 0 .483-.637l.016-.035.002-.005a.5.5 0 0 1 .931.366l-.466-.18.466.18v.001l-.001.002-.001.003-.004.008-.01.023q-.012.03-.034.074-.043.092-.13.238a3.4 3.4 0 0 1-.57.692c-.543.508-1.412.992-2.716.992s-2.173-.484-2.716-.992a3.4 3.4 0 0 1-.57-.692 3 3 0 0 1-.165-.312l-.01-.023-.003-.008-.001-.003v-.002L5 10l-.466.181a.5.5 0 0 1 .285-.647",clipRule:"evenodd"})})}const N3=a.memo(dK),uK={activity:{outline:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t.jsx("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:{outline:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:t.jsx("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:t.jsx("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})})},flags:{outline:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t.jsx("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t.jsx("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[t.jsx("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),t.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t.jsx("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[t.jsx("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),t.jsx("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:t.jsx("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[t.jsx("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),t.jsx("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:t.jsx("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[t.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),t.jsx("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t.jsx("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[t.jsx("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),t.jsx("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t.jsx("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t.jsx("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},hK={loupe:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:t.jsx("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:t.jsx("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})},_s=({index:e,emoji:l,onSelect:s,onMouseOver:o})=>{var i,r;return t.jsxs("button",{type:"button","aria-label":(i=l==null?void 0:l.skins[0])==null?void 0:i.native,tabIndex:-1,"data-index":e,onClick:()=>s(l),onMouseEnter:()=>o(l),onMouseLeave:()=>o(),className:"tw-group/emojibutton tw-relative tw-flex tw-h-9 tw-w-9 tw-cursor-pointer tw-items-center tw-justify-center tw-border-none tw-bg-transparent tw-text-2xl tw-leading-none",children:[t.jsx("div",{"aria-hidden":"true",className:"tw-absolute tw-inset-0 tw-rounded-full tw-bg-[rgba(0,0,0,0.05)] tw-opacity-0 group-hover/emojibutton:tw-opacity-100"}),t.jsx("span",{"data-emoji-set":"native",className:"tw-relative",children:(r=l==null?void 0:l.skins[0])==null?void 0:r.native})]})},mK=({row:e,emojiLibrary:l,onSelectEmoji:s,onMouseOver:o})=>t.jsx("div",{"data-index":e.id,className:"tw-flex",children:e.elements.map((i,r)=>t.jsx(_s,{index:r,emoji:l.getEmoji(i),onSelect:s,onMouseOver:o},i))},e.id);function wK({i18n:e,onSelectEmoji:l,onMouseOver:s,emojiLibrary:o,isSearching:i=!1,searchResult:r,visibleCategories:c,refs:d,settings:u=s1.EmojiSettings}){const h=u.perLine.value*u.buttonSize.value,m=a.useCallback(x=>c.has(x)?c.get(x):!1,[c]),w=a.useCallback(()=>o.getGrid().sections().map(({id:x})=>{const v=o.getGrid().section(x),{buttonSize:C}=u;return t.jsxs("div",{"data-id":x,ref:v.root,style:{width:h},children:[t.jsx("div",{className:"tw-sticky tw--top-px tw-z-[1] tw-bg-white/90 tw-p-1 tw-backdrop-blur-sm",children:e.categories[x]}),t.jsx("div",{className:"tw-relative tw-flex tw-flex-wrap",style:{height:v.getRows().length*C.value},children:m(x)?v.getRows().map((j,g)=>t.jsx(mK,{emojiLibrary:o,row:j,onSelectEmoji:l,onMouseOver:s},g)):null})]},x)}),[o,h,e.categories,m,l,s,u]),L=a.useCallback(()=>t.jsxs("div",{"data-id":"search",style:{width:h},children:[t.jsx("div",{className:"tw-sticky tw--top-px tw-z-[1] tw-bg-white/90 tw-p-1 tw-backdrop-blur-sm",children:e.searchResult}),t.jsx("div",{className:"tw-relative tw-flex tw-flex-wrap",children:r.map((x,v)=>t.jsx(_s,{index:v,emoji:o.getEmoji(x.id),onSelect:l,onMouseOver:s},x.id))})]}),[o,h,e.searchResult,r,l,s]);return t.jsx("div",{className:"tw-h-full tw-min-h-[50%] tw-overflow-y-auto tw-overflow-x-hidden tw-px-3 [&::-webkit-scrollbar]:tw-w-4 [&::-webkit-scrollbar-button]:tw-hidden [&::-webkit-scrollbar-button]:tw-h-0 [&::-webkit-scrollbar-button]:tw-w-0 [&::-webkit-scrollbar-thumb]:hover:tw-bg-[#f3f4f6] [&::-webkit-scrollbar-thumb]:tw-min-h-[65px] [&::-webkit-scrollbar-thumb]:tw-rounded-2xl [&::-webkit-scrollbar-thumb]:tw-border-solid [&::-webkit-scrollbar-thumb]:tw-border-4 [&::-webkit-scrollbar-thumb]:tw-border-white [&::-webkit-scrollbar-track]:tw-border-0","data-id":"scroll",ref:d.current.contentRoot,children:t.jsx("div",{ref:d.current.content,className:"tw-h-full",children:i?L():w()})})}const LK=(e,l)=>{let s=0,o=0;return l&&(s=100/e.getGrid().size,o=l?e.indexOf(l)*100:0),{width:s,position:o}};function fK({i18n:e,icons:l,emojiLibrary:s,focusedCategory:o,onClick:i}){const{width:r,position:c}=LK(s,o);return t.jsx("nav",{id:"emoji-nav",className:"tw-mb-2.5 tw-border-0 tw-border-b tw-border-solid tw-border-b-[rgb(243,244,246)] tw-p-3",children:t.jsxs("div",{className:"tw-relative tw-flex",children:[s.getGrid().sections().map(({id:d})=>t.jsx("button",{"aria-label":e.categories[d],title:e.categories[d],type:"button",className:f(["tw-flex tw-grow tw-cursor-pointer tw-items-center tw-justify-center tw-border-none tw-bg-transparent tw-fill-current tw-text-sm ",d===o?"tw-pointer-events-none tw-fill-current tw-text-[rgb(37,99,235)]":"tw-text-[rgb(107,114,128)] hover:tw-text-[rgb(31,41,55)]"]),onClick:()=>i(d),children:t.jsx("span",{style:{width:"20px",height:"20px"},children:l.categories[d].outline})},d)),t.jsx("div",{className:"tw-absolute tw--bottom-3 tw-left-0 tw-h-[3px] tw-w-full tw-rounded-t tw-bg-[rgb(37,99,235)] tw-opacity-100 tw-transition-transform tw-duration-200",style:{visibility:o?"visible":"hidden",width:`${r}%`,transform:`translateX(${c}%)`}})]})})}function xK({emoji:e}){return t.jsxs("div",{className:"tw-flex tw-items-center tw-border-t tw-border-t-[rgb(243,244,246)] tw-p-2",children:[t.jsx("div",{className:"tw-flex tw-items-center tw-justify-center tw-text-3xl",children:e==null?void 0:e.skins[0].native}),t.jsxs("div",{className:"tw-overflow-hidden tw-pl-2",children:[t.jsx("div",{className:"tw-truncate tw-text-sm tw-text-[rgb(75,85,99)]",children:e==null?void 0:e.name}),t.jsx("div",{className:"tw-truncate tw-text-xs tw-text-[rgb(156,163,175)]",children:`:${e==null?void 0:e.id}:`})]})]})}function vK({i18n:e}){return t.jsxs("div",{className:"tw-flex tw-items-center tw-border-t tw-border-t-[rgb(243,244,246)] tw-p-2",children:[t.jsx("div",{className:"tw-flex tw-items-center tw-justify-center tw-text-3xl",children:"😢"}),t.jsxs("div",{className:"tw-overflow-hidden tw-pl-2",children:[t.jsx("div",{className:"tw-truncate tw-text-sm tw-text-[rgb(75,85,99)]",children:e.searchNoResultsTitle}),t.jsx("div",{className:"tw-truncate tw-text-xs tw-text-[rgb(156,163,175)]",children:e.searchNoResultsSubtitle})]})]})}function gK({i18n:e}){return t.jsxs("div",{className:"tw-flex tw-items-center tw-border-t tw-border-t-[rgb(243,244,246)] tw-p-2",children:[t.jsx("div",{className:"tw-flex tw-items-center tw-justify-center tw-text-3xl",children:"☝️"}),t.jsx("div",{className:"tw-overflow-hidden tw-pl-2",children:t.jsx("div",{className:"tw-truncate tw-text-lg tw-text-[rgb(156,163,175)]",children:e.pick})})]})}function CK({emoji:e,hasFound:l=!0,isSearching:s=!1,i18n:o,...i}){const r=!e&&!(s&&!l),c=s&&!l,d=e;return t.jsxs(t.Fragment,{children:[d&&t.jsx(xK,{emoji:e,...i}),r&&t.jsx(gK,{i18n:o,...i}),c&&t.jsx(vK,{i18n:o,...i})]})}function jK({i18n:e,searchValue:l,clearSearch:s}){return t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"tw-absolute tw-left-2 tw-top-1/2 tw-flex tw-h-4 tw-w-4 tw--translate-y-1/2",children:t.jsx(pt,{})}),l&&t.jsx("button",{title:e.clear,"aria-label":"Clear",type:"button",className:"tw-absolute tw-right-1.5 tw-top-1/2 tw-flex tw-h-5 tw-w-5 tw--translate-y-1/2 tw-cursor-pointer tw-border-none tw-bg-transparent",onClick:s,children:t.jsx(it,{})})]})}function IK({i18n:e,searchValue:l,setSearch:s,children:o}){return t.jsx("div",{className:"tw-flex tw-items-center tw-px-2",children:t.jsxs("div",{className:"tw-relative tw-flex tw-grow",children:[t.jsx("input",{type:"text",placeholder:e.search,autoComplete:"off","aria-label":"Search",className:"tw-block tw-w-full tw-leading-4 tw-appearance-none tw-rounded-lg tw-border-0 tw-bg-[rgb(243,244,246)] tw-px-8 tw-py-2 tw-outline-none",onChange:i=>s(i.target.value),value:l}),o]})})}function NK({settings:e=s1.EmojiSettings,i18n:l,searchValue:s,setSearch:o,clearSearch:i,isSearching:r,hasFound:c,searchResult:d,emoji:u,onSelectEmoji:h,onMouseOver:m,emojiLibrary:w,handleCategoryClick:L,focusedCategory:x,visibleCategories:v,refs:C}){return t.jsxs("div",{className:"tw-flex tw-flex-col tw-rounded tw-bg-base tw-shadow-md tw-h-[350px] tw-border-line tw-border tw-w-[316px]",children:[t.jsx(fK,{i18n:l,emojiLibrary:w,icons:{categories:uK,search:hK},focusedCategory:x,onClick:L}),t.jsx(IK,{i18n:l,setSearch:o,searchValue:s,children:t.jsx(jK,{i18n:l,clearSearch:i,searchValue:s})}),t.jsx(wK,{i18n:l,emojiLibrary:w,isSearching:r,searchResult:d,visibleCategories:v,settings:e,onSelectEmoji:h,onMouseOver:m,refs:C}),t.jsx(CK,{i18n:l,emoji:u,hasFound:c,isSearching:r})]})}const zK=({id:e})=>{const{isOpen:l,setIsOpen:s,emojiPickerState:o}=s1.useEmojiDropdownMenuState(),{selectEmojiFromDropdown:i}=Zs();return t.jsx(j0,{id:e,children:t.jsx(cK,{isOpen:l,setIsOpen:s,control:t.jsx(U0,{pressed:l,children:t.jsx(C0,{icon:t.jsx(N3,{})})}),children:t.jsx(NK,{isOpen:l,setIsOpen:s,...o,onSelectEmoji:i})})})},pK=({item:e})=>{const{data:{id:l,emoji:s}}=e;return t.jsxs("div",{className:"tw-whitespace-nowrap tw-overflow-hidden tw-text-ellipsis",children:[s," :",l,":"]})},qs=a.forwardRef(({combobox:e,index:l,item:s,onRenderItem:o,className:i,...r},c)=>{const{props:d}=$0.useComboboxItem({item:s,index:l,combobox:e,onRenderItem:o});return t.jsx("div",{ref:c,className:f(["tw-relative tw-flex tw-h-9 tw-cursor-pointer tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none tw-transition-colors","tw-text-text-weak tw-text-body-medium tw-px-5 hover:tw-bg-box-neutral hover:tw-text-box-neutral-inverse-hover data-[highlighted=true]:tw-text-box-neutral-inverse-hover data-[highlighted=true]:tw-bg-box-neutral data-[highlighted=true]:hover:tw-bg-box-neutral-hover",i]),...d,...r})});qs.displayName="ComboboxItem";function MK(e){const{component:l,items:s,portalElement:o,combobox:i,onRenderItem:r}=e,c=T.useEditorRef(),d=$0.useComboboxSelectors.filteredItems(),u=$0.useActiveComboboxStore(),h=$0.useComboboxContentState({items:s,combobox:i}),{menuProps:m,targetRange:w}=$0.useComboboxContent(h);return t.jsxs(c1.Root,{open:!0,children:[t.jsx(c1.PopoverAnchor,{virtualRef:T0.createVirtualRef(c,w??void 0)}),t.jsx(c1.Portal,{container:o,children:t.jsxs(c1.Content,{...m,sideOffset:5,style:{zIndex:y2.combobox},side:"bottom",align:"start",className:"tw-m-0 tw-max-h-[288px] tw-w-[270px] tw-overflow-scroll tw-rounded-md tw-bg-base tw-py-2 tw-shadow-md tw-border tw-border-line-strong",onOpenAutoFocus:L=>L.preventDefault(),children:[l?l({store:u}):null,d.map((L,x)=>t.jsx(qs,{item:L,combobox:i,index:x,onRenderItem:r},L.key))]})})]})}function Us({id:e,trigger:l,searchPattern:s,onSelectItem:o,controlled:i,maxSuggestions:r,filter:c,sort:d,disabled:u,...h}){var g,N,z;const m=$0.useComboboxSelectors.items(),w=u??(m.length===0&&!((g=h.items)!=null&&g.length)),L=(z=(N=T.useEventEditorSelectors).focus)==null?void 0:z.call(N),x=$0.useComboboxControls(),v=$0.useComboboxSelectors.activeId(),C=T.useEditorSelector(M=>!!M.selection,[]),j=T.usePlateSelectors().id();return a.useEffect(()=>{const{[e]:M,...S}=$0.comboboxSelectors.state().byId;$0.comboboxActions.byId(S),$0.comboboxActions.setComboboxById({id:e,trigger:l,searchPattern:s,controlled:i,onSelectItem:o,maxSuggestions:r,filter:c,sort:d})},[e,l,s,i,o,r,c,d]),!x||!C||L!==j||v!==e||w?null:t.jsx(MK,{combobox:x,...h})}function SK({pluginKey:e=s1.KEY_EMOJI,id:l=e,...s}){const{trigger:o}=s1.useEmojiComboboxState({pluginKey:e}),{selectEmojiFromCombobox:i}=Zs();return t.jsx(Us,{id:l,trigger:o,controlled:!0,onSelectItem:(r,c)=>i(c),onRenderItem:pK,...s})}const AK={renderAfterEditable:SK,key:s1.KEY_EMOJI},RK="emoji-plugin";class Ws extends s0{constructor(l){super(RK,{button:zK,showIn:[v0.BOTTOM,v0.TOP],...l})}plugins(){return[$0.createComboboxPlugin(),s1.createEmojiPlugin(AK)]}}const yK=e=>!!e.match(/^(https?:\/\/|mailto:|tel:).+/),Gs=(e,l)=>{const s=O.getAboveNode(e,{match:{type:a0.ELEMENT_LINK}});return Array.isArray(s)?l(s[0]):""},bK=e=>Gs(e,l=>{var s,o;return((o=(s=l.chosenLink)==null?void 0:s.searchResult)==null?void 0:o.link)||""}),HK=e=>Gs(e,l=>l.url||""),kK=e=>{var l,s;return e.url||((s=(l=e.chosenLink)==null?void 0:l.searchResult)==null?void 0:s.link)||""};function TK(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconPen16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m13.187 4.065-1.65-1.65-1.269 1.267 1.651 1.65zm-9.834 6.532 6.208-6.208 1.651 1.65-6.208 6.209-2.117.466zm2.152 2.565 8.39-8.39a1 1 0 0 0 0-1.414l-1.652-1.65a1 1 0 0 0-1.414 0l-8.39 8.389-.528 2.402a1 1 0 0 0 1.191 1.191zM10 13a.5.5 0 0 0 0 1h3.5a.5.5 0 1 0 0-1z",clipRule:"evenodd"})})}const z3=a.memo(TK),X1="link-plugin",VK=({editButtonProps:e,unlinkButtonProps:l})=>{const{element:s}=a0.useLinkOpenButtonState(),{styles:o}=k1(),i=s?kK(s):"";return t.jsx(e7,{"data-test-id":"floating-link-edit",padding:"16px",minWidth:"400px",children:t.jsxs("span",{"data-test-id":"preview-link-flyout",className:"tw-flex tw-justify-between",children:[t.jsx("span",{style:o[X1],className:"tw-pointer-events-none",children:i}),t.jsxs("span",{className:"tw-flex tw-gap-2",children:[t.jsx("button",{type:"button",tabIndex:0,"data-test-id":"edit-link-button",className:"tw-transition tw-cursor-pointer tw-rounded hover:tw-bg-black-10 tw-p-1",...e,children:t.jsx(z3,{})}),t.jsx("button",{type:"button",tabIndex:0,"data-test-id":"remove-link-button",className:"tw-transition tw-cursor-pointer tw-rounded hover:tw-bg-black-10 tw-p-1",...l,children:t.jsx(bt,{})})]})]})})},FK=({state:e,onTextChange:l,onUrlChange:s,onToggleTab:o,onCancel:i,onSave:r,isValidUrlOrEmpty:c,hasValues:d,testId:u,children:h})=>t.jsxs(e7,{"data-test-id":u,minWidth:"400px",padding:"28px",children:[t.jsx(l5,{label:{children:"Text",htmlFor:"linkText",required:!0},children:t.jsx(w1,{id:"linkText",value:e.text,placeholder:"Link Text",onChange:l})}),h,t.jsxs("div",{className:"tw-pt-5",children:[t.jsx(l5,{label:{children:"URL",htmlFor:"url",required:!0},children:t.jsx(w1,{id:"url",value:e.url,placeholder:"https://example.com",focusOnMount:!0,onChange:s})}),!c()&&t.jsx("div",{className:"tw-text-red-65 tw-mt-3",children:"Please enter a valid URL."})]}),t.jsx("div",{className:"tw-pt-5",children:t.jsx(b1,{value:"new-tab",label:"Open in new tab",state:e.newTab,onChange:o})}),t.jsx("div",{className:"tw-mt-3",children:t.jsxs("div",{className:"tw-pt-5 tw-flex tw-gap-x-3 tw-justify-end tw-border-t tw-border-t-black-10",children:[t.jsx(N0,{onClick:i,size:u0.Medium,style:l0.Default,emphasis:L0.Default,children:"Cancel"}),t.jsx(N0,{onClick:r,size:u0.Medium,icon:t.jsx(Oe,{}),disabled:!c()||!d,children:"Save"})]})})]}),$K={url:"",text:"",newTab:x0.Unchecked},PK=()=>{const[e,l]=a.useReducer((s,o)=>{const{type:i,payload:r}=o;switch(i){case"NEW_TAB":return{...s,newTab:x0.Checked};case"SAME_TAB":return{...s,newTab:x0.Unchecked};case"URL":case"TEXT":case"INIT":return{...s,...r};default:return s}},$K);return[e,l]},BK=()=>{const e=T.useEditorRef(),[l,s]=PK();a.useEffect(()=>{const m=bK(e),w=HK(e),L=a0.floatingLinkSelectors.newTab();s({type:"INIT",payload:{text:a0.floatingLinkSelectors.text(),newTab:L?x0.Checked:x0.Unchecked,url:m&&w===""?m:a0.floatingLinkSelectors.url()}})},[s,e]);const o=m=>{s({type:"TEXT",payload:{text:m}})},i=m=>{s({type:"URL",payload:{url:m}})},r=m=>{s(m?{type:"NEW_TAB"}:{type:"SAME_TAB"})},c=()=>{a0.floatingLinkActions.reset()},d=m=>{!h()||!u||(a0.floatingLinkActions.text(l.text),a0.floatingLinkActions.url(l.url),a0.floatingLinkActions.newTab(l.newTab===x0.Checked),a0.submitFloatingLink(e)&&(m==null||m.preventDefault()))},u=l.url!==""&&l.text!=="",h=()=>{const{isUrl:m}=T.getPluginOptions(e,a0.ELEMENT_LINK);return!l.url||m&&m(l.url)};return T.useHotkeys("enter",d,{enableOnFormTags:["INPUT"]},[]),{state:l,onTextChange:o,onUrlChange:i,onToggleTab:r,onCancel:c,onSave:d,hasValues:u,isValidUrlOrEmpty:h}},DK=()=>t.jsx(FK,{...BK(),testId:"floating-link-insert"}),t4={placement:"bottom-start",strategy:"absolute",middleware:[T0.offset(12),T0.flip({padding:12,fallbackPlacements:["bottom-end","top-start","top-end"]})]},OK=()=>{const e=a0.useFloatingLinkInsertState({floatingOptions:t4}),{props:l,ref:s,hidden:o}=a0.useFloatingLinkInsert(e),i=a0.useFloatingLinkEditState({floatingOptions:t4}),{props:r,ref:c,editButtonProps:d,unlinkButtonProps:u}=a0.useFloatingLinkEdit(i);if(o)return null;const h=t.jsx(DK,{}),m=i.isEditing?h:t.jsx(VK,{editButtonProps:d,unlinkButtonProps:u});return t.jsxs(t.Fragment,{children:[e.isOpen&&!i.isOpen&&_1.createPortal(t.jsx("div",{"data-is-underlay":!0,ref:s,...l,style:l.style,children:h}),document.body),i.isOpen&&_1.createPortal(t.jsx("div",{"data-is-underlay":!0,ref:c,...r,style:r.style,children:m}),document.body)]})};function ZK(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconLink16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 8a3 3 0 0 1 3-3h2a.5.5 0 0 1 0 1H4a2 2 0 1 0 0 4h2a.5.5 0 0 1 0 1H4a3 3 0 0 1-3-3m14 0a3 3 0 0 1-3 3h-2a.5.5 0 0 1 0-1h2a2 2 0 1 0 0-4h-2a.5.5 0 0 1 0-1h2a3 3 0 0 1 3 3m-9.125-.5a.5.5 0 0 0 0 1h4.25a.5.5 0 0 0 0-1z",clipRule:"evenodd"})})}const p3=a.memo(ZK),Ks=a.forwardRef((e,l)=>{const s=T.useEditorRef(),o=a0.useLinkToolbarButtonState(),{props:i}=a0.useLinkToolbarButton(o);return t.jsx(U0,{onMouseDown:r=>{r.preventDefault(),J1.focusEditor(s,s.selection??s.prevSelection??void 0)},ref:l,...i,...e,children:t.jsx(C0,{icon:t.jsx(p3,{})})})});Ks.displayName="LinkToolbarButton";const _K=({id:e,editorId:l})=>{const s=T.useEditorState(T.useEventPlateId(l)),o=!!o1.isRangeInSameBlock(s,{at:s.selection});return t.jsx(j0,{id:e,children:t.jsx(Ks,{disabled:!o,tooltip:p0(o?`Link
|
|
7
7
|
${H1("Ctrl+K")}`:"Links can only be set for a single text block.")})})},qK=e=>{var c,d;const{attributes:l,children:s}=e,{styles:o}=k1(),i=e.element.url||((d=(c=e.element.chosenLink)==null?void 0:c.searchResult)==null?void 0:d.link)||"",r=e.element.target||"_self";return t.jsx("a",{...l,href:i,target:r,style:o[X1],children:s})};class UK extends o0{constructor(l=a0.ELEMENT_LINK,s=qK){super(l,s)}}const WK=T.createPluginFactory({...a0.createLinkPlugin(),renderAfterEditable:OK,options:{isUrl:yK,rangeBeforeOptions:{matchString:" ",skipInvalid:!0,afterMatch:!0},triggerFloatingLinkHotkeys:"meta+k, ctrl+k",keepSelectedTextOnPaste:!0}});class Qs extends s0{constructor({styles:s=k0[X1],...o}={}){super(X1,{button:_K,markupElement:new UK,...o});E(this,"styles",{});this.styles=s}plugins(){return[WK()]}}const M3="tw-border-b tw-border-dashed tw-border-line-x-strong tw-pb-5",Xs=`${M3} tw-break-after-column tw-break-inside-avoid-column`,O0=e=>{const l=e.breakAfterColumn;return f([l==="active"&&Xs,l==="inactive"&&M3])},S3="tw-w-auto tw-min-w-[10px]",A3=(e,l=!0)=>f([l&&O0(e),e.align?f3[e.align]:"tw-justify-start",e.breakAfterColumn?"tw-grid":"tw-inline-grid","tw-grid-cols-[min-content_repeat(3,_auto)]"]),Ys=({attributes:e,children:l,element:s})=>t.jsx("p",{className:A3(s),...e,children:t.jsx("span",{className:S3,children:l})});class Js extends o0{constructor(l=X.ELEMENT_LIC,s=Ys){super(l,s)}}const d5="Mixed";var D=(e=>(e.heading1="heading1",e.heading2="heading2",e.heading3="heading3",e.heading4="heading4",e.custom1="custom1",e.custom2="custom2",e.custom3="custom3",e.quote="quote",e.imageCaption="imageCaption",e.imageTitle="imageTitle",e.p="p",e))(D||{});const Z5="list-plugin",GK=(e,{options:{validLiChildrenTypes:l,isSoftBreak:s}})=>{const{insertBreak:o,deleteBackward:i,deleteForward:r,deleteFragment:c}=e;return s?e.insertSoftBreak=()=>{X.insertBreakList(e)||o()}:e.insertBreak=()=>{X.insertBreakList(e)||o()},e.deleteBackward=d=>{X.deleteBackwardList(e,d)||i(d)},e.deleteForward=d=>{X.deleteForwardList(e,()=>{},d)||r(d)},e.deleteFragment=d=>{X.deleteFragmentList(e)||c(d)},e.insertFragment=X.insertFragmentList(e),e.normalizeNode=X.normalizeList(e,{validLiChildrenTypes:l}),e},L2="textStyle",Es=T.createPluginFactory({key:L2,isLeaf:!0});class R3 extends s0{constructor(s){super(Z5,{leafMarkupElements:[new Js,new w9],...s});E(this,"isSoftBreak");this.isSoftBreak=(s==null?void 0:s.isSoftBreak)??!1}plugins(){return[X.createListPlugin({withOverrides:GK,options:{isSoftBreak:this.isSoftBreak}}),Es()]}}const KK=e=>O.getAboveNode(e,{match:{type:X.ELEMENT_LI},mode:"lowest"})||O.someNode(e,{match:{type:E0},mode:"lowest"}),QK=({editor:e,type:l,children:s})=>{const o=e!=null&&e.selection?o1.getMark(e,L2)===l.id:O.someNode(e,{match:{type:l}});return t.jsx("button",{"data-test-id":"textstyle-option",type:"button",className:f(["tw-block tw-w-full tw-text-left tw-px-3 tw-py-2 tw-outline-none tw-cursor-pointer tw-truncate hover:tw-bg-box-neutral-hover hover:w-text-box-neutral-inverse-hover tw-max-h-20 tw-max-w-[15rem] tw-min-h-[2.25rem]",o?"tw-text-box-neutral-inverse tw-bg-box-neutral":"tw-text-text"]),onMouseDown:i=>{i.preventDefault(),i.stopPropagation(),!(!e||!e.selection)&&(o1.setMarks(e,{[L2]:l.id}),KK(e)||T.toggleNodeType(e,{activeType:l.id,inactiveType:l.id}))},children:s})},XK=({label:e,open:l,onClick:s},o)=>t.jsx("button",{ref:o,"data-test-id":"textstyle-dropdown-trigger",type:"button",className:"tw-cursor-pointer tw-h-8 tw-w-full",onClick:i=>{i.preventDefault(),i.stopPropagation(),s()},children:t.jsxs("div",{className:f(["tw-relative tw-inline-flex tw-flex-row tw-items-center tw-justify-between tw-overflow-hidden tw-text-text tw-rounded tw-gap-1 tw-px-2 hover:tw-text-box-selected-inverse hover:tw-bg-box-selected tw-h-6 tw-w-28",l&&"tw-text-box-selected-inverse tw-bg-box-selected"]),children:[t.jsx("span",{className:"tw-text-xs tw-truncate",children:e}),t.jsx("div",{className:f(["tw-transition-transform",l&&"tw-rotate-180"]),children:t.jsx(Ve,{})})]})}),YK=a.forwardRef(XK),JK=e=>{if(Array.isArray(e.children)){const l=e.children.find(s=>O.isText(s));return(l==null?void 0:l[L2])??""}return f1.ELEMENT_PARAGRAPH},EK=[X.ELEMENT_LI,X.ELEMENT_UL,X.ELEMENT_OL],eQ=e=>!e||!e.selection?[]:Array.from(O.getNodeEntries(e,{unhang:!0,at:e.selection,reverse:!0})).reduce((s,[o])=>{if(!O.isNode(o))return s;const i=o.type===X.ELEMENT_LIC||o.type===E0?JK(o):o.textStyle||o.type;return i&&!s.includes(i)&&!EK.includes(i)&&s.push(i),s},[]),tQ=6,lQ=10,aQ={name:"vertical-positioning",phase:"read",fn:({state:e,name:l})=>{if(e.modifiersData[l]._skip)return;const{position:s,maxHeight:o}=Pt(e.elements.reference,e.rects.popper.height,tQ+lQ,0);s==="top"&&(e.placement="top-start"),e.styles.popper={maxHeight:`${o}px`},e.reset=!0,e.modifiersData[l]._skip=!0},enabled:!0},nQ=e=>{const[l,s]=a.useState(!1),[o,i]=a.useState(null),[r,c]=a.useState(null),d=T.useEditorState(e),u=eQ(d);let h=d5;u.length===1?h=u[0]:u.length===0&&(h="p");const m=a.useCallback(()=>{s(L=>!L)},[s]),w=R1.usePopper(o,r,{placement:"bottom-start",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,6]}},{name:"flip",enabled:!1},aQ]});return a.useEffect(()=>{const L=x=>{if(l){const v=x.target;if(r&&r.contains(v)||o&&o.contains(v))return;s(!1)}};return document.addEventListener("pointerdown",L),()=>{document.removeEventListener("pointerdown",L)}},[l,r,s,o]),{state:{isOpen:l,toggle:m,editor:d},dropdownProps:{...w.attributes.popper,style:w.styles.popper},key:h,dropdownRef:c,triggerRef:i}},sQ=({editorId:e,textStyles:l=[]})=>{var w;const{state:{editor:s,toggle:o,isOpen:i},dropdownProps:r,triggerRef:c,dropdownRef:d,key:u}=nQ(e);let h=d5;const m=l.find(L=>{var x;return L.id===u&&((x=L.props)==null?void 0:x.label)});return m&&(h=((w=m.props)==null?void 0:w.label)||d5),t.jsxs(t.Fragment,{children:[t.jsx(YK,{label:h,open:i,onClick:o,ref:c}),i&&t.jsx("div",{style:{zIndex:y2.textStyleDropdown},className:"tw-divide-y tw-divide-line tw-bg-base tw-shadow-md tw-border tw-border-line tw-overflow-auto tw-min-h-[40px]",ref:d,...r,children:l.map(L=>{var x;return t.jsx(QK,{editor:s,type:L,children:t.jsx("span",{style:m1.omit(L.styles??{},["color","lineHeight","marginTop","marginBottom"]),children:(x=L.props)==null?void 0:x.label})},L.id)})})]})},oQ=({editorId:e,id:l,textStyles:s})=>t.jsx(j0,{id:l,children:t.jsx(sQ,{editorId:e,textStyles:s})}),iQ=(e,l)=>s=>t.jsx(e,{...s,textStyles:l}),e9="text-style-plugin";function rQ(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextColumnBreak16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 4a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1H8v9a1 1 0 0 1-1 1H5.5a.5.5 0 0 1 0-1H7zM1 5.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5M1.5 9a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1zM1 7.5a.5.5 0 0 1 .5-.5H3a.5.5 0 0 1 0 1H1.5a.5.5 0 0 1-.5-.5m.5 3.5a.5.5 0 0 0 0 1H3a.5.5 0 0 0 0-1zM11 5.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1zM11 7.5a.5.5 0 0 1 .5-.5H13a.5.5 0 0 1 0 1h-1.5a.5.5 0 0 1-.5-.5m.5 3.5a.5.5 0 0 0 0 1H13a.5.5 0 0 0 0-1z",clipRule:"evenodd"})})}const _5=a.memo(rQ),t9=e=>Array.from(O.getNodeEntries(e,{at:[],match:l=>!!l.breakAfterColumn})).length,f2=(e,{key:l=o2,value:s,at:o})=>{const i=r=>O.isBlock(e,r);s?O.setElements(e,{[l]:s},{mode:"lowest",match:i,at:o}):O.unsetNodes(e,l,{match:i,mode:"lowest",at:o})},cQ=(e,l,s)=>{f2(e,{at:l,value:s})},Le=(e,l)=>{const s=Array.from(O.getNodeEntries(e,{at:[],match:o=>!!o.breakAfterColumn}));for(const[o,[,i]]of s.entries())cQ(e,i,o<l-1?"active":"inactive")},l9=(e,l,s)=>{if(s.preventDefault(),s.stopPropagation(),!!(e!=null&&e.selection)&&O.someNode(e,{match:i=>!!i.breakAfterColumn}))f2(e,{value:void 0});else{const i=t9(e),r=Math.max(l-i-1,0);if(r===0)return;const c=Array.from(O.getNodeEntries(e,{at:e.selection,match:d=>O.isBlock(e,d),mode:"lowest"})).slice(-r);for(const d of c)f2(e,{value:"active",at:d[1]})}Le(e,l)},dQ=(e,{options:{hotkey:l}})=>s=>{var o;if(!s.defaultPrevented&&l&&T.isHotkey(l,s)){const i=e.plugins.find(c=>c.key===o2),r=((o=i==null?void 0:i.options)==null?void 0:o.columns)??1;l9(e,r,s)}},uQ=({id:e,...l})=>{var d,u;const s=T.useEditorState(T.useEventPlateId(e)),o=!!(s!=null&&s.selection)&&O.someNode(s,{match:h=>!!h.breakAfterColumn}),i=(u=(d=s==null?void 0:s.pluginsByKey.breakAfterColumn)==null?void 0:d.options)==null?void 0:u.columns,r=Number(i)||1,c=hQ(s,r,o);return t.jsx(U0,{disabled:!c,pressed:!o,tooltip:p0(c?`Column Break
|
|
8
8
|
Shift+Ctrl+Return`:"Already at maximum numbers of columns"),onPointerDown:h=>h.preventDefault(),onClick:h=>{l9(s,r,h)},...l,children:t.jsx(C0,{icon:t.jsx(_5,{})})})},hQ=(e,l,s)=>t9(e)+1<l||s,a9=({id:e})=>t.jsx(j0,{id:e,children:t.jsx(uQ,{children:t.jsx(C0,{icon:t.jsx(_5,{})})})}),mQ=(e,l)=>{const s=O.getStartPoint(e,l);setTimeout(()=>{O.select(e,{anchor:s,focus:s})})},wQ=e=>{var s;const l=e.plugins.find(o=>o.key===o2);return((s=l==null?void 0:l.options)==null?void 0:s.columns)??1},LQ=e=>{const{apply:l}=e,s=wQ(e);e.apply=o=>{switch(o.type){case"split_node":{o.properties={...o.properties,breakAfterColumn:void 0};break}case"merge_node":{const i=O.getPointBefore(e,o.path);if(!i)break;const r=O.getParentNode(e,i.path);if(f2(e,{at:i,value:void 0}),Le(e,s),r!=null&&r[0].breakAfterColumn)return mQ(e,o.path),e;break}}l(o)},setTimeout(()=>Le(e,s))},o2="breakAfterColumn",y3="normal";class fQ extends s0{constructor(s){super("break-after-plugin",{button:a9,...s});E(this,"columns");E(this,"gap");E(this,"customClass");this.columns=(s==null?void 0:s.columns)??1,this.gap=(s==null?void 0:s.gap)??y3,this.customClass=s==null?void 0:s.customClass}plugins(){return[n9(this.columns,this.gap,this.customClass)]}}const n9=(e,l,s)=>T.createPluginFactory({key:o2,handlers:{onKeyDown:dQ},useHooks:LQ,options:{columns:e,gap:l,customClass:s,hotkey:["shift+ctrl+enter"]}})(),xQ="textstyle-custom1-plugin";class vQ extends s0{constructor({styles:s=k0.custom1,...o}={}){super(D.custom1,{label:"Custom 1",markupElement:new gQ,...o});E(this,"styles",{});this.styles=s}plugins(){return[CQ(this.styles)]}}class gQ extends o0{constructor(l=xQ,s=s9){super(l,s)}}const s9=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("p",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},CQ=e=>T.createPluginFactory({key:D.custom1,isElement:!0,deserializeHtml:{rules:[{validClassName:D.custom1}]}})({component:l=>t.jsx(s9,{...l,styles:e})}),jQ="textstyle-custom2-plugin";class IQ extends s0{constructor({styles:s=k0.custom2,...o}={}){super(D.custom2,{label:"Custom 2",markupElement:new NQ,...o});E(this,"styles",{});this.styles=s}plugins(){return[zQ(this.styles)]}}class NQ extends o0{constructor(l=jQ,s=o9){super(l,s)}}const o9=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("p",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},zQ=e=>T.createPluginFactory({key:D.custom2,isElement:!0,deserializeHtml:{rules:[{validClassName:D.custom2}]}})({component:l=>t.jsx(o9,{...l,styles:e})}),pQ="textstyle-custom3-plugin";class MQ extends s0{constructor({styles:s=k0.custom3,...o}={}){super(D.custom3,{label:"Custom 3",markupElement:new SQ,...o});E(this,"styles",{});this.styles=s}plugins(){return[AQ(this.styles)]}}class SQ extends o0{constructor(l=pQ,s=i9){super(l,s)}}const i9=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("p",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},AQ=e=>T.createPluginFactory({key:D.custom3,isElement:!0,deserializeHtml:{rules:[{validClassName:D.custom3}]}})({component:l=>t.jsx(i9,{...l,styles:e})}),RQ="textstyle-heading1-plugin";class yQ extends s0{constructor({styles:s=k0.heading1,...o}={}){super(D.heading1,{label:"Heading 1",markupElement:new bQ,...o});E(this,"styles",{});this.styles=s}plugins(){return[HQ(this.styles)]}}class bQ extends o0{constructor(l=RQ,s=fe){super(l,s)}}const fe=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("h1",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},HQ=e=>T.createPluginFactory({key:D.heading1,isElement:!0,component:fe,deserializeHtml:{rules:[{validNodeName:["h1","H1"]}]}})({component:l=>t.jsx(fe,{...l,styles:e})}),kQ="textstyle-heading2-plugin";class TQ extends s0{constructor({styles:s=k0.heading2,...o}={}){super(D.heading2,{label:"Heading 2",markupElement:new VQ,...o});E(this,"styles",{});this.styles=s}plugins(){return[FQ(this.styles)]}}class VQ extends o0{constructor(l=kQ,s=xe){super(l,s)}}const xe=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("h2",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},FQ=e=>T.createPluginFactory({key:D.heading2,isElement:!0,component:xe,deserializeHtml:{rules:[{validNodeName:["h2","H2"]}]}})({component:l=>t.jsx(xe,{...l,styles:e})}),$Q="textstyle-heading3-plugin";class PQ extends s0{constructor({styles:s=k0.heading3,...o}={}){super(D.heading3,{label:"Heading 3",markupElement:new BQ,...o});E(this,"styles",{});this.styles=s}plugins(){return[DQ(this.styles)]}}class BQ extends o0{constructor(l=$Q,s=ve){super(l,s)}}const ve=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("h3",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},DQ=e=>T.createPluginFactory({key:D.heading3,isElement:!0,component:ve,deserializeHtml:{rules:[{validNodeName:["h3","H3"]}]}})({component:l=>t.jsx(ve,{...l,styles:e})}),OQ="textstyle-heading4-plugin";class ZQ extends s0{constructor({styles:s=k0.heading4,...o}={}){super(D.heading4,{label:"Heading 4",markupElement:new _Q,...o});E(this,"styles",{});this.styles=s}plugins(){return[qQ(this.styles)]}}class _Q extends o0{constructor(l=OQ,s=ge){super(l,s)}}const ge=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("h4",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},qQ=e=>T.createPluginFactory({key:D.heading4,isElement:!0,component:ge,deserializeHtml:{rules:[{validNodeName:["h4","H4"]}]}})({component:l=>t.jsx(ge,{...l,styles:e})}),UQ="textstyle-imageCaption-plugin";class WQ extends s0{constructor({styles:s=k0.imageCaption,...o}={}){super(D.imageCaption,{label:"Image Caption",markupElement:new GQ,...o});E(this,"styles",{});this.styles=s}plugins(){return[KQ(this.styles)]}}class GQ extends o0{constructor(l=UQ,s=Ce){super(l,s)}}const Ce=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("p",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},KQ=e=>T.createPluginFactory({key:D.imageCaption,isElement:!0,component:Ce,deserializeHtml:{rules:[{validClassName:D.imageCaption}]}})({component:l=>t.jsx(Ce,{...l,styles:e})}),QQ="textstyle-imageTitle-plugin";class XQ extends s0{constructor({styles:s=k0.imageTitle,...o}={}){super(D.imageTitle,{label:"Image Title",markupElement:new YQ,...o});E(this,"styles",{});this.styles=s}plugins(){return[JQ(this.styles)]}}class YQ extends o0{constructor(l=QQ,s=je){super(l,s)}}const je=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("p",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},JQ=e=>T.createPluginFactory({key:D.imageTitle,isElement:!0,component:je,deserializeHtml:{rules:[{validClassName:D.imageTitle}]}})({component:l=>t.jsx(je,{...l,styles:e})});class r9 extends s0{constructor({styles:s=k0.p,...o}={}){super(D.p,{markupElement:new d9,label:"Body Text",...o});E(this,"styles",{});this.styles=s}plugins(){return[EQ(this.styles)]}}const c9="tw-m-0 tw-px-0 tw-py-0",u5=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align,r=f([i&&D0[i],c9,O0(e)]);return t.jsx("p",{...l,className:r,style:o,children:s})};class d9 extends o0{constructor(l=D.p,s=u5){super(l,s)}}const EQ=e=>T.createPluginFactory({...f1.createParagraphPlugin(),key:D.p,isElement:!0,component:u5})({component:l=>t.jsx(u5,{...l,styles:e})}),eX="textstyle-quote-plugin";class tX extends s0{constructor({styles:s=k0.quote,...o}={}){super(D.quote,{label:"Quote",markupElement:new lX,...o});E(this,"styles",{});this.styles=s}plugins(){return[u9(this.styles)]}}class lX extends o0{constructor(l=eX,s=h5){super(l,s)}}const h5=({element:e,attributes:l,children:s,styles:o})=>{const i=e.align;return t.jsx("blockquote",{...l,className:f([i&&D0[i],O0(e)]),style:o,children:s})},u9=e=>T.createPluginFactory({key:D.quote,isElement:!0,component:h5,deserializeHtml:{rules:[{validNodeName:["blockquote","BLOCKQUOTE"]}]}})({component:l=>t.jsx(h5,{...l,styles:e})});class h9 extends s0{constructor({...s}){super(e9,{button:iQ(oQ,s.textStyles),...s});E(this,"textStyles");this.textStyles=s.textStyles}plugins(){return this.textStyles.map(s=>s.plugins()).flat()}}const b3="[&>p]:before:tw-flex [&>p]:before:tw-justify-end [&>p]:before:tw-w-[1.2em] !tw-no-underline !tw-list-item",m9=({attributes:e,children:l,element:s})=>{const{styles:o}=k1();return t.jsx("li",{style:H3(s,o),...e,className:b3,children:l})};class w9 extends o0{constructor(l=X.ELEMENT_LI,s=m9){super(l,s)}}const H3=(e,l)=>({...l[L9(e)??D.p],counterIncrement:"count"}),L9=e=>{let l;if(e.type==="a")l=e.children[0].textStyle;else if(e.children)for(const s of e.children){const o=L9(s);o&&(!l||o.startsWith(l))&&(l=o)}else l=e.textStyle;return l},k3=a.forwardRef(({nodeType:e=X.ELEMENT_UL,tooltip:l,...s},o)=>{const i=X.useListToolbarButtonState({nodeType:e}),{props:r}=X.useListToolbarButton(i);return t.jsx(U0,{tooltip:l,ref:o,...r,...s})});k3.displayName="ListToolbarButton";function aX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconListNumbers16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.007 1.993v4.541a.5.5 0 0 1-1 0V3.259l-.721.172a.5.5 0 0 1-.232-.973l1.337-.318zm-.533 7.632c-.375 0-.663.242-.799.461a.5.5 0 1 1-.85-.525c.258-.42.829-.936 1.65-.936.34 0 .699.113.975.385.28.276.427.667.427 1.127 0 .798-.385 1.567-.831 2.198a8 8 0 0 1-.578.72h1.327a.5.5 0 1 1 0 1H2.25a.5.5 0 0 1-.33-.877 8.5 8.5 0 0 0 1.31-1.42c.4-.567.647-1.128.647-1.62 0-.245-.073-.36-.128-.415a.38.38 0 0 0-.275-.098M15.008 3.5a.5.5 0 0 1-.5.5H8.38a.5.5 0 0 1 0-1h6.128a.5.5 0 0 1 .5.5m-1.414 3a.5.5 0 0 1-.5.5H8.38a.5.5 0 1 1 0-1h4.714a.5.5 0 0 1 .5.5m.914 3.5a.5.5 0 1 0 0-1H8.38a.5.5 0 1 0 0 1zm-.914 2.5a.5.5 0 0 1-.5.5H8.38a.5.5 0 0 1 0-1h4.714a.5.5 0 0 1 .5.5",clipRule:"evenodd"})})}const T3=a.memo(aX),f9=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(k3,{tooltip:p0("Ordered list"),nodeType:T.getPluginType(e,l),children:t.jsx(C0,{icon:t.jsx(T3,{})})})}),nX=["[&>li>p]:before:tw-content-[counter(count,decimal)_'._']","[&>li>p]:before:tw-content-[counter(count,_lower-alpha)_'._']","[&>li>p]:before:tw-content-[counter(count,lower-roman)_'._']"],sX=(e,l)=>{const s=J1.findNodePath(e,l);if(!s)return 0;const o=O.getNodeAncestors(e,s);return Array.from(o).filter(i=>i[0].type===X.ELEMENT_LI).length},V3=e=>`tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px] [&>li>p]:before:tw-whitespace-nowrap [&>li>p]:before:tw-pr-1 [&>li>p]:before:tw-tabular-nums ${nX[e%3]}`,F3={counterReset:"count"},x9=({attributes:e,children:l,element:s})=>{const o=T.useEditorRef(),i=sX(o,s);return t.jsx("ol",{className:V3(i),...e,style:F3,children:l})};class v9 extends o0{constructor(l=X.ELEMENT_OL,s=x9){super(l,s)}}class g9 extends R3{constructor(l){super({id:Z5,button:f9,markupElement:new v9,...l})}}function oX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconListBullet16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.5 3.5a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m10 .5a.5.5 0 0 0 0-1H5.475a.5.5 0 1 0 0 1zm-1.852 3a.5.5 0 1 0 0-1H5.475a.5.5 0 0 0 0 1zM14 9.5a.5.5 0 0 1-.5.5H5.475a.5.5 0 0 1 0-1H13.5a.5.5 0 0 1 .5.5M11.648 13a.5.5 0 0 0 0-1H5.475a.5.5 0 1 0 0 1zM2.75 7.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M3.5 9.5a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m-.75 3.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5",clipRule:"evenodd"})})}const $3=a.memo(oX),C9=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(k3,{tooltip:p0("Bullet list"),nodeType:T.getPluginType(e,l),children:t.jsx(C0,{icon:t.jsx($3,{})})})}),P3="[&>li>p]:before:tw-content-['•'] [&>li>p]:before:tw-whitespace-nowrap [&>li>p]:before:tw-px-2 tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px]",j9=({attributes:e,children:l})=>t.jsx("ul",{className:P3,...e,children:l});class I9 extends o0{constructor(l=X.ELEMENT_UL,s=j9){super(l,s)}}class N9 extends R3{constructor(l){super({id:Z5,button:C9,markupElement:new I9,...l})}}const v1=a.forwardRef(({clear:e,nodeType:l,...s},o)=>{const i=ie.useMarkToolbarButtonState({clear:e,nodeType:l}),{props:r}=ie.useMarkToolbarButton(i);return t.jsx(U0,{ref:o,...r,...s})});v1.displayName="MarkToolbarButton";function iX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextFormatBold16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",d:"M11.659 5.257C11.659 3.234 10.326 2 7.876 2H4v12h3.938C10.651 14 12 12.783 12 10.486c0-1.303-.713-2.469-2.264-2.64 1.256-.206 1.923-1.337 1.923-2.589m-5.21-.806h1.194c1.101 0 1.489.532 1.489 1.166 0 .703-.388 1.166-1.225 1.166H6.45zm3.04 5.846c0 .823-.559 1.269-1.582 1.269H6.45v-2.52h1.44c1.101 0 1.597.394 1.597 1.251"})})}const B3=a.memo(iX),rX=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(v1,{tooltip:p0(`Bold
|
|
9
|
-
${H1("Ctrl+B")}`),nodeType:T.getPluginType(e,l),children:t.jsx(C0,{icon:t.jsx(B3,{})})})}),q5="tw-font-bold",z9=({attributes:e,children:l})=>t.jsx("span",{...e,className:q5,children:l});class p9 extends o0{constructor(l=r0.MARK_BOLD,s=z9){super(l,s)}}const cX="bold-plugin",dX=[{validNodeName:["STRONG","B"]},{validStyle:{fontWeight:["600","700","bold"]}}];class M9 extends s0{constructor(l){super(cX,{button:rX,markupElement:new p9,...l})}plugins(){return[r0.createBoldPlugin({deserializeHtml:{rules:[...dX,{validNodeName:["SPAN"],validClassName:q5}]},options:{hotkey:["mod+b","ctrl+b"]}})]}}function uX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextBrackets16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.107 5.166a2.25 2.25 0 0 0-2.25-2.25H11.78a.5.5 0 0 0 0 1h1.078c.69 0 1.25.56 1.25 1.25v6.584c0 .69-.56 1.25-1.25 1.25H11.78a.5.5 0 0 0 0 1h1.078a2.25 2.25 0 0 0 2.25-2.25zM4.797 6.5a.5.5 0 0 1 .5-.5h5.657a.5.5 0 1 1 0 1H5.296a.5.5 0 0 1-.5-.5m.5 1.5a.5.5 0 1 0 0 1h5.657a.5.5 0 1 0 0-1zm-.5 2.5a.5.5 0 0 1 .5-.5h3.535a.5.5 0 0 1 0 1H5.296a.5.5 0 0 1-.5-.5M3.25 3A2.25 2.25 0 0 0 1 5.25v6.5A2.25 2.25 0 0 0 3.25 14h1.079a.5.5 0 1 0 0-1H3.25C2.56 13 2 12.44 2 11.75v-6.5C2 4.56 2.56 4 3.25 4h1.079a.5.5 0 0 0 0-1z",clipRule:"evenodd"})})}const D3=a.memo(uX),hX=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(v1,{tooltip:p0("Code"),nodeType:T.getPluginType(e,l),children:t.jsx(C0,{icon:t.jsx(D3,{})})})}),O3="tw-rounded tw-bg-box-neutral tw-text-violet-90 tw-m-0 tw-px-[0.2em] tw-font-mono tw-text-[85%]",S9=({attributes:e,children:l})=>t.jsx("span",{...e,className:O3,children:l});class A9 extends o0{constructor(l=r0.MARK_CODE,s=S9){super(l,s)}}const mX="code-plugin";class R9 extends s0{constructor(l){super(mX,{button:hX,markupElement:new A9,...l})}plugins(){return[r0.createCodePlugin()]}}function wX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextFormatItalic16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 2.5a.5.5 0 0 1 .5-.5h4.033a.5.5 0 0 1 0 1H9.882L7.154 13H8.5a.5.5 0 0 1 0 1h-4a.5.5 0 0 1 0-1h1.618L8.846 3H7.5a.5.5 0 0 1-.5-.5",clipRule:"evenodd"})})}const Z3=a.memo(wX),LX=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(v1,{tooltip:p0(`Italic
|
|
9
|
+
${H1("Ctrl+B")}`),nodeType:T.getPluginType(e,l),children:t.jsx(C0,{icon:t.jsx(B3,{})})})}),q5="tw-font-bold",z9=({attributes:e,children:l})=>t.jsx("span",{...e,className:q5,children:l});class p9 extends o0{constructor(l=r0.MARK_BOLD,s=z9){super(l,s)}}const cX="bold-plugin",dX=[{validNodeName:["STRONG","B"]},{validStyle:{fontWeight:["600","700","bold"]}}];class M9 extends s0{constructor(l){super(cX,{button:rX,markupElement:new p9,...l})}plugins(){return[r0.createBoldPlugin({deserializeHtml:{rules:[...dX,{validNodeName:["SPAN"],validClassName:q5}]},options:{hotkey:["mod+b","ctrl+b"]}})]}}function uX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextBrackets16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.107 5.166a2.25 2.25 0 0 0-2.25-2.25H11.78a.5.5 0 0 0 0 1h1.078c.69 0 1.25.56 1.25 1.25v6.584c0 .69-.56 1.25-1.25 1.25H11.78a.5.5 0 0 0 0 1h1.078a2.25 2.25 0 0 0 2.25-2.25zM4.797 6.5a.5.5 0 0 1 .5-.5h5.657a.5.5 0 1 1 0 1H5.296a.5.5 0 0 1-.5-.5m.5 1.5a.5.5 0 1 0 0 1h5.657a.5.5 0 1 0 0-1zm-.5 2.5a.5.5 0 0 1 .5-.5h3.535a.5.5 0 0 1 0 1H5.296a.5.5 0 0 1-.5-.5M3.25 3A2.25 2.25 0 0 0 1 5.25v6.5A2.25 2.25 0 0 0 3.25 14h1.079a.5.5 0 1 0 0-1H3.25C2.56 13 2 12.44 2 11.75v-6.5C2 4.56 2.56 4 3.25 4h1.079a.5.5 0 0 0 0-1z",clipRule:"evenodd"})})}const D3=a.memo(uX),hX=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(v1,{tooltip:p0("Code"),nodeType:T.getPluginType(e,l),children:t.jsx(C0,{icon:t.jsx(D3,{})})})}),O3="tw-rounded tw-bg-box-neutral tw-text-violet-90 tw-m-0 tw-px-[0.2em] tw-font-mono tw-text-[85%]",S9=({attributes:e,children:l})=>t.jsx("span",{...e,className:O3,children:l});class A9 extends o0{constructor(l=r0.MARK_CODE,s=S9){super(l,s)}}const mX="code-plugin";class R9 extends s0{constructor(l){super(mX,{button:hX,markupElement:new A9,...l})}plugins(){return[r0.createCodePlugin({options:{hotkey:[]}})]}}function wX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextFormatItalic16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 2.5a.5.5 0 0 1 .5-.5h4.033a.5.5 0 0 1 0 1H9.882L7.154 13H8.5a.5.5 0 0 1 0 1h-4a.5.5 0 0 1 0-1h1.618L8.846 3H7.5a.5.5 0 0 1-.5-.5",clipRule:"evenodd"})})}const Z3=a.memo(wX),LX=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(v1,{tooltip:p0(`Italic
|
|
10
10
|
${H1("Ctrl+I")}`),nodeType:T.getPluginType(e,l),children:t.jsx(C0,{icon:t.jsx(Z3,{})})})}),U5="tw-italic",y9=({attributes:e,children:l})=>t.jsx("span",{...e,className:U5,children:l});class b9 extends o0{constructor(l=r0.MARK_ITALIC,s=y9){super(l,s)}}const fX="italic-plugin",xX=[{validNodeName:["EM","I"]},{validStyle:{fontStyle:"italic"}}];class H9 extends s0{constructor(l){super(fX,{button:LX,markupElement:new b9,...l})}plugins(){return[r0.createItalicPlugin({deserializeHtml:{rules:[...xX,{validNodeName:["SPAN"],validClassName:U5}]},options:{hotkey:["mod+i","ctrl+i"]}})]}}function vX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextFormatStrikethrough12","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 1h9v1.5a.5.5 0 0 1-1 0V2H7v2a.5.5 0 0 1-1 0V2H3v.5a.5.5 0 0 1-1 0zm5 8a.5.5 0 0 0-1 0v1H4.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1H7zM3 6a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1z",clipRule:"evenodd"})})}const k9=a.memo(vX);function gX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextFormatStrikethrough16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 2h9v1.5a.5.5 0 0 1-1 0V3H9v3a.5.5 0 0 1-1 0V3H5v.5a.5.5 0 0 1-1 0zm5 9a.5.5 0 0 0-1 0v2H6.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1H9zM5 8a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1z",clipRule:"evenodd"})})}const T9=a.memo(gX);function CX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextFormatStrikethrough20","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.5 3H17v3.367a.75.75 0 0 1-1.5 0V4.5H11v2.958a.75.75 0 0 1-1.5 0V4.5H5v1.867a.75.75 0 0 1-1.5 0zM11 14.002a.75.75 0 0 0-1.5 0V15.5H7.75a.75.75 0 0 0 0 1.5h4.999a.75.75 0 0 0 0-1.5H11zM4.5 9.98a.75.75 0 0 0 0 1.5H16a.75.75 0 0 0 0-1.5z",clipRule:"evenodd"})})}const V9=a.memo(CX);function jX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextFormatStrikethrough24","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.5 4H20v3.75a.75.75 0 0 1-1.5 0V5.5H13V9a.75.75 0 0 1-1.5 0V5.5H6v2.25a.75.75 0 0 1-1.5 0zM13 16.5a.75.75 0 0 0-1.5 0v2H9.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5H13zM5.25 12a.75.75 0 0 0 0 1.5h14a.75.75 0 0 0 0-1.5z",clipRule:"evenodd"})})}const F9=a.memo(jX);function IX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextFormatStrikethrough32","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 6h18v4a1 1 0 1 1-2 0V8h-6v4a1 1 0 1 1-2 0V8H9v2a1 1 0 1 1-2 0zm10 14.5a1 1 0 1 0-2 0V24h-3a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2h-3zM8 15a1 1 0 1 0 0 2h16a1 1 0 1 0 0-2z",clipRule:"evenodd"})})}const $9=a.memo(IX),P9=e=>{const l=e.size||n.Size16;return t.jsxs("span",{children:[l===n.Size12&&!e.filled&&t.jsx(k9,{...e}),l===n.Size16&&!e.filled&&t.jsx(T9,{...e}),l===n.Size20&&!e.filled&&t.jsx(V9,{...e}),l===n.Size24&&!e.filled&&t.jsx(F9,{...e}),l===n.Size32&&!e.filled&&t.jsx($9,{...e})]})};P9.displayName="FondueIconTextFormatStrikethrough";const B9=a.memo(P9),NX=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(v1,{tooltip:p0("Strikethrough"),nodeType:T.getPluginType(e,l),children:t.jsx(C0,{icon:t.jsx(B9,{})})})}),W5="!tw-line-through",D9=({attributes:e,children:l})=>t.jsx("span",{...e,className:W5,children:l});class O9 extends o0{constructor(l=r0.MARK_STRIKETHROUGH,s=D9){super(l,s)}}const zX="strikethrough-plugin";class Z9 extends s0{constructor(l){super(zX,{button:NX,markupElement:new O9,...l})}plugins(){return[r0.createStrikethroughPlugin({deserializeHtml:{rules:[{validNodeName:["S","DEL","STRIKE"]},{validStyle:{textDecoration:["line-through"]}},{validNodeName:["SPAN"],validClassName:W5}]}})]}}function pX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconSubscript16","aria-hidden":"true",...e,children:t.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",children:[t.jsx("path",{strokeLinejoin:"round",d:"M9.97 11.711 2.548 4.29m0 7.421L9.971 4.29"}),t.jsx("path",{d:"m12.17 9.944 1.336-.318v3.908"})]})})}const _3=a.memo(pX),MX=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(v1,{tooltip:p0(`Subscript
|
|
11
11
|
${H1("Ctrl+.")}`),nodeType:T.getPluginType(e,l),clear:T.getPluginType(e,r0.MARK_SUPERSCRIPT),children:t.jsx(C0,{icon:t.jsx(_3,{})})})}),_9=({attributes:e,children:l})=>t.jsx("sub",{...e,children:l});class q9 extends o0{constructor(l=r0.MARK_SUBSCRIPT,s=_9){super(l,s)}}const SX="subscript-plugin";class AX extends s0{constructor(l){super(SX,{button:MX,markupElement:new q9,...l})}plugins(){return[r0.createSubscriptPlugin({options:{hotkey:["mod+.","ctrl+."]}})]}}function RX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconSuperscript16","aria-hidden":"true",...e,children:t.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",children:[t.jsx("path",{strokeLinejoin:"round",d:"M9.97 11.711 2.546 4.29m.001 7.421L9.97 4.29"}),t.jsx("path",{d:"m12.17 2.944 1.336-.318v3.908"})]})})}const q3=a.memo(RX),yX=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(v1,{tooltip:p0(`Superscript
|
|
12
12
|
${H1("Ctrl+,")}`),nodeType:T.getPluginType(e,l),clear:T.getPluginType(e,r0.MARK_SUBSCRIPT),children:t.jsx(C0,{icon:t.jsx(q3,{})})})}),U9=({attributes:e,children:l})=>t.jsx("sup",{...e,children:l});class W9 extends o0{constructor(l=r0.MARK_SUPERSCRIPT,s=U9){super(l,s)}}const bX="superscript-plugin";class HX extends s0{constructor(l){super(bX,{button:yX,markupElement:new W9,...l})}plugins(){return[r0.createSuperscriptPlugin({options:{hotkey:["mod+,","ctrl+,"]}})]}}function kX(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,className:"tw-flex tw-items-center tw-justify-center tw-fill-current",name:"IconTextFormatUnderline16","aria-hidden":"true",...e,children:t.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5 3.5V3h3v7H6.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1H9V3h3v.5a.5.5 0 0 0 1 0V2H4v1.5a.5.5 0 0 0 1 0M4 13a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1z",clipRule:"evenodd"})})}const U3=a.memo(kX),TX=({editor:e,id:l})=>t.jsx(j0,{id:l,children:t.jsx(v1,{tooltip:p0(`Underline
|