1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[243],{2867:function(e,t,n){n.d(t,{p:function(){return r}});var r={exports:{}}},4718:function(e,t,n){n.d(t,{m:function(){return r}});var r={}},58654:function(e,t,n){n.d(t,{p:function(){return r}});var r={exports:{}}},49336:function(e,t,n){n.d(t,{m:function(){return r}});var r={}},35079:function(e,t,n){n.r(t),n.d(t,{RichTextEditor:function(){return J},default:function(){return V}});var r=n(52322),l=n(74921),i=n(99173),s=n(77714),a=n(71385),o=n(16636),c=n(48709),d=n(15923),u=n(54296),b=n(41015),x=n(73082),h=n(58642),f=n(2784),g=n(71803);let p={richTextEditor:"_richTextEditor_xcl8a_1"};var v=n(62661),m=n(92084),j=n(11129),C=n(98658),w=n(55194),L=n(26328),A=n(8610),k=n(34837),y=n(101),D=n(32971),N=n(49685),Z=n(38598),z=n(73028),T=n(26351),M=n(69967),E=n(41463),R=n(24367),S=n(30207),H=n(51409),B=n(49824),P=n(46012),_=n(49466),I=n(11459);function q(e){let{size:t=24,...n}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 6C8 5.44772 8.44772 5 9 5H16C16.5523 5 17 5.44772 17 6C17 6.55228 16.5523 7 16 7H9C8.44772 7 8 6.55228 8 6Z"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3C4.55228 3 5 3.44772 5 4L5 20C5 20.5523 4.55229 21 4 21C3.44772 21 3 20.5523 3 20L3 4C3 3.44772 3.44772 3 4 3Z"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 12C8 11.4477 8.44772 11 9 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H9C8.44772 13 8 12.5523 8 12Z"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 18C8 17.4477 8.44772 17 9 17H16C16.5523 17 17 17.4477 17 18C17 18.5523 16.5523 19 16 19H9C8.44772 19 8 18.5523 8 18Z"})]})}function F(e){let{onClick:t,isActive:n=!1,isDisabled:l=!1,ariaLabel:i,children:s}=e;return(0,r.jsx)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:t,className:"p-1.5 rounded transition-colors text-carbon-700 hover:bg-alabaster-50 disabled:opacity-40 disabled:cursor-not-allowed ".concat(n?"bg-carbon-300 text-carbon-800":""),"aria-label":i,disabled:l,children:s})}function U(){return(0,r.jsx)("div",{className:"w-px h-5 bg-carbon-400 mx-1 self-center shrink-0"})}let W=[{level:1,label:"Heading 1",Icon:B.Z},{level:2,label:"Heading 2",Icon:P.Z},{level:3,label:"Heading 3",Icon:_.Z},{level:4,label:"Heading 4",Icon:I.Z}],O=[{color:"#bbf7d0",label:"Light green highlight"},{color:"#bfdbfe",label:"Light blue highlight"},{color:"#fed7aa",label:"Light orange highlight"},{color:"#e9d5ff",label:"Light purple highlight"},{color:"#fef08a",label:"Light yellow highlight"}],J=e=>{var t;let{value:n,onChange:B,placeholder:P="",htmlPlaceholder:_,maxLength:I=100,label:J,isRequired:V=!1,isDisabled:G=!1,isError:K=!1,className:Q="",onFocus:X,onBlur:Y,countFooterVariant:$="pill",countFooterLeft:ee,splitCountLocale:et,contentStyle:en,restrictContentTypes:er=!1,onRestrictedContentBlocked:el}=e,ei=(0,f.useRef)(0),es=(0,f.useRef)(X),ea=(0,f.useRef)(Y),eo=(0,f.useRef)(el),[ec,ed]=(0,f.useState)(!1),[eu,eb]=(0,f.useState)(0),[ex,eh]=(0,f.useState)(!1),ef=(0,f.useRef)(null),[eg,ep]=(0,f.useState)(!1),ev=(0,f.useRef)(null),[em,ej]=(0,f.useState)(!1),eC=(0,f.useRef)(null);(0,f.useEffect)(()=>{es.current=X,ea.current=Y,eo.current=el},[X,Y,el]),(0,f.useEffect)(()=>{ed(!0)},[]),(0,f.useEffect)(()=>{if(!ex)return;let e=e=>{ef.current&&!ef.current.contains(e.target)&&eh(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[ex]),(0,f.useEffect)(()=>{if(!eg)return;let e=e=>{ev.current&&!ev.current.contains(e.target)&&ep(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[eg]),(0,f.useEffect)(()=>{if(!em)return;let e=e=>{eC.current&&!eC.current.contains(e.target)&&ej(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[em]);let ew=(0,f.useMemo)(()=>I?i.hj.create({name:"maxLength",addProseMirrorPlugins:()=>[new s.Sy({filterTransaction(e,t){if(!e.docChanged)return!0;let n=e.doc.textContent.length;return n<=I||t.doc.textContent.length>I&&n<=t.doc.textContent.length}})]}):null,[I]),eL=(0,f.useMemo)(()=>er?function(e){let t=null,n=()=>{e&&(t&&clearTimeout(t),t=setTimeout(()=>{e(),t=null},300))};return i.hj.create({name:"contentSanitizer",addProseMirrorPlugins:()=>[new s.Sy({appendTransaction(e,t,r){let l=[];
1if(r.doc.descendants((e,t)=>{if("image"===e.type.name)return l.push({from:t,to:t+e.nodeSize,nodes:null}),!1;if("codeBlock"===e.type.name){let n=(0,g.Dj)(e.textContent);return l.push({from:t,to:t+e.nodeSize,nodes:[r.schema.nodes.paragraph.create(null,n?r.schema.text(n):void 0)]}),!1}if(e.isText&&e.text){let n=(0,g.Dj)(e.text);n!==e.text&&l.push({from:t,to:t+e.nodeSize,nodes:n.length>0?[r.schema.text(n,e.marks)]:[]})}}),0===l.length)return null;n();let i=r.tr;return l.sort((e,t)=>t.from-e.from).forEach(e=>{let{from:t,to:n,nodes:r}=e;null===r||0===r.length?i.delete(t,n):i.replaceWith(t,n,r)}),i}})]})}(()=>{var e;null==(e=eo.current)||e.call(eo)}):null,[er]),eA=(0,f.useMemo)(()=>a.Z.configure(er?{code:!1,codeBlock:!1}:{}),[er]),ek=(0,f.useMemo)(()=>er?{attributes:{"data-placeholder":P},transformPastedHTML:e=>{var t;let n=(0,g.Py)(e);return n!==e&&(null==(t=eo.current)||t.call(eo)),n},handlePaste:(e,t)=>{var n,r;let l=t.clipboardData;if(!l)return!1;for(let e of Array.from(l.items))if(e.type.startsWith("image/"))return t.preventDefault(),null==(n=eo.current)||n.call(eo),!0;let i=l.getData("text/plain");return i&&(0,g.Dj)(i)!==i&&(null==(r=eo.current)||r.call(eo)),!1},handleDrop:(e,t)=>{var n,r,l;return null!=(r=null==(n=t.dataTransfer)?void 0:n.files)&&!!r.length&&(t.preventDefault(),null==(l=eo.current)||l.call(eo),!0)}}:{attributes:{"data-placeholder":P}},[er,P]),ey=(0,l.jE)({extensions:[eA,o.Z,c.Z,d.Z,u.Z.configure({types:["heading","paragraph"]}),b.ZP.configure({multicolor:!0}),x.Z,h.Z.configure({nested:!0}),...ew?[ew]:[],...eL?[eL]:[]],content:n||"",editable:!G,immediatelyRender:!1,onUpdate:e=>{let{editor:t}=e;ei.current=t.state.doc.textContent.length,B(t.getHTML())},editorProps:ek},[er,I]);(0,f.useEffect)(()=>{ey&&n!==ey.getHTML()&&ey.commands.setContent(n||"")},[n,ey]),(0,f.useEffect)(()=>{if(!ey||"split"!==$)return;let e=()=>{eb(ey.state.doc.textContent.length)};return e(),ey.on("update",e),()=>{ey.off("update",e)}},[ey,$]);let eD=e=>e.toLocaleString(null!==(t=null==et?void 0:et.replace("_","-"))&&void 0!==t?t:void 0),eN=()=>_?(0,r.jsx)("div",{className:"pointer-events-none ".concat(p.richTextEditor),style:{...en,gridArea:"1/1"},"aria-hidden":!0,children:(0,r.jsx)("div",{className:"ProseMirror",style:{color:"#737476"},dangerouslySetInnerHTML:{__html:_}})}):null,eZ=()=>!P||_?null:(0,r.jsx)("div",{className:"pointer-events-none text-carbon-700 text-base p-4",style:{gridArea:"1/1"},children:P}),ez=e=>"split"===$&&null!=ee&&I?(0,r.jsxs)("div",{className:"flex justify-between items-start gap-2 w-full text-sm text-carbon-800",children:[(0,r.jsx)("span",{className:"min-w-0",children:ee}),(0,r.jsxs)("span",{className:"shrink-0 whitespace-nowrap tabular-nums",children:[eD(null!=e?e:eu),"/",eD(I)]})]}):(0,r.jsx)("div",{className:"flex gap-2 items-center",children:(0,r.jsxs)("span",{className:"text-sm text-carbon-800 px-2 py-1 rounded-full bg-alabaster-50",children:["Max. ",I," characters"]})});return ec&&ey?(0,r.jsxs)("div",{className:"flex flex-col gap-2 w-full ".concat(Q),onFocusCapture:()=>{var e;null==(e=es.current)||e.call(es)},onBlur:e=>{var t;let n=e.relatedTarget;n&&e.currentTarget.contains(n)||null==(t=ea.current)||t.call(ea)},children:[J&&(0,r.jsx)("label",{className:"text-sm text-carbon-800 ".concat(V?"after:content-['*']":""),children:J}),(0,r.jsxs)("div",{className:"flex flex-col border rounded bg-white-50 ".concat(K?"border-error-600":"border-carbon-300"),children:[(0,r.jsxs)("div",{className:"flex flex-wrap gap-0.3 md:gap-0.5 items-center px-2 py-1.5 border-b border-carbon-300 bg-white-50 rounded-t",children:[(0,r.jsx)(F,{onClick:()=>ey.chain().focus().undo().run(),isDisabled:G||!ey.can().undo(),ariaLabel:"Undo",children:(0,r.jsx)(v.Z,{size:16})}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().redo().run(),isDisabled:G||!ey.can().redo(),ariaLabel:"Redo",children:(0,r.jsx)(m.Z,{size:16})}),(0,r.jsx)(U,{}),(0,r.jsxs)("div",{ref:ef,className:"relative",children:[(0,r.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>eh(!ex),className:"flex items-center gap-0.5 px-2 py-1.5 rounded text-sm text-carbon-700 hover:bg-alabaster-50 transition-colors ".concat((()=>
1{if(!ey)return 0;for(let e=1;e<=4;e++)if(ey.isActive("heading",{level:e}))return e;return 0})()>0?"bg-carbon-300 text-carbon-800":""),disabled:G,"aria-label":"Heading level",children:[(0,r.jsx)(j.Z,{size:16}),(0,r.jsx)(C.Z,{size:12})]}),ex&&(0,r.jsx)("div",{className:"absolute top-full left-0 mt-1 z-50 bg-white-50 border border-carbon-300 rounded shadow-lg py-1 min-w-[140px]",children:W.map(e=>(0,r.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>{ey.chain().focus().toggleHeading({level:e.level}).run(),eh(!1)},className:"flex items-center gap-2 w-full text-left px-3 py-1.5 text-sm hover:bg-alabaster-50 transition-colors ".concat(ey.isActive("heading",{level:e.level})?"bg-alabaster-50 text-carbon-800 font-medium":"text-carbon-700"),children:[(0,r.jsx)(e.Icon,{size:16}),e.label]},e.level))})]}),(0,r.jsxs)("div",{ref:ev,className:"relative",children:[(0,r.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>ep(e=>!e),className:"flex items-center gap-0.5 px-2 py-1.5 rounded text-sm text-carbon-700 hover:bg-alabaster-50 transition-colors ".concat(ey.isActive("bulletList")||ey.isActive("orderedList")||ey.isActive("taskList")?"bg-carbon-300 text-carbon-800":""),disabled:G,"aria-label":"List type","aria-expanded":eg,"aria-haspopup":"true",children:[ey.isActive("orderedList")?(0,r.jsx)(w.Z,{size:16}):ey.isActive("taskList")?(0,r.jsx)(L.Z,{size:16}):(0,r.jsx)(A.Z,{size:16}),(0,r.jsx)(C.Z,{size:12})]}),eg&&(0,r.jsxs)("div",{className:"absolute top-full left-0 mt-1 z-50 bg-white-50 border border-carbon-300 rounded shadow-lg py-1 min-w-[160px]",children:[(0,r.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>{ey.chain().focus().toggleBulletList().run(),ep(!1)},className:"flex items-center gap-2 w-full text-left px-3 py-1.5 text-sm hover:bg-alabaster-50 transition-colors ".concat(ey.isActive("bulletList")?"bg-alabaster-50 text-carbon-800 font-medium":"text-carbon-700"),children:[(0,r.jsx)(A.Z,{size:16})," Bullet List"]}),(0,r.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>{ey.chain().focus().toggleOrderedList().run(),ep(!1)},className:"flex items-center gap-2 w-full text-left px-3 py-1.5 text-sm hover:bg-alabaster-50 transition-colors ".concat(ey.isActive("orderedList")?"bg-alabaster-50 text-carbon-800 font-medium":"text-carbon-700"),children:[(0,r.jsx)(w.Z,{size:16})," Ordered List"]}),(0,r.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>{ey.chain().focus().toggleTaskList().run(),ep(!1)},className:"flex items-center gap-2 w-full text-left px-3 py-1.5 text-sm hover:bg-alabaster-50 transition-colors ".concat(ey.isActive("taskList")?"bg-alabaster-50 text-carbon-800 font-medium":"text-carbon-700"),children:[(0,r.jsx)(L.Z,{size:16})," Task List"]})]})]}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().toggleBlockquote().run(),isActive:ey.isActive("blockquote"),isDisabled:G,ariaLabel:"Blockquote",children:(0,r.jsx)(q,{size:16})}),(0,r.jsx)(U,{}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().toggleBold().run(),isActive:ey.isActive("bold"),isDisabled:G,ariaLabel:"Bold",children:(0,r.jsx)(k.Z,{size:16,strokeWidth:3.5})}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().toggleItalic().run(),isActive:ey.isActive("italic"),isDisabled:G,ariaLabel:"Italic",children:(0,r.jsx)(y.Z,{size:16})}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().toggleStrike().run(),isActive:ey.isActive("strike"),isDisabled:G,ariaLabel:"Strikethrough",children:(0,r.jsx)(D.Z,{size:16})}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().toggleUnderline().run(),isActive:ey.isActive("underline"),isDisabled:G,ariaLabel:"Underline",children:(0,r.jsx)(N.Z,{size:16})}),(0,r.jsxs)("div",{ref:eC,className:"relative",children:[(0,r.jsx)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>ej(e=>!e),className:"p-1.5 rounded transition-colors text-carbon-700 hover:bg-alabaster-50 disabled:opacity-40 disabled:cursor-not-allowed ".concat(ey.isActive("highlight")?"bg-carbon-300 text-carbon-800":""),disabled:G,"aria-label":"Text highlight","aria-expanded":em,"aria-haspopup":"true",children:(0,r.jsx)(Z.Z,{size:16})}),em&&(0,r.jsxs)("div",{className:"absolute top-full left-0 mt-1 z-50 flex items-center gap-2 p-2 bg-white-50 border border-carbon-300 rounded shadow-lg",role:"group","aria-label":"Highlight colors",children:[O.map(e=>{let{color:t,label:n}=e;return(0,r.jsx)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>{ey.chain().focus().setHighlight({color:t}).run(),ej(!1)},className:"w-7 h-7 rounded-full border border-carbon-300 shrink-0 hover:ring-2 hover:ring-carbon-400 focus:outline-none focus:ring-2 focus:ring-carbon-500",style:{backgroundColor:t},"aria-label":n},t)}),(0,r.jsx)("div",{className:"w-px h-6 bg-carbon-400 shrink-0","aria-hidden":!0}),(0,r.jsx)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>{ey.chain().focus().unsetHighlight().run(),ej(!1)},className:"p-1.5 rounded text-carbon-700 hover:bg-alabaster-50","aria-label":"Remove highlight",children:(0,r.jsx)(z.Z,{size:18})})]})]}),(0,r.jsx)(U,{}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().toggleSuperscript().run(),isActive:ey.isActive("superscript"),isDisabled:G,ariaLabel:"Superscript",children:(0,r.jsx)(T.Z,{size:16})}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().toggleSubscript().run(),isActive:ey.isActive("subscript"),isDisabled:G,ariaLabel:"Subscript",children:(0,r.jsx)(M.Z,{size:16})}),(0,r.jsx)(U,{}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().setTextAlign("left").run(),isActive:ey.isActive({textAlign:"left"}),isDisabled:G,ariaLabel:"Align Left",children:(0,r.jsx)(E.Z,{size:16})}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().setTextAlign("center").run(),isActive:ey.isActive({textAlign:"center"}),isDisabled:G,ariaLabel:"Align Center",children:(0,r.jsx)(R.Z,{size:16})}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().setTextAlign("right").run(),isActive:ey.isActive({textAlign:"right"}),isDisabled:G,ariaLabel:"Align Right",children:(0,r.jsx)(S.Z,{size:16})}),(0,r.jsx)(F,{onClick:()=>ey.chain().focus().setTextAlign("justify").run(),isActive:ey.isActive({textAlign:"justify"}),isDisabled:G,ariaLabel:"Align Justify",children:(0,r.jsx)(H.Z,{size:16})})]}),(0,r.jsxs)("div",{className:"grid ".concat(p.richTextEditor),style:en,children:[(0,r.jsx)("div",{style:{gridArea:"1/1"},children:(0,r.jsx)(l.kg,{editor:ey})}),!ey.getText().trim()&&eN(),!ey.getText().trim()&&eZ()]})]}),ez()]}):(0,r.jsxs)("div",{className:"flex flex-col gap-2 w-full ".concat(Q),children:[J&&(0,r.jsx)("label",{className:"text-sm text-carbon-800 ".concat(V?"after:content-['*'] after:text-error-600":""),children:J}),(0,r.jsxs)("div",{className:"flex flex-col border rounded bg-white-50 ".concat(K?"border-error-600":"border-carbon-300"),children:[(0,r.jsx)("div",{className:"flex gap-1 items-center p-2 border-b border-carbon-300 bg-white-50 rounded-t",children:(0,r.jsx)("div",{className:"h-7 w-48 bg-alabaster-50 rounded animate-pulse"})}),(0,r.jsxs)("div",{className:"grid ".concat(p.richTextEditor),style:en,children:[(0,r.jsx)("div",{className:"min-h-[174px] p-4 text-base text-carbon-800",style:{gridArea:"1/1"}}),eN(),eZ()]})]}),ez(0)]})},V=J}}]);
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.