PageSourceSearch

https://zerorank.ai/_next/static/chunks/1228.a573d0df6652ecbc.js

js zerorank.ai collected 2026-09-30 10:44:08 UTC 41,528 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1228],{21228:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RichText:()=>eZ});var r=n(29142),l=n(87758),o=n(95155),i=n(30746),a=n(30303),s=n(28021),u=n(12115);let d=(0,u.createContext)(null),c={didCatch:!1,error:null};class f extends u.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,l=Array(r),o=0;o<r;o++)l[o]=arguments[o];null==(t=(n=this.props).onReset)||t.call(n,{args:l,reason:"imperative-api"}),this.setState(c)}}componentDidCatch(e,t){var n,r;null==(n=(r=this.props).onError)||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 l,o;null==(l=(o=this.props).onReset)||l.call(o,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(c)}}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:l,error:o}=this.state,i=e;if(l){let e={error:o,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)i=t(e);else if(n)i=(0,u.createElement)(n,e);else if(void 0!==r)i=r;else throw o}return(0,u.createElement)(d.Provider,{value:{didCatch:l,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=c}}n(36697);var m=n(66934),p=n(98801);let g="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,h=g?u.useLayoutEffect:u.useEffect,y={tag:p.T40};function v({initialConfig:e,children:t}){let n=(0,u.useMemo)(()=>{let{theme:t,namespace:n,nodes:r,onError:l,editorState:o,html:i}=e,a=(0,m.Mx)(null,t),s=(0,p.ieJ)({editable:e.editable,html:i,namespace:n,nodes:r,onError:e=>l(e,s),theme:t});return function(e,t){if(null!==t){if(void 0===t)e.update(()=>{let t=(0,p.NiT)();if(t.isEmpty()){let n=(0,p.lJ7)();t.append(n);let r=g?document.activeElement:null;(null!==(0,p.vJq)()||null!==r&&r===e.getRootElement())&&n.select()}},y);else if(null!==t)switch(typeof t){case"string":{let n=e.parseEditorState(t);e.setEditorState(n,y);break}case"object":e.setEditorState(t,y);break;case"function":e.update(()=>{(0,p.NiT)().isEmpty()&&t(e)},y)}}}(s,o),[s,a]},[]);return h(()=>{let t=e.editable,[r]=n;r.setEditable(void 0===t||t)},[]),(0,o.jsx)(m.Gu.Provider,{value:n,children:t})}var E=n(19749);function b(e,t){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var x={error:null},C=function(e){function t(){for(var t,n=arguments.length,r=Array(n),l=0;l<n;l++)r[l]=arguments[l];return(t=e.call.apply(e,[this].concat(r))||this).state=x,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=Array(n),l=0;l<n;l++)r[l]=arguments[l];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,b(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,l,o,i=this.state.error,a=this.props.resetKeys;null!==i&&null!==t.error&&(void 0===(l=e.resetKeys)&&(l=[]),void 0===(o=a)&&(o=[]),l.length!==o.length||l.some(function(e,t){return!Object.is(e,o[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,l=t.fallback;if(null!==e){var o={error:e,resetErrorBoundary:this.resetErrorBoundary};if(u.isValidElement(l))return l;if("function"==typeof n)return n(o);if(r)return u.createElement(r,o);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(u.Component);function w({children:e,onError:t}){return(0,o.jsx)(C,{fallback:(0,o.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}var k=n(75288);function S(e){e.undoStack=[],e.redoStack=[],e.current=null}function j({delay:e,externalHistoryState:t}){let[n]=(0,m.DF)();return function(e,t,n=1e3){let r=(0,u.useMemo)(()=>t||{current:null,redoStack:[],undoStack:[]},[t]);(0,u.useEffect)(()=>(function(e,t,n){let r,l,o=(r=Date.now(),l=0,(t,o,i,a,s,u)=>{let d=Date.now();if(u.has(p.n0X))return l=0,r=d,2;let c=function(e,t,n,r,l){if(null===e||0===n.size&&0===r.size&&!l)return 0;let o=t._selection,i=e._selection;if(l)return 1;if(!((0,p.I2P)(o)&&(0,p.I2P)(i)&&i.isCollapsed()&&o.isCollapsed()))return 0;let a=function(e,t,n){let r=e._nodeMap,l=[];for(let e of t){let t=r.get(e);void 0!==t&&l.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);void 0===n||(0,p.hVZ)(n)||l.push(n)}return l}(t,n,r);if(0===a.length)return 0;if(a.length>
11){let n=t._nodeMap,r=n.get(o.anchor.key),l=n.get(i.anchor.key);return r&&l&&!e._nodeMap.has(r.__key)&&(0,p.kFe)(r)&&1===r.__text.length&&1===o.anchor.offset?2:0}let s=a[0],u=e._nodeMap.get(s.__key);if(!(0,p.kFe)(u)||!(0,p.kFe)(s)||u.__mode!==s.__mode)return 0;let d=u.__text,c=s.__text;if(d===c)return 0;let f=o.anchor,m=i.anchor;if(f.key!==m.key||"text"!==f.type)return 0;let g=f.offset,h=m.offset,y=c.length-d.length;return 1===y&&h===g-1?2:-1===y&&h===g+1?3:4*(-1===y&&h===g)}(t,o,a,s,e.isComposing()),f=(()=>{let f=null===i||i.editor===e,m=u.has(p.bMH);if(!m&&f&&u.has(p.T40))return 0;if(null===t)return 1;let g=o._selection;return a.size>0||s.size>0?!1===m&&0!==c&&c===l&&d<r+n&&f||1===a.size&&function(e,t,n){let r=t._nodeMap.get(e),l=n._nodeMap.get(e),o=t._selection,i=n._selection;return!((0,p.I2P)(o)&&(0,p.I2P)(i)&&"element"===o.anchor.type&&"element"===o.focus.type&&"text"===i.anchor.type&&"text"===i.focus.type||!(0,p.kFe)(r)||!(0,p.kFe)(l)||r.__parent!==l.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>l.exportJSON()))}(Array.from(a)[0],t,o)?0:1:2*(null===g)})();return r=d,l=c,f});return(0,k.Sd)(e.registerCommand(p.ZKf,()=>((function(e,t){let n=t.redoStack,r=t.undoStack;if(0!==r.length){let l=t.current,o=r.pop();null!==l&&(n.push(l),e.dispatchCommand(p.WWb,!0)),0===r.length&&e.dispatchCommand(p.KfJ,!1),t.current=o||null,o&&o.editor.setEditorState(o.editorState,{tag:p.n0X})}})(e,t),!0),p.jZM),e.registerCommand(p.V30,()=>((function(e,t){let n=t.redoStack,r=t.undoStack;if(0!==n.length){let l=t.current;null!==l&&(r.push(l),e.dispatchCommand(p.KfJ,!0));let o=n.pop();0===n.length&&e.dispatchCommand(p.WWb,!1),t.current=o||null,o&&o.editor.setEditorState(o.editorState,{tag:p.n0X})}})(e,t),!0),p.jZM),e.registerCommand(p.SKc,()=>(S(t),!1),p.jZM),e.registerCommand(p.t5V,()=>(S(t),e.dispatchCommand(p.WWb,!1),e.dispatchCommand(p.KfJ,!1),!0),p.jZM),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:l,dirtyElements:i,tags:a})=>{let s=t.current,u=t.redoStack,d=t.undoStack,c=null===s?null:s.editorState;if(null!==s&&n===c)return;let f=o(r,n,s,l,i,a);if(1===f)0!==u.length&&(t.redoStack=[],e.dispatchCommand(p.WWb,!1)),null!==s&&(d.push({...s}),e.dispatchCommand(p.KfJ,!0));else if(2===f)return;t.current={editor:e,editorState:n}}))})(e,r,n),[n,e,r])}(n,t,e),null}let N="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect;function _({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){let[r]=(0,m.DF)();return N(()=>{if(n)return r.registerUpdateListener(({editorState:l,dirtyElements:o,dirtyLeaves:i,prevEditorState:a,tags:s})=>{t&&0===o.size&&0===i.size||e&&s.has(p.T40)||a.isEmpty()||n(l,r,s)})},[r,e,t,n]),null}var B=n(40426);function P(e){return()=>(function(e){if(!function(e,t=!0){if(e)return!1;let n=(0,p.NiT)().getTextContent();return t&&(n=n.trim()),""===n}(e,!1))return!1;let t=(0,p.NiT)().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){let n=t[e];if((0,p.Cyw)(n))return!1;if((0,p.ff4)(n)){if(!(0,p.bSg)(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,p.kFe)(n))return!1}}}return!0})(e)}var D=n(47650),F=n(56881);let T="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect;function R(e){return e.getEditorState().read(P(e.isComposing()))}function L({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){var r;let[l]=(0,m.DF)(),i=function(e,t){let[n,r]=(0,u.useState)(()=>e.getDecorators());return T(()=>e.registerDecoratorListener(e=>{(0,D.flushSync)(()=>{r(e)})}),[e]),(0,u.useEffect)(()=>{r(e.getDecorators())},[e]),(0,u.useMemo)(()=>{let r=[],l=Object.keys(n);for(let i=0;i<l.length;i++){let a=l[i],s=(0,o.jsx)(t,{onError:t=>e._onError(t),children:(0,o.jsx)(u.Suspense,{fallback:null,children:n[a]})}),d=e.getElementByKey(a);null!==d&&r.push((0,D.createPortal)(s,d,a))}return r},[t,n,e])}(l,n);return T(()=>(0,k.Sd)((0,F.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 l=n.data;if("string"==typeof l){let t;try{t=JSON.parse(l)}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,l,o,i,a,s]=t;e.update(()=>{let e=(0,p.vJq)();if((0,p.I2P)(e)){let t=e.anchor,s=t.getNode(),u=0,d=0;if((0,p.kFe)(s)&&r>=0&&l>=0&&(u=r,d=r+l,e.setTextNodeRange(s,u,s,d)),u===d&&""===o||(e.insertRawText(o),s=t.getNode()),(0,p.kFe)(s)){u=i,d=i+a;let t=s.getTextContentSize();u=u>t?t:u,d=d>t?t:d,e.setTextNodeRange(s,u,s,d)}n.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(r)),[r=l]),(0,o.jsxs)(o.Fragment,{children:[e,(0,o.jsx)(I,{content:t}),i]})}function I({content:e}){let[t]=(0,m.DF)(),n=function(e){let[t,n]=(0,u.useState)(()=>R(e));return T(()=>{function t(){n(R(e))}return t(),(0,k.Sd)(e.registerUpdateListener(()=>{t()}
1),e.registerEditableListener(()=>{t()}))},[e]),t}(t),r=(0,B.a)();return n?"function"==typeof e?e(r):e:null}var A=n(14778),M=n(23750),O=n(61958);let J="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect,K=(0,u.forwardRef)(function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:l,ariaErrorMessage:i,ariaExpanded:a,ariaInvalid:s,ariaLabel:d,ariaLabelledBy:c,ariaMultiline:f,ariaOwns:m,ariaRequired:p,autoCapitalize:g,className:h,id:y,role:v="textbox",spellCheck:E=!0,style:b,tabIndex:x,"data-testid":C,...w},k){let[S,j]=(0,u.useState)(e.isEditable()),N=(0,u.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),_=(0,u.useMemo)(()=>(function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}})(k,N),[N,k]);return J(()=>(j(e.isEditable()),e.registerEditableListener(e=>{j(e)})),[e]),(0,o.jsx)("div",{"aria-activedescendant":S?t:void 0,"aria-autocomplete":S?n:"none","aria-controls":S?r:void 0,"aria-describedby":l,...null!=i?{"aria-errormessage":i}:{},"aria-expanded":S&&"combobox"===v?!!a:void 0,...null!=s?{"aria-invalid":s}:{},"aria-label":d,"aria-labelledby":c,"aria-multiline":f,"aria-owns":S?m:void 0,"aria-readonly":!S||void 0,"aria-required":p,autoCapitalize:g,className:h,contentEditable:S,"data-testid":C,id:y,ref:_,role:v,spellCheck:E,style:b,tabIndex:x,...w})});function z(e){return e.getEditorState().read(P(e.isComposing()))}let q=(0,u.forwardRef)(function(e,t){let{placeholder:n,...r}=e,[l]=(0,m.DF)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(K,{editor:l,...r,ref:t}),null!=n&&(0,o.jsx)(W,{editor:l,content:n})]})});function W({content:e,editor:t}){let n=function(e){let[t,n]=(0,u.useState)(()=>z(e));return J(()=>{function t(){n(z(e))}return t(),(0,k.Sd)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[r,l]=(0,u.useState)(t.isEditable());if((0,u.useLayoutEffect)(()=>(l(t.isEditable()),t.registerEditableListener(e=>{l(e)})),[t]),!n)return null;let i=null;return"function"==typeof e?i=e(r):null!==e&&(i=e),null===i?null:(0,o.jsx)("div",{"aria-hidden":!0,children:i})}var H=e=>{let{anchorElem:t,clientProps:n,plugin:r}=e;return"floatingAnchorElem"===r.position&&t?r.Component&&(0,o.jsx)(r.Component,{anchorElem:t,clientProps:n}):r.Component&&(0,o.jsx)(r.Component,{clientProps:n})},Z=e=>{if("fields"in e&&"object"==typeof e.fields&&null!==e.fields&&"id"in e.fields?e.fields.id=new M.default().toHexString():"id"in e&&(e.id=new M.default().toHexString()),e.children)for(let t of e.children)Z(t)};function V(){let e=(0,E.c)(3),[t]=(0,m.DF)(),n,r;return e[0]!==t?(n=()=>t.registerCommand(p.u5G,e=>{let n=(0,p.vJq)();if((0,p.RTZ)(n)){var r;let e=JSON.parse(JSON.stringify(null==(r=n.getNodes()[0])?void 0:r.exportJSON()));Z(e);let l=JSON.stringify({namespace:t._config.namespace,nodes:[e]});return(0,A.lW)(t,null,{"application/x-lexical-editor":l,"text/plain":""}).catch(Y),!0}return(0,A.lW)(t,(0,k.xj)(e,ClipboardEvent)?e:null).then(()=>{if(!(e instanceof ClipboardEvent)||!e.clipboardData)throw Error("No clipboard event");let t=e.clipboardData.getData("application/x-lexical-editor");if(!t)return!0;let n=JSON.parse(t);for(let e of n.nodes)Z(e);let r=JSON.stringify(n);e.clipboardData.setData("application/x-lexical-editor",r)}).catch(t=>{var n;throw e instanceof ClipboardEvent&&(null==(n=e.clipboardData)||n.setData("application/x-lexical-editor","")),t}),!0},p.AcJ),r=[t],e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]),(0,u.useEffect)(n,r),null}function Y(e){throw e}function U(){let e=(0,E.c)(3),[t]=(0,m.DF)(),n,r;return e[0]!==t?(n=()=>(0,k.Sd)(t.registerCommand(p.d8p,et,p.AcJ),t.registerCommand(p.w$Z,en,p.AcJ),t.registerCommand(p.gCZ,en,p.AcJ),t.registerCommand(p.MvL,ee,p.AcJ),t.registerCommand(p.UDz,$,p.AcJ),t.registerCommand(p.bbF,G,p.AcJ)),r=[t],e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]),(0,u.useEffect)(n,r),null}function G(e){let t=(0,p.vJq)();if((0,p.RTZ)(t)){var n,r,l;e.preventDefault();let o=null==(n=t.getNodes()[0])?void 0:n.getNextSibling();if((0,p.Cyw)(o)){let e=(0,p.i0_)().getElementByKey(o.getKey());return e&&el({element:e,node:o}),!0}if(!(0,p.ff4)(o))return!0;let i=null!=(l=o.getFirstDescendant())?l:o;return i&&(null==(r=(0,k.Bt)(i,eo))||r.selectEnd(),e.preventDefault()),!0}if(!(0,p.I2P)(t))return!1;let o=(t.isBackward()?t.anchor:t.focus).getNode(),i=(0,k.Bt)(o,X),a=null==i?void 0:i.getNextSibling();if(!i||a!==ei(i))return!1;if((0,p.Cyw)(a)){let t=(0,p.i0_)().getElementByKey(a.getKey());if(t)return el({element:t,node:a}),e.preventDefault(),!0}return!1}function X(e){return null!==ei(e)}function $(e){let t=(0,p.vJq)();if((0,p.RTZ)(t)){var n,r,l;let o=null==(n=t.getNodes()[0])?void 0:n.getPreviousSibling();if((0,p.Cyw)(o)){let t=(0,p.i0_)().getElementByKey(o.getKey());return!!t&&(el({element:t,node:o}),e.preventDefault(),!0)}if(!(0,p.ff4)(o))return!1;let i=null!=(l=o.getLastDescendant())?l:o;return!!i&&(null==(r=(0,k.Bt)(i,eo))||r.selectStart(),e.preventDefault(),!0)}if(!(0,p.I2P)(t))return!1;let o=(t.isBackward()?t.anchor:t.focus).getNode(),i=(0,k.Bt)(o,Q),a=null==i?void 0:i.getPreviousSibling();if(!i||a!==ea(i))return!1;if((0,p.Cyw)(a)){let t=(0,p.i0_)().getElementByKey(a.getKey());if(t)return el({element:t,node:a}),e.preventDefault(),!0}return!1}function Q(e){return null!==ea(e)}function ee(){var e,t;let n=function(){let e=(0,p.vJq)();if(!(0,p.RTZ)(e))return;let t=e.getNodes();if(1!==t.length)return;let n=t[0];return(0,p.Cyw)(n)?{decorator:n,element:(0,p.i0_)().getElementByKey(n.getKey())}:void 0}();
1return null==(e=document.querySelector(".decorator-selected"))||e.classList.remove("decorator-selected"),!!n&&(null==(t=n.element)||t.classList.add("decorator-selected"),!0)}function et(e){var t;null==(t=document.querySelector(".decorator-selected"))||t.classList.remove("decorator-selected");let n=function(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest('[data-lexical-decorator="true"]');if(!(t instanceof HTMLElement))return;let n=(0,p.xL4)(t);return(0,p.Cyw)(n)?{element:t,node:n}:void 0}(e);if(!n)return!0;let{target:r}=e;return!(r instanceof HTMLElement)||r.isContentEditable||r.closest('button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role="button"]')?(0,p.n1P)(null):el(n),!0}function en(e){let t=(0,p.vJq)();return!!(0,p.RTZ)(t)&&(e.preventDefault(),t.getNodes().forEach(er),!0)}function er(e){e.remove()}function el(e){var t;let{element:n,node:r}=e;null==(t=document.querySelector(".decorator-selected"))||t.classList.remove("decorator-selected");let l=(0,p.rUs)();l.add(r.getKey()),(0,p.n1P)(l),n.scrollIntoView({behavior:"smooth",block:"nearest"}),n.classList.add("decorator-selected")}function eo(e){if((0,p.Cyw)(e)&&!e.isInline())return!0;if(!(0,p.ff4)(e)||(0,p.IqF)(e))return!1;let t=e.getFirstChild(),n=null===t||(0,p.wH$)(t)||(0,p.kFe)(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function ei(e){let t=e.getNextSibling();for(;null!==t;){if(eo(t))return t;t=t.getNextSibling()}return null}function ea(e){let t=e.getPreviousSibling();for(;null!==t;){if(eo(t))return t;t=t.getPreviousSibling()}return null}var es=function(e,t,n,r){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:50,o=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:u}=e.getBoundingClientRect(),d=u+window.scrollY,c=r+window.scrollY;if(n<d-o||n>c+o||t<a-l||t>s+l)return -1;(t<a||t>s)&&(i=t<a?t-a:t-s)}return i};function eu(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 ed(e){let t=(e,t)=>e?parseFloat(window.getComputedStyle(e)[t]):0,{marginBottom:n,marginTop:r}=window.getComputedStyle(e),l=t(e.previousElementSibling,"marginBottom"),o=t(e.nextElementSibling,"marginTop"),i=Math.max(parseFloat(r),l);return{marginBottom:Math.max(parseFloat(n),o),marginTop:i}}function ec(e){return e.getEditorState().read(()=>(0,p.NiT)().getChildrenKeys())}var ef={props:null,result:null};function em(e){let{anchorElem:t,cache_threshold:n=20,editor:l,fuzzy:o=!1,horizontalOffset:i=0,point:{x:a,y:s},startIndex:u=0,useEdgeAsDefault:d=!1}=e;if(n>0&&ef.props&&ef.result&&ef.props.fuzzy===e.fuzzy&&ef.props.horizontalOffset===e.horizontalOffset&&ef.props.useEdgeAsDefault===e.useEdgeAsDefault&&function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20,r=e.x-t.x,l=e.y-t.y;return r*r+l*l<=n*n}(ef.props.point,e.point,n))return ef.result;let c=t.getBoundingClientRect(),f=ec(l),m={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return l.getEditorState().read(()=>{if(d){let e=l.getElementByKey(f[0]),t=l.getElementByKey(f[f.length-1]);if(e&&t){let[n,r]=[eu(e),eu(t)];if(s<n.top?(m.blockElem=e,m.distance=n.top-s,m.blockNode=(0,p.nsf)(f[0]),m.foundAtIndex=0):s>r.bottom&&(m.distance=s-r.bottom,m.blockNode=(0,p.nsf)(f[f.length-1]),m.blockElem=t,m.foundAtIndex=f.length-1),null==m?void 0:m.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let t=u,n=0;for(;t>=0&&t<f.length;){let u=f[t],d=l.getElementByKey(u);if(null===d)break;let g=new r.f(a+i,s),h=r.k.fromDOMRect(eu(d)),{marginBottom:y,marginTop:v}=ed(d),{distance:E,isOnBottomSide:b,isOnTopSide:x}=h.generateNewRect({bottom:h.bottom+y,left:c.left,right:c.right,top:h.top-v}).distanceFromPoint(g);if(0===E){m.blockElem=d,m.blockNode=(0,p.nsf)(u),m.foundAtIndex=t,m.distance=E,m.blockNode&&"paragraph"===m.blockNode.getType()&&""===m.blockNode.getTextContent()&&(o||e.returnEmptyParagraphs||(m.blockElem=null,m.blockNode=null),m.isFoundNodeEmptyParagraph=!0);break}o&&E<m.distance&&(m.blockElem=d,m.blockNode=(0,p.nsf)(u),m.distance=E,m.foundAtIndex=t),0===n&&(n=x?-1:b?1:1/0),t+=n}}),ef.props=e,ef.result={blockElem:m.blockElem,blockNode:m.blockNode,foundAtIndex:m.foundAtIndex,isFoundNodeEmptyParagraph:m.isFoundNodeEmptyParagraph},{blockElem:m.blockElem,blockNode:m.blockNode,foundAtIndex:m.foundAtIndex,isFoundNodeEmptyParagraph:m.isFoundNodeEmptyParagraph}}function ep(e,t){return!!e.closest(".".concat(t))}var eg=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function eh(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 l=e.getBoundingClientRect(),o=window.getComputedStyle(e),i=t.getBoundingClientRect(),a=n.getBoundingClientRect(),s;if(["LexicalEditorTheme__block","LexicalEditorTheme__upload","LexicalEditorTheme__relationship"].some(t=>{var n;return e.classList.contains(t)||(null==(n=e.firstElementChild)?void 0:n.classList.contains(t))}))s=l.top+8-a.top;else{let t=!function(e){if(!e||eg.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(o.lineHeight,10);s=l.top+(t-i.height)/2-a.top}t.style.opacity="1",t.style.transform="translate(".concat(r,"px, ").concat(s,"px)")}var ey=1/0;function ev(e){let{anchorElem:t}=e,n=void 0===t?document.body:t,[i]=(0,m.DF)();return function(e,t,n){var i;let a=t.parentElement,{editorConfig:s}=(0,l.b)(),d=(null==s||null==(i=s.admin)?void 0:i.hideGutter)?-24:12,c=(0,u.useRef)(null),[f,m]=(0,u.useState)(null);(0,u.useEffect)(()=>{var n;function l(n){var l;let o=n.target;if(!(0,p.sby)(o))return;let i=es(a,n.pageX,n.pageY,o);if(-1===i)return void m(null);if(ep(o,"add-block-menu"))return;let s=ec(e),{blockElem:u,blockNode:d,foundAtIndex:c}=em({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-i,point:new r.f(n.x,n.y),returnEmptyParagraphs:!0,startIndex:0===(l=s.length)?1/0:ey>=0&&ey<l?ey:Math.floor(l/2),useEdgeAsDefault:!1});ey=c,u&&d&&((null==f?void 0:f.node)!==d||(null==f?void 0:f.elem)!==u)&&m({elem:u,node:d})}return null==(n=document)||n.addEventListener("mousemove",l),()=>{var e;null==(e=document)||e.removeEventListener("mousemove",l)}},[a,t,e,f]),(0,u.useEffect)(()=>{c.current&&(null==f?void 0:f.node)&&eh(null==f?void 0:f.elem,c.current,t,d)},[t,f,d]);let g=(0,u.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,p.lJ7)();null==n||n.node.insertAfter(t),setTimeout(()=>{m(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.i,{node:null==n?void 0:n.node})},2),t.stopPropagation(),t.preventDefault())},[e,f]);return(0,D.createPortal)((0,o.jsx)(u.Fragment,{children:(0,o.jsx)("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:e=>{g(e)},ref:c,type:"button",children:(0,o.jsx)("div",{className:n?"icon":""})})}),t)}(i,n,i._editable)}var eE=0,eb="application/x-lexical-drag-block",ex=1/0;function eC(e){return 0===e?1/0:ex>=0&&ex<e?ex:Math.floor(e/2)}function ew(e,t){e&&(e.style.opacity="0"),t&&(t.style.opacity="",t.style.marginBottom="",t.style.marginTop="")}function ek(e){let{anchorElem:t}=e,n=void 0===t?document.body:t,[i]=(0,m.DF)();return function(e,t,n){var i,a;let s=t.parentElement,d=(0,u.useRef)(null),c=(0,u.useRef)(null),f=(0,u.useRef)(null),m=(0,u.useRef)(!1),[g,h]=(0,u.useState)(null),[y,v]=(0,u.useState)(null),{editorConfig:E}=(0,l.b)(),b=(null==E||null==(i=E.admin)?void 0:i.hideGutter)?-44:-8;return(0,u.useEffect)(()=>{var n;function l(n){let l=n.target;if(!(0,p.sby)(l))return;let o=es(s,n.pageX,n.pageY,l);if(-1===o)return void h(null);if(ep(l,"draggable-block-menu"))return;let i=ec(e),{blockElem:a,foundAtIndex:u,isFoundNodeEmptyParagraph:d}=em({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-o,point:new r.f(n.x,n.y),startIndex:eC(i.length),useEdgeAsDefault:!1,verbose:!1});ex=u,(a||d)&&g!==a&&h(a)}return null==(n=document)||n.addEventListener("mousemove",l),()=>{var e;null==(e=document)||e.removeEventListener("mousemove",l)}},[s,t,e,g]),(0,u.useEffect)(()=>{d.current&&eh(g,d.current,t,b)},[t,g,b]),(0,u.useEffect)(()=>
1{function n(n){if(!m.current)return!1;let[l]=(0,F.gA)(n);if(l)return!1;let{pageY:o,target:i}=n;if(!(0,p.sby)(i))return!1;let a=es(s,n.pageX,n.pageY,i,100,50),u=ec(e),{blockElem:h,foundAtIndex:x,isFoundNodeEmptyParagraph:C}=em({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-a,point:new r.f(n.x,n.y),startIndex:eC(u.length),useEdgeAsDefault:!0,verbose:!0});ex=x;let w=c.current;if(null===h||null===w)return!1;if(g!==h){var k,S,j,N,_,B,P,D;let{isBelow:e,willStayInSamePosition:r}=function(e,t,n,r,l,o,i,a,s){let u=arguments.length>9&&void 0!==arguments[9]&&arguments[9],{height:d,top:c}=r.getBoundingClientRect(),{top:f,width:m}=i.getBoundingClientRect(),{marginBottom:p,marginTop:g}=ed(r),h=c,y=o>=c+d/2+window.scrollY,v=!1;if(null==l?void 0:l.elem)if(r!==(null==l?void 0:l.elem))(y&&(null==l?void 0:l.elem)&&(null==l?void 0:l.elem)===r.nextElementSibling||!y&&(null==l?void 0:l.elem)&&(null==l?void 0:l.elem)===r.previousElementSibling)&&++eE<200&&(v=!0);else{var E;eE++;let e=null==l||null==(E=l.boundingBox)?void 0:E.y,t=r.getBoundingClientRect().y;(y===(null==l?void 0:l.isBelow)&&e===t||eE<200)&&(v=!1)}if(v)return{isBelow:y,willStayInSamePosition:v};u?h+=d/2:y?h+=d+p/2:h-=g/2;let b=0;u||(b=y?-0:0);let x=h-f+b;return n.style.width="calc(".concat(m,"px - ").concat(e,")"),n.style.opacity=".8",n.style.transform="translate(".concat(-24-t,"px, calc(").concat(x,"px - 2px))"),(null==l?void 0:l.elem)&&(l.elem.style.opacity="",(null==l?void 0:l.elem)===r?y?l.elem.style.marginTop="":l.elem.style.marginBottom="":(l.elem.style.marginBottom="",l.elem.style.marginTop="")),eE=0,{isBelow:y,willStayInSamePosition:v}}((null==E||null==(k=E.admin)?void 0:k.hideGutter)?"0px":"3rem",b+((null==E||null==(S=E.admin)?void 0:S.hideGutter)?null!=(P=null==d||null==(N=d.current)||null==(j=N.getBoundingClientRect())?void 0:j.width)?P:0:-(null!=(D=null==d||null==(B=d.current)||null==(_=B.getBoundingClientRect())?void 0:_.width)?D:0)),w,h,y,o,t,n,f,C);n.preventDefault(),r||v({boundingBox:h.getBoundingClientRect(),elem:h,isBelow:e})}
1else(null==y?void 0:y.elem)&&(ew(w,y.elem),v({boundingBox:h.getBoundingClientRect(),elem:h,isBelow:!1}));return!0}function l(n){if(!m.current)return!1;let[l]=(0,F.gA)(n);if(l)return!1;let{dataTransfer:o,pageY:i,target:a}=n,u=(null==o?void 0:o.getData(eb))||"";return e.update(()=>{let l=(0,p.nsf)(u);if(!l||!(0,p.sby)(a))return!1;let{blockElem:o,isFoundNodeEmptyParagraph:d}=em({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-es(s,n.pageX,n.pageY,a,100,50),point:new r.f(n.x,n.y),useEdgeAsDefault:!0});if(!o)return!1;let c=(0,p.xL4)(o);if(!c)return!1;if(c===l)return!0;let{height:f,top:m}=eu(o),y=i>=m+f/2+window.scrollY;d?(c.insertBefore(l),c.remove()):y?c.insertAfter(l):c.insertBefore(l),null!==g&&h(null),document.querySelectorAll(".lexical-block-highlighter").forEach(e=>{e.remove()});let v=e.getElementByKey(l.getKey());setTimeout(()=>{let e=null==v?void 0:v.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",l),()=>{document.removeEventListener("dragover",n),document.removeEventListener("drop",l)}},[s,b,t,e,y,g,null==E||null==(a=E.admin)?void 0:a.hideGutter]),(0,D.createPortal)((0,o.jsxs)(u.Fragment,{children:[(0,o.jsx)("button",{"aria-label":"Drag to move",className:"icon draggable-block-menu",draggable:!0,onDragEnd:function(){m.current=!1,(null==y?void 0:y.elem)&&ew(c.current,null==y?void 0:y.elem)},onDragStart:function(t){let n=t.dataTransfer;if(!n||!g)return;!function(e,t){let{transform:n}=t.style;e.setDragImage(t,0,0),setTimeout(()=>{t.style.transform=n})}(n,g);let r="";e.update(()=>{let e=(0,p.xL4)(g);e&&(r=e.getKey())}),m.current=!0,n.setData(eb,r)},ref:d,type:"button",children:(0,o.jsx)("div",{className:n?"icon":""})}),(0,o.jsx)("div",{className:"draggable-block-target-line",ref:c}),(0,o.jsx)("div",{className:"debug-highlight",ref:f})]}),t)}(i,n,i._editable)}var eS="insert-paragraph-at-end",ej=()=>{var e;let t,n=(0,E.c)(2),[r]=(0,m.DF)(),{editorConfig:i}=(0,l.b)();return(null==i||null==(e=i.admin)?void 0:e.hideInsertParagraphAtEnd)?null:(n[0]!==r?(t=(0,o.jsx)("div",{"aria-label":"Insert Paragraph",className:eS,onClick:()=>{r.update(eN)},role:"button",tabIndex:0,children:(0,o.jsx)("div",{className:"".concat(eS,"-inside"),children:(0,o.jsx)("span",{children:"+"})})}),n[0]=r,n[1]=t):t=n[1],t)};function eN(){let e=(0,p.lJ7)();(0,p.NiT)().append(e),e.select()}var e_=()=>{let e=(0,E.c)(4),{editorConfig:t}=(0,l.b)(),[n]=(0,m.DF)(),o,i;return e[0]!==n||e[1]!==t.features.markdownTransformers?(o=()=>{var e;return(0,r.a)(n,null!=(e=t.features.markdownTransformers)?e:[])},i=[n,t.features.markdownTransformers],e[0]=n,e[1]=t.features.markdownTransformers,e[2]=o,e[3]=i):(o=e[2],i=e[3]),u.useEffect(o,i),null};function eB(){let[e]=(0,m.DF)();return(0,u.useEffect)(()=>e.registerNodeTransform(p.haT,e=>{let t=(0,p.vJq)();if((0,p.I2P)(t)){let n=t.anchor.getNode(),r=t.focus.getNode();n.isAttached()&&r.isAttached()||(e.selectEnd(),console.warn("updateEditor: selection has been moved to the end of the editor because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node."))}return!1}),[e]),null}function eP(){let[e]=(0,m.DF)();return(0,u.useEffect)(()=>e.registerCommand(p.HYn,()=>{if((0,p.vJq)())return!1;let e=document.activeElement;return e instanceof HTMLInputElement&&e.select(),!0},p.AcJ),[e]),null}var eD="slash-menu-popup";function eF(e){let{isSelected:t,item:n,onClick:r,onMouseEnter:i,ref:a}=e,{fieldProps:{featureClientSchemaMap:s,schemaPath:u}}=(0,l.b)(),{i18n:d}=(0,O.d)(),c="".concat(eD,"__item ").concat(eD,"__item-").concat(n.key);t&&(c+=" ".concat(eD,"__item--selected"));let f=n.key;return n.label&&(f="function"==typeof n.label?n.label({featureClientSchemaMap:s,i18n:d,schemaPath:u}):n.label),f.length>25&&(f=f.substring(0,25)+"..."),(0,o.jsxs)("button",{"aria-selected":t,className:c,id:eD+"__item-"+n.key,onClick:r,onMouseEnter:i,ref:a,role:"option",tabIndex:-1,type:"button",children:[(null==n?void 0:n.Icon)&&(0,o.jsx)(n.Icon,{}),(0,o.jsx)("span",{className:"".concat(eD,"__item-text"),children:f})]},n.key)}function eT(e){let{anchorElem:t=document.body}=e,[n]=(0,m.DF)(),[i,a]=(0,u.useState)(null),{editorConfig:s}=(0,l.b)(),{i18n:d}=(0,O.d)(),{fieldProps:{featureClientSchemaMap:c,schemaPath:f}}=(0,l.b)(),p=function(e,t){let n=(0,E.c)(4),{maxLength:l,minLength:o}=t,i=void 0===l?75:l,a=void 0===o?1:o,s;return n[0]!==i||n[1]!==a||"/"!==n[2]?(s=t=>{let{query:n}=t,l="[^/"+r.h+"\\s]",o=RegExp("(^|\\s|\\()(["+e+"]((?:"+l+"){0,"+i+"}))$").exec(n);
1if(null!==o){let e=o[1],t=o[3];if(t.length>=a)return{leadOffset:o.index+e.length,matchingString:t,replaceableString:o[2]}}return null},n[0]=i,n[1]=a,n[2]=e,n[3]=s):s=n[3],s}("/",{minLength:0}),g=(0,u.useCallback)(()=>{let e=[];for(let t of s.features.slashMenu.dynamicGroups)if(i){let r=t({editor:n,queryString:i});e=e.concat(r)}return e},[n,i,null==s?void 0:s.features]),h=(0,u.useMemo)(()=>{var e,t;let n=[];for(let t of null!=(e=null==s?void 0:s.features.slashMenu.groups)?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:d,schemaPath:f}):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),g())){let r=n.find(t=>t.key===e.key);r?n=n.filter(t=>t.key!==e.key):r={...e,items:[]},(null==r||null==(t=r.items)?void 0:t.length)&&(r.items=r.items.concat(r.items)),n.push(r)}return n},[i,null==s?void 0:s.features.slashMenu.groups,g,c,d,f]);return(0,o.jsx)(r.j,{anchorElem:t,groups:h,menuRenderFn:(e,t)=>{let{selectedItemKey:n,selectItemAndCleanUp:r,setSelectedItemKey:l}=t;return e.current&&h.length?D.createPortal((0,o.jsx)("div",{className:eD,children:h.map(e=>{let t=e.key;return e.label&&c&&(t="function"==typeof e.label?e.label({featureClientSchemaMap:c,i18n:d,schemaPath:f}):e.label),(0,o.jsxs)("div",{className:"".concat(eD,"__group ").concat(eD,"__group-").concat(e.key),children:[(0,o.jsx)("div",{className:"".concat(eD,"__group-title"),children:t}),e.items.map((e,t)=>(0,o.jsx)(eF,{index:t,isSelected:n===e.key,item:e,onClick:()=>{l(e.key),r(e)},onMouseEnter:()=>{l(e.key)},ref:t=>{e.ref={current:t}}},e.key))]},e.key)})}),e.current):null},onQueryChange:a,triggerFn:p})}function eR(e){let t,n=(0,E.c)(6),{features:r}=e,[l]=(0,m.DF)(),o;return n[0]!==l||n[1]!==r.enabledFormats?(o=()=>{var e;let t,n,o=(e=r.enabledFormats,t=Object.keys(p.LZn),n=new Set(e),t.filter(e=>!n.has(e)));if(0!==o.length)return l.registerNodeTransform(p.Ey8,e=>{o.forEach(t=>{e.hasFormat(t)&&e.toggleFormat(t)})})},n[0]=l,n[1]=r.enabledFormats,n[2]=o):o=n[2],n[3]!==l||n[4]!==r?(t=[l,r],n[3]=l,n[4]=r,n[5]=t):t=n[5],(0,u.useEffect)(o,t),null}function eL(e){var t,n,r,l;let i=(0,E.c)(5),{className:a,editorConfig:s}=e,{t:u}=(0,O.d)(),[,d]=(0,m.DF)(),{getTheme:c}=d,f;if(i[0]!==a||i[1]!==(null==s||null==(t=s.admin)?void 0:t.placeholder)||i[2]!==c||i[3]!==u){let e=c();f=(0,o.jsx)(q,{"aria-placeholder":u("lexical:general:placeholder"),className:null!=a?a:"ContentEditable__root",placeholder:(0,o.jsx)("p",{className:null==e?void 0:e.placeholder,children:null!=(l=null==s||null==(n=s.admin)?void 0:n.placeholder)?l:u("lexical:general:placeholder")})}),i[0]=a,i[1]=null==s||null==(r=s.admin)?void 0:r.placeholder,i[2]=c,i[3]=u,i[4]=f}else f=i[4];return f}var eI=e=>{var t,n,r,i,a,s,d,c,f,g;let h,y=(0,E.c)(12),{editorConfig:v,editorContainerRef:b,isSmallWidthViewport:x,onChange:C}=e,k=(0,l.b)(),[S]=(0,m.DF)(),N=(0,B.a)(),[P,D]=(0,u.useState)(null),F;y[0]===Symbol.for("react.memo_cache_sentinel")?(F=e=>{null!==e&&D(e)},y[0]=F):F=y[0];let T=F,R,I;return y[1]!==S||y[2]!==k?(R=()=>{var e,t;if(!(null==k?void 0:k.uuid))return void console.error("Lexical Editor must be used within an EditorConfigProvider");(null==k||null==(e=k.parentEditor)?void 0:e.uuid)&&(null==(t=k.parentEditor)||t.registerChild(k.uuid,k));let n=S.registerCommand(p.$7r,()=>(k.focusEditor(k),!0),p.AcJ),r=S.registerCommand(p.I2H,()=>(k.blurEditor(k),!0),p.AcJ);return()=>{var e,t;n(),r(),null==(t=k.parentEditor)||null==(e=t.unregisterChild)||e.call(t,k.uuid)}},I=[S,k],y[1]=S,y[2]=k,y[3]=R,y[4]=I):(R=y[3],I=y[4]),(0,u.useEffect)(R,I),y[5]!==v||y[6]!==b||y[7]!==P||y[8]!==N||y[9]!==x||y[10]!==C?(h=(0,o.jsxs)(u.Fragment,{children:[null==(t=v.features.plugins)?void 0:t.map(eA),(0,o.jsxs)("div",{className:"editor-container",ref:b,children:[null==(n=v.features.plugins)?void 0:n.map(eM),(0,o.jsx)(L,{contentEditable:(0,o.jsx)("div",{className:"editor-scroller",children:(0,o.jsx)("div",{className:"editor",ref:T,children:(0,o.jsx)(eL,{editorConfig:v})})}),ErrorBoundary:w}),(0,o.jsx)(eB,{}),N&&(0,o.jsx)(ej,{}),(0,o.jsx)(U,{}),(0,o.jsx)(V,{}),(0,o.jsx)(eR,{features:v.features}),(0,o.jsx)(eP,{}
1),N&&(0,o.jsx)(_,{ignoreSelectionChange:!0,onChange:(e,t,n)=>{(!n.has("focus")||n.size>1)&&(null==C||C(e,t,n))}}),P&&(0,o.jsxs)(u.Fragment,{children:[!x&&N&&(0,o.jsxs)(u.Fragment,{children:[(null==(r=v.admin)?void 0:r.hideDraggableBlockElement)?null:(0,o.jsx)(ek,{anchorElem:P}),(null==(i=v.admin)?void 0:i.hideAddBlockButton)?null:(0,o.jsx)(ev,{anchorElem:P})]}),null==(a=v.features.plugins)?void 0:a.map(e=>{if("floatingAnchorElem"===e.position&&!(!0===e.desktopOnly&&x))return(0,o.jsx)(H,{anchorElem:P,clientProps:e.clientProps,plugin:e},e.key)}),N&&(0,o.jsx)(u.Fragment,{children:(0,o.jsx)(eT,{anchorElem:P})})]}),N&&(0,o.jsxs)(u.Fragment,{children:[(0,o.jsx)(j,{}),(null==v||null==(d=v.features)||null==(s=d.markdownTransformers)?void 0:s.length)>0&&(0,o.jsx)(e_,{})]}),null==(c=v.features.plugins)?void 0:c.map(eO),null==(f=v.features.plugins)?void 0:f.map(eJ)]}),null==(g=v.features.plugins)?void 0:g.map(eK)]}),y[5]=v,y[6]=b,y[7]=P,y[8]=N,y[9]=x,y[10]=C,y[11]=h):h=y[11],h};function eA(e){if("aboveContainer"===e.position)return(0,o.jsx)(H,{clientProps:e.clientProps,plugin:e},e.key)}function eM(e){if("top"===e.position)return(0,o.jsx)(H,{clientProps:e.clientProps,plugin:e},e.key)}function eO(e){if("normal"===e.position)return(0,o.jsx)(H,{clientProps:e.clientProps,plugin:e},e.key)}function eJ(e){if("bottom"===e.position)return(0,o.jsx)(H,{clientProps:e.clientProps,plugin:e},e.key)}function eK(e){if("belowContainer"===e.position)return(0,o.jsx)(H,{clientProps:e.clientProps,plugin:e},e.key)}var ez=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,o.jsx)(r,{children:(0,o.jsx)(ez,{providers:n.slice(1),children:t})}):(0,o.jsx)(r,{children:t})},eq=e=>{let{composerKey:t,editorConfig:n,fieldProps:a,isSmallWidthViewport:s,onChange:d,readOnly:c,value:f}=e,m=(0,l.b)(),p=(0,i.useEditDepth)(),g=u.useRef(null),h=(0,u.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.l)({editorConfig:n}),onError:e=>{throw e},theme:n.lexical.theme}},[n]);return h?(0,o.jsx)(v,{initialConfig:h,children:(0,o.jsx)(l.a,{editorConfig:n,editorContainerRef:g,fieldProps:a,parentContext:(null==m?void 0:m.editDepth)===p?m:void 0,children:(0,o.jsx)(ez,{providers:n.features.providers,children:(0,o.jsx)(eI,{editorConfig:n,editorContainerRef:g,isSmallWidthViewport:s,onChange:d})})})},t+h.editable):(0,o.jsx)("p",{children:"Loading..."})},eW="rich-text-lexical";function eH(e){let{error:t}=e;return(0,o.jsxs)("div",{className:"errorBoundary",role:"alert",children:[(0,o.jsx)("p",{children:"Something went wrong:"}),(0,o.jsx)("pre",{style:{color:"red"},children:t.message})]})}var eZ=e=>{var t;let{editorConfig:n,field:l,field:{admin:{className:d,description:c,readOnly:m}={},label:p,localized:g,required:h},path:y,readOnly:v,validate:E}=e,b=(0,i.useEditDepth)(),x=(0,u.useCallback)((e,t)=>"function"!=typeof E||E(e,{...t,required:h}),[E,h]),{customComponents:{AfterInput:C,BeforeInput:w,Description:k,Error:S,Label:j}={},disabled:N,initialValue:_,path:B,setValue:P,showError:D,value:F}=(0,i.useField)({potentiallyStalePath:y,validate:x}),T=v||m||N,[R,L]=(0,u.useState)(!1),[I,A]=(0,u.useState)(),M=u.useRef(_),O=u.useRef(F);(0,u.useEffect)(()=>{let e=()=>{let e=window.matchMedia("(max-width: 768px)").matches;e!==R&&L(e)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[R]);let J=[eW,"field-type",d,D&&"error",T&&"".concat(eW,"--read-only"),(null==n||null==(t=n.admin)?void 0:t.hideGutter)!==!0&&!R?"".concat(eW,"--show-gutter"):null].filter(
1Boolean).join(" "),K="".concat(B,".").concat(b),z=(0,r.e)(),q=(0,u.useCallback)(e=>{z(()=>{let t=e.toJSON();O.current=t,P(t)})},[P,z]),W=(0,u.useMemo)(()=>(0,a.FR)(l),[l]),H=(0,i.useEffectEvent)(e=>{O.current===F||(0,s.j)(null!=O.current?JSON.parse(JSON.stringify(O.current)):O.current,F)||(M.current=e,O.current=F,A(new Date))});return(0,u.useEffect)(()=>{Object.is(_,M.current)||H(_)},[_]),(0,o.jsxs)("div",{className:J,style:W,children:[(0,o.jsx)(i.RenderCustomComponent,{CustomComponent:S,Fallback:(0,o.jsx)(i.FieldError,{path:B,showError:D})}),j||(0,o.jsx)(i.FieldLabel,{label:p,localized:g,path:B,required:h}),(0,o.jsxs)("div",{className:"".concat(eW,"__wrap"),children:[(0,o.jsxs)(f,{fallbackRender:eH,onReset:()=>{},children:[w,(0,o.jsx)(i.BulkUploadProvider,{drawerSlugPrefix:B,children:(0,o.jsx)(eq,{composerKey:K,editorConfig:n,fieldProps:e,isSmallWidthViewport:R,onChange:q,readOnly:T,value:F},JSON.stringify({path:B,rerenderProviderKey:I}))}),C]}),(0,o.jsx)(i.RenderCustomComponent,{CustomComponent:k,Fallback:(0,o.jsx)(i.FieldDescription,{description:c,path:B})})]})]},K)}},36697:()=>{}}]);

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.