1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3637],{5966:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(39789).A)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]])},6211:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(39789).A)("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]])},16284:(e,t,r)=>{r.d(t,{A:()=>w});var n=r(71805),o=r(83292),i=r(81224),s=r(19870),a=r(17121),u=r(39681);n.YY.create({name:"characterCount",addOptions:()=>({limit:null,autoTrim:!0,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,r=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let e=!1;return[new o.k_({key:new o.hs("characterCount"),appendTransaction:(t,r,n)=>{if(e)return;let o=this.options.limit,i=this.options.autoTrim;if(null==o||0===o||!1===i){e=!0;return}let s=this.storage.characters({node:n.doc});if(s>o){console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);let t=n.tr.deleteRange(0,s-o);return e=!0,t}e=!0},filterTransaction:(e,t)=>{let r=this.options.limit;if(!e.docChanged||0===r||null==r)return!0;let n=this.storage.characters({node:t.doc}),o=this.storage.characters({node:e.doc});if(o<=r||n>r&&o>r&&o<=n)return!0;if(n>r&&o>r&&o>n||!e.getMeta("paste"))return!1;let i=e.selection.$head.pos;return e.deleteRange(i-(o-r),i),!(this.storage.characters({node:e.doc})>r)}})]}}),n.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[(0,i.A)(this.options)]}}),n.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new o.k_({key:new o.hs("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:r,isFocused:n}=this.editor,{anchor:o}=t,i=[];if(!r||!n)return s.zF.create(e,[]);let a=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(o>=t&&o<=t+e.nodeSize-1))return!1;a+=1}});let u=0;return e.descendants((e,t)=>!e.isText&&!!(o>=t&&o<=t+e.nodeSize-1)&&((u+=1,"deepest"===this.options.mode&&a-u>0||"shallowest"===this.options.mode&&u>1)?"deepest"===this.options.mode:void i.push(s.NZ.node(t,t+e.nodeSize,{class:this.options.className})))),s.zF.create(e,i)}}})]}}),n.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[(0,a.z)()],extendNodeSchema(e){var t;let r={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=(0,n.gk)((0,n.iI)(e,"allowGapCursor",r)))?t:null}}});var l="placeholder",c=new o.hs("tiptap__placeholder");function d(e){let{editor:t,placeholder:r,dataAttribute:n,pos:o,node:i,isEmptyDoc:a,hasAnchor:u,classes:{emptyNode:l,emptyEditor:c}}=e,d=[l];return a&&d.push(c),s.NZ.node(o,o+i.nodeSize,{class:d.join(" "),[n]:"function"==typeof r?r({editor:t,node:i,pos:o,hasAnchor:u}):r})}function h(e,t){return"function"==typeof e?e(t):e}function p({editor:e,options:t,dataAttribute:r,doc:o,selection:i,from:s,to:a}){let{anchor:u}=i,l=[],c=e.isEmpty;return o.nodesBetween(s,a,(o,i)=>{let s=u>=i&&u<=i+o.nodeSize,a=!o.isLeaf&&(0,n.Op)(o);return o.type.isTextblock&&(s||!t.showOnlyCurrent)&&a&&l.push(d({editor:e,isEmptyDoc:c,dataAttribute:r,hasAnchor:s,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:h(t.emptyNodeClass,{editor:e,node:o,pos:i,hasAnchor:s})},node:o,pos:i})),t.includeChildren}),l}function f({editor:e,options:t,dataAttribute:r,doc:o,selection:i}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:a}=i,u=[],l=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let i=o.resolve(a),s=i.depth>0?i.node(1):i.nodeAfter,c=i.depth>0?i.before(1):a;if(s&&s.type.isTextblock&&(0,n.Op)(s)){let n=a>=c&&a<=c+s.nodeSize;u.push(d({editor:e,isEmptyDoc:l,dataAttribute:r,hasAnchor:n,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:h(t.emptyNodeClass,{editor:e,node:s,pos:c,hasAnchor:n})},node:s,pos:c}))}}else u.push(...p({editor:e,options:t,dataAttribute:r,doc:o,selection:i,from:0,to:o.content.size}));return s.zF.create(o,u)}function m(e,t){var r;let n=e.resolve(t);if(0===n.depth){let e=null!=(r=n.nodeAfter)?r:n.nodeBefore;if(!e)return{from:t,to:t};let o=n.nodeAfter?t:t-e.nodeSize;return{from:o,to:o+e.nodeSize}}let o=n.before(1);return{from:o,to:o+n.node(1).nodeSize}}function y(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}var b=n.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:l,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[function({editor:e,options:t}){let r=t.dataAttribute?`data-${t.dataAttribute.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}`:`data-${l}`,i=t.showOnlyCurrent&&!t.includeChildren;return new o.k_({key:c,...i?{}:{state:function({editor:e,options:t,dataAttribute:r}){return{init(n,o){let i=f({editor:e,options:t,dataAttribute:r,doc:o.doc,selection:o.selection});return null!=i?i:s.zF.empty},apply:(o,i,s,a)=>o.docChanged||o.selectionSet?function({decorations:e,ranges:t,editor:r,options:n,dataAttribute:o,doc:i,selection:s}){let a=e;for(let e of t){let{from:t,to:u}=function(e,t,r){let n=Math.max(0,Math.min(e,r.content.size)),o=Math.max(n,Math.min(t,r.content.size));return{from:n,to:o}}(e.from,e.to,i),l=a.find(t,u).filter(e=>e.from>=t&&e.to<=u);l.length&&(a=a.remove(l));let c=p({editor:r,options:n,dataAttribute:o,doc:i,selection:s,from:t,to:u});c.length&&(a=a.add(i,c))}return a}({decorations:i.map(o.mapping,o.doc),ranges:function(e,t,r){let o=[];if(e.docChanged)for(let t of(0,n.FF)(e))o.push(...function(e,t){var r,n;let o,i=(r=t.from,n=t.to,o=[],e.forEach((e,t)=>{let i=t+e.nodeSize,s=i+1;t+1<n&&s>r&&o.push({from:t,to:i})}),o);return i.push(y(e,m(e,t.from))),t.to>t.from?i.push(y(e,m(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&i.push(y(e,m(e,Math.min(t.from+1,e.content.size)))),i}(r.doc,t.newRange));return e.selectionSet&&(o.push(y(r.doc,m(r.doc,e.mapping.map(t.selection.anchor)))),o.push(y(r.doc,m(r.doc,r.selection.anchor)))),function(e){if(0===e.length)return[];let t=[...e].sort((e,t)=>
1e.from-t.from),r=[{...t[0]}];for(let e=1;e<t.length;e+=1){let n=r[r.length-1],o=t[e];o.from<=n.to?n.to=Math.max(n.to,o.to):r.push({...o})}return r}(o)}(o,s,a),editor:e,options:t,dataAttribute:r,doc:a.doc,selection:a.selection}):i}}({editor:e,options:t,dataAttribute:r})},props:{decorations:i?({doc:n,selection:o})=>f({editor:e,options:t,dataAttribute:r,doc:n,selection:o}):r=>{var n;return t.showOnlyWhenEditable&&!e.isEditable?s.zF.empty:null!=(n=c.getState(r))?n:s.zF.empty}}})}({editor:this.editor,options:this.options})]}});function g(e,t){return!e.selection.empty&&!(0,n.BQ)(e.selection)&&t.isEditable}function v({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}n.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new o.k_({key:new o.hs("selection"),props:{decorations:r=>!g(r,e)||e.isFocused||e.view.dragging?null:s.zF.create(r.doc,[s.NZ.inline(r.selection.from,r.selection.to,{class:t.className})]),handleDOMEvents:{blur(t){var r;return!!g(t.state,e)&&(null==(r=window.getSelection())||r.removeAllRanges(),!1)},focus:t=>!!g(t.state,e)&&(requestAnimationFrame(()=>{!e.isDestroyed&&t.hasFocus()&&t.focus()}),!1)}}})]}}),n.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new o.hs(this.name),r=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(r).includes(e.name));return[new o.k_({key:t,appendTransaction:(e,n,o)=>{let{doc:i,tr:s,schema:a}=o,u=t.getState(o),l=i.content.size,c=a.nodes[r];if(!e.some(e=>e.getMeta("skipTrailingNode"))&&u)return s.insert(l,c.create())},state:{init:(e,t)=>!v({node:t.tr.doc.lastChild,types:n}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!v({node:e.doc.lastChild,types:n})}})]}}),n.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>(0,u.tN)(e,t),redo:()=>({state:e,dispatch:t})=>(0,u.ZS)(e,t)}),addProseMirrorPlugins(){return[(0,u.b6)(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}});var w=b},48775:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(39789).A)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},49731:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(39789).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},89939:(e,t,r)=>{r.d(t,{$Z:()=>Y,hG:()=>Z});var n=r(7620),o=r(97509),i=r(16574),s=r(54568),a=r(71805);let{getOwnPropertyNames:u,getOwnPropertySymbols:l}=Object,{hasOwnProperty:c}=Object.prototype;function d(e,t){return function(r,n,o){return e(r,n,o)&&t(r,n,o)}}function h(e){return function(t,r,n){if(!t||!r||"object"!=typeof t||"object"!=typeof r)return e(t,r,n);let{cache:o}=n,i=o.get(t),s=o.get(r);if(i&&s)return i===r&&s===t;o.set(t,r),o.set(r,t);let a=e(t,r,n);return o.delete(t),o.delete(r),a}}function p(e){return u(e).concat(l(e))}let f=Object.hasOwn||((e,t)=>c.call(e,t));function m(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let{getOwnPropertyDescriptor:y,keys:b}=Object;function g(e,t){return e.byteLength===t.byteLength&&k(new Uint8Array(e),new Uint8Array(t))}function v(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function w(e,t){return e.byteLength===t.byteLength&&k(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function E(e,t){return m(e.getTime(),t.getTime())}function S(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function C(e,t){return e===t}function M(e,t,r){let n,o,i=e.size;if(i!==t.size)return!1;if(!i)return!0;let s=Array(i),a=e.entries(),u=0;for(;(n=a.next())&&!n.done;){let i=t.entries(),a=!1,l=0;for(;(o=i.next())&&!o.done;){if(s[l]){l++;continue}let i=n.value,c=o.value;if(r.equals(i[0],c[0],u,l,e,t,r)&&r.equals(i[1],c[1],i[0],c[0],e,t,r)){a=s[l]=!0;break}l++}if(!a)return!1;u++}return!0}function j(e,t,r){let n=b(e),o=n.length;if(b(t).length!==o)return!1;for(;o-- >0;)if(!D(e,t,r,n[o]))return!1;return!0}function x(e,t,r){let n,o,i,s=p(e),a=s.length;if(p(t).length!==a)return!1;for(;a-- >0;)if(!D(e,t,r,n=s[a])||(o=y(e,n),i=y(t,n),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable)))return!1;return!0}function A(e,t){return m(e.valueOf(),t.valueOf())}function O(e,t){return e.source===t.source&&e.flags===t.flags}function z(e,t,r){let n,o,i=e.size;if(i!==t.size)return!1;if(!i)return!0;let s=Array(i),a=e.values();for(;(n=a.next())&&!n.done;){let i=t.values(),a=!1,u=0;for(;(o=i.next())&&!o.done;
1){if(!s[u]&&r.equals(n.value,o.value,n.value,o.value,e,t,r)){a=s[u]=!0;break}u++}if(!a)return!1}return!0}function k(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function N(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function D(e,t,r,n){return("_owner"===n||"__o"===n||"__v"===n)&&(!!e.$$typeof||!!t.$$typeof)||f(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}let T={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},q=Object.prototype.toString,P=R();function R(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:o=!1}=e,i=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:o,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:u,arePrimitiveWrappersEqual:l,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:f}){return function(m,y,b){if(m===y)return!0;if(null==m||null==y)return!1;let g=typeof m;if(g!==typeof y)return!1;if("object"!==g)return"number"===g?a(m,y,b):"function"===g&&i(m,y,b);let v=m.constructor;if(v!==y.constructor)return!1;if(v===Object)return u(m,y,b);if(Array.isArray(m))return t(m,y,b);if(v===Date)return n(m,y,b);if(v===RegExp)return c(m,y,b);if(v===Map)return s(m,y,b);if(v===Set)return d(m,y,b);let w=q.call(m);if("[object Date]"===w)return n(m,y,b);if("[object RegExp]"===w)return c(m,y,b);if("[object Map]"===w)return s(m,y,b);if("[object Set]"===w)return d(m,y,b);if("[object Object]"===w)return"function"!=typeof m.then&&"function"!=typeof y.then&&u(m,y,b);if("[object URL]"===w)return p(m,y,b);if("[object Error]"===w)return o(m,y,b);if("[object Arguments]"===w)return u(m,y,b);if(T[w])return h(m,y,b);if("[object ArrayBuffer]"===w)return e(m,y,b);if("[object DataView]"===w)return r(m,y,b);if("[object Boolean]"===w||"[object Number]"===w||"[object String]"===w)return l(m,y,b);if(f){let e=f[w];if(!e){let t=null!=m?m[Symbol.toStringTag]:void 0;t&&(e=f[t])}if(e)return e(m,y,b)}return!1}}(function({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:g,areArraysEqual:r?x:v,areDataViewsEqual:w,areDatesEqual:E,areErrorsEqual:S,areFunctionsEqual:C,areMapsEqual:r?d(M,x):M,areNumbersEqual:m,areObjectsEqual:r?x:j,arePrimitiveWrappersEqual:A,areRegExpsEqual:O,areSetsEqual:r?d(z,x):z,areTypedArraysEqual:r?d(k,x):k,areUrlsEqual:N,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let e=h(n.areArraysEqual),t=h(n.areMapsEqual),r=h(n.areObjectsEqual),o=h(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:r,areSetsEqual:o})}return n}(e)),s=r?r(i):function(e,t,r,n,o,s,a){return i(e,t,a)};return function({circular:e,comparator:t,createState:r,equals:n,strict:o}){if(r)return function(i,s){let{cache:a=e?new WeakMap:void 0,meta:u}=r();return t(i,s,{cache:a,equals:n,meta:u,strict:o})};if(e)return function(e,r){return t(e,r,{cache:new WeakMap,equals:n,meta:void 0,strict:o})};let i={cache:void 0,equals:n,meta:void 0,strict:o};return function(e,r){return t(e,r,i)}}({circular:t,comparator:i,createState:n,equals:s,strict:o})}R({strict:!0}),R({circular:!0}),R({circular:!0,strict:!0}),R({createInternalComparator:()=>m}),R({strict:!0,createInternalComparator:()=>m}),R({circular:!0,createInternalComparator:()=>m}),R({circular:!0,createInternalComparator:()=>m,strict:!0});var I=r(3140),F=({contentComponent:e})=>{let t=(0,i.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,s.jsx)(s.Fragment,{children:Object.values(t)})},U=class extends n.Component{constructor(e){super(e),this.editorContentRef=n.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&(null==(e=t.view.dom)?void 0:e.parentNode)){let e,r,n,i;if(t.contentComponent)return;let s=this.editorContentRef.current;s.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:s}),e=new Set,r={},n=!1,i=()=>{!n&&e.size&&(n=!0,queueMicrotask(()=>
1{n=!1,e.forEach(e=>e())}))},t.contentComponent={subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>r,getServerSnapshot:()=>r,setRenderer(e,t){r={...r,[e]:o.createPortal(t.reactElement,t.element,e)},i()},removeRenderer(e){let t={...r};delete t[e],r=t,i()}},t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var e;let t=this.props.editor;if(t){t.isEditorContentInitialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let r=document.createElement("div");r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r})}catch{}}}render(){let{editor:e,innerRef:t,...r}=this.props;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:((...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})})(t,this.editorContentRef),...r}),(null==e?void 0:e.contentComponent)&&(0,s.jsx)(F,{contentComponent:e.contentComponent})]})}},_=(0,n.forwardRef)((e,t)=>{let r=n.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return n.createElement(U,{key:r,innerRef:t,...e})}),Y=n.memo(_),B="u">typeof window?n.useLayoutEffect:n.useEffect,L=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e,t=t=>{((null==t?void 0:t.transaction)===void 0||t.transaction!==e)&&(e=null==t?void 0:t.transaction,this.transactionNumber+=1,this.subscribers.forEach(e=>e()))},r=this.editor;return r.on("transaction",t),r.on("update",t),()=>{r.off("transaction",t),r.off("update",t)}}}},W="u"<typeof window,$=W||!!("u">typeof window&&window.next),V=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){let e=this.options.current.immediatelyRender,t=null==e||e;return W?t=!1:$&&void 0===e&&(t=!1),t?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onBeforeCreate)?void 0:r.call(t,...e)},onBlur:(...e)=>{var t,r;return null==(r=(t=this.options.current).onBlur)?void 0:r.call(t,...e)},onCreate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onCreate)?void 0:r.call(t,...e)},onDestroy:(...e)=>{var t,r;return null==(r=(t=this.options.current).onDestroy)?void 0:r.call(t,...e)},onFocus:(...e)=>{var t,r;return null==(r=(t=this.options.current).onFocus)?void 0:r.call(t,...e)},onSelectionUpdate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onSelectionUpdate)?void 0:r.call(t,...e)},onTransaction:(...e)=>{var t,r;return null==(r=(t=this.options.current).onTransaction)?void 0:r.call(t,...e)},onUpdate:(...e)=>{var t,r;return null==(r=(t=this.options.current).onUpdate)?void 0:r.call(t,...e)},onContentError:(...e)=>{var t,r;return null==(r=(t=this.options.current).onContentError)?void 0:r.call(t,...e)},onDrop:(...e)=>{var t,r;return null==(r=(t=this.options.current).onDrop)?void 0:r.call(t,...e)},onPaste:(...e)=>{var t,r;return null==(r=(t=this.options.current).onPaste)?void 0:r.call(t,...e)},onDelete:(...e)=>{var t,r;return null==(r=(t=this.options.current).onDelete)?void 0:r.call(t,...e)},onMount:(...e)=>{var t,r;return null==(r=(t=this.options.current).onMount)?void 0:r.call(t,...e)},onUnmount:(...e)=>{var t,r;return null==(r=(t=this.options.current).onUnmount)?void 0:r.call(t,...e)}};return new a.KE(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(r=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)||("extensions"===r&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,r)=>{var n;return e===(null==(n=t.extensions)?void 0:n[r])}):e[r]===t[r]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){
1if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,r)=>t===e[r]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Z(e={},t=[]){let r=(0,n.useRef)(e);r.current=e;let[o]=(0,n.useState)(()=>new V(r)),s=(0,i.useSyncExternalStore)(o.subscribe,o.getEditor,o.getServerSnapshot);return(0,n.useDebugValue)(s),(0,n.useEffect)(o.onRender(t)),!function(e){var t;let[r]=(0,n.useState)(()=>new L(e.editor)),o=(0,I.useSyncExternalStoreWithSelector)(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:P);B(()=>r.watch(e.editor),[e.editor,r]),(0,n.useDebugValue)(o)}({editor:s,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),s}var G=(0,n.createContext)({editor:null});G.Consumer,a.Db,a.Yv;var H=(0,n.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});function K({children:e,...t}){let r="editor"in t?t.editor:t.instance;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let o=(0,n.useMemo)(()=>({editor:r}),[r]),i=(0,n.useMemo)(()=>({editor:r}),[r]);return(0,s.jsx)(G.Provider,{value:i,children:(0,s.jsx)(H.Provider,{value:o,children:e})})}function Q({...e}){let{editor:t}=(0,n.useContext)(H);return(0,s.jsx)(Y,{editor:t,...e})}H.displayName="TiptapContext",K.displayName="Tiptap",Q.displayName="Tiptap.Content",Object.assign(K,{Content:Q})}}]);
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.