1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8326],{98195:()=>{},98326:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RichText:()=>eF});var r=n(73632),o=n(94124),l=n(95155),i=n(92825),a=n(99596),s=n(12115);let d=(0,s.createContext)(null),u={didCatch:!1,error:null};class c extends s.Component{static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,n,r=arguments.length,o=Array(r),l=0;l<r;l++)o[l]=arguments[l];null===(t=(n=this.props).onReset)||void 0===t||t.call(n,{args:o,reason:"imperative-api"}),this.setState(u)}}componentDidCatch(e,t){var n,r;null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;if(n&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,r)){var o,l;null===(o=(l=this.props).onReset)||void 0===o||o.call(l,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(u)}}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:o,error:l}=this.state,i=e;if(o){let e={error:l,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)i=t(e);else if(n)i=(0,s.createElement)(n,e);else if(void 0!==r)i=r;else throw l}return(0,s.createElement)(d.Provider,{value:{didCatch:o,error:l,resetErrorBoundary:this.resetErrorBoundary}},i)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=u}}n(98195);var f=n(94271),m=n(32532);let p="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,h=p?s.useLayoutEffect:s.useEffect,g={tag:"history-merge"};function v({initialConfig:e,children:t}){let n=(0,s.useMemo)(()=>{let{theme:t,namespace:n,nodes:r,onError:o,editorState:l,html:i}=e,a=(0,f.Mx)(null,t),s=(0,m.ie)({editable:e.editable,html:i,namespace:n,nodes:r,onError:e=>o(e,s),theme:t});return function(e,t){if(null!==t){if(void 0===t)e.update(()=>{let t=(0,m.Ni)();if(t.isEmpty()){let n=(0,m.lJ)();t.append(n);let r=p?document.activeElement:null;(null!==(0,m.vJ)()||null!==r&&r===e.getRootElement())&&n.select()}},g);else if(null!==t)switch(typeof t){case"string":{let n=e.parseEditorState(t);e.setEditorState(n,g);break}case"object":e.setEditorState(t,g);break;case"function":e.update(()=>{(0,m.Ni)().isEmpty()&&t(e)},g)}}}(s,l),[s,a]},[]);return h(()=>{let t=e.editable,[r]=n;r.setEditable(void 0===t||t)},[]),(0,l.jsx)(f.Gu.Provider,{value:n,children:t})}var y=n(19749);function E(e,t){return(E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var x={error:null},b=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=x,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,E(t,e),t.getDerivedStateFromError=function(e){return{error:e}};var n=t.prototype;return n.reset=function(){this.setState(x)},n.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},n.componentDidUpdate=function(e,t){var n,r,o,l,i=this.state.error,a=this.props.resetKeys;null!==i&&null!==t.error&&(void 0===(o=e.resetKeys)&&(o=[]),void 0===(l=a)&&(l=[]),o.length!==l.length||o.some(function(e,t){return!Object.is(e,l[t])}))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,a),this.reset())},n.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,r=t.FallbackComponent,o=t.fallback;if(null!==e){var l={error:e,resetErrorBoundary:this.resetErrorBoundary};if(s.isValidElement(o))return o;if("function"==typeof n)return n(l);if(r)return s.createElement(r,l);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(s.Component);function C({children:e,onError:t}){return(0,l.jsx)(b,{fallback:(0,l.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}var k=n(92749);function w(e){e.undoStack=[],e.redoStack=[],e.current=null}function S({delay:e,externalHistoryState:t}){let[n]=(0,f.DF)();return function(e,t,n=1e3){let r=(0,s.useMemo)(()=>t||{current:null,redoStack:[],undoStack:[]},[t]);(0,s.useEffect)(()=>(function(e,t,n){let r,o,l=(r=Date.now(),o=0,(t,l,i,a,s,d)=>{let u=Date.now();if(d.has("historic"))return o=0,r=u,2;let c=function(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;let l=t._selection,i=e._selection;if(o)return 1;if(!((0,m.I2)(l)&&(0,m.I2)(i)&&i.isCollapsed()&&l.isCollapsed()))return 0;let a=function(e,t,n){let r=e._nodeMap,o=[];for(let e of t){let t=r.get(e);void 0!==t&&o.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);void 0===n||(0,m.hV)(n)||o.push(n)}return o}(t,n,r);if(0===a.length)return 0;if(a.length>
11){let n=t._nodeMap,r=n.get(l.anchor.key),o=n.get(i.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&(0,m.kF)(r)&&1===r.__text.length&&1===l.anchor.offset?2:0}let s=a[0],d=e._nodeMap.get(s.__key);if(!(0,m.kF)(d)||!(0,m.kF)(s)||d.__mode!==s.__mode)return 0;let u=d.__text,c=s.__text;if(u===c)return 0;let f=l.anchor,p=i.anchor;if(f.key!==p.key||"text"!==f.type)return 0;let h=f.offset,g=p.offset,v=c.length-u.length;return 1===v&&g===h-1?2:-1===v&&g===h+1?3:4*(-1===v&&g===h)}(t,l,a,s,e.isComposing()),f=(()=>{let f=null===i||i.editor===e,p=d.has("history-push");if(!p&&f&&d.has("history-merge"))return 0;if(null===t)return 1;let h=l._selection;return a.size>0||s.size>0?!1===p&&0!==c&&c===o&&u<r+n&&f||1===a.size&&function(e,t,n){let r=t._nodeMap.get(e),o=n._nodeMap.get(e),l=t._selection,i=n._selection;return!((0,m.I2)(l)&&(0,m.I2)(i)&&"element"===l.anchor.type&&"element"===l.focus.type&&"text"===i.anchor.type&&"text"===i.focus.type||!(0,m.kF)(r)||!(0,m.kF)(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>o.exportJSON()))}(Array.from(a)[0],t,l)?0:1:2*(null===h)})();return r=u,o=c,f});return(0,k.Sd)(e.registerCommand(m.ZK,()=>((function(e,t){let n=t.redoStack,r=t.undoStack;if(0!==r.length){let o=t.current,l=r.pop();null!==o&&(n.push(o),e.dispatchCommand(m.WW,!0)),0===r.length&&e.dispatchCommand(m.Kf,!1),t.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:"historic"})}})(e,t),!0),m.jZ),e.registerCommand(m.V3,()=>((function(e,t){let n=t.redoStack,r=t.undoStack;if(0!==n.length){let o=t.current;null!==o&&(r.push(o),e.dispatchCommand(m.Kf,!0));let l=n.pop();0===n.length&&e.dispatchCommand(m.WW,!1),t.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:"historic"})}})(e,t),!0),m.jZ),e.registerCommand(m.SK,()=>(w(t),!1),m.jZ),e.registerCommand(m.t5,()=>(w(t),e.dispatchCommand(m.WW,!1),e.dispatchCommand(m.Kf,!1),!0),m.jZ),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:o,dirtyElements:i,tags:a})=>{let s=t.current,d=t.redoStack,u=t.undoStack,c=null===s?null:s.editorState;if(null!==s&&n===c)return;let f=l(r,n,s,o,i,a);if(1===f)0!==d.length&&(t.redoStack=[],e.dispatchCommand(m.WW,!1)),null!==s&&(u.push({...s}),e.dispatchCommand(m.Kf,!0));else if(2===f)return;t.current={editor:e,editorState:n}}))})(e,r,n),[n,e,r])}(n,t,e),null}let j="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function N({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){let[r]=(0,f.DF)();return j(()=>{if(n)return r.registerUpdateListener(({editorState:o,dirtyElements:l,dirtyLeaves:i,prevEditorState:a,tags:s})=>{t&&0===l.size&&0===i.size||e&&s.has("history-merge")||a.isEmpty()||n(o,r,s)})},[r,e,t,n]),null}var _=n(58647);function F(e){return()=>(function(e){if(!function(e,t=!0){if(e)return!1;let n=(0,m.Ni)().getTextContent();return t&&(n=n.trim()),""===n}(e,!1))return!1;let t=(0,m.Ni)().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){let n=t[e];if((0,m.Cy)(n))return!1;if((0,m.ff)(n)){if(!(0,m.bS)(n)||0!==n.__indent)return!1;let t=n.getChildren(),r=t.length;for(let n=0;n<r;n++){let n=t[e];if(!(0,m.kF)(n))return!1}}}return!0})(e)}(function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default})(function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});var B=n(47650),P=n(62002);let R="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function D(e){return e.getEditorState().read(F(e.isComposing()))}function I({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){var r;let[o]=(0,f.DF)(),i=function(e,t){let[n,r]=(0,s.useState)(()=>e.getDecorators());return R(()=>e.registerDecoratorListener(e=>{(0,B.flushSync)(()=>{r(e)})}),[e]),(0,s.useEffect)(()=>{r(e.getDecorators())},[e]),(0,s.useMemo)(()=>{let r=[],o=Object.keys(n);for(let i=0;i<o.length;i++){let a=o[i],d=(0,l.jsx)(t,{onError:t=>e._onError(t),children:(0,l.jsx)(s.Suspense,{fallback:null,children:n[a]})}),u=e.getElementByKey(a);null!==u&&r.push((0,B.createPortal)(d,u,a))}return r},[t,n,e])}(o,n);return R(()=>(0,k.Sd)((0,P.ZI)(r),function(e){let t=window.location.origin,n=n=>{if(n.origin!==t)return;let r=e.getRootElement();if(document.activeElement!==r)return;let o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch(e){return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){let r=t.payload;if(r&&"makeChanges"===r.functionId){let t=r.args;if(t){let[r,o,l,i,a,s]=t;e.update(()=>{let e=(0,m.vJ)();if((0,m.I2)(e)){let t=e.anchor,s=t.getNode(),d=0,u=0;if((0,m.kF)(s)&&r>=0&&o>=0&&(d=r,u=r+o,e.setTextNodeRange(s,d,s,u)),d===u&&""===l||(e.insertRawText(l),s=t.getNode()),(0,m.kF)(s)){d=i,u=i+a;let t=s.getTextContentSize();d=d>t?t:d,u=u>t?t:u,e.setTextNodeRange(s,d,s,u)}n.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}
1(r)),[r=o]),(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(L,{content:t}),i]})}function L({content:e}){let[t]=(0,f.DF)(),n=function(e){let[t,n]=(0,s.useState)(()=>D(e));return R(()=>{function t(){n(D(e))}return t(),(0,k.Sd)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),r=(0,_.a)();return n?"function"==typeof e?e(r):e:null}var T=n(59406);let A="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect,M=(0,s.forwardRef)(function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:a,ariaInvalid:d,ariaLabel:u,ariaLabelledBy:c,ariaMultiline:f,ariaOwns:m,ariaRequired:p,autoCapitalize:h,className:g,id:v,role:y="textbox",spellCheck:E=!0,style:x,tabIndex:b,"data-testid":C,...k},w){let[S,j]=(0,s.useState)(e.isEditable()),N=(0,s.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),_=(0,s.useMemo)(()=>(function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}})(w,N),[N,w]);return A(()=>(j(e.isEditable()),e.registerEditableListener(e=>{j(e)})),[e]),(0,l.jsx)("div",{"aria-activedescendant":S?t:void 0,"aria-autocomplete":S?n:"none","aria-controls":S?r:void 0,"aria-describedby":o,...null!=i?{"aria-errormessage":i}:{},"aria-expanded":S&&"combobox"===y?!!a:void 0,...null!=d?{"aria-invalid":d}:{},"aria-label":u,"aria-labelledby":c,"aria-multiline":f,"aria-owns":S?m:void 0,"aria-readonly":!S||void 0,"aria-required":p,autoCapitalize:h,className:g,contentEditable:S,"data-testid":C,id:v,ref:_,role:S?y:void 0,spellCheck:E,style:x,tabIndex:b,...k})});function O(e){return e.getEditorState().read(F(e.isComposing()))}let z=(0,s.forwardRef)(function(e,t){let{placeholder:n,...r}=e,[o]=(0,f.DF)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(M,{editor:o,...r,ref:t}),null!=n&&(0,l.jsx)(K,{editor:o,content:n})]})});function K({content:e,editor:t}){let n=function(e){let[t,n]=(0,s.useState)(()=>O(e));return A(()=>{function t(){n(O(e))}return t(),(0,k.Sd)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}
1(t),[r,o]=(0,s.useState)(t.isEditable());if((0,s.useLayoutEffect)(()=>(o(t.isEditable()),t.registerEditableListener(e=>{o(e)})),[t]),!n)return null;let i=null;return"function"==typeof e?i=e(r):null!==e&&(i=e),null===i?null:(0,l.jsx)("div",{"aria-hidden":!0,children:i})}var J=e=>{let{anchorElem:t,clientProps:n,plugin:r}=e;return"floatingAnchorElem"===r.position&&t?r.Component&&(0,l.jsx)(r.Component,{anchorElem:t,clientProps:n}):r.Component&&(0,l.jsx)(r.Component,{clientProps:n})};function W(){let e=(0,y.c)(3),[t]=(0,f.DF)(),n,r;return e[0]!==t?(n=()=>(0,k.Sd)(t.registerCommand(m.d8,V,m.Ac),t.registerCommand(m.w$,Y,m.Ac),t.registerCommand(m.gC,Y,m.Ac)),r=[t],e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]),(0,s.useEffect)(n,r),null}function V(e){var t;null===(t=document.querySelector(".decorator-selected"))||void 0===t||t.classList.remove("decorator-selected");let n=function(e){if(!(e.target instanceof Element))return;let t=e.target.closest('[data-lexical-decorator="true"]');if(!t)return;let n=(0,m.xL)(t);return(0,m.Cy)(n)?{decoratorElement:t,decoratorNode:n}:void 0}(e);if(!n)return!0;let{decoratorElement:r,decoratorNode:o}=n,{target:l}=e;if(!(l instanceof HTMLElement)||l.isContentEditable||l.closest('button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role="button"]'))(0,m.n1)(null);else{let e=(0,m.rU)();e.add(o.getKey()),(0,m.n1)(e),r.classList.add("decorator-selected")}return!0}function Y(e){let t=(0,m.vJ)();return!!(0,m.RT)(t)&&(e.preventDefault(),t.getNodes().forEach(q),!0)}function q(e){e.remove()}var U=function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:50,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:25,i=0;if(e&&!e.contains(r)){let{bottom:r,left:a,right:s,top:d}=e.getBoundingClientRect(),u=d+window.scrollY,c=r+window.scrollY;if(n<u-l||n>c+l||t<a-o||t>s+o)return -1;(t<a||t>s)&&(i=t<a?t-a:t-s)}return i};function G(e){let t=e.getBoundingClientRect(),n=getComputedStyle(e).getPropertyValue("transform");if(!n||"none"===n)return t;let r=n.split(",").pop();return t.y=t.y-Number(null==r?void 0:r.replace(")","")),t}function Z(e){let t=(e,t)=>e?parseFloat(window.getComputedStyle(e)[t]):0,{marginBottom:n,marginTop:r}=window.getComputedStyle(e),o=t(e.previousElementSibling,"marginBottom"),l=t(e.nextElementSibling,"marginTop"),i=Math.max(parseFloat(r),o);return{marginBottom:Math.max(parseFloat(n),l),marginTop:i}}function H(e){return e.getEditorState().read(()=>(0,m.Ni)().getChildrenKeys())}var X={props:null,result:null};function $(e){let{anchorElem:t,cache_threshold:n=20,editor:o,fuzzy:l=!1,horizontalOffset:i=0,point:{x:a,y:s},startIndex:d=0,useEdgeAsDefault:u=!1}=e;if(n>0&&X.props&&X.result&&X.props.fuzzy===e.fuzzy&&X.props.horizontalOffset===e.horizontalOffset&&X.props.useEdgeAsDefault===e.useEdgeAsDefault&&function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20,r=e.x-t.x,o=e.y-t.y;return r*r+o*o<=n*n}(X.props.point,e.point,n))return X.result;let c=t.getBoundingClientRect(),f=H(o),p={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return o.getEditorState().read(()=>{if(u){let[e,t]=[o.getElementByKey(f[0]),o.getElementByKey(f[f.length-1])];if(e&&t){let[n,r]=[G(e),G(t)];if(s<n.top?(p.blockElem=e,p.distance=n.top-s,p.blockNode=(0,m.ns)(f[0]),p.foundAtIndex=0):s>r.bottom&&(p.distance=s-r.bottom,p.blockNode=(0,m.ns)(f[f.length-1]),p.blockElem=t,p.foundAtIndex=f.length-1),null==p?void 0:p.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let t=d,n=0;for(;t>=0&&t<f.length;){let d=f[t],u=o.getElementByKey(d);if(null===u)break;let h=new r.g(a+i,s),g=r.l.fromDOMRect(G(u)),{marginBottom:v,marginTop:y}=Z(u),{distance:E,isOnBottomSide:x,isOnTopSide:b}=g.generateNewRect({bottom:g.bottom+v,left:c.left,right:c.right,top:g.top-y}).distanceFromPoint(h);if(0===E){p.blockElem=u,p.blockNode=(0,m.ns)(d),p.foundAtIndex=t,p.distance=E,p.blockNode&&"paragraph"===p.blockNode.getType()&&""===p.blockNode.getTextContent()&&(l||e.returnEmptyParagraphs||(p.blockElem=null,p.blockNode=null),p.isFoundNodeEmptyParagraph=!0);break}l&&E<p.distance&&(p.blockElem=u,p.blockNode=(0,m.ns)(d),p.distance=E,p.foundAtIndex=t),0===n&&(n=b?-1:x?1:1/0),t+=n}}),X.props=e,X.result={blockElem:p.blockElem,blockNode:p.blockNode,foundAtIndex:p.foundAtIndex,isFoundNodeEmptyParagraph:p.isFoundNodeEmptyParagraph},{blockElem:p.blockElem,blockNode:p.blockNode,foundAtIndex:p.foundAtIndex,isFoundNodeEmptyParagraph:p.isFoundNodeEmptyParagraph}}function Q(e,t){return!!e.closest(".".concat(t))}var ee=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function et(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
1if(!e){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}let o=e.getBoundingClientRect(),l=window.getComputedStyle(e),i=t.getBoundingClientRect(),a=n.getBoundingClientRect(),s;if(["lexical-block","lexical-upload","lexical-relationship"].some(t=>{var n;return null===(n=e.firstElementChild)||void 0===n?void 0:n.classList.contains(t)}))s=o.top+8-a.top;else{let t=!function(e){if(!e||ee.includes(e.tagName)||0===e.offsetHeight||0===e.offsetWidth)return!1;let t=window.getComputedStyle(e);return"table-cell"!==t.display&&"absolute"!==t.position&&"hidden"!==t.visibility&&"0"!==t.opacity}(e)?0:parseInt(l.lineHeight,10);s=o.top+(t-i.height)/2-a.top}t.style.opacity="1",t.style.transform="translate(".concat(r,"px, ").concat(s,"px)")}var en=1/0;function er(e){let{anchorElem:t}=e,n=void 0===t?document.body:t,[i]=(0,f.DF)();return function(e,t,n){var i;let a=t.parentElement,{editorConfig:d}=(0,o.b)(),u=(null==d?void 0:null===(i=d.admin)||void 0===i?void 0:i.hideGutter)?-24:12,c=(0,s.useRef)(null),[f,p]=(0,s.use
1State)(null);(0,s.useEffect)(()=>{var n;function o(n){var o;let l=n.target;if(!(0,r.f)(l))return;let i=U(a,n.pageX,n.pageY,l);if(-1===i){p(null);return}if(Q(l,"add-block-menu"))return;let s=H(e),{blockElem:d,blockNode:u,foundAtIndex:c}=$({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-i,point:new r.g(n.x,n.y),returnEmptyParagraphs:!0,startIndex:0===(o=s.length)?1/0:en>=0&&en<o?en:Math.floor(o/2),useEdgeAsDefault:!1});en=c,d&&u&&((null==f?void 0:f.node)!==u||(null==f?void 0:f.elem)!==d)&&p({elem:d,node:u})}return null===(n=document)||void 0===n||n.addEventListener("mousemove",o),()=>{var e;null===(e=document)||void 0===e||e.removeEventListener("mousemove",o)}},[a,t,e,f]),(0,s.useEffect)(()=>{c.current&&(null==f?void 0:f.node)&&et(null==f?void 0:f.elem,c.current,t,u)},[t,f,u]);let h=(0,s.useCallback)(t=>{let n=f;(null==n?void 0:n.node)&&(e.update(()=>{let t=!0;if(((null==n?void 0:n.node.getType())!=="paragraph"||""!==n.node.getTextContent())&&(t=!1),!t){let t=(0,m.lJ)();null==n||n.node.insertAfter(t),setTimeout(()=>{p(n={elem:e.getElementByKey(t.getKey()),node:t})},0)}}),setTimeout(()=>{e.update(()=>{e.focus(),(null==n?void 0:n.node)&&"select"in n.node&&"function"==typeof n.node.select&&n.node.select()})},1),setTimeout(()=>{e.dispatchCommand(r.j,{node:null==n?void 0:n.node})},2),t.stopPropagation(),t.preventDefault())},[e,f]);return(0,B.createPortal)((0,l.jsx)(s.Fragment,{children:(0,l.jsx)("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:e=>{h(e)},ref:c,type:"button",children:(0,l.jsx)("div",{className:n?"icon":""})})}),t)}(i,n,i._editable)}var eo=0,el="application/x-lexical-drag-block",ei=1/0;function ea(e){return 0===e?1/0:ei>=0&&ei<e?ei:Math.floor(e/2)}function es(e,t){e&&(e.style.opacity="0"),t&&(t.style.opacity="",t.style.marginBottom="",t.style.marginTop="")}function ed(e){let{anchorElem:t}=e,n=void 0===t?document.body:t,[i]=(0,f.DF)();return function(e,t,n){var i,a;let d=t.parentElement,u=(0,s.useRef)(null),c=(0,s.useRef)(null),f=(0,s.useRef)(null),p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(null),[v,y]=(0,s.useState)(null),{editorConfig:E}=(0,o.b)(),x=(null==E?void 0:null===(i=E.admin)||void 0===i?void 0:i.hideGutter)?-44:-8;return(0,s.useEffect)(()=>{var n;function o(n){let o=n.target;if(!(0,r.f)(o))return;let l=U(d,n.pageX,n.pageY,o);if(-1===l){g(null);return}if(Q(o,"draggable-block-menu"))return;let i=H(e),{blockElem:a,foundAtIndex:s,isFoundNodeEmptyParagraph:u}=$({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-l,point:new r.g(n.x,n.y),startIndex:ea(i.length),useEdgeAsDefault:!1,verbose:!1});ei=s,(a||u)&&h!==a&&g(a)}return null===(n=document)||void 0===n||n.addEventListener("mousemove",o),()=>{var e;null===(e=document)||void 0===e||e.removeEventListener("mousemove",o)}},[d,t,e,h]),(0,s.useEffect)(()=>{u.current&&et(h,u.current,t,x)},[t,h,x]),(0,s.useEffect)(()=>
1{function n(n){if(!p.current)return!1;let[o]=(0,P.gA)(n);if(o)return!1;let{pageY:l,target:i}=n;if(!(0,r.f)(i))return!1;let a=U(d,n.pageX,n.pageY,i,100,50),s=H(e),{blockElem:m,foundAtIndex:g,isFoundNodeEmptyParagraph:b}=$({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-a,point:new r.g(n.x,n.y),startIndex:ea(s.length),useEdgeAsDefault:!0,verbose:!0});ei=g;let C=c.current;if(null===m||null===C)return!1;if(h!==m){var k,w,S,j,N,_,F,B;let{isBelow:e,willStayInSamePosition:r}=function(e,t,n,r,o,l,i,a,s){let d=arguments.length>9&&void 0!==arguments[9]&&arguments[9],{height:u,top:c}=r.getBoundingClientRect(),{top:f,width:m}=i.getBoundingClientRect(),{marginBottom:p,marginTop:h}=Z(r),g=c,v=l>=c+u/2+window.scrollY,y=!1;if(null==o?void 0:o.elem)if(r!==(null==o?void 0:o.elem))(v&&(null==o?void 0:o.elem)&&(null==o?void 0:o.elem)===r.nextElementSibling||!v&&(null==o?void 0:o.elem)&&(null==o?void 0:o.elem)===r.previousElementSibling)&&++eo<200&&(y=!0);else{var E;eo++;let e=null==o?void 0:null===(E=o.boundingBox)||void 0===E?void 0:E.y,t=r.getBoundingClientRect().y;(v===(null==o?void 0:o.isBelow)&&e===t||eo<200)&&(y=!1)}if(y)return{isBelow:v,willStayInSamePosition:y};d?g+=u/2:v?g+=u+p/2:g-=h/2;let x=0;d||(x=v?-0:0);let b=g-f+x;return n.style.width="calc(".concat(m,"px - ").concat(e,")"),n.style.opacity=".8",n.style.transform="translate(".concat(-24-t,"px, calc(").concat(b,"px - 2px))"),(null==o?void 0:o.elem)&&(o.elem.style.opacity="",(null==o?void 0:o.elem)===r?v?o.elem.style.marginTop="":o.elem.style.marginBottom="":(o.elem.style.marginBottom="",o.elem.style.marginTop="")),eo=0,{isBelow:v,willStayInSamePosition:y}}((null==E?void 0:null===(k=E.admin)||void 0===k?void 0:k.hideGutter)?"0px":"3rem",x+((null==E?void 0:null===(w=E.admin)||void 0===w?void 0:w.hideGutter)?null!==(F=null==u?void 0:null===(j=u.current)||void 0===j?void 0:null===(S=j.getBoundingClientRect())||void 0===S?void 0:S.width)&&void 0!==F?F:0:-(null!==(B=null==u?void 0:null===(_=u.current)||void 0===_?void 0:null===(N=_.getBoundingClientRect())||void 0===N?void 0:N.width)&&void 0!==B?B:0)),C,m,v,l,t,n,f,b);n.preventDefault(),r||y({boundingBox:m.getBoundingClientRect(),elem:m,isBelow:e})}else(null==v?void 0:v.elem)&&(es(C,v.elem),y({boundingBox:m.getBoundingClientRect(),elem:m,isBelow:!1}));return!0}function o(n){if(!p.current)return!1;let[o]=(0,P.gA)(n);if(o)return!1;let{dataTransfer:l,pageY:i,target:a}=n,s=(null==l?void 0:l.getData(el))||"";return e.update(()=>{let o=(0,m.ns)(s);if(!o||!(0,r.f)(a))return!1;let{blockElem:l,isFoundNodeEmptyParagraph:u}=$({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-U(d,n.pageX,n.pageY,a,100,50),point:new r.g(n.x,n.y),useEdgeAsDefault:!0});if(!l)return!1;let c=(0,m.xL)(l);if(!c)return!1;if(c===o)return!0;let{height:f,top:p}=G(l),v=i>=p+f/2+window.scrollY;u?(c.insertBefore(o),c.remove()):v?c.insertAfter(o):c.insertBefore(o),null!==h&&g(null),document.querySelectorAll(".lexical-block-highlighter").forEach(e=>{e.remove()});let y=e.getElementByKey(o.getKey());setTimeout(()=>{let e=null==y?void 0:y.getBoundingClientRect();if(!e)return;let t=document.createElement("div");t.className="lexical-block-highlighter",t.style.backgroundColor="var(--theme-elevation-1000",t.style.transition="opacity 0.5s ease-in-out",t.style.zIndex="1",t.style.pointerEvents="none",t.style.boxSizing="border-box",t.style.borderRadius="4px",t.style.position="absolute",document.body.appendChild(t),t.style.opacity="0.1",t.style.height="".concat(e.height+8,"px"),t.style.width="".concat(e.width+8,"px"),t.style.top="".concat(e.top+window.scrollY-4,"px"),t.style.left="".concat(e.left-4,"px"),setTimeout(()=>{t.style.opacity="0",setTimeout(()=>{t.remove()},500)},1e3)},120)}),!0}return document.addEventListener("dragover",n),document.addEventListener("drop",o),()=>{document.removeEventListener("dragover",n),document.removeEventListener("drop",o)}},[d,x,t,e,v,h,null==E?void 0:null===(a=E.admin)||void 0===a?void 0:a.hideGutter]),(0,B.createPortal)((0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)("div",{className:"icon draggable-block-menu",draggable:!0,onDragEnd:function(){p.current=!1,(null==v?void 0:v.elem)&&es(c.current,null==v?void 0:v.elem)},onDragStart:function(t){let n=t.dataTransfer;if(!n||!h)return;!function(e,t){let{transform:n}=t.style;e.setDragImage(t,0,0),setTimeout(()=>{t.style.transform=n})}(n,h);let r="";e.update(()=>{let e=(0,m.xL)(h);e&&(r=e.getKey())}),p.current=!0,n.setData(el,r)},ref:u,children:(0,l.jsx)("div",{className:n?"icon":""})}),(0,l.jsx)("div",{className:"draggable-block-target-line",ref:c}),(0,l.jsx)("div",{className:"debug-highlight",ref:f})]}),t)}(i,n,i._editable)}var eu="insert-paragraph-at-end",ec=()=>{var e;let t,n=(0,y.c)(4),[r]=(0,f.DF)(),{editorConfig:i}=(0,o.b)();if(null==i?void 0:null===(e=i.admin)||void 0===e?void 0:e.hideInsertParagraphAtEnd)return null;n[0]!==r?(t=()=>{r.update(ef)},n[0]=r,n[1]=t):t=n[1];let a=t,s;return n[2]!==a?(s=(0,l.jsx)("div",{"aria-label":"Insert Paragraph",className:eu,onClick:a,role:"button",tabIndex:0,children:(0,l.jsx)("div",{className:"".concat(eu,"-inside"),children:(0,l.jsx)("span",{children:"+"})})}),n[2]=a,n[3]=s):s=n[3],s};function ef(){let e=(0,m.lJ)();(0,m.Ni)().append(e),e.select()}var em=()=>{let e=(0,y.c)(4),{editorConfig:t}=(0,o.b)(),[n]=(0,f.DF)(),l,i;return e[0]!==n||e[1]!==t.features.markdownTransformers?(l=()=>{var e;return(0,r.c)(n,null!==(e=t.features.markdownTransformers)&&void 0!==e?e:[])},i=[n,t.features.markdownTransformers],e[0]=n,e[1]=t.features.markdownTransformers,e[2]=l,e[3]=i):(l=e[2],i=e[3]),s.useEffect(l,i),null},ep="slash-menu-popup";function eh(e){let{isSelected:t,item:n,onClick:r,onMouseEnter:i,ref:a}=e,{fieldProps:{featureClientSchemaMap:s,schemaPath:d}}=(0,o.b)(),{i18n:u}=(0,T.d)(),c="".concat(ep,"__item ").concat(ep,"__item-").concat(n.key);t&&(c+=" ".concat(ep,"__item--selected"));let f=n.key;return n.label&&(f="function"==typeof n.label?n.label({featureClientSchemaMap:s,i18n:u,schemaPath:d}):n.label),f.length>25&&(f=f.substring(0,25)+"..."),(0,l.jsxs)("button",{"aria-selected":t,className:c,id:ep+"__item-"+n.key,onClick:r,onMouseEnter:i,ref:a,role:"option",tabIndex:-1,type:"button",children:[(null==n?void 0:n.Icon)&&(0,l.jsx)(n.Icon,{}),(0,l.jsx)("span",{className:"".concat(ep,"__item-text"),children:f})]},n.key)}function eg(e){let{anchorElem:t=document.body}
1=e,[n]=(0,f.DF)(),[i,a]=(0,s.useState)(null),{editorConfig:d}=(0,o.b)(),{i18n:u}=(0,T.d)(),{fieldProps:{featureClientSchemaMap:c,schemaPath:m}}=(0,o.b)(),p=function(e,t){let n=(0,y.c)(4),{maxLength:o,minLength:l}=t,i=void 0===o?75:o,a=void 0===l?1:l,s;return n[0]!==i||n[1]!==a||"/"!==n[2]?(s=t=>{let{query:n}=t,o="[^/"+r.i+"\\s]",l=RegExp("(^|\\s|\\()(["+e+"]((?:"+o+"){0,"+i+"}))$").exec(n);if(null!==l){let e=l[1],t=l[3];if(t.length>=a)return{leadOffset:l.index+e.length,matchingString:t,replaceableString:l[2]}}return null},n[0]=i,n[1]=a,n[2]=e,n[3]=s):s=n[3],s}("/",{minLength:0}),h=(0,s.useCallback)(()=>{let e=[];for(let t of d.features.slashMenu.dynamicGroups)if(i){let r=t({editor:n,queryString:i});e=e.concat(r)}return e},[n,i,null==d?void 0:d.features]),g=(0,s.useMemo)(()=>{var e,t;let n=[];for(let t of null!==(e=null==d?void 0:d.features.slashMenu.groups)&&void 0!==e?e:[])n.push(t);if(i)for(let e of(n=(n=n.map(e=>{let t=e.items.filter(e=>{let t=e.key;return e.label&&(t="function"==typeof e.label?e.label({featureClientSchemaMap:c,i18n:u,schemaPath:m}):e.label),!!RegExp(i,"gi").exec(t)||null!=e.keywords&&e.keywords.some(e=>RegExp(i,"gi").exec(e))});return t.length?{...e,items:t}:null})).filter(e=>null!=e),h())){let r=n.find(t=>t.key===e.key);r?n=n.filter(t=>t.key!==e.key):r={...e,items:[]},(null==r?void 0:null===(t=r.items)||void 0===t?void 0:t.length)&&(r.items=r.items.concat(r.items)),n.push(r)}return n},[i,null==d?void 0:d.features.slashMenu.groups,h,c,u,m]);return(0,l.jsx)(r.k,{anchorElem:t,groups:g,menuRenderFn:(e,t)=>{let{selectedItemKey:n,selectItemAndCleanUp:r,setSelectedItemKey:o}=t;return e.current&&g.length?B.createPortal((0,l.jsx)("div",{className:ep,children:g.map(e=>{let t=e.key;return e.label&&c&&(t="function"==typeof e.label?e.label({featureClientSchemaMap:c,i18n:u,schemaPath:m}):e.label),(0,l.jsxs)("div",{className:"".concat(ep,"__group ").concat(ep,"__group-").concat(e.key),children:[(0,l.jsx)("div",{className:"".concat(ep,"__group-title"),children:t}),e.items.map((e,t)=>(0,l.jsx)(eh,{index:t,isSelected:n===e.key,item:e,onClick:()=>{o(e.key),r(e)},onMouseEnter:()=>{o(e.key)},ref:t=>{e.ref={current:t}}},e.key))]},e.key)})}),e.current):null},onQueryChange:a,triggerFn:p})}function ev(e){let t,n=(0,y.c)(6),{features:r}=e,[o]=(0,f.DF)(),l;return n[0]!==o||n[1]!==r.enabledFormats?(l=()=>{var e;let t,n,l=(e=r.enabledFormats,t=Object.keys(m.LZ),n=new Set(e),t.filter(e=>!n.has(e)));if(0!==l.length)return o.registerNodeTransform(m.Ey,e=>{l.forEach(t=>{e.hasFormat(t)&&e.toggleFormat(t)})})},n[0]=o,n[1]=r.enabledFormats,n[2]=l):l=n[2],n[3]!==o||n[4]!==r?(t=[o,r],n[3]=o,n[4]=r,n[5]=t):t=n[5],(0,s.useEffect)(l,t),null}function ey(e){var t,n,r,o,i,a;let s=(0,y.c)(7),{className:d,editorConfig:u}=e,{t:c}=(0,T.d)(),f;if(s[0]!==d||s[1]!==(null==u?void 0:null===(t=u.admin)||void 0===t?void 0:t.placeholder)||s[2]!==c){let e;s[4]!==(null==u?void 0:null===(n=u.admin)||void 0===n?void 0:n.placeholder)||s[5]!==c?(e=null!==(a=null==u?void 0:null===(r=u.admin)||void 0===r?void 0:r.placeholder)&&void 0!==a?a:c("lexical:general:placeholder"),s[4]=null==u?void 0:null===(o=u.admin)||void 0===o?void 0:o.placeholder,s[5]=c,s[6]=e):e=s[6],f=(0,l.jsx)(z,{"aria-placeholder":c("lexical:general:placeholder"),className:null!=d?d:"ContentEditable__root",placeholder:(0,l.jsx)("p",{className:"editor-placeholder",children:e})}),s[0]=d,s[1]=null==u?void 0:null===(i=u.admin)||void 0===i?void 0:i.placeholder,s[2]=c,s[3]=f}else f=s[3];return f}var eE=e=>{let t,n=(0,y.c)(19),{editorConfig:r,editorContainerRef:i,isSmallWidthViewport:a,onChange:d}
1=e,u=(0,o.b)(),[c]=(0,f.DF)(),[p,h]=(0,s.useState)(null),g;n[0]===Symbol.for("react.memo_cache_sentinel")?(g=e=>{null!==e&&h(e)},n[0]=g):g=n[0];let v=g,E,x;if(n[1]!==c||n[2]!==u?(E=()=>{var e,t;if(!(null==u?void 0:u.uuid))return;(null==u?void 0:null===(e=u.parentEditor)||void 0===e?void 0:e.uuid)&&(null===(t=u.parentEditor)||void 0===t||t.registerChild(u.uuid,u));let n=()=>{u.focusEditor(u)},r=()=>{u.blurEditor(u)},o=c.registerCommand(m.$7,()=>(n(),!0),m.Ac),l=c.registerCommand(m.pF,()=>(r(),!0),m.Ac);return()=>{var e,t;o(),l(),null===(t=u.parentEditor)||void 0===t||null===(e=t.unregisterChild)||void 0===e||e.call(t,u.uuid)}},x=[c,u],n[1]=c,n[2]=u,n[3]=E,n[4]=x):(E=n[3],x=n[4]),(0,s.useEffect)(E,x),n[5]!==c||n[6]!==r||n[7]!==i||n[8]!==p||n[9]!==a||n[10]!==d){var b,k,w,j,_,F,B,P;let e,o;n[12]!==d?(e=(e,t,n)=>{(!n.has("focus")||n.size>1)&&(null==d||d(e,t,n))},n[12]=d,n[13]=e):e=n[13],n[14]!==c||n[15]!==r.features.plugins||n[16]!==p||n[17]!==a?(o=p&&(0,l.jsxs)(s.Fragment,{children:[!a&&c.isEditable()&&(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)(ed,{anchorElem:p}),(0,l.jsx)(er,{anchorElem:p})]}),null===(b=r.features.plugins)||void 0===b?void 0:b.map(e=>{if("floatingAnchorElem"===e.position&&!(!0===e.desktopOnly&&a))return(0,l.jsx)(J,{anchorElem:p,clientProps:e.clientProps,plugin:e},e.key)}),c.isEditable()&&(0,l.jsx)(s.Fragment,{children:(0,l.jsx)(eg,{anchorElem:p})})]}),n[14]=c,n[15]=r.features.plugins,n[16]=p,n[17]=a,n[18]=o):o=n[18],t=(0,l.jsxs)(s.Fragment,{children:[null===(k=r.features.plugins)||void 0===k?void 0:k.map(ex),(0,l.jsxs)("div",{className:"editor-container",ref:i,children:[null===(w=r.features.plugins)||void 0===w?void 0:w.map(eb),(0,l.jsx)(I,{contentEditable:(0,l.jsx)("div",{className:"editor-scroller",children:(0,l.jsx)("div",{className:"editor",ref:v,children:(0,l.jsx)(ey,{editorConfig:r})})}),ErrorBoundary:C}),(0,l.jsx)(ec,{}),(0,l.jsx)(W,{}),(0,l.jsx)(ev,{features:r.features}),(0,l.jsx)(N,{ignoreSelectionChange:!0,onChange:e}),o,c.isEditable()&&(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)(S,{}),(null==r?void 0:null===(_=r.features)||void 0===_?void 0:null===(j=_.markdownTransformers)||void 0===j?void 0:j.length)>0&&(0,l.jsx)(em,{})]}),null===(F=r.features.plugins)||void 0===F?void 0:F.map(eC),null===(B=r.features.plugins)||void 0===B?void 0:B.map(ek)]}),null===(P=r.features.plugins)||void 0===P?void 0:P.map(ew)]}),n[5]=c,n[6]=r,n[7]=i,n[8]=p,n[9]=a,n[10]=d,n[11]=t}else t=n[11];return t};function ex(e){if("aboveContainer"===e.position)return(0,l.jsx)(J,{clientProps:e.clientProps,plugin:e},e.key)}function eb(e){if("top"===e.position)return(0,l.jsx)(J,{clientProps:e.clientProps,plugin:e},e.key)}function eC(e){if("normal"===e.position)return(0,l.jsx)(J,{clientProps:e.clientProps,plugin:e},e.key)}function ek(e){if("bottom"===e.position)return(0,l.jsx)(J,{clientProps:e.clientProps,plugin:e},e.key)}function ew(e){if("belowContainer"===e.position)return(0,l.jsx)(J,{clientProps:e.clientProps,plugin:e},e.key)}var eS=e=>{let{children:t,providers:n}=e;if(!(null==n?void 0:n.length))return t;let r=n[0];return n.length>1?(0,l.jsx)(r,{children:(0,l.jsx)(eS,{providers:n.slice(1),children:t})}):(0,l.jsx)(r,{children:t})},ej=e=>{let{composerKey:t,editorConfig:n,fieldProps:a,isSmallWidthViewport:d,onChange:u,readOnly:c,value:f}=e,m=(0,o.b)(),p=(0,i.useEditDepth)(),h=s.useRef(null),g=(0,s.useMemo)(()=>{if(f&&"object"!=typeof f)throw Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(f));if(f&&Array.isArray(f)&&!("root"in f))throw Error("You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended");if(f&&"jsonContent"in f)throw Error("You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical");return{editable:!0!==c,editorState:null!=f?JSON.stringify(f):void 0,namespace:n.lexical.namespace,nodes:(0,r.m)({editorConfig:n}),onError:e=>{throw e},theme:n.lexical.theme}},[n]);return g?(0,l.jsx)(v,{initialConfig:g,children:(0,l.jsx)(o.a,{editorConfig:n,editorContainerRef:h,fieldProps:a,parentContext:(null==m?void 0:m.editDepth)===p?m:void 0,children:(0,l.jsx)(eS,{providers:n.features.providers,children:(0,l.jsx)(eE,{editorConfig:n,editorContainerRef:h,isSmallWidthViewport:d,onChange:u})})})},t+g.editable):(0,l.jsx)("p",{children:"Loading..."})},eN="rich-text-lexical";function e_(e){let{error:t}=e;return(0,l.jsxs)("div",{className:"errorBoundary",role:"alert",children:[(0,l.jsx)("p",{children:"Something went wrong:"}),(0,l.jsx)("pre",{style:{color:"red"},children:t.message})]})}var eF=e=>{var t;let{editorConfig:n,field:r,field:{name:o,admin:{className:d,description:u,readOnly:f}={},label:m,localized:p,required:h},path:g,readOnly:v,validate:y}
1=e,E=null!=g?g:o,x=(0,i.useEditDepth)(),b=(0,s.useCallback)((e,t)=>"function"!=typeof y||y(e,{...t,required:h}),[y,h]),{customComponents:{AfterInput:C,BeforeInput:k,Description:w,Error:S,Label:j}={},formInitializing:N,formProcessing:_,initialValue:F,setValue:B,showError:P,value:R}=(0,i.useField)({path:E,validate:b}),D=v||f||_||N,[I,L]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{let e=window.matchMedia("(max-width: 768px)").matches;e!==I&&L(e)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[I]);let T=[eN,"field-type",d,P&&"error",D&&"".concat(eN,"--read-only"),(null==n?void 0:null===(t=n.admin)||void 0===t?void 0:t.hideGutter)===!0||I?null:"".concat(eN,"--show-gutter")].filter(Boolean).join(" "),A="".concat(E,".").concat(x),M=(0,s.useCallback)(e=>{B(e.toJSON())},[B]),O=(0,s.useMemo)(()=>(0,a.FR)(r),[r]);return(0,l.jsxs)("div",{className:T,style:O,children:[(0,l.jsx)(i.RenderCustomComponent,{CustomComponent:S,Fallback:(0,l.jsx)(i.FieldError,{path:E,showError:P})}),j||(0,l.jsx)(i.FieldLabel,{label:m,localized:p,path:E,required:h}),(0,l.jsxs)("div",{className:"".concat(eN,"__wrap"),children:[(0,l.jsxs)(c,{fallbackRender:e_,onReset:()=>{},children:[k,(0,l.jsx)(ej,{composerKey:A,editorConfig:n,fieldProps:e,isSmallWidthViewport:I,onChange:M,readOnly:D,value:R},JSON.stringify({initialValue:F,path:E})),C]}),w,(0,l.jsx)(i.RenderCustomComponent,{CustomComponent:w,Fallback:(0,l.jsx)(i.FieldDescription,{description:u,path:E})})]})]},A)}}}]);
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.