@tempots/beatui 0.61.9 → 0.61.13
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.
- package/README.md +5 -5
- package/dist/beatui.css +1 -0
- package/dist/beatui.tailwind.css +1 -0
- package/dist/{index-D4U7cDIP.js → index-DFotr_Xo.js} +1 -1
- package/dist/{index-CGoK9M1f.js → index-DU6X3Zlf.js} +2 -2
- package/dist/{index-J7CsYy0-.cjs → index-DufUQsGn.cjs} +1 -1
- package/dist/{index-DJ6AuTd_.cjs → index-fYE0_cvI.cjs} +2 -2
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/prosemirror.css +4 -0
- package/dist/styles-url-CzNVxeM7.js +4 -0
- package/dist/styles-url-D8MjxiP-.cjs +1 -0
- package/package.json +12 -11
- package/dist/styles-url-CF_019NX.js +0 -4
- package/dist/styles-url-DhmSan6u.cjs +0 -1
package/README.md
CHANGED
|
@@ -180,16 +180,16 @@ See the [monorepo README](../../README.md) for development instructions.
|
|
|
180
180
|
The package includes convenient scripts for publishing different types of releases:
|
|
181
181
|
|
|
182
182
|
```bash
|
|
183
|
-
# Patch release (0.0.1 → 0.0.2) - for bug fixes
|
|
183
|
+
# Patch release (0.0.1 → 0.0.2) - for bug fixes (will verify npm login)
|
|
184
184
|
pnpm run release:patch
|
|
185
185
|
|
|
186
|
-
# Minor release (0.0.1 → 0.1.0) - for new features
|
|
186
|
+
# Minor release (0.0.1 → 0.1.0) - for new features (will verify npm login)
|
|
187
187
|
pnpm run release:minor
|
|
188
188
|
|
|
189
|
-
# Major release (0.0.1 → 1.0.0) - for breaking changes
|
|
189
|
+
# Major release (0.0.1 → 1.0.0) - for breaking changes (will verify npm login)
|
|
190
190
|
pnpm run release:major
|
|
191
191
|
|
|
192
|
-
# Prerelease (0.0.1 → 0.0.2-0) - for beta/alpha versions
|
|
192
|
+
# Prerelease (0.0.1 → 0.0.2-0) - for beta/alpha versions (will verify npm login)
|
|
193
193
|
pnpm run release:prerelease
|
|
194
194
|
|
|
195
195
|
# Release without automatic git commit (manual git handling)
|
|
@@ -223,7 +223,7 @@ Each release script follows this workflow:
|
|
|
223
223
|
|
|
224
224
|
1. **Prepare**: Clean previous builds, build package, run all tests
|
|
225
225
|
2. **Version**: Update the version number in package.json and create git tag
|
|
226
|
-
3. **Publish**:
|
|
226
|
+
3. **Publish**: Verify npm login, then publish to npm (bypassing git checks since version step creates changes)
|
|
227
227
|
4. **Commit**: Add package.json changes and commit with release message
|
|
228
228
|
|
|
229
229
|
The workflow ensures that:
|
package/dist/beatui.css
CHANGED
package/dist/beatui.tailwind.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as I, f as S, R as $, S as x, F as u, l as w, c as R, a as L } from "./index-
|
|
1
|
+
import { N as I, f as S, R as $, S as x, F as u, l as w, c as R, a as L } from "./index-DU6X3Zlf.js";
|
|
2
2
|
function b(d, t = null) {
|
|
3
3
|
return function(e, n) {
|
|
4
4
|
let { $from: o, $to: l } = e.selection, f = o.blockRange(l);
|
|
@@ -5810,7 +5810,7 @@ function Da(t, e) {
|
|
|
5810
5810
|
n != null && (Dr(n, { level: e })(t.state, t.dispatch), t.focus());
|
|
5811
5811
|
}
|
|
5812
5812
|
async function Tu(t, e) {
|
|
5813
|
-
const { wrapInList: n, liftListItem: r } = await import("./index-
|
|
5813
|
+
const { wrapInList: n, liftListItem: r } = await import("./index-DFotr_Xo.js"), u = t.state.schema.nodes[e], i = t.state.schema.nodes.list_item;
|
|
5814
5814
|
if (u == null || i == null) return;
|
|
5815
5815
|
const { state: s } = t, { $from: o } = s.selection;
|
|
5816
5816
|
let l = null;
|
|
@@ -14043,7 +14043,7 @@ const Ph = (t) => {
|
|
|
14043
14043
|
y.value?.destroy();
|
|
14044
14044
|
}),
|
|
14045
14045
|
(t.cssInjection ?? "none") === "none" ? null : qo(
|
|
14046
|
-
() => import("./styles-url-
|
|
14046
|
+
() => import("./styles-url-CzNVxeM7.js"),
|
|
14047
14047
|
({ default: E }) => jo({ id: "beatui-prosemirror-css", href: E })
|
|
14048
14048
|
),
|
|
14049
14049
|
Je.class("bc-prosemirror-editor-container"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-fYE0_cvI.cjs");function S(f,t=null){return function(e,n){let{$from:o,$to:l}=e.selection,i=o.blockRange(l);if(!i)return!1;let d=n?e.tr:null;return h(d,i,f,t)?(n&&n(d.scrollIntoView()),!0):!1}}function h(f,t,e,n=null){let o=!1,l=t,i=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(e)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let u=i.resolve(t.start-2);l=new r.NodeRange(u,u,t.depth),t.endIndex<t.parent.childCount&&(t=new r.NodeRange(t.$from,i.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let d=r.findWrapping(l,e,n,t);return d?(f&&$(f,t,d,o,e),!0):!1}function $(f,t,e,n,o){let l=r.Fragment.empty;for(let p=e.length-1;p>=0;p--)l=r.Fragment.from(e[p].type.create(e[p].attrs,l));f.step(new r.ReplaceAroundStep(t.start-(n?2:0),t.end,t.start,t.end,new r.Slice(l,0,0),e.length,!0));let i=0;for(let p=0;p<e.length;p++)e[p].type==o&&(i=p+1);let d=e.length-i,u=t.start+e.length-(n?2:0),m=t.parent;for(let p=t.startIndex,s=t.endIndex,c=!0;p<s;p++,c=!1)!c&&r.canSplit(f.doc,u,d)&&(f.split(u,d),u+=2*d),u+=m.child(p).nodeSize;return f}function R(f){return function(t,e){let{$from:n,$to:o}=t.selection,l=n.blockRange(o,i=>i.childCount>0&&i.firstChild.type==f);return l?e?n.node(l.depth-1).type==f?x(t,e,f,l):F(t,e,l):!0:!1}}function x(f,t,e,n){let o=f.tr,l=n.end,i=n.$to.end(n.depth);l<i&&(o.step(new r.ReplaceAroundStep(l-1,i,l,i,new r.Slice(r.Fragment.from(e.create(null,n.parent.copy())),1,0),1,!0)),n=new r.NodeRange(o.doc.resolve(n.$from.pos),o.doc.resolve(i),n.depth));const d=r.liftTarget(n);if(d==null)return!1;o.lift(n,d);let u=o.doc.resolve(o.mapping.map(l,-1)-1);return r.canJoin(o.doc,u.pos)&&u.nodeBefore.type==u.nodeAfter.type&&o.join(u.pos),t(o.scrollIntoView()),!0}function F(f,t,e){let n=f.tr,o=e.parent;for(let a=e.end,I=e.endIndex-1,y=e.startIndex;I>y;I--)a-=o.child(I).nodeSize,n.delete(a-1,a+1);let l=n.doc.resolve(e.start),i=l.nodeAfter;if(n.mapping.map(e.end)!=e.start+l.nodeAfter.nodeSize)return!1;let d=e.startIndex==0,u=e.endIndex==o.childCount,m=l.node(-1),p=l.index(-1);if(!m.canReplace(p+(d?0:1),p+1,i.content.append(u?r.Fragment.empty:r.Fragment.from(o))))return!1;let s=l.pos,c=s+i.nodeSize;return n.step(new r.ReplaceAroundStep(s-(d?1:0),c+(u?1:0),s+1,c-1,new r.Slice((d?r.Fragment.empty:r.Fragment.from(o.copy(r.Fragment.empty))).append(u?r.Fragment.empty:r.Fragment.from(o.copy(r.Fragment.empty))),d?0:1,u?0:1),d?0:1)),t(n.scrollIntoView()),!0}exports.liftListItem=R;exports.wrapInList=S;exports.wrapRangeInList=h;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let o=r.split(/\r?\n|\r/);for(let l=0;l<o.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),o[l]&&this.insertNode(s.text(o[l]),n,!/\S/.test(o[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=u.content[u.content.length-1],l=e.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let u=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;Ki.hasOwnProperty(s)&&this.parser.normalizeLists&&el(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,r));e:if(l?l.ignore:Qo.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let a,c=this.needsBlock;if(Ui.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),a=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let f=l&&l.skip?n:this.readStyles(e,n);f&&this.addAll(e,f),a&&this.sync(i),this.needsBlock=c}else{let a=this.readStyles(e,n);a&&this.addElementByRule(e,l,a,l.consuming===!1?o:void 0)}this.localPreserveWS=u}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let u=0;u<this.parser.matchedStyles.length;u++){let i=this.parser.matchedStyles[u],s=r.getPropertyValue(i);if(s)for(let o=void 0;;){let l=this.parser.matchStyle(i,s,this,o);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(a=>!l.clearMark(a)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)o=l;else break}}return n}addElementByRule(e,n,r,u){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(u)this.addElement(e,r,u);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(o)&&this.open--}addAll(e,n,r,u){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,o=u==null?null:e.childNodes[u];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let u,i;for(let s=this.open,o=0;s>=0;s--){let l=this.nodes[s],a=l.findWrapping(e);if(a&&(!u||u.length>a.length+o)&&(u=a,i=l,!a.length))break;if(l.solid){if(r)break;o+=2}}if(!u)return null;this.sync(i);for(let s=0;s<u.length;s++)n=this.enterInner(u[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let u=this.findPlace(e,n,r);if(u){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=w.none;for(let o of u.concat(e.marks))(i.type?i.type.allowsMarkType(o.type):mu(o.type,e.type))&&(s=o.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,u){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,u)),i}enterInner(e,n,r,u=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=du(e,i,s.options);s.options&Tt&&s.content.length==0&&(o|=Tt);let l=w.none;return r=r.filter(a=>(s.type?s.type.allowsMarkType(a.type):mu(a.type,e))?(l=a.addToSet(l),!1):!0),this.nodes.push(new nn(e,n,l,u,null,o)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=vt)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let u=r.length-1;u>=0;u--)e+=r[u].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let u=0;u<this.find.length;u++)this.find[u].pos==null&&e.nodeType==1&&e.contains(this.find[u].node)&&n.compareDocumentPosition(this.find[u].node)&(r?2:4)&&(this.find[u].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,u=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(u?0:1),s=(o,l)=>{for(;o>=0;o--){let a=n[o];if(a==""){if(o==n.length-1||o==0)continue;for(;l>=i;l--)if(s(o-1,l))return!0;return!1}else{let c=l>0||l==0&&u?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!c||c.name!=a&&!c.isInGroup(a))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function el(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Ki.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function tl(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function pu(t){let e={};for(let n in t)e[n]=t[n];return e}function mu(t,e){let n=e.schema.nodes;for(let r in n){let u=n[r];if(!u.allowsMarkType(t))continue;let i=[],s=o=>{i.push(o);for(let l=0;l<o.edgeCount;l++){let{type:a,next:c}=o.edge(l);if(a==e||i.indexOf(c)<0&&s(c))return!0}};if(s(u.contentMatch))return!0}}class xt{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Ln(n).createDocumentFragment());let u=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let o=0,l=0;for(;o<i.length&&l<s.marks.length;){let a=s.marks[l];if(!this.marks[a.type.name]){l++;continue}if(!a.eq(i[o][0])||a.type.spec.spanning===!1)break;o++,l++}for(;o<i.length;)u=i.pop()[1];for(;l<s.marks.length;){let a=s.marks[l++],c=this.serializeMark(a,s.isInline,n);c&&(i.push([a,u]),u.appendChild(c.dom),u=c.contentDOM||c.dom)}}u.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:u}=ln(Ln(n),this.nodes[e.type.name](e),null,e.attrs);if(u){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,u)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let u=e.marks.length-1;u>=0;u--){let i=this.serializeMark(e.marks[u],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let u=this.marks[e.type.name];return u&&ln(Ln(r),u(e,n),null,e.attrs)}static renderSpec(e,n,r=null,u){return ln(e,n,r,u)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new xt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=gu(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return gu(e.marks)}}function gu(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Ln(t){return t.document||window.document}const bu=new WeakMap;function nl(t){let e=bu.get(t);return e===void 0&&bu.set(t,e=rl(t)),e}function rl(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let u=0;u<r.length;u++)n(r[u]);else for(let u in r)n(r[u])}return n(t),e}function ln(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let u=e[0],i;if(typeof u!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=nl(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=u.indexOf(" ");s>0&&(n=u.slice(0,s),u=u.slice(s+1));let o,l=n?t.createElementNS(n,u):t.createElement(u),a=e[1],c=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){c=2;for(let f in a)if(a[f]!=null){let p=f.indexOf(" ");p>0?l.setAttributeNS(f.slice(0,p),f.slice(p+1),a[f]):f=="style"&&l.style?l.style.cssText=a[f]:l.setAttribute(f,a[f])}}for(let f=c;f<e.length;f++){let p=e[f];if(p===0){if(f<e.length-1||f>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:d}=ln(t,p,n,r);if(l.appendChild(h),d){if(o)throw new RangeError("Multiple content holes");o=d}}}return{dom:l,contentDOM:o}}const Zi=65535,Gi=Math.pow(2,16);function ul(t,e){return t+e*Gi}function xu(t){return t&Zi}function il(t){return(t-(t&Zi))/Gi}const Yi=1,Xi=2,an=4,Qi=8;class gr{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Qi)>0}get deletedBefore(){return(this.delInfo&(Yi|an))>0}get deletedAfter(){return(this.delInfo&(Xi|an))>0}get deletedAcross(){return(this.delInfo&an)>0}}class Q{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Q.empty)return Q.empty}recover(e){let n=0,r=xu(e);if(!this.inverted)for(let u=0;u<r;u++)n+=this.ranges[u*3+2]-this.ranges[u*3+1];return this.ranges[r*3]+n+il(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let u=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?u:0);if(l>e)break;let a=this.ranges[o+i],c=this.ranges[o+s],f=l+a;if(e<=f){let p=a?e==l?-1:e==f?1:n:n,h=l+u+(p<0?0:c);if(r)return h;let d=e==(n<0?l:f)?null:ul(o/3,e-l),m=e==l?Xi:e==f?Yi:an;return(n<0?e!=l:e!=f)&&(m|=Qi),new gr(h,m,d)}u+=c-a}return r?e+u:new gr(e+u,0,null)}touches(e,n){let r=0,u=xu(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?r:0);if(l>e)break;let a=this.ranges[o+i],c=l+a;if(e<=c&&o==u*3)return!0;r+=this.ranges[o+s]-a}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let u=0,i=0;u<this.ranges.length;u+=3){let s=this.ranges[u],o=s-(this.inverted?i:0),l=s+(this.inverted?0:i),a=this.ranges[u+n],c=this.ranges[u+r];e(o,o+a,l,l+c),i+=c-a}}invert(){return new Q(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Q.empty:new Q(e<0?[0,-e,0]:[0,0,e])}}Q.empty=new Q([]);class zt{constructor(e,n,r=0,u=e?e.length:0){this.mirror=n,this.from=r,this.to=u,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new zt(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let u=e.getMirror(n);this.appendMap(e._maps[n],u!=null&&u<n?r+u:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let u=e.getMirror(n);this.appendMap(e._maps[n].invert(),u!=null&&u>n?r-u-1:void 0)}}invert(){let e=new zt;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let u=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],o=s.mapResult(e,n);if(o.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(o.recover);continue}}u|=o.delInfo,e=o.pos}return r?e:new gr(e,u,null)}}const qn=Object.create(null);class j{getMap(){return Q.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=qn[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in qn)throw new RangeError("Duplicate use of step JSON ID "+e);return qn[e]=n,n.prototype.jsonID=e,n}}class B{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new B(e,null)}static fail(e){return new B(null,e)}static fromReplace(e,n,r,u){try{return B.ok(e.replace(n,r,u))}catch(i){if(i instanceof pn)return B.fail(i.message);throw i}}}function vr(t,e,n){let r=[];for(let u=0;u<t.childCount;u++){let i=t.child(u);i.content.size&&(i=i.copy(vr(i.content,e,i))),i.isInline&&(i=e(i,n,u)),r.push(i)}return x.fromArray(r)}class Be extends j{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),u=r.node(r.sharedDepth(this.to)),i=new C(vr(n.content,(s,o)=>!s.isAtom||!o.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),u),n.openStart,n.openEnd);return B.fromReplace(e,this.from,this.to,i)}invert(){return new me(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Be(n.pos,r.pos,this.mark)}merge(e){return e instanceof Be&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Be(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Be(n.from,n.to,e.markFromJSON(n.mark))}}j.jsonID("addMark",Be);class me extends j{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new C(vr(n.content,u=>u.mark(this.mark.removeFromSet(u.marks)),e),n.openStart,n.openEnd);return B.fromReplace(e,this.from,this.to,r)}invert(){return new Be(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new me(n.pos,r.pos,this.mark)}merge(e){return e instanceof me&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new me(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new me(n.from,n.to,e.markFromJSON(n.mark))}}j.jsonID("removeMark",me);class ve extends j{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return B.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return B.fromReplace(e,this.pos,this.pos+1,new C(x.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let u=0;u<n.marks.length;u++)if(!n.marks[u].isInSet(r))return new ve(this.pos,n.marks[u]);return new ve(this.pos,this.mark)}}return new tt(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ve(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ve(n.pos,e.markFromJSON(n.mark))}}j.jsonID("addNodeMark",ve);class tt extends j{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return B.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return B.fromReplace(e,this.pos,this.pos+1,new C(x.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ve(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new tt(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new tt(n.pos,e.markFromJSON(n.mark))}}j.jsonID("removeNodeMark",tt);class H extends j{constructor(e,n,r,u=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=u}apply(e){return this.structure&&br(e,this.from,this.to)?B.fail("Structure replace would overwrite content"):B.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Q([this.from,this.to-this.from,this.slice.size])}invert(e){return new H(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new H(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof H)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?C.empty:new C(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new H(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?C.empty:new C(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new H(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new H(n.from,n.to,C.fromJSON(e,n.slice),!!n.structure)}}j.jsonID("replace",H);class G extends j{constructor(e,n,r,u,i,s,o=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=u,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(br(e,this.from,this.gapFrom)||br(e,this.gapTo,this.to)))return B.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return B.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?B.fromReplace(e,this.from,this.to,r):B.fail("Content does not fit in gap")}getMap(){return new Q([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new G(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),u=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||u<n.pos||i>r.pos?null:new G(n.pos,r.pos,u,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new G(n.from,n.to,n.gapFrom,n.gapTo,C.fromJSON(e,n.slice),n.insert,!!n.structure)}}j.jsonID("replaceAround",G);function br(t,e,n){let r=t.resolve(e),u=n-e,i=r.depth;for(;u>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,u--;if(u>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;u>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,u--}}return!1}function sl(t,e,n,r){let u=[],i=[],s,o;t.doc.nodesBetween(e,n,(l,a,c)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&c.type.allowsMarkType(r.type)){let p=Math.max(a,e),h=Math.min(a+l.nodeSize,n),d=r.addToSet(f);for(let m=0;m<f.length;m++)f[m].isInSet(d)||(s&&s.to==p&&s.mark.eq(f[m])?s.to=h:u.push(s=new me(p,h,f[m])));o&&o.to==p?o.to=h:i.push(o=new Be(p,h,r))}}),u.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function ol(t,e,n,r){let u=[],i=0;t.doc.nodesBetween(e,n,(s,o)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof Mn){let a=s.marks,c;for(;c=r.isInSet(a);)(l||(l=[])).push(c),a=c.removeFromSet(a)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let a=Math.min(o+s.nodeSize,n);for(let c=0;c<l.length;c++){let f=l[c],p;for(let h=0;h<u.length;h++){let d=u[h];d.step==i-1&&f.eq(u[h].style)&&(p=d)}p?(p.to=a,p.step=i):u.push({style:f,from:Math.max(o,e),to:a,step:i})}}}),u.forEach(s=>t.step(new me(s.from,s.to,s.style)))}function zr(t,e,n,r=n.contentMatch,u=!0){let i=t.doc.nodeAt(e),s=[],o=e+1;for(let l=0;l<i.childCount;l++){let a=i.child(l),c=o+a.nodeSize,f=r.matchType(a.type);if(!f)s.push(new H(o,c,C.empty));else{r=f;for(let p=0;p<a.marks.length;p++)n.allowsMarkType(a.marks[p].type)||t.step(new me(o,c,a.marks[p]));if(u&&a.isText&&n.whitespace!="pre"){let p,h=/\r?\n|\r/g,d;for(;p=h.exec(a.text);)d||(d=new C(x.from(n.schema.text(" ",n.allowedMarks(a.marks))),0,0)),s.push(new H(o+p.index,o+p.index+p[0].length,d))}}o=c}if(!r.validEnd){let l=r.fillBefore(x.empty,!0);t.replace(o,o,new C(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function ll(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function jt(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let u=t.$from.node(r),i=t.$from.index(r),s=t.$to.indexAfter(r);if(r<t.depth&&u.canReplace(i,s,n))return r;if(r==0||u.type.spec.isolating||!ll(u,i,s))break}return null}function al(t,e,n){let{$from:r,$to:u,depth:i}=e,s=r.before(i+1),o=u.after(i+1),l=s,a=o,c=x.empty,f=0;for(let d=i,m=!1;d>n;d--)m||r.index(d)>0?(m=!0,c=x.from(r.node(d).copy(c)),f++):l--;let p=x.empty,h=0;for(let d=i,m=!1;d>n;d--)m||u.after(d+1)<u.end(d)?(m=!0,p=x.from(u.node(d).copy(p)),h++):a++;t.step(new G(l,a,s,o,new C(c.append(p),f,h),c.size-f,!0))}function es(t,e,n=null,r=t){let u=cl(t,e),i=u&&fl(r,e);return i?u.map(ku).concat({type:e,attrs:n}).concat(i.map(ku)):null}function ku(t){return{type:t,attrs:null}}function cl(t,e){let{parent:n,startIndex:r,endIndex:u}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,u,s)?i:null}function fl(t,e){let{parent:n,startIndex:r,endIndex:u}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let a=r;l&&a<u;a++)l=l.matchType(n.child(a).type);return!l||!l.validEnd?null:s}function dl(t,e,n){let r=x.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let o=n[s].type.contentMatch.matchFragment(r);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=x.from(n[s].type.create(n[s].attrs,r))}let u=e.start,i=e.end;t.step(new G(u,i,u,i,new C(r,0,0),n.length,!0))}function hl(t,e,n,r,u){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,o)=>{let l=typeof u=="function"?u(s):u;if(s.isTextblock&&!s.hasMarkup(r,l)&&pl(t.doc,t.mapping.slice(i).map(o),r)){let a=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",d=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!d?a=!1:!h&&d&&(a=!0)}a===!1&&ns(t,s,o,i),zr(t,t.mapping.slice(i).map(o,1),r,void 0,a===null);let c=t.mapping.slice(i),f=c.map(o,1),p=c.map(o+s.nodeSize,1);return t.step(new G(f,p,f+1,p-1,new C(x.from(r.create(l,null,s.marks)),0,0),1,!0)),a===!0&&ts(t,s,o,i),!1}})}function ts(t,e,n,r){e.forEach((u,i)=>{if(u.isText){let s,o=/\r?\n|\r/g;for(;s=o.exec(u.text);){let l=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function ns(t,e,n,r){e.forEach((u,i)=>{if(u.type==u.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
5
5
|
`))}})}function pl(t,e,n){let r=t.resolve(e),u=r.index();return r.parent.canReplaceWith(u,u+1,n)}function ml(t,e,n,r,u){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,u||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new G(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new C(x.from(s),0,0),1,!0))}function Ot(t,e,n=1,r){let u=t.resolve(e),i=u.depth-n,s=r&&r[r.length-1]||u.parent;if(i<0||u.parent.type.spec.isolating||!u.parent.canReplace(u.index(),u.parent.childCount)||!s.type.validContent(u.parent.content.cutByIndex(u.index(),u.parent.childCount)))return!1;for(let a=u.depth-1,c=n-2;a>i;a--,c--){let f=u.node(a),p=u.index(a);if(f.type.spec.isolating)return!1;let h=f.content.cutByIndex(p,f.childCount),d=r&&r[c+1];d&&(h=h.replaceChild(0,d.type.create(d.attrs)));let m=r&&r[c]||f;if(!f.canReplace(p+1,f.childCount)||!m.type.validContent(h))return!1}let o=u.indexAfter(i),l=r&&r[0];return u.node(i).canReplaceWith(o,o,l?l.type:u.node(i+1).type)}function gl(t,e,n=1,r){let u=t.doc.resolve(e),i=x.empty,s=x.empty;for(let o=u.depth,l=u.depth-n,a=n-1;o>l;o--,a--){i=x.from(u.node(o).copy(i));let c=r&&r[a];s=x.from(c?c.type.create(c.attrs,s):u.node(o).copy(s))}t.step(new H(e,e,new C(i.append(s),n,n),!0))}function Pr(t,e){let n=t.resolve(e),r=n.index();return xl(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function bl(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let u=0;u<e.childCount;u++){let i=e.child(u),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function xl(t,e){return!!(t&&e&&!t.isLeaf&&bl(t,e))}function kl(t,e,n){let r=null,{linebreakReplacement:u}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(u&&s.inlineContent){let c=s.whitespace=="pre",f=!!s.contentMatch.matchType(u);c&&!f?r=!1:!c&&f&&(r=!0)}let o=t.steps.length;if(r===!1){let c=t.doc.resolve(e+n);ns(t,c.node(),c.before(),o)}s.inlineContent&&zr(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(o),a=l.map(e-n);if(t.step(new H(a,l.map(e+n,-1),C.empty,!0)),r===!0){let c=t.doc.resolve(a);ts(t,c.node(),c.before(),t.steps.length)}return t}function yl(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let u=r.depth-1;u>=0;u--){let i=r.index(u);if(r.node(u).canReplaceWith(i,i,n))return r.before(u+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let u=r.depth-1;u>=0;u--){let i=r.indexAfter(u);if(r.node(u).canReplaceWith(i,i,n))return r.after(u+1);if(i<r.node(u).childCount)return null}return null}function Cl(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let u=n.content;for(let i=0;i<n.openStart;i++)u=u.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let o=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(o>0?1:0),a=r.node(s),c=!1;if(i==1)c=a.canReplace(l,l,u);else{let f=a.contentMatchAt(l).findWrapping(u.firstChild.type);c=f&&a.canReplaceWith(l,l,f[0])}if(c)return o==0?r.pos:o<0?r.before(s+1):r.after(s+1)}return null}function Lr(t,e,n=e,r=C.empty){if(e==n&&!r.size)return null;let u=t.resolve(e),i=t.resolve(n);return rs(u,i,r)?new H(e,n,r):new Dl(u,i,r).fit()}function rs(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Dl{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=x.empty;for(let u=0;u<=e.depth;u++){let i=e.node(u);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(u))})}for(let u=e.depth;u>0;u--)this.placed=x.from(e.node(u).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let a=this.findFittable();a?this.placeNodes(a):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,u=this.close(e<0?this.$to:r.doc.resolve(e));if(!u)return null;let i=this.placed,s=r.depth,o=u.depth;for(;s&&o&&i.childCount==1;)i=i.firstChild.content,s--,o--;let l=new C(i,s,o);return e>-1?new G(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new H(r.pos,u.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,u=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(u=0),i.type.spec.isolating&&u<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let u,i=null;r?(i=Vn(this.unplaced.content,r-1).firstChild,u=i.content):u=this.unplaced.content;let s=u.firstChild;for(let o=this.depth;o>=0;o--){let{type:l,match:a}=this.frontier[o],c,f=null;if(n==1&&(s?a.matchType(s.type)||(f=a.fillBefore(x.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:o,parent:i,inject:f};if(n==2&&s&&(c=a.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:o,parent:i,wrap:c};if(i&&a.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,u=Vn(e,n);return!u.childCount||u.firstChild.isLeaf?!1:(this.unplaced=new C(e,n+1,Math.max(r,u.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,u=Vn(e,n);if(u.childCount<=1&&n>0){let i=e.size-n<=n+u.size;this.unplaced=new C(St(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new C(St(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:u,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let m=0;m<i.length;m++)this.openFrontierNode(i[m]);let s=this.unplaced,o=r?r.content:s.content,l=s.openStart-e,a=0,c=[],{match:f,type:p}=this.frontier[n];if(u){for(let m=0;m<u.childCount;m++)c.push(u.child(m));f=f.matchFragment(u)}let h=o.size+e-(s.content.size-s.openEnd);for(;a<o.childCount;){let m=o.child(a),g=f.matchType(m.type);if(!g)break;a++,(a>1||l==0||m.content.size)&&(f=g,c.push(us(m.mark(p.allowedMarks(m.marks)),a==1?l:0,a==o.childCount?h:-1)))}let d=a==o.childCount;d||(h=-1),this.placed=At(this.placed,n,x.from(c)),this.frontier[n].match=f,d&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=o;m<h;m++){let b=g.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),g=b.content}this.unplaced=d?e==0?C.empty:new C(St(s.content,e-1,1),e-1,h<0?s.openEnd:e-1):new C(St(s.content,e,a),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!$n(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,u=this.$to.after(r);for(;r>1&&u==this.$to.end(--r);)++u;return u}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:u}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=$n(e,n,u,r,i);if(s){for(let o=n-1;o>=0;o--){let{match:l,type:a}=this.frontier[o],c=$n(e,o,a,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=At(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let u=e.node(r),i=u.type.contentMatch.fillBefore(u.content,!0,e.index(r));this.openFrontierNode(u.type,u.attrs,i)}return e}openFrontierNode(e,n=null,r){let u=this.frontier[this.depth];u.match=u.match.matchType(e),this.placed=At(this.placed,this.depth,x.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(x.empty,!0);n.childCount&&(this.placed=At(this.placed,this.frontier.length,n))}}function St(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(St(t.firstChild.content,e-1,n)))}function At(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(At(t.lastChild.content,e-1,n)))}function Vn(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function us(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,us(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(x.empty,!0)))),t.copy(r)}function $n(t,e,n,r,u){let i=t.node(e),s=u?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let o=r.fillBefore(i.content,!0,s);return o&&!_l(n,i.content,s)?o:null}function _l(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function El(t){return t.spec.defining||t.spec.definingForContent}function Sl(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let u=t.doc.resolve(e),i=t.doc.resolve(n);if(rs(u,i,r))return t.step(new H(e,n,r));let s=ss(u,t.doc.resolve(n));s[s.length-1]==0&&s.pop();let o=-(u.depth+1);s.unshift(o);for(let p=u.depth,h=u.pos-1;p>0;p--,h--){let d=u.node(p).type.spec;if(d.defining||d.definingAsContext||d.isolating)break;s.indexOf(p)>-1?o=p:u.before(p)==h&&s.splice(1,0,-p)}let l=s.indexOf(o),a=[],c=r.openStart;for(let p=r.content,h=0;;h++){let d=p.firstChild;if(a.push(d),h==r.openStart)break;p=d.content}for(let p=c-1;p>=0;p--){let h=a[p],d=El(h.type);if(d&&!h.sameMarkup(u.node(Math.abs(o)-1)))c=p;else if(d||!h.type.isTextblock)break}for(let p=r.openStart;p>=0;p--){let h=(p+c+1)%(r.openStart+1),d=a[h];if(d)for(let m=0;m<s.length;m++){let g=s[(m+l)%s.length],b=!0;g<0&&(b=!1,g=-g);let k=u.node(g-1),y=u.index(g-1);if(k.canReplaceWith(y,y,d.type,d.marks))return t.replace(u.before(g),b?i.after(g):n,new C(is(r.content,0,r.openStart,h),h,r.openEnd))}}let f=t.steps.length;for(let p=s.length-1;p>=0&&(t.replace(e,n,r),!(t.steps.length>f));p--){let h=s[p];h<0||(e=u.before(h),n=i.after(h))}}function is(t,e,n,r,u){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(is(i.content,e+1,n,r,i)))}if(e>r){let i=u.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(x.empty,!0))}return t}function Al(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let u=yl(t.doc,e,r.type);u!=null&&(e=n=u)}t.replaceRange(e,n,new C(x.from(r),0,0))}function Ml(t,e,n){let r=t.doc.resolve(e),u=t.doc.resolve(n),i=ss(r,u);for(let s=0;s<i.length;s++){let o=i[s],l=s==i.length-1;if(l&&o==0||r.node(o).type.contentMatch.validEnd)return t.delete(r.start(o),u.end(o));if(o>0&&(l||r.node(o-1).canReplace(r.index(o-1),u.indexAfter(o-1))))return t.delete(r.before(o),u.after(o))}for(let s=1;s<=r.depth&&s<=u.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&u.end(s)-n!=u.depth-s&&r.start(s-1)==u.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),u.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function ss(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let u=r;u>=0;u--){let i=t.start(u);if(i<t.pos-(t.depth-u)||e.end(u)>e.pos+(e.depth-u)||t.node(u).type.spec.isolating||e.node(u).type.spec.isolating)break;(i==e.start(u)||u==t.depth&&u==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&u&&e.start(u-1)==i-1)&&n.push(u)}return n}class at extends j{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return B.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let u=n.type.create(r,null,n.marks);return B.fromReplace(e,this.pos,this.pos+1,new C(x.from(u),0,n.isLeaf?0:1))}getMap(){return Q.empty}invert(e){return new at(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new at(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new at(n.pos,n.attr,n.value)}}j.jsonID("attr",at);class Pt extends j{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let u in e.attrs)n[u]=e.attrs[u];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return B.ok(r)}getMap(){return Q.empty}invert(e){return new Pt(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Pt(n.attr,n.value)}}j.jsonID("docAttr",Pt);let dt=class extends Error{};dt=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};dt.prototype=Object.create(Error.prototype);dt.prototype.constructor=dt;dt.prototype.name="TransformError";class wl{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new zt}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new dt(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=C.empty){let u=Lr(this.doc,e,n,r);return u&&this.step(u),this}replaceWith(e,n,r){return this.replace(e,n,new C(x.from(r),0,0))}delete(e,n){return this.replace(e,n,C.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return Sl(this,e,n,r),this}replaceRangeWith(e,n,r){return Al(this,e,n,r),this}deleteRange(e,n){return Ml(this,e,n),this}lift(e,n){return al(this,e,n),this}join(e,n=1){return kl(this,e,n),this}wrap(e,n){return dl(this,e,n),this}setBlockType(e,n=e,r,u=null){return hl(this,e,n,r,u),this}setNodeMarkup(e,n,r=null,u){return ml(this,e,n,r,u),this}setNodeAttribute(e,n,r){return this.step(new at(e,n,r)),this}setDocAttribute(e,n){return this.step(new Pt(e,n)),this}addNodeMark(e,n){return this.step(new ve(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof w)n.isInSet(r.marks)&&this.step(new tt(e,n));else{let u=r.marks,i,s=[];for(;i=n.isInSet(u);)s.push(new tt(e,i)),u=i.removeFromSet(u);for(let o=s.length-1;o>=0;o--)this.step(s[o])}return this}split(e,n=1,r){return gl(this,e,n,r),this}addMark(e,n,r){return sl(this,e,n,r),this}removeMark(e,n,r){return ol(this,e,n,r),this}clearIncompatible(e,n,r){return zr(this,e,n,r),this}}const Wn=Object.create(null);class F{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new Tl(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=C.empty){let r=n.content.lastChild,u=null;for(let o=0;o<n.openEnd;o++)u=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:l,$to:a}=s[o],c=e.mapping.slice(i);e.replaceRange(c.map(l.pos),c.map(a.pos),o?C.empty:n),o==0&&Du(e,i,(r?r.isInline:u&&u.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,u=this.ranges;for(let i=0;i<u.length;i++){let{$from:s,$to:o}=u[i],l=e.mapping.slice(r),a=l.map(s.pos),c=l.map(o.pos);i?e.deleteRange(a,c):(e.replaceRangeWith(a,c,n),Du(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let u=e.parent.inlineContent?new N(e):ot(e.node(0),e.parent,e.pos,e.index(),n,r);if(u)return u;for(let i=e.depth-1;i>=0;i--){let s=n<0?ot(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):ot(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new ee(e.node(0))}static atStart(e){return ot(e,e,0,0,1)||new ee(e)}static atEnd(e){return ot(e,e,e.content.size,e.childCount,-1)||new ee(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Wn[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Wn)throw new RangeError("Duplicate use of selection JSON ID "+e);return Wn[e]=n,n.prototype.jsonID=e,n}getBookmark(){return N.between(this.$anchor,this.$head).getBookmark()}}F.prototype.visible=!0;class Tl{constructor(e,n){this.$from=e,this.$to=n}}let yu=!1;function Cu(t){!yu&&!t.parent.inlineContent&&(yu=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class N extends F{constructor(e,n=e){Cu(e),Cu(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return F.near(r);let u=e.resolve(n.map(this.anchor));return new N(u.parent.inlineContent?u:r,r)}replace(e,n=C.empty){if(super.replace(e,n),n==C.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof N&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new wn(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new N(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let u=e.resolve(n);return new this(u,r==n?u:e.resolve(r))}static between(e,n,r){let u=e.pos-n.pos;if((!r||u)&&(r=u>=0?1:-1),!n.parent.inlineContent){let i=F.findFrom(n,r,!0)||F.findFrom(n,-r,!0);if(i)n=i.$head;else return F.near(n,r)}return e.parent.inlineContent||(u==0?e=n:(e=(F.findFrom(e,-r,!0)||F.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=u<0&&(e=n))),new N(e,n)}}F.jsonID("text",N);class wn{constructor(e,n){this.anchor=e,this.head=n}map(e){return new wn(e.map(this.anchor),e.map(this.head))}resolve(e){return N.between(e.resolve(this.anchor),e.resolve(this.head))}}class M extends F{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:u}=n.mapResult(this.anchor),i=e.resolve(u);return r?F.near(i):new M(i)}content(){return new C(x.from(this.node),0,0)}eq(e){return e instanceof M&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new qr(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new M(e.resolve(n.anchor))}static create(e,n){return new M(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}M.prototype.visible=!1;F.jsonID("node",M);class qr{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new wn(r,r):new qr(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&M.isSelectable(r)?new M(n):F.near(n)}}class ee extends F{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=C.empty){if(n==C.empty){e.delete(0,e.doc.content.size);let r=F.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new ee(e)}map(e){return new ee(e)}eq(e){return e instanceof ee}getBookmark(){return Ol}}F.jsonID("all",ee);const Ol={map(){return this},resolve(t){return new ee(t)}};function ot(t,e,n,r,u,i=!1){if(e.inlineContent)return N.create(t,n);for(let s=r-(u>0?0:1);u>0?s<e.childCount:s>=0;s+=u){let o=e.child(s);if(o.isAtom){if(!i&&M.isSelectable(o))return M.create(t,n-(u<0?o.nodeSize:0))}else{let l=ot(t,o,n+u,u<0?o.childCount:0,u,i);if(l)return l}n+=o.nodeSize*u}return null}function Du(t,e,n){let r=t.steps.length-1;if(r<e)return;let u=t.steps[r];if(!(u instanceof H||u instanceof G))return;let i=t.mapping.maps[r],s;i.forEach((o,l,a,c)=>{s==null&&(s=c)}),t.setSelection(F.near(t.doc.resolve(s),n))}const _u=1,rn=2,Eu=4;class Fl extends wl{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|_u)&~rn,this.storedMarks=null,this}get selectionSet(){return(this.updated&_u)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=rn,this}ensureMarks(e){return w.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&rn)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~rn,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||w.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let u=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(u.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,u.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(F.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Eu,this}get scrolledIntoView(){return(this.updated&Eu)>0}}function Su(t,e){return!e||!t?t:t.bind(e)}class Mt{constructor(e,n,r){this.name=e,this.init=Su(n.init,r),this.apply=Su(n.apply,r)}}const Nl=[new Mt("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Mt("selection",{init(t,e){return t.selection||F.atStart(e.doc)},apply(t){return t.selection}}),new Mt("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Mt("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Hn{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Nl.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Mt(r.key,r.spec.state,r))})}}class je{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let u=this.config.plugins[r];if(u.spec.filterTransaction&&!u.spec.filterTransaction.call(u,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),u=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let l=u?u[s].n:0,a=u?u[s].state:this,c=l<n.length&&o.spec.appendTransaction.call(o,l?n.slice(l):n,a,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!u){u=[];for(let f=0;f<this.config.plugins.length;f++)u.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),i=!0}u&&(u[s]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new je(this.config),r=this.config.fields;for(let u=0;u<r.length;u++){let i=r[u];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new Fl(this)}static create(e){let n=new Hn(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new je(n);for(let u=0;u<n.fields.length;u++)r[n.fields[u].name]=n.fields[u].init(e,r);return r}reconfigure(e){let n=new Hn(this.schema,e.plugins),r=n.fields,u=new je(n);for(let i=0;i<r.length;i++){let s=r[i].name;u[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,u)}return u}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let u=e[r],i=u.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(u,this[u.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let u=new Hn(e.schema,e.plugins),i=new je(u);return u.fields.forEach(s=>{if(s.name=="doc")i.doc=xe.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=F.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let o in r){let l=r[o],a=l.spec.state;if(l.key==s.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(n,o)){i[s.name]=a.fromJSON.call(l,e,n[o],i);return}}i[s.name]=s.init(e,i)}}),i}}function ls(t,e,n){for(let r in t){let u=t[r];u instanceof Function?u=u.bind(e):r=="handleDOMEvents"&&(u=ls(u,e,{})),n[r]=u}return n}class Vr{constructor(e){this.spec=e,this.props={},e.props&&ls(e.props,this,this.props),this.key=e.key?e.key.key:as("plugin")}getState(e){return e[this.key]}}const Jn=Object.create(null);function as(t){return t in Jn?t+"$"+ ++Jn[t]:(Jn[t]=0,t+"$")}class cs{constructor(e="key"){this.key=as(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const fs=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Il(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Rl=(t,e,n)=>{let r=Il(t,n);if(!r)return!1;let u=ds(r);if(!u){let s=r.blockRange(),o=s&&jt(s);return o==null?!1:(e&&e(t.tr.lift(s,o).scrollIntoView()),!0)}let i=u.nodeBefore;if(ps(t,u,e,-1))return!0;if(r.parent.content.size==0&&(ht(i,"end")||M.isSelectable(i)))for(let s=r.depth;;s--){let o=Lr(t.doc,r.before(s),r.after(s),C.empty);if(o&&o.slice.size<o.to-o.from){if(e){let l=t.tr.step(o);l.setSelection(ht(i,"end")?F.findFrom(l.doc.resolve(l.mapping.map(u.pos,-1)),-1):M.create(l.doc,u.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return i.isAtom&&u.depth==r.depth-1?(e&&e(t.tr.delete(u.pos-i.nodeSize,u.pos).scrollIntoView()),!0):!1};function ht(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Bl=(t,e,n)=>{let{$head:r,empty:u}=t.selection,i=r;if(!u)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=ds(r)}let s=i&&i.nodeBefore;return!s||!M.isSelectable(s)?!1:(e&&e(t.tr.setSelection(M.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function ds(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function vl(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const zl=(t,e,n)=>{let r=vl(t,n);if(!r)return!1;let u=hs(r);if(!u)return!1;let i=u.nodeAfter;if(ps(t,u,e,1))return!0;if(r.parent.content.size==0&&(ht(i,"start")||M.isSelectable(i))){let s=Lr(t.doc,r.before(),r.after(),C.empty);if(s&&s.slice.size<s.to-s.from){if(e){let o=t.tr.step(s);o.setSelection(ht(i,"start")?F.findFrom(o.doc.resolve(o.mapping.map(u.pos)),1):M.create(o.doc,o.mapping.map(u.pos))),e(o.scrollIntoView())}return!0}}return i.isAtom&&u.depth==r.depth-1?(e&&e(t.tr.delete(u.pos,u.pos+i.nodeSize).scrollIntoView()),!0):!1},Pl=(t,e,n)=>{let{$head:r,empty:u}=t.selection,i=r;if(!u)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=hs(r)}let s=i&&i.nodeAfter;return!s||!M.isSelectable(s)?!1:(e&&e(t.tr.setSelection(M.create(t.doc,i.pos)).scrollIntoView()),!0)};function hs(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const Ll=(t,e)=>{let{$from:n,$to:r}=t.selection,u=n.blockRange(r),i=u&&jt(u);return i==null?!1:(e&&e(t.tr.lift(u,i).scrollIntoView()),!0)},ql=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
6
|
-
`).scrollIntoView()),!0)};function $r(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Vl=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let u=n.node(-1),i=n.indexAfter(-1),s=$r(u.contentMatchAt(i));if(!s||!u.canReplaceWith(i,i,s))return!1;if(e){let o=n.after(),l=t.tr.replaceWith(o,o,s.createAndFill());l.setSelection(F.near(l.doc.resolve(o),1)),e(l.scrollIntoView())}return!0},$l=(t,e)=>{let n=t.selection,{$from:r,$to:u}=n;if(n instanceof ee||r.parent.inlineContent||u.parent.inlineContent)return!1;let i=$r(u.parent.contentMatchAt(u.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&u.index()<u.parent.childCount?r:u).pos,o=t.tr.insert(s,i.createAndFill());o.setSelection(N.create(o.doc,s+1)),e(o.scrollIntoView())}return!0},Wl=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Ot(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),u=r&&jt(r);return u==null?!1:(e&&e(t.tr.lift(r,u).scrollIntoView()),!0)};function Hl(t){return(e,n)=>{let{$from:r,$to:u}=e.selection;if(e.selection instanceof M&&e.selection.node.isBlock)return!r.parentOffset||!Ot(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,o,l=!1,a=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){l=r.end(h)==r.pos+(r.depth-h),a=r.start(h)==r.pos-(r.depth-h),o=$r(r.node(h-1).contentMatchAt(r.indexAfter(h-1))),i.unshift(l&&o?{type:o}:null),s=h;break}else{if(h==1)return!1;i.unshift(null)}let c=e.tr;(e.selection instanceof N||e.selection instanceof ee)&&c.deleteSelection();let f=c.mapping.map(r.pos),p=Ot(c.doc,f,i.length,i);if(p||(i[0]=o?{type:o}:null,p=Ot(c.doc,f,i.length,i)),!p)return!1;if(c.split(f,i.length,i),!l&&a&&r.node(s).type!=o){let h=c.mapping.map(r.before(s)),d=c.doc.resolve(h);o&&r.node(s-1).canReplaceWith(d.index(),d.index()+1,o)&&c.setNodeMarkup(c.mapping.map(r.before(s)),o)}return n&&n(c.scrollIntoView()),!0}}const Jl=Hl(),jl=(t,e)=>(e&&e(t.tr.setSelection(new ee(t.doc))),!0);function Ul(t,e,n){let r=e.nodeBefore,u=e.nodeAfter,i=e.index();return!r||!u||!r.type.compatibleContent(u.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(u.isTextblock||Pr(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function ps(t,e,n,r){let u=e.nodeBefore,i=e.nodeAfter,s,o,l=u.type.spec.isolating||i.type.spec.isolating;if(!l&&Ul(t,e,n))return!0;let a=!l&&e.parent.canReplace(e.index(),e.index()+1);if(a&&(s=(o=u.contentMatchAt(u.childCount)).findWrapping(i.type))&&o.matchType(s[0]||i.type).validEnd){if(n){let h=e.pos+i.nodeSize,d=x.empty;for(let b=s.length-1;b>=0;b--)d=x.from(s[b].create(null,d));d=x.from(u.copy(d));let m=t.tr.step(new G(e.pos-1,h,e.pos,h,new C(d,1,0),s.length,!0)),g=m.doc.resolve(h+2*s.length);g.nodeAfter&&g.nodeAfter.type==u.type&&Pr(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let c=i.type.spec.isolating||r>0&&l?null:F.findFrom(e,1),f=c&&c.$from.blockRange(c.$to),p=f&&jt(f);if(p!=null&&p>=e.depth)return n&&n(t.tr.lift(f,p).scrollIntoView()),!0;if(a&&ht(i,"start",!0)&&ht(u,"end")){let h=u,d=[];for(;d.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let b=x.empty;for(let y=d.length-1;y>=0;y--)b=x.from(d[y].copy(b));let k=t.tr.step(new G(e.pos-d.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new C(b,d.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function ms(t){return function(e,n){let r=e.selection,u=t<0?r.$from:r.$to,i=u.depth;for(;u.node(i).isInline;){if(!i)return!1;i--}return u.node(i).isTextblock?(n&&n(e.tr.setSelection(N.create(e.doc,t<0?u.start(i):u.end(i)))),!0):!1}}const Kl=ms(-1),Zl=ms(1);function Gl(t,e=null){return function(n,r){let{$from:u,$to:i}=n.selection,s=u.blockRange(i),o=s&&es(s,t,e);return o?(r&&r(n.tr.wrap(s,o).scrollIntoView()),!0):!1}}function xr(t,e=null){return function(n,r){let u=!1;for(let i=0;i<n.selection.ranges.length&&!u;i++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[i];n.doc.nodesBetween(s,o,(l,a)=>{if(u)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)u=!0;else{let c=n.doc.resolve(a),f=c.index();u=c.parent.canReplaceWith(f,f+1,t)}})}if(!u)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:o},$to:{pos:l}}=n.selection.ranges[s];i.setBlockType(o,l,t,e)}r(i.scrollIntoView())}return!0}}function Yl(t,e,n,r){for(let u=0;u<e.length;u++){let{$from:i,$to:s}=e[u],o=i.depth==0?t.inlineContent&&t.type.allowsMarkType(n):!1;if(t.nodesBetween(i.pos,s.pos,(l,a)=>{if(o)return!1;o=l.inlineContent&&l.type.allowsMarkType(n)}),o)return!0}return!1}function cn(t,e=null,n){return function(r,u){let{empty:i,$cursor:s,ranges:o}=r.selection;if(i&&!s||!Yl(r.doc,o,t))return!1;if(u)if(s)t.isInSet(r.storedMarks||s.marks())?u(r.tr.removeStoredMark(t)):u(r.tr.addStoredMark(t.create(e)));else{let l,a=r.tr;l=!o.some(c=>r.doc.rangeHasMark(c.$from.pos,c.$to.pos,t));for(let c=0;c<o.length;c++){let{$from:f,$to:p}=o[c];if(!l)a.removeMark(f.pos,p.pos,t);else{let h=f.pos,d=p.pos,m=f.nodeAfter,g=p.nodeBefore,b=m&&m.isText?/^\s*/.exec(m.text)[0].length:0,k=g&&g.isText?/\s*$/.exec(g.text)[0].length:0;h+b<d&&(h+=b,d-=k),a.addMark(h,d,t.create(e))}}u(a.scrollIntoView())}return!0}}function Wr(...t){return function(e,n,r){for(let u=0;u<t.length;u++)if(t[u](e,n,r))return!0;return!1}}let jn=Wr(fs,Rl,Bl),Au=Wr(fs,zl,Pl);const Se={Enter:Wr(ql,$l,Wl,Jl),"Mod-Enter":Vl,Backspace:jn,"Mod-Backspace":jn,"Shift-Backspace":jn,Delete:Au,"Mod-Delete":Au,"Mod-a":jl},gs={"Ctrl-h":Se.Backspace,"Alt-Backspace":Se["Mod-Backspace"],"Ctrl-d":Se.Delete,"Ctrl-Alt-Backspace":Se["Mod-Delete"],"Alt-Delete":Se["Mod-Delete"],"Alt-d":Se["Mod-Delete"],"Ctrl-a":Kl,"Ctrl-e":Zl};for(let t in Se)gs[t]=Se[t];const Xl=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,Ql=Xl?gs:Se;function bs(t,e){return xs(t,e)!=null}function xs(t,e){const{from:n,$from:r,to:u,empty:i}=t.selection;if(!e)return null;if(i){if(t.storedMarks){const c=t.storedMarks.find(f=>f.type.name===e.name);if(c!=null)return c}const l=r.marks().find(c=>c.type.name===e.name);if(l!=null)return l;const a=r.nodeAfter;if(a&&a.marks){const c=a.marks.find(f=>f.type.name===e.name);if(c!=null)return c}return null}let s=null;return t.doc.nodesBetween(n,u,o=>{if(s!=null)return!1;if(o.marks){const l=o.marks.find(a=>a.type.name===e.name);if(l!=null)return s=l,!1}}),s}function fn(t,e,n){return t.map(()=>{const r=e.value,u=r.state.schema.marks[n];return bs(r.state,u)})}function ea(t,e,n){const{$from:r}=t.selection;for(let i=r.depth;i>0;i--){const s=r.node(i);if(s.type.name===e.name)return n!=null?Object.keys(n).every(o=>s.attrs[o]===n[o]):!0}const u=t.doc.nodeAt(r.pos);return u&&u.type.name===e.name?n!=null?Object.keys(n).every(i=>u.attrs[i]===n[i]):!0:!1}function Dt(t,e,n,r){return t.map(()=>{const u=e.value,i=u.state.schema.nodes[n];return i?ea(u.state,i,r):!1})}function he({active:t,display:e,onClick:n,disabled:r,label:u,icon:i,size:s}){return A.When(e,()=>It.ToolbarButton({onClick:n,disabled:r,variant:t.map(o=>o?"filled":"light"),size:s},A.attr.title(u),Rr.Icon({icon:i,size:s})))}function ta(t,e){const n=t.state.schema.marks.link;if(n==null)return;const{from:r,to:u}=t.state.selection,i=t.state.tr.addMark(r,u,n.create({href:e,title:null}));t.dispatch(i),t.focus()}function ks(t){const{state:e}=t,{$from:n,$to:r}=e.selection;if(!ys(e))return null;let u=n.pos,i=r.pos;const s=e.doc;for(;u>0&&s.resolve(u-1).nodeAfter?.marks?.some(a=>a.type.name==="link");)u--;for(;i<s.content.size&&s.resolve(i).nodeAfter?.marks?.some(a=>a.type.name==="link");)i++;return{start:u,end:i}}function na(t,e){const n=t.state.schema.marks.link;if(n==null)return;const r=ks(t);if(r==null)return;const{start:u,end:i}=r,s=t.state.tr.removeMark(u,i,n).addMark(u,i,n.create({href:e,title:null}));t.dispatch(s)}function ra(t){const e=t.state.schema.marks.link;if(e==null)return;const n=ks(t);if(n==null)return;const{start:r,end:u}=n,i=t.state.tr.removeMark(r,u,e);t.dispatch(i),t.focus()}function ys(t){return bs(t,t.schema.marks.link)}function ua({stateUpdate:t,view:e,isReadOnly:n,label:r,linkUrlPlaceholder:u,size:i}){const s=A.prop(null);s.on(l=>{l!=null&&na(e.value,l)});const o=t.on(()=>{const l=xs(e.value.state,e.value.state.schema.marks.link);l!=null?s.set(l.attrs.href??""):s.set(null)});return A.Fragment(A.OnDispose(o),It.ToolbarGroup(he({display:A.signal(!0),active:fn(t,e,"link"),disabled:n,label:r,icon:"mdi:link-variant",size:i,onClick:()=>{const l=e.value.state;if(ys(l))ra(e.value),s.set(null);else{const a="";ta(e.value,a),s.set(a)}}}),A.Ensure(s,l=>Rr.TextInput({value:l,autofocus:!0,onInput:s.set,placeholder:u,size:i}))),A.Ensure(s,l=>It.ToolbarButton({disabled:l.map(a=>a.trim()===""),variant:"text",onClick:()=>{const a=s.value;a&&window.open(a,"_blank")},size:i},"go")))}function un({display:t},...e){return A.When(A.computedOf(...t)((...n)=>n.some(Boolean)),()=>It.ToolbarGroup(...e))}function Cs({view:t,stateUpdate:e,features:n,readOnly:r=A.signal(!1),size:u="sm"}){return A.Ensure(t,i=>A.Use(Rr.BeatUII18n,s=>{const o=s.$.prosemirror,l=i;return It.Toolbar(un({display:[n.$.bold,n.$.italic,n.$.code]},he({active:fn(e,l,"strong"),display:n.$.bold,onClick:()=>Un(l.value,"strong"),disabled:r,label:o.$.bold,icon:"mdi:format-bold",size:u}),he({active:fn(e,l,"em"),display:n.$.italic,onClick:()=>Un(l.value,"em"),disabled:r,label:o.$.italic,icon:"mdi:format-italic",size:u}),he({active:fn(e,l,"code"),display:n.$.code,onClick:()=>Un(l.value,"code"),disabled:r,label:o.$.code,icon:"mdi:code-tags",size:u})),un({display:[n.$.headings]},A.Repeat(n.$.headerLevels.map(a=>Math.min(Math.max(a,1),6)),({counter:a})=>he({active:Dt(e,l,"heading",{level:a}),display:n.$.headings,onClick:()=>ia(l.value,a),disabled:r,label:o.map(c=>c.heading(a)),icon:`mdi:format-header-${a}`,size:u}))),un({display:[n.$.bulletList,n.$.orderedList]},he({active:Dt(e,l,"bullet_list"),display:n.$.bulletList,onClick:()=>Mu(l.value,"bullet_list"),disabled:r,label:o.$.bulletList,icon:"mdi:format-list-bulleted",size:u}),he({active:Dt(e,l,"ordered_list"),display:n.$.orderedList,onClick:()=>Mu(l.value,"ordered_list"),disabled:r,label:o.$.orderedList,icon:"mdi:format-list-numbered",size:u})),un({display:[n.$.blockquote,n.$.codeBlock,n.$.horizontalRule]},he({active:Dt(e,l,"blockquote"),display:n.$.blockquote,onClick:()=>sa(l.value),disabled:r,label:o.$.blockquote,icon:"mdi:format-quote-close",size:u}),he({active:Dt(e,l,"code_block"),display:n.$.codeBlock,onClick:()=>oa(l.value),disabled:r,label:o.$.codeBlock,icon:"mdi:code-braces",size:u}),he({active:A.signal(!1),display:n.$.horizontalRule,onClick:()=>la(l.value),disabled:r,label:o.$.horizontalRule,icon:"mdi:minus",size:u})),A.When(n.$.links,()=>ua({stateUpdate:e,view:l,isReadOnly:r,label:o.$.link,linkUrlPlaceholder:o.$.linkUrlPlaceholder,size:u})))}))}function Un(t,e){const n=t.state.schema.marks[e];n!=null&&(cn(n)(t.state,t.dispatch),t.focus())}function ia(t,e){const n=t.state.schema.nodes.heading;n!=null&&(xr(n,{level:e})(t.state,t.dispatch),t.focus())}async function Mu(t,e){const{wrapInList:n,liftListItem:r}=await Promise.resolve().then(()=>require("./index-J7CsYy0-.cjs")),u=t.state.schema.nodes[e],i=t.state.schema.nodes.list_item;if(u==null||i==null)return;const{state:s}=t,{$from:o}=s.selection;let l=null;for(let a=o.depth;a>0;a--){const c=o.node(a);if(c.type.name==="bullet_list"||c.type.name==="ordered_list"){l=c.type.name;break}}l===e?r(i)(s,t.dispatch):l!=null?r(i)(t.state,t.dispatch)&&n(u)(t.state,t.dispatch):n(u)(s,t.dispatch),t.focus()}function sa(t){const e=t.state.schema.nodes.blockquote;if(e==null)return;const{state:n}=t,{$from:r}=n.selection;let u=!1;for(let i=r.depth;i>0;i--)if(r.node(i).type.name==="blockquote"){u=!0;break}u?Ll(n,t.dispatch):Gl(e)(n,t.dispatch),t.focus()}function oa(t){const e=t.state.schema.nodes.code_block,n=t.state.schema.nodes.paragraph;if(e==null||n==null)return;const{state:r}=t,{$from:u}=r.selection;let i=!1;for(let s=u.depth;s>0;s--)if(u.node(s).type.name==="code_block"){i=!0;break}i?xr(n)(r,t.dispatch):xr(e)(r,t.dispatch),t.focus()}function la(t){const e=t.state.schema.nodes.horizontal_rule;if(e!=null){const n=t.state.tr.replaceSelectionWith(e.create());t.dispatch(n),t.focus()}}const V=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},pt=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let kr=null;const Ee=function(t,e,n){let r=kr||(kr=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},aa=function(){kr=null},nt=function(t,e,n,r){return n&&(wu(t,e,n,r,-1)||wu(t,e,n,r,1))},ca=/^(img|br|input|textarea|hr)$/i;function wu(t,e,n,r,u){for(var i;;){if(t==n&&e==r)return!0;if(e==(u<0?0:re(t))){let s=t.parentNode;if(!s||s.nodeType!=1||Ut(t)||ca.test(t.nodeName)||t.contentEditable=="false")return!1;e=V(t)+(u<0?0:1),t=s}else if(t.nodeType==1){let s=t.childNodes[e+(u<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=u;else return!1;else t=s,e=u<0?re(t):0}else return!1}}function re(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function fa(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=re(t)}else if(t.parentNode&&!Ut(t))e=V(t),t=t.parentNode;else return null}}function da(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Ut(t))e=V(t)+1,t=t.parentNode;else return null}}function ha(t,e,n){for(let r=e==0,u=e==re(t);r||u;){if(t==n)return!0;let i=V(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,u=u&&i==re(t)}}function Ut(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Tn=function(t){return t.focusNode&&nt(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Je(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function pa(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function ma(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(re(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(re(r.startContainer),r.startOffset)}}}const ke=typeof navigator<"u"?navigator:null,Tu=typeof document<"u"?document:null,He=ke&&ke.userAgent||"",yr=/Edge\/(\d+)/.exec(He),Ds=/MSIE \d/.exec(He),Cr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(He),Y=!!(Ds||Cr||yr),Le=Ds?document.documentMode:Cr?+Cr[1]:yr?+yr[1]:0,ue=!Y&&/gecko\/(\d+)/i.test(He);ue&&+(/Firefox\/(\d+)/.exec(He)||[0,0])[1];const Dr=!Y&&/Chrome\/(\d+)/.exec(He),J=!!Dr,_s=Dr?+Dr[1]:0,U=!Y&&!!ke&&/Apple Computer/.test(ke.vendor),mt=U&&(/Mobile\/\w+/.test(He)||!!ke&&ke.maxTouchPoints>2),ne=mt||(ke?/Mac/.test(ke.platform):!1),ga=ke?/Win/.test(ke.platform):!1,Ae=/Android \d/.test(He),Kt=!!Tu&&"webkitFontSmoothing"in Tu.documentElement.style,ba=Kt?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function xa(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function _e(t,e){return typeof t=="number"?t:t[e]}function ka(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Ou(t,e,n){let r=t.someProp("scrollThreshold")||0,u=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=pt(s);continue}let o=s,l=o==i.body,a=l?xa(i):ka(o),c=0,f=0;if(e.top<a.top+_e(r,"top")?f=-(a.top-e.top+_e(u,"top")):e.bottom>a.bottom-_e(r,"bottom")&&(f=e.bottom-e.top>a.bottom-a.top?e.top+_e(u,"top")-a.top:e.bottom-a.bottom+_e(u,"bottom")),e.left<a.left+_e(r,"left")?c=-(a.left-e.left+_e(u,"left")):e.right>a.right-_e(r,"right")&&(c=e.right-a.right+_e(u,"right")),c||f)if(l)i.defaultView.scrollBy(c,f);else{let h=o.scrollLeft,d=o.scrollTop;f&&(o.scrollTop+=f),c&&(o.scrollLeft+=c);let m=o.scrollLeft-h,g=o.scrollTop-d;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}let p=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(p))break;s=p=="absolute"?s.offsetParent:pt(s)}}function ya(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,u;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let o=t.root.elementFromPoint(i,s);if(!o||o==t.dom||!t.dom.contains(o))continue;let l=o.getBoundingClientRect();if(l.top>=n-20){r=o,u=l.top;break}}return{refDOM:r,refTop:u,stack:Es(t.dom)}}function Es(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=pt(r));return e}function Ca({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Ss(n,r==0?0:r-e)}function Ss(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:u,left:i}=t[n];r.scrollTop!=u+e&&(r.scrollTop=u+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let ut=null;function Da(t){if(t.setActive)return t.setActive();if(ut)return t.focus(ut);let e=Es(t);t.focus(ut==null?{get preventScroll(){return ut={preventScroll:!0},!0}}:void 0),ut||(ut=!1,Ss(e,0))}function As(t,e){let n,r=2e8,u,i=0,s=e.top,o=e.top,l,a;for(let c=t.firstChild,f=0;c;c=c.nextSibling,f++){let p;if(c.nodeType==1)p=c.getClientRects();else if(c.nodeType==3)p=Ee(c).getClientRects();else continue;for(let h=0;h<p.length;h++){let d=p[h];if(d.top<=s&&d.bottom>=o){s=Math.max(d.bottom,s),o=Math.min(d.top,o);let m=d.left>e.left?d.left-e.left:d.right<e.left?e.left-d.right:0;if(m<r){n=c,r=m,u=m&&n.nodeType==3?{left:d.right<e.left?d.right:d.left,top:e.top}:e,c.nodeType==1&&m&&(i=f+(e.left>=(d.left+d.right)/2?1:0));continue}}else d.top>e.top&&!l&&d.left<=e.left&&d.right>=e.left&&(l=c,a={left:Math.max(d.left,Math.min(d.right,e.left)),top:d.top});!n&&(e.left>=d.right&&e.top>=d.top||e.left>=d.left&&e.top>=d.bottom)&&(i=f+1)}}return!n&&l&&(n=l,u=a,r=0),n&&n.nodeType==3?_a(n,u):!n||r&&n.nodeType==1?{node:t,offset:i}:As(n,u)}function _a(t,e){let n=t.nodeValue.length,r=document.createRange();for(let u=0;u<n;u++){r.setEnd(t,u+1),r.setStart(t,u);let i=Te(r,1);if(i.top!=i.bottom&&Hr(e,i))return{node:t,offset:u+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function Hr(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Ea(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Sa(t,e,n){let{node:r,offset:u}=As(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,u,i)}function Aa(t,e,n,r){let u=-1;for(let i=e,s=!1;i!=t.dom;){let o=t.docView.nearestDesc(i,!0),l;if(!o)return null;if(o.dom.nodeType==1&&(o.node.isBlock&&o.parent||!o.contentDOM)&&((l=o.dom.getBoundingClientRect()).width||l.height)&&(o.node.isBlock&&o.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(o.dom.nodeName)&&(!s&&l.left>r.left||l.top>r.top?u=o.posBefore:(!s&&l.right<r.left||l.bottom<r.top)&&(u=o.posAfter),s=!0),!o.contentDOM&&u<0&&!o.node.isText))return(o.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?o.posBefore:o.posAfter;i=o.dom.parentNode}return u>-1?u:t.docView.posFromDOM(e,n,-1)}function Ms(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let u=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=u;;){let s=t.childNodes[i];if(s.nodeType==1){let o=s.getClientRects();for(let l=0;l<o.length;l++){let a=o[l];if(Hr(e,a))return Ms(s,e,a)}}if((i=(i+1)%r)==u)break}return t}function Ma(t,e){let n=t.dom.ownerDocument,r,u=0,i=ma(n,e.left,e.top);i&&({node:r,offset:u}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),o;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let a=t.dom.getBoundingClientRect();if(!Hr(e,a)||(s=Ms(t.dom,e,a),!s))return null}if(U)for(let a=s;r&&a;a=pt(a))a.draggable&&(r=void 0);if(s=Ea(s,e),r){if(ue&&r.nodeType==1&&(u=Math.min(u,r.childNodes.length),u<r.childNodes.length)){let c=r.childNodes[u],f;c.nodeName=="IMG"&&(f=c.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&u++}let a;Kt&&u&&r.nodeType==1&&(a=r.childNodes[u-1]).nodeType==1&&a.contentEditable=="false"&&a.getBoundingClientRect().top>=e.top&&u--,r==t.dom&&u==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?o=t.state.doc.content.size:(u==0||r.nodeType!=1||r.childNodes[u-1].nodeName!="BR")&&(o=Aa(t,r,u,e))}o==null&&(o=Sa(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:o,inside:l?l.posAtStart-l.border:-1}}function Fu(t){return t.top<t.bottom||t.left<t.right}function Te(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(Fu(r))return r}return Array.prototype.find.call(n,Fu)||t.getBoundingClientRect()}const wa=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ws(t,e,n){let{node:r,offset:u,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=Kt||ue;if(r.nodeType==3)if(s&&(wa.test(r.nodeValue)||(n<0?!u:u==r.nodeValue.length))){let l=Te(Ee(r,u,u),n);if(ue&&u&&/\s/.test(r.nodeValue[u-1])&&u<r.nodeValue.length){let a=Te(Ee(r,u-1,u-1),-1);if(a.top==l.top){let c=Te(Ee(r,u,u+1),-1);if(c.top!=l.top)return _t(c,c.left<a.left)}}return l}else{let l=u,a=u,c=n<0?1:-1;return n<0&&!u?(a++,c=-1):n>=0&&u==r.nodeValue.length?(l--,c=1):n<0?l--:a++,_t(Te(Ee(r,l,a),c),c<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&u&&(n<0||u==re(r))){let l=r.childNodes[u-1];if(l.nodeType==1)return Kn(l.getBoundingClientRect(),!1)}if(i==null&&u<re(r)){let l=r.childNodes[u];if(l.nodeType==1)return Kn(l.getBoundingClientRect(),!0)}return Kn(r.getBoundingClientRect(),n>=0)}if(i==null&&u&&(n<0||u==re(r))){let l=r.childNodes[u-1],a=l.nodeType==3?Ee(l,re(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(a)return _t(Te(a,1),!1)}if(i==null&&u<re(r)){let l=r.childNodes[u];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let a=l?l.nodeType==3?Ee(l,0,s?0:1):l.nodeType==1?l:null:null;if(a)return _t(Te(a,-1),!0)}return _t(Te(r.nodeType==3?Ee(r):r,-n),n>=0)}function _t(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Kn(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Ts(t,e,n){let r=t.state,u=t.root.activeElement;r!=e&&t.updateState(e),u!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),u!=t.dom&&u&&u.focus()}}function Ta(t,e,n){let r=e.selection,u=n=="up"?r.$from:r.$to;return Ts(t,e,()=>{let{node:i}=t.docView.domFromPos(u.pos,n=="up"?-1:1);for(;;){let o=t.docView.nearestDesc(i,!0);if(!o)break;if(o.node.isBlock){i=o.contentDOM||o.dom;break}i=o.dom.parentNode}let s=ws(t,u.pos,1);for(let o=i.firstChild;o;o=o.nextSibling){let l;if(o.nodeType==1)l=o.getClientRects();else if(o.nodeType==3)l=Ee(o,0,o.nodeValue.length).getClientRects();else continue;for(let a=0;a<l.length;a++){let c=l[a];if(c.bottom>c.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const Oa=/[\u0590-\u08ac]/;function Fa(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let u=r.parentOffset,i=!u,s=u==r.parent.content.size,o=t.domSelection();return o?!Oa.test(r.parent.textContent)||!o.modify?n=="left"||n=="backward"?i:s:Ts(t,e,()=>{let{focusNode:l,focusOffset:a,anchorNode:c,anchorOffset:f}=t.domSelectionRange(),p=o.caretBidiLevel;o.modify("move",n,"character");let h=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:d,focusOffset:m}=t.domSelectionRange(),g=d&&!h.contains(d.nodeType==1?d:d.parentNode)||l==d&&a==m;try{o.collapse(c,f),l&&(l!=c||a!=f)&&o.extend&&o.extend(l,a)}catch{}return p!=null&&(o.caretBidiLevel=p),g}):r.pos==r.start()||r.pos==r.end()}let Nu=null,Iu=null,Ru=!1;function Na(t,e,n){return Nu==e&&Iu==n?Ru:(Nu=e,Iu=n,Ru=n=="up"||n=="down"?Ta(t,e,n):Fa(t,e,n))}const ie=0,Bu=1,Ue=2,ye=3;class Zt{constructor(e,n,r,u){this.parent=e,this.children=n,this.dom=r,this.contentDOM=u,this.dirty=ie,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let u=this.children[n];if(u==e)return r;r+=u.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let u;if(e==this.dom&&this.contentDOM)u=n>V(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))u=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){u=!1;break}if(i.previousSibling)break}if(u==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){u=!0;break}if(i.nextSibling)break}}return u??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,u=e;u;u=u.parentNode){let i=this.getDesc(u),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let u=e;u;u=u.parentNode){let i=this.getDesc(u);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let u=this.children[n],i=r+u.size;if(r==e&&i!=r){for(;!u.border&&u.children.length;)for(let s=0;s<u.children.length;s++){let o=u.children[s];if(o.size){u=o;break}}return u}if(e<i)return u.descAt(e-r-u.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,u=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],o=i+s.size;if(o>e||s instanceof Fs){u=e-i;break}i=o}if(u)return this.children[r].domFromPos(u-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Os&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?V(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?V(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let u=-1,i=-1;for(let s=r,o=0;;o++){let l=this.children[o],a=s+l.size;if(u==-1&&e<=a){let c=s+l.border;if(e>=c&&n<=a-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,c);e=s;for(let f=o;f>0;f--){let p=this.children[f-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){u=V(p.dom)+1;break}e-=p.size}u==-1&&(u=0)}if(u>-1&&(a>n||o==this.children.length-1)){n=a;for(let c=o+1;c<this.children.length;c++){let f=this.children[c];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=V(f.dom);break}n+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=a}return{node:this.contentDOM,from:e,to:n,fromOffset:u,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,u=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let h=0,d=0;h<this.children.length;h++){let m=this.children[h],g=d+m.size;if(i>d&&s<g)return m.setSelection(e-d-m.border,n-d-m.border,r,u);d=g}let o=this.domFromPos(e,e?-1:1),l=n==e?o:this.domFromPos(n,n?-1:1),a=r.root.getSelection(),c=r.domSelectionRange(),f=!1;if((ue||U)&&e==n){let{node:h,offset:d}=o;if(h.nodeType==3){if(f=!!(d&&h.nodeValue[d-1]==`
|
|
6
|
+
`).scrollIntoView()),!0)};function $r(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Vl=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let u=n.node(-1),i=n.indexAfter(-1),s=$r(u.contentMatchAt(i));if(!s||!u.canReplaceWith(i,i,s))return!1;if(e){let o=n.after(),l=t.tr.replaceWith(o,o,s.createAndFill());l.setSelection(F.near(l.doc.resolve(o),1)),e(l.scrollIntoView())}return!0},$l=(t,e)=>{let n=t.selection,{$from:r,$to:u}=n;if(n instanceof ee||r.parent.inlineContent||u.parent.inlineContent)return!1;let i=$r(u.parent.contentMatchAt(u.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&u.index()<u.parent.childCount?r:u).pos,o=t.tr.insert(s,i.createAndFill());o.setSelection(N.create(o.doc,s+1)),e(o.scrollIntoView())}return!0},Wl=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Ot(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),u=r&&jt(r);return u==null?!1:(e&&e(t.tr.lift(r,u).scrollIntoView()),!0)};function Hl(t){return(e,n)=>{let{$from:r,$to:u}=e.selection;if(e.selection instanceof M&&e.selection.node.isBlock)return!r.parentOffset||!Ot(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,o,l=!1,a=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){l=r.end(h)==r.pos+(r.depth-h),a=r.start(h)==r.pos-(r.depth-h),o=$r(r.node(h-1).contentMatchAt(r.indexAfter(h-1))),i.unshift(l&&o?{type:o}:null),s=h;break}else{if(h==1)return!1;i.unshift(null)}let c=e.tr;(e.selection instanceof N||e.selection instanceof ee)&&c.deleteSelection();let f=c.mapping.map(r.pos),p=Ot(c.doc,f,i.length,i);if(p||(i[0]=o?{type:o}:null,p=Ot(c.doc,f,i.length,i)),!p)return!1;if(c.split(f,i.length,i),!l&&a&&r.node(s).type!=o){let h=c.mapping.map(r.before(s)),d=c.doc.resolve(h);o&&r.node(s-1).canReplaceWith(d.index(),d.index()+1,o)&&c.setNodeMarkup(c.mapping.map(r.before(s)),o)}return n&&n(c.scrollIntoView()),!0}}const Jl=Hl(),jl=(t,e)=>(e&&e(t.tr.setSelection(new ee(t.doc))),!0);function Ul(t,e,n){let r=e.nodeBefore,u=e.nodeAfter,i=e.index();return!r||!u||!r.type.compatibleContent(u.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(u.isTextblock||Pr(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function ps(t,e,n,r){let u=e.nodeBefore,i=e.nodeAfter,s,o,l=u.type.spec.isolating||i.type.spec.isolating;if(!l&&Ul(t,e,n))return!0;let a=!l&&e.parent.canReplace(e.index(),e.index()+1);if(a&&(s=(o=u.contentMatchAt(u.childCount)).findWrapping(i.type))&&o.matchType(s[0]||i.type).validEnd){if(n){let h=e.pos+i.nodeSize,d=x.empty;for(let b=s.length-1;b>=0;b--)d=x.from(s[b].create(null,d));d=x.from(u.copy(d));let m=t.tr.step(new G(e.pos-1,h,e.pos,h,new C(d,1,0),s.length,!0)),g=m.doc.resolve(h+2*s.length);g.nodeAfter&&g.nodeAfter.type==u.type&&Pr(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let c=i.type.spec.isolating||r>0&&l?null:F.findFrom(e,1),f=c&&c.$from.blockRange(c.$to),p=f&&jt(f);if(p!=null&&p>=e.depth)return n&&n(t.tr.lift(f,p).scrollIntoView()),!0;if(a&&ht(i,"start",!0)&&ht(u,"end")){let h=u,d=[];for(;d.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let b=x.empty;for(let y=d.length-1;y>=0;y--)b=x.from(d[y].copy(b));let k=t.tr.step(new G(e.pos-d.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new C(b,d.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function ms(t){return function(e,n){let r=e.selection,u=t<0?r.$from:r.$to,i=u.depth;for(;u.node(i).isInline;){if(!i)return!1;i--}return u.node(i).isTextblock?(n&&n(e.tr.setSelection(N.create(e.doc,t<0?u.start(i):u.end(i)))),!0):!1}}const Kl=ms(-1),Zl=ms(1);function Gl(t,e=null){return function(n,r){let{$from:u,$to:i}=n.selection,s=u.blockRange(i),o=s&&es(s,t,e);return o?(r&&r(n.tr.wrap(s,o).scrollIntoView()),!0):!1}}function xr(t,e=null){return function(n,r){let u=!1;for(let i=0;i<n.selection.ranges.length&&!u;i++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[i];n.doc.nodesBetween(s,o,(l,a)=>{if(u)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)u=!0;else{let c=n.doc.resolve(a),f=c.index();u=c.parent.canReplaceWith(f,f+1,t)}})}if(!u)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:o},$to:{pos:l}}=n.selection.ranges[s];i.setBlockType(o,l,t,e)}r(i.scrollIntoView())}return!0}}function Yl(t,e,n,r){for(let u=0;u<e.length;u++){let{$from:i,$to:s}=e[u],o=i.depth==0?t.inlineContent&&t.type.allowsMarkType(n):!1;if(t.nodesBetween(i.pos,s.pos,(l,a)=>{if(o)return!1;o=l.inlineContent&&l.type.allowsMarkType(n)}),o)return!0}return!1}function cn(t,e=null,n){return function(r,u){let{empty:i,$cursor:s,ranges:o}=r.selection;if(i&&!s||!Yl(r.doc,o,t))return!1;if(u)if(s)t.isInSet(r.storedMarks||s.marks())?u(r.tr.removeStoredMark(t)):u(r.tr.addStoredMark(t.create(e)));else{let l,a=r.tr;l=!o.some(c=>r.doc.rangeHasMark(c.$from.pos,c.$to.pos,t));for(let c=0;c<o.length;c++){let{$from:f,$to:p}=o[c];if(!l)a.removeMark(f.pos,p.pos,t);else{let h=f.pos,d=p.pos,m=f.nodeAfter,g=p.nodeBefore,b=m&&m.isText?/^\s*/.exec(m.text)[0].length:0,k=g&&g.isText?/\s*$/.exec(g.text)[0].length:0;h+b<d&&(h+=b,d-=k),a.addMark(h,d,t.create(e))}}u(a.scrollIntoView())}return!0}}function Wr(...t){return function(e,n,r){for(let u=0;u<t.length;u++)if(t[u](e,n,r))return!0;return!1}}let jn=Wr(fs,Rl,Bl),Au=Wr(fs,zl,Pl);const Se={Enter:Wr(ql,$l,Wl,Jl),"Mod-Enter":Vl,Backspace:jn,"Mod-Backspace":jn,"Shift-Backspace":jn,Delete:Au,"Mod-Delete":Au,"Mod-a":jl},gs={"Ctrl-h":Se.Backspace,"Alt-Backspace":Se["Mod-Backspace"],"Ctrl-d":Se.Delete,"Ctrl-Alt-Backspace":Se["Mod-Delete"],"Alt-Delete":Se["Mod-Delete"],"Alt-d":Se["Mod-Delete"],"Ctrl-a":Kl,"Ctrl-e":Zl};for(let t in Se)gs[t]=Se[t];const Xl=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,Ql=Xl?gs:Se;function bs(t,e){return xs(t,e)!=null}function xs(t,e){const{from:n,$from:r,to:u,empty:i}=t.selection;if(!e)return null;if(i){if(t.storedMarks){const c=t.storedMarks.find(f=>f.type.name===e.name);if(c!=null)return c}const l=r.marks().find(c=>c.type.name===e.name);if(l!=null)return l;const a=r.nodeAfter;if(a&&a.marks){const c=a.marks.find(f=>f.type.name===e.name);if(c!=null)return c}return null}let s=null;return t.doc.nodesBetween(n,u,o=>{if(s!=null)return!1;if(o.marks){const l=o.marks.find(a=>a.type.name===e.name);if(l!=null)return s=l,!1}}),s}function fn(t,e,n){return t.map(()=>{const r=e.value,u=r.state.schema.marks[n];return bs(r.state,u)})}function ea(t,e,n){const{$from:r}=t.selection;for(let i=r.depth;i>0;i--){const s=r.node(i);if(s.type.name===e.name)return n!=null?Object.keys(n).every(o=>s.attrs[o]===n[o]):!0}const u=t.doc.nodeAt(r.pos);return u&&u.type.name===e.name?n!=null?Object.keys(n).every(i=>u.attrs[i]===n[i]):!0:!1}function Dt(t,e,n,r){return t.map(()=>{const u=e.value,i=u.state.schema.nodes[n];return i?ea(u.state,i,r):!1})}function he({active:t,display:e,onClick:n,disabled:r,label:u,icon:i,size:s}){return A.When(e,()=>It.ToolbarButton({onClick:n,disabled:r,variant:t.map(o=>o?"filled":"light"),size:s},A.attr.title(u),Rr.Icon({icon:i,size:s})))}function ta(t,e){const n=t.state.schema.marks.link;if(n==null)return;const{from:r,to:u}=t.state.selection,i=t.state.tr.addMark(r,u,n.create({href:e,title:null}));t.dispatch(i),t.focus()}function ks(t){const{state:e}=t,{$from:n,$to:r}=e.selection;if(!ys(e))return null;let u=n.pos,i=r.pos;const s=e.doc;for(;u>0&&s.resolve(u-1).nodeAfter?.marks?.some(a=>a.type.name==="link");)u--;for(;i<s.content.size&&s.resolve(i).nodeAfter?.marks?.some(a=>a.type.name==="link");)i++;return{start:u,end:i}}function na(t,e){const n=t.state.schema.marks.link;if(n==null)return;const r=ks(t);if(r==null)return;const{start:u,end:i}=r,s=t.state.tr.removeMark(u,i,n).addMark(u,i,n.create({href:e,title:null}));t.dispatch(s)}function ra(t){const e=t.state.schema.marks.link;if(e==null)return;const n=ks(t);if(n==null)return;const{start:r,end:u}=n,i=t.state.tr.removeMark(r,u,e);t.dispatch(i),t.focus()}function ys(t){return bs(t,t.schema.marks.link)}function ua({stateUpdate:t,view:e,isReadOnly:n,label:r,linkUrlPlaceholder:u,size:i}){const s=A.prop(null);s.on(l=>{l!=null&&na(e.value,l)});const o=t.on(()=>{const l=xs(e.value.state,e.value.state.schema.marks.link);l!=null?s.set(l.attrs.href??""):s.set(null)});return A.Fragment(A.OnDispose(o),It.ToolbarGroup(he({display:A.signal(!0),active:fn(t,e,"link"),disabled:n,label:r,icon:"mdi:link-variant",size:i,onClick:()=>{const l=e.value.state;if(ys(l))ra(e.value),s.set(null);else{const a="";ta(e.value,a),s.set(a)}}}),A.Ensure(s,l=>Rr.TextInput({value:l,autofocus:!0,onInput:s.set,placeholder:u,size:i}))),A.Ensure(s,l=>It.ToolbarButton({disabled:l.map(a=>a.trim()===""),variant:"text",onClick:()=>{const a=s.value;a&&window.open(a,"_blank")},size:i},"go")))}function un({display:t},...e){return A.When(A.computedOf(...t)((...n)=>n.some(Boolean)),()=>It.ToolbarGroup(...e))}function Cs({view:t,stateUpdate:e,features:n,readOnly:r=A.signal(!1),size:u="sm"}){return A.Ensure(t,i=>A.Use(Rr.BeatUII18n,s=>{const o=s.$.prosemirror,l=i;return It.Toolbar(un({display:[n.$.bold,n.$.italic,n.$.code]},he({active:fn(e,l,"strong"),display:n.$.bold,onClick:()=>Un(l.value,"strong"),disabled:r,label:o.$.bold,icon:"mdi:format-bold",size:u}),he({active:fn(e,l,"em"),display:n.$.italic,onClick:()=>Un(l.value,"em"),disabled:r,label:o.$.italic,icon:"mdi:format-italic",size:u}),he({active:fn(e,l,"code"),display:n.$.code,onClick:()=>Un(l.value,"code"),disabled:r,label:o.$.code,icon:"mdi:code-tags",size:u})),un({display:[n.$.headings]},A.Repeat(n.$.headerLevels.map(a=>Math.min(Math.max(a,1),6)),({counter:a})=>he({active:Dt(e,l,"heading",{level:a}),display:n.$.headings,onClick:()=>ia(l.value,a),disabled:r,label:o.map(c=>c.heading(a)),icon:`mdi:format-header-${a}`,size:u}))),un({display:[n.$.bulletList,n.$.orderedList]},he({active:Dt(e,l,"bullet_list"),display:n.$.bulletList,onClick:()=>Mu(l.value,"bullet_list"),disabled:r,label:o.$.bulletList,icon:"mdi:format-list-bulleted",size:u}),he({active:Dt(e,l,"ordered_list"),display:n.$.orderedList,onClick:()=>Mu(l.value,"ordered_list"),disabled:r,label:o.$.orderedList,icon:"mdi:format-list-numbered",size:u})),un({display:[n.$.blockquote,n.$.codeBlock,n.$.horizontalRule]},he({active:Dt(e,l,"blockquote"),display:n.$.blockquote,onClick:()=>sa(l.value),disabled:r,label:o.$.blockquote,icon:"mdi:format-quote-close",size:u}),he({active:Dt(e,l,"code_block"),display:n.$.codeBlock,onClick:()=>oa(l.value),disabled:r,label:o.$.codeBlock,icon:"mdi:code-braces",size:u}),he({active:A.signal(!1),display:n.$.horizontalRule,onClick:()=>la(l.value),disabled:r,label:o.$.horizontalRule,icon:"mdi:minus",size:u})),A.When(n.$.links,()=>ua({stateUpdate:e,view:l,isReadOnly:r,label:o.$.link,linkUrlPlaceholder:o.$.linkUrlPlaceholder,size:u})))}))}function Un(t,e){const n=t.state.schema.marks[e];n!=null&&(cn(n)(t.state,t.dispatch),t.focus())}function ia(t,e){const n=t.state.schema.nodes.heading;n!=null&&(xr(n,{level:e})(t.state,t.dispatch),t.focus())}async function Mu(t,e){const{wrapInList:n,liftListItem:r}=await Promise.resolve().then(()=>require("./index-DufUQsGn.cjs")),u=t.state.schema.nodes[e],i=t.state.schema.nodes.list_item;if(u==null||i==null)return;const{state:s}=t,{$from:o}=s.selection;let l=null;for(let a=o.depth;a>0;a--){const c=o.node(a);if(c.type.name==="bullet_list"||c.type.name==="ordered_list"){l=c.type.name;break}}l===e?r(i)(s,t.dispatch):l!=null?r(i)(t.state,t.dispatch)&&n(u)(t.state,t.dispatch):n(u)(s,t.dispatch),t.focus()}function sa(t){const e=t.state.schema.nodes.blockquote;if(e==null)return;const{state:n}=t,{$from:r}=n.selection;let u=!1;for(let i=r.depth;i>0;i--)if(r.node(i).type.name==="blockquote"){u=!0;break}u?Ll(n,t.dispatch):Gl(e)(n,t.dispatch),t.focus()}function oa(t){const e=t.state.schema.nodes.code_block,n=t.state.schema.nodes.paragraph;if(e==null||n==null)return;const{state:r}=t,{$from:u}=r.selection;let i=!1;for(let s=u.depth;s>0;s--)if(u.node(s).type.name==="code_block"){i=!0;break}i?xr(n)(r,t.dispatch):xr(e)(r,t.dispatch),t.focus()}function la(t){const e=t.state.schema.nodes.horizontal_rule;if(e!=null){const n=t.state.tr.replaceSelectionWith(e.create());t.dispatch(n),t.focus()}}const V=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},pt=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let kr=null;const Ee=function(t,e,n){let r=kr||(kr=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},aa=function(){kr=null},nt=function(t,e,n,r){return n&&(wu(t,e,n,r,-1)||wu(t,e,n,r,1))},ca=/^(img|br|input|textarea|hr)$/i;function wu(t,e,n,r,u){for(var i;;){if(t==n&&e==r)return!0;if(e==(u<0?0:re(t))){let s=t.parentNode;if(!s||s.nodeType!=1||Ut(t)||ca.test(t.nodeName)||t.contentEditable=="false")return!1;e=V(t)+(u<0?0:1),t=s}else if(t.nodeType==1){let s=t.childNodes[e+(u<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=u;else return!1;else t=s,e=u<0?re(t):0}else return!1}}function re(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function fa(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=re(t)}else if(t.parentNode&&!Ut(t))e=V(t),t=t.parentNode;else return null}}function da(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Ut(t))e=V(t)+1,t=t.parentNode;else return null}}function ha(t,e,n){for(let r=e==0,u=e==re(t);r||u;){if(t==n)return!0;let i=V(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,u=u&&i==re(t)}}function Ut(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Tn=function(t){return t.focusNode&&nt(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Je(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function pa(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function ma(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(re(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(re(r.startContainer),r.startOffset)}}}const ke=typeof navigator<"u"?navigator:null,Tu=typeof document<"u"?document:null,He=ke&&ke.userAgent||"",yr=/Edge\/(\d+)/.exec(He),Ds=/MSIE \d/.exec(He),Cr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(He),Y=!!(Ds||Cr||yr),Le=Ds?document.documentMode:Cr?+Cr[1]:yr?+yr[1]:0,ue=!Y&&/gecko\/(\d+)/i.test(He);ue&&+(/Firefox\/(\d+)/.exec(He)||[0,0])[1];const Dr=!Y&&/Chrome\/(\d+)/.exec(He),J=!!Dr,_s=Dr?+Dr[1]:0,U=!Y&&!!ke&&/Apple Computer/.test(ke.vendor),mt=U&&(/Mobile\/\w+/.test(He)||!!ke&&ke.maxTouchPoints>2),ne=mt||(ke?/Mac/.test(ke.platform):!1),ga=ke?/Win/.test(ke.platform):!1,Ae=/Android \d/.test(He),Kt=!!Tu&&"webkitFontSmoothing"in Tu.documentElement.style,ba=Kt?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function xa(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function _e(t,e){return typeof t=="number"?t:t[e]}function ka(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Ou(t,e,n){let r=t.someProp("scrollThreshold")||0,u=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=pt(s);continue}let o=s,l=o==i.body,a=l?xa(i):ka(o),c=0,f=0;if(e.top<a.top+_e(r,"top")?f=-(a.top-e.top+_e(u,"top")):e.bottom>a.bottom-_e(r,"bottom")&&(f=e.bottom-e.top>a.bottom-a.top?e.top+_e(u,"top")-a.top:e.bottom-a.bottom+_e(u,"bottom")),e.left<a.left+_e(r,"left")?c=-(a.left-e.left+_e(u,"left")):e.right>a.right-_e(r,"right")&&(c=e.right-a.right+_e(u,"right")),c||f)if(l)i.defaultView.scrollBy(c,f);else{let h=o.scrollLeft,d=o.scrollTop;f&&(o.scrollTop+=f),c&&(o.scrollLeft+=c);let m=o.scrollLeft-h,g=o.scrollTop-d;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}let p=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(p))break;s=p=="absolute"?s.offsetParent:pt(s)}}function ya(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,u;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let o=t.root.elementFromPoint(i,s);if(!o||o==t.dom||!t.dom.contains(o))continue;let l=o.getBoundingClientRect();if(l.top>=n-20){r=o,u=l.top;break}}return{refDOM:r,refTop:u,stack:Es(t.dom)}}function Es(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=pt(r));return e}function Ca({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Ss(n,r==0?0:r-e)}function Ss(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:u,left:i}=t[n];r.scrollTop!=u+e&&(r.scrollTop=u+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let ut=null;function Da(t){if(t.setActive)return t.setActive();if(ut)return t.focus(ut);let e=Es(t);t.focus(ut==null?{get preventScroll(){return ut={preventScroll:!0},!0}}:void 0),ut||(ut=!1,Ss(e,0))}function As(t,e){let n,r=2e8,u,i=0,s=e.top,o=e.top,l,a;for(let c=t.firstChild,f=0;c;c=c.nextSibling,f++){let p;if(c.nodeType==1)p=c.getClientRects();else if(c.nodeType==3)p=Ee(c).getClientRects();else continue;for(let h=0;h<p.length;h++){let d=p[h];if(d.top<=s&&d.bottom>=o){s=Math.max(d.bottom,s),o=Math.min(d.top,o);let m=d.left>e.left?d.left-e.left:d.right<e.left?e.left-d.right:0;if(m<r){n=c,r=m,u=m&&n.nodeType==3?{left:d.right<e.left?d.right:d.left,top:e.top}:e,c.nodeType==1&&m&&(i=f+(e.left>=(d.left+d.right)/2?1:0));continue}}else d.top>e.top&&!l&&d.left<=e.left&&d.right>=e.left&&(l=c,a={left:Math.max(d.left,Math.min(d.right,e.left)),top:d.top});!n&&(e.left>=d.right&&e.top>=d.top||e.left>=d.left&&e.top>=d.bottom)&&(i=f+1)}}return!n&&l&&(n=l,u=a,r=0),n&&n.nodeType==3?_a(n,u):!n||r&&n.nodeType==1?{node:t,offset:i}:As(n,u)}function _a(t,e){let n=t.nodeValue.length,r=document.createRange();for(let u=0;u<n;u++){r.setEnd(t,u+1),r.setStart(t,u);let i=Te(r,1);if(i.top!=i.bottom&&Hr(e,i))return{node:t,offset:u+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function Hr(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Ea(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Sa(t,e,n){let{node:r,offset:u}=As(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,u,i)}function Aa(t,e,n,r){let u=-1;for(let i=e,s=!1;i!=t.dom;){let o=t.docView.nearestDesc(i,!0),l;if(!o)return null;if(o.dom.nodeType==1&&(o.node.isBlock&&o.parent||!o.contentDOM)&&((l=o.dom.getBoundingClientRect()).width||l.height)&&(o.node.isBlock&&o.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(o.dom.nodeName)&&(!s&&l.left>r.left||l.top>r.top?u=o.posBefore:(!s&&l.right<r.left||l.bottom<r.top)&&(u=o.posAfter),s=!0),!o.contentDOM&&u<0&&!o.node.isText))return(o.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?o.posBefore:o.posAfter;i=o.dom.parentNode}return u>-1?u:t.docView.posFromDOM(e,n,-1)}function Ms(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let u=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=u;;){let s=t.childNodes[i];if(s.nodeType==1){let o=s.getClientRects();for(let l=0;l<o.length;l++){let a=o[l];if(Hr(e,a))return Ms(s,e,a)}}if((i=(i+1)%r)==u)break}return t}function Ma(t,e){let n=t.dom.ownerDocument,r,u=0,i=ma(n,e.left,e.top);i&&({node:r,offset:u}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),o;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let a=t.dom.getBoundingClientRect();if(!Hr(e,a)||(s=Ms(t.dom,e,a),!s))return null}if(U)for(let a=s;r&&a;a=pt(a))a.draggable&&(r=void 0);if(s=Ea(s,e),r){if(ue&&r.nodeType==1&&(u=Math.min(u,r.childNodes.length),u<r.childNodes.length)){let c=r.childNodes[u],f;c.nodeName=="IMG"&&(f=c.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&u++}let a;Kt&&u&&r.nodeType==1&&(a=r.childNodes[u-1]).nodeType==1&&a.contentEditable=="false"&&a.getBoundingClientRect().top>=e.top&&u--,r==t.dom&&u==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?o=t.state.doc.content.size:(u==0||r.nodeType!=1||r.childNodes[u-1].nodeName!="BR")&&(o=Aa(t,r,u,e))}o==null&&(o=Sa(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:o,inside:l?l.posAtStart-l.border:-1}}function Fu(t){return t.top<t.bottom||t.left<t.right}function Te(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(Fu(r))return r}return Array.prototype.find.call(n,Fu)||t.getBoundingClientRect()}const wa=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ws(t,e,n){let{node:r,offset:u,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=Kt||ue;if(r.nodeType==3)if(s&&(wa.test(r.nodeValue)||(n<0?!u:u==r.nodeValue.length))){let l=Te(Ee(r,u,u),n);if(ue&&u&&/\s/.test(r.nodeValue[u-1])&&u<r.nodeValue.length){let a=Te(Ee(r,u-1,u-1),-1);if(a.top==l.top){let c=Te(Ee(r,u,u+1),-1);if(c.top!=l.top)return _t(c,c.left<a.left)}}return l}else{let l=u,a=u,c=n<0?1:-1;return n<0&&!u?(a++,c=-1):n>=0&&u==r.nodeValue.length?(l--,c=1):n<0?l--:a++,_t(Te(Ee(r,l,a),c),c<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&u&&(n<0||u==re(r))){let l=r.childNodes[u-1];if(l.nodeType==1)return Kn(l.getBoundingClientRect(),!1)}if(i==null&&u<re(r)){let l=r.childNodes[u];if(l.nodeType==1)return Kn(l.getBoundingClientRect(),!0)}return Kn(r.getBoundingClientRect(),n>=0)}if(i==null&&u&&(n<0||u==re(r))){let l=r.childNodes[u-1],a=l.nodeType==3?Ee(l,re(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(a)return _t(Te(a,1),!1)}if(i==null&&u<re(r)){let l=r.childNodes[u];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let a=l?l.nodeType==3?Ee(l,0,s?0:1):l.nodeType==1?l:null:null;if(a)return _t(Te(a,-1),!0)}return _t(Te(r.nodeType==3?Ee(r):r,-n),n>=0)}function _t(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Kn(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Ts(t,e,n){let r=t.state,u=t.root.activeElement;r!=e&&t.updateState(e),u!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),u!=t.dom&&u&&u.focus()}}function Ta(t,e,n){let r=e.selection,u=n=="up"?r.$from:r.$to;return Ts(t,e,()=>{let{node:i}=t.docView.domFromPos(u.pos,n=="up"?-1:1);for(;;){let o=t.docView.nearestDesc(i,!0);if(!o)break;if(o.node.isBlock){i=o.contentDOM||o.dom;break}i=o.dom.parentNode}let s=ws(t,u.pos,1);for(let o=i.firstChild;o;o=o.nextSibling){let l;if(o.nodeType==1)l=o.getClientRects();else if(o.nodeType==3)l=Ee(o,0,o.nodeValue.length).getClientRects();else continue;for(let a=0;a<l.length;a++){let c=l[a];if(c.bottom>c.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const Oa=/[\u0590-\u08ac]/;function Fa(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let u=r.parentOffset,i=!u,s=u==r.parent.content.size,o=t.domSelection();return o?!Oa.test(r.parent.textContent)||!o.modify?n=="left"||n=="backward"?i:s:Ts(t,e,()=>{let{focusNode:l,focusOffset:a,anchorNode:c,anchorOffset:f}=t.domSelectionRange(),p=o.caretBidiLevel;o.modify("move",n,"character");let h=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:d,focusOffset:m}=t.domSelectionRange(),g=d&&!h.contains(d.nodeType==1?d:d.parentNode)||l==d&&a==m;try{o.collapse(c,f),l&&(l!=c||a!=f)&&o.extend&&o.extend(l,a)}catch{}return p!=null&&(o.caretBidiLevel=p),g}):r.pos==r.start()||r.pos==r.end()}let Nu=null,Iu=null,Ru=!1;function Na(t,e,n){return Nu==e&&Iu==n?Ru:(Nu=e,Iu=n,Ru=n=="up"||n=="down"?Ta(t,e,n):Fa(t,e,n))}const ie=0,Bu=1,Ue=2,ye=3;class Zt{constructor(e,n,r,u){this.parent=e,this.children=n,this.dom=r,this.contentDOM=u,this.dirty=ie,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let u=this.children[n];if(u==e)return r;r+=u.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let u;if(e==this.dom&&this.contentDOM)u=n>V(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))u=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){u=!1;break}if(i.previousSibling)break}if(u==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){u=!0;break}if(i.nextSibling)break}}return u??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,u=e;u;u=u.parentNode){let i=this.getDesc(u),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let u=e;u;u=u.parentNode){let i=this.getDesc(u);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let u=this.children[n],i=r+u.size;if(r==e&&i!=r){for(;!u.border&&u.children.length;)for(let s=0;s<u.children.length;s++){let o=u.children[s];if(o.size){u=o;break}}return u}if(e<i)return u.descAt(e-r-u.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,u=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],o=i+s.size;if(o>e||s instanceof Fs){u=e-i;break}i=o}if(u)return this.children[r].domFromPos(u-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Os&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?V(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?V(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let u=-1,i=-1;for(let s=r,o=0;;o++){let l=this.children[o],a=s+l.size;if(u==-1&&e<=a){let c=s+l.border;if(e>=c&&n<=a-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,c);e=s;for(let f=o;f>0;f--){let p=this.children[f-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){u=V(p.dom)+1;break}e-=p.size}u==-1&&(u=0)}if(u>-1&&(a>n||o==this.children.length-1)){n=a;for(let c=o+1;c<this.children.length;c++){let f=this.children[c];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=V(f.dom);break}n+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=a}return{node:this.contentDOM,from:e,to:n,fromOffset:u,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,u=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let h=0,d=0;h<this.children.length;h++){let m=this.children[h],g=d+m.size;if(i>d&&s<g)return m.setSelection(e-d-m.border,n-d-m.border,r,u);d=g}let o=this.domFromPos(e,e?-1:1),l=n==e?o:this.domFromPos(n,n?-1:1),a=r.root.getSelection(),c=r.domSelectionRange(),f=!1;if((ue||U)&&e==n){let{node:h,offset:d}=o;if(h.nodeType==3){if(f=!!(d&&h.nodeValue[d-1]==`
|
|
7
7
|
`),f&&d==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(o=l={node:g.parentNode,offset:V(g)+1});break}let b=m.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let m=h.childNodes[d-1];f=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(ue&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(u=!0)}if(!(u||f&&U)&&nt(o.node,o.offset,c.anchorNode,c.anchorOffset)&&nt(l.node,l.offset,c.focusNode,c.focusOffset))return;let p=!1;if((a.extend||e==n)&&!(f&&ue)){a.collapse(o.node,o.offset);try{e!=n&&a.extend(l.node,l.offset),p=!0}catch{}}if(!p){if(e>n){let d=o;o=l,l=d}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(o.node,o.offset),a.removeAllRanges(),a.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,u=0;u<this.children.length;u++){let i=this.children[u],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let o=r+i.border,l=s-i.border;if(e>=o&&n<=l){this.dirty=e==r||n==s?Ue:Bu,e==o&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=ye:i.markDirty(e-o,n-o);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Ue:ye}r=s}this.dirty=Ue}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Ue:Bu;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class Os extends Zt{constructor(e,n,r,u){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return u;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let o=document.createElement("span");o.appendChild(s),s=o}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==ie&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class Ia extends Zt{constructor(e,n,r,u){super(e,[],n,null),this.textDOM=r,this.text=u}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class rt extends Zt{constructor(e,n,r,u,i){super(e,[],r,u),this.mark=n,this.spec=i}static create(e,n,r,u){let i=u.nodeViews[n.type.name],s=i&&i(n,u,r);return(!s||!s.dom)&&(s=xt.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new rt(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&ye||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ye&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=ie){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=ie}}slice(e,n,r){let u=rt.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=Er(i,n,s,r)),e>0&&(i=Er(i,0,e,r));for(let o=0;o<i.length;o++)i[o].parent=u;return u.children=i,u}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class qe extends Zt{constructor(e,n,r,u,i,s,o,l,a){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=u,this.nodeDOM=o}static create(e,n,r,u,i,s){let o=i.nodeViews[n.type.name],l,a=o&&o(n,i,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,u),c=a&&a.dom,f=a&&a.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:f}=xt.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let p=c;return c=Rs(c,r,n),a?l=new Ra(e,n,r,u,c,f||null,p,a,i,s+1):n.isText?new On(e,n,r,u,c,p,i):new qe(e,n,r,u,c,f||null,p,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>x.empty)}return e}matchesNode(e,n,r){return this.dirty==ie&&e.eq(this.node)&&bn(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,u=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,o=i&&i.pos<0,l=new va(this,s&&s.node,e);La(this.node,this.innerDeco,(a,c,f)=>{a.spec.marks?l.syncToMarks(a.spec.marks,r,e):a.type.side>=0&&!f&&l.syncToMarks(c==this.node.childCount?w.none:this.node.child(c).marks,r,e),l.placeWidget(a,e,u)},(a,c,f,p)=>{l.syncToMarks(a.marks,r,e);let h;l.findNodeMatch(a,c,f,p)||o&&e.state.selection.from>u&&e.state.selection.to<u+a.nodeSize&&(h=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(a,c,f,h,e)||l.updateNextNode(a,c,f,e,p,u)||l.addNode(a,c,f,e,u),u+=a.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Ue)&&(s&&this.protectLocalComposition(e,s),Ns(this.contentDOM,this.children,e),mt&&qa(this.dom))}localCompositionInfo(e,n){let{from:r,to:u}=e.state.selection;if(!(e.state.selection instanceof N)||r<n||u>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,o=Va(this.node.content,s,r-n,u-n);return o<0?null:{node:i,pos:o,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:u}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new Ia(this,i,n,u);e.input.compositionNodes.push(s),this.children=Er(this.children,r,r+u.length,e,s)}update(e,n,r,u){return this.dirty==ye||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,u),!0)}updateInner(e,n,r,u){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(u,this.posAtStart),this.dirty=ie}updateOuterDeco(e){if(bn(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Is(this.dom,this.nodeDOM,_r(this.outerDeco,this.node,n),_r(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function vu(t,e,n,r,u){Rs(r,e,t);let i=new qe(void 0,t,e,n,r,r,r,u,0);return i.contentDOM&&i.updateChildren(u,0),i}class On extends qe{constructor(e,n,r,u,i,s,o){super(e,n,r,u,i,null,s,o,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,u){return this.dirty==ye||this.dirty!=ie&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=ie||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,u.trackWrites==this.nodeDOM&&(u.trackWrites=null)),this.node=e,this.dirty=ie,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let u=this.node.cut(e,n),i=document.createTextNode(u.text);return new On(this.parent,u,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=ye)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Fs extends Zt{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==ie&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Ra extends qe{constructor(e,n,r,u,i,s,o,l,a,c){super(e,n,r,u,i,s,o,a,c),this.spec=l}update(e,n,r,u){if(this.dirty==ye)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,u),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,u)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,u){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,u)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Ns(t,e,n){let r=t.firstChild,u=!1;for(let i=0;i<e.length;i++){let s=e[i],o=s.dom;if(o.parentNode==t){for(;o!=r;)r=zu(r),u=!0;r=r.nextSibling}else u=!0,t.insertBefore(o,r);if(s instanceof rt){let l=r?r.previousSibling:t.lastChild;Ns(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=zu(r),u=!0;u&&n.trackWrites==t&&(n.trackWrites=null)}const Ft=function(t){t&&(this.nodeName=t)};Ft.prototype=Object.create(null);const Ke=[new Ft];function _r(t,e,n){if(t.length==0)return Ke;let r=n?Ke[0]:new Ft,u=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&u.push(r=new Ft(s.nodeName));for(let o in s){let l=s[o];l!=null&&(n&&u.length==1&&u.push(r=new Ft(e.isInline?"span":"div")),o=="class"?r.class=(r.class?r.class+" ":"")+l:o=="style"?r.style=(r.style?r.style+";":"")+l:o!="nodeName"&&(r[o]=l))}}}return u}function Is(t,e,n,r){if(n==Ke&&r==Ke)return e;let u=e;for(let i=0;i<r.length;i++){let s=r[i],o=n[i];if(i){let l;o&&o.nodeName==s.nodeName&&u!=t&&(l=u.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(u),o=Ke[0]),u=l}Ba(u,o||Ke[0],s)}return u}function Ba(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],u=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)u.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<u.length;i++)r.indexOf(u[i])==-1&&t.classList.add(u[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,u;for(;u=r.exec(e.style);)t.style.removeProperty(u[1])}n.style&&(t.style.cssText+=n.style)}}function Rs(t,e,n){return Is(t,t,Ke,_r(e,n,t.nodeType!=1))}function bn(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function zu(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class va{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=za(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let u=0,i=this.stack.length>>1,s=Math.min(i,e.length);for(;u<s&&(u==i-1?this.top:this.stack[u+1<<1]).matchesMark(e[u])&&e[u].type.spec.spanning!==!1;)u++;for(;u<i;)this.destroyRest(),this.top.dirty=ie,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let o=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let a=this.top.children[l];if(a.matchesMark(e[i])&&!this.isLocked(a.dom)){o=l;break}}if(o>-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let l=rt.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,u){let i=-1,s;if(u>=this.preMatch.index&&(s=this.preMatch.matches[u-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let o=this.index,l=Math.min(this.top.children.length,o+5);o<l;o++){let a=this.top.children[o];if(a.matchesNode(e,n,r)&&!this.preMatch.matched.has(a)){i=o;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,u,i){let s=this.top.children[u];return s.dirty==ye&&s.dom==s.contentDOM&&(s.dirty=Ue),s.update(e,n,r,i)?(this.destroyBetween(this.index,u),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let u=this.index;u<this.top.children.length;u++)if(this.top.children[u]==r)return u}return-1}e=n}}updateNextNode(e,n,r,u,i,s){for(let o=this.index;o<this.top.children.length;o++){let l=this.top.children[o];if(l instanceof qe){let a=this.preMatch.matched.get(l);if(a!=null&&a!=i)return!1;let c=l.dom,f,p=this.isLocked(c)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=ye&&bn(n,l.outerDeco));if(!p&&l.update(e,n,r,u))return this.destroyBetween(this.index,o),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!p&&(f=this.recreateWrapper(l,e,n,r,u,s)))return this.destroyBetween(this.index,o),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=Ue,f.updateChildren(u,s+1),f.dirty=ie),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,u,i,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!bn(r,e.outerDeco)||!u.eq(e.innerDeco))return null;let o=qe.create(this.top,n,r,u,i,s);if(o.contentDOM){o.children=e.children,e.children=[];for(let l of o.children)l.parent=o}return e.destroy(),o}addNode(e,n,r,u,i){let s=qe.create(this.top,e,n,r,u,i);s.contentDOM&&s.updateChildren(u,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let u=this.index<this.top.children.length?this.top.children[this.index]:null;if(u&&u.matchesWidget(e)&&(e==u.widget||!u.widget.type.toDOM.parentNode))this.index++;else{let i=new Os(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof rt;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof On)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((U||J)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let u=new Fs(this.top,[],r,null);n!=this.top?n.children.push(u):n.children.splice(this.index++,0,u),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function za(t,e){let n=e,r=n.children.length,u=t.childCount,i=new Map,s=[];e:for(;u>0;){let o;for(;;)if(r){let a=n.children[r-1];if(a instanceof rt)n=a,r=a.children.length;else{o=a,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=o.node;if(l){if(l!=t.child(u-1))break;--u,i.set(o,u),s.push(o)}}return{index:u,matched:i,matches:s.reverse()}}function Pa(t,e){return t.type.side-e.type.side}function La(t,e,n,r){let u=e.locals(t),i=0;if(u.length==0){for(let a=0;a<t.childCount;a++){let c=t.child(a);r(c,u,e.forChild(i,c),a),i+=c.nodeSize}return}let s=0,o=[],l=null;for(let a=0;;){let c,f;for(;s<u.length&&u[s].to==i;){let g=u[s++];g.widget&&(c?(f||(f=[c])).push(g):c=g)}if(c)if(f){f.sort(Pa);for(let g=0;g<f.length;g++)n(f[g],a,!!l)}else n(c,a,!!l);let p,h;if(l)h=-1,p=l,l=null;else if(a<t.childCount)h=a,p=t.child(a++);else break;for(let g=0;g<o.length;g++)o[g].to<=i&&o.splice(g--,1);for(;s<u.length&&u[s].from<=i&&u[s].to>i;)o.push(u[s++]);let d=i+p.nodeSize;if(p.isText){let g=d;s<u.length&&u[s].from<g&&(g=u[s].from);for(let b=0;b<o.length;b++)o[b].to<g&&(g=o[b].to);g<d&&(l=p.cut(g-i),p=p.cut(0,g-i),d=g,h=-1)}else for(;s<u.length&&u[s].to<d;)s++;let m=p.isInline&&!p.isLeaf?o.filter(g=>!g.inline):o.slice();r(p,m,e.forChild(i,p),h),i=d}}function qa(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function Va(t,e,n,r){for(let u=0,i=0;u<t.childCount&&i<=r;){let s=t.child(u++),o=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;u<t.childCount;){let a=t.child(u++);if(i+=a.nodeSize,!a.isText)break;l+=a.text}if(i>=n){if(i>=r&&l.slice(r-e.length-o,r-o)==e)return r-e.length;let a=o<r?l.lastIndexOf(e,r-o-1):-1;if(a>=0&&a+e.length+o>=n)return o+a;if(n==r&&l.length>=r+e.length-o&&l.slice(r-o,r-o+e.length)==e)return r}}return-1}function Er(t,e,n,r,u){let i=[];for(let s=0,o=0;s<t.length;s++){let l=t[s],a=o,c=o+=l.size;a>=n||c<=e?i.push(l):(a<e&&i.push(l.slice(0,e-a,r)),u&&(i.push(u),u=void 0),c>n&&i.push(l.slice(n-a,l.size,r)))}return i}function Jr(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let u=t.docView.nearestDesc(n.focusNode),i=u&&u.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let o=r.resolve(s),l,a;if(Tn(n)){for(l=s;u&&!u.node;)u=u.parent;let f=u.node;if(u&&f.isAtom&&M.isSelectable(f)&&u.parent&&!(f.isInline&&ha(n.focusNode,n.focusOffset,u.dom))){let p=u.posBefore;a=new M(s==p?o:r.resolve(p))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=s,p=s;for(let h=0;h<n.rangeCount;h++){let d=n.getRangeAt(h);f=Math.min(f,t.docView.posFromDOM(d.startContainer,d.startOffset,1)),p=Math.max(p,t.docView.posFromDOM(d.endContainer,d.endOffset,-1))}if(f<0)return null;[l,s]=p==t.state.selection.anchor?[p,f]:[f,p],o=r.resolve(s)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let c=r.resolve(l);if(!a){let f=e=="pointer"||t.state.selection.head<o.pos&&!i?1:-1;a=jr(t,c,o,f)}return a}function Bs(t){return t.editable?t.hasFocus():zs(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Me(t,e=!1){let n=t.state.selection;if(vs(t,n),!!Bs(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&J){let r=t.domSelectionRange(),u=t.domObserver.currentSelection;if(r.anchorNode&&u.anchorNode&&nt(r.anchorNode,r.anchorOffset,u.anchorNode,u.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)Wa(t);else{let{anchor:r,head:u}=n,i,s;Pu&&!(n instanceof N)&&(n.$from.parent.inlineContent||(i=Lu(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Lu(t,n.to))),t.docView.setSelection(r,u,t,e),Pu&&(i&&qu(i),s&&qu(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&$a(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Pu=U||J&&_s<63;function Lu(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),u=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(U&&u&&u.contentEditable=="false")return Zn(u);if((!u||u.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(u)return Zn(u);if(i)return Zn(i)}}function Zn(t){return t.contentEditable="true",U&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function qu(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function $a(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,u=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=u)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Bs(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function Wa(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,V(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Y&&Le<=11&&(n.disabled=!0,n.disabled=!1)}function vs(t,e){if(e instanceof M){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Vu(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Vu(t)}function Vu(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function jr(t,e,n,r){return t.someProp("createSelectionBetween",u=>u(t,e,n))||N.between(e,n,r)}function $u(t){return t.editable&&!t.hasFocus()?!1:zs(t)}function zs(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Ha(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return nt(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Sr(t,e){let{$anchor:n,$head:r}=t.selection,u=e>0?n.max(r):n.min(r),i=u.parent.inlineContent?u.depth?t.doc.resolve(e>0?u.after():u.before()):null:u;return i&&F.findFrom(i,e)}function Oe(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Wu(t,e,n){let r=t.state.selection;if(r instanceof N)if(n.indexOf("s")>-1){let{$head:u}=r,i=u.textOffset?null:e<0?u.nodeBefore:u.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(u.pos+i.nodeSize*(e<0?-1:1));return Oe(t,new N(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let u=Sr(t.state,e);return u&&u instanceof M?Oe(t,u):!1}else if(!(ne&&n.indexOf("m")>-1)){let u=r.$head,i=u.textOffset?null:e<0?u.nodeBefore:u.nodeAfter,s;if(!i||i.isText)return!1;let o=e<0?u.pos-i.nodeSize:u.pos;return i.isAtom||(s=t.docView.descAt(o))&&!s.contentDOM?M.isSelectable(i)?Oe(t,new M(e<0?t.state.doc.resolve(u.pos-i.nodeSize):u)):Kt?Oe(t,new N(t.state.doc.resolve(e<0?o:o+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof M&&r.node.isInline)return Oe(t,new N(e>0?r.$to:r.$from));{let u=Sr(t.state,e);return u?Oe(t,u):!1}}}function xn(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Nt(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function it(t,e){return e<0?Ja(t):ja(t)}function Ja(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let u,i,s=!1;for(ue&&n.nodeType==1&&r<xn(n)&&Nt(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let o=n.childNodes[r-1];if(Nt(o,-1))u=n,i=--r;else if(o.nodeType==3)n=o,r=n.nodeValue.length;else break}}else{if(Ps(n))break;{let o=n.previousSibling;for(;o&&Nt(o,-1);)u=n.parentNode,i=V(o),o=o.previousSibling;if(o)n=o,r=xn(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Ar(t,n,r):u&&Ar(t,u,i)}function ja(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let u=xn(n),i,s;for(;;)if(r<u){if(n.nodeType!=1)break;let o=n.childNodes[r];if(Nt(o,1))i=n,s=++r;else break}else{if(Ps(n))break;{let o=n.nextSibling;for(;o&&Nt(o,1);)i=o.parentNode,s=V(o)+1,o=o.nextSibling;if(o)n=o,r=0,u=xn(n);else{if(n=n.parentNode,n==t.dom)break;r=u=0}}}i&&Ar(t,i,s)}function Ps(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Ua(t,e){for(;t&&e==t.childNodes.length&&!Ut(t);)e=V(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function Ka(t,e){for(;t&&!e&&!Ut(t);)e=V(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function Ar(t,e,n){if(e.nodeType!=3){let i,s;(s=Ua(e,n))?(e=s,n=0):(i=Ka(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Tn(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:u}=t;setTimeout(()=>{t.state==u&&Me(t)},50)}function Hu(t,e){let n=t.state.doc.resolve(e);if(!(J||ga)&&n.parent.inlineContent){let u=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>u.top&&s<u.bottom&&Math.abs(i.left-u.left)>1)return i.left<u.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>u.top&&s<u.bottom&&Math.abs(i.left-u.left)>1)return i.left>u.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Ju(t,e,n){let r=t.state.selection;if(r instanceof N&&!r.empty||n.indexOf("s")>-1||ne&&n.indexOf("m")>-1)return!1;let{$from:u,$to:i}=r;if(!u.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=Sr(t.state,e);if(s&&s instanceof M)return Oe(t,s)}if(!u.parent.inlineContent){let s=e<0?u:i,o=r instanceof ee?F.near(s,e):F.findFrom(s,e);return o?Oe(t,o):!1}return!1}function ju(t,e){if(!(t.state.selection instanceof N))return!0;let{$head:n,$anchor:r,empty:u}=t.state.selection;if(!n.sameParent(r))return!0;if(!u)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function Uu(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Za(t){if(!U||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Uu(t,r,"true"),setTimeout(()=>Uu(t,r,"false"),20)}return!1}function Ga(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function Ya(t,e){let n=e.keyCode,r=Ga(e);if(n==8||ne&&n==72&&r=="c")return ju(t,-1)||it(t,-1);if(n==46&&!e.shiftKey||ne&&n==68&&r=="c")return ju(t,1)||it(t,1);if(n==13||n==27)return!0;if(n==37||ne&&n==66&&r=="c"){let u=n==37?Hu(t,t.state.selection.from)=="ltr"?-1:1:-1;return Wu(t,u,r)||it(t,u)}else if(n==39||ne&&n==70&&r=="c"){let u=n==39?Hu(t,t.state.selection.from)=="ltr"?1:-1:1;return Wu(t,u,r)||it(t,u)}else{if(n==38||ne&&n==80&&r=="c")return Ju(t,-1,r)||it(t,-1);if(n==40||ne&&n==78&&r=="c")return Za(t)||Ju(t,1,r)||it(t,1);if(r==(ne?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Ur(t,e){t.someProp("transformCopied",h=>{e=h(e,t)});let n=[],{content:r,openStart:u,openEnd:i}=e;for(;u>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){u--,i--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let s=t.someProp("clipboardSerializer")||xt.fromSchema(t.state.schema),o=Hs(),l=o.createElement("div");l.appendChild(s.serializeFragment(r,{document:o}));let a=l.firstChild,c,f=0;for(;a&&a.nodeType==1&&(c=Ws[a.nodeName.toLowerCase()]);){for(let h=c.length-1;h>=0;h--){let d=o.createElement(c[h]);for(;l.firstChild;)d.appendChild(l.firstChild);l.appendChild(d),f++}a=l.firstChild}a&&a.nodeType==1&&a.setAttribute("data-pm-slice",`${u} ${i}${f?` -${f}`:""} ${JSON.stringify(n)}`);let p=t.someProp("clipboardTextSerializer",h=>h(e,t))||e.content.textBetween(0,e.content.size,`
|
|
8
8
|
|
|
9
9
|
`);return{dom:l,text:p,slice:e}}function Ls(t,e,n,r,u){let i=u.parent.type.spec.code,s,o;if(!n&&!e)return null;let l=!!e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",p=>{e=p(e,i||r,t)}),i)return o=new C(x.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
`}this.closed=null}}getMark(e){let n=this.marks[e];if(!n){if(this.options.strict!==!1)throw new Error(`Mark type \`${e}\` not supported by Markdown renderer`);n=Jd}return n}wrapBlock(e,n,r,u){let i=this.delim;this.write(n??e),this.delim+=e,u(),this.delim=i,this.closeBlock(r)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+=`
|
|
32
32
|
`)}write(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}closeBlock(e){this.closed=e}text(e,n=!0){let r=e.split(`
|
|
33
33
|
`);for(let u=0;u<r.length;u++)this.write(),!n&&r[u][0]=="["&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=n?this.esc(r[u],this.atBlockStart):r[u],u!=r.length-1&&(this.out+=`
|
|
34
|
-
`)}render(e,n,r){if(this.nodes[e.type.name])this.nodes[e.type.name](this,e,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+e.type.name+"` not supported by Markdown renderer");e.type.isLeaf||(e.type.inlineContent?this.renderInline(e):this.renderContent(e),e.isBlock&&this.closeBlock(e))}}renderContent(e){e.forEach((n,r,u)=>this.render(n,e,u))}renderInline(e,n=!0){this.atBlockStart=n;let r=[],u="",i=(s,o,l)=>{let a=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(a=a.filter(m=>{if(l+1==e.childCount)return!1;let g=e.child(l+1);return m.isInSet(g.marks)&&(!g.isText||/\S/.test(g.text))}));let c=u;if(u="",s&&s.isText&&a.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,g,b]=/^(\s*)(.*)$/m.exec(s.text);g&&(c+=g,s=b?s.withText(b):null,s||(a=r))}if(s&&s.isText&&a.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&(l==e.childCount-1||!m.isInSet(e.child(l+1).marks))})){let[m,g,b]=/^(.*?)(\s*)$/m.exec(s.text);b&&(u=b,s=g?s.withText(g):null,s||(a=r))}let f=a.length?a[a.length-1]:null,p=f&&this.getMark(f.type.name).escape===!1,h=a.length-(p?1:0);e:for(let m=0;m<h;m++){let g=a[m];if(!this.getMark(g.type.name).mixable)break;for(let b=0;b<r.length;b++){let k=r[b];if(!this.getMark(k.type.name).mixable)break;if(g.eq(k)){m>b?a=a.slice(0,b).concat(g).concat(a.slice(b,m)).concat(a.slice(m+1,h)):b>m&&(a=a.slice(0,m).concat(a.slice(m+1,b)).concat(g).concat(a.slice(b,h)));continue e}}}let d=0;for(;d<Math.min(r.length,h)&&a[d].eq(r[d]);)++d;for(;d<r.length;)this.text(this.markString(r.pop(),!1,e,l),!1);if(c&&this.text(c),s){for(;r.length<h;){let m=a[r.length];r.push(m),this.text(this.markString(m,!0,e,l),!1),this.atBlockStart=!1}p&&s.isText?this.text(this.markString(f,!0,e,l)+s.text+this.markString(f,!1,e,l+1),!1):this.render(s,e,l),this.atBlockStart=!1}s?.isText&&s.nodeSize>0&&(this.atBlockStart=!1)};e.forEach(i),i(null,0,e.childCount),this.atBlockStart=!1}renderList(e,n,r){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let u=typeof e.attrs.tight<"u"?e.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=u,e.forEach((s,o,l)=>{l&&u&&this.flushClose(1),this.wrapBlock(n,r(l),e,()=>this.render(s,e,l))}),this.inTightList=i}esc(e,n=!1){return e=e.replace(/[`*\\~\[\]_]/g,(r,u)=>r=="_"&&u>0&&u+1<e.length&&e[u-1].match(/\w/)&&e[u+1].match(/\w/)?r:"\\"+r),n&&(e=e.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,"\\$&")),e}quote(e){let n=e.indexOf('"')==-1?'""':e.indexOf("'")==-1?"''":"()";return n[0]+e+n[1]}repeat(e,n){let r="";for(let u=0;u<n;u++)r+=e;return r}markString(e,n,r,u){let i=this.getMark(e.type.name),s=n?i.open:i.close;return typeof s=="string"?s:s(this,e,r,u)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}}var Sn=200,L=function(){};L.prototype.append=function(e){return e.length?(e=L.from(e),!this.length&&e||e.length<Sn&&this.leafAppend(e)||this.length<Sn&&e.leafPrepend(this)||this.appendInner(e)):this};L.prototype.prepend=function(e){return e.length?L.from(e).append(this):this};L.prototype.appendInner=function(e){return new Zd(this,e)};L.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?L.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};L.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};L.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};L.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var u=[];return this.forEach(function(i,s){return u.push(e(i,s))},n,r),u};L.from=function(e){return e instanceof L?e:e&&e.length?new wo(e):L.empty};var wo=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(u,i){return u==0&&i==this.length?this:new e(this.values.slice(u,i))},e.prototype.getInner=function(u){return this.values[u]},e.prototype.forEachInner=function(u,i,s,o){for(var l=i;l<s;l++)if(u(this.values[l],o+l)===!1)return!1},e.prototype.forEachInvertedInner=function(u,i,s,o){for(var l=i-1;l>=s;l--)if(u(this.values[l],o+l)===!1)return!1},e.prototype.leafAppend=function(u){if(this.length+u.length<=Sn)return new e(this.values.concat(u.flatten()))},e.prototype.leafPrepend=function(u){if(this.length+u.length<=Sn)return new e(u.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(L);L.empty=new wo([]);var Zd=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,u,i,s){var o=this.left.length;if(u<o&&this.left.forEachInner(r,u,Math.min(i,o),s)===!1||i>o&&this.right.forEachInner(r,Math.max(u-o,0),Math.min(this.length,i)-o,s+o)===!1)return!1},e.prototype.forEachInvertedInner=function(r,u,i,s){var o=this.left.length;if(u>o&&this.right.forEachInvertedInner(r,u-o,Math.max(i,o)-o,s+o)===!1||i<o&&this.left.forEachInvertedInner(r,Math.min(u,o),i,s)===!1)return!1},e.prototype.sliceInner=function(r,u){if(r==0&&u==this.length)return this;var i=this.left.length;return u<=i?this.left.slice(r,u):r>=i?this.right.slice(r-i,u-i):this.left.slice(r,i).append(this.right.slice(0,u-i))},e.prototype.leafAppend=function(r){var u=this.right.leafAppend(r);if(u)return new e(this.left,u)},e.prototype.leafPrepend=function(r){var u=this.left.leafPrepend(r);if(u)return new e(u,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(L);const Gd=500;class ae{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let u,i;n&&(u=this.remapping(r,this.items.length),i=u.maps.length);let s=e.tr,o,l,a=[],c=[];return this.items.forEach((f,p)=>{if(!f.step){u||(u=this.remapping(r,p+1),i=u.maps.length),i--,c.push(f);return}if(u){c.push(new pe(f.map));let h=f.step.map(u.slice(i)),d;h&&s.maybeStep(h).doc&&(d=s.mapping.maps[s.mapping.maps.length-1],a.push(new pe(d,void 0,void 0,a.length+c.length))),i--,d&&u.appendMap(d,i)}else s.maybeStep(f.step);if(f.selection)return o=u?f.selection.map(u.slice(i)):f.selection,l=new ae(this.items.slice(0,r).append(c.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:o}}addTransform(e,n,r,u){let i=[],s=this.eventCount,o=this.items,l=!u&&o.length?o.get(o.length-1):null;for(let c=0;c<e.steps.length;c++){let f=e.steps[c].invert(e.docs[c]),p=new pe(e.mapping.maps[c],f,n),h;(h=l&&l.merge(p))&&(p=h,c?i.pop():o=o.slice(0,o.length-1)),i.push(p),n&&(s++,n=void 0),u||(l=p)}let a=s-r.depth;return a>Xd&&(o=Yd(o,a),s-=a),new ae(o.append(i),s)}remapping(e,n){let r=new zt;return this.items.forEach((u,i)=>{let s=u.mirrorOffset!=null&&i-u.mirrorOffset>=e?r.maps.length-u.mirrorOffset:void 0;r.appendMap(u.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new ae(this.items.append(e.map(n=>new pe(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],u=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,o=this.eventCount;this.items.forEach(p=>{p.selection&&o--},u);let l=n;this.items.forEach(p=>{let h=i.getMirror(--l);if(h==null)return;s=Math.min(s,h);let d=i.maps[h];if(p.step){let m=e.steps[h].invert(e.docs[h]),g=p.selection&&p.selection.map(i.slice(l+1,h));g&&o++,r.push(new pe(d,m,g))}else r.push(new pe(d))},u);let a=[];for(let p=n;p<s;p++)a.push(new pe(i.maps[p]));let c=this.items.slice(0,u).append(a).append(r),f=new ae(c,o);return f.emptyItemCount()>Gd&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,u=[],i=0;return this.items.forEach((s,o)=>{if(o>=e)u.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(n.slice(r)),a=l&&l.getMap();if(r--,a&&n.appendMap(a,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let f=new pe(a.invert(),l,c),p,h=u.length-1;(p=u.length&&u[h].merge(f))?u[h]=p:u.push(f)}}else s.map&&r--},this.items.length,0),new ae(L.from(u.reverse()),i)}}ae.empty=new ae(L.empty,0);function Yd(t,e){let n;return t.forEach((r,u)=>{if(r.selection&&e--==0)return n=u,!1}),t.slice(n)}class pe{constructor(e,n,r,u){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=u}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new pe(n.getMap().invert(),n,this.selection)}}}class Ne{constructor(e,n,r,u,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=u,this.prevComposition=i}}const Xd=20;function Qd(t,e,n,r){let u=n.getMeta(Qe),i;if(u)return u.historyState;n.getMeta(nh)&&(t=new Ne(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Qe))return s.getMeta(Qe).redo?new Ne(t.done.addTransform(n,void 0,r,dn(e)),t.undone,Ti(n.mapping.maps),t.prevTime,t.prevComposition):new Ne(t.done,t.undone.addTransform(n,void 0,r,dn(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let o=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=o&&(t.prevTime<(n.time||0)-r.newGroupDelay||!eh(n,t.prevRanges)),a=s?ar(t.prevRanges,n.mapping):Ti(n.mapping.maps);return new Ne(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,dn(e)),ae.empty,a,n.time,o??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Ne(t.done.rebased(n,i),t.undone.rebased(n,i),ar(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Ne(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),ar(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function eh(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,u)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&u>=e[i]&&(n=!0)}),n}function Ti(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,u,i,s)=>e.push(i,s));return e}function ar(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let u=e.map(t[r],1),i=e.map(t[r+1],-1);u<=i&&n.push(u,i)}return n}function th(t,e,n){let r=dn(e),u=Qe.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),o=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),u,r),l=new Ne(n?o:i.remaining,n?i.remaining:o,null,0,-1);return i.transform.setSelection(s).setMeta(Qe,{redo:n,historyState:l})}let cr=!1,Oi=null;function dn(t){let e=t.plugins;if(Oi!=e){cr=!1,Oi=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){cr=!0;break}}return cr}const Qe=new cs("history"),nh=new cs("closeHistory");function rh(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Vr({key:Qe,state:{init(){return new Ne(ae.empty,ae.empty,null,0,-1)},apply(e,n,r){return Qd(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,u=r=="historyUndo"?Oo:r=="historyRedo"?Nr:null;return u?(n.preventDefault(),u(e.state,e.dispatch)):!1}}}})}function To(t,e){return(n,r)=>{let u=Qe.getState(n);if(!u||(t?u.undone:u.done).eventCount==0)return!1;if(r){let i=th(u,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const Oo=To(!1,!0),Nr=To(!0,!0);var We={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},An={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},uh=typeof navigator<"u"&&/Mac/.test(navigator.platform),ih=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var $=0;$<10;$++)We[48+$]=We[96+$]=String($);for(var $=1;$<=24;$++)We[$+111]="F"+$;for(var $=65;$<=90;$++)We[$]=String.fromCharCode($+32),An[$]=String.fromCharCode($);for(var fr in We)An.hasOwnProperty(fr)||(An[fr]=We[fr]);function sh(t){var e=uh&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||ih&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?An:We)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const oh=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),lh=typeof navigator<"u"&&/Win/.test(navigator.platform);function ah(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,u,i,s;for(let o=0;o<e.length-1;o++){let l=e[o];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))u=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))oh?s=!0:u=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),u&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function ch(t){let e=Object.create(null);for(let n in t)e[ah(n)]=t[n];return e}function dr(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function hr(t){return new Vr({props:{handleKeyDown:fh(t)}})}function fh(t){let e=ch(t);return function(n,r){let u=sh(r),i,s=e[dr(u,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(u.length==1&&u!=" "){if(r.shiftKey){let o=e[dr(u,r,!1)];if(o&&o(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(lh&&r.ctrlKey&&r.altKey)&&(i=We[r.keyCode])&&i!=u){let o=e[dr(i,r)];if(o&&o(n.state,n.dispatch,n))return!0}}return!1}}const Ir={headings:!0,bold:!0,italic:!0,code:!0,links:!0,bulletList:!0,orderedList:!0,blockquote:!0,codeBlock:!0,horizontalRule:!0,hardBreak:!0,headerLevels:3};function dh(t){return new Vr({view:()=>({update:()=>{t()}}),filterTransaction:()=>(t(),!0)})}const hh=t=>{const{value:e,onChange:n,onInput:r,onBlur:u,class:i,id:s,name:o,hasError:l,disabled:a,autofocus:c=!1,readOnly:f=!1,placeholder:p,showToolbar:h=!1,features:d}=t,m=A.Value.toSignal(f),g=A.Value.toSignal(a??!1),b=A.Value.toSignal(h),k=A.computedOf(d??Ir)(S=>({...Ir,...S})),y=A.prop(null),_=Io.ticker();return A.Fragment(A.Use(Ro.Theme,({appearance:S})=>A.html.div(A.OnDispose(()=>{y.value?.destroy()}),(t.cssInjection??"none")==="none"?null:A.Task(()=>Promise.resolve().then(()=>require("./styles-url-DhmSan6u.cjs")),({default:E})=>No.LinkPortal({id:"beatui-prosemirror-css",href:E})),A.attr.class("bc-prosemirror-editor-container"),A.attr.class(i),A.attr.class(A.Value.map(l??!1,E=>E?"bc-input-container--error":"")),A.attr.id(s),A.attr.name(o),A.When(b,()=>A.When(y.map(E=>E!=null),()=>Cs({view:y,stateUpdate:_,features:k,readOnly:m})),()=>null),A.html.div(A.attr.class("bc-prosemirror-editor"),A.WithElement(E=>{const D=[];return(()=>{try{const O=A.Value.get(e)??"",oe=A.Value.get(m)??!1,yt=A.Value.get(g)??!1,vn=A.Value.get(k),Ct=mh(Br,Qc,vn),Qt=Mi.parse(O)??void 0,we=ph(Ct),zn=je.create({doc:Qt,schema:Ct,plugins:[rh(),hr({"Mod-z":Oo,"Mod-y":Nr,"Mod-Shift-z":Nr}),hr(we),hr(Ql),dh(_.tick)]}),le=new to(E,{state:zn,editable:()=>!oe&&!yt,dispatchTransaction(R){const de=le.state.apply(R);if(le.updateState(de),R.docChanged&&r!=null){const en=lr.serialize(de.doc);r(en)}}});if(y.set(le),A.Value.get(c)&&le.focus(),p!=null&&D.push(A.Value.on(p,R=>{R!=null&&R!==""?E.setAttribute("data-placeholder",R):E.removeAttribute("data-placeholder")})),D.push(A.Value.on(m,R=>{const de=A.Value.get(g);le.setProps({editable:()=>!R&&!de})})),D.push(A.Value.on(g,R=>{const de=A.Value.get(m);le.setProps({editable:()=>!de&&!R})})),D.push(A.Value.on(e,R=>{const de=lr.serialize(le.state.doc);if(R!==de){const en=Mi.parse(R??"");if(en!=null){const Fo=je.create({doc:en,schema:Ct,plugins:le.state.plugins});le.updateState(Fo)}}})),n!=null){const R=()=>{const de=lr.serialize(le.state.doc);n(de)};E.addEventListener("blur",R,!0),D.push(()=>E.removeEventListener("blur",R,!0))}if(u!=null){const R=()=>{u()};E.addEventListener("blur",R,!0),D.push(()=>E.removeEventListener("blur",R,!0))}D.push(S.on(R=>{R==="dark"?E.classList.add("bc-prosemirror-editor--dark"):E.classList.remove("bc-prosemirror-editor--dark")})),D.push(()=>le.destroy())}catch(O){console.error("[BeatUI] Failed to initialize ProseMirror editor:",O);const oe=E;oe.textContent="Failed to load ProseMirror Editor. Please ensure prosemirror packages are installed."}})(),A.OnDispose(()=>{D.forEach(O=>O())})})))))};function ph(t){const e={},n=t.marks.strong;n!=null&&(e["Mod-b"]=(i,s)=>cn(n)(i,s));const r=t.marks.em;r!=null&&(e["Mod-i"]=(i,s)=>cn(r)(i,s));const u=t.marks.code;return u!=null&&(e["Mod-`"]=(i,s)=>cn(u)(i,s)),e}function mh(t,e,n){const r={},u={},i=e.spec.nodes.get("doc"),s=e.spec.nodes.get("text");if(i==null||s==null)throw new Error("Basic schema missing required doc or text nodes");r.doc={...i,content:"block+"},r.text=s;const o=e.spec.nodes.get("paragraph");if(o!=null&&(r.paragraph={...o,content:"inline*"}),n.headings){const l=e.spec.nodes.get("heading");l!=null&&(r.heading={...l,content:"inline*"})}if(n.bulletList){const l=e.spec.nodes.get("bullet_list"),a=e.spec.nodes.get("list_item");l!=null&&(r.bullet_list={...l,content:"list_item+"}),a!=null&&(r.list_item={...a,content:"paragraph block*"})}if(n.orderedList){const l=e.spec.nodes.get("ordered_list"),a=e.spec.nodes.get("list_item");l!=null&&(r.ordered_list={...l,content:"list_item+"}),a!=null&&!r.list_item&&(r.list_item={...a,content:"paragraph block*"})}if(n.blockquote){const l=e.spec.nodes.get("blockquote");l!=null&&(r.blockquote={...l,content:"block+"})}if(n.codeBlock){const l=e.spec.nodes.get("code_block");l!=null&&(r.code_block=l)}if(n.horizontalRule){const l=e.spec.nodes.get("horizontal_rule");l!=null&&(r.horizontal_rule=l)}if(n.hardBreak){const l=e.spec.nodes.get("hard_break");l!=null&&(r.hard_break=l)}if(n.bold){const l=e.spec.marks.get("strong");l!=null&&(u.strong=l)}if(n.italic){const l=e.spec.marks.get("em");l!=null&&(u.em=l)}if(n.code){const l=e.spec.marks.get("code");l!=null&&(u.code=l)}if(n.links){const l=e.spec.marks.get("link");l!=null&&(u.link=l)}return new t({nodes:r,marks:u})}exports.DEFAULT_FEATURES=Ir;exports.Fragment=x;exports.NodeRange=Pi;exports.ProseMirrorMarkdownInput=hh;exports.ProseMirrorToolbar=Cs;exports.ReplaceAroundStep=G;exports.Slice=C;exports.canJoin=Pr;exports.canSplit=Ot;exports.findWrapping=es;exports.liftTarget=jt;
|
|
34
|
+
`)}render(e,n,r){if(this.nodes[e.type.name])this.nodes[e.type.name](this,e,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+e.type.name+"` not supported by Markdown renderer");e.type.isLeaf||(e.type.inlineContent?this.renderInline(e):this.renderContent(e),e.isBlock&&this.closeBlock(e))}}renderContent(e){e.forEach((n,r,u)=>this.render(n,e,u))}renderInline(e,n=!0){this.atBlockStart=n;let r=[],u="",i=(s,o,l)=>{let a=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(a=a.filter(m=>{if(l+1==e.childCount)return!1;let g=e.child(l+1);return m.isInSet(g.marks)&&(!g.isText||/\S/.test(g.text))}));let c=u;if(u="",s&&s.isText&&a.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,g,b]=/^(\s*)(.*)$/m.exec(s.text);g&&(c+=g,s=b?s.withText(b):null,s||(a=r))}if(s&&s.isText&&a.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&(l==e.childCount-1||!m.isInSet(e.child(l+1).marks))})){let[m,g,b]=/^(.*?)(\s*)$/m.exec(s.text);b&&(u=b,s=g?s.withText(g):null,s||(a=r))}let f=a.length?a[a.length-1]:null,p=f&&this.getMark(f.type.name).escape===!1,h=a.length-(p?1:0);e:for(let m=0;m<h;m++){let g=a[m];if(!this.getMark(g.type.name).mixable)break;for(let b=0;b<r.length;b++){let k=r[b];if(!this.getMark(k.type.name).mixable)break;if(g.eq(k)){m>b?a=a.slice(0,b).concat(g).concat(a.slice(b,m)).concat(a.slice(m+1,h)):b>m&&(a=a.slice(0,m).concat(a.slice(m+1,b)).concat(g).concat(a.slice(b,h)));continue e}}}let d=0;for(;d<Math.min(r.length,h)&&a[d].eq(r[d]);)++d;for(;d<r.length;)this.text(this.markString(r.pop(),!1,e,l),!1);if(c&&this.text(c),s){for(;r.length<h;){let m=a[r.length];r.push(m),this.text(this.markString(m,!0,e,l),!1),this.atBlockStart=!1}p&&s.isText?this.text(this.markString(f,!0,e,l)+s.text+this.markString(f,!1,e,l+1),!1):this.render(s,e,l),this.atBlockStart=!1}s?.isText&&s.nodeSize>0&&(this.atBlockStart=!1)};e.forEach(i),i(null,0,e.childCount),this.atBlockStart=!1}renderList(e,n,r){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let u=typeof e.attrs.tight<"u"?e.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=u,e.forEach((s,o,l)=>{l&&u&&this.flushClose(1),this.wrapBlock(n,r(l),e,()=>this.render(s,e,l))}),this.inTightList=i}esc(e,n=!1){return e=e.replace(/[`*\\~\[\]_]/g,(r,u)=>r=="_"&&u>0&&u+1<e.length&&e[u-1].match(/\w/)&&e[u+1].match(/\w/)?r:"\\"+r),n&&(e=e.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,"\\$&")),e}quote(e){let n=e.indexOf('"')==-1?'""':e.indexOf("'")==-1?"''":"()";return n[0]+e+n[1]}repeat(e,n){let r="";for(let u=0;u<n;u++)r+=e;return r}markString(e,n,r,u){let i=this.getMark(e.type.name),s=n?i.open:i.close;return typeof s=="string"?s:s(this,e,r,u)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}}var Sn=200,L=function(){};L.prototype.append=function(e){return e.length?(e=L.from(e),!this.length&&e||e.length<Sn&&this.leafAppend(e)||this.length<Sn&&e.leafPrepend(this)||this.appendInner(e)):this};L.prototype.prepend=function(e){return e.length?L.from(e).append(this):this};L.prototype.appendInner=function(e){return new Zd(this,e)};L.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?L.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};L.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};L.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};L.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var u=[];return this.forEach(function(i,s){return u.push(e(i,s))},n,r),u};L.from=function(e){return e instanceof L?e:e&&e.length?new wo(e):L.empty};var wo=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(u,i){return u==0&&i==this.length?this:new e(this.values.slice(u,i))},e.prototype.getInner=function(u){return this.values[u]},e.prototype.forEachInner=function(u,i,s,o){for(var l=i;l<s;l++)if(u(this.values[l],o+l)===!1)return!1},e.prototype.forEachInvertedInner=function(u,i,s,o){for(var l=i-1;l>=s;l--)if(u(this.values[l],o+l)===!1)return!1},e.prototype.leafAppend=function(u){if(this.length+u.length<=Sn)return new e(this.values.concat(u.flatten()))},e.prototype.leafPrepend=function(u){if(this.length+u.length<=Sn)return new e(u.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(L);L.empty=new wo([]);var Zd=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,u,i,s){var o=this.left.length;if(u<o&&this.left.forEachInner(r,u,Math.min(i,o),s)===!1||i>o&&this.right.forEachInner(r,Math.max(u-o,0),Math.min(this.length,i)-o,s+o)===!1)return!1},e.prototype.forEachInvertedInner=function(r,u,i,s){var o=this.left.length;if(u>o&&this.right.forEachInvertedInner(r,u-o,Math.max(i,o)-o,s+o)===!1||i<o&&this.left.forEachInvertedInner(r,Math.min(u,o),i,s)===!1)return!1},e.prototype.sliceInner=function(r,u){if(r==0&&u==this.length)return this;var i=this.left.length;return u<=i?this.left.slice(r,u):r>=i?this.right.slice(r-i,u-i):this.left.slice(r,i).append(this.right.slice(0,u-i))},e.prototype.leafAppend=function(r){var u=this.right.leafAppend(r);if(u)return new e(this.left,u)},e.prototype.leafPrepend=function(r){var u=this.left.leafPrepend(r);if(u)return new e(u,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(L);const Gd=500;class ae{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let u,i;n&&(u=this.remapping(r,this.items.length),i=u.maps.length);let s=e.tr,o,l,a=[],c=[];return this.items.forEach((f,p)=>{if(!f.step){u||(u=this.remapping(r,p+1),i=u.maps.length),i--,c.push(f);return}if(u){c.push(new pe(f.map));let h=f.step.map(u.slice(i)),d;h&&s.maybeStep(h).doc&&(d=s.mapping.maps[s.mapping.maps.length-1],a.push(new pe(d,void 0,void 0,a.length+c.length))),i--,d&&u.appendMap(d,i)}else s.maybeStep(f.step);if(f.selection)return o=u?f.selection.map(u.slice(i)):f.selection,l=new ae(this.items.slice(0,r).append(c.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:o}}addTransform(e,n,r,u){let i=[],s=this.eventCount,o=this.items,l=!u&&o.length?o.get(o.length-1):null;for(let c=0;c<e.steps.length;c++){let f=e.steps[c].invert(e.docs[c]),p=new pe(e.mapping.maps[c],f,n),h;(h=l&&l.merge(p))&&(p=h,c?i.pop():o=o.slice(0,o.length-1)),i.push(p),n&&(s++,n=void 0),u||(l=p)}let a=s-r.depth;return a>Xd&&(o=Yd(o,a),s-=a),new ae(o.append(i),s)}remapping(e,n){let r=new zt;return this.items.forEach((u,i)=>{let s=u.mirrorOffset!=null&&i-u.mirrorOffset>=e?r.maps.length-u.mirrorOffset:void 0;r.appendMap(u.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new ae(this.items.append(e.map(n=>new pe(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],u=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,o=this.eventCount;this.items.forEach(p=>{p.selection&&o--},u);let l=n;this.items.forEach(p=>{let h=i.getMirror(--l);if(h==null)return;s=Math.min(s,h);let d=i.maps[h];if(p.step){let m=e.steps[h].invert(e.docs[h]),g=p.selection&&p.selection.map(i.slice(l+1,h));g&&o++,r.push(new pe(d,m,g))}else r.push(new pe(d))},u);let a=[];for(let p=n;p<s;p++)a.push(new pe(i.maps[p]));let c=this.items.slice(0,u).append(a).append(r),f=new ae(c,o);return f.emptyItemCount()>Gd&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,u=[],i=0;return this.items.forEach((s,o)=>{if(o>=e)u.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(n.slice(r)),a=l&&l.getMap();if(r--,a&&n.appendMap(a,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let f=new pe(a.invert(),l,c),p,h=u.length-1;(p=u.length&&u[h].merge(f))?u[h]=p:u.push(f)}}else s.map&&r--},this.items.length,0),new ae(L.from(u.reverse()),i)}}ae.empty=new ae(L.empty,0);function Yd(t,e){let n;return t.forEach((r,u)=>{if(r.selection&&e--==0)return n=u,!1}),t.slice(n)}class pe{constructor(e,n,r,u){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=u}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new pe(n.getMap().invert(),n,this.selection)}}}class Ne{constructor(e,n,r,u,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=u,this.prevComposition=i}}const Xd=20;function Qd(t,e,n,r){let u=n.getMeta(Qe),i;if(u)return u.historyState;n.getMeta(nh)&&(t=new Ne(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Qe))return s.getMeta(Qe).redo?new Ne(t.done.addTransform(n,void 0,r,dn(e)),t.undone,Ti(n.mapping.maps),t.prevTime,t.prevComposition):new Ne(t.done,t.undone.addTransform(n,void 0,r,dn(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let o=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=o&&(t.prevTime<(n.time||0)-r.newGroupDelay||!eh(n,t.prevRanges)),a=s?ar(t.prevRanges,n.mapping):Ti(n.mapping.maps);return new Ne(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,dn(e)),ae.empty,a,n.time,o??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Ne(t.done.rebased(n,i),t.undone.rebased(n,i),ar(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Ne(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),ar(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function eh(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,u)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&u>=e[i]&&(n=!0)}),n}function Ti(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,u,i,s)=>e.push(i,s));return e}function ar(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let u=e.map(t[r],1),i=e.map(t[r+1],-1);u<=i&&n.push(u,i)}return n}function th(t,e,n){let r=dn(e),u=Qe.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),o=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),u,r),l=new Ne(n?o:i.remaining,n?i.remaining:o,null,0,-1);return i.transform.setSelection(s).setMeta(Qe,{redo:n,historyState:l})}let cr=!1,Oi=null;function dn(t){let e=t.plugins;if(Oi!=e){cr=!1,Oi=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){cr=!0;break}}return cr}const Qe=new cs("history"),nh=new cs("closeHistory");function rh(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Vr({key:Qe,state:{init(){return new Ne(ae.empty,ae.empty,null,0,-1)},apply(e,n,r){return Qd(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,u=r=="historyUndo"?Oo:r=="historyRedo"?Nr:null;return u?(n.preventDefault(),u(e.state,e.dispatch)):!1}}}})}function To(t,e){return(n,r)=>{let u=Qe.getState(n);if(!u||(t?u.undone:u.done).eventCount==0)return!1;if(r){let i=th(u,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const Oo=To(!1,!0),Nr=To(!0,!0);var We={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},An={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},uh=typeof navigator<"u"&&/Mac/.test(navigator.platform),ih=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var $=0;$<10;$++)We[48+$]=We[96+$]=String($);for(var $=1;$<=24;$++)We[$+111]="F"+$;for(var $=65;$<=90;$++)We[$]=String.fromCharCode($+32),An[$]=String.fromCharCode($);for(var fr in We)An.hasOwnProperty(fr)||(An[fr]=We[fr]);function sh(t){var e=uh&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||ih&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?An:We)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const oh=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),lh=typeof navigator<"u"&&/Win/.test(navigator.platform);function ah(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,u,i,s;for(let o=0;o<e.length-1;o++){let l=e[o];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))u=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))oh?s=!0:u=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),u&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function ch(t){let e=Object.create(null);for(let n in t)e[ah(n)]=t[n];return e}function dr(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function hr(t){return new Vr({props:{handleKeyDown:fh(t)}})}function fh(t){let e=ch(t);return function(n,r){let u=sh(r),i,s=e[dr(u,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(u.length==1&&u!=" "){if(r.shiftKey){let o=e[dr(u,r,!1)];if(o&&o(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(lh&&r.ctrlKey&&r.altKey)&&(i=We[r.keyCode])&&i!=u){let o=e[dr(i,r)];if(o&&o(n.state,n.dispatch,n))return!0}}return!1}}const Ir={headings:!0,bold:!0,italic:!0,code:!0,links:!0,bulletList:!0,orderedList:!0,blockquote:!0,codeBlock:!0,horizontalRule:!0,hardBreak:!0,headerLevels:3};function dh(t){return new Vr({view:()=>({update:()=>{t()}}),filterTransaction:()=>(t(),!0)})}const hh=t=>{const{value:e,onChange:n,onInput:r,onBlur:u,class:i,id:s,name:o,hasError:l,disabled:a,autofocus:c=!1,readOnly:f=!1,placeholder:p,showToolbar:h=!1,features:d}=t,m=A.Value.toSignal(f),g=A.Value.toSignal(a??!1),b=A.Value.toSignal(h),k=A.computedOf(d??Ir)(S=>({...Ir,...S})),y=A.prop(null),_=Io.ticker();return A.Fragment(A.Use(Ro.Theme,({appearance:S})=>A.html.div(A.OnDispose(()=>{y.value?.destroy()}),(t.cssInjection??"none")==="none"?null:A.Task(()=>Promise.resolve().then(()=>require("./styles-url-D8MjxiP-.cjs")),({default:E})=>No.LinkPortal({id:"beatui-prosemirror-css",href:E})),A.attr.class("bc-prosemirror-editor-container"),A.attr.class(i),A.attr.class(A.Value.map(l??!1,E=>E?"bc-input-container--error":"")),A.attr.id(s),A.attr.name(o),A.When(b,()=>A.When(y.map(E=>E!=null),()=>Cs({view:y,stateUpdate:_,features:k,readOnly:m})),()=>null),A.html.div(A.attr.class("bc-prosemirror-editor"),A.WithElement(E=>{const D=[];return(()=>{try{const O=A.Value.get(e)??"",oe=A.Value.get(m)??!1,yt=A.Value.get(g)??!1,vn=A.Value.get(k),Ct=mh(Br,Qc,vn),Qt=Mi.parse(O)??void 0,we=ph(Ct),zn=je.create({doc:Qt,schema:Ct,plugins:[rh(),hr({"Mod-z":Oo,"Mod-y":Nr,"Mod-Shift-z":Nr}),hr(we),hr(Ql),dh(_.tick)]}),le=new to(E,{state:zn,editable:()=>!oe&&!yt,dispatchTransaction(R){const de=le.state.apply(R);if(le.updateState(de),R.docChanged&&r!=null){const en=lr.serialize(de.doc);r(en)}}});if(y.set(le),A.Value.get(c)&&le.focus(),p!=null&&D.push(A.Value.on(p,R=>{R!=null&&R!==""?E.setAttribute("data-placeholder",R):E.removeAttribute("data-placeholder")})),D.push(A.Value.on(m,R=>{const de=A.Value.get(g);le.setProps({editable:()=>!R&&!de})})),D.push(A.Value.on(g,R=>{const de=A.Value.get(m);le.setProps({editable:()=>!de&&!R})})),D.push(A.Value.on(e,R=>{const de=lr.serialize(le.state.doc);if(R!==de){const en=Mi.parse(R??"");if(en!=null){const Fo=je.create({doc:en,schema:Ct,plugins:le.state.plugins});le.updateState(Fo)}}})),n!=null){const R=()=>{const de=lr.serialize(le.state.doc);n(de)};E.addEventListener("blur",R,!0),D.push(()=>E.removeEventListener("blur",R,!0))}if(u!=null){const R=()=>{u()};E.addEventListener("blur",R,!0),D.push(()=>E.removeEventListener("blur",R,!0))}D.push(S.on(R=>{R==="dark"?E.classList.add("bc-prosemirror-editor--dark"):E.classList.remove("bc-prosemirror-editor--dark")})),D.push(()=>le.destroy())}catch(O){console.error("[BeatUI] Failed to initialize ProseMirror editor:",O);const oe=E;oe.textContent="Failed to load ProseMirror Editor. Please ensure prosemirror packages are installed."}})(),A.OnDispose(()=>{D.forEach(O=>O())})})))))};function ph(t){const e={},n=t.marks.strong;n!=null&&(e["Mod-b"]=(i,s)=>cn(n)(i,s));const r=t.marks.em;r!=null&&(e["Mod-i"]=(i,s)=>cn(r)(i,s));const u=t.marks.code;return u!=null&&(e["Mod-`"]=(i,s)=>cn(u)(i,s)),e}function mh(t,e,n){const r={},u={},i=e.spec.nodes.get("doc"),s=e.spec.nodes.get("text");if(i==null||s==null)throw new Error("Basic schema missing required doc or text nodes");r.doc={...i,content:"block+"},r.text=s;const o=e.spec.nodes.get("paragraph");if(o!=null&&(r.paragraph={...o,content:"inline*"}),n.headings){const l=e.spec.nodes.get("heading");l!=null&&(r.heading={...l,content:"inline*"})}if(n.bulletList){const l=e.spec.nodes.get("bullet_list"),a=e.spec.nodes.get("list_item");l!=null&&(r.bullet_list={...l,content:"list_item+"}),a!=null&&(r.list_item={...a,content:"paragraph block*"})}if(n.orderedList){const l=e.spec.nodes.get("ordered_list"),a=e.spec.nodes.get("list_item");l!=null&&(r.ordered_list={...l,content:"list_item+"}),a!=null&&!r.list_item&&(r.list_item={...a,content:"paragraph block*"})}if(n.blockquote){const l=e.spec.nodes.get("blockquote");l!=null&&(r.blockquote={...l,content:"block+"})}if(n.codeBlock){const l=e.spec.nodes.get("code_block");l!=null&&(r.code_block=l)}if(n.horizontalRule){const l=e.spec.nodes.get("horizontal_rule");l!=null&&(r.horizontal_rule=l)}if(n.hardBreak){const l=e.spec.nodes.get("hard_break");l!=null&&(r.hard_break=l)}if(n.bold){const l=e.spec.marks.get("strong");l!=null&&(u.strong=l)}if(n.italic){const l=e.spec.marks.get("em");l!=null&&(u.em=l)}if(n.code){const l=e.spec.marks.get("code");l!=null&&(u.code=l)}if(n.links){const l=e.spec.marks.get("link");l!=null&&(u.link=l)}return new t({nodes:r,marks:u})}exports.DEFAULT_FEATURES=Ir;exports.Fragment=x;exports.NodeRange=Pi;exports.ProseMirrorMarkdownInput=hh;exports.ProseMirrorToolbar=Cs;exports.ReplaceAroundStep=G;exports.Slice=C;exports.canJoin=Pr;exports.canSplit=Ot;exports.findWrapping=es;exports.liftTarget=jt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../index-fYE0_cvI.cjs");exports.DEFAULT_FEATURES=r.DEFAULT_FEATURES;exports.ProseMirrorMarkdownInput=r.ProseMirrorMarkdownInput;exports.ProseMirrorToolbar=r.ProseMirrorToolbar;
|
package/dist/prosemirror.css
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const I = new URL("data:text/css;base64,QGxheWVyIGNvbXBvbmVudHMgewogIC5iYy1wcm9zZW1pcnJvci1lZGl0b3ItY29udGFpbmVyIHsKICAgIGRpc3BsYXk6IGZsZXg7CiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgZ2FwOiB2YXIoLS1zcGFjaW5nLXNtKTsKICAgIG1pbi1oZWlnaHQ6IDIwMHB4OwogICAgaGVpZ2h0OiAxMDAlOwogICAgd2lkdGg6IDEwMCU7CiAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1jb2xvci1uZXV0cmFsLTIwMCk7CiAgICBib3JkZXItcmFkaXVzOiB2YXIoLS1yYWRpdXMtY29udHJvbCwgdmFyKC0tcmFkaXVzLW1kKSk7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1jb2xvci1uZXV0cmFsLTUwKTsKICAgIHBhZGRpbmc6IHZhcigtLXNwYWNpbmctc20pOwogIH0KCiAgLmItZGFyayAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yLWNvbnRhaW5lciB7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1jb2xvci1uZXV0cmFsLTgwMCk7CiAgICBib3JkZXItY29sb3I6IHZhcigtLWNvbG9yLW5ldXRyYWwtNzAwKTsKICB9CgogIC5iYy1wcm9zZW1pcnJvci1lZGl0b3ItY29udGFpbmVyLS1lcnJvciB7CiAgICBib3JkZXItY29sb3I6IHZh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Bmb250LWZhbWlseTogdmFyKAogICAgICAtLWZvbnQtaGVhZGluZywKICAgICAgdmFyKAogICAgICAgIC0tZGVmYXVsdC1oZWFkaW5nLWZvbnQtZmFtaWx5LAogICAgICAgIHZhcigtLWZvbnQtYm9keSwgdmFyKC0tZm9udC1mYW1pbHktc2FucykpCiAgICAgICkKICAgICk7CiAgfQoKICAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yIC5Qcm9zZU1pcnJvciBoMyB7CiAgICBtYXJnaW4tYmxvY2s6IDFyZW0gMC41cmVtOwogICAgZm9udC1zaXplOiAxLjI1cmVtOwogICAgbGluZS1oZWlnaHQ6IDEuNzVyZW07CiAgICBmb250LXdlaWdodDogNjAwOwogICAgZm9udC1mYW1pbHk6IHZhcigKICAgICAgLS1mb250LWhlYWRpbmcsCiAgICAgIHZhcigKICAgICAgICAtLWRlZmF1bHQtaGVhZGluZy1mb250LWZhbWlseSwKICAgICAgICB2YXIoLS1mb250LWJvZHksIHZhcigtLWZvbnQtZmFtaWx5LXNhbnMpKQogICAgICApCiAgICApOwogIH0KCiAgLmJjLXByb3NlbWlycm9yLWVkaXRvciAuUHJvc2VNaXJyb3IgaDQgewogICAgbWFyZ2luLWJsb2NrOiAwLjc1cmVtIDAuNXJlbTsKICAgIGZvbnQtc2l6ZTogMS4xMjVyZW07CiAgICBsaW5lLWhlaWdodDogMS43NXJlbTsKICAgIGZvbnQtd2VpZ2h0OiA2MDA7CiAgICBmb250LWZhbWlseTogdmFyKAogICAgICAtLWZvbnQtaGVhZGluZywKICAgICAgdmFyKAogICAgICAgIC0tZGVmYXVsdC1oZWFkaW5nLWZvbnQtZmFtaWx5LAogICAgICAgIHZhcigtLWZvbnQtYm9keSwgdmFyKC0tZm9udC1mYW1pbHktc2FucykpCiAgICAgICkKICAgICk7CiAgfQoKICAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yIC5Qcm9zZU1pcnJvciBoNSB7CiAgICBtYXJnaW4tYmxvY2s6IDAuNzVyZW0gM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6IG5vbmU7CiAgICBib3JkZXItdG9wOiAxcHggc29saWQgdmFyKC0tY29sb3ItYmFzZS0yMDApOwogICAgbWFyZ2luOiAxcmVtIDA7CiAgfQoKICAuYi1kYXJrIC5iYy1wcm9zZW1pcnJvci1lZGl0b3IgLlByb3NlTWlycm9yIGhyIHsKICAgIGJvcmRlci10b3AtY29sb3I6IHZhcigtLWNvbG9yLWJhc2UtNzAwKTsKICB9CgogIC8qIFNlbGVjdGlvbiAqLwogIC5iYy1wcm9zZW1pcnJvci1lZGl0b3IgLlByb3NlTWlycm9yIDo6c2VsZWN0aW9uIHsKICAgIGJhY2tncm91bmQ6IHZhcigtLWNvbG9yLXByaW1hcnktMjAwKTsKICB9CgogIC5iLWRhcmsgLmJjLXByb3NlbWlycm9yLWVkaXRvciAuUHJvc2VNaXJyb3IgOjpzZWxlY3Rpb24gewogICAgYmFja2dyb3VuZDogdmFyKC0tY29sb3ItcHJpbWFyeS04MDApOwogIH0KCiAgLyogRm9jdXMgc3R5bGVzICovCiAgLmJjLXByb3NlbWlycm9yLWVkaXRvci1jb250YWluZXI6Zm9jdXMtd2l0aGluIHsKICAgIG91dGxpbmU6IDJweCBzb2xpZCB2YXIoLS1jb2xvci1wcmltYXJ5LTUwMCk7CiAgICBvdXRsaW5lLW9mZnNldDogMnB4OwogIH0KCiAgLyogRGlzYWJsZWQgc3RhdGUgKi8KICAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yLWNvbnRhaW5lcjpoYXMoLlByb3NlTWlycm9yW2NvbnRlbnRlZGl0YWJsZT0nZmFsc2UnXSkgewogICAgb3BhY2l0eTogMC42OwogICAgY3Vyc29yOiBub3QtYWxsb3dlZDsKICB9Cn0K", import.meta.url).toString();
|
|
2
|
+
export {
|
|
3
|
+
I as default
|
|
4
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var I=typeof document<"u"?document.currentScript:null;const C=new URL("data:text/css;base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m9udC1zaXplOiAxLjI1cmVtOwogICAgbGluZS1oZWlnaHQ6IDEuNzVyZW07CiAgICBmb250LXdlaWdodDogNjAwOwogICAgZm9udC1mYW1pbHk6IHZhcigKICAgICAgLS1mb250LWhlYWRpbmcsCiAgICAgIHZhcigKICAgICAgICAtLWRlZmF1bHQtaGVhZGluZy1mb250LWZhbWlseSwKICAgICAgICB2YXIoLS1mb250LWJvZHksIHZhcigtLWZvbnQtZmFtaWx5LXNhbnMpKQogICAgICApCiAgICApOwogIH0KCiAgLmJjLXByb3NlbWlycm9yLWVkaXRvciAuUHJvc2VNaXJyb3IgaDQgewogICAgbWFyZ2luLWJsb2NrOiAwLjc1cmVtIDAuNXJlbTsKICAgIGZvbnQtc2l6ZTogMS4xMjVyZW07CiAgICBsaW5lLWhlaWdodDogMS43NXJlbTsKICAgIGZvbnQtd2VpZ2h0OiA2MDA7CiAgICBmb250LWZhbWlseTogdmFyKAogICAgICAtLWZvbnQtaGVhZGluZywKICAgICAgdmFyKAogICAgICAgIC0tZGVmYXVsdC1oZWFkaW5nLWZvbnQtZmFtaWx5LAogICAgICAgIHZhcigtLWZvbnQtYm9keSwgdmFyKC0tZm9udC1mYW1pbHktc2FucykpCiAgICAgICkKICAgICk7CiAgfQoKICAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yIC5Qcm9zZU1pcnJvciBoNSB7CiAgICBtYXJnaW4tYmxvY2s6IDAuNzVyZW0gMC41cmVtOwogICAgZm9udC1zaXplOiAxcmVtOwogICAgbGluZS1oZWlnaHQ6IDEuNXJlbTsKICAgIGZvbnQtd2VpZ2h0OiA2MDA7CiAgICBmb250LWZhbWlseTogdmFyKAogICAgICAtLWZvbnQtaGVhZGluZywKICAgICAgdmFyKAogICAgICAgIC0tZGVmYXVsdC1oZWFkaW5nLWZvbnQtZmFtaWx5LAogICAgICAgIHZhcigtLWZvbnQtYm9keSwgdmFyKC0tZm9udC1mYW1pbHktc2FucykpCiAgICAgICkKICAgICk7CiAgfQoKICAu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lycm9yIDo6c2VsZWN0aW9uIHsKICAgIGJhY2tncm91bmQ6IHZhcigtLWNvbG9yLXByaW1hcnktMjAwKTsKICB9CgogIC5iLWRhcmsgLmJjLXByb3NlbWlycm9yLWVkaXRvciAuUHJvc2VNaXJyb3IgOjpzZWxlY3Rpb24gewogICAgYmFja2dyb3VuZDogdmFyKC0tY29sb3ItcHJpbWFyeS04MDApOwogIH0KCiAgLyogRm9jdXMgc3R5bGVzICovCiAgLmJjLXByb3NlbWlycm9yLWVkaXRvci1jb250YWluZXI6Zm9jdXMtd2l0aGluIHsKICAgIG91dGxpbmU6IDJweCBzb2xpZCB2YXIoLS1jb2xvci1wcmltYXJ5LTUwMCk7CiAgICBvdXRsaW5lLW9mZnNldDogMnB4OwogIH0KCiAgLyogRGlzYWJsZWQgc3RhdGUgKi8KICAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yLWNvbnRhaW5lcjpoYXMoLlByb3NlTWlycm9yW2NvbnRlbnRlZGl0YWJsZT0nZmFsc2UnXSkgewogICAgb3BhY2l0eTogMC42OwogICAgY3Vyc29yOiBub3QtYWxsb3dlZDsKICB9Cn0K",typeof document>"u"?require("url").pathToFileURL(__filename).href:I&&I.tagName.toUpperCase()==="SCRIPT"&&I.src||new URL("styles-url-D8MjxiP-.cjs",document.baseURI).href).toString();exports.default=C;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tempots/beatui",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -178,19 +178,20 @@
|
|
|
178
178
|
"format": "prettier --write \"src/**/*.{ts,js,json,css,html,md}\"",
|
|
179
179
|
"typecheck": "tsc --noEmit",
|
|
180
180
|
"clean": "rm -rf dist",
|
|
181
|
-
"release:
|
|
182
|
-
"release:
|
|
183
|
-
"release:
|
|
184
|
-
"release:
|
|
181
|
+
"release:ensure-login": "node scripts/ensure-npm-login.mjs",
|
|
182
|
+
"release:patch": "pnpm run release:ensure-login && pnpm run release:prepare && pnpm version patch && pnpm run release:publish && pnpm run release:commit",
|
|
183
|
+
"release:minor": "pnpm run release:ensure-login && pnpm run release:prepare && pnpm version minor && pnpm run release:publish && pnpm run release:commit",
|
|
184
|
+
"release:major": "pnpm run release:ensure-login && pnpm run release:prepare && pnpm version major && pnpm run release:publish && pnpm run release:commit",
|
|
185
|
+
"release:prerelease": "pnpm run release:ensure-login && pnpm run release:prepare && pnpm version prerelease && pnpm run release:publish:next && pnpm run release:commit",
|
|
185
186
|
"release:prepare": "pnpm run clean && pnpm run build && pnpm run test",
|
|
186
|
-
"release:publish": "pnpm publish --no-git-checks",
|
|
187
|
-
"release:publish:next": "pnpm publish --tag next --no-git-checks",
|
|
187
|
+
"release:publish": "pnpm run release:ensure-login && pnpm publish --no-git-checks",
|
|
188
|
+
"release:publish:next": "pnpm run release:ensure-login && pnpm publish --tag next --no-git-checks",
|
|
188
189
|
"release:commit": "git add package.json && git commit -m \"chore: release @tempots/beatui@$(node -p 'require(\"./package.json\").version')\" || echo \"Warning: Could not commit to git. Please commit manually.\"",
|
|
189
190
|
"release:commit:dry": "echo \"Would commit with message: chore: release @tempots/beatui@$(node -p 'require(\"./package.json\").version')\"",
|
|
190
|
-
"release:patch:no-commit": "pnpm run release:prepare && pnpm version patch && pnpm run release:publish",
|
|
191
|
-
"release:minor:no-commit": "pnpm run release:prepare && pnpm version minor && pnpm run release:publish",
|
|
192
|
-
"release:major:no-commit": "pnpm run release:prepare && pnpm version major && pnpm run release:publish",
|
|
193
|
-
"release:prerelease:no-commit": "pnpm run release:prepare && pnpm version prerelease && pnpm run release:publish:next",
|
|
191
|
+
"release:patch:no-commit": "pnpm run release:ensure-login && pnpm run release:prepare && pnpm version patch && pnpm run release:publish",
|
|
192
|
+
"release:minor:no-commit": "pnpm run release:ensure-login && pnpm run release:prepare && pnpm version minor && pnpm run release:publish",
|
|
193
|
+
"release:major:no-commit": "pnpm run release:ensure-login && pnpm run release:prepare && pnpm version major && pnpm run release:publish",
|
|
194
|
+
"release:prerelease:no-commit": "pnpm run release:ensure-login && pnpm run release:prepare && pnpm version prerelease && pnpm run release:publish:next",
|
|
194
195
|
"release:dry": "pnpm publish --dry-run --no-git-checks",
|
|
195
196
|
"version:show": "node -p \"'Current version: ' + require('./package.json').version\"",
|
|
196
197
|
"version:next:patch": "pnpm version patch --dry-run",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const I = new URL("data:text/css;base64,QGxheWVyIGNvbXBvbmVudHMgewogIC5iYy1wcm9zZW1pcnJvci1lZGl0b3ItY29udGFpbmVyIHsKICAgIGRpc3BsYXk6IGZsZXg7CiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgZ2FwOiB2YXIoLS1zcGFjaW5nLXNtKTsKICAgIG1pbi1oZWlnaHQ6IDIwMHB4OwogICAgaGVpZ2h0OiAxMDAlOwogICAgd2lkdGg6IDEwMCU7CiAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1jb2xvci1uZXV0cmFsLTIwMCk7CiAgICBib3JkZXItcmFkaXVzOiB2YXIoLS1yYWRpdXMtY29udHJvbCwgdmFyKC0tcmFkaXVzLW1kKSk7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1jb2xvci1uZXV0cmFsLTUwKTsKICAgIHBhZGRpbmc6IHZhcigtLXNwYWNpbmctc20pOwogIH0KCiAgLmItZGFyayAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yLWNvbnRhaW5lciB7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1jb2xvci1uZXV0cmFsLTgwMCk7CiAgICBib3JkZXItY29sb3I6IHZhcigtLWNvbG9yLW5ldXRyYWwtNzAwKTsKICB9CgogIC5iYy1wcm9zZW1pcnJvci1lZGl0b3ItY29udGFpbmVyLS1lcnJvciB7C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IC0tZGVmYXVsdC1oZWFkaW5nLWZvbnQtZmFtaWx5LAogICAgICAgIHZhcigtLWZvbnQtYm9keSwgdmFyKC0tZm9udC1mYW1pbHktc2FucykpCiAgICAgICkKICAgICk7CiAgfQoKICAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yIC5Qcm9zZU1pcnJvciBoMyB7CiAgICBtYXJnaW4tYmxvY2s6IDFyZW0gMC41cmVtOwogICAgZm9udC1zaXplOiAxLjI1cmVtOwogICAgbGluZS1oZWlnaHQ6IDEuNzVyZW07CiAgICBmb250LXdlaWdodDogNjAwOwogICAgZm9udC1mYW1pbHk6IHZhcigKICAgICAgLS1mb250LWhlYWRpbmcsCiAgICAgIHZhcigKICAgICAgICAtLWRlZmF1bHQtaGVhZGluZy1mb250LWZhbWlseSwKICAgICAgICB2YXIoLS1mb250LWJvZHksIHZhcigtLWZvbnQtZmFtaWx5LXNhbnMpKQogICAgICApCiAgICApOwogIH0KCiAgLmJjLXByb3NlbWlycm9yLWVkaXRvciAuUHJvc2VNaXJyb3IgaDQgewogICAgbWFyZ2luLWJsb2NrOiAwLjc1cmVtIDAuNXJlbTsKICAgIGZvbnQtc2l6ZTogMS4xMjVyZW07CiAgICBsaW5lLWhlaWdodDogMS43NXJlbTsKICAgIGZvbnQtd2VpZ2h0OiA2MDA7CiAgICBmb250LWZhbWlseTogdmFyKAogICAgICAtLWZvbnQtaGVhZGluZywKICAgICAgdmFyKAogICAgICAgIC0tZGVmYXVsdC1oZWFkaW5nLWZvbnQtZmFtaWx5LAogICAgICAgIHZhcigtLWZvbnQtYm9keSwgdmFyKC0tZm9udC1mYW1pbHktc2FucykpCiAgICAgICkKICAgICk7CiAgfQoKICAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yIC5Qcm9zZU1pcnJvciBoNSB7CiAgICBtYXJnaW4tYmxvY2s6IDAuNzVyZW0gMC41cmVtOwogICAgZm9udC1zaXplOiAxcmVtOwogICAgbGluZS1oZWlnaHQ6IDEuNXJlbTsK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ApOwogICAgbWFyZ2luOiAxcmVtIDA7CiAgfQoKICAuYi1kYXJrIC5iYy1wcm9zZW1pcnJvci1lZGl0b3IgLlByb3NlTWlycm9yIGhyIHsKICAgIGJvcmRlci10b3AtY29sb3I6IHZhcigtLWNvbG9yLWJhc2UtNzAwKTsKICB9CgogIC8qIFNlbGVjdGlvbiAqLwogIC5iYy1wcm9zZW1pcnJvci1lZGl0b3IgLlByb3NlTWlycm9yIDo6c2VsZWN0aW9uIHsKICAgIGJhY2tncm91bmQ6IHZhcigtLWNvbG9yLXByaW1hcnktMjAwKTsKICB9CgogIC5iLWRhcmsgLmJjLXByb3NlbWlycm9yLWVkaXRvciAuUHJvc2VNaXJyb3IgOjpzZWxlY3Rpb24gewogICAgYmFja2dyb3VuZDogdmFyKC0tY29sb3ItcHJpbWFyeS04MDApOwogIH0KCiAgLyogRm9jdXMgc3R5bGVzICovCiAgLmJjLXByb3NlbWlycm9yLWVkaXRvci1jb250YWluZXI6Zm9jdXMtd2l0aGluIHsKICAgIG91dGxpbmU6IDJweCBzb2xpZCB2YXIoLS1jb2xvci1wcmltYXJ5LTUwMCk7CiAgICBvdXRsaW5lLW9mZnNldDogMnB4OwogIH0KCiAgLyogRGlzYWJsZWQgc3RhdGUgKi8KICAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yLWNvbnRhaW5lcjpoYXMoLlByb3NlTWlycm9yW2NvbnRlbnRlZGl0YWJsZT0nZmFsc2UnXSkgewogICAgb3BhY2l0eTogMC42OwogICAgY3Vyc29yOiBub3QtYWxsb3dlZDsKICB9Cn0K", import.meta.url).toString();
|
|
2
|
-
export {
|
|
3
|
-
I as default
|
|
4
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var I=typeof document<"u"?document.currentScript:null;const C=new URL("data:text/css;base64,QGxheWVyIGNvbXBvbmVudHMgewogIC5iYy1wcm9zZW1pcnJvci1lZGl0b3ItY29udGFpb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pb24gewogICAgYmFja2dyb3VuZDogdmFyKC0tY29sb3ItcHJpbWFyeS04MDApOwogIH0KCiAgLyogRm9jdXMgc3R5bGVzICovCiAgLmJjLXByb3NlbWlycm9yLWVkaXRvci1jb250YWluZXI6Zm9jdXMtd2l0aGluIHsKICAgIG91dGxpbmU6IDJweCBzb2xpZCB2YXIoLS1jb2xvci1wcmltYXJ5LTUwMCk7CiAgICBvdXRsaW5lLW9mZnNldDogMnB4OwogIH0KCiAgLyogRGlzYWJsZWQgc3RhdGUgKi8KICAuYmMtcHJvc2VtaXJyb3ItZWRpdG9yLWNvbnRhaW5lcjpoYXMoLlByb3NlTWlycm9yW2NvbnRlbnRlZGl0YWJsZT0nZmFsc2UnXSkgewogICAgb3BhY2l0eTogMC42OwogICAgY3Vyc29yOiBub3QtYWxsb3dlZDsKICB9Cn0K",typeof document>"u"?require("url").pathToFileURL(__filename).href:I&&I.tagName.toUpperCase()==="SCRIPT"&&I.src||new URL("styles-url-DhmSan6u.cjs",document.baseURI).href).toString();exports.default=C;
|