1"use strict";(self.webpackChunkStammer_ai=self.webpackChunkStammer_ai||[]).push([[9258],{49258:function(e,n,t){t.r(n),t.d(n,{cleanRichTextEditorHTML:function(){return ae},default:function(){return oe}});var i=t(78685),a=t(2057),r=t(16657),l=t(49711),o=t(51222),s=t(62118),c=t(16850),d=t(31754),u=t(45384),f=t(47592),h=t(53708),p=t(31547),x=t(41175),m=t(38588),v=t(10838),A=t(35972),g=t(26400),b=t(70559),j=t(41007),T=t(1682),y=t(48333),C=t(61812),E=t(51257),R=t(56599),S=t(54397),I=t(22160),_=t(79083),w=t(24094),L=t(10857),z=t(95550),H=t(42683),k=t(81170),O=t(95516),D=t(89849),M=t(90061),B=t(9472),N=t(15970),P=t(19124),X=function(){return X=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e},X.apply(this,arguments)},F="\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n margin: 0 2px;\n background-color: #cccccc;\n color: inherit;\n border-radius: 12px;\n cursor: default;\n font-size: inherit;\n font-weight: inherit;\n",U=function(e){return e.replace(/\{\{([^}]+)\}\}/g,(function(e,n){var t=n.trim();if(!t)return e;var i=(0,P.wy)(t.replace(/\./g," > "));return'<span data-type="variable-pill" data-variable-name="'.concat(t,'" style="').concat(F,'">').concat(i||t,"</span>")}))},W=o.bP.create({name:"variablePill",group:"inline",inline:!0,atom:!0,addAttributes:function(){return{variableName:{default:null,parseHTML:function(e){return e.getAttribute("data-variable-name")},renderHTML:function(e){return e.variableName?{"data-variable-name":e.variableName}:{}}}}},parseHTML:function(){return[{tag:'span[data-type="variable-pill"]',getAttrs:function(e){return"string"!=typeof e&&{variableName:e.getAttribute("data-variable-name")}}}]},renderHTML:function(e){var n=e.HTMLAttributes,t=e.node.attrs.variableName||"",i=(0,P.wy)(t.replace(/\./g," > "));return["span",X(X({},n),{"data-type":"variable-pill","data-variable-name":t,style:F}),"".concat(i||t)]},addCommands:function(){var e=this;return{insertVariable:function(n){return function(t){return t.commands.insertContent({type:e.name,attrs:{variableName:n}})}}}}}),G=t(74007),V=t(56062),Y=t(45412),$=t(91811),J=t(1661),q=t(83589),Z=t(54935),K=t(6337);function Q(e){var n=e.node,t=e.level,a=e.expanded,r=e.onToggle,l=e.onSelect,o=n.children.size>0,s=a.has(n.fullPath),c=16*t+8;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(G.Ay,{disablePadding:!0,sx:{pl:"".concat(c,"px")},children:(0,i.jsx)(V.A,{onClick:function(){n.isLeaf?l(n.fullPath):r(n.fullPath)},sx:{py:.5,minHeight:32,"&:hover":{backgroundColor:"action.hover"}},children:(0,i.jsxs)(p.A,{sx:{display:"flex",alignItems:"center",width:"100%",gap:.5},children:[o&&(0,i.jsx)(p.A,{sx:{display:"flex",alignItems:"center",width:16,height:16,color:"text.secondary"},children:s?(0,i.jsx)(Z.A,{fontSize:"small"}):(0,i.jsx)(K.A,{fontSize:"small"})}),!o&&(0,i.jsx)(p.A,{sx:{width:16}}),(0,i.jsx)(Y.A,{primary:(0,i.jsx)(v.A,{variant:"subtitle2",sx:{fontWeight:n.isLeaf?400:500,color:n.isLeaf?"text.primary":"text.secondary"},children:(0,P.wy)(n.name)})}),n.isLeaf&&(0,i.jsx)(v.A,{variant:"caption",sx:{color:"text.secondary",fontFamily:"monospace"},children:n.fullPath})]})})}),o&&(0,i.jsx)($.A,{in:s,timeout:"auto",unmountOnExit:!0,children:(0,i.jsx)(J.A,{disablePadding:!0,children:Array.from(n.children.values()).sort((function(e,n){return e.isLeaf&&!n.isLeaf?1:!e.isLeaf&&n.isLeaf?-1:e.name.localeCompare(n.name)})).map((function(e){return(0,i.jsx)(Q,{node:e,level:t+1,expanded:a,onToggle:r,onSelect:l},e.fullPath)}))})})]})}var ee=function(e){var n=e.anchorEl,t=e.handleClose,r=e.availableVariables,l=e.onClick,o=(0,a.useState)(new Set),s=o[0],c=o[1],d=(0,a.useMemo)((function(){return e=r,n=new Map,e.forEach((function(e){var t=e.split("."),i=n;t.forEach((function(e,n){var a=n===t.length-1,r=t.slice(0,n+1).join(".");i.has(e)||i.set(e,{name:e,fullPath:r,children:new Map,isLeaf:a});var l=i.get(e);a&&(l.isLeaf=!0),i=l.children}))})),n;var e,n}),[r]),u=function(e){c((function(n){var t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t}))},f=function(e){l(e),t()};return(0,i.jsx)(i.Fragment,{children:n&&r.length>0&&(0,i.jsx)(q.Ay,{open:Boolean(n),anchorEl:n,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{sx:{minWidth:320,maxHeight:400,border:"1px solid #e5e7eb",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"}},children:(0,i.jsx)(p.A,{sx:{py:1},children:(0,i.jsx)(J.A,{disablePadding:!0,children:Array.from(d.values()).sort((function(e,n){return e.isLeaf&&!n.isLeaf?1:!e.isLeaf&&n.isLeaf?-1:e.name.localeCompare(n.name)})).map((function(e){return(0,i.jsx)(Q,{node:e,level:0,expanded:s,onToggle:u,onSelect:f},e.fullPath)}))})})})})},ne=t(50143),te=o.YY.create({name:"fontSize",addOptions:function(){return{types:["textStyle"]}},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:function(e){return e.style.fontSize||null},renderHTML:function(e){return e.fontSize?{style:"font-size: ".concat(e.fontSize)}:{}}}}}]},addCommands:function(){return{setFontSize:function(e){return function(n){return(0,n.chain)().setMark("textStyle",{fontSize:e}).run()}}}}}),ie=o.YY.create({name:"inlineStyle",addOptions:function(){return{types:["textStyle","paragraph","heading"]}},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{inlineStyle:{default:null,parseHTML:function(e){if("variable-pill"===e.getAttribute("data-type"))return null;var n=e.getAttribute("style");return n&&n.trim()?n:null},renderHTML:function(e){return e.inlineStyle?{style:e.inlineStyle}:{}}}}}]}}),ae=function(e){var n=e;n=n.replace(/<span(?=[^>]*data-type="variable-pill")(?=[^>]*data-variable-name="[^"]+")[^>]*>[\s\S]*?<\/span>/g,(function(e){var n=e.match(/data-variable-name="([^"]+)"/);return n&&n[1]?"{{".concat(n[1],"}}"):e}));return n=n.replace(/<table[^>]*>[\s\S]*?<\/table>/gi,(function(e){return e.replace(/<p(\s[^>]*)?>/gi,(function(e){if(e.includes("style=")){var n=e.match(/style="([^"]*)"/i);if(n){var t=n[1];
1if(!t.match(/margin\s*:\s*0/i)){var i=t.trim()?"".concat(t.trim(),"; margin: 0"):"margin: 0";return e.replace(/style="[^"]*"/i,'style="'.concat(i,'"'))}}return e}return e.replace(/<p(\s|>)/,'<p style="margin: 0"$1')}))}))},re=function(e){var n="";return[/<style[^>]*>[\s\S]*?<\/style>/gi,/<script[^>]*>[\s\S]*?<\/script>/gi,/<meta[^>]*>/gi,/<link[^>]*>/gi].forEach((function(t){var i=e.match(t);i&&(n+=i.join("\n")+"\n")})),n.trim()},le=function(e,n){var t=re(n);return t?t+"\n"+e:e};var oe=function(e){var n=e.width,t=void 0===n?"100%":n,o=e.height,P=void 0===o?"300px":o,X=e.value,F=void 0===X?"":X,G=e.onSave,V=e.onChange,Y=e.disabled,$=e.allowImage,J=void 0===$||$,q=e.placeholder,Z=void 0===q?"Start typing...":q,K=e.availableVariables,Q=void 0===K?[]:K,oe=e.allowRichTextEditing,se=void 0===oe||oe,ce=(0,r.Bd)().t,de=(0,a.useState)(null),ue=de[0],fe=de[1],he=(0,a.useState)(!1),pe=he[0],xe=he[1],me=(0,a.useState)(""),ve=me[0],Ae=me[1],ge=(0,a.useState)(!1),be=ge[0],je=ge[1],Te=(0,a.useState)("16"),ye=Te[0],Ce=Te[1],Ee=(0,a.useRef)(""),Re=(0,a.useRef)(""),Se=(0,a.useRef)(null),Ie=(0,a.useRef)(null),_e=(0,ne.f)().theme,we=a.useMemo((function(){return U(F||"")}),[F]),Le=(0,l.hG)({extensions:[s.A,c.A.configure({placeholder:Z}),W,d.Ay.configure({inline:!0,allowBase64:!0}),u.R0,f.xJ,te,ie,h.n.configure({types:["heading","paragraph"]})],onUpdate:function(e){var n=e.editor,t=ae(n.getHTML()),i=Ee.current?le(t,Ee.current):t;Re.current=i;try{for(var a=n.state.selection.$anchor,r=a.node(-1),l=a.depth,o=!1;l>=0&&!o;){if(r){var s=r.type.name;if("tableCell"===s||"tableHeader"===s){o=!0;break}}--l>=0&&(r=a.node(l))}je(o)}catch(e){je(n.isActive("table")||n.isActive("tableCell")||n.isActive("tableHeader"))}null==V||V(i)},content:we,editorProps:{attributes:{placeholder:Z,style:"height: ".concat(P,"; padding: 12px; overflow: auto; font-size: 14px;")},handlePaste:function(e,n){var t=n.clipboardData;if(t){var i=Array.from(t.items).find((function(e){return-1!==e.type.indexOf("image")}));if(i){var a=i.getAsFile();if(a&&Ie.current){var r=new FileReader;return r.onload=function(e){var n,t=null===(n=e.target)||void 0===n?void 0:n.result;t&&Ie.current&&Ie.current.chain().focus().setImage({src:t}).run()},r.readAsDataURL(a),n.preventDefault(),!0}}var l=t.getData("text/html");if(l){var o=re(l);Ee.current=o?l:""}}return!1}}});(0,a.useEffect)((function(){if(Le){Ie.current=Le;var e=function(){try{for(var e=Le.state.selection.$anchor,n=e.depth,t=!1;n>=0&&!t;){var i=e.node(n);if(i){var a=i.type.name;if("tableCell"===a||"tableHeader"===a){t=!0;break}}n--}je(t)}catch(e){je(Le.isActive("table")||Le.isActive("tableCell")||Le.isActive("tableHeader"))}};return Le.on("selectionUpdate",e),e(),function(){Le.off("selectionUpdate",e)}}}),[Le]),(0,a.useEffect)((function(){if(Le&&void 0!==we){if(F===Re.current)return;var e=Le.getHTML();if(U(e)!==we){var n=Le.state.selection,t=n.from,i=n.to;if(Le.commands.setContent(we),requestAnimationFrame((function(){try{var e=Le.state.doc.content.size;if(e>0){var n=Math.min(t,e),a=Math.min(i,e);Le.commands.setTextSelection({from:n,to:a})}}catch(e){Le.commands.focus("end")}})),F)re(F)&&(Ee.current&&Ee.current===F||(Ee.current=F));Re.current=""}}}),[Le,we,F]);var ze=(0,a.useCallback)((function(e){Le&&Le.chain().focus().insertVariable(e).run()}),[Le]),He=(0,a.useCallback)((function(e){var n,t=null===(n=e.target.files)||void 0===n?void 0:n[0];if(t&&t.type.startsWith("image/")){var i=new FileReader;i.onload=function(e){var n,t=null===(n=e.target)||void 0===n?void 0:n.result;t&&Le&&Le.chain().focus().setImage({src:t}).run()},i.readAsDataURL(t)}Se.current&&(Se.current.value="")}
1),[Le]);if(!Le)return null;var ke=pe||Y;return(0,i.jsxs)(p.A,{sx:{width:t},children:[(0,i.jsx)("input",{ref:Se,type:"file",accept:"image/*",style:{display:"none"},onChange:He,disabled:ke}),(0,i.jsxs)(x.A,{variant:"outlined",sx:{border:"1px solid",borderColor:"divider",borderRadius:1},children:[(0,i.jsxs)(p.A,{sx:{borderBottom:"1px solid",borderColor:"divider",width:"100%"},children:[(0,i.jsxs)(p.A,{sx:{gap:1,p:1,display:"flex",alignItems:"center",width:"100%",overflowX:"auto","::-webkit-scrollbar":{display:"none"}},children:[se&&(0,i.jsxs)(p.A,{display:"flex",alignItems:"center",gap:1,children:[(0,i.jsx)(m.A,{size:"small",type:"number",variant:"standard",value:ye,onChange:function(e){var n=e.target.value;Ce(n),n&&Le&&Le.chain().focus().setFontSize("".concat(n,"px")).run()},onBlur:function(e){var n=e.target.value;n&&Le&&Le.chain().focus().setFontSize("".concat(n,"px")).run()},InputProps:{disableUnderline:!0},disabled:ke,placeholder:"Size",sx:{border:"1px solid ".concat(ke?_e.palette.divider:_e.palette.primary.main,"90"),borderRadius:"4px",width:"55px","& .MuiInputBase-input":{padding:"0.16rem",paddingLeft:"0.3rem",fontSize:"15px",color:_e.palette.primary.main,fontWeight:500}},inputProps:{min:8,max:72}}),(0,i.jsx)(v.A,{variant:"body2",color:ke?_e.palette.text.secondary:_e.palette.primary.main,fontSize:"12px",fontWeight:500,sx:{margin:0,marginRight:"4px"},children:"px"}),(0,i.jsxs)(A.A,{size:"small",variant:"outlined",children:[(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().toggleBold().run()},disabled:!Le.can().chain().focus().toggleBold().run()||ke,variant:Le.isActive("bold")?"contained":"outlined",children:(0,i.jsx)(T.A,{fontSize:"small"})}),(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().toggleItalic().run()},disabled:!Le.can().chain().focus().toggleItalic().run()||ke,variant:Le.isActive("italic")?"contained":"outlined",children:(0,i.jsx)(y.A,{fontSize:"small"})}),(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().toggleUnderline().run()},disabled:!Le.can().chain().focus().setUnderline().run()||ke,variant:Le.isActive("underline")?"contained":"outlined",children:(0,i.jsx)(S.A,{fontSize:"small"})}),(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().toggleCode().run()},disabled:!Le.can().chain().focus().toggleCode().run()||ke,variant:Le.isActive("code")?"contained":"outlined",children:(0,i.jsx)(R.A,{fontSize:"small"})})]}),(0,i.jsxs)(A.A,{size:"small",variant:"outlined",children:[(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.ALIGN_LEFT"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().setTextAlign("left").run()},disabled:ke,variant:Le.isActive({textAlign:"left"})?"contained":"outlined",children:(0,i.jsx)(D.A,{fontSize:"small"})})}),(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.ALIGN_CENTER"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().setTextAlign("center").run()},disabled:ke,variant:Le.isActive({textAlign:"center"})?"contained":"outlined",children:(0,i.jsx)(M.A,{fontSize:"small"})})}),(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.ALIGN_RIGHT"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().setTextAlign("right").run()},disabled:ke,variant:Le.isActive({textAlign:"right"})?"contained":"outlined",children:(0,i.jsx)(B.A,{fontSize:"small"})})}),(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.JUSTIFY"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().setTextAlign("justify").run()},disabled:ke,variant:Le.isActive({textAlign:"justify"})?"contained":"outlined",children:(0,i.jsx)(N.A,{fontSize:"small"})})})]}),(0,i.jsxs)(A.A,{size:"small",variant:"outlined",children:[(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().toggleBulletList().run()},disabled:!Le.can().chain().focus().toggleBulletList().run()||ke,variant:Le.isActive("bulletList")?"contained":"outlined",children:(0,i.jsx)(C.A,{fontSize:"small"})}),(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().toggleOrderedList().run()},disabled:!Le.can().chain().focus().toggleOrderedList().run()||ke,variant:Le.isActive("orderedList")?"contained":"outlined",children:(0,i.jsx)(E.A,{fontSize:"small"})}
1),J&&(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.INSERT_IMAGE"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){var e;return null===(e=Se.current)||void 0===e?void 0:e.click()},disabled:ke,variant:"outlined",children:(0,i.jsx)(_.A,{fontSize:"small"})})}),(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.INSERT_TABLE"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},disabled:!Le.can().chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()||ke,variant:be?"contained":"outlined",children:(0,i.jsx)(w.A,{fontSize:"small"})})})]})]}),(0,i.jsx)(p.A,{display:"flex",justifyContent:"flex-end",alignItems:"center",width:"100%",children:(0,i.jsx)(A.A,{size:"small",variant:"outlined",children:Q.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.INSERT_VARIABLE"),placement:"bottom",arrow:!0,children:(0,i.jsxs)(g.A,{onClick:function(e){ue&&fe(null),fe(e.currentTarget)},variant:ue?"outlined":"contained",disabled:ke,children:[(0,i.jsx)(I.A,{fontSize:"small",sx:{mr:1}}),ce("RICH_TEXT_EDITOR.VARIABLES")]})}),(0,i.jsx)(ee,{anchorEl:ue,availableVariables:Q,handleClose:function(){return fe(null)},onClick:ze})]})})})]}),be&&(0,i.jsxs)(p.A,{sx:{gap:1,p:1,display:"flex",alignItems:"center",borderTop:"1px solid",borderColor:"divider",width:"100%",backgroundColor:"action.hover"},children:[(0,i.jsxs)(A.A,{size:"small",variant:"outlined",children:[(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.ADD_ROW_BEFORE"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().addRowBefore().run()},disabled:!Le.can().chain().focus().addRowBefore().run()||ke,variant:"outlined",children:(0,i.jsx)(z.A,{fontSize:"small"})})}),(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.ADD_ROW_AFTER"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().addRowAfter().run()},disabled:!Le.can().chain().focus().addRowAfter().run()||ke,variant:"outlined",children:(0,i.jsx)(H.A,{fontSize:"small"})})}),(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.DELETE_ROW"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().deleteRow().run()},disabled:!Le.can().chain().focus().deleteRow().run()||ke,variant:"outlined",color:"error",children:(0,i.jsx)(L.A,{fontSize:"small"})})})]}),(0,i.jsxs)(A.A,{size:"small",variant:"outlined",children:[(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.ADD_COLUMN_BEFORE"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().addColumnBefore().run()},disabled:!Le.can().chain().focus().addColumnBefore().run()||ke,variant:"outlined",children:(0,i.jsx)(k.A,{fontSize:"small"})})}),(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.ADD_COLUMN_AFTER"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().addColumnAfter().run()},disabled:!Le.can().chain().focus().addColumnAfter().run()||ke,variant:"outlined",children:(0,i.jsx)(O.A,{fontSize:"small"})})}),(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.DELETE_COLUMN"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().deleteColumn().run()},disabled:!Le.can().chain().focus().deleteColumn().run()||ke,variant:"outlined",color:"error",children:(0,i.jsx)(L.A,{fontSize:"small"})})})]}),(0,i.jsx)(A.A,{size:"small",variant:"outlined",children:(0,i.jsx)(b.A,{title:ce("RICH_TEXT_EDITOR.DELETE_TABLE"),placement:"bottom",arrow:!0,children:(0,i.jsx)(g.A,{onClick:function(){return Le.chain().focus().deleteTable().run()},disabled:!Le.can().chain().focus().deleteTable().run()||ke,variant:"outlined",color:"error",children:(0,i.jsx)(w.A,{fontSize:"small"})})})})]})]}),pe?(0,i.jsx)(p.A,{height:P,overflow:"auto",p:"12px",children:(0,i.jsx)(m.A,{fullWidth:!0,multiline:!0,value:ve,onChange:function(e){var n=e.target.value;Ae(n),Ee.current=n,null==V||V(n)},variant:"standard",InputProps:{disableUnderline:!0},placeholder:"Edit raw HTML...",sx:{"& .MuiInputBase-root":{height:"100%",fontFamily:"monospace",fontSize:"12px",padding:0,margin:0},"& .MuiInputBase-input":{height:"calc(100vh - 425px) !important",overflow:"auto !important"}}})}):(0,i.jsx)(p.A,{sx:{"& table p, & table td p, & table th p":{margin:"0 !important"}},children:(0,i.jsx)(l.$Z,{editor:Le})}
1),(0,i.jsx)(p.A,{sx:{gap:1,p:1,display:"flex",alignItems:"center",justifyContent:"flex-end",borderTop:"1px solid",borderColor:"divider",width:"100%"},children:(0,i.jsx)(p.A,{children:pe?(0,i.jsxs)(p.A,{display:"flex",gap:1,justifyContent:"flex-end",alignItems:"center",children:[(0,i.jsx)(j.A,{children:ce("RICH_TEXT_EDITOR.ONLY_INLINE_STYLES")}),(0,i.jsx)(g.A,{sx:{marginRight:1},size:"small",variant:"outlined",onClick:function(){Ee.current=ve,null==V||V(ve);var e=U(ve);Le.commands.setContent(e),xe(!1)},disabled:Y,children:ce("RICH_TEXT_EDITOR.DONE")})]}):(0,i.jsxs)(i.Fragment,{children:[se&&(0,i.jsx)(g.A,{sx:{marginRight:1},size:"small",variant:"outlined",onClick:function(){var e=ae(Le.getHTML()),n=Ee.current?le(e,Ee.current):e;Ae(n),xe(!0)},disabled:Y,children:ce("RICH_TEXT_EDITOR.EDIT_RAW_HTML")}),(0,i.jsx)(g.A,{size:"small",variant:"contained",onClick:function(){var e=ae(Le.getHTML()),n=Ee.current?le(e,Ee.current):e;Re.current=n,null==G||G(n)},disabled:Y,children:ce("RICH_TEXT_EDITOR.SAVE")})]})})})]})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.