@dekrayzis/vicenco-ui 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../src/components/textEditor/TextEditor.tsx"],"names":[],"mappings":"AA0CA,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,UAAU;4EAOpB,eAAe;;
|
|
1
|
+
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../src/components/textEditor/TextEditor.tsx"],"names":[],"mappings":"AA0CA,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,UAAU;4EAOpB,eAAe;;CA2XjB,CAAC;AAGF,eAAe,UAAU,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -151,4 +151,4 @@ ${p.slice(c+2)}`,d+=1;else break}e.push({indent:c,number:parseInt(a,10),content:
|
|
|
151
151
|
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:n=>{const e=n.match(/^(\s*)(\d+)\.\s+/),t=e?.index;return t!==void 0?t:-1},tokenize:(n,e,t)=>{var i;const r=n.split(`
|
|
152
152
|
`),[s,o]=R$(r);if(s.length===0)return;const a=cw(s,0,t);return a.length===0?void 0:{type:"list",ordered:!0,start:((i=s[0])==null?void 0:i.number)||1,items:a,raw:r.slice(0,o).join(`
|
|
153
153
|
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(D$,this.editor.getAttributes(qg)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=bs({find:Ug,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=bs({find:Ug,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(qg)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),I$=/^\s*(\[([( |x])?\])\s$/,P$=Lt.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:n=>{const e=n.getAttribute("data-checked");return e===""||e==="true"},renderHTML:n=>({"data-checked":n.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:n,HTMLAttributes:e}){return["li",He(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:n.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(n,e)=>{const t=[];if(n.tokens&&n.tokens.length>0?t.push(e.createNode("paragraph",{},e.parseInline(n.tokens))):n.text?t.push(e.createNode("paragraph",{},[e.createNode("text",{text:n.text})])):t.push(e.createNode("paragraph",{},[])),n.nestedTokens&&n.nestedTokens.length>0){const i=e.parseChildren(n.nestedTokens);t.push(...i)}return e.createNode("taskItem",{checked:n.checked||!1},t)},renderMarkdown:(n,e)=>{var t;const r=`- [${(t=n.attrs)!=null&&t.checked?"x":" "}] `;return Up(n,e,r)},addKeyboardShortcuts(){const n={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...n,Tab:()=>this.editor.commands.sinkListItem(this.name)}:n},addNodeView(){return({node:n,HTMLAttributes:e,getPos:t,editor:i})=>{const r=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=d=>{var f,p;a.ariaLabel=((p=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:p.call(f,d,a.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};c(n),s.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",d=>d.preventDefault()),a.addEventListener("change",d=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:f}=d.target;i.isEditable&&typeof t=="function"&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{const h=t();if(typeof h!="number")return!1;const m=p.doc.nodeAt(h);return p.setNodeMarkup(h,void 0,{...m?.attrs,checked:f}),!0}).run(),!i.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(n,f)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,f])=>{r.setAttribute(d,f)}),r.dataset.checked=n.attrs.checked,a.checked=n.attrs.checked,s.append(a,o),r.append(s,l),Object.entries(e).forEach(([d,f])=>{r.setAttribute(d,f)});let u=new Set(Object.keys(e));return{dom:r,contentDOM:l,update:d=>{if(d.type!==this.type)return!1;r.dataset.checked=d.attrs.checked,a.checked=d.attrs.checked,c(d);const f=i.extensionManager.attributes,p=go(d,f),h=new Set(Object.keys(p)),m=this.options.HTMLAttributes;return u.forEach(g=>{h.has(g)||(g in m?r.setAttribute(g,m[g]):r.removeAttribute(g))}),Object.entries(p).forEach(([g,y])=>{y==null?g in m?r.setAttribute(g,m[g]):r.removeAttribute(g):r.setAttribute(g,y)}),u=h,!0}}}},addInputRules(){return[bs({find:I$,type:this.type,getAttributes:n=>({checked:n[n.length-1]==="x"})})]}}),L$=Lt.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:n}){return["ul",He(this.options.HTMLAttributes,n,{"data-type":this.name}),0]},parseMarkdown:(n,e)=>e.createNode("taskList",{},e.parseChildren(n.items||[])),renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,`
|
|
154
|
-
`):"",markdownTokenizer:{name:"taskList",level:"block",start(n){var e;const t=(e=n.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return t!==void 0?t:-1},tokenize(n,e,t){const i=s=>{const o=sf(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:t.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:i},t);return o?[{type:"taskList",raw:o.raw,items:o.items}]:t.blockTokens(s)},r=sf(n,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,o)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:t.inlineTokens(s.mainContent),nestedTokens:o}),customNestedParser:i},t);if(r)return{type:"taskList",raw:r.raw,items:r.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Le.create({name:"listKit",addExtensions(){const n=[];return this.options.bulletList!==!1&&n.push(tw.configure(this.options.bulletList)),this.options.listItem!==!1&&n.push(nw.configure(this.options.listItem)),this.options.listKeymap!==!1&&n.push(lw.configure(this.options.listKeymap)),this.options.orderedList!==!1&&n.push(uw.configure(this.options.orderedList)),this.options.taskItem!==!1&&n.push(P$.configure(this.options.taskItem)),this.options.taskList!==!1&&n.push(L$.configure(this.options.taskList)),n}});var Kg=" ",j$=" ",$$=Lt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",He(this.options.HTMLAttributes,n),0]},parseMarkdown:(n,e)=>{const t=n.tokens||[];if(t.length===1&&t[0].type==="image")return e.parseChildren([t[0]]);const i=e.parseInline(t);return i.length===1&&i[0].type==="text"&&(i[0].text===Kg||i[0].text===j$)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,i)},renderMarkdown:(n,e)=>{if(!n)return"";const t=Array.isArray(n.content)?n.content:[];return t.length===0?Kg:e.renderChildren(t)},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),B$=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,z$=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,V$=hn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",He(this.options.HTMLAttributes,n),0]},markdownTokenName:"del",parseMarkdown:(n,e)=>e.applyMark("strike",e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>`~~${e.renderChildren(n)}~~`,addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ui({find:B$,type:this.type})]},addPasteRules(){return[yi({find:z$,type:this.type})]}}),F$=Lt.create({name:"text",group:"inline",parseMarkdown:n=>({type:"text",text:n.text||""}),renderMarkdown:n=>n.text||""}),dw=hn.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",He(this.options.HTMLAttributes,n),0]},parseMarkdown(n,e){return e.applyMark(this.name||"underline",e.parseInline(n.tokens||[]))},renderMarkdown(n,e){return`++${e.renderChildren(n)}++`},markdownTokenizer:{name:"underline",level:"inline",start(n){return n.indexOf("++")},tokenize(n,e,t){const r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(n);if(!r)return;const s=r[2].trim();return{type:"underline",raw:r[0],text:s,tokens:t.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function H$(n={}){return new Je({view(e){return new W$(e,n)}})}class W${constructor(e,t){var i;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(i=t.width)!==null&&i!==void 0?i:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let s=o=>{this[r](o)};return e.dom.addEventListener(r,s),{name:r,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,i,r=this.editorView.dom,s=r.getBoundingClientRect(),o=s.width/r.offsetWidth,a=s.height/r.offsetHeight;if(t){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*a;i={left:h.left,right:h.right,top:m-g,bottom:m+g}}}}if(!i){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;i={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let c,u;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,u=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;c=d.left-l.scrollLeft*f,u=d.top-l.scrollTop*p}this.element.style.left=(i.left-c)/o+"px",this.element.style.top=(i.top-u)/a+"px",this.element.style.width=(i.right-i.left)/o+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),i=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=i&&i.type.spec.disableDropCursor,s=typeof r=="function"?r(this.editorView,t,e):r;if(t&&!s){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=nx(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class tt extends _e{constructor(e){super(e,e)}map(e,t){let i=e.resolve(t.map(this.head));return tt.valid(i)?new tt(i):_e.near(i)}content(){return se.empty}eq(e){return e instanceof tt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new tt(e.resolve(t.pos))}getBookmark(){return new rh(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!q$(e)||!U$(e))return!1;let i=t.type.spec.allowGapCursor;if(i!=null)return i;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,i=!1){e:for(;;){if(!i&&tt.valid(e))return e;let r=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(t>0?e.indexAfter(o)<a.childCount:e.index(o)>0){s=a.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;r+=t;let l=e.doc.resolve(r);if(tt.valid(l))return l}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!fe.isSelectable(s)){e=e.doc.resolve(r+s.nodeSize*t),i=!1;continue e}break}s=o,r+=t;let a=e.doc.resolve(r);if(tt.valid(a))return a}return null}}}tt.prototype.visible=!1;tt.findFrom=tt.findGapCursorFrom;_e.jsonID("gapcursor",tt);class rh{constructor(e){this.pos=e}map(e){return new rh(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return tt.valid(t)?new tt(t):_e.near(t)}}function fw(n){return n.isAtom||n.spec.isolating||n.spec.createGapCursor}function q$(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),i=n.node(e);if(t==0){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(t-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||fw(r.type))return!0;if(r.inlineContent)return!1}}return!0}function U$(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),i=n.node(e);if(t==i.childCount){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(t);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||fw(r.type))return!0;if(r.inlineContent)return!1}}return!0}function K$(){return new Je({props:{decorations:X$,createSelectionBetween(n,e,t){return e.pos==t.pos&&tt.valid(t)?new tt(t):null},handleClick:Y$,handleKeyDown:G$,handleDOMEvents:{beforeinput:J$}}})}const G$=i2({ArrowLeft:Ia("horiz",-1),ArrowRight:Ia("horiz",1),ArrowUp:Ia("vert",-1),ArrowDown:Ia("vert",1)});function Ia(n,e){const t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(i,r,s){let o=i.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof ve){if(!s.endOfTextblock(t)||a.depth==0)return!1;l=!1,a=i.doc.resolve(e>0?a.after():a.before())}let c=tt.findGapCursorFrom(a,e,l);return c?(r&&r(i.tr.setSelection(new tt(c))),!0):!1}}function Y$(n,e,t){if(!n||!n.editable)return!1;let i=n.state.doc.resolve(e);if(!tt.valid(i))return!1;let r=n.posAtCoords({left:t.clientX,top:t.clientY});return r&&r.inside>-1&&fe.isSelectable(n.state.doc.nodeAt(r.inside))?!1:(n.dispatch(n.state.tr.setSelection(new tt(i))),!0)}function J$(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof tt))return!1;let{$from:t}=n.state.selection,i=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;let r=ee.empty;for(let o=i.length-1;o>=0;o--)r=ee.from(i[o].createAndFill(null,r));let s=n.state.tr.replace(t.pos,t.pos,new se(r,0,0));return s.setSelection(ve.near(s.doc.resolve(t.pos+1))),n.dispatch(s),!1}function X$(n){if(!(n.selection instanceof tt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ge.create(n.doc,[Nt.widget(n.selection.head,e,{key:"gapcursor"})])}var Ul=200,bt=function(){};bt.prototype.append=function(e){return e.length?(e=bt.from(e),!this.length&&e||e.length<Ul&&this.leafAppend(e)||this.length<Ul&&e.leafPrepend(this)||this.appendInner(e)):this};bt.prototype.prepend=function(e){return e.length?bt.from(e).append(this):this};bt.prototype.appendInner=function(e){return new Z$(this,e)};bt.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?bt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};bt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};bt.prototype.forEach=function(e,t,i){t===void 0&&(t=0),i===void 0&&(i=this.length),t<=i?this.forEachInner(e,t,i,0):this.forEachInvertedInner(e,t,i,0)};bt.prototype.map=function(e,t,i){t===void 0&&(t=0),i===void 0&&(i=this.length);var r=[];return this.forEach(function(s,o){return r.push(e(s,o))},t,i),r};bt.from=function(e){return e instanceof bt?e:e&&e.length?new pw(e):bt.empty};var pw=(function(n){function e(i){n.call(this),this.values=i}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,s){return r==0&&s==this.length?this:new e(this.values.slice(r,s))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,s,o,a){for(var l=s;l<o;l++)if(r(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,o,a){for(var l=s-1;l>=o;l--)if(r(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Ul)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Ul)return new e(r.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e})(bt);bt.empty=new pw([]);var Z$=(function(n){function e(t,i){n.call(this),this.left=t,this.right=i,this.length=t.length+i.length,this.depth=Math.max(t.depth,i.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)},e.prototype.forEachInner=function(i,r,s,o){var a=this.left.length;if(r<a&&this.left.forEachInner(i,r,Math.min(s,a),o)===!1||s>a&&this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,s)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,r,s,o){var a=this.left.length;if(r>a&&this.right.forEachInvertedInner(i,r-a,Math.max(s,a)-a,o+a)===!1||s<a&&this.left.forEachInvertedInner(i,Math.min(r,a),s,o)===!1)return!1},e.prototype.sliceInner=function(i,r){if(i==0&&r==this.length)return this;var s=this.left.length;return r<=s?this.left.slice(i,r):i>=s?this.right.slice(i-s,r-s):this.left.slice(i,s).append(this.right.slice(0,r-s))},e.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new e(r,this.right)},e.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new e(this.left,new e(this.right,i)):new e(this,i)},e})(bt);const Q$=500;class un{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let r,s;t&&(r=this.remapping(i,this.items.length),s=r.maps.length);let o=e.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(i,f+1),s=r.maps.length),s--,u.push(d);return}if(r){u.push(new kn(d.map));let p=d.step.map(r.slice(s)),h;p&&o.maybeStep(p).doc&&(h=o.mapping.maps[o.mapping.maps.length-1],c.push(new kn(h,void 0,void 0,c.length+u.length))),s--,h&&r.appendMap(h,s)}else o.maybeStep(d.step);if(d.selection)return a=r?d.selection.map(r.slice(s)):d.selection,l=new un(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,t,i,r){let s=[],o=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new kn(e.mapping.maps[u],d,t),p;(p=l&&l.merge(f))&&(f=p,u?s.pop():a=a.slice(0,a.length-1)),s.push(f),t&&(o++,t=void 0),r||(l=f)}let c=o-i.depth;return c>tB&&(a=eB(a,c),o-=c),new un(a.append(s),o)}remapping(e,t){let i=new co;return this.items.forEach((r,s)=>{let o=r.mirrorOffset!=null&&s-r.mirrorOffset>=e?i.maps.length-r.mirrorOffset:void 0;i.appendMap(r.map,o)},e,t),i}addMaps(e){return this.eventCount==0?this:new un(this.items.append(e.map(t=>new kn(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-t),s=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},r);let l=t;this.items.forEach(f=>{let p=s.getMirror(--l);if(p==null)return;o=Math.min(o,p);let h=s.maps[p];if(f.step){let m=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(s.slice(l+1,p));g&&a++,i.push(new kn(h,m,g))}else i.push(new kn(h))},r);let c=[];for(let f=t;f<o;f++)c.push(new kn(s.maps[f]));let u=this.items.slice(0,r).append(c).append(i),d=new un(u,a);return d.emptyItemCount()>Q$&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),i=t.maps.length,r=[],s=0;return this.items.forEach((o,a)=>{if(a>=e)r.push(o),o.selection&&s++;else if(o.step){let l=o.step.map(t.slice(i)),c=l&&l.getMap();if(i--,c&&t.appendMap(c,i),l){let u=o.selection&&o.selection.map(t.slice(i));u&&s++;let d=new kn(c.invert(),l,u),f,p=r.length-1;(f=r.length&&r[p].merge(d))?r[p]=f:r.push(d)}}else o.map&&i--},this.items.length,0),new un(bt.from(r.reverse()),s)}}un.empty=new un(bt.empty,0);function eB(n,e){let t;return n.forEach((i,r)=>{if(i.selection&&e--==0)return t=r,!1}),n.slice(t)}class kn{constructor(e,t,i,r){this.map=e,this.step=t,this.selection=i,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new kn(t.getMap().invert(),t,this.selection)}}}class ni{constructor(e,t,i,r,s){this.done=e,this.undone=t,this.prevRanges=i,this.prevTime=r,this.prevComposition=s}}const tB=20;function nB(n,e,t,i){let r=t.getMeta(Bi),s;if(r)return r.historyState;t.getMeta(sB)&&(n=new ni(n.done,n.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(o&&o.getMeta(Bi))return o.getMeta(Bi).redo?new ni(n.done.addTransform(t,void 0,i,Ha(e)),n.undone,Gg(t.mapping.maps),n.prevTime,n.prevComposition):new ni(n.done,n.undone.addTransform(t,void 0,i,Ha(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=t.getMeta("composition"),l=n.prevTime==0||!o&&n.prevComposition!=a&&(n.prevTime<(t.time||0)-i.newGroupDelay||!iB(t,n.prevRanges)),c=o?cd(n.prevRanges,t.mapping):Gg(t.mapping.maps);return new ni(n.done.addTransform(t,l?e.selection.getBookmark():void 0,i,Ha(e)),un.empty,c,t.time,a??n.prevComposition)}else return(s=t.getMeta("rebased"))?new ni(n.done.rebased(t,s),n.undone.rebased(t,s),cd(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new ni(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),cd(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function iB(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((i,r)=>{for(let s=0;s<e.length;s+=2)i<=e[s+1]&&r>=e[s]&&(t=!0)}),t}function Gg(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((i,r,s,o)=>e.push(s,o));return e}function cd(n,e){if(!n)return null;let t=[];for(let i=0;i<n.length;i+=2){let r=e.map(n[i],1),s=e.map(n[i+1],-1);r<=s&&t.push(r,s)}return t}function rB(n,e,t){let i=Ha(e),r=Bi.get(e).spec.config,s=(t?n.undone:n.done).popEvent(e,i);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(t?n.done:n.undone).addTransform(s.transform,e.selection.getBookmark(),r,i),l=new ni(t?a:s.remaining,t?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(Bi,{redo:t,historyState:l})}let ud=!1,Yg=null;function Ha(n){let e=n.plugins;if(Yg!=e){ud=!1,Yg=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){ud=!0;break}}return ud}const Bi=new ft("history"),sB=new ft("closeHistory");function oB(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new Je({key:Bi,state:{init(){return new ni(un.empty,un.empty,null,0,-1)},apply(e,t,i){return nB(t,i,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let i=t.inputType,r=i=="historyUndo"?mw:i=="historyRedo"?gw:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function hw(n,e){return(t,i)=>{let r=Bi.getState(t);if(!r||(n?r.undone:r.done).eventCount==0)return!1;if(i){let s=rB(r,t,n);s&&i(e?s.scrollIntoView():s)}return!0}}const mw=hw(!1,!0),gw=hw(!0,!0);var aB=Le.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:n=>n.length,wordCounter:n=>n.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=n=>{const e=n?.node||this.editor.state.doc;if((n?.mode||this.options.mode)==="textSize"){const i=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(i)}return e.nodeSize},this.storage.words=n=>{const e=n?.node||this.editor.state.doc,t=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(t)}},addProseMirrorPlugins(){let n=!1;return[new Je({key:new ft("characterCount"),appendTransaction:(e,t,i)=>{if(n)return;const r=this.options.limit;if(r==null||r===0){n=!0;return}const s=this.storage.characters({node:i.doc});if(s>r){const o=s-r,a=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);const c=i.tr.deleteRange(a,l);return n=!0,c}n=!0},filterTransaction:(e,t)=>{const i=this.options.limit;if(!e.docChanged||i===0||i===null||i===void 0)return!0;const r=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=i||r>i&&s>i&&s<=r)return!0;if(r>i&&s>i&&s>r||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=s-i,c=a-l,u=a;return e.deleteRange(c,u),!(this.storage.characters({node:e.doc})>i)}})]}}),lB=Le.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[H$(this.options)]}});Le.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Je({key:new ft("focus"),props:{decorations:({doc:n,selection:e})=>{const{isEditable:t,isFocused:i}=this.editor,{anchor:r}=e,s=[];if(!t||!i)return Ge.create(n,[]);let o=0;this.options.mode==="deepest"&&n.descendants((l,c)=>{if(l.isText)return;if(!(r>=c&&r<=c+l.nodeSize-1))return!1;o+=1});let a=0;return n.descendants((l,c)=>{if(l.isText||!(r>=c&&r<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";s.push(Nt.node(c,c+l.nodeSize,{class:this.options.className}))}),Ge.create(n,s)}}})]}});var cB=Le.create({name:"gapCursor",addProseMirrorPlugins(){return[K$()]},extendNodeSchema(n){var e;const t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=Pe(ue(n,"allowGapCursor",t)))!=null?e:null}}}),Jg="placeholder";function uB(n){return n.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}Le.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:Jg,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const n=this.options.dataAttribute?`data-${uB(this.options.dataAttribute)}`:`data-${Jg}`;return[new Je({key:new ft("placeholder"),props:{decorations:({doc:e,selection:t})=>{const i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,s=[];if(!i)return null;const o=this.editor.isEmpty;return e.descendants((a,l)=>{const c=r>=l&&r<=l+a.nodeSize,u=!a.isLeaf&&mc(a);if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];o&&d.push(this.options.emptyEditorClass);const f=Nt.node(l,l+a.nodeSize,{class:d.join(" "),[n]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),Ge.create(e,s)}}})]}});Le.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:n,options:e}=this;return[new Je({key:new ft("selection"),props:{decorations(t){return t.selection.empty||n.isFocused||!n.isEditable||b2(t.selection)||n.view.dragging?null:Ge.create(t.doc,[Nt.inline(t.selection.from,t.selection.to,{class:e.className})])}}})]}});function Xg({types:n,node:e}){return e&&Array.isArray(n)&&n.includes(e.type)||e?.type===n}var dB=Le.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var n;const e=new ft(this.name),t=this.options.node||((n=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:n.name)||"paragraph",i=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(t).includes(r.name));return[new Je({key:e,appendTransaction:(r,s,o)=>{const{doc:a,tr:l,schema:c}=o,u=e.getState(o),d=a.content.size,f=c.nodes[t];if(u)return l.insert(d,f.create())},state:{init:(r,s)=>{const o=s.tr.doc.lastChild;return!Xg({node:o,types:i})},apply:(r,s)=>{if(!r.docChanged||r.getMeta("__uniqueIDTransaction"))return s;const o=r.doc.lastChild;return!Xg({node:o,types:i})}}})]}}),fB=Le.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>mw(n,e),redo:()=>({state:n,dispatch:e})=>gw(n,e)}},addProseMirrorPlugins(){return[oB(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()}}}),pB=Le.create({name:"starterKit",addExtensions(){var n,e,t,i;const r=[];return this.options.bold!==!1&&r.push(Bj.configure(this.options.bold)),this.options.blockquote!==!1&&r.push(Ij.configure(this.options.blockquote)),this.options.bulletList!==!1&&r.push(tw.configure(this.options.bulletList)),this.options.code!==!1&&r.push(Fj.configure(this.options.code)),this.options.codeBlock!==!1&&r.push(qj.configure(this.options.codeBlock)),this.options.document!==!1&&r.push(Uj.configure(this.options.document)),this.options.dropcursor!==!1&&r.push(lB.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&r.push(cB.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&r.push(Kj.configure(this.options.hardBreak)),this.options.heading!==!1&&r.push(Gj.configure(this.options.heading)),this.options.undoRedo!==!1&&r.push(fB.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&r.push(Yj.configure(this.options.horizontalRule)),this.options.italic!==!1&&r.push(e$.configure(this.options.italic)),this.options.listItem!==!1&&r.push(nw.configure(this.options.listItem)),this.options.listKeymap!==!1&&r.push(lw.configure((n=this.options)==null?void 0:n.listKeymap)),this.options.link!==!1&&r.push(ew.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&r.push(uw.configure(this.options.orderedList)),this.options.paragraph!==!1&&r.push($$.configure(this.options.paragraph)),this.options.strike!==!1&&r.push(V$.configure(this.options.strike)),this.options.text!==!1&&r.push(F$.configure(this.options.text)),this.options.underline!==!1&&r.push(dw.configure((t=this.options)==null?void 0:t.underline)),this.options.trailingNode!==!1&&r.push(dB.configure((i=this.options)==null?void 0:i.trailingNode)),r}}),hB=20,yw=(n,e=0)=>{const t=[];return!n.children.length||e>hB||Array.from(n.children).forEach(i=>{i.tagName==="SPAN"?t.push(i):i.children.length&&t.push(...yw(i,e+1))}),t},mB=n=>{if(!n.children.length)return;const e=yw(n);e&&e.forEach(t=>{var i,r;const s=t.getAttribute("style"),o=(r=(i=t.parentElement)==null?void 0:i.closest("span"))==null?void 0:r.getAttribute("style");t.setAttribute("style",`${o};${s}`)})},vw=hn.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:n=>n.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&mB(n),{}):!1}]},renderHTML({HTMLAttributes:n}){return["span",He(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleTextStyle:n=>({commands:e})=>e.toggleMark(this.name,n),removeEmptyTextStyle:()=>({tr:n})=>{const{selection:e}=n;return n.doc.nodesBetween(e.from,e.to,(t,i)=>{if(t.isTextblock)return!0;t.marks.filter(r=>r.type===this.type).some(r=>Object.values(r.attrs).some(s=>!!s))||n.removeMark(i,i+t.nodeSize,this.type)}),!0}}}}),gB=Le.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:n=>{var e;const t=n.getAttribute("style");if(t){const i=t.split(";").map(r=>r.trim()).filter(Boolean);for(let r=i.length-1;r>=0;r-=1){const s=i[r].split(":");if(s.length>=2){const o=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(o==="background-color")return a.replace(/['"]+/g,"")}}}return(e=n.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.backgroundColor?{style:`background-color: ${n.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:n=>({chain:e})=>e().setMark("textStyle",{backgroundColor:n}).run(),unsetBackgroundColor:()=>({chain:n})=>n().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),bw=Le.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:n=>{var e;const t=n.getAttribute("style");if(t){const i=t.split(";").map(r=>r.trim()).filter(Boolean);for(let r=i.length-1;r>=0;r-=1){const s=i[r].split(":");if(s.length>=2){const o=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(o==="color")return a.replace(/['"]+/g,"")}}}return(e=n.style.color)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.color?{style:`color: ${n.color}`}:{}}}}]},addCommands(){return{setColor:n=>({chain:e})=>e().setMark("textStyle",{color:n}).run(),unsetColor:()=>({chain:n})=>n().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),yB=Le.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:n=>n.style.fontFamily,renderHTML:n=>n.fontFamily?{style:`font-family: ${n.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:n=>({chain:e})=>e().setMark("textStyle",{fontFamily:n}).run(),unsetFontFamily:()=>({chain:n})=>n().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),vB=Le.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:n=>n.style.fontSize,renderHTML:n=>n.fontSize?{style:`font-size: ${n.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:n=>({chain:e})=>e().setMark("textStyle",{fontSize:n}).run(),unsetFontSize:()=>({chain:n})=>n().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),bB=Le.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:n=>n.style.lineHeight,renderHTML:n=>n.lineHeight?{style:`line-height: ${n.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:n=>({chain:e})=>e().setMark("textStyle",{lineHeight:n}).run(),unsetLineHeight:()=>({chain:n})=>n().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});Le.create({name:"textStyleKit",addExtensions(){const n=[];return this.options.backgroundColor!==!1&&n.push(gB.configure(this.options.backgroundColor)),this.options.color!==!1&&n.push(bw.configure(this.options.color)),this.options.fontFamily!==!1&&n.push(yB.configure(this.options.fontFamily)),this.options.fontSize!==!1&&n.push(vB.configure(this.options.fontSize)),this.options.lineHeight!==!1&&n.push(bB.configure(this.options.lineHeight)),this.options.textStyle!==!1&&n.push(vw.configure(this.options.textStyle)),n}});var xB=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,wB=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,kB=hn.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:n}){return["mark",He(this.options.HTMLAttributes,n),0]},renderMarkdown:(n,e)=>`==${e.renderChildren(n)}==`,parseMarkdown:(n,e)=>e.applyMark("highlight",e.parseInline(n.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:n=>n.indexOf("=="),tokenize(n,e,t){const r=/^(==)([^=]+)(==)/.exec(n);if(r){const s=r[2].trim(),o=t.inlineTokens(s);return{type:"highlight",raw:r[0],text:s,tokens:o}}}},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Ui({find:xB,type:this.type})]},addPasteRules(){return[yi({find:wB,type:this.type})]}}),_B=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,SB=Lt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",He(this.options.HTMLAttributes,n)]},parseMarkdown:(n,e)=>e.createNode("image",{src:n.href,title:n.title,alt:n.text}),renderMarkdown:n=>{var e,t,i,r,s,o;const a=(t=(e=n.attrs)==null?void 0:e.src)!=null?t:"",l=(r=(i=n.attrs)==null?void 0:i.alt)!=null?r:"",c=(o=(s=n.attrs)==null?void 0:s.title)!=null?o:"";return c?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:n,minWidth:e,minHeight:t,alwaysPreserveAspectRatio:i}=this.options.resize;return({node:r,getPos:s,HTMLAttributes:o,editor:a})=>{const l=document.createElement("img");Object.entries(o).forEach(([d,f])=>{if(f!=null)switch(d){case"width":case"height":break;default:l.setAttribute(d,f);break}}),l.src=o.src;const c=new k8({element:l,editor:a,node:r,getPos:s,onResize:(d,f)=>{l.style.width=`${d}px`,l.style.height=`${f}px`},onCommit:(d,f)=>{const p=s();p!==void 0&&this.editor.chain().setNodeSelection(p).updateAttributes(this.name,{width:d,height:f}).run()},onUpdate:(d,f,p)=>d.type===r.type,options:{directions:n,min:{width:e,height:t},preserveAspectRatio:i===!0}}),u=c.dom;return u.style.visibility="hidden",u.style.pointerEvents="none",l.onload=()=>{u.style.visibility="",u.style.pointerEvents=""},c}},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[L2({find:_B,type:this.type,getAttributes:n=>{const[,,e,t,i]=n;return{src:t,alt:e,title:i}}})]}}),CB=hn.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(n){return n!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sub",He(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),TB=hn.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(n){return n!=="super"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sup",He(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),EB=Le.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>{const e=n.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:n=>n.textAlign?{style:`text-align: ${n.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:n})).some(t=>t):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.map(e=>n.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:n=>({editor:e,commands:t})=>this.options.alignments.includes(n)?e.isActive({textAlign:n})?t.unsetTextAlign():t.setTextAlign(n):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});const MB="_toolbar_1lw4n_66",AB="_toolbarButton_1lw4n_79",NB="_toolbarButtonActive_1lw4n_115",RB="_toolbarIcon_1lw4n_126",OB="_toolbarColor_1lw4n_138",DB="_toolbarColorLabel_1lw4n_168",IB="_counter_1lw4n_174",PB="_tiptap_1lw4n_185",LB="_output_1lw4n_208",Ee={"editor-container":"_editor-container_1lw4n_48",toolbar:MB,toolbarButton:AB,toolbarButtonActive:NB,toolbarIcon:RB,toolbarColor:OB,toolbarColorLabel:DB,counter:IB,tiptap:PB,output:LB},sh=n=>{const e=ne.c(265),{value:t,defaultValue:i,onChange:r,disabled:s,placeholder:o,showOutput:a}=n,l=s===void 0?!1:s,c=o===void 0?"Start typing...":o,u=a===void 0?!0:a,[d,f]=H.useState(""),[p,h]=H.useState("#000000"),[m,g]=H.useState("#fff3bf"),y=typeof t=="string",b=y?t:i,w=H.useRef(!1);let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_=[pB,aB,ew,SB,dw,CB,TB,vw,bw,kB.configure({multicolor:!0}),EB.configure({types:["heading","paragraph"]})],e[0]=_):_=e[0];const x=b??`<p>${c}</p>`;let C;e[1]!==r?(C=Ze=>{const{editor:aa}=Ze,ah=aa.getHTML();if(f(ah),w.current)return;const iu=aa.state.doc.textBetween(0,aa.state.doc.content.size," "),Cw=iu.trim()?iu.trim().split(/\s+/).length:0,Tw=aa.storage.characterCount?.characters?.()??0;r?.({html:ah,text:iu,words:Cw,characters:Tw})},e[1]=r,e[2]=C):C=e[2];const S=l?"true":"false";let k;e[3]!==S?(k={attributes:{class:Ee.tiptap,"aria-disabled":S}},e[3]=S,e[4]=k):k=e[4];const M=!l;let P;e[5]!==x||e[6]!==C||e[7]!==k||e[8]!==M?(P={extensions:_,content:x,onUpdate:C,editorProps:k,editable:M},e[5]=x,e[6]=C,e[7]=k,e[8]=M,e[9]=P):P=e[9];const T=Aj(P);let I,L;e[10]!==T||e[11]!==y||e[12]!==t?(I=()=>{if(!T||!y||typeof t!="string")return;const Ze=T.getHTML();t!==Ze&&(w.current=!0,T.commands.setContent(t,{emitUpdate:!1}),w.current=!1,f(t))},L=[T,y,t],e[10]=T,e[11]=y,e[12]=t,e[13]=I,e[14]=L):(I=e[13],L=e[14]),H.useEffect(I,L);let O;e[15]!==T?(O={editor:T,selector:jB},e[15]=T,e[16]=O):O=e[16];const N=z2(O);let R;e[17]!==T?(R=()=>T?.chain().focus().toggleBold().run(),e[17]=T,e[18]=R):R=e[18];const $=R;let B;e[19]!==T?(B=()=>T?.chain().focus().toggleItalic().run(),e[19]=T,e[20]=B):B=e[20];const q=B;let D;e[21]!==T?(D=()=>T?.chain()?.focus()?.toggleUnderline()?.run(),e[21]=T,e[22]=D):D=e[22];const A=D;let j;e[23]!==T?(j=()=>T?.chain().focus().toggleHeading({level:1}).run(),e[23]=T,e[24]=j):j=e[24];const F=j;let V;e[25]!==T?(V=()=>T?.chain().focus().toggleHeading({level:2}).run(),e[25]=T,e[26]=V):V=e[26];const G=V;let W;e[27]!==T?(W=()=>T?.chain().focus().toggleHeading({level:3}).run(),e[27]=T,e[28]=W):W=e[28];const z=W;let U;e[29]!==T?(U=()=>T?.chain().focus().toggleStrike().run(),e[29]=T,e[30]=U):U=e[30];const J=U;let X;e[31]!==T?(X=()=>T?.chain().focus().toggleSubscript().run(),e[31]=T,e[32]=X):X=e[32];const re=X;let Y;e[33]!==T?(Y=()=>T?.chain().focus().toggleSuperscript().run(),e[33]=T,e[34]=Y):Y=e[34];const le=Y;let ce;e[35]!==T?(ce=()=>T?.chain().focus().toggleBulletList().run(),e[35]=T,e[36]=ce):ce=e[36];const we=ce;let Se;e[37]!==T?(Se=()=>T?.chain().focus().toggleOrderedList().run(),e[37]=T,e[38]=Se):Se=e[38];const Te=Se;let de;e[39]!==T?(de=()=>T?.chain().focus().toggleBlockquote().run(),e[39]=T,e[40]=de):de=e[40];const me=de;let be;e[41]!==T?(be=()=>T?.chain().focus().setHorizontalRule().run(),e[41]=T,e[42]=be):be=e[42];const ge=be;let Ce;e[43]!==T?(Ce=()=>T?.chain().focus().setTextAlign("left").run(),e[43]=T,e[44]=Ce):Ce=e[44];const Oe=Ce;let We;e[45]!==T?(We=()=>T?.chain().focus().setTextAlign("center").run(),e[45]=T,e[46]=We):We=e[46];const K=We;let Q;e[47]!==T?(Q=()=>T?.chain().focus().setTextAlign("right").run(),e[47]=T,e[48]=Q):Q=e[48];const ie=Q;let oe;e[49]!==T?(oe=()=>T?.chain().focus().setTextAlign("justify").run(),e[49]=T,e[50]=oe):oe=e[50];const Ae=oe;let ze;e[51]!==T?(ze=()=>{const Ze=prompt("Enter a URL");Ze&&T?.chain().focus().setLink({href:Ze}).run()},e[51]=T,e[52]=ze):ze=e[52];const ye=ze;let pe;e[53]!==T?(pe=()=>{const Ze=prompt("Enter image URL");Ze&&T?.chain().focus().setImage({src:Ze}).run()},e[53]=T,e[54]=pe):pe=e[54];const Ne=pe;let Re;e[55]!==T?(Re=()=>T?.chain().focus().toggleCodeBlock().run(),e[55]=T,e[56]=Re):Re=e[56];const he=Re;let xe;e[57]!==T?(xe=()=>T?.chain().focus().undo().run(),e[57]=T,e[58]=xe):xe=e[58];const rt=xe;let qe;e[59]!==T?(qe=()=>T?.chain().focus().redo().run(),e[59]=T,e[60]=qe):qe=e[60];const Ue=qe;let Ht;e[61]!==T?(Ht=Ze=>{h(Ze),T?.chain().focus().setColor(Ze).run()},e[61]=T,e[62]=Ht):Ht=e[62];const No=Ht;let ki;e[63]!==T?(ki=Ze=>{g(Ze),T?.chain().focus().toggleHighlight({color:Ze}).run()},e[63]=T,e[64]=ki):ki=e[64];const bc=ki,pt=$B,Xe=BB;let Ro;if(e[65]!==T){const Ze=T?T.state.doc.textBetween(0,T.state.doc.content.size," "):"";Ro=Ze.trim()?Ze.trim().split(/\s+/).length:0,e[65]=T,e[66]=Ro}else Ro=e[66];const xc=Ro,wc=pt(N?.bold),kc=N?.bold;let Ji;e[67]!==kc?(Ji=Xe("Bold",kc),e[67]=kc,e[68]=Ji):Ji=e[68];let Oo;e[69]===Symbol.for("react.memo_cache_sentinel")?(Oo=v.jsx(Ww,{className:Ee.toolbarIcon}),e[69]=Oo):Oo=e[69];let Xi;e[70]!==$||e[71]!==wc||e[72]!==Ji?(Xi=v.jsx("button",{className:wc,onClick:$,type:"button",...Ji,children:Oo}),e[70]=$,e[71]=wc,e[72]=Ji,e[73]=Xi):Xi=e[73];const _c=pt(N?.italic),Sc=N?.italic;let Zi;e[74]!==Sc?(Zi=Xe("Italic",Sc),e[74]=Sc,e[75]=Zi):Zi=e[75];let Do;e[76]===Symbol.for("react.memo_cache_sentinel")?(Do=v.jsx(vk,{className:Ee.toolbarIcon}),e[76]=Do):Do=e[76];let Qi;e[77]!==q||e[78]!==_c||e[79]!==Zi?(Qi=v.jsx("button",{className:_c,onClick:q,type:"button",...Zi,children:Do}),e[77]=q,e[78]=_c,e[79]=Zi,e[80]=Qi):Qi=e[80];const Cc=pt(N?.underline),Tc=N?.underline;let er;e[81]!==Tc?(er=Xe("Underline",Tc),e[81]=Tc,e[82]=er):er=e[82];let Io;e[83]===Symbol.for("react.memo_cache_sentinel")?(Io=v.jsx(Zk,{className:Ee.toolbarIcon}),e[83]=Io):Io=e[83];let tr;e[84]!==A||e[85]!==Cc||e[86]!==er?(tr=v.jsx("button",{className:Cc,onClick:A,type:"button",...er,children:Io}),e[84]=A,e[85]=Cc,e[86]=er,e[87]=tr):tr=e[87];const Ec=pt(N?.strike),Mc=N?.strike;let nr;e[88]!==Mc?(nr=Xe("Strikethrough",Mc),e[88]=Mc,e[89]=nr):nr=e[89];let Po;e[90]===Symbol.for("react.memo_cache_sentinel")?(Po=v.jsx(Lk,{className:Ee.toolbarIcon}),e[90]=Po):Po=e[90];let ir;e[91]!==J||e[92]!==Ec||e[93]!==nr?(ir=v.jsx("button",{className:Ec,onClick:J,type:"button",...nr,children:Po}),e[91]=J,e[92]=Ec,e[93]=nr,e[94]=ir):ir=e[94];const Ac=pt(N?.subscript),Nc=N?.subscript;let rr;e[95]!==Nc?(rr=Xe("Subscript",Nc),e[95]=Nc,e[96]=rr):rr=e[96];let Lo;e[97]===Symbol.for("react.memo_cache_sentinel")?(Lo=v.jsx($k,{className:Ee.toolbarIcon}),e[97]=Lo):Lo=e[97];let sr;e[98]!==re||e[99]!==Ac||e[100]!==rr?(sr=v.jsx("button",{className:Ac,onClick:re,type:"button",...rr,children:Lo}),e[98]=re,e[99]=Ac,e[100]=rr,e[101]=sr):sr=e[101];const Rc=pt(N?.superscript),Oc=N?.superscript;let or;e[102]!==Oc?(or=Xe("Superscript",Oc),e[102]=Oc,e[103]=or):or=e[103];let jo;e[104]===Symbol.for("react.memo_cache_sentinel")?(jo=v.jsx(zk,{className:Ee.toolbarIcon}),e[104]=jo):jo=e[104];let ar;e[105]!==le||e[106]!==Rc||e[107]!==or?(ar=v.jsx("button",{className:Rc,onClick:le,type:"button",...or,children:jo}),e[105]=le,e[106]=Rc,e[107]=or,e[108]=ar):ar=e[108];const Dc=pt(N?.h1),Ic=N?.h1;let lr;e[109]!==Ic?(lr=Xe("Heading 1",Ic),e[109]=Ic,e[110]=lr):lr=e[110];let $o;e[111]===Symbol.for("react.memo_cache_sentinel")?($o=v.jsx(lk,{className:Ee.toolbarIcon}),e[111]=$o):$o=e[111];let cr;e[112]!==F||e[113]!==Dc||e[114]!==lr?(cr=v.jsx("button",{className:Dc,onClick:F,type:"button",...lr,children:$o}),e[112]=F,e[113]=Dc,e[114]=lr,e[115]=cr):cr=e[115];const Pc=pt(N?.h2),Lc=N?.h2;let ur;e[116]!==Lc?(ur=Xe("Heading 2",Lc),e[116]=Lc,e[117]=ur):ur=e[117];let Bo;e[118]===Symbol.for("react.memo_cache_sentinel")?(Bo=v.jsx(uk,{className:Ee.toolbarIcon}),e[118]=Bo):Bo=e[118];let dr;e[119]!==G||e[120]!==Pc||e[121]!==ur?(dr=v.jsx("button",{className:Pc,onClick:G,type:"button",...ur,children:Bo}),e[119]=G,e[120]=Pc,e[121]=ur,e[122]=dr):dr=e[122];const jc=pt(N?.h3),$c=N?.h3;let fr;e[123]!==$c?(fr=Xe("Heading 3",$c),e[123]=$c,e[124]=fr):fr=e[124];let zo;e[125]===Symbol.for("react.memo_cache_sentinel")?(zo=v.jsx(fk,{className:Ee.toolbarIcon}),e[125]=zo):zo=e[125];let pr;e[126]!==z||e[127]!==jc||e[128]!==fr?(pr=v.jsx("button",{className:jc,onClick:z,type:"button",...fr,children:zo}),e[126]=z,e[127]=jc,e[128]=fr,e[129]=pr):pr=e[129];const Bc=pt(N?.bulletList),zc=N?.bulletList;let hr;e[130]!==zc?(hr=Xe("Bulleted list",zc),e[130]=zc,e[131]=hr):hr=e[131];let Vo;e[132]===Symbol.for("react.memo_cache_sentinel")?(Vo=v.jsx(Sk,{className:Ee.toolbarIcon}),e[132]=Vo):Vo=e[132];let mr;e[133]!==we||e[134]!==Bc||e[135]!==hr?(mr=v.jsx("button",{className:Bc,onClick:we,type:"button",...hr,children:Vo}),e[133]=we,e[134]=Bc,e[135]=hr,e[136]=mr):mr=e[136];const Vc=pt(N?.orderedList),Fc=N?.orderedList;let gr;e[137]!==Fc?(gr=Xe("Numbered list",Fc),e[137]=Fc,e[138]=gr):gr=e[138];let Fo;e[139]===Symbol.for("react.memo_cache_sentinel")?(Fo=v.jsx(kk,{className:Ee.toolbarIcon}),e[139]=Fo):Fo=e[139];let yr;e[140]!==Te||e[141]!==Vc||e[142]!==gr?(yr=v.jsx("button",{className:Vc,onClick:Te,type:"button",...gr,children:Fo}),e[140]=Te,e[141]=Vc,e[142]=gr,e[143]=yr):yr=e[143];const Hc=pt(N?.blockquote),Wc=N?.blockquote;let vr;e[144]!==Wc?(vr=Xe("Blockquote",Wc),e[144]=Wc,e[145]=vr):vr=e[145];let Ho;e[146]===Symbol.for("react.memo_cache_sentinel")?(Ho=v.jsx(Nk,{className:Ee.toolbarIcon}),e[146]=Ho):Ho=e[146];let br;e[147]!==me||e[148]!==Hc||e[149]!==vr?(br=v.jsx("button",{className:Hc,onClick:me,type:"button",...vr,children:Ho}),e[147]=me,e[148]=Hc,e[149]=vr,e[150]=br):br=e[150];let Wo,qo;e[151]===Symbol.for("react.memo_cache_sentinel")?(qo=Xe("Horizontal rule"),Wo=v.jsx(Mk,{className:Ee.toolbarIcon}),e[151]=Wo,e[152]=qo):(Wo=e[151],qo=e[152]);let xr;e[153]!==ge?(xr=v.jsx("button",{className:Ee.toolbarButton,onClick:ge,type:"button",...qo,children:Wo}),e[153]=ge,e[154]=xr):xr=e[154];const qc=pt(N?.alignLeft),Uc=N?.alignLeft;let wr;e[155]!==Uc?(wr=Xe("Align left",Uc),e[155]=Uc,e[156]=wr):wr=e[156];let Uo;e[157]===Symbol.for("react.memo_cache_sentinel")?(Uo=v.jsx(Gk,{className:Ee.toolbarIcon}),e[157]=Uo):Uo=e[157];let kr;e[158]!==Oe||e[159]!==qc||e[160]!==wr?(kr=v.jsx("button",{className:qc,onClick:Oe,type:"button",...wr,children:Uo}),e[158]=Oe,e[159]=qc,e[160]=wr,e[161]=kr):kr=e[161];const Kc=pt(N?.alignCenter),Gc=N?.alignCenter;let _r;e[162]!==Gc?(_r=Xe("Align center",Gc),e[162]=Gc,e[163]=_r):_r=e[163];let Ko;e[164]===Symbol.for("react.memo_cache_sentinel")?(Ko=v.jsx(Fk,{className:Ee.toolbarIcon}),e[164]=Ko):Ko=e[164];let Sr;e[165]!==K||e[166]!==Kc||e[167]!==_r?(Sr=v.jsx("button",{className:Kc,onClick:K,type:"button",..._r,children:Ko}),e[165]=K,e[166]=Kc,e[167]=_r,e[168]=Sr):Sr=e[168];const Yc=pt(N?.alignRight),Jc=N?.alignRight;let Cr;e[169]!==Jc?(Cr=Xe("Align right",Jc),e[169]=Jc,e[170]=Cr):Cr=e[170];let Go;e[171]===Symbol.for("react.memo_cache_sentinel")?(Go=v.jsx(Wk,{className:Ee.toolbarIcon}),e[171]=Go):Go=e[171];let Tr;e[172]!==ie||e[173]!==Yc||e[174]!==Cr?(Tr=v.jsx("button",{className:Yc,onClick:ie,type:"button",...Cr,children:Go}),e[172]=ie,e[173]=Yc,e[174]=Cr,e[175]=Tr):Tr=e[175];const Xc=pt(N?.alignJustify),Zc=N?.alignJustify;let Er;e[176]!==Zc?(Er=Xe("Justify",Zc),e[176]=Zc,e[177]=Er):Er=e[177];let Yo;e[178]===Symbol.for("react.memo_cache_sentinel")?(Yo=v.jsx(Uk,{className:Ee.toolbarIcon}),e[178]=Yo):Yo=e[178];let Mr;e[179]!==Ae||e[180]!==Xc||e[181]!==Er?(Mr=v.jsx("button",{className:Xc,onClick:Ae,type:"button",...Er,children:Yo}),e[179]=Ae,e[180]=Xc,e[181]=Er,e[182]=Mr):Mr=e[182];let Jo;e[183]===Symbol.for("react.memo_cache_sentinel")?(Jo=v.jsx("span",{className:Ee.toolbarColorLabel,children:"A"}),e[183]=Jo):Jo=e[183];let Ar;e[184]!==No?(Ar=Ze=>No(Ze.target.value),e[184]=No,e[185]=Ar):Ar=e[185];let Nr;e[186]!==Ar||e[187]!==p?(Nr=v.jsxs("label",{className:Ee.toolbarColor,title:"Text color",children:[Jo,v.jsx("input",{"aria-label":"Text color",type:"color",value:p,onChange:Ar})]}),e[186]=Ar,e[187]=p,e[188]=Nr):Nr=e[188];let Xo;e[189]===Symbol.for("react.memo_cache_sentinel")?(Xo=v.jsx(hk,{className:Ee.toolbarIcon}),e[189]=Xo):Xo=e[189];let Rr;e[190]!==bc?(Rr=Ze=>bc(Ze.target.value),e[190]=bc,e[191]=Rr):Rr=e[191];let Or;e[192]!==m||e[193]!==Rr?(Or=v.jsxs("label",{className:Ee.toolbarColor,title:"Highlight",children:[Xo,v.jsx("input",{"aria-label":"Highlight color",type:"color",value:m,onChange:Rr})]}),e[192]=m,e[193]=Rr,e[194]=Or):Or=e[194];const Qc=pt(N?.link),eu=N?.link;let Dr;e[195]!==eu?(Dr=Xe("Link",eu),e[195]=eu,e[196]=Dr):Dr=e[196];let Zo;e[197]===Symbol.for("react.memo_cache_sentinel")?(Zo=v.jsx(xk,{className:Ee.toolbarIcon}),e[197]=Zo):Zo=e[197];let Ir;e[198]!==ye||e[199]!==Qc||e[200]!==Dr?(Ir=v.jsx("button",{className:Qc,onClick:ye,type:"button",...Dr,children:Zo}),e[198]=ye,e[199]=Qc,e[200]=Dr,e[201]=Ir):Ir=e[201];let Qo,ea;e[202]===Symbol.for("react.memo_cache_sentinel")?(Qo=Xe("Insert image"),ea=v.jsx(gk,{className:Ee.toolbarIcon}),e[202]=Qo,e[203]=ea):(Qo=e[202],ea=e[203]);let Pr;e[204]!==Ne?(Pr=v.jsx("button",{className:Ee.toolbarButton,onClick:Ne,type:"button",...Qo,children:ea}),e[204]=Ne,e[205]=Pr):Pr=e[205];const tu=pt(N?.codeBlock),nu=N?.codeBlock;let Lr;e[206]!==nu?(Lr=Xe("Code block",nu),e[206]=nu,e[207]=Lr):Lr=e[207];let ta;e[208]===Symbol.for("react.memo_cache_sentinel")?(ta=v.jsx(nk,{className:Ee.toolbarIcon}),e[208]=ta):ta=e[208];let jr;e[209]!==he||e[210]!==tu||e[211]!==Lr?(jr=v.jsx("button",{className:tu,onClick:he,type:"button",...Lr,children:ta}),e[209]=he,e[210]=tu,e[211]=Lr,e[212]=jr):jr=e[212];let na,ia;e[213]===Symbol.for("react.memo_cache_sentinel")?(na=Xe("Undo"),ia=v.jsx(e_,{className:Ee.toolbarIcon}),e[213]=na,e[214]=ia):(na=e[213],ia=e[214]);let $r;e[215]!==rt?($r=v.jsx("button",{className:Ee.toolbarButton,onClick:rt,type:"button",...na,children:ia}),e[215]=rt,e[216]=$r):$r=e[216];let ra,sa;e[217]===Symbol.for("react.memo_cache_sentinel")?(ra=Xe("Redo"),sa=v.jsx(Ok,{className:Ee.toolbarIcon}),e[217]=ra,e[218]=sa):(ra=e[217],sa=e[218]);let Br;e[219]!==Ue?(Br=v.jsx("button",{className:Ee.toolbarButton,onClick:Ue,type:"button",...ra,children:sa}),e[219]=Ue,e[220]=Br):Br=e[220];let zr;e[221]!==xr||e[222]!==kr||e[223]!==Sr||e[224]!==Tr||e[225]!==Mr||e[226]!==Nr||e[227]!==Or||e[228]!==Ir||e[229]!==Pr||e[230]!==jr||e[231]!==$r||e[232]!==Br||e[233]!==Xi||e[234]!==Qi||e[235]!==tr||e[236]!==ir||e[237]!==sr||e[238]!==ar||e[239]!==cr||e[240]!==dr||e[241]!==pr||e[242]!==mr||e[243]!==yr||e[244]!==br?(zr=v.jsxs("div",{className:`${Ee.toolbar} flex gap-5`,children:[Xi,Qi,tr,ir,sr,ar,cr,dr,pr,mr,yr,br,xr,kr,Sr,Tr,Mr,Nr,Or,Ir,Pr,jr,$r,Br]}),e[221]=xr,e[222]=kr,e[223]=Sr,e[224]=Tr,e[225]=Mr,e[226]=Nr,e[227]=Or,e[228]=Ir,e[229]=Pr,e[230]=jr,e[231]=$r,e[232]=Br,e[233]=Xi,e[234]=Qi,e[235]=tr,e[236]=ir,e[237]=sr,e[238]=ar,e[239]=cr,e[240]=dr,e[241]=pr,e[242]=mr,e[243]=yr,e[244]=br,e[245]=zr):zr=e[245];let Vr;e[246]!==T?(Vr=v.jsx(B2,{editor:T}),e[246]=T,e[247]=Vr):Vr=e[247];let Fr;e[248]!==xc?(Fr=v.jsxs("span",{children:["Words: ",xc]}),e[248]=xc,e[249]=Fr):Fr=e[249];let Hr;e[250]!==T?.storage.characterCount?(Hr=T?.storage.characterCount?.characters?.()??0,e[250]=T?.storage.characterCount,e[251]=Hr):Hr=e[251];let Wr;e[252]!==Hr?(Wr=v.jsxs("span",{children:["Characters: ",Hr]}),e[252]=Hr,e[253]=Wr):Wr=e[253];let qr;e[254]!==Fr||e[255]!==Wr?(qr=v.jsxs("div",{className:Ee.counter,children:[Fr,Wr]}),e[254]=Fr,e[255]=Wr,e[256]=qr):qr=e[256];let Ur;e[257]!==d||e[258]!==u?(Ur=u&&v.jsxs("div",{className:Ee.output,children:[v.jsx("h3",{children:"Output"}),v.jsx("div",{dangerouslySetInnerHTML:{__html:d}})]}),e[257]=d,e[258]=u,e[259]=Ur):Ur=e[259];let oa;return e[260]!==zr||e[261]!==Vr||e[262]!==qr||e[263]!==Ur?(oa=v.jsxs("div",{className:Ee["editor-container"],children:[zr,Vr,qr,Ur]}),e[260]=zr,e[261]=Vr,e[262]=qr,e[263]=Ur,e[264]=oa):oa=e[264],oa};sh.displayName="TextEditor";function jB(n){const{editor:e}=n;return{bold:e.isActive("bold"),italic:e.isActive("italic"),underline:e.isActive("underline"),strike:e.isActive("strike"),subscript:e.isActive("subscript"),superscript:e.isActive("superscript"),h1:e.isActive("heading",{level:1}),h2:e.isActive("heading",{level:2}),h3:e.isActive("heading",{level:3}),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote"),codeBlock:e.isActive("codeBlock"),link:e.isActive("link"),alignLeft:e.isActive({textAlign:"left"}),alignCenter:e.isActive({textAlign:"center"}),alignRight:e.isActive({textAlign:"right"}),alignJustify:e.isActive({textAlign:"justify"})}}function $B(n){return`${Ee.toolbarButton} ${n?Ee.toolbarButtonActive:""}`}function BB(n,e){return{title:n,"aria-label":n,"aria-pressed":!!e}}const zB="_root_1o0rm_47",VB="_items_1o0rm_52",FB="_line_1o0rm_57",HB="_item_1o0rm_52",WB="_time_1o0rm_73",qB="_side_1o0rm_73",UB="_center_1o0rm_82",KB="_marker_1o0rm_89",GB="_markerWithIcon_1o0rm_109",YB="_icon_1o0rm_119",JB="_content_1o0rm_129",XB="_title_1o0rm_134",ZB="_description_1o0rm_139",st={root:zB,items:VB,line:FB,item:HB,"side-left":"_side-left_1o0rm_73",time:WB,"side-right":"_side-right_1o0rm_76",side:qB,center:UB,marker:KB,"dot-muted":"_dot-muted_1o0rm_97","dot-default":"_dot-default_1o0rm_101","dot-primary":"_dot-primary_1o0rm_105",markerWithIcon:GB,icon:YB,content:JB,title:XB,description:ZB,"align-left":"_align-left_1o0rm_143","align-right":"_align-right_1o0rm_146","mode-left":"_mode-left_1o0rm_149"},QB=n=>{const e=ne.c(14),{items:t,mode:i,className:r}=n,s=i===void 0?"alternate":i,o=st[`mode-${s}`];let a;e[0]!==r||e[1]!==o?(a=Z(st.root,o,r),e[0]=r,e[1]=o,e[2]=a):a=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=v.jsx("div",{className:st.line,"aria-hidden":"true"}),e[3]=l):l=e[3];let c;if(e[4]!==t||e[5]!==s){let f;e[7]!==s?(f=(p,h)=>{const m=s==="alternate"?h%2===0?"right":"left":"right",g=p.dotVariant??(p.icon,"muted");return v.jsxs("div",{className:Z(st.item,st[`side-${m}`]),children:[v.jsx("div",{className:st.side,children:m==="left"?v.jsx(Qg,{item:p,align:"right"}):v.jsx(Zg,{time:p.time,align:"right"})}),v.jsx("div",{className:st.center,children:v.jsx("div",{className:Z(st.marker,st[`dot-${g}`],{[st.markerWithIcon]:!!p.icon}),children:p.icon&&v.jsx("span",{className:st.icon,children:p.icon})})}),v.jsx("div",{className:st.side,children:m==="left"?v.jsx(Zg,{time:p.time,align:"left"}):v.jsx(Qg,{item:p,align:"left"})})]},p.id)},e[7]=s,e[8]=f):f=e[8],c=t.map(f),e[4]=t,e[5]=s,e[6]=c}else c=e[6];let u;e[9]!==c?(u=v.jsx("div",{className:st.items,children:c}),e[9]=c,e[10]=u):u=e[10];let d;return e[11]!==a||e[12]!==u?(d=v.jsxs("div",{className:a,children:[l,u]}),e[11]=a,e[12]=u,e[13]=d):d=e[13],d};function Zg(n){const e=ne.c(6),{time:t,align:i}=n;if(t==null){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=v.jsx("div",{className:st.time}),e[0]=a):a=e[0],a}const r=st[`align-${i}`];let s;e[1]!==r?(s=Z(st.time,r),e[1]=r,e[2]=s):s=e[2];let o;return e[3]!==s||e[4]!==t?(o=v.jsx("div",{className:s,children:t}),e[3]=s,e[4]=t,e[5]=o):o=e[5],o}function Qg(n){const e=ne.c(10),{item:t,align:i}=n,r=st[`align-${i}`];let s;e[0]!==r?(s=Z(st.content,r),e[0]=r,e[1]=s):s=e[1];let o;e[2]!==t.title?(o=v.jsx("div",{className:st.title,children:t.title}),e[2]=t.title,e[3]=o):o=e[3];let a;e[4]!==t.description?(a=t.description!=null&&v.jsx("div",{className:st.description,children:t.description}),e[4]=t.description,e[5]=a):a=e[5];let l;return e[6]!==s||e[7]!==o||e[8]!==a?(l=v.jsxs("div",{className:s,children:[o,a]}),e[6]=s,e[7]=o,e[8]=a,e[9]=l):l=e[9],l}const oh=E.createContext(null);function ez(){const n=ne.c(5),e=E.useContext(oh);if(!e)throw new Error("useToast must be used within <ToastProvider>");let t;return n[0]!==e.dismiss||n[1]!==e.dismissAll||n[2]!==e.push||n[3]!==e.toasts?(t={toast:e.push,dismiss:e.dismiss,dismissAll:e.dismissAll,toasts:e.toasts},n[0]=e.dismiss,n[1]=e.dismissAll,n[2]=e.push,n[3]=e.toasts,n[4]=t):t=n[4],t}function tz(){return`${Date.now()}-${Math.random().toString(16).slice(2)}`}const nz=n=>{const e=ne.c(18),{children:t,position:i,defaultDurationMs:r,maxToasts:s}=n,o=i===void 0?"top-right":i,a=r===void 0?3500:r,l=s===void 0?5:s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[u,d]=E.useState(c);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=new Map,e[1]=f):f=e[1];const p=E.useRef(f);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=new Map,e[2]=h):h=e[2];const m=E.useRef(h);let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=I=>{d(N=>N.filter(R=>R.id!==I));const L=p.current.get(I);L&&window.clearTimeout(L),p.current.delete(I);const O=m.current.get(I);O&&window.clearTimeout(O),m.current.delete(I)},e[3]=g):g=e[3];const y=g;let b;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=I=>{const L=p.current.get(I);L&&window.clearTimeout(L),p.current.delete(I),d(N=>N.map(R=>R.id!==I||R.closing?R:{...R,closing:!0}));const O=window.setTimeout(()=>y(I),160);m.current.set(I,O)},e[4]=b):b=e[4];const w=b;let _;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{p.current.forEach(iz),p.current.clear(),m.current.forEach(rz),m.current.clear(),d([])},e[5]=_):_=e[5];const x=_;let C;e[6]!==a||e[7]!==l?(C=I=>{const L=I.id??tz(),O={id:L,title:I.title,description:I.description,variant:I.variant??"default",durationMs:I.durationMs??a,closing:!1};if(d(N=>[O,...N].slice(0,l)),O.durationMs&&O.durationMs>0){const N=window.setTimeout(()=>w(L),O.durationMs);p.current.set(L,N)}return L},e[6]=a,e[7]=l,e[8]=C):C=e[8];const S=C;let k,M;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=()=>()=>{p.current.forEach(sz),p.current.clear(),m.current.forEach(oz),m.current.clear()},M=[],e[9]=k,e[10]=M):(k=e[9],M=e[10]),E.useEffect(k,M);let P;e[11]!==o||e[12]!==S||e[13]!==u?(P={toasts:u,push:S,dismiss:w,dismissAll:x,position:o},e[11]=o,e[12]=S,e[13]=u,e[14]=P):P=e[14];let T;return e[15]!==t||e[16]!==P?(T=v.jsx(oh.Provider,{value:P,children:t}),e[15]=t,e[16]=P,e[17]=T):T=e[17],T};function iz(n){return window.clearTimeout(n)}function rz(n){return window.clearTimeout(n)}function sz(n){return window.clearTimeout(n)}function oz(n){return window.clearTimeout(n)}const az="_root_13zn4_47",lz="_viewport_13zn4_50",cz="_toast_13zn4_75",uz="_toastIn_13zn4_1",dz="_closing_13zn4_92",fz="_toastOut_13zn4_1",pz="_content_13zn4_95",hz="_title_13zn4_100",mz="_description_13zn4_105",gz="_close_13zn4_109",yz="_success_13zn4_136",vz="_warning_13zn4_140",bz="_error_13zn4_144",ln={root:az,viewport:lz,"top-right":"_top-right_13zn4_59","top-left":"_top-left_13zn4_63","bottom-right":"_bottom-right_13zn4_67","bottom-left":"_bottom-left_13zn4_71",toast:cz,toastIn:uz,closing:dz,toastOut:fz,content:pz,title:hz,description:mz,close:gz,default:"_default_13zn4_126",success:yz,warning:vz,error:bz},xz=n=>{const e=ne.c(17),{toast:t,onDismiss:i}=n,{title:r,description:s,variant:o,closing:a}=t,c=ln[o===void 0?"default":o],u=!!a;let d;e[0]!==c||e[1]!==u?(d=Z(ln.root,ln.toast,c,{[ln.closing]:u}),e[0]=c,e[1]=u,e[2]=d):d=e[2];let f;e[3]!==r?(f=r?v.jsx("div",{className:ln.title,children:r}):null,e[3]=r,e[4]=f):f=e[4];let p;e[5]!==s?(p=s?v.jsx("div",{className:ln.description,children:s}):null,e[5]=s,e[6]=p):p=e[6];let h;e[7]!==f||e[8]!==p?(h=v.jsxs("div",{className:ln.content,children:[f,p]}),e[7]=f,e[8]=p,e[9]=h):h=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=v.jsx(xf,{size:14}),e[10]=m):m=e[10];let g;e[11]!==i?(g=v.jsx("button",{type:"button",className:ln.close,onClick:i,"aria-label":"Dismiss",children:m}),e[11]=i,e[12]=g):g=e[12];let y;return e[13]!==d||e[14]!==h||e[15]!==g?(y=v.jsxs("div",{className:d,role:"status",children:[h,g]}),e[13]=d,e[14]=h,e[15]=g,e[16]=y):y=e[16],y},wz=n=>{const e=ne.c(11),{className:t}=n,i=E.useContext(oh);if(!i)throw new Error("ToastViewport must be used within <ToastProvider>");const{toasts:r,dismiss:s,position:o}=i,a=ln[o];let l;e[0]!==t||e[1]!==a?(l=Z(ln.root,ln.viewport,a,t),e[0]=t,e[1]=a,e[2]=l):l=e[2];let c;if(e[3]!==s||e[4]!==r){let d;e[6]!==s?(d=f=>v.jsx(xz,{toast:f,onDismiss:()=>s(f.id)},f.id),e[6]=s,e[7]=d):d=e[7],c=r.map(d),e[3]=s,e[4]=r,e[5]=c}else c=e[5];let u;return e[8]!==l||e[9]!==c?(u=zi.createPortal(v.jsx("div",{className:l,"aria-live":"polite","aria-relevant":"additions",children:c}),document.body),e[8]=l,e[9]=c,e[10]=u):u=e[10],u},kz="_content_cxgma_47",_z="_tooltipIn_cxgma_1",ey={content:kz,"side-top":"_side-top_cxgma_70",tooltipIn:_z,"side-bottom":"_side-bottom_cxgma_81","side-left":"_side-left_cxgma_92","side-right":"_side-right_cxgma_103"},xw=E.createContext(null);function ww(){const n=E.useContext(xw);if(!n)throw new Error("Tooltip components must be used within <Tooltip>");return n}const Sz=n=>{const e=ne.c(15),{open:t,defaultOpen:i,onOpenChange:r,side:s,align:o,offset:a,openDelay:l,closeDelay:c,children:u}=n,d=i===void 0?!1:i,f=s===void 0?"top":s,p=o===void 0?"center":o,h=a===void 0?8:a,m=l===void 0?120:l,g=c===void 0?80:c,y=t!==void 0,[b,w]=E.useState(d);let _;e[0]!==y||e[1]!==r?(_=L=>{y||w(L),r?.(L)},e[0]=y,e[1]=r,e[2]=_):_=e[2];const x=_,C=E.useRef(null),S=E.useRef(null),k=E.useId(),M=y?!!t:b;let P;e[3]!==p||e[4]!==g||e[5]!==k||e[6]!==h||e[7]!==m||e[8]!==x||e[9]!==f||e[10]!==M?(P={open:M,setOpen:x,triggerRef:C,contentRef:S,contentId:k,side:f,align:p,offset:h,openDelay:m,closeDelay:g},e[3]=p,e[4]=g,e[5]=k,e[6]=h,e[7]=m,e[8]=x,e[9]=f,e[10]=M,e[11]=P):P=e[11];const T=P;let I;return e[12]!==u||e[13]!==T?(I=v.jsx(xw.Provider,{value:T,children:u}),e[12]=u,e[13]=T,e[14]=I):I=e[14],I},kw=E.forwardRef(({asChild:n=!1,children:e,className:t},i)=>{const{open:r,setOpen:s,triggerRef:o,contentId:a,openDelay:l,closeDelay:c}=ww(),u=E.useRef(null),d=E.useRef(null);E.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current),d.current&&window.clearTimeout(d.current)},[]);const f=e,p=y=>{o.current=y,i&&(typeof i=="function"?i(y):i.current=y)},h=()=>{d.current&&window.clearTimeout(d.current),u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),l)},m=()=>{u.current&&window.clearTimeout(u.current),d.current&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>s(!1),c)},g={ref:p,onPointerEnter:y=>{f.props?.onPointerEnter?.(y),h()},onPointerLeave:y=>{f.props?.onPointerLeave?.(y),m()},onFocus:y=>{f.props?.onFocus?.(y),s(!0)},onBlur:y=>{f.props?.onBlur?.(y),s(!1)},"aria-describedby":r?a:void 0,className:Z(f.props?.className,t)};return E.cloneElement(f,g)});kw.displayName="TooltipTrigger";const _w=E.forwardRef((n,e)=>{const t=ne.c(49);let i,r,s,o,a;t[0]!==n?({children:i,className:r,style:o,width:a,...s}=n,t[0]=n,t[1]=i,t[2]=r,t[3]=s,t[4]=o,t[5]=a):(i=t[1],r=t[2],s=t[3],o=t[4],a=t[5]);const{open:l,setOpen:c,triggerRef:u,contentRef:d,contentId:f,side:p,align:h,offset:m,closeDelay:g}=ww(),[y,b]=E.useState(null),w=E.useRef(null);let _,x;t[6]===Symbol.for("react.memo_cache_sentinel")?(_=()=>()=>{w.current&&window.clearTimeout(w.current)},x=[],t[6]=_,t[7]=x):(_=t[6],x=t[7]),E.useEffect(_,x);let C;t[8]!==d||t[9]!==e?(C=j=>{d.current=j,e&&(typeof e=="function"?e(j):e.current=j)},t[8]=d,t[9]=e,t[10]=C):C=t[10];const S=C;let k;t[11]!==h||t[12]!==d||t[13]!==m||t[14]!==p||t[15]!==u?(k=()=>{const j=u.current,F=d.current;if(!j||!F)return;const V=j.getBoundingClientRect(),G=F.getBoundingClientRect(),W=()=>h==="start"?V.left:h==="end"?V.right-G.width:V.left+V.width/2-G.width/2,z=()=>h==="start"?V.top:h==="end"?V.bottom-G.height:V.top+V.height/2-G.height/2;let U,J;p==="top"?(J=V.top-G.height-m,U=W()):p==="bottom"?(J=V.bottom+m,U=W()):p==="right"?(U=V.right+m,J=z()):(U=V.left-G.width-m,J=z());const X=window.innerWidth,re=window.innerHeight;U=Math.max(8,Math.min(U,X-G.width-8)),J=Math.max(8,Math.min(J,re-G.height-8)),b({top:J,left:U})},t[11]=h,t[12]=d,t[13]=m,t[14]=p,t[15]=u,t[16]=k):k=t[16];const M=k;let P;t[17]!==l||t[18]!==M?(P=()=>{l&&M()},t[17]=l,t[18]=M,t[19]=P):P=t[19];let T;t[20]!==i||t[21]!==l||t[22]!==M?(T=[l,M,i],t[20]=i,t[21]=l,t[22]=M,t[23]=T):T=t[23],E.useLayoutEffect(P,T);let I,L;if(t[24]!==l||t[25]!==c||t[26]!==M?(I=()=>{if(!l)return;const j=V=>{V.key==="Escape"&&c(!1)},F=()=>M();return document.addEventListener("keydown",j),window.addEventListener("resize",F),window.addEventListener("scroll",F,!0),()=>{document.removeEventListener("keydown",j),window.removeEventListener("resize",F),window.removeEventListener("scroll",F,!0)}},L=[l,c,M],t[24]=l,t[25]=c,t[26]=M,t[27]=I,t[28]=L):(I=t[27],L=t[28]),E.useEffect(I,L),!l)return null;const O=ey[`side-${p}`];let N;t[29]!==r||t[30]!==O?(N=Z(ey.content,O,r),t[29]=r,t[30]=O,t[31]=N):N=t[31];const R=y?.top??0,$=y?.left??0;let B;t[32]!==o||t[33]!==R||t[34]!==$||t[35]!==a?(B={position:"fixed",top:R,left:$,width:a,...o},t[32]=o,t[33]=R,t[34]=$,t[35]=a,t[36]=B):B=t[36];let q;t[37]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{w.current&&window.clearTimeout(w.current)},t[37]=q):q=t[37];let D;t[38]!==g||t[39]!==c?(D=()=>{w.current&&window.clearTimeout(w.current),w.current=window.setTimeout(()=>c(!1),g)},t[38]=g,t[39]=c,t[40]=D):D=t[40];let A;return t[41]!==i||t[42]!==f||t[43]!==S||t[44]!==s||t[45]!==N||t[46]!==B||t[47]!==D?(A=zi.createPortal(v.jsx("div",{ref:S,id:f,role:"tooltip",className:N,style:B,onPointerEnter:q,onPointerLeave:D,...s,children:i}),document.body),t[41]=i,t[42]=f,t[43]=S,t[44]=s,t[45]=N,t[46]=B,t[47]=D,t[48]=A):A=t[48],A});_w.displayName="TooltipContent";const Cz="_root_rzrap_47",Tz="_panel_rzrap_54",Ez="_panelHeader_rzrap_63",Mz="_title_rzrap_71",Az="_subTitle_rzrap_75",Nz="_list_rzrap_79",Rz="_row_rzrap_85",Oz="_disabledRow_rzrap_98",Dz="_label_rzrap_102",Iz="_controls_rzrap_106",ht={root:Cz,panel:Tz,panelHeader:Ez,title:Mz,subTitle:Az,list:Nz,row:Rz,disabledRow:Oz,label:Dz,controls:Iz},_n=n=>String(n),Pz=n=>{const e=ne.c(102),{leftTitle:t,rightTitle:i,leftItems:r,rightItems:s,onChange:o,showMoveAll:a,className:l}=n,c=a===void 0?!0:a,[u,d]=E.useState(Lz),[f,p]=E.useState(jz);let h,m;e[0]!==r||e[1]!==s?(h=()=>{const K=new Set(r.map($z)),Q=new Set(s.map(Bz));d(ie=>new Set(Array.from(ie).filter(oe=>K.has(oe)))),p(ie=>new Set(Array.from(ie).filter(oe=>Q.has(oe))))},m=[r,s],e[0]=r,e[1]=s,e[2]=h,e[3]=m):(h=e[2],m=e[3]),E.useEffect(h,m);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=(K,Q)=>{Q||d(ie=>{const oe=new Set(ie);return oe.has(K)?oe.delete(K):oe.add(K),oe})},e[4]=g):g=e[4];const y=g;let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=(K,Q)=>{Q||p(ie=>{const oe=new Set(ie);return oe.has(K)?oe.delete(K):oe.add(K),oe})},e[5]=b):b=e[5];const w=b;let _;e[6]!==r||e[7]!==o||e[8]!==s||e[9]!==u?(_=()=>{const K=r.filter(ie=>u.has(_n(ie.key))&&!ie.disabled);if(!K.length)return;const Q=r.filter(ie=>!u.has(_n(ie.key)));o({leftItems:Q,rightItems:[...s,...K]}),d(new Set)},e[6]=r,e[7]=o,e[8]=s,e[9]=u,e[10]=_):_=e[10];const x=_;let C;e[11]!==r||e[12]!==o||e[13]!==s||e[14]!==f?(C=()=>{const K=s.filter(ie=>f.has(_n(ie.key))&&!ie.disabled);if(!K.length)return;const Q=s.filter(ie=>!f.has(_n(ie.key)));o({leftItems:[...r,...K],rightItems:Q}),p(new Set)},e[11]=r,e[12]=o,e[13]=s,e[14]=f,e[15]=C):C=e[15];const S=C;let k;e[16]!==r||e[17]!==o||e[18]!==s?(k=()=>{const K=r.filter(zz);K.length&&(o({leftItems:r.filter(Vz),rightItems:[...s,...K]}),d(new Set))},e[16]=r,e[17]=o,e[18]=s,e[19]=k):k=e[19];const M=k;let P;e[20]!==r||e[21]!==o||e[22]!==s?(P=()=>{const K=s.filter(Fz);K.length&&(o({leftItems:[...r,...K],rightItems:s.filter(Hz)}),p(new Set))},e[20]=r,e[21]=o,e[22]=s,e[23]=P):P=e[23];const T=P;let I;e[24]!==r?(I=r.filter(Wz),e[24]=r,e[25]=I):I=e[25];const L=I.length;let O;e[26]!==s?(O=s.filter(qz),e[26]=s,e[27]=O):O=e[27];const N=O.length;let R;if(e[28]!==r||e[29]!==u){let K;e[31]!==u?(K=Q=>u.has(_n(Q.key))&&!Q.disabled,e[31]=u,e[32]=K):K=e[32],R=r.some(K),e[28]=r,e[29]=u,e[30]=R}else R=e[30];const $=R;let B;if(e[33]!==s||e[34]!==f){let K;e[36]!==f?(K=Q=>f.has(_n(Q.key))&&!Q.disabled,e[36]=f,e[37]=K):K=e[37],B=s.some(K),e[33]=s,e[34]=f,e[35]=B}else B=e[35];const q=B;let D;e[38]!==r||e[39]!==c?(D=c&&r.some(Uz),e[38]=r,e[39]=c,e[40]=D):D=e[40];const A=D;let j;e[41]!==s||e[42]!==c?(j=c&&s.some(Kz),e[41]=s,e[42]=c,e[43]=j):j=e[43];const F=j;let V;e[44]!==l?(V=Z(ht.root,l),e[44]=l,e[45]=V):V=e[45];let G;e[46]!==L||e[47]!==t||e[48]!==u?(G=(t||L>=0)&&v.jsxs("div",{className:ht.panelHeader,children:[t&&v.jsx("div",{className:ht.title,children:t}),v.jsxs("div",{className:ht.subTitle,children:[u.size,"/",L," selected"]})]}),e[46]=L,e[47]=t,e[48]=u,e[49]=G):G=e[49];const W=t??"Choices";let z;if(e[50]!==r||e[51]!==u){let K;e[53]!==u?(K=Q=>{const ie=_n(Q.key),oe=u.has(ie);return v.jsxs("div",{className:Z(ht.row,{[ht.disabledRow]:Q.disabled}),role:"option","aria-selected":oe,onClick:()=>y(ie,Q.disabled),children:[v.jsx("div",{onClick:Gz,onPointerDown:Yz,children:v.jsx(qa,{checked:oe,onCheckedChange:()=>y(ie,Q.disabled),disabled:Q.disabled})}),v.jsx("div",{className:ht.label,children:Q.label})]},ie)},e[53]=u,e[54]=K):K=e[54],z=r.map(K),e[50]=r,e[51]=u,e[52]=z}else z=e[52];let U;e[55]!==W||e[56]!==z?(U=v.jsx("div",{className:ht.list,role:"listbox","aria-label":W,children:z}),e[55]=W,e[56]=z,e[57]=U):U=e[57];let J;e[58]!==G||e[59]!==U?(J=v.jsxs("div",{className:ht.panel,children:[G,U]}),e[58]=G,e[59]=U,e[60]=J):J=e[60];let X;e[61]!==A||e[62]!==M||e[63]!==c?(X=c&&v.jsx(dt,{variant:"outline",size:"sm",onClick:M,disabled:!A,"aria-label":"Move all to the right",children:v.jsx(ek,{size:16})}),e[61]=A,e[62]=M,e[63]=c,e[64]=X):X=e[64];const re=!$;let Y;e[65]===Symbol.for("react.memo_cache_sentinel")?(Y=v.jsx(bf,{size:16}),e[65]=Y):Y=e[65];let le;e[66]!==x||e[67]!==re?(le=v.jsx(dt,{variant:"outline",size:"sm",onClick:x,disabled:re,"aria-label":"Move selected to the right",children:Y}),e[66]=x,e[67]=re,e[68]=le):le=e[68];const ce=!q;let we;e[69]===Symbol.for("react.memo_cache_sentinel")?(we=v.jsx(vf,{size:16}),e[69]=we):we=e[69];let Se;e[70]!==S||e[71]!==ce?(Se=v.jsx(dt,{variant:"outline",size:"sm",onClick:S,disabled:ce,"aria-label":"Move selected to the left",children:we}),e[70]=S,e[71]=ce,e[72]=Se):Se=e[72];let Te;e[73]!==F||e[74]!==T||e[75]!==c?(Te=c&&v.jsx(dt,{variant:"outline",size:"sm",onClick:T,disabled:!F,"aria-label":"Move all to the left",children:v.jsx(Zw,{size:16})}),e[73]=F,e[74]=T,e[75]=c,e[76]=Te):Te=e[76];let de;e[77]!==X||e[78]!==le||e[79]!==Se||e[80]!==Te?(de=v.jsxs("div",{className:ht.controls,"aria-label":"Transfer controls",children:[X,le,Se,Te]}),e[77]=X,e[78]=le,e[79]=Se,e[80]=Te,e[81]=de):de=e[81];let me;e[82]!==N||e[83]!==i||e[84]!==f?(me=(i||N>=0)&&v.jsxs("div",{className:ht.panelHeader,children:[i&&v.jsx("div",{className:ht.title,children:i}),v.jsxs("div",{className:ht.subTitle,children:[f.size,"/",N," selected"]})]}),e[82]=N,e[83]=i,e[84]=f,e[85]=me):me=e[85];const be=i??"Chosen";let ge;if(e[86]!==s||e[87]!==f){let K;e[89]!==f?(K=Q=>{const ie=_n(Q.key),oe=f.has(ie);return v.jsxs("div",{className:Z(ht.row,{[ht.disabledRow]:Q.disabled}),role:"option","aria-selected":oe,onClick:()=>w(ie,Q.disabled),children:[v.jsx("div",{onClick:Jz,onPointerDown:Xz,children:v.jsx(qa,{checked:oe,onCheckedChange:()=>w(ie,Q.disabled),disabled:Q.disabled})}),v.jsx("div",{className:ht.label,children:Q.label})]},ie)},e[89]=f,e[90]=K):K=e[90],ge=s.map(K),e[86]=s,e[87]=f,e[88]=ge}else ge=e[88];let Ce;e[91]!==be||e[92]!==ge?(Ce=v.jsx("div",{className:ht.list,role:"listbox","aria-label":be,children:ge}),e[91]=be,e[92]=ge,e[93]=Ce):Ce=e[93];let Oe;e[94]!==me||e[95]!==Ce?(Oe=v.jsxs("div",{className:ht.panel,children:[me,Ce]}),e[94]=me,e[95]=Ce,e[96]=Oe):Oe=e[96];let We;return e[97]!==V||e[98]!==J||e[99]!==de||e[100]!==Oe?(We=v.jsxs("div",{className:V,children:[J,de,Oe]}),e[97]=V,e[98]=J,e[99]=de,e[100]=Oe,e[101]=We):We=e[101],We};function Lz(){return new Set}function jz(){return new Set}function $z(n){return _n(n.key)}function Bz(n){return _n(n.key)}function zz(n){return!n.disabled}function Vz(n){return n.disabled}function Fz(n){return!n.disabled}function Hz(n){return n.disabled}function Wz(n){return!n.disabled}function qz(n){return!n.disabled}function Uz(n){return!n.disabled}function Kz(n){return!n.disabled}function Gz(n){return n.stopPropagation()}function Yz(n){return n.stopPropagation()}function Jz(n){return n.stopPropagation()}function Xz(n){return n.stopPropagation()}const Zz="_card_10cgo_47",Qz="_header_10cgo_58",eV="_headerTitle_10cgo_61",tV="_profileRow_10cgo_67",nV="_avatar_10cgo_73",iV="_profileMeta_10cgo_77",rV="_name_10cgo_83",sV="_role_10cgo_90",oV="_email_10cgo_96",aV="_divider_10cgo_114",lV="_items_10cgo_119",cV="_item_10cgo_119",uV="_itemIcon_10cgo_145",dV="_blue_10cgo_158",fV="_green_10cgo_162",pV="_orange_10cgo_166",hV="_red_10cgo_170",mV="_gray_10cgo_174",gV="_itemText_10cgo_178",yV="_itemTitle_10cgo_184",vV="_itemSubtitle_10cgo_190",bV="_itemDisabled_10cgo_196",xV="_footer_10cgo_200",wV="_logout_10cgo_203",it={card:Zz,header:Qz,headerTitle:eV,profileRow:tV,avatar:nV,profileMeta:iV,name:rV,role:sV,email:oV,divider:aV,items:lV,item:cV,itemIcon:uV,blue:dV,green:fV,orange:pV,red:hV,gray:mV,itemText:gV,itemTitle:yV,itemSubtitle:vV,itemDisabled:bV,footer:xV,logout:wV},Sw=E.forwardRef((n,e)=>{const t=ne.c(53);let i,r,s,o,a,l,c,u,d,f,p,h;t[0]!==n?({className:s,title:d,avatarSrc:r,avatarAlt:f,avatarFallback:i,name:a,role:u,email:o,items:p,logoutLabel:h,onLogout:l,...c}=n,t[0]=n,t[1]=i,t[2]=r,t[3]=s,t[4]=o,t[5]=a,t[6]=l,t[7]=c,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=h):(i=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],p=t[11],h=t[12]);const m=d===void 0?"User Profile":d,g=f===void 0?"User avatar":f;let y;t[13]!==p?(y=p===void 0?[]:p,t[13]=p,t[14]=y):y=t[14];const b=y,w=h===void 0?"Log out":h;let _;t[15]!==s?(_=Z(it.card,s),t[15]=s,t[16]=_):_=t[16];let x;t[17]!==m?(x=v.jsx("div",{className:it.header,children:v.jsx("div",{className:it.headerTitle,children:m})}),t[17]=m,t[18]=x):x=t[18];const C=String(g),S=String(g);let k;t[19]!==i||t[20]!==r||t[21]!==C||t[22]!==S?(k=v.jsx(Kl,{src:r,alt:C,ariaLabel:S,size:"xxlarge",variant:"rounded",border:"none",fallback:i,className:it.avatar}),t[19]=i,t[20]=r,t[21]=C,t[22]=S,t[23]=k):k=t[23];let M;t[24]!==a?(M=v.jsx("div",{className:it.name,children:a}),t[24]=a,t[25]=M):M=t[25];let P;t[26]!==u?(P=u?v.jsx("div",{className:it.role,children:u}):null,t[26]=u,t[27]=P):P=t[27];let T;t[28]!==o?(T=o?v.jsxs("div",{className:it.email,children:[v.jsx(Tk,{size:14,"aria-hidden":"true"}),v.jsx("span",{children:o})]}):null,t[28]=o,t[29]=T):T=t[29];let I;t[30]!==M||t[31]!==P||t[32]!==T?(I=v.jsxs("div",{className:it.profileMeta,children:[M,P,T]}),t[30]=M,t[31]=P,t[32]=T,t[33]=I):I=t[33];let L;t[34]!==k||t[35]!==I?(L=v.jsxs("div",{className:it.profileRow,children:[k,I]}),t[34]=k,t[35]=I,t[36]=L):L=t[36];let O;t[37]===Symbol.for("react.memo_cache_sentinel")?(O=v.jsx("div",{className:it.divider}),t[37]=O):O=t[37];let N;t[38]!==b?(N=b.map(kV),t[38]=b,t[39]=N):N=t[39];let R;t[40]!==N?(R=v.jsx("div",{className:it.items,children:N}),t[40]=N,t[41]=R):R=t[41];let $;t[42]!==w||t[43]!==l?($=l?v.jsx("div",{className:it.footer,children:v.jsx(dt,{className:it.logout,variant:"default",radius:"rounded",onClick:l,children:w})}):null,t[42]=w,t[43]=l,t[44]=$):$=t[44];let B;return t[45]!==c||t[46]!==e||t[47]!==L||t[48]!==R||t[49]!==$||t[50]!==_||t[51]!==x?(B=v.jsxs("div",{ref:e,className:_,...c,children:[x,L,O,R,$]}),t[45]=c,t[46]=e,t[47]=L,t[48]=R,t[49]=$,t[50]=_,t[51]=x,t[52]=B):B=t[52],B});Sw.displayName="UserProfileCard";function kV(n){const e=!!n.disabled,t=n.onClick?"button":"div";return v.jsxs(t,{type:n.onClick?"button":void 0,className:Z(it.item,e&&it.itemDisabled),onClick:e?void 0:n.onClick,disabled:n.onClick?e:void 0,children:[v.jsx("span",{className:Z(it.itemIcon,n.iconVariant?it[n.iconVariant]:it.gray),children:n.icon}),v.jsxs("span",{className:it.itemText,children:[v.jsx("span",{className:it.itemTitle,children:n.title}),n.subtitle?v.jsx("span",{className:it.itemSubtitle,children:n.subtitle}):null]})]},n.id)}exports.Accordion=ry;exports.AccordionContent=cy;exports.AccordionItem=ay;exports.AccordionTrigger=ly;exports.Alert=T_;exports.Avatar=Kl;exports.AvatarGroup=uy;exports.Badge=MS;exports.BasketItem=fy;exports.BreadCrumb=n3;exports.Button=dt;exports.ButtonGroup=hy;exports.ButtonGroupItem=my;exports.Card=gy;exports.Carousel=kf;exports.CarouselContent=_f;exports.CarouselDots=vy;exports.CarouselItem=Sf;exports.CarouselNext=Tf;exports.CarouselPrevious=Cf;exports.Checkbox=qa;exports.ChevronIcon=R6;exports.Chip=eE;exports.ColorPicker=Ey;exports.Counter=XN;exports.Drawer=h5;exports.DrawerClose=y0;exports.DrawerContent=g0;exports.DrawerTrigger=m0;exports.DropZone=R0;exports.DropdownBase=A6;exports.DropdownOption=N6;exports.DropdownWrapper=zO;exports.FileInput=O0;exports.Image=bo;exports.InputField=D0;exports.Label=VR;exports.Lightbox=d6;exports.MediaCard=L0;exports.NavigationBar=j0;exports.NotificationButton=$0;exports.Pagination=uO;exports.Popover=P0;exports.PopoverClose=nl;exports.PopoverContent=fp;exports.PopoverTrigger=dp;exports.RadioCardGroup=W0;exports.RadioCardOption=q0;exports.Rating=BO;exports.SimplePagination=dO;exports.Slider=ZO;exports.Spinner=wf;exports.StatCard=U0;exports.Switch=K0;exports.Table=wb;exports.TableBody=_b;exports.TableCaption=Mb;exports.TableCell=Eb;exports.TableFooter=Sb;exports.TableHead=Tb;exports.TableHeader=kb;exports.TableRow=Cb;exports.Tabs=hb;exports.TabsContent=yb;exports.TabsList=mb;exports.TabsTrigger=gb;exports.TextEditor=sh;exports.TextEditorDefault=sh;exports.Timeline=QB;exports.ToastProvider=nz;exports.ToastViewport=wz;exports.Tooltip=Sz;exports.TooltipContent=_w;exports.TooltipTrigger=kw;exports.TransferList=Pz;exports.Typography=jn;exports.UnderlineTabsContent=xb;exports.UnderlineTabsList=vb;exports.UnderlineTabsTrigger=bb;exports.UserProfileCard=Sw;exports.canGoNext=z0;exports.canGoPrevious=B0;exports.getItemsRange=V0;exports.getPageNumbers=F0;exports.getTotalPages=pp;exports.useDropdown=T6;exports.useDropdownKeyboard=E6;exports.useRipple=Yl;exports.useToast=ez;
|
|
154
|
+
`):"",markdownTokenizer:{name:"taskList",level:"block",start(n){var e;const t=(e=n.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return t!==void 0?t:-1},tokenize(n,e,t){const i=s=>{const o=sf(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:t.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:i},t);return o?[{type:"taskList",raw:o.raw,items:o.items}]:t.blockTokens(s)},r=sf(n,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,o)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:t.inlineTokens(s.mainContent),nestedTokens:o}),customNestedParser:i},t);if(r)return{type:"taskList",raw:r.raw,items:r.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Le.create({name:"listKit",addExtensions(){const n=[];return this.options.bulletList!==!1&&n.push(tw.configure(this.options.bulletList)),this.options.listItem!==!1&&n.push(nw.configure(this.options.listItem)),this.options.listKeymap!==!1&&n.push(lw.configure(this.options.listKeymap)),this.options.orderedList!==!1&&n.push(uw.configure(this.options.orderedList)),this.options.taskItem!==!1&&n.push(P$.configure(this.options.taskItem)),this.options.taskList!==!1&&n.push(L$.configure(this.options.taskList)),n}});var Kg=" ",j$=" ",$$=Lt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",He(this.options.HTMLAttributes,n),0]},parseMarkdown:(n,e)=>{const t=n.tokens||[];if(t.length===1&&t[0].type==="image")return e.parseChildren([t[0]]);const i=e.parseInline(t);return i.length===1&&i[0].type==="text"&&(i[0].text===Kg||i[0].text===j$)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,i)},renderMarkdown:(n,e)=>{if(!n)return"";const t=Array.isArray(n.content)?n.content:[];return t.length===0?Kg:e.renderChildren(t)},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),B$=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,z$=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,V$=hn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",He(this.options.HTMLAttributes,n),0]},markdownTokenName:"del",parseMarkdown:(n,e)=>e.applyMark("strike",e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>`~~${e.renderChildren(n)}~~`,addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ui({find:B$,type:this.type})]},addPasteRules(){return[yi({find:z$,type:this.type})]}}),F$=Lt.create({name:"text",group:"inline",parseMarkdown:n=>({type:"text",text:n.text||""}),renderMarkdown:n=>n.text||""}),dw=hn.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",He(this.options.HTMLAttributes,n),0]},parseMarkdown(n,e){return e.applyMark(this.name||"underline",e.parseInline(n.tokens||[]))},renderMarkdown(n,e){return`++${e.renderChildren(n)}++`},markdownTokenizer:{name:"underline",level:"inline",start(n){return n.indexOf("++")},tokenize(n,e,t){const r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(n);if(!r)return;const s=r[2].trim();return{type:"underline",raw:r[0],text:s,tokens:t.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function H$(n={}){return new Je({view(e){return new W$(e,n)}})}class W${constructor(e,t){var i;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(i=t.width)!==null&&i!==void 0?i:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let s=o=>{this[r](o)};return e.dom.addEventListener(r,s),{name:r,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,i,r=this.editorView.dom,s=r.getBoundingClientRect(),o=s.width/r.offsetWidth,a=s.height/r.offsetHeight;if(t){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*a;i={left:h.left,right:h.right,top:m-g,bottom:m+g}}}}if(!i){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;i={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let c,u;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,u=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;c=d.left-l.scrollLeft*f,u=d.top-l.scrollTop*p}this.element.style.left=(i.left-c)/o+"px",this.element.style.top=(i.top-u)/a+"px",this.element.style.width=(i.right-i.left)/o+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),i=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=i&&i.type.spec.disableDropCursor,s=typeof r=="function"?r(this.editorView,t,e):r;if(t&&!s){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=nx(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class tt extends _e{constructor(e){super(e,e)}map(e,t){let i=e.resolve(t.map(this.head));return tt.valid(i)?new tt(i):_e.near(i)}content(){return se.empty}eq(e){return e instanceof tt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new tt(e.resolve(t.pos))}getBookmark(){return new rh(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!q$(e)||!U$(e))return!1;let i=t.type.spec.allowGapCursor;if(i!=null)return i;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,i=!1){e:for(;;){if(!i&&tt.valid(e))return e;let r=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(t>0?e.indexAfter(o)<a.childCount:e.index(o)>0){s=a.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;r+=t;let l=e.doc.resolve(r);if(tt.valid(l))return l}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!fe.isSelectable(s)){e=e.doc.resolve(r+s.nodeSize*t),i=!1;continue e}break}s=o,r+=t;let a=e.doc.resolve(r);if(tt.valid(a))return a}return null}}}tt.prototype.visible=!1;tt.findFrom=tt.findGapCursorFrom;_e.jsonID("gapcursor",tt);class rh{constructor(e){this.pos=e}map(e){return new rh(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return tt.valid(t)?new tt(t):_e.near(t)}}function fw(n){return n.isAtom||n.spec.isolating||n.spec.createGapCursor}function q$(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),i=n.node(e);if(t==0){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(t-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||fw(r.type))return!0;if(r.inlineContent)return!1}}return!0}function U$(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),i=n.node(e);if(t==i.childCount){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(t);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||fw(r.type))return!0;if(r.inlineContent)return!1}}return!0}function K$(){return new Je({props:{decorations:X$,createSelectionBetween(n,e,t){return e.pos==t.pos&&tt.valid(t)?new tt(t):null},handleClick:Y$,handleKeyDown:G$,handleDOMEvents:{beforeinput:J$}}})}const G$=i2({ArrowLeft:Ia("horiz",-1),ArrowRight:Ia("horiz",1),ArrowUp:Ia("vert",-1),ArrowDown:Ia("vert",1)});function Ia(n,e){const t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(i,r,s){let o=i.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof ve){if(!s.endOfTextblock(t)||a.depth==0)return!1;l=!1,a=i.doc.resolve(e>0?a.after():a.before())}let c=tt.findGapCursorFrom(a,e,l);return c?(r&&r(i.tr.setSelection(new tt(c))),!0):!1}}function Y$(n,e,t){if(!n||!n.editable)return!1;let i=n.state.doc.resolve(e);if(!tt.valid(i))return!1;let r=n.posAtCoords({left:t.clientX,top:t.clientY});return r&&r.inside>-1&&fe.isSelectable(n.state.doc.nodeAt(r.inside))?!1:(n.dispatch(n.state.tr.setSelection(new tt(i))),!0)}function J$(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof tt))return!1;let{$from:t}=n.state.selection,i=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;let r=ee.empty;for(let o=i.length-1;o>=0;o--)r=ee.from(i[o].createAndFill(null,r));let s=n.state.tr.replace(t.pos,t.pos,new se(r,0,0));return s.setSelection(ve.near(s.doc.resolve(t.pos+1))),n.dispatch(s),!1}function X$(n){if(!(n.selection instanceof tt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ge.create(n.doc,[Nt.widget(n.selection.head,e,{key:"gapcursor"})])}var Ul=200,bt=function(){};bt.prototype.append=function(e){return e.length?(e=bt.from(e),!this.length&&e||e.length<Ul&&this.leafAppend(e)||this.length<Ul&&e.leafPrepend(this)||this.appendInner(e)):this};bt.prototype.prepend=function(e){return e.length?bt.from(e).append(this):this};bt.prototype.appendInner=function(e){return new Z$(this,e)};bt.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?bt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};bt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};bt.prototype.forEach=function(e,t,i){t===void 0&&(t=0),i===void 0&&(i=this.length),t<=i?this.forEachInner(e,t,i,0):this.forEachInvertedInner(e,t,i,0)};bt.prototype.map=function(e,t,i){t===void 0&&(t=0),i===void 0&&(i=this.length);var r=[];return this.forEach(function(s,o){return r.push(e(s,o))},t,i),r};bt.from=function(e){return e instanceof bt?e:e&&e.length?new pw(e):bt.empty};var pw=(function(n){function e(i){n.call(this),this.values=i}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,s){return r==0&&s==this.length?this:new e(this.values.slice(r,s))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,s,o,a){for(var l=s;l<o;l++)if(r(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,o,a){for(var l=s-1;l>=o;l--)if(r(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Ul)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Ul)return new e(r.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e})(bt);bt.empty=new pw([]);var Z$=(function(n){function e(t,i){n.call(this),this.left=t,this.right=i,this.length=t.length+i.length,this.depth=Math.max(t.depth,i.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)},e.prototype.forEachInner=function(i,r,s,o){var a=this.left.length;if(r<a&&this.left.forEachInner(i,r,Math.min(s,a),o)===!1||s>a&&this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,s)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,r,s,o){var a=this.left.length;if(r>a&&this.right.forEachInvertedInner(i,r-a,Math.max(s,a)-a,o+a)===!1||s<a&&this.left.forEachInvertedInner(i,Math.min(r,a),s,o)===!1)return!1},e.prototype.sliceInner=function(i,r){if(i==0&&r==this.length)return this;var s=this.left.length;return r<=s?this.left.slice(i,r):i>=s?this.right.slice(i-s,r-s):this.left.slice(i,s).append(this.right.slice(0,r-s))},e.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new e(r,this.right)},e.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new e(this.left,new e(this.right,i)):new e(this,i)},e})(bt);const Q$=500;class un{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let r,s;t&&(r=this.remapping(i,this.items.length),s=r.maps.length);let o=e.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(i,f+1),s=r.maps.length),s--,u.push(d);return}if(r){u.push(new kn(d.map));let p=d.step.map(r.slice(s)),h;p&&o.maybeStep(p).doc&&(h=o.mapping.maps[o.mapping.maps.length-1],c.push(new kn(h,void 0,void 0,c.length+u.length))),s--,h&&r.appendMap(h,s)}else o.maybeStep(d.step);if(d.selection)return a=r?d.selection.map(r.slice(s)):d.selection,l=new un(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,t,i,r){let s=[],o=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new kn(e.mapping.maps[u],d,t),p;(p=l&&l.merge(f))&&(f=p,u?s.pop():a=a.slice(0,a.length-1)),s.push(f),t&&(o++,t=void 0),r||(l=f)}let c=o-i.depth;return c>tB&&(a=eB(a,c),o-=c),new un(a.append(s),o)}remapping(e,t){let i=new co;return this.items.forEach((r,s)=>{let o=r.mirrorOffset!=null&&s-r.mirrorOffset>=e?i.maps.length-r.mirrorOffset:void 0;i.appendMap(r.map,o)},e,t),i}addMaps(e){return this.eventCount==0?this:new un(this.items.append(e.map(t=>new kn(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-t),s=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},r);let l=t;this.items.forEach(f=>{let p=s.getMirror(--l);if(p==null)return;o=Math.min(o,p);let h=s.maps[p];if(f.step){let m=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(s.slice(l+1,p));g&&a++,i.push(new kn(h,m,g))}else i.push(new kn(h))},r);let c=[];for(let f=t;f<o;f++)c.push(new kn(s.maps[f]));let u=this.items.slice(0,r).append(c).append(i),d=new un(u,a);return d.emptyItemCount()>Q$&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),i=t.maps.length,r=[],s=0;return this.items.forEach((o,a)=>{if(a>=e)r.push(o),o.selection&&s++;else if(o.step){let l=o.step.map(t.slice(i)),c=l&&l.getMap();if(i--,c&&t.appendMap(c,i),l){let u=o.selection&&o.selection.map(t.slice(i));u&&s++;let d=new kn(c.invert(),l,u),f,p=r.length-1;(f=r.length&&r[p].merge(d))?r[p]=f:r.push(d)}}else o.map&&i--},this.items.length,0),new un(bt.from(r.reverse()),s)}}un.empty=new un(bt.empty,0);function eB(n,e){let t;return n.forEach((i,r)=>{if(i.selection&&e--==0)return t=r,!1}),n.slice(t)}class kn{constructor(e,t,i,r){this.map=e,this.step=t,this.selection=i,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new kn(t.getMap().invert(),t,this.selection)}}}class ni{constructor(e,t,i,r,s){this.done=e,this.undone=t,this.prevRanges=i,this.prevTime=r,this.prevComposition=s}}const tB=20;function nB(n,e,t,i){let r=t.getMeta(Bi),s;if(r)return r.historyState;t.getMeta(sB)&&(n=new ni(n.done,n.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(o&&o.getMeta(Bi))return o.getMeta(Bi).redo?new ni(n.done.addTransform(t,void 0,i,Ha(e)),n.undone,Gg(t.mapping.maps),n.prevTime,n.prevComposition):new ni(n.done,n.undone.addTransform(t,void 0,i,Ha(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=t.getMeta("composition"),l=n.prevTime==0||!o&&n.prevComposition!=a&&(n.prevTime<(t.time||0)-i.newGroupDelay||!iB(t,n.prevRanges)),c=o?cd(n.prevRanges,t.mapping):Gg(t.mapping.maps);return new ni(n.done.addTransform(t,l?e.selection.getBookmark():void 0,i,Ha(e)),un.empty,c,t.time,a??n.prevComposition)}else return(s=t.getMeta("rebased"))?new ni(n.done.rebased(t,s),n.undone.rebased(t,s),cd(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new ni(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),cd(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function iB(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((i,r)=>{for(let s=0;s<e.length;s+=2)i<=e[s+1]&&r>=e[s]&&(t=!0)}),t}function Gg(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((i,r,s,o)=>e.push(s,o));return e}function cd(n,e){if(!n)return null;let t=[];for(let i=0;i<n.length;i+=2){let r=e.map(n[i],1),s=e.map(n[i+1],-1);r<=s&&t.push(r,s)}return t}function rB(n,e,t){let i=Ha(e),r=Bi.get(e).spec.config,s=(t?n.undone:n.done).popEvent(e,i);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(t?n.done:n.undone).addTransform(s.transform,e.selection.getBookmark(),r,i),l=new ni(t?a:s.remaining,t?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(Bi,{redo:t,historyState:l})}let ud=!1,Yg=null;function Ha(n){let e=n.plugins;if(Yg!=e){ud=!1,Yg=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){ud=!0;break}}return ud}const Bi=new ft("history"),sB=new ft("closeHistory");function oB(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new Je({key:Bi,state:{init(){return new ni(un.empty,un.empty,null,0,-1)},apply(e,t,i){return nB(t,i,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let i=t.inputType,r=i=="historyUndo"?mw:i=="historyRedo"?gw:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function hw(n,e){return(t,i)=>{let r=Bi.getState(t);if(!r||(n?r.undone:r.done).eventCount==0)return!1;if(i){let s=rB(r,t,n);s&&i(e?s.scrollIntoView():s)}return!0}}const mw=hw(!1,!0),gw=hw(!0,!0);var aB=Le.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:n=>n.length,wordCounter:n=>n.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=n=>{const e=n?.node||this.editor.state.doc;if((n?.mode||this.options.mode)==="textSize"){const i=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(i)}return e.nodeSize},this.storage.words=n=>{const e=n?.node||this.editor.state.doc,t=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(t)}},addProseMirrorPlugins(){let n=!1;return[new Je({key:new ft("characterCount"),appendTransaction:(e,t,i)=>{if(n)return;const r=this.options.limit;if(r==null||r===0){n=!0;return}const s=this.storage.characters({node:i.doc});if(s>r){const o=s-r,a=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);const c=i.tr.deleteRange(a,l);return n=!0,c}n=!0},filterTransaction:(e,t)=>{const i=this.options.limit;if(!e.docChanged||i===0||i===null||i===void 0)return!0;const r=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=i||r>i&&s>i&&s<=r)return!0;if(r>i&&s>i&&s>r||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=s-i,c=a-l,u=a;return e.deleteRange(c,u),!(this.storage.characters({node:e.doc})>i)}})]}}),lB=Le.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[H$(this.options)]}});Le.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Je({key:new ft("focus"),props:{decorations:({doc:n,selection:e})=>{const{isEditable:t,isFocused:i}=this.editor,{anchor:r}=e,s=[];if(!t||!i)return Ge.create(n,[]);let o=0;this.options.mode==="deepest"&&n.descendants((l,c)=>{if(l.isText)return;if(!(r>=c&&r<=c+l.nodeSize-1))return!1;o+=1});let a=0;return n.descendants((l,c)=>{if(l.isText||!(r>=c&&r<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";s.push(Nt.node(c,c+l.nodeSize,{class:this.options.className}))}),Ge.create(n,s)}}})]}});var cB=Le.create({name:"gapCursor",addProseMirrorPlugins(){return[K$()]},extendNodeSchema(n){var e;const t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=Pe(ue(n,"allowGapCursor",t)))!=null?e:null}}}),Jg="placeholder";function uB(n){return n.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}Le.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:Jg,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const n=this.options.dataAttribute?`data-${uB(this.options.dataAttribute)}`:`data-${Jg}`;return[new Je({key:new ft("placeholder"),props:{decorations:({doc:e,selection:t})=>{const i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,s=[];if(!i)return null;const o=this.editor.isEmpty;return e.descendants((a,l)=>{const c=r>=l&&r<=l+a.nodeSize,u=!a.isLeaf&&mc(a);if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];o&&d.push(this.options.emptyEditorClass);const f=Nt.node(l,l+a.nodeSize,{class:d.join(" "),[n]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),Ge.create(e,s)}}})]}});Le.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:n,options:e}=this;return[new Je({key:new ft("selection"),props:{decorations(t){return t.selection.empty||n.isFocused||!n.isEditable||b2(t.selection)||n.view.dragging?null:Ge.create(t.doc,[Nt.inline(t.selection.from,t.selection.to,{class:e.className})])}}})]}});function Xg({types:n,node:e}){return e&&Array.isArray(n)&&n.includes(e.type)||e?.type===n}var dB=Le.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var n;const e=new ft(this.name),t=this.options.node||((n=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:n.name)||"paragraph",i=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(t).includes(r.name));return[new Je({key:e,appendTransaction:(r,s,o)=>{const{doc:a,tr:l,schema:c}=o,u=e.getState(o),d=a.content.size,f=c.nodes[t];if(u)return l.insert(d,f.create())},state:{init:(r,s)=>{const o=s.tr.doc.lastChild;return!Xg({node:o,types:i})},apply:(r,s)=>{if(!r.docChanged||r.getMeta("__uniqueIDTransaction"))return s;const o=r.doc.lastChild;return!Xg({node:o,types:i})}}})]}}),fB=Le.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>mw(n,e),redo:()=>({state:n,dispatch:e})=>gw(n,e)}},addProseMirrorPlugins(){return[oB(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()}}}),pB=Le.create({name:"starterKit",addExtensions(){var n,e,t,i;const r=[];return this.options.bold!==!1&&r.push(Bj.configure(this.options.bold)),this.options.blockquote!==!1&&r.push(Ij.configure(this.options.blockquote)),this.options.bulletList!==!1&&r.push(tw.configure(this.options.bulletList)),this.options.code!==!1&&r.push(Fj.configure(this.options.code)),this.options.codeBlock!==!1&&r.push(qj.configure(this.options.codeBlock)),this.options.document!==!1&&r.push(Uj.configure(this.options.document)),this.options.dropcursor!==!1&&r.push(lB.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&r.push(cB.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&r.push(Kj.configure(this.options.hardBreak)),this.options.heading!==!1&&r.push(Gj.configure(this.options.heading)),this.options.undoRedo!==!1&&r.push(fB.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&r.push(Yj.configure(this.options.horizontalRule)),this.options.italic!==!1&&r.push(e$.configure(this.options.italic)),this.options.listItem!==!1&&r.push(nw.configure(this.options.listItem)),this.options.listKeymap!==!1&&r.push(lw.configure((n=this.options)==null?void 0:n.listKeymap)),this.options.link!==!1&&r.push(ew.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&r.push(uw.configure(this.options.orderedList)),this.options.paragraph!==!1&&r.push($$.configure(this.options.paragraph)),this.options.strike!==!1&&r.push(V$.configure(this.options.strike)),this.options.text!==!1&&r.push(F$.configure(this.options.text)),this.options.underline!==!1&&r.push(dw.configure((t=this.options)==null?void 0:t.underline)),this.options.trailingNode!==!1&&r.push(dB.configure((i=this.options)==null?void 0:i.trailingNode)),r}}),hB=20,yw=(n,e=0)=>{const t=[];return!n.children.length||e>hB||Array.from(n.children).forEach(i=>{i.tagName==="SPAN"?t.push(i):i.children.length&&t.push(...yw(i,e+1))}),t},mB=n=>{if(!n.children.length)return;const e=yw(n);e&&e.forEach(t=>{var i,r;const s=t.getAttribute("style"),o=(r=(i=t.parentElement)==null?void 0:i.closest("span"))==null?void 0:r.getAttribute("style");t.setAttribute("style",`${o};${s}`)})},vw=hn.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:n=>n.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&mB(n),{}):!1}]},renderHTML({HTMLAttributes:n}){return["span",He(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleTextStyle:n=>({commands:e})=>e.toggleMark(this.name,n),removeEmptyTextStyle:()=>({tr:n})=>{const{selection:e}=n;return n.doc.nodesBetween(e.from,e.to,(t,i)=>{if(t.isTextblock)return!0;t.marks.filter(r=>r.type===this.type).some(r=>Object.values(r.attrs).some(s=>!!s))||n.removeMark(i,i+t.nodeSize,this.type)}),!0}}}}),gB=Le.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:n=>{var e;const t=n.getAttribute("style");if(t){const i=t.split(";").map(r=>r.trim()).filter(Boolean);for(let r=i.length-1;r>=0;r-=1){const s=i[r].split(":");if(s.length>=2){const o=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(o==="background-color")return a.replace(/['"]+/g,"")}}}return(e=n.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.backgroundColor?{style:`background-color: ${n.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:n=>({chain:e})=>e().setMark("textStyle",{backgroundColor:n}).run(),unsetBackgroundColor:()=>({chain:n})=>n().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),bw=Le.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:n=>{var e;const t=n.getAttribute("style");if(t){const i=t.split(";").map(r=>r.trim()).filter(Boolean);for(let r=i.length-1;r>=0;r-=1){const s=i[r].split(":");if(s.length>=2){const o=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(o==="color")return a.replace(/['"]+/g,"")}}}return(e=n.style.color)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.color?{style:`color: ${n.color}`}:{}}}}]},addCommands(){return{setColor:n=>({chain:e})=>e().setMark("textStyle",{color:n}).run(),unsetColor:()=>({chain:n})=>n().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),yB=Le.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:n=>n.style.fontFamily,renderHTML:n=>n.fontFamily?{style:`font-family: ${n.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:n=>({chain:e})=>e().setMark("textStyle",{fontFamily:n}).run(),unsetFontFamily:()=>({chain:n})=>n().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),vB=Le.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:n=>n.style.fontSize,renderHTML:n=>n.fontSize?{style:`font-size: ${n.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:n=>({chain:e})=>e().setMark("textStyle",{fontSize:n}).run(),unsetFontSize:()=>({chain:n})=>n().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),bB=Le.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:n=>n.style.lineHeight,renderHTML:n=>n.lineHeight?{style:`line-height: ${n.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:n=>({chain:e})=>e().setMark("textStyle",{lineHeight:n}).run(),unsetLineHeight:()=>({chain:n})=>n().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});Le.create({name:"textStyleKit",addExtensions(){const n=[];return this.options.backgroundColor!==!1&&n.push(gB.configure(this.options.backgroundColor)),this.options.color!==!1&&n.push(bw.configure(this.options.color)),this.options.fontFamily!==!1&&n.push(yB.configure(this.options.fontFamily)),this.options.fontSize!==!1&&n.push(vB.configure(this.options.fontSize)),this.options.lineHeight!==!1&&n.push(bB.configure(this.options.lineHeight)),this.options.textStyle!==!1&&n.push(vw.configure(this.options.textStyle)),n}});var xB=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,wB=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,kB=hn.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:n}){return["mark",He(this.options.HTMLAttributes,n),0]},renderMarkdown:(n,e)=>`==${e.renderChildren(n)}==`,parseMarkdown:(n,e)=>e.applyMark("highlight",e.parseInline(n.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:n=>n.indexOf("=="),tokenize(n,e,t){const r=/^(==)([^=]+)(==)/.exec(n);if(r){const s=r[2].trim(),o=t.inlineTokens(s);return{type:"highlight",raw:r[0],text:s,tokens:o}}}},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Ui({find:xB,type:this.type})]},addPasteRules(){return[yi({find:wB,type:this.type})]}}),_B=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,SB=Lt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",He(this.options.HTMLAttributes,n)]},parseMarkdown:(n,e)=>e.createNode("image",{src:n.href,title:n.title,alt:n.text}),renderMarkdown:n=>{var e,t,i,r,s,o;const a=(t=(e=n.attrs)==null?void 0:e.src)!=null?t:"",l=(r=(i=n.attrs)==null?void 0:i.alt)!=null?r:"",c=(o=(s=n.attrs)==null?void 0:s.title)!=null?o:"";return c?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:n,minWidth:e,minHeight:t,alwaysPreserveAspectRatio:i}=this.options.resize;return({node:r,getPos:s,HTMLAttributes:o,editor:a})=>{const l=document.createElement("img");Object.entries(o).forEach(([d,f])=>{if(f!=null)switch(d){case"width":case"height":break;default:l.setAttribute(d,f);break}}),l.src=o.src;const c=new k8({element:l,editor:a,node:r,getPos:s,onResize:(d,f)=>{l.style.width=`${d}px`,l.style.height=`${f}px`},onCommit:(d,f)=>{const p=s();p!==void 0&&this.editor.chain().setNodeSelection(p).updateAttributes(this.name,{width:d,height:f}).run()},onUpdate:(d,f,p)=>d.type===r.type,options:{directions:n,min:{width:e,height:t},preserveAspectRatio:i===!0}}),u=c.dom;return u.style.visibility="hidden",u.style.pointerEvents="none",l.onload=()=>{u.style.visibility="",u.style.pointerEvents=""},c}},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[L2({find:_B,type:this.type,getAttributes:n=>{const[,,e,t,i]=n;return{src:t,alt:e,title:i}}})]}}),CB=hn.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(n){return n!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sub",He(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),TB=hn.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(n){return n!=="super"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sup",He(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),EB=Le.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>{const e=n.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:n=>n.textAlign?{style:`text-align: ${n.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:n})).some(t=>t):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.map(e=>n.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:n=>({editor:e,commands:t})=>this.options.alignments.includes(n)?e.isActive({textAlign:n})?t.unsetTextAlign():t.setTextAlign(n):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});const MB="_toolbar_1lw4n_66",AB="_toolbarButton_1lw4n_79",NB="_toolbarButtonActive_1lw4n_115",RB="_toolbarIcon_1lw4n_126",OB="_toolbarColor_1lw4n_138",DB="_toolbarColorLabel_1lw4n_168",IB="_counter_1lw4n_174",PB="_tiptap_1lw4n_185",LB="_output_1lw4n_208",Ee={"editor-container":"_editor-container_1lw4n_48",toolbar:MB,toolbarButton:AB,toolbarButtonActive:NB,toolbarIcon:RB,toolbarColor:OB,toolbarColorLabel:DB,counter:IB,tiptap:PB,output:LB},sh=n=>{const e=ne.c(265),{value:t,defaultValue:i,onChange:r,disabled:s,placeholder:o,showOutput:a}=n,l=s===void 0?!1:s,c=o===void 0?"Start typing...":o,u=a===void 0?!0:a,[d,f]=H.useState(""),[p,h]=H.useState("#000000"),[m,g]=H.useState("#fff3bf"),y=typeof t=="string",b=y?t:i,w=H.useRef(!1);let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_=[pB,aB,ew,SB,dw,CB,TB,vw,bw,kB.configure({multicolor:!0}),EB.configure({types:["heading","paragraph"]})],e[0]=_):_=e[0];const x=b??`<p>${c}</p>`;let C;e[1]!==r?(C=Ze=>{const{editor:aa}=Ze,ah=aa.getHTML();if(f(ah),w.current)return;const iu=aa.state.doc.textBetween(0,aa.state.doc.content.size," "),Cw=iu.trim()?iu.trim().split(/\s+/).length:0,Tw=aa.storage.characterCount?.characters?.()??0;r?.({html:ah,text:iu,words:Cw,characters:Tw})},e[1]=r,e[2]=C):C=e[2];const S=l?"true":"false";let k;e[3]!==S?(k={attributes:{class:Ee.tiptap,"aria-disabled":S}},e[3]=S,e[4]=k):k=e[4];const M=!l;let P;e[5]!==x||e[6]!==C||e[7]!==k||e[8]!==M?(P={extensions:_,content:x,onUpdate:C,editorProps:k,editable:M,immediatelyRender:!1},e[5]=x,e[6]=C,e[7]=k,e[8]=M,e[9]=P):P=e[9];const T=Aj(P);let I,L;e[10]!==T||e[11]!==y||e[12]!==t?(I=()=>{if(!T||!y||typeof t!="string")return;const Ze=T.getHTML();t!==Ze&&(w.current=!0,T.commands.setContent(t,{emitUpdate:!1}),w.current=!1,f(t))},L=[T,y,t],e[10]=T,e[11]=y,e[12]=t,e[13]=I,e[14]=L):(I=e[13],L=e[14]),H.useEffect(I,L);let O;e[15]!==T?(O={editor:T,selector:jB},e[15]=T,e[16]=O):O=e[16];const N=z2(O);let R;e[17]!==T?(R=()=>T?.chain().focus().toggleBold().run(),e[17]=T,e[18]=R):R=e[18];const $=R;let B;e[19]!==T?(B=()=>T?.chain().focus().toggleItalic().run(),e[19]=T,e[20]=B):B=e[20];const q=B;let D;e[21]!==T?(D=()=>T?.chain()?.focus()?.toggleUnderline()?.run(),e[21]=T,e[22]=D):D=e[22];const A=D;let j;e[23]!==T?(j=()=>T?.chain().focus().toggleHeading({level:1}).run(),e[23]=T,e[24]=j):j=e[24];const F=j;let V;e[25]!==T?(V=()=>T?.chain().focus().toggleHeading({level:2}).run(),e[25]=T,e[26]=V):V=e[26];const G=V;let W;e[27]!==T?(W=()=>T?.chain().focus().toggleHeading({level:3}).run(),e[27]=T,e[28]=W):W=e[28];const z=W;let U;e[29]!==T?(U=()=>T?.chain().focus().toggleStrike().run(),e[29]=T,e[30]=U):U=e[30];const J=U;let X;e[31]!==T?(X=()=>T?.chain().focus().toggleSubscript().run(),e[31]=T,e[32]=X):X=e[32];const re=X;let Y;e[33]!==T?(Y=()=>T?.chain().focus().toggleSuperscript().run(),e[33]=T,e[34]=Y):Y=e[34];const le=Y;let ce;e[35]!==T?(ce=()=>T?.chain().focus().toggleBulletList().run(),e[35]=T,e[36]=ce):ce=e[36];const we=ce;let Se;e[37]!==T?(Se=()=>T?.chain().focus().toggleOrderedList().run(),e[37]=T,e[38]=Se):Se=e[38];const Te=Se;let de;e[39]!==T?(de=()=>T?.chain().focus().toggleBlockquote().run(),e[39]=T,e[40]=de):de=e[40];const me=de;let be;e[41]!==T?(be=()=>T?.chain().focus().setHorizontalRule().run(),e[41]=T,e[42]=be):be=e[42];const ge=be;let Ce;e[43]!==T?(Ce=()=>T?.chain().focus().setTextAlign("left").run(),e[43]=T,e[44]=Ce):Ce=e[44];const Oe=Ce;let We;e[45]!==T?(We=()=>T?.chain().focus().setTextAlign("center").run(),e[45]=T,e[46]=We):We=e[46];const K=We;let Q;e[47]!==T?(Q=()=>T?.chain().focus().setTextAlign("right").run(),e[47]=T,e[48]=Q):Q=e[48];const ie=Q;let oe;e[49]!==T?(oe=()=>T?.chain().focus().setTextAlign("justify").run(),e[49]=T,e[50]=oe):oe=e[50];const Ae=oe;let ze;e[51]!==T?(ze=()=>{const Ze=prompt("Enter a URL");Ze&&T?.chain().focus().setLink({href:Ze}).run()},e[51]=T,e[52]=ze):ze=e[52];const ye=ze;let pe;e[53]!==T?(pe=()=>{const Ze=prompt("Enter image URL");Ze&&T?.chain().focus().setImage({src:Ze}).run()},e[53]=T,e[54]=pe):pe=e[54];const Ne=pe;let Re;e[55]!==T?(Re=()=>T?.chain().focus().toggleCodeBlock().run(),e[55]=T,e[56]=Re):Re=e[56];const he=Re;let xe;e[57]!==T?(xe=()=>T?.chain().focus().undo().run(),e[57]=T,e[58]=xe):xe=e[58];const rt=xe;let qe;e[59]!==T?(qe=()=>T?.chain().focus().redo().run(),e[59]=T,e[60]=qe):qe=e[60];const Ue=qe;let Ht;e[61]!==T?(Ht=Ze=>{h(Ze),T?.chain().focus().setColor(Ze).run()},e[61]=T,e[62]=Ht):Ht=e[62];const No=Ht;let ki;e[63]!==T?(ki=Ze=>{g(Ze),T?.chain().focus().toggleHighlight({color:Ze}).run()},e[63]=T,e[64]=ki):ki=e[64];const bc=ki,pt=$B,Xe=BB;let Ro;if(e[65]!==T){const Ze=T?T.state.doc.textBetween(0,T.state.doc.content.size," "):"";Ro=Ze.trim()?Ze.trim().split(/\s+/).length:0,e[65]=T,e[66]=Ro}else Ro=e[66];const xc=Ro,wc=pt(N?.bold),kc=N?.bold;let Ji;e[67]!==kc?(Ji=Xe("Bold",kc),e[67]=kc,e[68]=Ji):Ji=e[68];let Oo;e[69]===Symbol.for("react.memo_cache_sentinel")?(Oo=v.jsx(Ww,{className:Ee.toolbarIcon}),e[69]=Oo):Oo=e[69];let Xi;e[70]!==$||e[71]!==wc||e[72]!==Ji?(Xi=v.jsx("button",{className:wc,onClick:$,type:"button",...Ji,children:Oo}),e[70]=$,e[71]=wc,e[72]=Ji,e[73]=Xi):Xi=e[73];const _c=pt(N?.italic),Sc=N?.italic;let Zi;e[74]!==Sc?(Zi=Xe("Italic",Sc),e[74]=Sc,e[75]=Zi):Zi=e[75];let Do;e[76]===Symbol.for("react.memo_cache_sentinel")?(Do=v.jsx(vk,{className:Ee.toolbarIcon}),e[76]=Do):Do=e[76];let Qi;e[77]!==q||e[78]!==_c||e[79]!==Zi?(Qi=v.jsx("button",{className:_c,onClick:q,type:"button",...Zi,children:Do}),e[77]=q,e[78]=_c,e[79]=Zi,e[80]=Qi):Qi=e[80];const Cc=pt(N?.underline),Tc=N?.underline;let er;e[81]!==Tc?(er=Xe("Underline",Tc),e[81]=Tc,e[82]=er):er=e[82];let Io;e[83]===Symbol.for("react.memo_cache_sentinel")?(Io=v.jsx(Zk,{className:Ee.toolbarIcon}),e[83]=Io):Io=e[83];let tr;e[84]!==A||e[85]!==Cc||e[86]!==er?(tr=v.jsx("button",{className:Cc,onClick:A,type:"button",...er,children:Io}),e[84]=A,e[85]=Cc,e[86]=er,e[87]=tr):tr=e[87];const Ec=pt(N?.strike),Mc=N?.strike;let nr;e[88]!==Mc?(nr=Xe("Strikethrough",Mc),e[88]=Mc,e[89]=nr):nr=e[89];let Po;e[90]===Symbol.for("react.memo_cache_sentinel")?(Po=v.jsx(Lk,{className:Ee.toolbarIcon}),e[90]=Po):Po=e[90];let ir;e[91]!==J||e[92]!==Ec||e[93]!==nr?(ir=v.jsx("button",{className:Ec,onClick:J,type:"button",...nr,children:Po}),e[91]=J,e[92]=Ec,e[93]=nr,e[94]=ir):ir=e[94];const Ac=pt(N?.subscript),Nc=N?.subscript;let rr;e[95]!==Nc?(rr=Xe("Subscript",Nc),e[95]=Nc,e[96]=rr):rr=e[96];let Lo;e[97]===Symbol.for("react.memo_cache_sentinel")?(Lo=v.jsx($k,{className:Ee.toolbarIcon}),e[97]=Lo):Lo=e[97];let sr;e[98]!==re||e[99]!==Ac||e[100]!==rr?(sr=v.jsx("button",{className:Ac,onClick:re,type:"button",...rr,children:Lo}),e[98]=re,e[99]=Ac,e[100]=rr,e[101]=sr):sr=e[101];const Rc=pt(N?.superscript),Oc=N?.superscript;let or;e[102]!==Oc?(or=Xe("Superscript",Oc),e[102]=Oc,e[103]=or):or=e[103];let jo;e[104]===Symbol.for("react.memo_cache_sentinel")?(jo=v.jsx(zk,{className:Ee.toolbarIcon}),e[104]=jo):jo=e[104];let ar;e[105]!==le||e[106]!==Rc||e[107]!==or?(ar=v.jsx("button",{className:Rc,onClick:le,type:"button",...or,children:jo}),e[105]=le,e[106]=Rc,e[107]=or,e[108]=ar):ar=e[108];const Dc=pt(N?.h1),Ic=N?.h1;let lr;e[109]!==Ic?(lr=Xe("Heading 1",Ic),e[109]=Ic,e[110]=lr):lr=e[110];let $o;e[111]===Symbol.for("react.memo_cache_sentinel")?($o=v.jsx(lk,{className:Ee.toolbarIcon}),e[111]=$o):$o=e[111];let cr;e[112]!==F||e[113]!==Dc||e[114]!==lr?(cr=v.jsx("button",{className:Dc,onClick:F,type:"button",...lr,children:$o}),e[112]=F,e[113]=Dc,e[114]=lr,e[115]=cr):cr=e[115];const Pc=pt(N?.h2),Lc=N?.h2;let ur;e[116]!==Lc?(ur=Xe("Heading 2",Lc),e[116]=Lc,e[117]=ur):ur=e[117];let Bo;e[118]===Symbol.for("react.memo_cache_sentinel")?(Bo=v.jsx(uk,{className:Ee.toolbarIcon}),e[118]=Bo):Bo=e[118];let dr;e[119]!==G||e[120]!==Pc||e[121]!==ur?(dr=v.jsx("button",{className:Pc,onClick:G,type:"button",...ur,children:Bo}),e[119]=G,e[120]=Pc,e[121]=ur,e[122]=dr):dr=e[122];const jc=pt(N?.h3),$c=N?.h3;let fr;e[123]!==$c?(fr=Xe("Heading 3",$c),e[123]=$c,e[124]=fr):fr=e[124];let zo;e[125]===Symbol.for("react.memo_cache_sentinel")?(zo=v.jsx(fk,{className:Ee.toolbarIcon}),e[125]=zo):zo=e[125];let pr;e[126]!==z||e[127]!==jc||e[128]!==fr?(pr=v.jsx("button",{className:jc,onClick:z,type:"button",...fr,children:zo}),e[126]=z,e[127]=jc,e[128]=fr,e[129]=pr):pr=e[129];const Bc=pt(N?.bulletList),zc=N?.bulletList;let hr;e[130]!==zc?(hr=Xe("Bulleted list",zc),e[130]=zc,e[131]=hr):hr=e[131];let Vo;e[132]===Symbol.for("react.memo_cache_sentinel")?(Vo=v.jsx(Sk,{className:Ee.toolbarIcon}),e[132]=Vo):Vo=e[132];let mr;e[133]!==we||e[134]!==Bc||e[135]!==hr?(mr=v.jsx("button",{className:Bc,onClick:we,type:"button",...hr,children:Vo}),e[133]=we,e[134]=Bc,e[135]=hr,e[136]=mr):mr=e[136];const Vc=pt(N?.orderedList),Fc=N?.orderedList;let gr;e[137]!==Fc?(gr=Xe("Numbered list",Fc),e[137]=Fc,e[138]=gr):gr=e[138];let Fo;e[139]===Symbol.for("react.memo_cache_sentinel")?(Fo=v.jsx(kk,{className:Ee.toolbarIcon}),e[139]=Fo):Fo=e[139];let yr;e[140]!==Te||e[141]!==Vc||e[142]!==gr?(yr=v.jsx("button",{className:Vc,onClick:Te,type:"button",...gr,children:Fo}),e[140]=Te,e[141]=Vc,e[142]=gr,e[143]=yr):yr=e[143];const Hc=pt(N?.blockquote),Wc=N?.blockquote;let vr;e[144]!==Wc?(vr=Xe("Blockquote",Wc),e[144]=Wc,e[145]=vr):vr=e[145];let Ho;e[146]===Symbol.for("react.memo_cache_sentinel")?(Ho=v.jsx(Nk,{className:Ee.toolbarIcon}),e[146]=Ho):Ho=e[146];let br;e[147]!==me||e[148]!==Hc||e[149]!==vr?(br=v.jsx("button",{className:Hc,onClick:me,type:"button",...vr,children:Ho}),e[147]=me,e[148]=Hc,e[149]=vr,e[150]=br):br=e[150];let Wo,qo;e[151]===Symbol.for("react.memo_cache_sentinel")?(qo=Xe("Horizontal rule"),Wo=v.jsx(Mk,{className:Ee.toolbarIcon}),e[151]=Wo,e[152]=qo):(Wo=e[151],qo=e[152]);let xr;e[153]!==ge?(xr=v.jsx("button",{className:Ee.toolbarButton,onClick:ge,type:"button",...qo,children:Wo}),e[153]=ge,e[154]=xr):xr=e[154];const qc=pt(N?.alignLeft),Uc=N?.alignLeft;let wr;e[155]!==Uc?(wr=Xe("Align left",Uc),e[155]=Uc,e[156]=wr):wr=e[156];let Uo;e[157]===Symbol.for("react.memo_cache_sentinel")?(Uo=v.jsx(Gk,{className:Ee.toolbarIcon}),e[157]=Uo):Uo=e[157];let kr;e[158]!==Oe||e[159]!==qc||e[160]!==wr?(kr=v.jsx("button",{className:qc,onClick:Oe,type:"button",...wr,children:Uo}),e[158]=Oe,e[159]=qc,e[160]=wr,e[161]=kr):kr=e[161];const Kc=pt(N?.alignCenter),Gc=N?.alignCenter;let _r;e[162]!==Gc?(_r=Xe("Align center",Gc),e[162]=Gc,e[163]=_r):_r=e[163];let Ko;e[164]===Symbol.for("react.memo_cache_sentinel")?(Ko=v.jsx(Fk,{className:Ee.toolbarIcon}),e[164]=Ko):Ko=e[164];let Sr;e[165]!==K||e[166]!==Kc||e[167]!==_r?(Sr=v.jsx("button",{className:Kc,onClick:K,type:"button",..._r,children:Ko}),e[165]=K,e[166]=Kc,e[167]=_r,e[168]=Sr):Sr=e[168];const Yc=pt(N?.alignRight),Jc=N?.alignRight;let Cr;e[169]!==Jc?(Cr=Xe("Align right",Jc),e[169]=Jc,e[170]=Cr):Cr=e[170];let Go;e[171]===Symbol.for("react.memo_cache_sentinel")?(Go=v.jsx(Wk,{className:Ee.toolbarIcon}),e[171]=Go):Go=e[171];let Tr;e[172]!==ie||e[173]!==Yc||e[174]!==Cr?(Tr=v.jsx("button",{className:Yc,onClick:ie,type:"button",...Cr,children:Go}),e[172]=ie,e[173]=Yc,e[174]=Cr,e[175]=Tr):Tr=e[175];const Xc=pt(N?.alignJustify),Zc=N?.alignJustify;let Er;e[176]!==Zc?(Er=Xe("Justify",Zc),e[176]=Zc,e[177]=Er):Er=e[177];let Yo;e[178]===Symbol.for("react.memo_cache_sentinel")?(Yo=v.jsx(Uk,{className:Ee.toolbarIcon}),e[178]=Yo):Yo=e[178];let Mr;e[179]!==Ae||e[180]!==Xc||e[181]!==Er?(Mr=v.jsx("button",{className:Xc,onClick:Ae,type:"button",...Er,children:Yo}),e[179]=Ae,e[180]=Xc,e[181]=Er,e[182]=Mr):Mr=e[182];let Jo;e[183]===Symbol.for("react.memo_cache_sentinel")?(Jo=v.jsx("span",{className:Ee.toolbarColorLabel,children:"A"}),e[183]=Jo):Jo=e[183];let Ar;e[184]!==No?(Ar=Ze=>No(Ze.target.value),e[184]=No,e[185]=Ar):Ar=e[185];let Nr;e[186]!==Ar||e[187]!==p?(Nr=v.jsxs("label",{className:Ee.toolbarColor,title:"Text color",children:[Jo,v.jsx("input",{"aria-label":"Text color",type:"color",value:p,onChange:Ar})]}),e[186]=Ar,e[187]=p,e[188]=Nr):Nr=e[188];let Xo;e[189]===Symbol.for("react.memo_cache_sentinel")?(Xo=v.jsx(hk,{className:Ee.toolbarIcon}),e[189]=Xo):Xo=e[189];let Rr;e[190]!==bc?(Rr=Ze=>bc(Ze.target.value),e[190]=bc,e[191]=Rr):Rr=e[191];let Or;e[192]!==m||e[193]!==Rr?(Or=v.jsxs("label",{className:Ee.toolbarColor,title:"Highlight",children:[Xo,v.jsx("input",{"aria-label":"Highlight color",type:"color",value:m,onChange:Rr})]}),e[192]=m,e[193]=Rr,e[194]=Or):Or=e[194];const Qc=pt(N?.link),eu=N?.link;let Dr;e[195]!==eu?(Dr=Xe("Link",eu),e[195]=eu,e[196]=Dr):Dr=e[196];let Zo;e[197]===Symbol.for("react.memo_cache_sentinel")?(Zo=v.jsx(xk,{className:Ee.toolbarIcon}),e[197]=Zo):Zo=e[197];let Ir;e[198]!==ye||e[199]!==Qc||e[200]!==Dr?(Ir=v.jsx("button",{className:Qc,onClick:ye,type:"button",...Dr,children:Zo}),e[198]=ye,e[199]=Qc,e[200]=Dr,e[201]=Ir):Ir=e[201];let Qo,ea;e[202]===Symbol.for("react.memo_cache_sentinel")?(Qo=Xe("Insert image"),ea=v.jsx(gk,{className:Ee.toolbarIcon}),e[202]=Qo,e[203]=ea):(Qo=e[202],ea=e[203]);let Pr;e[204]!==Ne?(Pr=v.jsx("button",{className:Ee.toolbarButton,onClick:Ne,type:"button",...Qo,children:ea}),e[204]=Ne,e[205]=Pr):Pr=e[205];const tu=pt(N?.codeBlock),nu=N?.codeBlock;let Lr;e[206]!==nu?(Lr=Xe("Code block",nu),e[206]=nu,e[207]=Lr):Lr=e[207];let ta;e[208]===Symbol.for("react.memo_cache_sentinel")?(ta=v.jsx(nk,{className:Ee.toolbarIcon}),e[208]=ta):ta=e[208];let jr;e[209]!==he||e[210]!==tu||e[211]!==Lr?(jr=v.jsx("button",{className:tu,onClick:he,type:"button",...Lr,children:ta}),e[209]=he,e[210]=tu,e[211]=Lr,e[212]=jr):jr=e[212];let na,ia;e[213]===Symbol.for("react.memo_cache_sentinel")?(na=Xe("Undo"),ia=v.jsx(e_,{className:Ee.toolbarIcon}),e[213]=na,e[214]=ia):(na=e[213],ia=e[214]);let $r;e[215]!==rt?($r=v.jsx("button",{className:Ee.toolbarButton,onClick:rt,type:"button",...na,children:ia}),e[215]=rt,e[216]=$r):$r=e[216];let ra,sa;e[217]===Symbol.for("react.memo_cache_sentinel")?(ra=Xe("Redo"),sa=v.jsx(Ok,{className:Ee.toolbarIcon}),e[217]=ra,e[218]=sa):(ra=e[217],sa=e[218]);let Br;e[219]!==Ue?(Br=v.jsx("button",{className:Ee.toolbarButton,onClick:Ue,type:"button",...ra,children:sa}),e[219]=Ue,e[220]=Br):Br=e[220];let zr;e[221]!==xr||e[222]!==kr||e[223]!==Sr||e[224]!==Tr||e[225]!==Mr||e[226]!==Nr||e[227]!==Or||e[228]!==Ir||e[229]!==Pr||e[230]!==jr||e[231]!==$r||e[232]!==Br||e[233]!==Xi||e[234]!==Qi||e[235]!==tr||e[236]!==ir||e[237]!==sr||e[238]!==ar||e[239]!==cr||e[240]!==dr||e[241]!==pr||e[242]!==mr||e[243]!==yr||e[244]!==br?(zr=v.jsxs("div",{className:`${Ee.toolbar} flex gap-5`,children:[Xi,Qi,tr,ir,sr,ar,cr,dr,pr,mr,yr,br,xr,kr,Sr,Tr,Mr,Nr,Or,Ir,Pr,jr,$r,Br]}),e[221]=xr,e[222]=kr,e[223]=Sr,e[224]=Tr,e[225]=Mr,e[226]=Nr,e[227]=Or,e[228]=Ir,e[229]=Pr,e[230]=jr,e[231]=$r,e[232]=Br,e[233]=Xi,e[234]=Qi,e[235]=tr,e[236]=ir,e[237]=sr,e[238]=ar,e[239]=cr,e[240]=dr,e[241]=pr,e[242]=mr,e[243]=yr,e[244]=br,e[245]=zr):zr=e[245];let Vr;e[246]!==T?(Vr=v.jsx(B2,{editor:T}),e[246]=T,e[247]=Vr):Vr=e[247];let Fr;e[248]!==xc?(Fr=v.jsxs("span",{children:["Words: ",xc]}),e[248]=xc,e[249]=Fr):Fr=e[249];let Hr;e[250]!==T?.storage.characterCount?(Hr=T?.storage.characterCount?.characters?.()??0,e[250]=T?.storage.characterCount,e[251]=Hr):Hr=e[251];let Wr;e[252]!==Hr?(Wr=v.jsxs("span",{children:["Characters: ",Hr]}),e[252]=Hr,e[253]=Wr):Wr=e[253];let qr;e[254]!==Fr||e[255]!==Wr?(qr=v.jsxs("div",{className:Ee.counter,children:[Fr,Wr]}),e[254]=Fr,e[255]=Wr,e[256]=qr):qr=e[256];let Ur;e[257]!==d||e[258]!==u?(Ur=u&&v.jsxs("div",{className:Ee.output,children:[v.jsx("h3",{children:"Output"}),v.jsx("div",{dangerouslySetInnerHTML:{__html:d}})]}),e[257]=d,e[258]=u,e[259]=Ur):Ur=e[259];let oa;return e[260]!==zr||e[261]!==Vr||e[262]!==qr||e[263]!==Ur?(oa=v.jsxs("div",{className:Ee["editor-container"],children:[zr,Vr,qr,Ur]}),e[260]=zr,e[261]=Vr,e[262]=qr,e[263]=Ur,e[264]=oa):oa=e[264],oa};sh.displayName="TextEditor";function jB(n){const{editor:e}=n;return e?{bold:e.isActive("bold"),italic:e.isActive("italic"),underline:e.isActive("underline"),strike:e.isActive("strike"),subscript:e.isActive("subscript"),superscript:e.isActive("superscript"),h1:e.isActive("heading",{level:1}),h2:e.isActive("heading",{level:2}),h3:e.isActive("heading",{level:3}),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote"),codeBlock:e.isActive("codeBlock"),link:e.isActive("link"),alignLeft:e.isActive({textAlign:"left"}),alignCenter:e.isActive({textAlign:"center"}),alignRight:e.isActive({textAlign:"right"}),alignJustify:e.isActive({textAlign:"justify"})}:{bold:!1,italic:!1,underline:!1,strike:!1,subscript:!1,superscript:!1,h1:!1,h2:!1,h3:!1,bulletList:!1,orderedList:!1,blockquote:!1,codeBlock:!1,link:!1,alignLeft:!1,alignCenter:!1,alignRight:!1,alignJustify:!1}}function $B(n){return`${Ee.toolbarButton} ${n?Ee.toolbarButtonActive:""}`}function BB(n,e){return{title:n,"aria-label":n,"aria-pressed":!!e}}const zB="_root_1o0rm_47",VB="_items_1o0rm_52",FB="_line_1o0rm_57",HB="_item_1o0rm_52",WB="_time_1o0rm_73",qB="_side_1o0rm_73",UB="_center_1o0rm_82",KB="_marker_1o0rm_89",GB="_markerWithIcon_1o0rm_109",YB="_icon_1o0rm_119",JB="_content_1o0rm_129",XB="_title_1o0rm_134",ZB="_description_1o0rm_139",st={root:zB,items:VB,line:FB,item:HB,"side-left":"_side-left_1o0rm_73",time:WB,"side-right":"_side-right_1o0rm_76",side:qB,center:UB,marker:KB,"dot-muted":"_dot-muted_1o0rm_97","dot-default":"_dot-default_1o0rm_101","dot-primary":"_dot-primary_1o0rm_105",markerWithIcon:GB,icon:YB,content:JB,title:XB,description:ZB,"align-left":"_align-left_1o0rm_143","align-right":"_align-right_1o0rm_146","mode-left":"_mode-left_1o0rm_149"},QB=n=>{const e=ne.c(14),{items:t,mode:i,className:r}=n,s=i===void 0?"alternate":i,o=st[`mode-${s}`];let a;e[0]!==r||e[1]!==o?(a=Z(st.root,o,r),e[0]=r,e[1]=o,e[2]=a):a=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=v.jsx("div",{className:st.line,"aria-hidden":"true"}),e[3]=l):l=e[3];let c;if(e[4]!==t||e[5]!==s){let f;e[7]!==s?(f=(p,h)=>{const m=s==="alternate"?h%2===0?"right":"left":"right",g=p.dotVariant??(p.icon,"muted");return v.jsxs("div",{className:Z(st.item,st[`side-${m}`]),children:[v.jsx("div",{className:st.side,children:m==="left"?v.jsx(Qg,{item:p,align:"right"}):v.jsx(Zg,{time:p.time,align:"right"})}),v.jsx("div",{className:st.center,children:v.jsx("div",{className:Z(st.marker,st[`dot-${g}`],{[st.markerWithIcon]:!!p.icon}),children:p.icon&&v.jsx("span",{className:st.icon,children:p.icon})})}),v.jsx("div",{className:st.side,children:m==="left"?v.jsx(Zg,{time:p.time,align:"left"}):v.jsx(Qg,{item:p,align:"left"})})]},p.id)},e[7]=s,e[8]=f):f=e[8],c=t.map(f),e[4]=t,e[5]=s,e[6]=c}else c=e[6];let u;e[9]!==c?(u=v.jsx("div",{className:st.items,children:c}),e[9]=c,e[10]=u):u=e[10];let d;return e[11]!==a||e[12]!==u?(d=v.jsxs("div",{className:a,children:[l,u]}),e[11]=a,e[12]=u,e[13]=d):d=e[13],d};function Zg(n){const e=ne.c(6),{time:t,align:i}=n;if(t==null){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=v.jsx("div",{className:st.time}),e[0]=a):a=e[0],a}const r=st[`align-${i}`];let s;e[1]!==r?(s=Z(st.time,r),e[1]=r,e[2]=s):s=e[2];let o;return e[3]!==s||e[4]!==t?(o=v.jsx("div",{className:s,children:t}),e[3]=s,e[4]=t,e[5]=o):o=e[5],o}function Qg(n){const e=ne.c(10),{item:t,align:i}=n,r=st[`align-${i}`];let s;e[0]!==r?(s=Z(st.content,r),e[0]=r,e[1]=s):s=e[1];let o;e[2]!==t.title?(o=v.jsx("div",{className:st.title,children:t.title}),e[2]=t.title,e[3]=o):o=e[3];let a;e[4]!==t.description?(a=t.description!=null&&v.jsx("div",{className:st.description,children:t.description}),e[4]=t.description,e[5]=a):a=e[5];let l;return e[6]!==s||e[7]!==o||e[8]!==a?(l=v.jsxs("div",{className:s,children:[o,a]}),e[6]=s,e[7]=o,e[8]=a,e[9]=l):l=e[9],l}const oh=E.createContext(null);function ez(){const n=ne.c(5),e=E.useContext(oh);if(!e)throw new Error("useToast must be used within <ToastProvider>");let t;return n[0]!==e.dismiss||n[1]!==e.dismissAll||n[2]!==e.push||n[3]!==e.toasts?(t={toast:e.push,dismiss:e.dismiss,dismissAll:e.dismissAll,toasts:e.toasts},n[0]=e.dismiss,n[1]=e.dismissAll,n[2]=e.push,n[3]=e.toasts,n[4]=t):t=n[4],t}function tz(){return`${Date.now()}-${Math.random().toString(16).slice(2)}`}const nz=n=>{const e=ne.c(18),{children:t,position:i,defaultDurationMs:r,maxToasts:s}=n,o=i===void 0?"top-right":i,a=r===void 0?3500:r,l=s===void 0?5:s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[u,d]=E.useState(c);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=new Map,e[1]=f):f=e[1];const p=E.useRef(f);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=new Map,e[2]=h):h=e[2];const m=E.useRef(h);let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=I=>{d(N=>N.filter(R=>R.id!==I));const L=p.current.get(I);L&&window.clearTimeout(L),p.current.delete(I);const O=m.current.get(I);O&&window.clearTimeout(O),m.current.delete(I)},e[3]=g):g=e[3];const y=g;let b;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=I=>{const L=p.current.get(I);L&&window.clearTimeout(L),p.current.delete(I),d(N=>N.map(R=>R.id!==I||R.closing?R:{...R,closing:!0}));const O=window.setTimeout(()=>y(I),160);m.current.set(I,O)},e[4]=b):b=e[4];const w=b;let _;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{p.current.forEach(iz),p.current.clear(),m.current.forEach(rz),m.current.clear(),d([])},e[5]=_):_=e[5];const x=_;let C;e[6]!==a||e[7]!==l?(C=I=>{const L=I.id??tz(),O={id:L,title:I.title,description:I.description,variant:I.variant??"default",durationMs:I.durationMs??a,closing:!1};if(d(N=>[O,...N].slice(0,l)),O.durationMs&&O.durationMs>0){const N=window.setTimeout(()=>w(L),O.durationMs);p.current.set(L,N)}return L},e[6]=a,e[7]=l,e[8]=C):C=e[8];const S=C;let k,M;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=()=>()=>{p.current.forEach(sz),p.current.clear(),m.current.forEach(oz),m.current.clear()},M=[],e[9]=k,e[10]=M):(k=e[9],M=e[10]),E.useEffect(k,M);let P;e[11]!==o||e[12]!==S||e[13]!==u?(P={toasts:u,push:S,dismiss:w,dismissAll:x,position:o},e[11]=o,e[12]=S,e[13]=u,e[14]=P):P=e[14];let T;return e[15]!==t||e[16]!==P?(T=v.jsx(oh.Provider,{value:P,children:t}),e[15]=t,e[16]=P,e[17]=T):T=e[17],T};function iz(n){return window.clearTimeout(n)}function rz(n){return window.clearTimeout(n)}function sz(n){return window.clearTimeout(n)}function oz(n){return window.clearTimeout(n)}const az="_root_13zn4_47",lz="_viewport_13zn4_50",cz="_toast_13zn4_75",uz="_toastIn_13zn4_1",dz="_closing_13zn4_92",fz="_toastOut_13zn4_1",pz="_content_13zn4_95",hz="_title_13zn4_100",mz="_description_13zn4_105",gz="_close_13zn4_109",yz="_success_13zn4_136",vz="_warning_13zn4_140",bz="_error_13zn4_144",ln={root:az,viewport:lz,"top-right":"_top-right_13zn4_59","top-left":"_top-left_13zn4_63","bottom-right":"_bottom-right_13zn4_67","bottom-left":"_bottom-left_13zn4_71",toast:cz,toastIn:uz,closing:dz,toastOut:fz,content:pz,title:hz,description:mz,close:gz,default:"_default_13zn4_126",success:yz,warning:vz,error:bz},xz=n=>{const e=ne.c(17),{toast:t,onDismiss:i}=n,{title:r,description:s,variant:o,closing:a}=t,c=ln[o===void 0?"default":o],u=!!a;let d;e[0]!==c||e[1]!==u?(d=Z(ln.root,ln.toast,c,{[ln.closing]:u}),e[0]=c,e[1]=u,e[2]=d):d=e[2];let f;e[3]!==r?(f=r?v.jsx("div",{className:ln.title,children:r}):null,e[3]=r,e[4]=f):f=e[4];let p;e[5]!==s?(p=s?v.jsx("div",{className:ln.description,children:s}):null,e[5]=s,e[6]=p):p=e[6];let h;e[7]!==f||e[8]!==p?(h=v.jsxs("div",{className:ln.content,children:[f,p]}),e[7]=f,e[8]=p,e[9]=h):h=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=v.jsx(xf,{size:14}),e[10]=m):m=e[10];let g;e[11]!==i?(g=v.jsx("button",{type:"button",className:ln.close,onClick:i,"aria-label":"Dismiss",children:m}),e[11]=i,e[12]=g):g=e[12];let y;return e[13]!==d||e[14]!==h||e[15]!==g?(y=v.jsxs("div",{className:d,role:"status",children:[h,g]}),e[13]=d,e[14]=h,e[15]=g,e[16]=y):y=e[16],y},wz=n=>{const e=ne.c(11),{className:t}=n,i=E.useContext(oh);if(!i)throw new Error("ToastViewport must be used within <ToastProvider>");const{toasts:r,dismiss:s,position:o}=i,a=ln[o];let l;e[0]!==t||e[1]!==a?(l=Z(ln.root,ln.viewport,a,t),e[0]=t,e[1]=a,e[2]=l):l=e[2];let c;if(e[3]!==s||e[4]!==r){let d;e[6]!==s?(d=f=>v.jsx(xz,{toast:f,onDismiss:()=>s(f.id)},f.id),e[6]=s,e[7]=d):d=e[7],c=r.map(d),e[3]=s,e[4]=r,e[5]=c}else c=e[5];let u;return e[8]!==l||e[9]!==c?(u=zi.createPortal(v.jsx("div",{className:l,"aria-live":"polite","aria-relevant":"additions",children:c}),document.body),e[8]=l,e[9]=c,e[10]=u):u=e[10],u},kz="_content_cxgma_47",_z="_tooltipIn_cxgma_1",ey={content:kz,"side-top":"_side-top_cxgma_70",tooltipIn:_z,"side-bottom":"_side-bottom_cxgma_81","side-left":"_side-left_cxgma_92","side-right":"_side-right_cxgma_103"},xw=E.createContext(null);function ww(){const n=E.useContext(xw);if(!n)throw new Error("Tooltip components must be used within <Tooltip>");return n}const Sz=n=>{const e=ne.c(15),{open:t,defaultOpen:i,onOpenChange:r,side:s,align:o,offset:a,openDelay:l,closeDelay:c,children:u}=n,d=i===void 0?!1:i,f=s===void 0?"top":s,p=o===void 0?"center":o,h=a===void 0?8:a,m=l===void 0?120:l,g=c===void 0?80:c,y=t!==void 0,[b,w]=E.useState(d);let _;e[0]!==y||e[1]!==r?(_=L=>{y||w(L),r?.(L)},e[0]=y,e[1]=r,e[2]=_):_=e[2];const x=_,C=E.useRef(null),S=E.useRef(null),k=E.useId(),M=y?!!t:b;let P;e[3]!==p||e[4]!==g||e[5]!==k||e[6]!==h||e[7]!==m||e[8]!==x||e[9]!==f||e[10]!==M?(P={open:M,setOpen:x,triggerRef:C,contentRef:S,contentId:k,side:f,align:p,offset:h,openDelay:m,closeDelay:g},e[3]=p,e[4]=g,e[5]=k,e[6]=h,e[7]=m,e[8]=x,e[9]=f,e[10]=M,e[11]=P):P=e[11];const T=P;let I;return e[12]!==u||e[13]!==T?(I=v.jsx(xw.Provider,{value:T,children:u}),e[12]=u,e[13]=T,e[14]=I):I=e[14],I},kw=E.forwardRef(({asChild:n=!1,children:e,className:t},i)=>{const{open:r,setOpen:s,triggerRef:o,contentId:a,openDelay:l,closeDelay:c}=ww(),u=E.useRef(null),d=E.useRef(null);E.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current),d.current&&window.clearTimeout(d.current)},[]);const f=e,p=y=>{o.current=y,i&&(typeof i=="function"?i(y):i.current=y)},h=()=>{d.current&&window.clearTimeout(d.current),u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),l)},m=()=>{u.current&&window.clearTimeout(u.current),d.current&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>s(!1),c)},g={ref:p,onPointerEnter:y=>{f.props?.onPointerEnter?.(y),h()},onPointerLeave:y=>{f.props?.onPointerLeave?.(y),m()},onFocus:y=>{f.props?.onFocus?.(y),s(!0)},onBlur:y=>{f.props?.onBlur?.(y),s(!1)},"aria-describedby":r?a:void 0,className:Z(f.props?.className,t)};return E.cloneElement(f,g)});kw.displayName="TooltipTrigger";const _w=E.forwardRef((n,e)=>{const t=ne.c(49);let i,r,s,o,a;t[0]!==n?({children:i,className:r,style:o,width:a,...s}=n,t[0]=n,t[1]=i,t[2]=r,t[3]=s,t[4]=o,t[5]=a):(i=t[1],r=t[2],s=t[3],o=t[4],a=t[5]);const{open:l,setOpen:c,triggerRef:u,contentRef:d,contentId:f,side:p,align:h,offset:m,closeDelay:g}=ww(),[y,b]=E.useState(null),w=E.useRef(null);let _,x;t[6]===Symbol.for("react.memo_cache_sentinel")?(_=()=>()=>{w.current&&window.clearTimeout(w.current)},x=[],t[6]=_,t[7]=x):(_=t[6],x=t[7]),E.useEffect(_,x);let C;t[8]!==d||t[9]!==e?(C=j=>{d.current=j,e&&(typeof e=="function"?e(j):e.current=j)},t[8]=d,t[9]=e,t[10]=C):C=t[10];const S=C;let k;t[11]!==h||t[12]!==d||t[13]!==m||t[14]!==p||t[15]!==u?(k=()=>{const j=u.current,F=d.current;if(!j||!F)return;const V=j.getBoundingClientRect(),G=F.getBoundingClientRect(),W=()=>h==="start"?V.left:h==="end"?V.right-G.width:V.left+V.width/2-G.width/2,z=()=>h==="start"?V.top:h==="end"?V.bottom-G.height:V.top+V.height/2-G.height/2;let U,J;p==="top"?(J=V.top-G.height-m,U=W()):p==="bottom"?(J=V.bottom+m,U=W()):p==="right"?(U=V.right+m,J=z()):(U=V.left-G.width-m,J=z());const X=window.innerWidth,re=window.innerHeight;U=Math.max(8,Math.min(U,X-G.width-8)),J=Math.max(8,Math.min(J,re-G.height-8)),b({top:J,left:U})},t[11]=h,t[12]=d,t[13]=m,t[14]=p,t[15]=u,t[16]=k):k=t[16];const M=k;let P;t[17]!==l||t[18]!==M?(P=()=>{l&&M()},t[17]=l,t[18]=M,t[19]=P):P=t[19];let T;t[20]!==i||t[21]!==l||t[22]!==M?(T=[l,M,i],t[20]=i,t[21]=l,t[22]=M,t[23]=T):T=t[23],E.useLayoutEffect(P,T);let I,L;if(t[24]!==l||t[25]!==c||t[26]!==M?(I=()=>{if(!l)return;const j=V=>{V.key==="Escape"&&c(!1)},F=()=>M();return document.addEventListener("keydown",j),window.addEventListener("resize",F),window.addEventListener("scroll",F,!0),()=>{document.removeEventListener("keydown",j),window.removeEventListener("resize",F),window.removeEventListener("scroll",F,!0)}},L=[l,c,M],t[24]=l,t[25]=c,t[26]=M,t[27]=I,t[28]=L):(I=t[27],L=t[28]),E.useEffect(I,L),!l)return null;const O=ey[`side-${p}`];let N;t[29]!==r||t[30]!==O?(N=Z(ey.content,O,r),t[29]=r,t[30]=O,t[31]=N):N=t[31];const R=y?.top??0,$=y?.left??0;let B;t[32]!==o||t[33]!==R||t[34]!==$||t[35]!==a?(B={position:"fixed",top:R,left:$,width:a,...o},t[32]=o,t[33]=R,t[34]=$,t[35]=a,t[36]=B):B=t[36];let q;t[37]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{w.current&&window.clearTimeout(w.current)},t[37]=q):q=t[37];let D;t[38]!==g||t[39]!==c?(D=()=>{w.current&&window.clearTimeout(w.current),w.current=window.setTimeout(()=>c(!1),g)},t[38]=g,t[39]=c,t[40]=D):D=t[40];let A;return t[41]!==i||t[42]!==f||t[43]!==S||t[44]!==s||t[45]!==N||t[46]!==B||t[47]!==D?(A=zi.createPortal(v.jsx("div",{ref:S,id:f,role:"tooltip",className:N,style:B,onPointerEnter:q,onPointerLeave:D,...s,children:i}),document.body),t[41]=i,t[42]=f,t[43]=S,t[44]=s,t[45]=N,t[46]=B,t[47]=D,t[48]=A):A=t[48],A});_w.displayName="TooltipContent";const Cz="_root_rzrap_47",Tz="_panel_rzrap_54",Ez="_panelHeader_rzrap_63",Mz="_title_rzrap_71",Az="_subTitle_rzrap_75",Nz="_list_rzrap_79",Rz="_row_rzrap_85",Oz="_disabledRow_rzrap_98",Dz="_label_rzrap_102",Iz="_controls_rzrap_106",ht={root:Cz,panel:Tz,panelHeader:Ez,title:Mz,subTitle:Az,list:Nz,row:Rz,disabledRow:Oz,label:Dz,controls:Iz},_n=n=>String(n),Pz=n=>{const e=ne.c(102),{leftTitle:t,rightTitle:i,leftItems:r,rightItems:s,onChange:o,showMoveAll:a,className:l}=n,c=a===void 0?!0:a,[u,d]=E.useState(Lz),[f,p]=E.useState(jz);let h,m;e[0]!==r||e[1]!==s?(h=()=>{const K=new Set(r.map($z)),Q=new Set(s.map(Bz));d(ie=>new Set(Array.from(ie).filter(oe=>K.has(oe)))),p(ie=>new Set(Array.from(ie).filter(oe=>Q.has(oe))))},m=[r,s],e[0]=r,e[1]=s,e[2]=h,e[3]=m):(h=e[2],m=e[3]),E.useEffect(h,m);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=(K,Q)=>{Q||d(ie=>{const oe=new Set(ie);return oe.has(K)?oe.delete(K):oe.add(K),oe})},e[4]=g):g=e[4];const y=g;let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=(K,Q)=>{Q||p(ie=>{const oe=new Set(ie);return oe.has(K)?oe.delete(K):oe.add(K),oe})},e[5]=b):b=e[5];const w=b;let _;e[6]!==r||e[7]!==o||e[8]!==s||e[9]!==u?(_=()=>{const K=r.filter(ie=>u.has(_n(ie.key))&&!ie.disabled);if(!K.length)return;const Q=r.filter(ie=>!u.has(_n(ie.key)));o({leftItems:Q,rightItems:[...s,...K]}),d(new Set)},e[6]=r,e[7]=o,e[8]=s,e[9]=u,e[10]=_):_=e[10];const x=_;let C;e[11]!==r||e[12]!==o||e[13]!==s||e[14]!==f?(C=()=>{const K=s.filter(ie=>f.has(_n(ie.key))&&!ie.disabled);if(!K.length)return;const Q=s.filter(ie=>!f.has(_n(ie.key)));o({leftItems:[...r,...K],rightItems:Q}),p(new Set)},e[11]=r,e[12]=o,e[13]=s,e[14]=f,e[15]=C):C=e[15];const S=C;let k;e[16]!==r||e[17]!==o||e[18]!==s?(k=()=>{const K=r.filter(zz);K.length&&(o({leftItems:r.filter(Vz),rightItems:[...s,...K]}),d(new Set))},e[16]=r,e[17]=o,e[18]=s,e[19]=k):k=e[19];const M=k;let P;e[20]!==r||e[21]!==o||e[22]!==s?(P=()=>{const K=s.filter(Fz);K.length&&(o({leftItems:[...r,...K],rightItems:s.filter(Hz)}),p(new Set))},e[20]=r,e[21]=o,e[22]=s,e[23]=P):P=e[23];const T=P;let I;e[24]!==r?(I=r.filter(Wz),e[24]=r,e[25]=I):I=e[25];const L=I.length;let O;e[26]!==s?(O=s.filter(qz),e[26]=s,e[27]=O):O=e[27];const N=O.length;let R;if(e[28]!==r||e[29]!==u){let K;e[31]!==u?(K=Q=>u.has(_n(Q.key))&&!Q.disabled,e[31]=u,e[32]=K):K=e[32],R=r.some(K),e[28]=r,e[29]=u,e[30]=R}else R=e[30];const $=R;let B;if(e[33]!==s||e[34]!==f){let K;e[36]!==f?(K=Q=>f.has(_n(Q.key))&&!Q.disabled,e[36]=f,e[37]=K):K=e[37],B=s.some(K),e[33]=s,e[34]=f,e[35]=B}else B=e[35];const q=B;let D;e[38]!==r||e[39]!==c?(D=c&&r.some(Uz),e[38]=r,e[39]=c,e[40]=D):D=e[40];const A=D;let j;e[41]!==s||e[42]!==c?(j=c&&s.some(Kz),e[41]=s,e[42]=c,e[43]=j):j=e[43];const F=j;let V;e[44]!==l?(V=Z(ht.root,l),e[44]=l,e[45]=V):V=e[45];let G;e[46]!==L||e[47]!==t||e[48]!==u?(G=(t||L>=0)&&v.jsxs("div",{className:ht.panelHeader,children:[t&&v.jsx("div",{className:ht.title,children:t}),v.jsxs("div",{className:ht.subTitle,children:[u.size,"/",L," selected"]})]}),e[46]=L,e[47]=t,e[48]=u,e[49]=G):G=e[49];const W=t??"Choices";let z;if(e[50]!==r||e[51]!==u){let K;e[53]!==u?(K=Q=>{const ie=_n(Q.key),oe=u.has(ie);return v.jsxs("div",{className:Z(ht.row,{[ht.disabledRow]:Q.disabled}),role:"option","aria-selected":oe,onClick:()=>y(ie,Q.disabled),children:[v.jsx("div",{onClick:Gz,onPointerDown:Yz,children:v.jsx(qa,{checked:oe,onCheckedChange:()=>y(ie,Q.disabled),disabled:Q.disabled})}),v.jsx("div",{className:ht.label,children:Q.label})]},ie)},e[53]=u,e[54]=K):K=e[54],z=r.map(K),e[50]=r,e[51]=u,e[52]=z}else z=e[52];let U;e[55]!==W||e[56]!==z?(U=v.jsx("div",{className:ht.list,role:"listbox","aria-label":W,children:z}),e[55]=W,e[56]=z,e[57]=U):U=e[57];let J;e[58]!==G||e[59]!==U?(J=v.jsxs("div",{className:ht.panel,children:[G,U]}),e[58]=G,e[59]=U,e[60]=J):J=e[60];let X;e[61]!==A||e[62]!==M||e[63]!==c?(X=c&&v.jsx(dt,{variant:"outline",size:"sm",onClick:M,disabled:!A,"aria-label":"Move all to the right",children:v.jsx(ek,{size:16})}),e[61]=A,e[62]=M,e[63]=c,e[64]=X):X=e[64];const re=!$;let Y;e[65]===Symbol.for("react.memo_cache_sentinel")?(Y=v.jsx(bf,{size:16}),e[65]=Y):Y=e[65];let le;e[66]!==x||e[67]!==re?(le=v.jsx(dt,{variant:"outline",size:"sm",onClick:x,disabled:re,"aria-label":"Move selected to the right",children:Y}),e[66]=x,e[67]=re,e[68]=le):le=e[68];const ce=!q;let we;e[69]===Symbol.for("react.memo_cache_sentinel")?(we=v.jsx(vf,{size:16}),e[69]=we):we=e[69];let Se;e[70]!==S||e[71]!==ce?(Se=v.jsx(dt,{variant:"outline",size:"sm",onClick:S,disabled:ce,"aria-label":"Move selected to the left",children:we}),e[70]=S,e[71]=ce,e[72]=Se):Se=e[72];let Te;e[73]!==F||e[74]!==T||e[75]!==c?(Te=c&&v.jsx(dt,{variant:"outline",size:"sm",onClick:T,disabled:!F,"aria-label":"Move all to the left",children:v.jsx(Zw,{size:16})}),e[73]=F,e[74]=T,e[75]=c,e[76]=Te):Te=e[76];let de;e[77]!==X||e[78]!==le||e[79]!==Se||e[80]!==Te?(de=v.jsxs("div",{className:ht.controls,"aria-label":"Transfer controls",children:[X,le,Se,Te]}),e[77]=X,e[78]=le,e[79]=Se,e[80]=Te,e[81]=de):de=e[81];let me;e[82]!==N||e[83]!==i||e[84]!==f?(me=(i||N>=0)&&v.jsxs("div",{className:ht.panelHeader,children:[i&&v.jsx("div",{className:ht.title,children:i}),v.jsxs("div",{className:ht.subTitle,children:[f.size,"/",N," selected"]})]}),e[82]=N,e[83]=i,e[84]=f,e[85]=me):me=e[85];const be=i??"Chosen";let ge;if(e[86]!==s||e[87]!==f){let K;e[89]!==f?(K=Q=>{const ie=_n(Q.key),oe=f.has(ie);return v.jsxs("div",{className:Z(ht.row,{[ht.disabledRow]:Q.disabled}),role:"option","aria-selected":oe,onClick:()=>w(ie,Q.disabled),children:[v.jsx("div",{onClick:Jz,onPointerDown:Xz,children:v.jsx(qa,{checked:oe,onCheckedChange:()=>w(ie,Q.disabled),disabled:Q.disabled})}),v.jsx("div",{className:ht.label,children:Q.label})]},ie)},e[89]=f,e[90]=K):K=e[90],ge=s.map(K),e[86]=s,e[87]=f,e[88]=ge}else ge=e[88];let Ce;e[91]!==be||e[92]!==ge?(Ce=v.jsx("div",{className:ht.list,role:"listbox","aria-label":be,children:ge}),e[91]=be,e[92]=ge,e[93]=Ce):Ce=e[93];let Oe;e[94]!==me||e[95]!==Ce?(Oe=v.jsxs("div",{className:ht.panel,children:[me,Ce]}),e[94]=me,e[95]=Ce,e[96]=Oe):Oe=e[96];let We;return e[97]!==V||e[98]!==J||e[99]!==de||e[100]!==Oe?(We=v.jsxs("div",{className:V,children:[J,de,Oe]}),e[97]=V,e[98]=J,e[99]=de,e[100]=Oe,e[101]=We):We=e[101],We};function Lz(){return new Set}function jz(){return new Set}function $z(n){return _n(n.key)}function Bz(n){return _n(n.key)}function zz(n){return!n.disabled}function Vz(n){return n.disabled}function Fz(n){return!n.disabled}function Hz(n){return n.disabled}function Wz(n){return!n.disabled}function qz(n){return!n.disabled}function Uz(n){return!n.disabled}function Kz(n){return!n.disabled}function Gz(n){return n.stopPropagation()}function Yz(n){return n.stopPropagation()}function Jz(n){return n.stopPropagation()}function Xz(n){return n.stopPropagation()}const Zz="_card_10cgo_47",Qz="_header_10cgo_58",eV="_headerTitle_10cgo_61",tV="_profileRow_10cgo_67",nV="_avatar_10cgo_73",iV="_profileMeta_10cgo_77",rV="_name_10cgo_83",sV="_role_10cgo_90",oV="_email_10cgo_96",aV="_divider_10cgo_114",lV="_items_10cgo_119",cV="_item_10cgo_119",uV="_itemIcon_10cgo_145",dV="_blue_10cgo_158",fV="_green_10cgo_162",pV="_orange_10cgo_166",hV="_red_10cgo_170",mV="_gray_10cgo_174",gV="_itemText_10cgo_178",yV="_itemTitle_10cgo_184",vV="_itemSubtitle_10cgo_190",bV="_itemDisabled_10cgo_196",xV="_footer_10cgo_200",wV="_logout_10cgo_203",it={card:Zz,header:Qz,headerTitle:eV,profileRow:tV,avatar:nV,profileMeta:iV,name:rV,role:sV,email:oV,divider:aV,items:lV,item:cV,itemIcon:uV,blue:dV,green:fV,orange:pV,red:hV,gray:mV,itemText:gV,itemTitle:yV,itemSubtitle:vV,itemDisabled:bV,footer:xV,logout:wV},Sw=E.forwardRef((n,e)=>{const t=ne.c(53);let i,r,s,o,a,l,c,u,d,f,p,h;t[0]!==n?({className:s,title:d,avatarSrc:r,avatarAlt:f,avatarFallback:i,name:a,role:u,email:o,items:p,logoutLabel:h,onLogout:l,...c}=n,t[0]=n,t[1]=i,t[2]=r,t[3]=s,t[4]=o,t[5]=a,t[6]=l,t[7]=c,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=h):(i=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],p=t[11],h=t[12]);const m=d===void 0?"User Profile":d,g=f===void 0?"User avatar":f;let y;t[13]!==p?(y=p===void 0?[]:p,t[13]=p,t[14]=y):y=t[14];const b=y,w=h===void 0?"Log out":h;let _;t[15]!==s?(_=Z(it.card,s),t[15]=s,t[16]=_):_=t[16];let x;t[17]!==m?(x=v.jsx("div",{className:it.header,children:v.jsx("div",{className:it.headerTitle,children:m})}),t[17]=m,t[18]=x):x=t[18];const C=String(g),S=String(g);let k;t[19]!==i||t[20]!==r||t[21]!==C||t[22]!==S?(k=v.jsx(Kl,{src:r,alt:C,ariaLabel:S,size:"xxlarge",variant:"rounded",border:"none",fallback:i,className:it.avatar}),t[19]=i,t[20]=r,t[21]=C,t[22]=S,t[23]=k):k=t[23];let M;t[24]!==a?(M=v.jsx("div",{className:it.name,children:a}),t[24]=a,t[25]=M):M=t[25];let P;t[26]!==u?(P=u?v.jsx("div",{className:it.role,children:u}):null,t[26]=u,t[27]=P):P=t[27];let T;t[28]!==o?(T=o?v.jsxs("div",{className:it.email,children:[v.jsx(Tk,{size:14,"aria-hidden":"true"}),v.jsx("span",{children:o})]}):null,t[28]=o,t[29]=T):T=t[29];let I;t[30]!==M||t[31]!==P||t[32]!==T?(I=v.jsxs("div",{className:it.profileMeta,children:[M,P,T]}),t[30]=M,t[31]=P,t[32]=T,t[33]=I):I=t[33];let L;t[34]!==k||t[35]!==I?(L=v.jsxs("div",{className:it.profileRow,children:[k,I]}),t[34]=k,t[35]=I,t[36]=L):L=t[36];let O;t[37]===Symbol.for("react.memo_cache_sentinel")?(O=v.jsx("div",{className:it.divider}),t[37]=O):O=t[37];let N;t[38]!==b?(N=b.map(kV),t[38]=b,t[39]=N):N=t[39];let R;t[40]!==N?(R=v.jsx("div",{className:it.items,children:N}),t[40]=N,t[41]=R):R=t[41];let $;t[42]!==w||t[43]!==l?($=l?v.jsx("div",{className:it.footer,children:v.jsx(dt,{className:it.logout,variant:"default",radius:"rounded",onClick:l,children:w})}):null,t[42]=w,t[43]=l,t[44]=$):$=t[44];let B;return t[45]!==c||t[46]!==e||t[47]!==L||t[48]!==R||t[49]!==$||t[50]!==_||t[51]!==x?(B=v.jsxs("div",{ref:e,className:_,...c,children:[x,L,O,R,$]}),t[45]=c,t[46]=e,t[47]=L,t[48]=R,t[49]=$,t[50]=_,t[51]=x,t[52]=B):B=t[52],B});Sw.displayName="UserProfileCard";function kV(n){const e=!!n.disabled,t=n.onClick?"button":"div";return v.jsxs(t,{type:n.onClick?"button":void 0,className:Z(it.item,e&&it.itemDisabled),onClick:e?void 0:n.onClick,disabled:n.onClick?e:void 0,children:[v.jsx("span",{className:Z(it.itemIcon,n.iconVariant?it[n.iconVariant]:it.gray),children:n.icon}),v.jsxs("span",{className:it.itemText,children:[v.jsx("span",{className:it.itemTitle,children:n.title}),n.subtitle?v.jsx("span",{className:it.itemSubtitle,children:n.subtitle}):null]})]},n.id)}exports.Accordion=ry;exports.AccordionContent=cy;exports.AccordionItem=ay;exports.AccordionTrigger=ly;exports.Alert=T_;exports.Avatar=Kl;exports.AvatarGroup=uy;exports.Badge=MS;exports.BasketItem=fy;exports.BreadCrumb=n3;exports.Button=dt;exports.ButtonGroup=hy;exports.ButtonGroupItem=my;exports.Card=gy;exports.Carousel=kf;exports.CarouselContent=_f;exports.CarouselDots=vy;exports.CarouselItem=Sf;exports.CarouselNext=Tf;exports.CarouselPrevious=Cf;exports.Checkbox=qa;exports.ChevronIcon=R6;exports.Chip=eE;exports.ColorPicker=Ey;exports.Counter=XN;exports.Drawer=h5;exports.DrawerClose=y0;exports.DrawerContent=g0;exports.DrawerTrigger=m0;exports.DropZone=R0;exports.DropdownBase=A6;exports.DropdownOption=N6;exports.DropdownWrapper=zO;exports.FileInput=O0;exports.Image=bo;exports.InputField=D0;exports.Label=VR;exports.Lightbox=d6;exports.MediaCard=L0;exports.NavigationBar=j0;exports.NotificationButton=$0;exports.Pagination=uO;exports.Popover=P0;exports.PopoverClose=nl;exports.PopoverContent=fp;exports.PopoverTrigger=dp;exports.RadioCardGroup=W0;exports.RadioCardOption=q0;exports.Rating=BO;exports.SimplePagination=dO;exports.Slider=ZO;exports.Spinner=wf;exports.StatCard=U0;exports.Switch=K0;exports.Table=wb;exports.TableBody=_b;exports.TableCaption=Mb;exports.TableCell=Eb;exports.TableFooter=Sb;exports.TableHead=Tb;exports.TableHeader=kb;exports.TableRow=Cb;exports.Tabs=hb;exports.TabsContent=yb;exports.TabsList=mb;exports.TabsTrigger=gb;exports.TextEditor=sh;exports.TextEditorDefault=sh;exports.Timeline=QB;exports.ToastProvider=nz;exports.ToastViewport=wz;exports.Tooltip=Sz;exports.TooltipContent=_w;exports.TooltipTrigger=kw;exports.TransferList=Pz;exports.Typography=jn;exports.UnderlineTabsContent=xb;exports.UnderlineTabsList=vb;exports.UnderlineTabsTrigger=bb;exports.UserProfileCard=Sw;exports.canGoNext=z0;exports.canGoPrevious=B0;exports.getItemsRange=V0;exports.getPageNumbers=F0;exports.getTotalPages=pp;exports.useDropdown=T6;exports.useDropdownKeyboard=E6;exports.useRipple=Yl;exports.useToast=ez;
|
package/dist/index.js
CHANGED
|
@@ -31858,7 +31858,8 @@ const _z = "_toolbar_1lw4n_66", Sz = "_toolbarButton_1lw4n_79", Cz = "_toolbarBu
|
|
|
31858
31858
|
content: x,
|
|
31859
31859
|
onUpdate: C,
|
|
31860
31860
|
editorProps: k,
|
|
31861
|
-
editable: M
|
|
31861
|
+
editable: M,
|
|
31862
|
+
immediatelyRender: !1
|
|
31862
31863
|
}, e[5] = x, e[6] = C, e[7] = k, e[8] = M, e[9] = P) : P = e[9];
|
|
31863
31864
|
const T = Sj(P);
|
|
31864
31865
|
let I, L;
|
|
@@ -32202,7 +32203,7 @@ function Dz(n) {
|
|
|
32202
32203
|
const {
|
|
32203
32204
|
editor: e
|
|
32204
32205
|
} = n;
|
|
32205
|
-
return {
|
|
32206
|
+
return e ? {
|
|
32206
32207
|
bold: e.isActive("bold"),
|
|
32207
32208
|
italic: e.isActive("italic"),
|
|
32208
32209
|
underline: e.isActive("underline"),
|
|
@@ -32235,6 +32236,25 @@ function Dz(n) {
|
|
|
32235
32236
|
alignJustify: e.isActive({
|
|
32236
32237
|
textAlign: "justify"
|
|
32237
32238
|
})
|
|
32239
|
+
} : {
|
|
32240
|
+
bold: !1,
|
|
32241
|
+
italic: !1,
|
|
32242
|
+
underline: !1,
|
|
32243
|
+
strike: !1,
|
|
32244
|
+
subscript: !1,
|
|
32245
|
+
superscript: !1,
|
|
32246
|
+
h1: !1,
|
|
32247
|
+
h2: !1,
|
|
32248
|
+
h3: !1,
|
|
32249
|
+
bulletList: !1,
|
|
32250
|
+
orderedList: !1,
|
|
32251
|
+
blockquote: !1,
|
|
32252
|
+
codeBlock: !1,
|
|
32253
|
+
link: !1,
|
|
32254
|
+
alignLeft: !1,
|
|
32255
|
+
alignCenter: !1,
|
|
32256
|
+
alignRight: !1,
|
|
32257
|
+
alignJustify: !1
|
|
32238
32258
|
};
|
|
32239
32259
|
}
|
|
32240
32260
|
function Iz(n) {
|