找回密码
 立即注册
搜索
热搜: 丝袜 魅魔 黑丝
查看: 6|回复: 0

20032132_高贵的黑丝红裙仙门宫主,看见白丝淫萝师祖带其徒弟援交被肏成母猪,大开处子花穴迎接肥猪猛肏播种,抛弃身份甘愿成为母狗精便壶

[复制链接]

13万

主题

343

回帖

22万

积分

管理员

站长

UID
1
积分
224400
余额
13 R
Moe币
84881
在线时间
279 小时
注册时间
2025-12-28
最后登录
2026-11-9
发表于 2026-9-3 23:00:59 | 显示全部楼层 |阅读模式
(window.webpackJsonp=window.webpackJsonp||[]).push([["7660"],{"164e":function(t,e,n){"use strict";var r,i,o;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(r||(r={})),function(t){t.TOP="top",t.MIDDLE="middle",t.BOTTOM="bottom"}(i||(i={})),function(t){t.SOLID="solid",t.NONE="none"}(o||(o={}))},"20fb":function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("619f"),i={name:r.k,version:"1.0.1",type:r.f}},"213c":function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("619f"),i={name:r.e,version:"1.0.1",type:r.f}},"2a07":function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("619f"),i={name:r.j,version:"1.0.1",type:r.f,attrs:{id:{default:""}},inclusive:!1}},"30a8":function(t,e,n){"use strict";var r,i,o;n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),function(t){t.FONT="font",t.PAGE_WIDTH="pageWidth"}(r||(r={})),function(t){t.SystemFont="SystemFont",t.wpshyqh="wpshyqh",t.wpshyxs="wpshyxs"}(i||(i={})),function(t){t.FULL_WIDTH="FULL_WIDTH",t.BIT_WIDE="BIT_WIDE",t.STANDARD_WIDTH="STANDARD_WIDTH"}(o||(o={}))},3133:function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("fd70"),i={name:r.f,version:"1.0.1",type:r.e,content:"text*",group:"block",marks:"",attrs:{textAlign:{default:""},extraAttrs:{default:{rightsEditors:[]}}},selectable:!1}},"3c3c":function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("619f"),i={name:r.c,version:"1.0.1",type:r.f,attrs:{fontFamily:{default:"serif"}}}},"3d056":function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("619f"),i={name:r.g,version:"1.0.1",type:r.f}},"4b89":function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return o}));var r=n("619f"),i=n("d962"),o={name:r.b,version:"1.0.1",type:r.f,attrs:{backgroundColor:{default:""},fontSize:{default:i.a},hyperlinkMarkAttrs:{default:""}},excludes:"".concat(r.h," ").concat(r.i),inclusive:!1}},"619f":function(t,e,n){"use strict";n.d(e,"f",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"e",(function(){return s})),n.d(e,"g",(function(){return a})),n.d(e,"k",(function(){return u})),n.d(e,"d",(function(){return h})),n.d(e,"c",(function(){return c})),n.d(e,"i",(function(){return l})),n.d(e,"h",(function(){return f})),n.d(e,"j",(function(){return p}));var r="mark",i="bold",o="code",s="italic",a="strike",u="underline",h="fontSize",c="fontFamily",l="sup",f="sub",p="tag"},"83b8":function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("fd70"),i={name:r.d,version:"1.0.1",type:r.e,group:"block",isMonopolize:!0,selectable:!0}},"880e":function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("619f"),i={name:r.a,version:"1.0.1",type:r.f}},8836:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.TITLE_VIEW="titleView",t.CARD_VIEW="cardView"}(r||(r={}))},a55d:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r="8.7.35_8f6154a6ddf2b2ef15baa48f377997e6";function i(){var t=/^\d+\.\d+\.\d+/.exec(r);if(!t||!t[0])throw new Error("Invalid version: "+r);return t[0]}},a760:function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("fd70"),i={name:r.c,version:"1.0.3",type:r.e,content:"inline*",group:"block",attrs:{level:{default:1},textIndent:{default:0},paddingLeft:{default:0},textAlign:{default:""},listId:{default:""},listType:{default:""},listValue:{default:""},listLevel:{default:""},listFormat:{default:""},backgroundColor:{default:0},marks:{default:{}}},defining:!0,draggable:!1,selectable:!1}},b2a8:function(t,e,n){"use strict";var r,i,o,s,a,u,h,c;n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return R})),function(t){t[t.transparent=0]="transparent",t[t["#FFFAEB"]=1]="#FFFAEB",t[t["#FFF5EB"]=2]="#FFF5EB",t[t["#FFECEB"]=3]="#FFECEB",t[t["#EBFFF2"]=4]="#EBFFF2",t[t["#EAFEFD"]=5]="#EAFEFD",t[t["#EBF2FF"]=6]="#EBF2FF",t[t["#EBEDFF"]=7]="#EBEDFF",t[t["#FAF0FF"]=8]="#FAF0FF",t[t["#F2F2F2"]=9]="#F2F2F2"}(c||(c={}));new RegExp("".concat("FGC_","([\\d]+)"));var l="#FCF5AA",f="#D1EFC4",p="#F9D9DC",d="#DAE2EC",v={yellow:"#FBF5B3",orange:"#F8D7B7",pink:"#F7C7D3",green:"#DFF0C4",darkGreen:"#C6EADD",blue:"#D9EEFB",lightBlue:"#D5DCF7",violet:"#E6D6F0",gray:"#E6E6E6"},y=((r={})["#F7DDB9"]=v.orange,r[l]=v.yellow,r[f]=v.green,r[p]=v.pink,r[d]=v.gray,{backgroundColor:"transparent",fontColor:"inherit",fontGradientColor:""}),m="#FEC794",k="#F2A7A7",g="#AFE3BB",w="#98C1FF",x="#E5B5FD",S="#C5C5C5",E={lightYellow:"#FAF1E6",pink:"#FAE6E6",green:"#E6FAEB",darkBlur:"#E6EEFA",lightViolet:"#F5EBFA",lightGray:"#EBEBEB"},b="",C=c[1],M=c[2],F=c[3],O=c[4],T=c[5],N=c[6],_=c[7],A=c[8],B=c[9],I="rgba(13, 13, 13, 0.06)",z="#E6E6E6",R=((i={})[b]="#EBEBEB",i[C]=I,i[M]=I,i[F]=I,i[O]=I,i[T]=I,i[N]=I,i[_]=I,i[A]=I,i[B]=I,(o={})[b]="none",o[C]=z,o[M]=z,o[F]=z,o[O]=z,o[T]=z,o[N]=z,o[_]=z,o[A]=z,o[B]=z,(s={})[E.lightYellow]=m,s[E.pink]=k,s[E.green]=g,s[E.darkBlur]=w,s[E.lightViolet]=x,s[E.lightGray]=S,(a={})["".concat("CELL_BG","_1")]="#FFFAEB",a["".concat("CELL_BG","_2")]="#FFF5EB",a["".concat("CELL_BG","_3")]="#FFECEB",a["".concat("CELL_BG","_4")]="#EBFFF2",a["".concat("CELL_BG","_5")]="#EAFEFD",a["".concat("CELL_BG","_6")]="#EBF2FF",a["".concat("CELL_BG","_7")]="#EBEDFF",a["".concat("CELL_BG","_8")]="#FAF0FF",a["".concat("CELL_BG","_0")]="#F2F2F2",(u={})["".concat("CELL_BG","_1")]=I,u["".concat("CELL_BG","_2")]=I,u["".concat("CELL_BG","_3")]=I,u["".concat("CELL_BG","_4")]=I,u["".concat("CELL_BG","_5")]=I,u["".concat("CELL_BG","_6")]=I,u["".concat("CELL_BG","_7")]=I,u["".concat("CELL_BG","_8")]=I,u["".concat("CELL_BG","_0")]=I,(h={})["".concat("CELL_BG","_1")]=z,h["".concat("CELL_BG","_2")]=z,h["".concat("CELL_BG","_3")]=z,h["".concat("CELL_BG","_4")]=z,h["".concat("CELL_BG","_5")]=z,h["".concat("CELL_BG","_6")]=z,h["".concat("CELL_BG","_7")]=z,h["".concat("CELL_BG","_8")]=z,h["".concat("CELL_BG","_0")]=z,null)},b2e1:function(t,e,n){"use strict";n.r(e),n.d(e,"Spec",(function(){return i}));var r=n("fd70"),i={name:r.a,version:"1.0.1",type:r.e,group:"block",inline:!1,selectable:!0,atom:!0,attrs:{id:{default:""},width:{default:300},height:{default:300},aimType:{default:""}},defining:!0,isolating:!1,isMonopolize:!0,draggable:!1,isHoverBorder:!0}},b772:function(t,e,n){"use strict";n.d(e,"a",(function(){return he}));var r=n("7eda"),i=n.n(r),o=n("174b"),s=n.n(o),a=n("5689"),u=n.n(a),h=n("6b8d"),c=n.n(h),l=n("6633"),f=n.n(l);function p(t,e,n){for(var r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;var i=t.child(r),o=e.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(var s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){var a=p(i.content,o.content,n+1);if(null!=a)return a}n+=i.nodeSize}else n+=i.nodeSize}}function d(t,e,n,r){for(var i=t.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};var s=t.child(--i),a=e.child(--o),u=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){for(var h=0,c=Math.min(s.text.length,a.text.length);h<c&&s.text[s.text.length-h-1]==a.text[a.text.length-h-1];)h++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){var l=d(s.content,a.content,n-1,r-1);if(l)return l}n-=u,r-=u}else n-=u,r-=u}}var v=function(){function t(e,n){if(c()(this,t),this.content=e,this.size=n||0,null==n)for(var r=0;r<e.length;r++)this.size+=e[r].nodeSize}return f()(t,[{key:"nodesBetween",value:function(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments[4],o=0,s=0;s<e;o++){var a=this.content[o],u=s+a.nodeSize;if(u>t&&!1!==n(a,r+s,i,o)&&a.content.size){var h=s+1;a.nodesBetween(Math.max(0,t-h),Math.min(a.content.size,e-h),n,r+h)}s=u}}},{key:"descendants",value:function(t){this.nodesBetween(0,this.size,t)}},{key:"textBetween",value:function(t,e,n,r){var i="",o=!0;return this.nodesBetween(t,e,(function(s,a){s.isText?(i+=s.text.slice(Math.max(t,a)-a,e-a),o=!n):s.isLeaf&&r?(i+=r,o=!n):!o&&s.isBlock&&(i+=n,o=!0)}),0),i}},{key:"append",value:function(e){if(!e.size)return this;if(!this.size)return e;var n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new t(i,this.size+e.size)}},{key:"cut",value:function(e,n){if(null==n&&(n=this.size),0==e&&n==this.size)return this;var r=[],i=0;if(n>e)for(var o=0,s=0;s<n;o++){var a=this.content[o],u=s+a.nodeSize;u>e&&((s<e||u>n)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=u}return new t(r,i)}},{key:"cutByIndex",value:function(e,n){return e==n?t.empty:0==e&&n==this.content.length?this:new t(this.content.slice(e,n))}},{key:"replaceChild",value:function(e,n){var r=this.content[e];if(r==n)return this;var i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new t(i,o)}},{key:"addToStart",value:function(e){return new t([e].concat(this.content),this.size+e.nodeSize)}},{key:"addToEnd",value:function(e){return new t(this.content.concat(e),this.size+e.nodeSize)}},{key:"eq",value:function(t){if(this.content.length!=t.content.length)return!1;for(var e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}},{key:"child",value:function(t){var e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range.");return e}},{key:"maybeChild",value:function(t){return this.content[t]}},{key:"forEach",value:function(t){for(var e=0,n=0;e<this.content.length;e++){var r=this.content[e];t(r,n,e),n+=r.nodeSize}}},{key:"findDiffStart",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return p(this,t,e)}},{key:"findDiffEnd",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.size;return d(this,t,e,n)}},{key:"findIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==t)return m(0,t);if(t==this.size)return m(this.content.length,t);if(t>this.size||t<0)throw new RangeError("Position "+t+" outside of fragment. And size is "+this.size);for(var n=0,r=0;;n++){var i=this.child(n),o=r+i.nodeSize;if(o>=t)return o==t||e>0?m(n+1,o):m(n,r);r=o}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}}],[{key:"fromJSON",value:function(e,n){if(!n)return t.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new t(n.map(e.nodeFromJSON))}},{key:"fromArray",value:function(e){if(!e.length)return t.empty;for(var n=void 0,r=0,i=0;i<e.length;i++){var o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new t(n||e,r)}},{key:"from",value:function(e){if(!e)return t.empty;if(e instanceof t)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new t([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),t}(),y={index:0,offset:0};function m(t,e){return y.index=t,y.offset=e,y}v.empty=new v([],0);var k=n("134e"),g=n.n(k);function w(t,e){if(t===e)return!0;if(!t||"object"!=(void 0===t?"undefined":g()(t))||!e||"object"!=(void 0===e?"undefined":g()(e)))return!1;var n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(!w(t[r],e[r]))return!1}else{for(var i in t)if(!(i in e)||!w(t[i],e[i]))return!1;for(var o in e)if(!(o in t))return!1}return!0}var x=function(){function t(e,n){c()(this,t),this.type=e,this.attrs=n}return f()(t,[{key:"addToSet",value:function(t){for(var e=void 0,n=!1,r=0;r<t.length;r++){var i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}},{key:"removeFromSet",value:function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}},{key:"isInSet",value:function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}},{key:"eq",value:function(t){return this==t||this.type==t.type&&w(this.attrs,t.attrs)}},{key:"toJSON",value:function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return t}}],[{key:"fromJSON",value:function(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");var n=t.marks[e.type];if(!n)throw new RangeError("There is no mark type "+e.type+" in this schema");return n.create(e.attrs)}},{key:"sameSet",value:function(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}},{key:"setFrom",value:function(e){if(!e||0==e.length)return t.none;if(e instanceof t)return[e];var n=e.slice();return n.sort((function(t,e){return t.type.rank-e.type.rank})),n}}]),t}();function S(t){var e=Error.call(this,t);return e.__proto__=S.prototype,e}x.none=[],S.prototype=Object.create(Error.prototype),S.prototype.constructor=S,S.prototype.name="ReplaceError";var E=function(){function t(e,n,r){c()(this,t),this.content=e,this.openStart=n,this.openEnd=r}return f()(t,[{key:"insertAt",value:function(e,n){var r=function t(e,n,r,i){var o=e.findIndex(n),s=o.index,a=o.offset,u=e.maybeChild(s);if(a==n||u.isText)return i&&!i.canReplace(s,s,r)?null:e.cut(0,n).append(r).append(e.cut(n));var h=t(u.content,n-a-1,r);return h&&e.replaceChild(s,u.copy(h))}(this.content,e+this.openStart,n,null);return r&&new t(r,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(e,n){return new t(function t(e,n,r){var i=e.findIndex(n),o=i.index,s=i.offset,a=e.maybeChild(o),u=e.findIndex(r),h=u.index,c=u.offset;if(s==n||a.isText){if(c!=r&&!e.child(h).isText)throw new RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(r))}if(o!=h)throw new RangeError("Removing non-flat range");return e.replaceChild(o,a.copy(t(a.content,n-s-1,r-s-1)))}(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}},{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}}],[{key:"fromJSON",value:function(e,n){if(!n)return t.empty;var r=n.openStart||0,i=n.openEnd||0;if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid input for Slice.fromJSON");return new t(v.fromJSON(e,n.content),r,i)}},{key:"maxOpen",value:function(e){for(var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=0,i=0,o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(var s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new t(e,r,i)}}]),t}();function b(t,e,n){if(n.openStart>t.depth)throw new S("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new S("Inconsistent open depths");return function t(e,n,r,i){var o=e.index(i),s=e.node(i);if(o==n.index(i)&&i<e.depth-r.openStart){var a=t(e,n,r,i+1);return s.copy(s.content.replaceChild(o,a))}if(r.content.size){if(r.openStart||r.openEnd||e.depth!=i||n.depth!=i){var u=function(t,e){for(var n=e.depth-t.openStart,r=e.node(n).copy(t.content),i=n-1;i>=0;i--)r=e.node(i).copy(v.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(r,e),h=u.start,c=u.end;return T(s,function t(e,n,r,i,o){var s=e.depth>o&&M(e,n,o+1),a=i.depth>o&&M(r,i,o+1),u=[];O(null,e,o,u),s&&a&&n.index(o)==r.index(o)?(C(s,a),F(T(s,t(e,n,r,i,o+1)),u)):(s&&F(T(s,N(e,n,o+1)),u),O(n,r,o,u),a&&F(T(a,N(r,i,o+1)),u));return O(i,null,o,u),new v(u)}(e,h,c,n,i))}var l=e.parent,f=l.content;return T(l,f.cut(0,e.parentOffset).append(r.content).append(f.cut(n.parentOffset)))}return T(s,N(e,n,i))}(t,e,n,0)}function C(t,e){if(!e.type.compatibleContent(t.type))throw new S("Cannot join "+e.type.name+" onto "+t.type.name)}function M(t,e,n){var r=t.node(n);return C(r,e.node(n)),r}function F(t,e){var n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function O(t,e,n,r){var i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(F(t.nodeAfter,r),o++));for(var a=o;a<s;a++)F(i.child(a),r);e&&e.depth==n&&e.textOffset&&F(e.nodeBefore,r)}function T(t,e){if(!t.type.validContent(e))throw new S("Invalid content for node "+t.type.name);return t.copy(e)}function N(t,e,n){var r=[];(O(null,t,n,r),t.depth>n)&&F(T(M(t,e,n+1),N(t,e,n+1)),r);return O(e,null,n,r),new v(r)}E.empty=new E(v.empty,0,0);var _=function(){function t(e,n,r){c()(this,t),this.pos=e,this.path=n,this.depth=n.length/3-1,this.parentOffset=r}return f()(t,[{key:"resolveDepth",value:function(t){return null==t?this.depth:t<0?this.depth+t:t}},{key:"node",value:function(t){return this.path[3*this.resolveDepth(t)]}},{key:"index",value:function(t){return this.path[3*this.resolveDepth(t)+1]}},{key:"indexAfter",value:function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}},{key:"start",value:function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}},{key:"end",value:function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}},{key:"before",value:function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}},{key:"after",value:function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}},{key:"posAtIndex",value:function(t,e){e=this.resolveDepth(e);for(var n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1,i=0;i<t;i++)r+=n.child(i).nodeSize;return r}},{key:"marks",value:function(){var t=this.parent,e=this.index();if(0==t.content.size)return x.none;if(this.textOffset)return t.child(e).marks;var n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){var i=n;n=r,r=i}for(var o=n.marks,s=0;s<o.length;s++)!1!==o[s].type.spec.inclusive||r&&o[s].isInSet(r.marks)||(o=o[s--].removeFromSet(o));return o}},{key:"marksAcross",value:function(t){var e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;for(var n=e.marks,r=t.parent.maybeChild(t.index()),i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}},{key:"sharedDepth",value:function(t){for(var e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}},{key:"blockRange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,e=arguments[1];if(t.pos<this.pos)return t.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new z(this,t,n)}},{key:"sameParent",value:function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}},{key:"max",value:function(t){return t.pos>this.pos?t:this}},{key:"min",value:function(t){return t.pos<this.pos?t:this}},{key:"toString",value:function(){for(var t="",e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}},{key:"nodeBefore",get:function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}}],[{key:"resolve",value:function(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");for(var r=[],i=0,o=n,s=e;;){var a=s.content.findIndex(o),u=a.index,h=a.offset,c=o-h;if(r.push(s,u,i+h),!c)break;if((s=s.child(u)).isText)break;o=c-1,i+=h+1}return new t(n,r,o)}},{key:"resolveCached",value:function(e,n){for(var r=0;r<A.length;r++){var i=A[r];if(i.pos==n&&i.doc==e)return i}var o=A[B]=t.resolve(e,n);return B=(B+1)%I,o}}]),t}(),A=[],B=0,I=12,z=function(){function t(e,n,r){c()(this,t),this.$from=e,this.$to=n,this.depth=r}return f()(t,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),t}(),R=Object.create(null),D=function(){function t(e,n,r,i){c()(this,t),this.type=e,this.attrs=n,this.content=r||v.empty,this.marks=i||x.none}return f()(t,[{key:"child",value:function(t){return this.content.child(t)}},{key:"maybeChild",value:function(t){return this.content.maybeChild(t)}},{key:"forEach",value:function(t){this.content.forEach(t)}},{key:"nodesBetween",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(t,e,n,r,this)}},{key:"descendants",value:function(t){this.nodesBetween(0,this.content.size,t)}},{key:"textBetween",value:function(t,e,n,r){return this.content.textBetween(t,e,n,r)}},{key:"eq",value:function(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}},{key:"sameMarkup",value:function(t){return this.hasMarkup(t.type,t.attrs,t.marks)}},{key:"hasMarkup",value:function(t,e,n){return this.type==t&&w(this.attrs,e||t.defaultAttrs||R)&&x.sameSet(this.marks,n||x.none)}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t==this.content?this:new this.constructor(this.type,this.attrs,t,this.marks)}},{key:"mark",value:function(t){return t==this.marks?this:new this.constructor(this.type,this.attrs,this.content,t)}},{key:"cut",value:function(t,e){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}},{key:"slice",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t==e)return E.empty;var r=this.resolve(t),i=this.resolve(e),o=n?0:r.sharedDepth(e),s=r.start(o),a=r.node(o),u=a.content.cut(r.pos-s,i.pos-s);return new E(u,r.depth-o,i.depth-o)}},{key:"replace",value:function(t,e,n){return b(this.resolve(t),this.resolve(e),n)}},{key:"nodeAt",value:function(t){for(var e=this;;){var n=e.content.findIndex(t),r=n.index,i=n.offset;if(!(e=e.maybeChild(r)))return null;if(i==t||e.isText)return e;t-=i+1}}},{key:"childAfter",value:function(t){var e=this.content.findIndex(t),n=e.index,r=e.offset;return{node:this.content.maybeChild(n),index:n,offset:r}}},{key:"childBefore",value:function(t){if(0==t)return{node:null,index:0,offset:0};var e=this.content.findIndex(t),n=e.index,r=e.offset;if(r<t)return{node:this.content.child(n),index:n,offset:r};var i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}},{key:"resolve",value:function(t){return _.resolveCached(this,t)}},{key:"resolveNoCache",value:function(t){return _.resolve(this,t)}},{key:"rangeHasMark",value:function(t,e,n){var r=!1;return e>t&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r}},{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),J(this.marks,t)}},{key:"contentMatchAt",value:function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}},{key:"canReplace",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v.empty,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.childCount,o=this.contentMatchAt(t).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(var a=r;a<i;a++)if(!this.type.allowsMarks(n.child(a).marks))return!1;return!0}},{key:"canReplaceWith",value:function(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;var i=this.contentMatchAt(t).matchType(n),o=i&&i.matchFragment(this.content,e);return!!o&&o.validEnd}},{key:"canAppend",value:function(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}},{key:"check",value:function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));this.content.forEach((function(t){return t.check()}))}},{key:"toJSON",value:function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((function(t){return t.toJSON()}))),t}},{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"textContent",get:function(){return this.textBetween(0,this.content.size,"")}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}}],[{key:"fromJSON",value:function(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}var r=v.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)}}]),t}(),L=function(t){function e(t,n,r,o){c()(this,e);var s=i()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,null,o));if(!r)throw new RangeError("Empty text nodes are not allowed");return s.text=r,s}return u()(e,t),f()(e,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):J(this.marks,JSON.stringify(this.text))}},{key:"textBetween",value:function(t,e){return this.text.slice(t,e)}},{key:"mark",value:function(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}},{key:"withText",value:function(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}},{key:"cut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}},{key:"eq",value:function(t){return this.sameMarkup(t)&&this.text==t.text}},{key:"toJSON",value:function(){var t=s()(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"toJSON",this).call(this);return t.text=this.text,t}},{key:"textContent",get:function(){return this.text}},{key:"nodeSize",get:function(){return this.text.length}}]),e}(D);function J(t,e){for(var n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}function $(t){this.content=t}$.prototype={constructor:$,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return-1==i?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new $(o)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new $(n)},addToStart:function(t,e){return new $([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new $(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(-1==o?i.length:o,0,e,n),new $(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=$.from(t)).size?new $(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=$.from(t)).size?new $(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=$.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},get size(){return this.content.length>>1}},$.from=function(t){if(t instanceof $)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new $(e)};var j=$,P=function(){function t(e){c()(this,t),this.validEnd=e,this.next=[],this.wrapCache=[]}return f()(t,[{key:"matchType",value:function(t){for(var e=0;e<this.next.length;e+=2)if(this.next[e]==t)return this.next[e+1];return null}},{key:"matchFragment",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.childCount,r=this,i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}},{key:"compatible",value:function(t){for(var e=0;e<this.next.length;e+=2)for(var n=0;n<t.next.length;n+=2)if(this.next[e]==t.next[n])return!0;return!1}},{key:"fillBefore",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[this];function i(o,s){var a=o.matchFragment(t,n);if(a&&(!e||a.validEnd))return v.from(s.map((function(t){return t.createAndFill()})));for(var u=0;u<o.next.length;u+=2){var h=o.next[u],c=o.next[u+1];if(!h.isText&&!h.hasRequiredAttrs()&&-1==r.indexOf(c)){r.push(c);var l=i(c,s.concat(h));if(l)return l}}}return i(this,[])}},{key:"findWrapping",value:function(t){for(var e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];var n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}},{key:"computeWrapping",value:function(t){for(var e=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),i=r.match;if(i.matchType(t)){for(var o=[],s=r;s.type;s=s.via)o.push(s.type);return o.reverse()}for(var a=0;a<i.next.length;a+=2){var u=i.next[a];u.isLeaf||u.hasRequiredAttrs()||u.name in e||r.type&&!i.next[a+1].validEnd||(n.push({match:u.contentMatch,type:u,via:r}),e[u.name]=!0)}}}},{key:"edge",value:function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}}},{key:"toString",value:function(){var t=[];return function e(n){t.push(n);for(var r=1;r<n.next.length;r+=2)-1==t.indexOf(n.next[r])&&e(n.next[r])}(this),t.map((function(e,n){for(var r=n+(e.validEnd?"*":" ")+" ",i=0;i<e.next.length;i+=2)r+=(i?", ":"")+e.next[i].name+"->"+t.indexOf(e.next[i+1]);return r})).join("\n")}},{key:"inlineContent",get:function(){var t=this.next[0];return!!t&&t.isInline}},{key:"defaultType",get:function(){for(var t=0;t<this.next.length;t+=2){var e=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}}},{key:"edgeCount",get:function(){return this.next.length>>1}}],[{key:"parse",value:function(e,n){var r=new W(e,n);if(null==r.next)return t.empty;var i=q(r);r.next&&r.err("Unexpected trailing text");var o=function(t){var e=Object.create(null);return function n(r){var i=[];r.forEach((function(e){t[e].forEach((function(e){var n=e.term,r=e.to;if(n){var o=i.indexOf(n),s=o>-1&&i[o+1];Y(t,r).forEach((function(t){s||i.push(n,s=[]),-1==s.indexOf(t)&&s.push(t)}))}}))}));for(var o=e[r.join(",")]=new P(r.indexOf(t.length-1)>-1),s=0;s<i.length;s+=2){var a=i[s+1].sort(K);o.next.push(i[s],e[a.join(",")]||n(a))}return o}(Y(t,0))}(function(t){var e=[[]];return i(function t(e,o){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(t(n,o))}),[]);if("seq"==e.type)for(var s=0;;s++){var a=t(e.exprs[s],o);if(s==e.exprs.length-1)return a;i(a,o=n())}else{if("star"==e.type){var u=n();return r(o,u),i(t(e.expr,u),u),[r(u)]}if("plus"==e.type){var h=n();return i(t(e.expr,o),h),i(t(e.expr,h),h),[r(h)]}if("opt"==e.type)return[r(o)].concat(t(e.expr,o));if("range"==e.type){for(var c=o,l=0;l<e.min;l++){var f=n();i(t(e.expr,c),f),c=f}if(-1==e.max)i(t(e.expr,c),c);else for(var p=e.min;p<e.max;p++){var d=n();r(c,d),i(t(e.expr,c),d),c=d}return[r(c)]}if("name"==e.type)return[r(o,null,e.value)]}}(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){var i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach((function(t){return t.to=e}))}}(i));return function(t,e){for(var n=0,r=[t];n<r.length;n++){for(var i=r[n],o=!i.validEnd,s=[],a=0;a<i.next.length;a+=2){var u=i.next[a],h=i.next[a+1];s.push(u.name),!o||u.isText||u.hasRequiredAttrs()||(o=!1),-1==r.indexOf(h)&&r.push(h)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,r),o}}]),t}();P.empty=new P(!0);var W=function(){function t(e,n){c()(this,t),this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()}return f()(t,[{key:"eat",value:function(t){return this.next==t&&(this.pos++||!0)}},{key:"err",value:function(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}},{key:"next",get:function(){return this.tokens[this.pos]}}]),t}();function q(t){var e=[];do{e.push(G(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function G(t){var e=[];do{e.push(V(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function V(t){for(var e=function(t){if(t.eat("(")){var e=q(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var n=function(t,e){var n=t.nodeTypes,r=n[e];if(r)return[r];var i=[];for(var o in n){var s=n[o];s.groups.indexOf(e)>-1&&i.push(s)}0==i.length&&t.err("No node type or group '"+e+"' found");return i}(t,t.next).map((function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}));return t.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}t.err("Unexpected token '"+t.next+"'")}(t);;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=U(t,e)}return e}function H(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function U(t,e){var n=H(t),r=n;return t.eat(",")&&(r="}"!=t.next?H(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function K(t,e){return e-t}function Y(t,e){var n=[];return function e(r){var i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(var o=0;o<i.length;o++){var s=i[o],a=s.term,u=s.to;a||-1!=n.indexOf(u)||e(u)}}(e),n.sort(K)}function Q(t){var e=Object.create(null);for(var n in t){var r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function X(t,e){var n=Object.create(null);for(var r in t){var i=e&&e[r];if(void 0===i){var o=t[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}n[r]=i}return n}function Z(t){var e=Object.create(null);if(t)for(var n in t)e[n]=new et(t[n]);return e}var tt=function(){function t(e,n,r){c()(this,t),this.name=e,this.schema=n,this.spec=r,this.groups=r.group?r.group.split(" "):[],this.attrs=Z(r.attrs),this.defaultAttrs=Q(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==e),this.isText="text"==e}return f()(t,[{key:"hasRequiredAttrs",value:function(){for(var t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(t){return this==t||this.contentMatch.compatible(t.contentMatch)}},{key:"computeAttrs",value:function(t){return!t&&this.defaultAttrs?this.defaultAttrs:X(this.attrs,t)}},{key:"create",value:function(t,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new D(this,this.computeAttrs(t),v.from(e),x.setFrom(n))}},{key:"createChecked",value:function(t,e,n){if(e=v.from(e),!this.validContent(e))throw new RangeError("Invalid content for node "+this.name);return new D(this,this.computeAttrs(t),e,x.setFrom(n))}},{key:"createAndFill",value:function(t,e,n){if(t=this.computeAttrs(t),(e=v.from(e)).size){var r=this.contentMatch.fillBefore(e);if(!r)return null;e=r.append(e)}var i=this.contentMatch.matchFragment(e).fillBefore(v.empty,!0);return i?new D(this,t,e.append(i),x.setFrom(n)):null}},{key:"validContent",value:function(t){var e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(var n=0;n<t.childCount;n++)if(!this.allowsMarks(t.child(n).marks))return!1;return!0}},{key:"allowsMarkType",value:function(t){return null==this.markSet||this.markSet.indexOf(t)>-1}},{key:"allowsMarks",value:function(t){if(null==this.markSet)return!0;for(var e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}},{key:"allowedMarks",value:function(t){if(null==this.markSet)return t;for(var e=void 0,n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:x.empty:t}},{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==P.empty}},{key:"isAtom",get:function(){return this.isLeaf||this.spec.atom}}],[{key:"compile",value:function(e,n){var r=Object.create(null);e.forEach((function(e,i){return r[e]=new t(e,n,i)}));var i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}]),t}(),et=function(){function t(e){c()(this,t),this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}return f()(t,[{key:"isRequired",get:function(){return!this.hasDefault}}]),t}(),nt=function(){function t(e,n,r,i){c()(this,t),this.name=e,this.schema=r,this.spec=i,this.attrs=Z(i.attrs),this.rank=n,this.excluded=null;var o=Q(this.attrs);this.instance=o&&new x(this,o)}return f()(t,[{key:"create",value:function(t){return!t&&this.instance?this.instance:new x(this,X(this.attrs,t))}},{key:"removeFromSet",value:function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t.slice(0,e).concat(t.slice(e+1));return t}},{key:"isInSet",value:function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t[e]}},{key:"excludes",value:function(t){return this.excluded.indexOf(t)>-1}}],[{key:"compile",value:function(e,n){var r=Object.create(null),i=0;return e.forEach((function(e,o){return r[e]=new t(e,i++,n,o)})),r}}]),t}();!function(){function t(e){for(var n in c()(this,t),this.spec={},e)this.spec[n]=e[n];this.spec.nodes=j.from(e.nodes),this.spec.marks=j.from(e.marks),this.nodes=tt.compile(this.spec.nodes,this),this.marks=nt.compile(this.spec.marks,this);var r=Object.create(null);for(var i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");var o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;o.contentMatch=r[s]||(r[s]=P.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?rt(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var u in this.marks){var h=this.marks[u],l=h.spec.excludes;h.excluded=null==l?[h]:""==l?[]:rt(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)}f()(t,[{key:"node",value:function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof tt))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}},{key:"text",value:function(t,e){var n=this.nodes.text;return new L(n,n.defaultAttrs,t,x.setFrom(e))}},{key:"mark",value:function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}},{key:"nodeFromJSON",value:function(t){return D.fromJSON(this,t)}},{key:"markFromJSON",value:function(t){return x.fromJSON(this,t)}},{key:"nodeType",value:function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}])}();function rt(t,e){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(var a in t.marks){var u=t.marks[a];("_"==i||u.spec.group&&u.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=u)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}!function(){function t(e,n){var r=this;c()(this,t),this.schema=e,this.rules=n,this.tags=[],this.styles=[],n.forEach((function(t){t.tag?r.tags.push(t):t.style&&r.styles.push(t)})),this.normalizeLists=!this.tags.some((function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}f()(t,[{key:"parse",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ht(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()}},{key:"parseSlice",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ht(this,e,!0);return n.addAll(t,null,e.from,e.to),E.maxOpen(n.finish())}},{key:"matchTag",value:function(t,e){for(var n=0;n<this.tags.length;n++){var r=this.tags[n];if(ct(t,r.tag)&&(void 0===r.namespace||t.namespaceURI==r.namespace)&&(!r.context||e.matchesContext(r.context))){if(r.getAttrs){var i=r.getAttrs(t);if(!1===i)continue;r.attrs=i}return r}}}},{key:"matchStyle",value:function(t,e,n){for(var r=0;r<this.styles.length;r++){var i=this.styles[r];if(!(0!=i.style.indexOf(t)||i.context&&!n.matchesContext(i.context)||i.style.length>t.length&&(61!=i.style.charCodeAt(t.length)||i.style.slice(t.length+1)!=e))){if(i.getAttrs){var o=i.getAttrs(e);if(!1===o)continue;i.attrs=o}return i}}}}],[{key:"schemaRules",value:function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;r<e.length;r++){var i=e[r];if((null==i.priority?50:i.priority)<n)break}e.splice(r,0,t)}var r=function(e){var r=t.marks[e].spec.parseDOM;r&&r.forEach((function(t){n(t=lt(t)),t.mark=e}))};for(var i in t.marks)r(i);var o=function(e){var r=t.nodes[e].spec.parseDOM;r&&r.forEach((function(t){n(t=lt(t)),t.node=e}))};for(var i in t.nodes)o(i);return e}},{key:"fromSchema",value:function(e){return e.cached.domParser||(e.cached.domParser=new t(e,t.schemaRules(e)))}}])}();var it={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ot={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},st={ol:!0,ul:!0};function at(t){return(t?1:0)|("full"===t?2:0)}var ut=function(){function t(e,n,r,i,o,s,a){c()(this,t),this.type=e,this.attrs=n,this.solid=o,this.match=s||(4&a?null:e.contentMatch),this.options=a,this.content=[],this.marks=r,this.activeMarks=x.none,this.pendingMarks=i,this.stashMarks=[]}return f()(t,[{key:"findWrapping",value:function(t){if(!this.match){if(!this.type)return[];var e=this.type.contentMatch.fillBefore(v.from(t));if(!e){var n,r=this.type.contentMatch;return(n=r.findWrapping(t.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}},{key:"finish",value:function(t){if(!(1&this.options)){var e=this.content[this.content.length-1],n=void 0;e&&e.isText&&(n=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==n[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-n[0].length)))}var r=v.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(v.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}},{key:"popFromStashMark",value:function(t){for(var e=this.stashMarks.length-1;e>=0;e--)if(this.stashMarks[e].type==t)return this.stashMarks.splice(e,1)[0]}},{key:"applyPending",value:function(t){for(var e=0,n=this.pendingMarks;e<n.length;e++){var r=n[e];if((this.type?this.type.allowsMarkType(r.type):ft(r.type,t))&&!r.isInSet(this.activeMarks)){var i=pt(r,this.activeMarks);i&&this.stashMarks.push(i),this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks)}}}}]),t}(),ht=function(){function t(e,n,r){c()(this,t),this.parser=e,this.options=n,this.isOpen=r;var i=n.topNode,o=void 0,s=at(n.preserveWhitespace)|(r?4:0);o=i?new ut(i.type,i.attrs,x.none,x.none,!0,n.topMatch||i.type.contentMatch,s):new ut(r?null:e.schema.topNodeType,null,x.none,x.none,!0,null,s),this.nodes=[o],this.open=0,this.find=n.findPositions,this.needsBlock=!1}return f()(t,[{key:"addDOM",value:function(t){if(3==t.nodeType)this.addTextNode(t);else if(1==t.nodeType){var e=t.getAttribute("style"),n=e?this.readStyles(function(t){var e=/\s*([\w-]+)\s*:\s*([^;]+)/g,n=void 0,r=[];for(;n=e.exec(t);)r.push(n[1],n[2].trim());return r}(e)):null,r=this.top;if(null!=n)for(var i=0;i<n.length;i++)this.addPendingMark(n[i]);if(this.addElement(t),null!=n)for(var o=0;o<n.length;o++)this.removePendingMark(n[o],r)}}},{key:"addTextNode",value:function(t){var e=t.nodeValue,n=this.top;if((n.type?n.type.inlineContent:n.content.length&&n.content[0].isInline)||/[^ \t\r\n\u000c]/.test(e)){if(1&n.options)2&n.options||(e=e.replace(/\r?\n|\r/g," "));else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],i=t.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)}},{key:"addElement",value:function(t){var e=t.nodeName.toLowerCase();st.hasOwnProperty(e)&&this.parser.normalizeLists&&function(t){for(var e=t.firstChild,n=null;e;e=e.nextSibling){var r=1==e.nodeType?e.nodeName.toLowerCase():null;r&&st.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):"li"==r?n=e:r&&(n=null)}}(t);var n=this.options.ruleFromNode&&this.options.ruleFromNode(t)||this.parser.matchTag(t,this);if(n?n.ignore:ot.hasOwnProperty(e))this.findInside(t);else if(!n||n.skip||n.closeParent){n&&n.closeParent?this.open=Math.max(0,this.open-1):n&&n.skip.nodeType&&(t=n.skip);var r=void 0,i=this.top,o=this.needsBlock;if(it.hasOwnProperty(e))r=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t);this.addAll(t),r&&this.sync(i),this.needsBlock=o}else this.addElementByRule(t,n)}},{key:"leafFallback",value:function(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))}},{key:"readStyles",value:function(t){for(var e=x.none,n=0;n<t.length;n+=2){var r=this.parser.matchStyle(t[n],t[n+1],this);if(r){if(r.ignore)return null;e=this.parser.schema.marks[r.mark].create(r.attrs).addToSet(e)}}return e}},{key:"addElementByRule",value:function(t,e){var n=this,r=void 0,i=void 0,o=void 0;e.node?(i=this.parser.schema.nodes[e.node]).isLeaf?this.insertNode(i.create(e.attrs))||this.leafFallback(t):r=this.enter(i,e.attrs,e.preserveWhitespace):(o=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(o));var s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((function(t){return n.insertNode(t)}));else{var a=e.contentElement;"string"==typeof a?a=t.querySelector(a):"function"==typeof a&&(a=a(t)),a||(a=t),this.findAround(t,a,!0),this.addAll(a,r)}r&&(this.sync(s),this.open--),o&&this.removePendingMark(o,s)}},{key:"addAll",value:function(t,e,n,r){for(var i=n||0,o=n?t.childNodes[n]:t.firstChild,s=null==r?null:t.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o),e&&it.hasOwnProperty(o.nodeName.toLowerCase())&&this.sync(e);this.findAtPoint(t,i)}},{key:"findPlace",value:function(t){for(var e=void 0,n=void 0,r=this.open;r>=0;r--){var i=this.nodes[r],o=i.findWrapping(t);if(o&&(!e||e.length>o.length)&&(e=o,n=i,!o.length))break;if(i.solid)break}if(!e)return!1;this.sync(n);for(var s=0;s<e.length;s++)this.enterInner(e[s],null,!1);return!0}},{key:"insertNode",value:function(t){if(t.isInline&&this.needsBlock&&!this.top.type){var e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(t)){this.closeExtra();var n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));for(var r=n.activeMarks,i=0;i<t.marks.length;i++)n.type&&!n.type.allowsMarkType(t.marks[i].type)||(r=t.marks[i].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}},{key:"enter",value:function(t,e,n){var r=this.findPlace(t.create(e));return r&&this.enterInner(t,e,!0,n),r}},{key:"enterInner",value:function(t,e,n,r){this.closeExtra();var i=this.top;i.applyPending(t),i.match=i.match&&i.match.matchType(t,e);var o=null==r?-5&i.options:at(r);4&i.options&&0==i.content.length&&(o|=4),this.nodes.push(new ut(t,e,i.activeMarks,i.pendingMarks,n,null,o)),this.open++}},{key:"closeExtra",value:function(t){var e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}},{key:"sync",value:function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)}},{key:"findAtPoint",value:function(t,e){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}},{key:"findInside",value:function(t){if(this.find)for(var e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}},{key:"findAround",value:function(t,e,n){if(t!=e&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node))e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}},{key:"findInText",value:function(t){if(this.find)for(var e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}},{key:"matchesContext",value:function(t){var e=this;if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var n=t.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1);return function t(s,a){for(;s>=0;s--){var u=n[s];if(""==u){if(s==n.length-1||0==s)continue;for(;a>=o;a--)if(t(s-1,a))return!0;return!1}var h=a>0||0==a&&i?e.nodes[a].type:r&&a>=o?r.node(a-o).type:null;if(!h||h.name!=u&&-1==h.groups.indexOf(u))return!1;a--}return!0}(n.length-1,this.open)}},{key:"textblockFromContext",value:function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var i=this.parser.schema.nodes[r];if(i.isTextblock&&i.defaultAttrs)return i}}},{key:"addPendingMark",value:function(t){var e=pt(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}},{key:"removePendingMark",value:function(t,e){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);var i=r.popFromStashMark(t.type);i&&(r.activeMarks=i.addToSet(r.activeMarks))}if(r==e)break}}},{key:"top",get:function(){return this.nodes[this.open]}},{key:"currentPos",get:function(){this.closeExtra();for(var t=0,e=this.open;e>=0;e--){for(var n=this.nodes[e].content,r=n.length-1;r>=0;r--)t+=n[r].nodeSize;e&&t++}return t}}]),t}();function ct(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function lt(t){var e={};for(var n in t)e[n]=t[n];return e}function ft(t,e){var n=e.schema.nodes,r=function(r){var i=n[r];if(!i.allowsMarkType(t))return"continue";var o=[];return function t(n){o.push(n);for(var r=0;r<n.edgeCount;r++){var i=n.edge(r),s=i.type,a=i.next;if(s==e)return!0;if(o.indexOf(a)<0&&t(a))return!0}}(i.contentMatch)?{v:!0}:void 0};for(var i in n){var o=r(i);switch(o){case"continue":continue;default:if("object"===(void 0===o?"undefined":g()(o)))return o.v}}}function pt(t,e){for(var n=0;n<e.length;n++)if(t.type==e[n].type)return e[n]}!function(){function t(e,n){c()(this,t),this.nodes=e||{},this.marks=n||{}}f()(t,[{key:"serializeFragment",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];r||(r=vt(n).createDocumentFragment());var i=r,o=null;return t.forEach((function(t){if(o||t.marks.length){o||(o=[]);for(var r=0,s=0;r<o.length&&s<t.marks.length;){var a=t.marks[s];if(e.marks[a.type.name]){if(!a.eq(o[r])||!1===a.type.spec.spanning)break;r+=2,s++}else s++}for(;r<o.length;)i=o.pop(),o.pop();for(;s<t.marks.length;){var u=t.marks[s++],h=e.serializeMark(u,t.isInline,n);h&&(o.push(u,i),i.appendChild(h.dom),i=h.contentDOM||h.dom)}}i.appendChild(e.serializeNode(t,n))})),r}},{key:"serializeNode",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.renderSpec(vt(n),this.nodes[e.type.name](e)),i=r.dom,o=r.contentDOM;if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");n.onContent?n.onContent(e,o,n):this.serializeFragment(e.content,n,o)}return i}},{key:"serializeNodeAndMarks",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNode(t,e),r=t.marks.length-1;r>=0;r--){var i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}},{key:"serializeMark",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.marks[e.type.name];return i&&t.renderSpec(vt(r),i(e,n))}}],[{key:"renderSpec",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"==typeof n)return{dom:e.createTextNode(n)};if(null!=n.nodeType)return{dom:n};if(n.dom&&null!=n.dom.nodeType)return n;var i=n[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));var s=null,a=r?e.createElementNS(r,i):e.createElement(i),u=n[1],h=1;if(u&&"object"==(void 0===u?"undefined":g()(u))&&null==u.nodeType&&!Array.isArray(u))for(var c in h=2,u)if(null!=u[c]){var l=c.indexOf(" ");l>0?a.setAttributeNS(c.slice(0,l),c.slice(l+1),u[c]):a.setAttribute(c,u[c])}for(var f=h;f<n.length;f++){var p=n[f];if(0===p){if(f<n.length-1||f>h)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var d=t.renderSpec(e,p,r),v=d.dom,y=d.contentDOM;if(a.appendChild(v),y){if(s)throw new RangeError("Multiple content holes");s=y}}return{dom:a,contentDOM:s}}},{key:"fromSchema",value:function(e){return e.cached.domSerializer||(e.cached.domSerializer=new t(this.nodesFromSchema(e),this.marksFromSchema(e)))}},{key:"nodesFromSchema",value:function(t){var e=dt(t.nodes);return e.text||(e.text=function(t){return t.text}),e}},{key:"marksFromSchema",value:function(t){return dt(t.marks)}}])}();function dt(t){var e={};for(var n in t){var r=t[n].spec,i=r.toDOM;i&&(e[n]=i.bind(r))}return e}function vt(t){return t.document||window.document}var yt=Math.pow(2,16);function mt(t){return 65535&t}var kt=function t(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;c()(this,t),this.pos=e,this.deleted=n,this.recover=r},gt=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c()(this,t),this.ranges=e,this.inverted=n}return f()(t,[{key:"recover",value:function(t){var e=0,n=mt(t);if(!this.inverted)for(var r=0;r<n;r++)e+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+e+function(t){return(t-(65535&t))/yt}(t)}},{key:"mapResult",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(t,e,!1)}},{key:"map",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(t,e,!0)}},{key:"_map",value:function(t,e,n){for(var r=0,i=this.inverted?2:1,o=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var a=this.ranges[s]-(this.inverted?r:0);if(a>t)break;var u=this.ranges[s+i],h=this.ranges[s+o],c=a+u;if(t<=c){var l=a+r+((u?t==a?-1:t==c?1:e:e)<0?0:h);if(n)return l;var f=t==(e<0?a:c)?null:s/3+(t-a)*yt;return new kt(l,e<0?t!=a:t!=c,f)}r+=h-u}return n?t+r:new kt(t+r)}},{key:"touches",value:function(t,e){for(var n=0,r=mt(e),i=this.inverted?2:1,o=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var a=this.ranges[s]-(this.inverted?n:0);if(a>t)break;var u=this.ranges[s+i];if(t<=a+u&&s==3*r)return!0;n+=this.ranges[s+o]-u}return!1}},{key:"forEach",value:function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,i=0;r<this.ranges.length;r+=3){var o=this.ranges[r],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),u=this.ranges[r+e],h=this.ranges[r+n];t(s,s+u,a,a+h),i+=h-u}}},{key:"invert",value:function(){return new t(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(e){return 0==e?t.empty:new t(e<0?[0,-e,0]:[0,0,e])}}]),t}();gt.empty=new gt([]);var wt=function(){function t(e,n,r,i){c()(this,t),this.maps=e||[],this.from=r||0,this.to=null==i?this.maps.length:i,this.mirror=n}return f()(t,[{key:"slice",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new t(this.maps,this.mirror,e,n)}},{key:"copy",value:function(){return new t(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}},{key:"appendMap",value:function(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)}},{key:"appendMapping",value:function(t){for(var e=0,n=this.maps.length;e<t.maps.length;e++){var r=t.getMirror(e);this.appendMap(t.maps[e],null!=r&&r<e?n+r:null)}}},{key:"getMirror",value:function(t){if(this.mirror)for(var e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}},{key:"setMirror",value:function(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}},{key:"appendMappingInverted",value:function(t){for(var e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){var r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}}},{key:"invert",value:function(){var e=new t;return e.appendMappingInverted(this),e}},{key:"map",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(t,e,!0);for(var n=this.from;n<this.to;n++)t=this.maps[n].map(t,e);return t}},{key:"mapResult",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(t,e,!1)}},{key:"_map",value:function(t,e,n){for(var r=!1,i=this.from;i<this.to;i++){var o=this.maps[i].mapResult(t,e);if(null!=o.recover){var s=this.getMirror(i);if(null!=s&&s>i&&s<this.to){i=s,t=this.maps[s].recover(o.recover);continue}}o.deleted&&(r=!0),t=o.pos}return n?t:new kt(t,r)}}]),t}();function xt(t){var e=Error.call(this,t);return e.__proto__=xt.prototype,e}xt.prototype=Object.create(Error.prototype),xt.prototype.constructor=xt,xt.prototype.name="TransformError";var St=function(){function t(e){c()(this,t),this.doc=e,this.steps=[],this.docs=[],this.mapping=new wt}return f()(t,[{key:"step",value:function(t){var e=this.maybeStep(t);if(e.failed)throw new xt(e.failed);return this}},{key:"maybeStep",value:function(t){var e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}},{key:"addStep",value:function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}},{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"docChanged",get:function(){return this.steps.length>0}}]),t}();function Et(){throw new Error("Override me")}var bt=Object.create(null),Ct=function(){function t(){c()(this,t)}return f()(t,[{key:"apply",value:function(t){return Et()}},{key:"getMap",value:function(){return gt.empty}},{key:"invert",value:function(t){return Et()}},{key:"map",value:function(t){return Et()}},{key:"merge",value:function(t){return null}},{key:"descCmd",value:function(t){this.cmd=t}},{key:"toJSON",value:function(){return Et()}}],[{key:"fromJSON",value:function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=bt[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)}},{key:"jsonID",value:function(t,e){if(t in bt)throw new RangeError("Duplicate use of step JSON ID "+t);return bt[t]=e,e.prototype.jsonID=t,e}}]),t}(),Mt=function(){function t(e,n){c()(this,t),this.doc=e,this.failed=n}return f()(t,null,[{key:"ok",value:function(e){return new t(e,null)}},{key:"fail",value:function(e){return new t(null,e)}},{key:"fromReplace",value:function(e,n,r,i){try{return t.ok(e.replace(n,r,i))}catch(e){if(e instanceof S)return t.fail(e.message);throw e}}}]),t}(),Ft=function(t){function e(t,n,r,o){c()(this,e);var s=i()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s.from=t,s.to=n,s.slice=r,s.structure=!!o,s}return u()(e,t),f()(e,[{key:"apply",value:function(t){return this.structure&&Tt(t,this.from,this.to)?Mt.fail("Structure replace would overwrite content"):Mt.fromReplace(t,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new gt([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}},{key:"map",value:function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)}},{key:"merge",value:function(t){if(!(t instanceof e)||t.structure!=this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;var n=this.slice.size+t.slice.size==0?E.empty:new E(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var r=this.slice.size+t.slice.size==0?E.empty:new E(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)}},{key:"toJSON",value:function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}}],[{key:"fromJSON",value:function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,E.fromJSON(t,n.slice),!!n.structure)}}]),e}(Ct);Ct.jsonID("replace",Ft);var Ot=function(t){function e(t,n,r,o,s,a,u){c()(this,e);var h=i()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return h.from=t,h.to=n,h.gapFrom=r,h.gapTo=o,h.slice=s,h.insert=a,h.structure=!!u,h}return u()(e,t),f()(e,[{key:"apply",value:function(t){if(this.structure&&(Tt(t,this.from,this.gapFrom)||Tt(t,this.gapTo,this.to)))return Mt.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return Mt.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?Mt.fromReplace(t,this.from,this.to,n):Mt.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new gt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(t){var n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deleted&&r.deleted||i<n.pos||o>r.pos?null:new e(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}}],[{key:"fromJSON",value:function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,E.fromJSON(t,n.slice),n.insert,!!n.structure)}}]),e}(Ct);function Tt(t,e,n){for(var r=t.resolve(e),i=n-e,o=r.depth;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0)for(var s=r.node(o).maybeChild(r.indexAfter(o));i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}return!1}function Nt(t,e,n){var r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function _t(t,e,n){for(var r=[],i=0;i<t.childCount;i++){var o=t.child(i);o.content.size&&(o=o.copy(_t(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return v.fromArray(r)}Ct.jsonID("replaceAround",Ot),St.prototype.lift=function(t,e){for(var n=t.$from,r=t.$to,i=t.depth,o=n.before(i+1),s=r.after(i+1),a=o,u=s,h=v.empty,c=0,l=i,f=!1;l>e;l--)f||n.index(l)>0?(f=!0,h=v.from(n.node(l).copy(h)),c++):a--;for(var p=v.empty,d=0,y=i,m=!1;y>e;y--)m||r.after(y+1)<r.end(y)?(m=!0,p=v.from(r.node(y).copy(p)),d++):u++;return this.step(new Ot(a,u,o,s,new E(h.append(p),c,d),h.size-c,!0))},St.prototype.wrap=function(t,e){for(var n=v.empty,r=e.length-1;r>=0;r--)n=v.from(e[r].type.create(e[r].attrs,n));var i=t.start,o=t.end;return this.step(new Ot(i,o,i,o,new E(n,0,0),e.length,!0))},St.prototype.setBlockType=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this,r=arguments[2],i=arguments[3];if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var o=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(r,i)&&Nt(n.doc,n.mapping.slice(o).map(e),r)){n.clearIncompatible(n.mapping.slice(o).map(e,1),r);var s=n.mapping.slice(o),a=s.map(e,1),u=s.map(e+t.nodeSize,1);return n.step(new Ot(a,u,a+1,u-1,new E(v.from(r.create(i,null,t.marks)),0,0),1,!0)),!1}})),this},St.prototype.setNodeMarkup=function(t,e,n,r){var i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");e||(e=i.type);var o=e.create(n,null,r||i.marks);if(i.isLeaf)return this.replaceWith(t,t+i.nodeSize,o);if(!e.validContent(i.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new Ot(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new E(v.from(o),0,0),1,!0))},St.prototype.split=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments[2],r=this.doc.resolve(t),i=v.empty,o=v.empty,s=r.depth,a=r.depth-e,u=e-1;s>a;s--,u--){i=v.from(r.node(s).copy(i));var h=n&&n[u];o=v.from(h?h.type.create(h.attrs,o):r.node(s).copy(o))}return this.step(new Ft(t,t,new E(i.append(o),e,e),!0))},St.prototype.join=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=new Ft(t-e,t+e,E.empty,!0);return this.step(n)};var At=function(t){function e(t,n,r){c()(this,e);var o=i()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o.from=t,o.to=n,o.mark=r,o}return u()(e,t),f()(e,[{key:"apply",value:function(t){var e=this,n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new E(_t(n.content,(function(t,n){return n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),i),n.openStart,n.openEnd);return Mt.fromReplace(t,this.from,this.to,o)}},{key:"invert",value:function(){return new Bt(this.from,this.to,this.mark)}},{key:"map",value:function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}},{key:"merge",value:function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}}]),e}(Ct);Ct.jsonID("addMark",At);var Bt=function(t){function e(t,n,r){c()(this,e);var o=i()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o.from=t,o.to=n,o.mark=r,o}return u()(e,t),f()(e,[{key:"apply",value:function(t){var e=this,n=t.slice(this.from,this.to),r=new E(_t(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return Mt.fromReplace(t,this.from,this.to,r)}},{key:"invert",value:function(){return new At(this.from,this.to,this.mark)}},{key:"map",value:function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);r
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|M男之家

GMT+8, 2026-11-11 09:17 , Processed in 0.051010 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表